Industrial equipment abnormal traffic real-time detection method based on 5G private network

By deploying edge nodes in a 5G private network to identify and map logical service flows, a normal behavior baseline is constructed. Combined with the feature sets of observation points on the N3 and N6 sides, the accuracy problem of abnormal traffic detection for industrial equipment in the 5G private network is solved, the false alarm rate is reduced, and the detection accuracy is improved.

CN123164441APending Publication Date: 2026-11-24MILITARY SECRECY QUALIFICATION EXAMINATION & CERTIFICATION CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611472336.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies are not accurate enough in detecting abnormal traffic from industrial equipment in 5G private networks, especially during periods of legitimate connection changes, with a high false alarm rate, and cannot distinguish between abnormal industrial equipment and abnormal network transmission.

Method used

By deploying edge nodes on the same machine as the UPF, the target logical service flow of industrial equipment is identified and mapped to build a normal behavior baseline. By utilizing the feature sets of observation points on the N3 and N6 sides, abnormal traffic of industrial equipment is detected. Combined with 5G connection event records, false alarms caused by legitimate connection changes are reduced.

Benefits of technology

It improves the accuracy of abnormal traffic detection for industrial equipment, reduces the false alarm rate during legitimate connection changes, accurately distinguishes between industrial equipment anomalies and network transmission anomalies, and provides highly reliable underlying physical attribution pointers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123164441A_ABST
    Figure CN123164441A_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial network communication and network security technology, and in particular to a method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network. The method first maps the target logical service flow of the industrial equipment. Based on the structural feature set and transmission sensitive feature set used to monitor the target logical service flow, a normal behavior baseline for the target logical service flow is constructed. Based on the connection event impact status within each target time window after obtaining the normal behavior baseline, the packet matching situation of the target logical service flow on the N3 and N6 sides, and the difference between the value of each preset feature in the structural feature set and transmission sensitive feature set of the target logical service flow on the N3 and N6 sides and the normal behavior baseline, abnormal traffic events of the industrial equipment within each target time window are detected, thus improving the accuracy of abnormal traffic detection for industrial equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial network communication and network security technology, and in particular to a method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network. Background Technology

[0002] In scenarios where 5G private networks carry industrial control and machine vision services, industrial equipment accesses through 5G base stations and forwards data via user plane functions. Existing technologies typically establish statistical benchmarks based on historical normal traffic, directly using the current service quality flow identifier as the service identity, and always using the same set of fixed time sequence characteristics and traffic intensity characteristics to judge deviations in the current traffic.

[0003] However, during 5G network operation, legitimate connection changes frequently occur, such as Quality of Service (QoS) flow reconfiguration, PDU session modification, and access connection switching. These legitimate connection changes physically alter network scheduling strategies and queue buffer states, causing existing technologies using fixed QoS flow identifiers to split the same industrial service into different detection objects before and after reconfiguration, resulting in a mismatch of normal service benchmarks. Simultaneously, legitimate connection changes inevitably cause packet arrival interval jitter and short-term throughput spikes. Existing unified and fixed timing feature detection mechanisms incorrectly identify these legitimate transient timing disturbances as changes in industrial equipment communication behavior. Furthermore, a single observation node cannot provide cross-network segment verification data, making it impossible for the system to distinguish whether packet delays or losses originate from transmission anomalies within the industrial equipment itself or merely from congestion in the 5G core network user plane forwarding link. Therefore, existing anomaly detection schemes have extremely high false alarm rates during legitimate connection state changes in 5G private networks. This not only easily contaminates the normal benchmark parameter set with abnormal time windows but also fails to accurately separate genuine industrial source-end service anomalies from private network bearer transmission anomalies.

[0004] Therefore, improving the accuracy of abnormal flow detection in industrial equipment has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network, in order to solve the problem of how to improve the accuracy of abnormal traffic detection in industrial equipment.

[0006] This invention provides a method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network. The method includes the following steps:

[0007] By utilizing edge nodes deployed on the same machine as the UPF, the target logical service flow of industrial equipment is identified and mapped, and an observation time window for the target logical service flow is constructed. Based on the preset characteristics used to monitor the target logical service flow, a structural feature set and a transmission sensitive feature set are constructed. Based on the value of each preset feature of the target logical service flow on the N3 and N6 sides within the observation time window that meets the preset conditions, a normal behavior baseline for the target logical service flow is constructed.

[0008] The observation time window after obtaining the normal behavior baseline is recorded as the target time window. For any target time window, the packets of the target logical service flow on the N3 side and the N6 side within the target time window are paired to obtain the cross-observation point matching rate within the target time window.

[0009] Based on the difference between the value of each preset feature in the transmission sensitivity feature set of the target logical service flow on the N3 side and the N6 side within any target time window and the normal behavior baseline, the transmission sensitivity deviation of the target logical service flow on the N3 side and the N6 side within any target time window is obtained.

[0010] Based on the cross-observation point matching rate and transmission sensitivity deviation within any target time window, as well as the 5G connection event records of the logical service flow, obtain the connection event impact state feature value for any target time window.

[0011] Based on the connection event impact state feature value of any target time window, and the difference between the value of each preset feature of the target logical business flow on the N3 side and the N6 side and the normal behavior baseline, abnormal traffic events of industrial equipment within any target time window are detected.

[0012] Preferably, the identification and mapping of the target logical business flow of industrial equipment includes:

[0013] If the PDU sessions corresponding to two user plane packets of an industrial device belong to the continuous session state of the industrial device, and the quality of service flow identifier of the two user plane packets changes, then it is determined whether the industrial device, packet direction, peer network address, transport layer protocol and service port covered by the packet filtering rules of the two user plane packets are consistent. If they are consistent, then the two user plane packets are mapped to the same logical service flow. If they are not consistent, then a new logical service flow is established.

[0014] If the QoS flow identifier of the two user plane packets changes and the packet filtering rules change, then it is determined whether there is a business continuity relationship between the packet filtering rules of the two user plane packets. If there is a business continuity relationship, then the two user plane packets are mapped to the same logical business flow. If there is no business continuity relationship, then a new logical business flow is established.

[0015] Any logical business flow is denoted as the target logical business flow.

[0016] Preferably, the step of constructing a structural feature set and a transmission-sensitive feature set based on preset features used for monitoring target logical service flows includes:

[0017] The preset features include the novelty of the peer network address, the novelty of the service port, the packet direction conversion ratio, the packet length distribution characteristics, the number of packets, the number of bytes, the median packet arrival interval, and the burst transmission ratio.

[0018] The structural feature set is composed of the novelty of the peer network address, the novelty of the service port, the proportion of message direction conversion, and the distribution characteristics of message length. The transmission sensitivity feature set is composed of the number of messages, the number of bytes, the median message arrival interval, and the proportion of burst transmission.

[0019] Preferably, the step of constructing a normal behavior baseline for the target logical service flow based on the values ​​of each preset feature of the target logical service flow on the N3 and N6 sides within an observation time window that meets preset conditions includes:

[0020] A set of observation time windows with a continuous preset number of no 5G connection events is recorded as the calibration time window. The peer network addresses of all packets of the target logical service flow on the N3 side within all calibration time windows are used to form the N3 side reference peer network address set. The service ports of all packets of the target logical service flow on the N3 side within all calibration time windows are used to form the N3 side reference service port set.

[0021] For any calibration time window, obtain the peer network address of all packets of the target logical service flow on the N3 side within the any calibration time window. Among the peer network addresses of all packets of the target logical service flow on the N3 side within the any calibration time window, calculate the proportion of peer network addresses that do not belong to the N3 side reference peer network address set, and obtain the novelty of the peer network address of the target logical service flow on the N3 side within the any calibration time window.

[0022] Based on the service ports of all packets of the target logical service flow on the N3 side within any calibration time window and the set of reference service ports on the N3 side, obtain the novelty of the service ports of the target logical service flow on the N3 side within any calibration time window.

[0023] The packet acquisition time and packet direction of each packet of the target logical service flow on the N3 side within any calibration time window are obtained. According to the packet acquisition time, each packet of the target logical service flow on the N3 side within any calibration time window is sorted to obtain a packet sequence. Based on whether the packet direction of each two adjacent packets in the packet sequence changes, the proportion of the packet direction change in the packet sequence is obtained and recorded as the packet direction conversion ratio of the target logical service flow on the N3 side within any calibration time window.

[0024] Obtain the message length of each message of the target logical service flow on the N3 side within any calibration time window, calculate the median message length of all messages, and use it as the value of the message length distribution characteristic of the target logical service flow on the N3 side within any calibration time window;

[0025] Obtain the arrival interval of each packet of the target logical service flow on the N3 side within each calibration time window, calculate the preset lower quantile of all intervals, obtain the lower quantile of the reference arrival interval on the N3 side, and calculate the proportion of packets with arrival intervals lower than the lower quantile of the reference arrival interval on the N3 side among all packets of the target logical service flow on the N3 side within any calibration time window, thereby obtaining the burst transmission ratio of the target logical service flow on the N3 side within any calibration time window.

[0026] Obtain the value of each preset feature of the target logical service flow on the N3 side within each calibration time window, and obtain the reference parameter set of the target logical service flow on the N3 side based on the value of each preset feature of the target logical service flow on the N3 side within each calibration time window;

[0027] Obtain the value of each preset feature of the target logical service flow on the N6 side within each calibration time window, and obtain the reference parameter set of the target logical service flow on the N6 side based on the value of each preset feature of the target logical service flow on the N6 side within each calibration time window;

[0028] The baseline parameters on the N3 side and the N6 side are combined to form the normal behavior baseline of the target logical business flow.

[0029] Preferably, the step of obtaining the reference parameter set of the target logical service flow on the N3 side based on the value of each preset feature of the target logical service flow on the N3 side within each calibration time window includes:

[0030] For any preset feature, calculate the median value of the target logical service flow on the N3 side within all calibration time windows for any preset feature, and obtain the baseline median value of the target logical service flow for any preset feature on the N3 side.

[0031] Calculate the absolute value of the difference between the value of any preset feature of the target logical service flow on the N3 side and the benchmark median in each calibration time window. Calculate the sum between the median of all absolute differences and the preset lower limit value of any preset feature to obtain the benchmark discrete scale of any preset feature of the target logical service flow on the N3 side.

[0032] Obtain the baseline median and baseline discrete scale of each preset feature of the target logical business flow on the N3 side, and combine the baseline median and baseline discrete scale of each preset feature of the target logical business flow on the N3 side to form the baseline parameter set of the target logical business flow on the N3 side.

[0033] Preferably, obtaining the cross-observation point matching rate within any target time window includes:

[0034] Obtain the packet association fingerprint of the packets of the target logical service flow on the N3 side within any target time window, and record the time range corresponding to the preset time extension of the target time window and thereafter as the matching time range of the target time window. Obtain the packet association fingerprint of the packets of the target logical service flow on the N6 side within the matching time range. Based on the packet association fingerprint, perform packet matching between the packets on the N3 side within any target time window and the packets on the N6 side within the matching time range to obtain packet matching pairs.

[0035] The maximum value among the number of messages on the N3 side within any target time window, the number of messages on the N6 side within the matching time range, and constant 1 is selected as the denominator, and the number of all matching pairs of messages is selected as the numerator to obtain the cross-observation point matching rate within any target time window.

[0036] Preferably, obtaining the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides within any target time window includes:

[0037] Both N3 and N6 are recorded as observation points. For any observation point, the baseline median and baseline discrete scale of any preset feature in the transmission sensitive feature set of any observation point are obtained in the normal behavior baseline. The baseline discrete scale of any preset feature of any observation point is used as the denominator, and the absolute value of the difference between the value of any preset feature of any observation point and the baseline median of any preset feature of any observation point within any target time window is used as the numerator to obtain the feature deviation of the target logical service flow of any logical service flow in any target time window from any preset feature of any observation point.

[0038] Obtain the feature deviation of each preset feature in the transmission sensitive feature set of the target logical service flow within any target time window at any observation point, and select the maximum value among all feature deviations corresponding to any observation point as the transmission sensitivity deviation of the target logical service flow within any target time window at any observation point.

[0039] Obtain the transmission sensitivity deviation of the target logical service flow at each observation point within any target time window, and obtain the transmission sensitivity deviation of the target logical service flow on the N3 side and N6 side within any target time window.

[0040] Preferably, obtaining the connection event impact state feature value of any target time window includes:

[0041] If a 5G connection event occurs within any of the target time windows, the connection event impact state feature value of any target time window is set to 1.

[0042] If no 5G connection event occurs within any target time window, then determine whether there is a target time window before any target time window in which a 5G connection event has occurred. If no 5G connection event occurs in any target time window before any target time window, then set the connection event impact state feature value of any target time window to 0.

[0043] If there is a target time window before any target time window where a 5G connection event occurs, then the target time window where the 5G connection event occurs closest to any target time window is obtained and recorded as the connection event start time window. If the number of target time windows between the connection event start time window and any target time window is less than the preset number of consecutive recovery judgment time windows, then the connection event impact state feature value of any target time window is set to 1.

[0044] If the number of target time windows between the connection event start time window and any target time window is greater than or equal to the preset number of consecutive recovery determination time windows, then the target time windows that are consecutive before any target time window and are the preset number of consecutive recovery determination time windows are recorded as determination time windows.

[0045] The cross-observation point matching rate and the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides are obtained in each decision time window. If the cross-observation point matching rate in each decision time window is greater than or equal to the preset matching recovery threshold, and the maximum value of the transmission sensitivity deviation on the N3 and N6 sides in each decision time window is less than or equal to the preset deviation threshold, then the connection event impact status feature value of any target time window is set to 0.

[0046] If the cross-observation point matching rate within any decision time window is less than the preset matching recovery threshold, or the maximum value of the transmission sensitivity deviation between the N3 side and the N6 side is greater than the preset deviation threshold, then the connection event impact state feature value of any target time window is set to 1.

[0047] Preferably, detecting abnormal flow events of industrial equipment within any target time window includes:

[0048] Based on the difference between the value of each preset feature in the structural feature set of the target logical service flow on the N3 and N6 sides within any target time window and the normal behavior baseline, the structural deviation of the target logical service flow on the N3 and N6 sides within any target time window is obtained.

[0049] Both N3 and N6 are recorded as observation points. For any observation point, the connection event impact state characteristic value of any target time window is subtracted from the constant 1 to obtain the target value. The product between the target value and the transmission sensitivity deviation of the target logical service flow in any target time window at any observation point is calculated. The maximum value between the product and the structural deviation of the target logical service flow in any target time window at any observation point is selected to obtain the state-related deviation of the target logical service flow in any target time window at any observation point.

[0050] The state-related deviation of the target logical service flow within any target time window is obtained on the N3 side and the N6 side respectively. The maximum value is selected from the state-related deviation of the N3 side and the N6 side to obtain the maximum state-related deviation of the target logical service flow across observation points within any target time window.

[0051] The absolute value of the difference between the state-related deviation between the N3 side and the N6 side is used as the numerator, and the sum of the state-related deviation between the N3 side and the N6 side and the preset lower limit value is used as the denominator to obtain the target ratio. The constant 1 is subtracted from the target ratio to obtain the cross-observation point abnormal consistency of the target logical business flow within any target time window.

[0052] Calculate the product between the maximum state correlation deviation across observation points and the degree of anomaly consistency across observation points to obtain the anomaly score of the target logical business flow within any target time window;

[0053] If the abnormal score of the target logical business flow within any target time window is greater than or equal to the preset abnormal judgment threshold, the cross-observation point abnormal consistency degree is greater than or equal to the preset consistency judgment threshold, and the cross-observation point matching rate is greater than or equal to the preset matching judgment threshold, then it is determined that there is an industrial equipment abnormal traffic event in the target logical business flow within any target time window.

[0054] If the maximum state correlation deviation of the target logical service flow across observation points within any target time window is greater than or equal to a preset anomaly judgment threshold, and the cross-observation point matching rate is less than a preset matching judgment threshold or the cross-observation point anomaly consistency degree is less than a preset consistency judgment threshold, then it is determined that there is a network transmission anomaly event in the target logical service flow within any target time window.

[0055] Preferably, after detecting abnormal flow events of industrial equipment within any target time window, the method further includes:

[0056] If the connection event impact state feature value of any target time window is 0, and no network transmission abnormal event or industrial equipment abnormal traffic event occurs within any target time window, and the cross-observation point matching rate within any target time window is greater than or equal to the preset matching judgment threshold, and the cross-observation point abnormal consistency degree is greater than or equal to the preset consistency judgment threshold, and the abnormal score is less than the preset abnormal judgment threshold, then any target time window will be used as a calibration time window.

[0057] Based on the values ​​of each preset feature of the target logical service flow on the N3 and N6 sides within each calibration time window, the normal behavior baseline of the target logical service flow is recalculated to detect abnormal flow events of industrial equipment in the next target time window of any target time window.

[0058] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0059] This invention first identifies and maps the logical service flows of industrial equipment and constructs a normal behavior baseline. This overcomes the bias of existing technologies that rigidly bind service identities to volatile network underlying identifiers, ensuring that the normal behavior baseline is not unnecessarily fragmented by legitimate changes in the Quality of Service (QoS) flow identifier. This fundamentally guarantees the continuity of the logical service flow's identity and the accuracy of its baseline matching throughout the entire 5G connection state evolution process. Then, based on 5G connection event records, it determines the impact state of connection events within each target time window. Based on this impact state, it identifies abnormal traffic from industrial equipment within each target time window, thereby reducing transient timing disturbances caused by legitimate connection changes. The possibility of abnormal traffic from industrial equipment is significantly reduced, greatly decreasing the false alarm rate during dynamic network changes. This invention introduces a dual-end observation and verification mechanism for the N3 and N6 sides of the user plane function. By comparing the integrity of data forwarding across the entire link, the matching rate across observation points is obtained. Combined with the physical symmetry of the deviation from the normal behavior baseline on the N3 and N6 sides, the system can clearly determine whether the anomaly is a real service variation of industrial equipment that runs through the end-to-end link or a single-sided forwarding failure that exists only within the core network. This allows for accurate output of abnormal traffic events or network transmission anomalies for industrial equipment, providing a highly reliable underlying physical attribution pointer for safe operation and maintenance in industrial sites. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a flowchart of a method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network, provided by the present invention. Detailed Implementation

[0062] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0063] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0064] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0065] See Figure 1 This is a flowchart of a method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network, as provided by the present invention. Figure 1 As shown, the method may include:

[0066] Step S101: Using edge nodes deployed on the same machine as the UPF, identify and map the target logical service flow of the industrial equipment, construct the observation time window of the target logical service flow, construct the structural feature set and the transmission sensitive feature set according to the preset features used to monitor the target logical service flow, and construct the normal behavior baseline of the target logical service flow based on the value of each preset feature of the target logical service flow on the N3 side and the N6 side within the observation time window that meets the preset conditions.

[0067] Industrial equipment accesses the 5G private network through 5G base stations. User plane services enter the User Plane Function (UPF) through the N3 interface from the 5G base station, and then enter the industrial application server in the industrial data network through the N6 interface. Edge nodes are deployed on the same machine as the User Plane Function (UPF).

[0068] Since QoS flow reconfiguration splits the same industrial service into different traffic objects, it causes a mismatch in the normal baseline based on fixed flow identifiers. This invention ensures the logical continuity of industrial service identity during 5G connection state changes by merging traffic before and after legitimate QoS flow reconfiguration, and prevents the normal baseline from being unnecessarily split. Specifically: If the PDU sessions corresponding to two user plane packets of an industrial device belong to the continuous session state of the industrial device, and the Quality of Service Flow Identifier (QFI) of the two user plane packets changes, then the edge node determines whether the industrial device, packet direction, peer network address, transport layer protocol and service port covered by the packet filtering rules of the two user plane packets are consistent. If they are consistent, then the edge node is used to establish a continuous service flow mapping relationship, and the time segment of the time segment before and after the event is registered as the same industrial service identifier is mapped to the same logical service flow. If they are not consistent, then a new logical service flow is established. The continuous service flow mapping relationship includes at least the industrial device identifier, industrial service identifier, valid start time, valid end time, PDU session identifier, quality of service flow identifier and packet filtering rules. The logical service flow is a sequence of user plane packets that still maintains the continuity of industrial service identity after crossing the change of the legitimate quality of service flow identifier.

[0069] If the Quality of Service Flow Identifier (QFI) of the two user plane packets changes and the packet filtering rules also change, a continuous mapping is not established directly. The edge node first determines whether the changed packet filtering rules still point to the same industrial service object. That is, it determines whether there is a service continuity relationship between the packet filtering rules of the two user plane packets based on the 5G connection event records. If a service continuity relationship exists, the two user plane packets are mapped to the same logical service flow. If no service continuity relationship exists, a new logical service flow is established. This avoids mistakenly merging a truly new peer network address or a new service port into the original logical industrial service flow. The determination of continuous session state, packet filtering rules, and service continuity relationship are existing technologies and will not be elaborated here. It is worth noting that message filtering rules should at least limit the industrial equipment, message direction, peer network address, transport layer protocol and service port. Other limiting conditions can be set according to the specific scenario. At the same time, the peer network address and service port in the message filtering rules can be exact values, or network segments, address sets, port ranges or wildcard conditions. For industrial protocols that need to further distinguish different services on the same port, protocol message type or application layer service identifier can also be added.

[0070] The analysis process for each logical business flow is consistent. This solution only takes one logical business flow as an example for analysis. For the convenience of subsequent summation, any logical business flow will be referred to as the target logical business flow.

[0071] When an edge node starts up, it continuously runs a timer or scheduler according to a local pre-configured policy. It is independent of any PDU session or QoS flow and continuously divides the received packet flow into continuous time segments. In this scheme, the time segments are recorded as observation time windows, and the observation time windows of the target logical flow are obtained.

[0072] Before entering online anomaly detection, edge nodes need to perform normal pre-commissioning calibration. During the deployment test of edge nodes, when it is determined that the communication of industrial equipment is in normal business state, traffic data within the observation time window that reaches the minimum number of normal detection time windows is continuously collected to establish the normal behavior baseline of the target logical business flow for subsequent detection of abnormal traffic. Considering that transient timing disturbances caused by changes in legitimate connections can easily be mistaken for changes in the communication behavior of industrial equipment, if the observation time window during this period is continued to be written into the normal behavior baseline, it is easy to pollute the normal behavior baseline. In order to construct a more accurate normal behavior baseline and ensure the accuracy of subsequent abnormal traffic detection, the observation time window of 5G connection events (including PDU session establishment, PDU session modification, PDU session release, QoS flow establishment, QoS flow deletion, QoS flow mapping change, or 5G connection switching) is not included in the construction of the normal behavior baseline. That is, the normal behavior baseline is only constructed based on the observation time window without 5G connection events occurring within the consecutive minimum normal detection time window number. For ease of subsequent description, the observation time window without 5G connection events occurring within the consecutive minimum normal detection time window number is denoted as the calibration time window. In this embodiment of the invention, the minimum normal detection time window number is set to 30. There is no limitation here, and the implementer can set it according to the specific scenario.

[0073] For constructing the normal behavior baseline, considering that a single feature cannot distinguish between abnormal packet structure and timing jitter, and that single-point observation cannot verify the health of the forwarding link, this solution sets up two observation points: N3 (between the 5G base station and the User Plane Functional Provider) and N6 (between the User Plane Functional Provider and the industrial data network). Based on the relationship between the service object and the packet structure, as well as the timing and traffic intensity relationships that are prone to change during network scheduling, retransmission, connection recovery, or queue changes, preset features are set to construct the normal behavior baseline. In this solution, the novelty of the peer network address, the novelty of the service port, the packet direction conversion ratio, the packet length distribution characteristics, the number of packets, the number of bytes, and the packet arrival interval of the target logical service flow packets are included. The median and burst transmission ratio are used as preset features (it is worth noting that if the packet filtering rules of the target logical service flow only allow one exact peer network address or one exact service port, the novelty of the peer network address or the novelty of the service port are not used as preset features of the target logical service flow). Among them, the novelty of the peer network address, the novelty of the service port, the packet direction conversion ratio, and the packet length distribution characteristics are combined into a structural feature set, denoted as S, which is used to describe the relationship between the service object and the packet structure; the number of packets, the number of bytes, the median packet arrival interval, and the burst transmission ratio are combined into a transmission sensitivity feature set, denoted as T, which is used to describe the timing and traffic intensity relationship that is prone to change during network scheduling, retransmission, connection recovery, or queue changes.

[0074] The process of constructing a baseline for normal behavior is as follows:

[0075] (1) Taking the N3 side as an example, the peer network addresses of all packets of the target logical service flow in the N3 side within the calibration time window are used to form the N3 side reference peer network address set, and the service ports of all packets of the target logical service flow in the N3 side within the calibration time window are used to form the N3 side reference service port set.

[0076] (2) Based on the reference peer network address set on the N3 side, calculate the novelty of the peer network address of the target logical service flow on the N3 side within each calibration time window.

[0077] Specifically: Taking any calibration time window as an example, obtain the peer network addresses of all packets of the target logical service flow on the N3 side within that calibration time window. Calculate the proportion of peer network addresses that do not belong to the N3 side baseline peer network address set among these peer network addresses, thus obtaining the novelty of the peer network addresses of the target logical service flow on the N3 side within that calibration time window. Similarly, obtain the novelty of the peer network addresses of the target logical service flow on the N3 side within each calibration time window. It is worth noting that when establishing the normal behavior baseline before entering online anomaly detection, the novelty of the peer network addresses for all calibration time windows is 0. This is a result of the initialization process and does not affect subsequent online anomaly detection.

[0078] (3) Following the above method for calculating the novelty of the peer network address, based on the N3 side reference service port set and the service ports of all packets of the target logical service flow on the N3 side within the calibration time window, calculate the novelty of the service ports of the target logical service flow on the N3 side within each calibration time window. That is, obtain the service ports of all packets of the target logical service flow on the N3 side within each calibration time window, calculate the proportion of service ports that do not belong to the N3 side reference service port set within each calibration time window, and obtain the novelty of the service ports of the target logical service flow on the N3 side within each calibration time window. Similarly to the novelty of the peer network address, when constructing the normal behavior baseline for online anomaly detection, the novelty of the service ports of all calibration time windows is 0. This is the result of the initialization process and does not affect the subsequent online anomaly detection.

[0079] (4) Based on the packet collection time and packet direction of each packet of the target logical service flow on the N3 side within each calibration time window, obtain the packet direction conversion ratio of the target logical service flow on the N3 side within each calibration time window.

[0080] Specifically: Taking any calibration time window as an example, the packet acquisition time and packet direction of each packet of the target logical service flow on the N3 side within the any calibration time window are obtained. According to the packet acquisition time, each packet of the target logical service flow on the N3 side within the any calibration time window is sorted to obtain a packet sequence. Based on whether the packet direction of each two adjacent packets in the packet sequence changes, the proportion of packet direction changes in the packet sequence is obtained, and this proportion is recorded as the packet direction conversion ratio of the target logical service flow on the N3 side within the any calibration time window. Similarly, the packet direction conversion ratio of the target logical service flow on the N3 side within each calibration time window is obtained. It is worth noting that the packet acquisition time on the N3 and N6 sides uses a common time base. When the acquisition devices at the two observation points cannot directly share the same clock source, the edge node needs to correct the time deviation of the packet acquisition time according to the time synchronization information on the deployment side.

[0081] (5) Obtain the value of the packet length distribution characteristic of the target logical service flow on the N3 side within each calibration time window: Taking any calibration time window as an example, obtain the packet length of each packet of the target logical service flow on the N3 side within the any calibration time window, calculate the median of the packet length of all packets, and use it as the value of the packet length distribution characteristic of the target logical service flow on the N3 side within the any calibration time window. Similarly, obtain the value of the packet length distribution characteristic of the target logical service flow on the N3 side within each calibration time window.

[0082] (6) Based on the arrival interval of all packets of the target logical service flow on the N3 side within each calibration time window, obtain the burst transmission ratio of the target logical service flow on the N3 side within each calibration time window.

[0083] Specifically: Taking any calibration time window as an example, obtain the arrival interval of each packet of the target logical service flow on the N3 side within each calibration time window, calculate the percentile of all intervals (this is not limited and can be set by the implementer according to the specific scenario), and obtain the lower percentile of the baseline arrival interval on the N3 side. Among all packets of the target logical service flow on the N3 side within any calibration time window, calculate the proportion of packets whose arrival interval is lower than the lower percentile of the baseline arrival interval on the N3 side, and obtain the burst transmission ratio of the target logical service flow on the N3 side within any calibration time window. Similarly, obtain the burst transmission ratio of the target logical service flow on the N3 side within each calibration time window.

[0084] (7) Obtain the number of packets, the number of bytes, and the median packet arrival interval of all packets of the target logical service flow on the N3 side within each calibration time window. Combine this with the values ​​of peer network address novelty, service port novelty, packet direction conversion ratio, packet length distribution characteristics, and burst transmission ratio of the target logical service flow on the N3 side within each calibration time window obtained above. Thus, the values ​​of each preset characteristic of the target logical service flow on the N3 side within each calibration time window are obtained. It is worth noting that when there is no peer network address or service port within the observation time window, the corresponding peer network address novelty or service port novelty is recorded as 0. If there are no packets of the target logical service flow within the observation time window, the packet direction conversion ratio is set to 0. If the number of effective packet intervals of the target logical service flow within the observation time window is 0, the burst transmission ratio is set to 0.

[0085] (8) Based on the value of each preset feature of the target logical service flow on the N3 side within each calibration time window, obtain the reference parameter set of the target logical service flow on the N3 side.

[0086] Specifically: Taking the j-th preset feature as an example, calculate the median value of the j-th preset feature of the target logical service flow on the N3 side within all calibration time windows, and obtain the baseline median of the j-th preset feature of the target logical service flow on the N3 side, denoted as . This calculation, by sorting the feature value samples in the calibration time window by size and extracting the median value to replace the arithmetic mean, overcomes the defect of the mean calculation being affected by occasional extreme values, making the extracted benchmark median have anti-interference ability.

[0087] Calculate the absolute value of the difference between the value of the j-th preset feature of the target logical service flow on the N3 side and the benchmark median within each calibration time window. Then, calculate the sum of the median of all absolute differences and the preset lower limit value of the j-th preset feature to obtain the benchmark discrete scale of the j-th preset feature of the target logical service flow on the N3 side, denoted as [missing information]. ,Right now In the formula, This represents the value of the j-th preset feature of the target logical service flow on the N3 side within the k-th calibration time window. This represents the set of all calibration time windows. This represents the baseline median of the j-th preset feature of the target logical business flow on the N3 side. This represents the preset lower limit value of the j-th preset feature. Represents the absolute value symbol. This indicates that the median is taken. The preset lower limit is used to ensure that the formula is meaningful in subsequent analysis and calculation. The preset lower limit of each preset feature is determined by the minimum meaningful change of the corresponding preset feature or the industrial site safety strategy configuration file. The value range is 0.01 to 0.10. In this embodiment, the preset lower limit is set to 0.05. The calculation formula first obtains the discrete difference sequence of each feature value to the benchmark median by subtracting point by point. The median is extracted from the discrete difference sequence to measure the natural statistical fluctuation range of the feature value. The upper and lower limits are added by linear addition to avoid the division by zero caused by the complete concentration of the sample.

[0088] Similarly, obtain the baseline median and baseline discrete scale of each preset feature of the target logical business flow on the N3 side, and combine the baseline median and baseline discrete scale of each preset feature of the target logical business flow on the N3 side to form the baseline parameter set of the target logical business flow on the N3 side.

[0089] (9) According to the above method of obtaining the reference parameter set of the target logical business flow on the N3 side, obtain the reference parameter set of the target logical business flow on the N6 side, and combine the reference parameter set on the N3 side and the reference parameter set on the N6 side to form the normal behavior baseline of the target logical business flow.

[0090] Step S102: The observation time window after obtaining the normal behavior baseline is recorded as the target time window. For any target time window, the packets of the target logical service flow on the N3 side and the N6 side within the target time window are paired to obtain the cross-observation point matching rate within the target time window.

[0091] After obtaining the baseline of normal behavior, real-time detection of abnormal traffic in the target logical service flow begins. For ease of description, the observation time window after obtaining the baseline of normal behavior is denoted as the target time window. Real-time detection of abnormal traffic in industrial equipment is performed in units of the target time window. This embodiment takes the w-th target time window as an example for analysis. Considering that single-point observation cannot verify the health of the forwarding link, this scheme sets up two observation points, N3 and N6. First, based on the packet matching of the target logical service flow at the two observation points, the cross-observation point matching rate within the w-th target time window is obtained to quantify the stability of the connectivity of the underlying data transmission between the two observation points of the 5G private network. This is used to separate abnormal business operations of industrial equipment from transmission abnormalities caused by physical nodes within the network, providing attribution results for safe operation and maintenance in industrial sites.

[0092] The method for obtaining the cross-observation point matching rate within the w-th target time window is as follows:

[0093] Based on the inner source network address, inner destination network address, transport layer protocol, source service port, destination service port, message length, and message sequence field, a message association fingerprint is constructed for the messages of the target logical service flow on the N3 side within the w-th target time window. It is worth noting that when the message sequence field is missing or insufficient to distinguish multiple messages within the same target time window, a short hash value calculated from a fixed-length prefix of the service payload can be added. The short hash value is only used for temporary message matching within the same edge node and is not used as an industrial service identity.

[0094] To ensure that user plane packets located at the boundary of the target time window but whose packet acquisition time difference is still within the preset matching time range can form packet matching pairs, the formed packet matching pairs are assigned to the w-th target time window according to the packet acquisition time of the packets on the N3 side. The time range corresponding to the preset duration of the w-th target time window and thereafter is recorded as the matching time range of the w-th target time window. The preset duration is determined by the normal forwarding delay statistics before deployment or the network parameters deployed at the edge nodes, and can be set to the length of the target time window. to In this solution, the preset time extension is set to the target window's... There are no restrictions here; implementers can set them according to the specific scenario.

[0095] Obtain the packet association fingerprint of the target logical service flow on the N6 side within the matching time range. Based on the packet association fingerprint, and following the principle of prioritizing matching according to the collection time difference between the packets on the N3 side and the packets on the N6 side in ascending order, perform packet matching on the packets on the N3 side within the w-th target time window and the packets on the N6 side within the matching time range to obtain packet matching pairs. The construction of the packet association fingerprint and the packet matching are existing technologies and will not be described in detail here.

[0096] The maximum value among the number of messages on the N3 side within the w-th target time window, the number of messages on the N6 side within the matching time range, and constant 1 is selected as the denominator, and the number of all matching pairs of messages is selected as the numerator to obtain the cross-observation point matching rate within the w-th target time window.

[0097] In one implementation, the formula for calculating the cross-observation point matching rate within the w-th target time window is:

[0098]

[0099] In the formula, This represents the cross-observation point matching rate within the w-th target time window. This represents the number of matching message pairs within the w-th target time window. This represents the number of packets of the target logical service flow on the N3 side within the w-th target time window. This represents the number of packets of the target logical service flow on the N6 side within the matching time range of the w-th target time window. This represents the maximum value function.

[0100] It should be noted that when there is a loss, mirroring interruption, or abnormal user plane function forwarding on the N3 or N6 side, the cross-observation point matching rate decreases; when the user plane packets on both sides can be stably matched, the cross-observation point matching rate remains high.

[0101] It is worth noting that if there are no packets on either side of the target logical service flow within the w-th target time window, the target time window is registered as a no-service detection time window, and no traffic anomaly detection is performed, nor is it involved in updating the normal behavior baseline; if there are packets on only one side, the cross-observation point matching rate is treated as 0.

[0102] Step S103: Based on the difference between the value of each preset feature in the transmission sensitivity feature set of the target logical service flow on the N3 side and N6 side within any target time window and the normal behavior baseline, obtain the transmission sensitivity deviation of the target logical service flow on the N3 side and N6 side within any target time window.

[0103] Transient timing disturbances caused by changes in legitimate connections can easily be mistaken for changes in the communication behavior of industrial equipment. Therefore, this invention utilizes 5G connection event records to delineate the impact range of connection events, thereby eliminating interference from transient disturbances on abnormal traffic detection from the detection mechanism perspective. The 5G connection event records are generated by the 5G core network control plane mirror, user plane function control interface mirror, or operation and maintenance management system. The 5G connection event records include at least the event type, event time, industrial equipment association information, and PDU session identifier. Event types can include PDU session establishment, PDU session modification, PDU session release, service quality flow establishment, service quality flow deletion, service quality flow mapping change, and access connection handover. When service quality flow mapping changes are involved, the 5G connection event records also include the service quality flow identifiers before and after the change, as well as packet filtering rules.

[0104] After the normal behavior baseline is established, if a 5G connection event, including PDU session establishment, PDU session modification, PDU session release, QoS flow establishment, QoS flow deletion, QoS flow mapping change, or access connection handover, is detected within any target time window, the time of the corresponding 5G connection event is taken as the starting point of the connection event impact interval, and the connection event impact state is entered. Regarding the determination of the end of the connection event impact interval, considering that the preset features in the transmission sensitivity feature set describe traffic relationships easily affected by 5G scheduling, connection transients, queue changes, and session reconstruction, and that there are no 5G connection events in the observation time windows participating in the construction of the normal behavior baseline, the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides within the target time window can be obtained based on the difference between the value of each preset feature in the transmission sensitivity feature set of the target logical service flow on the N3 and N6 sides and the normal behavior baseline. This deviation is used as the determination condition for the end of the connection event impact interval.

[0105] The method for obtaining the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides within the w-th target time window is as follows:

[0106] For ease of description, both N3 and N6 are referred to as observation points. Taking the p-th observation point as an example, the baseline median and baseline discrete scale of the j-th preset feature in the transmission sensitive feature set of the p-th observation point are obtained from the normal behavior baseline. The baseline discrete scale of the j-th preset feature of the p-th observation point is used as the denominator, and the absolute value of the difference between the value of the j-th preset feature of the p-th observation point and the baseline median of the j-th preset feature of the p-th observation point within the w-th target time window is used as the numerator. This yields the feature deviation of the target logical service flow of the j-th preset feature at the p-th observation point within the w-th target time window, denoted as . ,Right now In the formula, This represents the value of the j-th preset feature in the transmission-sensitive feature set of the p-th observation point within the w-th target time window. This represents the baseline median of the j-th preset feature in the transmission-sensitive feature set at the p-th observation point. This represents the baseline discrete scale of the j-th preset feature in the transmission-sensitive feature set of the p-th observation point. Indicates the absolute value symbol;

[0107] Obtain the feature deviation of each preset feature in the transmission sensitivity feature set of the target logical service flow within the w-th target time window at the p-th observation point. Select the maximum value among all feature deviations corresponding to the p-th observation point as the transmission sensitivity deviation of the target logical service flow within the w-th target time window at the p-th observation point, denoted as . ,Right now In the formula, T represents the transmission sensitive feature set. This represents the feature deviation of the j-th preset feature in the transmission sensitive feature set of the target logical business flow at the p-th observation point within the w-th target time window. max() represents the maximum value function, which achieves dimensionality reduction mapping from multiple single-dimensional features to comprehensive deviation by obtaining the maximum value.

[0108] Similarly, the transmission sensitivity deviation of the target logical service flow at each observation point within the w-th target time window is obtained, and the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides within the w-th target time window is obtained respectively.

[0109] Step S104: Based on the cross-observation point matching rate and transmission sensitivity deviation within any target time window, as well as the 5G connection event records of the logical service flow, obtain the connection event impact state feature value of any target time window.

[0110] Based on the cross-observation point matching rate and transmission sensitivity deviation within the w-th target time window obtained from the above steps, and combined with the 5G connection event records of the logical service flow, it is determined whether the w-th target time window is affected by connection events, thus obtaining the connection event impact status feature value for the w-th target time window. Specifically:

[0111] If a 5G connection event occurs within the w-th target time window, then the w-th target time window is determined to be affected by the connection event, so the connection event impact state feature value of the w-th target time window is set to 1;

[0112] If no 5G connection event occurs within the w-th target time window, it is necessary to further determine whether the w-th target time window is located after the end of the connection event influence interval. That is, it is necessary to determine whether there is a target time window before the w-th target time window where a 5G connection event has occurred. If no 5G connection event occurs in any target time window before the w-th target time window, it means that the w-th target time window is not affected by the connection event. Therefore, the connection event influence status feature value of the w-th target time window is set to 0.

[0113] If a target time window containing a 5G connection event exists before the w-th target time window, then the target time window containing the 5G connection event closest to the w-th target time window is obtained and denoted as the connection event start time window. If the number of target time windows between the connection event start time window and the w-th target time window is less than the preset number of consecutive recovery judgment time windows, it indicates that the connection event influence interval formed by the 5G connection event that occurred before the w-th target time window has not yet ended, and the w-th target time window may not have completely escaped the influence of its previous 5G connection events. Therefore, the connection event influence status feature value of the w-th target time window is set to 1. The preset number of consecutive recovery judgment time windows ranges from 3 to 5. In this scheme, the preset number of consecutive recovery judgment time windows is set to 3. There is no restriction here, and implementers can set it according to specific scenarios.

[0114] If the number of target time windows between the starting time window of the connection event and the wth target time window is greater than or equal to the preset number of consecutive recovery judgment time windows, it is also necessary to determine whether the impact of the connection event has ended. Therefore, the target time windows that are consecutive before the wth target time window and the preset number of consecutive recovery judgment time windows are further recorded as the judgment time windows.

[0115] Following the method for obtaining the cross-observation point matching rate within the w-th target time window in step S102, and the method for obtaining the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides within the w-th target time window in step S103, the cross-observation point matching rate and the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides within each judgment time window are obtained respectively. If the cross-observation point matching rate within each judgment time window is greater than or equal to the preset matching recovery threshold, and the maximum value of the transmission sensitivity deviation on the N3 and N6 sides within each judgment time window is less than or equal to the preset deviation threshold, then it is determined that the connection event influence interval has ended, so the connection event influence status feature value of the w-th target time window is set to 0; otherwise, it is determined that the connection event influence interval has not ended, and the connection event influence status feature value of the w-th target time window is set to 1.

[0116] The preset matching recovery threshold is determined by statistical analysis of on-site test data, and its value ranges from 0.80 to 0.95. In this embodiment, the preset matching recovery threshold is set to 0.90. The preset deviation threshold is determined by the allowable range of on-site latency, and its value ranges from 1.5 to 3.0. In this embodiment, the preset deviation threshold is set to 2.0. There is no restriction here, and implementers can set it according to specific scenarios.

[0117] Step S105: Based on the connection event impact state feature value of any target time window, and the difference between the value of each preset feature of the target logical business flow on the N3 side and the N6 side and the normal behavior baseline, detect abnormal traffic events of industrial equipment within any target time window.

[0118] After obtaining the connection event impact state feature value for the w-th target time window through the above steps, based on the connection event impact state feature value for the w-th target time window, and the difference between the value of each preset feature of the target logical service flow on the N3 and N6 sides within the w-th target time window and the normal behavior baseline, a comprehensive judgment condition is established for abnormal traffic detection. This separates industrial equipment service anomalies from transmission anomalies caused by internal network physical nodes, providing attribution results for safe operation and maintenance in industrial sites. Specifically:

[0119] Similar to the method used in step S103 to obtain the transmission sensitivity deviation of the target logical service flow within the w-th target time window on the N3 and N6 sides, both the N3 and N6 sides are recorded as observation points. For the p-th observation point, based on the difference between the value of each preset feature in the structural feature set of the target logical service flow within the w-th target time window at the p-th observation point and the normal behavior baseline, the structural deviation of the target logical service flow within the w-th target time window at the p-th observation point is obtained and denoted as... ,Right now In the formula, S represents the structural feature set. This represents the feature deviation of the i-th preset feature in the structural feature set of the target logical business flow at the p-th observation point within the w-th target time window, where max() represents the maximum value function. , This represents the value of the i-th preset feature in the structural feature set of the p-th observation point within the w-th target time window. This represents the baseline median of the i-th preset feature in the structural feature set of the p-th observation point. This represents the baseline discrete scale of the i-th preset feature in the structural feature set of the p-th observation point. and All data are from the baseline of normal behavior. The absolute value symbol is used to obtain the structural deviation of the target logical business flow on the N3 and N6 sides within the w-th target time window.

[0120] Subtracting the connection event impact state characteristic value of the w-th target time window from the constant 1 yields the target value. Calculate the product between the target value and the transmission sensitivity deviation of the target logical service flow at the p-th observation point within the w-th target time window. Select the maximum value between this product and the structural deviation of the target logical service flow at the p-th observation point within the w-th target time window to obtain the state-related deviation of the target logical service flow at the p-th observation point within the w-th target time window, denoted as […]. ,Right now In the formula, This represents the structural deviation of the target logical business flow at the p-th observation point within the w-th target time window. This represents the transmission sensitivity deviation of the target logical service flow at the p-th observation point within the w-th target time window. This represents the state characteristic value affected by the connection event in the w-th target time window. When the state characteristic value affected by the connection event in the w-th target time window is 1, that is, when the w-th target time window is affected by the connection event, the state-related deviation only retains the structural deviation. When the state characteristic value affected by the connection event in the w-th target time window is 0, that is, when the w-th target time window is not affected by the connection event, the state-related deviation takes the larger value between the structural deviation and the transmission sensitivity deviation.

[0121] Obtain the state-related deviation of the target logical business flow on the N3 and N6 sides within the w-th target time window, respectively, and denot them as follows: and The maximum value is selected from the state correlation deviations on the N3 and N6 sides to obtain the maximum state correlation deviation of the target logical business flow across observation points within the w-th target time window, denoted as . ,Right now In the formula, This represents the state-related deviation of the target logical business flow on the N3 side within the w-th target time window. This represents the state-related deviation of the target logical business flow on the N6 side within the w-th target time window. This represents the maximum value function.

[0122] The absolute value of the difference in state-related deviation between the N3 and N6 sides is used as the numerator, and the sum of the state-related deviations between the N3 and N6 sides and the preset lower limit value is used as the denominator to obtain the target ratio. Subtracting the target ratio from the constant 1 yields the cross-observation point anomaly consistency degree of the target logical business flow within the w-th target time window, denoted as . ,Right now In the formula, This represents the state-related deviation of the target logical business flow on the N3 side within the w-th target time window. This represents the state-related deviation of the target logical business flow on the N6 side within the w-th target time window. Represents the absolute value symbol. This represents a preset lower limit value, determined by the measurement accuracy boundary, with a range of 0.01 to 0.10. In this embodiment, it is set as follows: There are no restrictions here; implementers can set them according to specific scenarios. This formula establishes a decay model by using the relative difference between the absolute difference of the state correlation deviation on both sides of N3 and N6 as a percentage of the sum of deviations. When the state correlation deviations on both sides are close, High; when the deviations actually involved in anomaly detection occur primarily at only one observation point. The rate of decrease is avoided. This relationship prevents misjudgment of cross-observation point consistency anomalies based solely on structural deviation when one side of the transmission sensitivity deviation increases significantly while the structural deviation remains close in steady-state detection.

[0123] Calculate the maximum state correlation deviation across observation points. Consistency with the cross-observation point anomaly The product of the two values ​​yields the anomaly score of the target logical business flow within the w-th target time window.

[0124] In one implementation, the formula for calculating the anomaly score of the target logical service flow within the w-th target time window is:

[0125]

[0126] In the formula, This represents the anomaly score of the target logical business flow within the w-th target time window. This indicates the degree of anomaly consistency of the target logical business flow across observation points within the w-th target time window. This represents the maximum state correlation deviation of the target logical business flow across observation points within the w-th target time window.

[0127] Furthermore, a preset anomaly detection threshold is set. Preset consistency judgment threshold Matching threshold Preset anomaly detection threshold The safety level of industrial assets is determined, with a value ranging from 3.0 to 5.0. In this embodiment, a preset anomaly detection threshold is set. Preset consistency judgment threshold The consistency threshold is determined by the synchronization error of the dual-end acquisition, and its value ranges from 0.70 to 0.90. In this embodiment, a preset consistency judgment threshold is set. Preset matching threshold The value is determined by the on-site communication quality standard, ranging from 0.80 to 0.95. In this embodiment, a preset matching judgment threshold is set. .

[0128] If the abnormal score of the target logical business flow within the w-th target time window And the degree of consistency across observation points And the cross-observation point matching rate Then it is determined that there is an abnormal traffic event of industrial equipment in the target logical business flow within the w-th target time window;

[0129] If the maximum state correlation deviation of the target logical business flow across observation points within the w-th target time window is... Meanwhile, the cross-observation point matching rate Or the degree of anomaly consistency across observation points If so, it is determined that there is a network transmission anomaly event in the target logical service flow within the w-th target time window.

[0130] After detecting abnormal traffic in the target logical service flow within the w-th target time window, it is also necessary to consider updating the normal behavior baseline: if the connection event impact state characteristic value in the w-th target time window is 0, i.e., it is not affected by 5G connection events, and no network transmission abnormal events or industrial equipment abnormal traffic events occur within the w-th target time window, and the cross-observation point matching rate within the w-th target time window is... And the degree of consistency across observation points And the abnormal score The w-th target time window is used as the calibration time window. Based on the values ​​of each preset characteristic of the target logical service flow on the N3 and N6 sides within each calibration time window, the normal behavior baseline of the target logical service flow is recalculated to detect abnormal traffic events of industrial equipment within subsequent target time windows. It is worth noting that when the number of calibration time windows exceeds the cache, the earliest calibration time window should be removed according to the event order of the calibration time windows before recalculating the normal behavior baseline. This update rule directly blocks transient network disturbances and identified anomalies from entering the normal behavior baseline, preventing the normal behavior baseline from gradually drifting towards abnormal behavior. When a permanent configuration change approved by operations and maintenance occurs for long-term normal services, the 5G connection event record or industrial asset configuration record can carry a baseline reconstruction indication. After the baseline reconstruction indication takes effect, the edge node reconstructs the normal behavior baseline, using new pre-deployment normal calibration data confirmed by the deployment side to establish a new set of calibration time windows.

[0131] Based on the above-mentioned abnormal traffic detection method for target logical business flows, each logical business flow within the w-th target time window is detected. For multiple logical industrial business flows of the same industrial equipment, the connection event state can be shared, but the normal behavior baseline needs to be maintained separately.

[0132] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for real-time detection of abnormal traffic of industrial equipment based on a 5G private network, characterized in that, The real-time detection method for abnormal traffic of industrial equipment based on 5G private network includes: By utilizing edge nodes deployed on the same machine as the UPF, the target logical service flow of industrial equipment is identified and mapped, and an observation time window for the target logical service flow is constructed. Based on the preset characteristics used to monitor the target logical service flow, a structural feature set and a transmission sensitive feature set are constructed. Based on the value of each preset feature of the target logical service flow on the N3 and N6 sides within the observation time window that meets the preset conditions, a normal behavior baseline for the target logical service flow is constructed. The observation time window after obtaining the normal behavior baseline is recorded as the target time window. For any target time window, the packets of the target logical service flow on the N3 side and the N6 side within the target time window are paired to obtain the cross-observation point matching rate within the target time window. Based on the difference between the value of each preset feature in the transmission sensitivity feature set of the target logical service flow on the N3 side and the N6 side within any target time window and the normal behavior baseline, the transmission sensitivity deviation of the target logical service flow on the N3 side and the N6 side within any target time window is obtained. Based on the cross-observation point matching rate and transmission sensitivity deviation within any target time window, as well as the 5G connection event records of the logical service flow, obtain the connection event impact state feature value for any target time window. Based on the connection event impact state feature value of any target time window, and the difference between the value of each preset feature of the target logical business flow on the N3 side and the N6 side and the normal behavior baseline, abnormal traffic events of industrial equipment within any target time window are detected.

2. The 5G private network-based industrial equipment abnormal traffic real-time detection method of claim 1, wherein, The identification and mapping of the target logical business flow of industrial equipment includes: If the PDU sessions corresponding to two user plane packets of an industrial device belong to the continuous session state of the industrial device, and the quality of service flow identifier of the two user plane packets changes, then it is determined whether the industrial device, packet direction, peer network address, transport layer protocol and service port covered by the packet filtering rules of the two user plane packets are consistent. If they are consistent, then the two user plane packets are mapped to the same logical service flow. If they are not consistent, then a new logical service flow is established. If the QoS flow identifier of the two user plane packets changes and the packet filtering rules change, it is determined whether there is a business continuity relationship between the packet filtering rules of the two user plane packets. If there is a business continuity relationship, the two user plane packets are mapped to the same logical business flow. If there is no business continuity relationship, a new logical business flow is established. Any logical business flow is denoted as the target logical business flow. 3.The 5G private network-based industrial equipment abnormal traffic real-time detection method of claim 1, wherein, The construction of a structural feature set and a transmission-sensitive feature set based on preset features used for monitoring target logical service flows includes: The preset features include the novelty of the peer network address, the novelty of the service port, the packet direction conversion ratio, the packet length distribution characteristics, the number of packets, the number of bytes, the median packet arrival interval, and the burst transmission ratio. The structural feature set is composed of the novelty of the peer network address, the novelty of the service port, the proportion of message direction conversion, and the distribution characteristics of message length. The transmission sensitivity feature set is composed of the number of messages, the number of bytes, the median message arrival interval, and the proportion of burst transmission.

4. The method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network according to claim 3, characterized in that, The step of constructing a normal behavior baseline for the target logical service flow based on the values ​​of each preset feature of the target logical service flow on the N3 and N6 sides within an observation time window that meets preset conditions includes: A set of observation time windows with a continuous preset number of no 5G connection events is recorded as the calibration time window. The peer network addresses of all packets of the target logical service flow on the N3 side within all calibration time windows are used to form the N3 side reference peer network address set. The service ports of all packets of the target logical service flow on the N3 side within all calibration time windows are used to form the N3 side reference service port set. For any calibration time window, obtain the peer network address of all packets of the target logical service flow on the N3 side within the any calibration time window. Among the peer network addresses of all packets of the target logical service flow on the N3 side within the any calibration time window, calculate the proportion of peer network addresses that do not belong to the N3 side reference peer network address set, and obtain the novelty of the peer network address of the target logical service flow on the N3 side within the any calibration time window. Based on the service ports of all packets of the target logical service flow on the N3 side within any calibration time window and the set of reference service ports on the N3 side, obtain the novelty of the service ports of the target logical service flow on the N3 side within any calibration time window. The packet acquisition time and packet direction of each packet of the target logical service flow on the N3 side within any calibration time window are obtained. According to the packet acquisition time, each packet of the target logical service flow on the N3 side within any calibration time window is sorted to obtain a packet sequence. Based on whether the packet direction of each two adjacent packets in the packet sequence changes, the proportion of the packet direction change in the packet sequence is obtained and recorded as the packet direction conversion ratio of the target logical service flow on the N3 side within any calibration time window. Obtain the message length of each message of the target logical service flow on the N3 side within any calibration time window, calculate the median message length of all messages, and use it as the value of the message length distribution characteristic of the target logical service flow on the N3 side within any calibration time window; Obtain the arrival interval of each packet of the target logical service flow on the N3 side within each calibration time window, calculate the preset lower quantile of all intervals, obtain the lower quantile of the reference arrival interval on the N3 side, and calculate the proportion of packets with arrival intervals lower than the lower quantile of the reference arrival interval on the N3 side among all packets of the target logical service flow on the N3 side within any calibration time window, thereby obtaining the burst transmission ratio of the target logical service flow on the N3 side within any calibration time window. Obtain the value of each preset feature of the target logical service flow on the N3 side within each calibration time window, and obtain the reference parameter set of the target logical service flow on the N3 side based on the value of each preset feature of the target logical service flow on the N3 side within each calibration time window; Obtain the value of each preset feature of the target logical service flow on the N6 side within each calibration time window, and obtain the reference parameter set of the target logical service flow on the N6 side based on the value of each preset feature of the target logical service flow on the N6 side within each calibration time window; The baseline parameters on the N3 side and the N6 side are combined to form the normal behavior baseline of the target logical business flow.

5. The method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network according to claim 4, characterized in that, The step of obtaining the reference parameter set of the target logical service flow on the N3 side based on the value of each preset feature of the target logical service flow on the N3 side within each calibration time window includes: For any preset feature, calculate the median value of the target logical service flow on the N3 side within all calibration time windows for any preset feature, and obtain the baseline median value of the target logical service flow for any preset feature on the N3 side. Calculate the absolute value of the difference between the value of any preset feature of the target logical service flow on the N3 side and the benchmark median in each calibration time window. Calculate the sum between the median of all absolute differences and the preset lower limit value of any preset feature to obtain the benchmark discrete scale of any preset feature of the target logical service flow on the N3 side. Obtain the baseline median and baseline discrete scale of each preset feature of the target logical business flow on the N3 side, and combine the baseline median and baseline discrete scale of each preset feature of the target logical business flow on the N3 side to form the baseline parameter set of the target logical business flow on the N3 side.

6. The method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network according to claim 1, characterized in that, The step of obtaining the cross-observation point matching rate within any target time window includes: Obtain the packet association fingerprint of the packets of the target logical service flow on the N3 side within any target time window, and record the time range corresponding to the preset time extension of the target time window and thereafter as the matching time range of the target time window. Obtain the packet association fingerprint of the packets of the target logical service flow on the N6 side within the matching time range. Based on the packet association fingerprint, perform packet matching between the packets on the N3 side within any target time window and the packets on the N6 side within the matching time range to obtain packet matching pairs. The maximum value among the number of messages on the N3 side within any target time window, the number of messages on the N6 side within the matching time range, and constant 1 is selected as the denominator, and the number of all matching pairs of messages is selected as the numerator to obtain the cross-observation point matching rate within any target time window.

7. The method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network according to claim 5, characterized in that, The step of obtaining the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides within any target time window includes: Both N3 and N6 are recorded as observation points. For any observation point, the baseline median and baseline discrete scale of any preset feature in the transmission sensitive feature set of any observation point are obtained in the normal behavior baseline. The baseline discrete scale of any preset feature of any observation point is used as the denominator, and the absolute value of the difference between the value of any preset feature of any observation point and the baseline median of any preset feature of any observation point within any target time window is used as the numerator to obtain the feature deviation of the target logical service flow of any logical service flow in any target time window from any preset feature of any observation point. Obtain the feature deviation of each preset feature in the transmission sensitive feature set of the target logical service flow within any target time window at any observation point, and select the maximum value among all feature deviations corresponding to any observation point as the transmission sensitivity deviation of the target logical service flow within any target time window at any observation point. Obtain the transmission sensitivity deviation of the target logical service flow at each observation point within any target time window, and obtain the transmission sensitivity deviation of the target logical service flow on the N3 side and N6 side within any target time window.

8. The method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network according to claim 5, characterized in that, The step of obtaining the connection event impact state feature value for any target time window includes: If a 5G connection event occurs within any of the target time windows, the connection event impact state feature value of any target time window is set to 1. If no 5G connection event occurs within any target time window, then determine whether there is a target time window before any target time window in which a 5G connection event has occurred. If no 5G connection event occurs in any target time window before any target time window, then set the connection event impact state feature value of any target time window to 0. If there is a target time window before any target time window where a 5G connection event occurs, then the target time window where the 5G connection event occurs closest to any target time window is obtained and recorded as the connection event start time window. If the number of target time windows between the connection event start time window and any target time window is less than the preset number of consecutive recovery judgment time windows, then the connection event impact state feature value of any target time window is set to 1. If the number of target time windows between the connection event start time window and any target time window is greater than or equal to the preset number of consecutive recovery determination time windows, then the target time windows that are consecutive before any target time window and are the preset number of consecutive recovery determination time windows are recorded as determination time windows. The cross-observation point matching rate and the transmission sensitivity deviation of the target logical service flow on the N3 and N6 sides are obtained in each decision time window. If the cross-observation point matching rate in each decision time window is greater than or equal to the preset matching recovery threshold, and the maximum value of the transmission sensitivity deviation on the N3 and N6 sides in each decision time window is less than or equal to the preset deviation threshold, then the connection event impact status feature value of any target time window is set to 0. If the cross-observation point matching rate within any decision time window is less than the preset matching recovery threshold, or the maximum value of the transmission sensitivity deviation between the N3 side and the N6 side is greater than the preset deviation threshold, then the connection event impact state feature value of any target time window is set to 1.

9. The method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network according to claim 8, characterized in that, The detection of abnormal flow events of industrial equipment within any target time window includes: Based on the difference between the value of each preset feature in the structural feature set of the target logical service flow on the N3 and N6 sides within any target time window and the normal behavior baseline, the structural deviation of the target logical service flow on the N3 and N6 sides within any target time window is obtained. Both N3 and N6 are recorded as observation points. For any observation point, the connection event impact state characteristic value of any target time window is subtracted from the constant 1 to obtain the target value. The product between the target value and the transmission sensitivity deviation of the target logical service flow in any target time window at any observation point is calculated. The maximum value between the product and the structural deviation of the target logical service flow in any target time window at any observation point is selected to obtain the state-related deviation of the target logical service flow in any target time window at any observation point. The state-related deviation of the target logical service flow within any target time window is obtained on the N3 side and the N6 side respectively. The maximum value is selected from the state-related deviation of the N3 side and the N6 side to obtain the maximum state-related deviation of the target logical service flow across observation points within any target time window. The absolute value of the difference between the state-related deviation between the N3 side and the N6 side is used as the numerator, and the sum of the state-related deviation between the N3 side and the N6 side and the preset lower limit value is used as the denominator to obtain the target ratio. The constant 1 is subtracted from the target ratio to obtain the cross-observation point abnormal consistency of the target logical business flow within any target time window. Calculate the product between the maximum state correlation deviation across observation points and the degree of anomaly consistency across observation points to obtain the anomaly score of the target logical business flow within any target time window; If the abnormal score of the target logical business flow within any target time window is greater than or equal to the preset abnormal judgment threshold, the cross-observation point abnormal consistency degree is greater than or equal to the preset consistency judgment threshold, and the cross-observation point matching rate is greater than or equal to the preset matching judgment threshold, then it is determined that there is an industrial equipment abnormal traffic event in the target logical business flow within any target time window. If the maximum state correlation deviation of the target logical service flow across observation points within any target time window is greater than or equal to a preset anomaly judgment threshold, and the cross-observation point matching rate is less than a preset matching judgment threshold or the cross-observation point anomaly consistency degree is less than a preset consistency judgment threshold, then it is determined that there is a network transmission anomaly event in the target logical service flow within any target time window.

10. The method for real-time detection of abnormal traffic in industrial equipment based on a 5G private network according to claim 9, characterized in that, After detecting abnormal flow events of industrial equipment within any target time window, the method further includes: If the connection event impact state feature value of any target time window is 0, and no network transmission abnormal event or industrial equipment abnormal traffic event occurs within any target time window, and the cross-observation point matching rate within any target time window is greater than or equal to the preset matching judgment threshold, and the cross-observation point abnormal consistency degree is greater than or equal to the preset consistency judgment threshold, and the abnormal score is less than the preset abnormal judgment threshold, then any target time window will be used as a calibration time window. Based on the values ​​of each preset feature of the target logical service flow on the N3 and N6 sides within each calibration time window, the normal behavior baseline of the target logical service flow is recalculated to detect abnormal flow events of industrial equipment in the next target time window of any target time window.