Data detection method and related device thereof
By using small tensors with fixed dimensions for data storage and detection in network anomaly detection, the problem of large storage and transmission overhead in centralized methods is solved, and detection is performed at distributed regional sites, which reduces the risk of data leakage and achieves More efficient and safer detection results.
Patent Information
- Application Number
- CN202310217841.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-08-30
AI Technical Summary
Existing centralized network anomaly detection methods have problems such as large storage overhead, large transmission overhead, and data leakage security risks.
Adopt a tensor-based data detection method to store and detect data by obtaining small tensors with fixed dimensions, reducing storage and transmission overhead. Data detection is performed at distributed regional sites, reducing the performance requirements for the central site and the risk of data leakage. .
It effectively reduces the storage and transmission overhead of network anomaly detection, improves network security, reduces the risk of data leakage, and achieves more accurate and real-time data detection.
Smart Images

Figure CN118573384A
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communications, and in particular to a data detection method and related devices. Background Art
[0002] Anomaly detection is the process of detecting and discovering unusual patterns in data that do not conform to normal behavior. As an effective network protection measure, network anomaly detection is crucial for network management, network security, and defense against cyberattacks. Network anomaly detection methods identify intrusions based on the behavior of flow data and detect unknown attacks. To accurately detect traffic anomalies, a full network traffic view is used, leveraging multi-flow, multi-node network-wide information that changes over time to perform real-time, high-precision, network-wide anomaly detection.
[0003] The typical current method for detecting anomalies across the entire network is centralized anomaly detection. This application scenario involves multiple distributed regional sites and at least one central site. The central site collects measurement data from each regional site and models historical normal data into a tensor-based feature space. This feature space represents the feature space of normal data across the entire network at the current moment. Anomaly detection is performed based on the projection of newly acquired measurement data onto this feature space. If the length of the projection of newly acquired measurement data does not exceed a threshold, it is considered normal data and cached as historical data. If it exceeds the threshold, it is reported as anomaly data.
[0004] Because each regional site uploads measurement data to the central site, it consumes significant network bandwidth, resulting in high transmission overhead. Furthermore, because the central site stores measurement data collected by the regional sites, storage overhead is high. Furthermore, direct transmission of measurement data from regional sites to the central site poses a security risk of data leakage. Summary of the Invention
[0005] The embodiments of the present application provide a data detection method and related devices, which are applied in the field of communications, can reduce the storage overhead and transmission overhead applied to network anomaly detection, and can reduce the security risk of data leakage and improve network security.
[0006] A first aspect of an embodiment of the present application provides a data detection method, including:
[0007] The first communication device obtains a first parameter, and the first parameter is obtained based on a first tensor storing the detected data, wherein the dimension of the first tensor is fixed and smaller than the dimension of the tensor of the detected normal data.
[0008] The first communication device detects, based on the first parameter, that first measurement data is normal data. The first measurement data is data to be detected for abnormality within a first period, and the first period indicates the period during which the data abnormality is currently detected. The first period is a detection period for data anomaly detection. It should be noted that normal data refers to data for which a detection result is normal, and abnormal data refers to data for which a detection result is abnormal.
[0009] The first communication device stores the first measurement data in a first tensor after the first tensor is updated, and the dimension of the first tensor is smaller than the dimension of the tensor of the data to be detected for abnormality in the first period.
[0010] And / or, the first communication device detects that the second measurement data is abnormal data based on the first parameter, and the second measurement data also belongs to the data to be detected as abnormal within the first period.
[0011] In an embodiment of the present application, a first communication device obtains a first parameter, and the first parameter is obtained based on a first tensor of fixed dimension. The first measurement data is then detected based on the first parameter, and the normal data detected is stored in the first tensor to obtain an updated first tensor. The dimension of the first tensor is smaller than that of the first measurement data, thereby achieving storage of normal data in a smaller space, thereby reducing storage overhead. Furthermore, the first communication device detects that the second measurement data is abnormal data based on the first parameter, thereby achieving network anomaly detection without transmitting the original measurement data, thereby reducing transmission overhead and further reducing network costs.
[0012] In a possible implementation of the first aspect, before the first communication device obtains the first parameter, the first communication device sends a first tensor to the second communication device, and then the first communication device receives the first parameter sent by the second communication device, and the first parameter is obtained by the second communication device based on the first tensors sent by at least two first communication devices.
[0013] In an embodiment of the present application, the first communication device obtains the first parameter from the second communication device, which is suitable for full network data detection, and the second communication device does not need to store the original normal data tensor, thereby reducing the storage overhead of the central site, i.e., the second communication device, and does not need the central site to calculate the feature space based on the original normal data, thereby reducing the performance requirements for the central site.
[0014] In a possible implementation manner of the first aspect, the first communication device obtains an abnormality score of the first measurement data based on the first parameter.
[0015] Then, the first communication device determines that the first measurement data is normal data based on the abnormality score of the first measurement data being less than a threshold value, where the threshold value is used to detect whether the data is abnormal or normal.
[0016] Alternatively, the first communication device obtains an abnormality score of the second measurement data based on the first parameter.
[0017] The first communication device determines that the second measurement data is abnormal data based on the abnormal score of the second measurement data being greater than a threshold. It should be noted that the specific value of the threshold can be customized when deploying the network and can be determined according to actual conditions, and is not specifically limited here.
[0018] In the implementation manner of the present application, a specific implementation method is described in which the first communication device determines that the first measurement data is normal data based on the first parameter, and this method does not require a central site to perform data detection. Data detection is implemented by distributed regional sites, thereby avoiding the central site from performing large amounts of data calculations, reducing the performance requirements for the central site, and eliminating the need to send the first measurement data to the central site, thereby reducing transmission overhead and reducing the demand for network bandwidth.
[0019] In a possible implementation manner of the first aspect, after the first communication device stores the first measurement data in the first tensor after the first tensor is updated, the first communication device sends the updated first tensor to the second communication device.
[0020] Then, the first communication device receives a second parameter sent by the second communication device, where the second parameter is obtained by the second communication device based on the updated first tensors sent by at least two first communication devices.
[0021] In an implementation manner of the present application, the first communication device also sends the updated first tensor to the second communication device to obtain a second parameter, which can prepare for subsequent detection data, and can obtain the corresponding feature space based on the normal data of the entire network in real time, thereby more accurately detecting data anomalies, reflecting the real-time nature of the solution and improving the accuracy of data detection.
[0022] In a possible implementation of the first aspect, the first communication device determines whether third measurement data is abnormal data or normal data based on the second parameter, and the third measurement data belongs to data to be detected as abnormal in a second period, and the second period is after the first period.
[0023] In an embodiment of the present application, the first communication device determines whether the third measurement data is abnormal data or normal data based on the second parameter, which can realize real-time detection of the data, and because the second parameter is obtained from at least two updated first tensors, its accuracy for detection is improved.
[0024] In a possible implementation manner of the first aspect, the first communication device records and notifies that the second measurement data and / or the third measurement data are abnormal data through at least one of a log, an alarm, or a TRAP.
[0025] In the embodiments of the present application, multiple implementations of reporting abnormal data are provided, which increases the diversity and selectivity of the solutions.
[0026] In a possible implementation manner of the first aspect, when the first tensor has a horizontal slice with a zero value, the first communication device stores the first measurement data in the first tensor after the horizontal slice with a zero value is updated.
[0027] Alternatively, when the first tensor does not have a horizontal slice with a zero value, the first communication device processes the first tensor to obtain a first tensor including a horizontal slice with a zero value.
[0028] Furthermore, the first communication device stores the first measurement data in the horizontal slice of zero value to obtain an updated first tensor.
[0029] In the implementation of the present application, it is clear how the first communication device uses a first tensor of fixed dimension to store a steady stream of normal data, thereby reducing storage overhead and lowering the cost of anomaly detection across the entire network.
[0030] In a possible implementation manner of the first aspect, the first communication device performs a fast Fourier transform on the first tensor to obtain a transformed tensor.
[0031] Then, the first communication device performs tensor singular value decomposition on each frontal slice of the transformation tensor to obtain a corresponding diagonal matrix and an orthogonal matrix.
[0032] The first communication device obtains a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each frontal slice.
[0033] Next, the first communication device performs inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then performs tensor product to obtain a first tensor including horizontal slices of zero values.
[0034] In the implementation manner of the present application, a specific implementation method for obtaining a first tensor including a horizontal slice of zero values is provided, thereby improving the reliability of the solution.
[0035] A second aspect of the embodiments of the present application provides a data detection method, including:
[0036] The second communication device receives a first tensor sent by at least two first communication devices, wherein the first tensor is used to store data that has been detected as normal, and the dimension of the first tensor is fixed and smaller than the dimension of the tensor of the data that has been detected as normal.
[0037] The second communication device determines a first parameter based on at least two first tensors. The first parameter is used by the first communication device to detect first measurement data, where the first measurement data is data to be detected for anomalies. Specifically, the first measurement data is data to be detected for anomalies within a first period, and the first period is used to indicate a period during which data anomalies are currently being detected. The first period is a detection period for data anomaly detection.
[0038] The second communication device sends a first parameter to at least two first communication devices.
[0039] In an embodiment of the present application, at least two first tensors are received, and the first tensors store data detected to be normal, and the dimension of the first tensor is smaller than the dimension of the tensor of the stored data, thereby reducing transmission overhead and wirelessly transmitting the original data, reducing the security risk of data leakage. Based on the at least two first tensors, a first parameter is determined to obtain a feature space corresponding to the normal data, eliminating the need to process large amounts of data, thereby reducing the performance requirements of the second communication device. The first parameter is then sent to the at least two first communication devices, and the entire network data detection can be distributed to multiple first communication devices for partitioned detection, thereby improving detection efficiency and reducing the performance requirements of the second communication device, i.e., the central site.
[0040] In a possible implementation manner of the second aspect, the second communication device fuses at least two first tensors to obtain a second tensor and a first parameter, and the dimension of the second tensor is equal to the dimension of the first tensor.
[0041] In an embodiment of the present application, the second communication device fuses multiple first tensors to obtain a first parameter, and the second communication device, ie, the central site, wirelessly stores a large amount of data, thereby reducing the storage overhead of the central site.
[0042] In a possible implementation manner of the second aspect, the second communication device stores a first tensor to obtain a stored tensor.
[0043] When the stored tensor includes a zero-valued horizontal slice, the second communication device stores the non-stored horizontal slice of the first tensor into the zero-valued horizontal slice of the stored tensor to obtain a second tensor and the first parameter.
[0044] Alternatively, when the storage tensor does not include a horizontal slice of zero value, the second communication device processes the storage tensor to obtain a storage tensor including a horizontal slice of zero value.
[0045] The second communication device stores the unstored horizontal slice of the first tensor into the zero-valued horizontal slice of the stored tensor to obtain a second tensor and the first parameter.
[0046] In the implementation of the present application, it is explained how to use a second tensor with the same dimension as the first tensor to represent the data of multiple first tensors, thereby improving the reliability of the solution.
[0047] In a possible implementation manner of the second aspect, the second communication device performs a fast Fourier transform on the stored tensor to obtain a transformed tensor.
[0048] Then, the second communication device performs tensor singular value decomposition on each frontal slice of the transformation tensor to obtain a corresponding diagonal matrix and an orthogonal matrix.
[0049] The second communication device obtains a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each frontal slice.
[0050] Next, the second communication device performs inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then performs tensor product to obtain a storage tensor including horizontal slices of zero values.
[0051] In the embodiment of the present application, a method for obtaining the first parameter, i.e., the feature space, based on multiple first tensors is specifically described, which reflects the reliability of the solution.
[0052] A third aspect of the present application provides a communication device that implements the method of the first aspect or any possible implementation of the first aspect. This functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functionality.
[0053] The communication device of the third aspect of the embodiment of the present application executes the method described in the first aspect of the embodiment of the present application or any possible implementation manner of the first aspect.
[0054] A fourth aspect of the present application provides a communication device that implements the method of the second aspect or any possible implementation of the second aspect. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
[0055] The communication device of the fourth aspect of the embodiment of the present application executes the method described in the second aspect of the embodiment of the present application or any possible implementation manner of the second aspect.
[0056] The fifth aspect of an embodiment of the present application provides another communication device, which may include a processor coupled to a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions in the memory so that the communication device executes the first aspect of the embodiment of the present application, any possible implementation of the first aspect, the second aspect, or the method of any possible implementation of the second aspect.
[0057] A sixth aspect of an embodiment of the present application provides another communication device, including a processor for executing a computer program (or computer-executable instructions) stored in a memory. When the computer program (or computer-executable instructions) is executed, the communication device executes the methods in the first aspect, each possible implementation of the first aspect, the second aspect, and each possible implementation of the second aspect.
[0058] In one possible implementation, the processor and memory are integrated;
[0059] In another possible implementation, the memory is located outside the communication device.
[0060] The communication device also includes a communication interface, which is used for the communication device to communicate with other devices, such as sending or receiving data and / or signals. Exemplarily, the communication interface can be a transceiver, circuit, bus, module or other type of communication interface.
[0061] The seventh aspect of the embodiment of the present application provides a computer-readable storage medium, including computer-readable instructions. When the computer-readable instructions are run on a computer, the method described in the first aspect of the embodiment of the application, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect is executed.
[0062] An eighth aspect of an embodiment of the present application provides a computer program product, comprising computer-readable instructions. When the computer-readable instructions are run on a computer, the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect of the embodiment of the present application is executed.
[0063] A ninth aspect of an embodiment of the present application provides a chip, which includes at least one processor and at least one interface circuit, which is coupled to the processor. The at least one interface circuit is used to perform transceiver functions and send instructions to at least one processor. The at least one processor is used to run computer programs or instructions, which has the function of implementing the method of the first aspect, any possible implementation of the first aspect, the second aspect or any possible implementation of the second aspect mentioned above. The function can be implemented by hardware, or by software, or by a combination of hardware and software. The hardware or software includes one or more modules corresponding to the above functions.
[0064] In the tenth aspect, an embodiment of the present application further provides a communication system, including a communication device provided by the third aspect, the fourth aspect and various possible implementations of the aforementioned aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A schematic diagram of the concepts of tensors and slices;
[0066] Figure 2 A schematic diagram of an application scenario for centralized anomaly detection;
[0067] Figure 3 A schematic diagram of a data detection method provided in an embodiment of the present application;
[0068] Figure 4 A schematic diagram of a tensor sketch and the corresponding original tensor provided in an embodiment of the present application;
[0069] Figure 5 A schematic diagram of a tensor sketch storing data provided in an embodiment of the present application;
[0070] Figure 6 A schematic diagram of an application scenario of reducing a tensor sketch provided in an embodiment of the present application;
[0071] Figure 7 A schematic diagram of a distributed anomaly detection application scenario provided in an embodiment of the present application;
[0072] Figure 8 A schematic diagram of the fusion of tensor sketches provided in an embodiment of the present application;
[0073] Figure 9 A schematic diagram of the fusion of n tensor sketches provided in an embodiment of the present application;
[0074] Figure 10 A schematic diagram of anomaly detection of data to be detected provided in an embodiment of the present application;
[0075] Figure 11 A schematic diagram showing the effect of parameter l on TPR and FPR provided in an embodiment of the present application;
[0076] Figure 12 A schematic diagram showing the effect of the parameter k on TPR and FPR provided in an embodiment of the present application;
[0077] Figure 13 A schematic diagram showing the effect of the threshold value on TPR and FPR provided in an embodiment of the present application;
[0078] Figure 14 A schematic diagram of the effect of mu on TPR and FPR provided in an embodiment of the present application;
[0079] Figure 15 A schematic diagram of the time overhead of anomaly detection provided in an embodiment of the present application;
[0080] Figure 16Another schematic diagram of the effect of parameter l on TPR and FPR provided in an embodiment of the present application;
[0081] Figure 17 Another schematic diagram of the effect of parameter k on TPR and FPR provided in an embodiment of the present application;
[0082] Figure 18 Another schematic diagram of the effect of the threshold on TPR and FPR provided in an embodiment of the present application;
[0083] Figure 19 Another schematic diagram of the effect of mu on TPR and FPR provided in an embodiment of the present application;
[0084] Figure 20 Another diagram of the time cost of anomaly detection;
[0085] Figure 21 A schematic diagram of TPR and FPR for distributed anomaly detection provided in an embodiment of the present application;
[0086] Figure 22 This is a schematic structural diagram of a communication device according to an embodiment of the present application;
[0087] Figure 23 This is another structural diagram of the communication device according to an embodiment of the present application;
[0088] Figure 24 This is another structural diagram of the communication device according to an embodiment of the present application;
[0089] Figure 25 This is another structural diagram of the communication device according to an embodiment of the present application. DETAILED DESCRIPTION
[0090] The embodiments of the present application provide a data detection method and related devices, which are applied in the field of communications, can reduce the storage overhead applied to network anomaly detection, and can reduce the security risk of data leakage and improve network security.
[0091] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0092] To facilitate understanding of the following embodiments, the following key terms are briefly introduced:
[0093] Tensor: A third-order tensor is a generalization of the concepts of vector and matrix. A third-order tensor is like a three-dimensional array, with the length of the first dimension denoted as I1, the length of the second dimension denoted as I2, and the length of the third dimension denoted as I3. Figure 1 For example, Figure 1 A schematic diagram of the concepts of tensors and slices. A third-order tensor can be viewed as a stack of multiple matrices. Figure 1 An example of a third-order tensor is tensor A, and the third-order tensor A has three dimensions, so there are three ways to stack matrices, namely Figure 1 Horizontal slices, lateral slices and frontal slices in.
[0094] Horizontal slice: A tensor A can be composed of I1 horizontal slices, where the dimensions of the horizontal slice are 1xI2xI3. The i-th horizontal slice is denoted as A(i, :, :), where “:” represents the length of the second dimension I2 and the length of the third dimension I3 respectively.
[0095] Side slice: A tensor A can be composed of I2 side slices, where the dimension of the side slice is I1x1xI3. The mth side slice is denoted as A(:, m, :), where “:” represents the length of the first dimension I1 and the length of the third dimension I3 respectively.
[0096] Frontal slice: The tensor A can be composed of I3 frontal slices, where the dimensions of the frontal slice are I1xI2x1. The nth frontal slice is denoted as A(:,:,n), where “;” represents the length of the first dimension I1 and the length of the second dimension I2 respectively.
[0097] Feature space: The space where the feature vector is located. Each feature corresponds to a one-dimensional coordinate in the feature space.
[0098] Before introducing the embodiments of the present application, a common centralized anomaly detection method in current network anomaly detection methods is briefly introduced to facilitate subsequent understanding of the embodiments of the present application.
[0099] Network anomaly detection is a crucial network protection measure in today's network environment, especially for network management, network security, and defense against network attacks. To accurately detect traffic anomalies, we can leverage multi-flow, multi-node network-wide information that changes over time to perform real-time, high-precision network-wide anomaly detection. Currently, the most direct approach to detecting anomalies across the entire network is centralized anomaly detection.
[0100] For ease of understanding, the following uses an application scenario of centralized anomaly detection as an example. Figure 2 , Figure 2 The following is a schematic diagram of the application scenario of centralized anomaly detection. It includes n distributed regional sites and one central site. Each regional site is used to obtain the measurement data within the network range that the site is responsible for, and send the measurement data to the central site. The central site is used to collect the measurement data of each regional site and calculate the feature space for the historical normal data. The historical normal data is the data that the central site has detected as normal and cached, and its feature space represents the feature space of the normal data of the entire network at the current moment. The central site also performs anomaly detection on the measurement data sent by the regional site based on the feature space to determine whether the measurement data is normal. The specific steps are as follows: Figure 2 As shown in:
[0101] Step 1: The regional site sends measurement data to the central site.
[0102] Each regional site sends the obtained measurement data to the central site.
[0103] Step 2: The central site calculates the feature space.
[0104] The central site calculates a feature space based on historical normal data. This feature space represents the normal feature space of the entire network at the current moment. Specifically, after the central site detects the measurement data sent by the regional sites, it stores the normal data. This is the historical normal data, which is the normal data detected before the measurement data received by the central site at the current moment.
[0105] Step 3: The central site detects anomalies based on the feature space.
[0106] The central site obtains the projection length of the newly received measurement data from each regional site in the feature space. When the projection length of the newly received measurement data does not exceed the threshold, the measurement data is normal data and is stored as historical normal data; when the projection length of the measurement data exceeds the threshold, the measurement data is abnormal data.
[0107] In this way, the central site can perform anomaly detection on the entire network data based on the feature space of the monitoring data that is continuously collected.
[0108] However, this centralized anomaly detection method requires a central site to acquire measurement data, which consumes significant network bandwidth and results in high transmission overhead. Furthermore, the central site caches normal measurement data, resulting in high storage overhead. Furthermore, regional sites directly transmit raw measurement data to the central site, posing a security risk of data leakage. Furthermore, the central site needs to store large amounts of normal data, receive massive amounts of data, and be responsible for detecting anomalies in new data across the entire network. This places high demands on the central site's performance and high availability. Furthermore, current network-wide anomaly detection relies on all data, making it difficult to meet the needs of online anomaly detection and supporting distributed network anomaly detection.
[0109] To solve the above problems, an embodiment of the present application provides a data detection method and related devices, which are applied in the Internet industry. The network includes a first communication device, which obtains a first parameter, and the first parameter is obtained based on a first tensor storing the detected data, the dimension of the first tensor is fixed, and the dimension of the first tensor is smaller than the dimension of the tensor of the detected normal data. The first communication device detects that the first measurement data is normal data based on the first parameter, and the first measurement data belongs to the data to be detected as abnormal within the first cycle, and the first cycle is used to indicate the cycle of the current detection data abnormality. The first communication device stores the first measurement data in a first tensor after the first tensor is updated, and the dimension of the first tensor is smaller than the dimension of the tensor of the data to be detected as abnormal within the first cycle. And / or, the first communication device detects that the second measurement data is abnormal data based on the first parameter, and the second measurement data also belongs to the data to be detected as abnormal within the first cycle. The first communication device obtains a first parameter based on a first tensor of fixed dimension. The device then detects first measurement data based on the first parameter and stores normal data in the first tensor to obtain an updated first tensor. The dimension of the first tensor is smaller than that of the first measurement data, allowing normal data to be stored in a smaller space, thereby reducing storage overhead. Furthermore, the first communication device detects that the second measurement data is abnormal based on the first parameter, thereby detecting network anomalies without transmitting the original measurement data. This reduces transmission overhead and further reduces network costs.
[0110] The embodiments of the present application can be applied in a network, where network-wide information detection is achieved through a system composed of nodes, i.e., communication devices. The actual form of the communication devices can be products such as routers, switches, hubs, controllers, computing devices, or servers, or other devices or products that can achieve the same function or purpose, which are not specifically limited here.
[0111] The data detection method of the embodiment of the present application is described below in conjunction with the accompanying drawings. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiment of the present application are also applicable to similar technical problems. Figure 3 , Figure 3 A schematic diagram of a data detection method provided in an embodiment of the present application, specifically including:
[0112] S1. A first communication device obtains a first parameter.
[0113] The first communication device also obtains a first parameter, which is obtained based on a first tensor storing data that has been detected to be normal. The dimension of the first tensor is fixed and smaller than the dimension of the tensor of the data that has been detected to be normal.
[0114] In order to better understand the embodiments of the present application later, the following first uses specific examples to understand the relationship between the dimensions of the first tensor and the tensor of the data that has been detected to be normal, and how to use the first tensor with fixed dimensions to store a large amount of data that has been detected to be normal.
[0115] It should be noted that the first tensor is a tensor summary (sketch) model based on the tensor singular value decomposition. The tensor sketch is an approximation of the original tensor, but its dimension size is fixed and much smaller than the original tensor. For the correspondence between the tensor sketch and the original tensor, please refer to Figure 4 For example, Figure 4 A schematic diagram of a tensor sketch and the corresponding original tensor provided in an embodiment of the present application. Among them, the original tensor A1 corresponds to the tensor sketch B1, and the original tensor A2 corresponds to the tensor sketch B2, wherein the dimension size of A1 is I1xI2xI3, the dimension size of A2 is I4xI2xI3, the dimension size of tensor sketch B1 and B2 is LxI2xI3, and I4>I1>L. It can be seen that a tensor sketch with a fixed dimension size can be used to store data of tensors of different dimension sizes. The memory overhead occupied by storing data in the form of a tensor sketch is less than the overhead of the original tensor.
[0116] For example, the following specific embodiments illustrate the use of tensor sketch to represent the original tensor data. Figure 5 , Figure 5 A schematic diagram of a tensor sketch storing data provided in an embodiment of the present application.
[0117] Among them, the period time period is the data to be detected {X1, X2, ..., X L , X L+1 ,…,X T}, and form the corresponding tensor A1, where the data to be tested can be regarded as a horizontal slice with a dimension of 1xI2xI3, then the dimension of A1 is TxI2xI3. At this time, a tensor sketch is initialized with a dimension of LxI2xI3. At this time, the horizontal slices of the tensor sketch are all zero values, which are used to store the normal data. The normal data X1, X2, ..., X L Stored in the tensor sketch in sequence, the tensor sketch cannot store the next data to be detected X at this time L+1 In order to continue storing data, the tensor sketch of the current horizontal slice without zero values is "reduced" to obtain a tensor sketch containing horizontal slices of zero values, and then continue to store the newly arrived data.
[0118] Specifically, the following example is used to illustrate:
[0119] Input: Tensor Parameter l(1 <l≤min(L,I2)), represents real numbers;
[0120] Output: Tensor Orthogonal Tensor To be specific as an example;
[0121] Specifically, tensor sketch B containing zero values is obtained based on tensor sketch B1 containing no zero values and parameter l. new , where the parameter l represents the “reduction level”.
[0122] Specific implementation steps:
[0123] Step A1: Execution Specifically, perform fast Fourier transform fft(B1) on tensor B1 to obtain a transformed tensor
[0124] Step A2: Initialize a diagonal tensor with zero values and an orthogonal tensor with a value of zero Specifically, create a tensor of zero value and a tensor of zero values
[0125] Step A3: Each frontal slice Follow steps A3.1-A3.3:
[0126] Step A3.1: Execute the formula Specifically, yes Do the tensor singular value decomposition (tensor SVD) and get this positive slice The corresponding diagonal matrix and orthogonal matrices
[0127] Step A3.2: Execute the formula The above diagonal matrix is calculated to obtain the value of the corresponding frontal slice of the diagonal tensor. is the identity matrix; is a diagonal tensor
[0128] The i-th frontal slice of ; is the square of the lth singular value of the diagonal matrix S, represents the square of each singular value of the diagonal matrix S minus If the subtracted singular value is less than 0, it is 0, and the diagonal matrix after reducing the singular value is assigned to the tensor The i-th frontal slice of .
[0129] Step A3.3: Execute the formula Assign the orthogonal matrix V to the orthogonal tensor The i-th frontal slice of .
[0130] Step A4: Execute the formula as well as Specifically, after the above step A3 is completed, the tensor and tensors Each positive slice of has a value assigned, then, the tensor Perform an inverse Fourier transform Tensor Perform an inverse Fourier transform And output Among them, the tensor symbol "*" is the tensor product (Tensor product, t-product), and then the tensor With tensors Perform tensor product to get B new , and output B new .
[0131] The parameter l represents the "reduction" level, which means: after the "reduction" operation, the tensor B new Zero values appear starting from the lth horizontal slice. After the "reduction" operation, two important tensors are obtained, one of which is the tensor of the zero-value horizontal slice. It can continue to store the newly arrived data to be detected, and the other is an orthogonal tensor Represents the feature space of historical data to be detected. It should be noted that when the tensor sketch stores only tested normal data, the orthogonal tensor can be used for anomaly detection.
[0132] To facilitate easier understanding of the above-mentioned "reduction" operation in the embodiment of the present application, please refer to the following for details. Figure 6 Examples of applications, Figure 6 A schematic diagram of an application scenario of reducing tensor sketch provided in an embodiment of the present application. The dimension size is 3×3×3, initialize the tensor The dimension size is 2×3×3. The three horizontal slices A(1,:,:), A(2,:,:) and A(3,:,:) of tensor A need to be stored in tensor Sketch B1. After A(1,:,:) is saved to B1(1,:,:) and A(2,:,:) is saved to B1(2,:,:), tensor SketchB_1 no longer has zero-valued horizontal slices and cannot save A(3,:,:). First, perform the above steps to perform a fast Fourier transform on B1 to obtain Then, execute step A3 to By performing matrix tensor SVD decomposition on each positive slice of , we can obtain three diagonal matrices. In this example, we take the parameter l = 2, so the squares of the second singular values of the three diagonal matrices are: 1.26 2 ,0.70 2 ,0.70 2 ; Then, the singular values of each positive diagonal matrix are reduced. Taking the first positive diagonal matrix as an example: the singular value 23.38 is obtained by the formula Reduced to 23.35, the singular value 1.26 is obtained by the formula Reduced to 0; Finally, execute the three calculation formulas in step A4 to get B new , this tensor has horizontal slices of zero value and can store A(3,:,:).
[0133] It should be noted that Figure 6 The example is only used to illustrate that the tensor sketch is used to represent the data of the original tensor in the embodiment of the present application. It can be understood that in actual application scenarios, the dimensions of the tensor sketch are not only Figure 6 As shown in , it can also be other dimension values, which are not limited here.
[0134] Here we will add the theoretical basis for the tensor sketch to represent the data of the original tensor. Get a tensor through a "reduce" operation For any side slice have
[0135]
[0136] in represents the maximum singular value selected in the i-th round of “reduction” operation. Especially when It is formula A T *AB T *The characteristic slice corresponding to the maximum singular value of B, that is: T *AB T *B performs Tensor SVD decomposition to obtain an orthogonal tensor and orthogonal tensors The feature slice corresponding to the maximum singular value is or The equivalent forms of the above inequalities are:
[0137]
[0138] Original tensor Get a tensor by reducing it According to the above calculation formula, it can be seen that the upper bound of the tensor covariance error between the two is controllable.
[0139] In addition, for the aforementioned tensor Orthogonal tensor to its tensor Sketch Select the first k side slices have:
[0140]
[0141] in represents the maximum singular value selected in the i-th round of "reduction" operation, is the square of the Frobenius norm of the tensor, the tensor A k It is the best approximation of the first k singular values of the tensor singular value decomposition of tensor A, that is, the tensor A is decomposed by Tensor SVD to obtain the tensor Tensor and tensors A k The formula can be Calculated here, and is an orthogonal tensor and The first k side slices of is a tensor The tensor consists of the first k rows and the first k columns of each frontal slice. According to this theorem, the upper bound of the projection error between them is controllable.
[0142] From the above, it can be seen that the first communication device can use a tensor sketch, that is, a first tensor, to store the data that has been detected to be normal. Since the dimension of the tensor sketch is smaller than the tensor dimension of the data that has been detected to be normal, the storage overhead is lower than directly using a tensor to store the data that has been detected to be normal.
[0143] It should be noted that in other application scenarios, the first tensor, i.e., the tensor sketch, may also be used to represent other data, such as data to be transmitted or data to be stored, which is not specifically limited here.
[0144] Optionally, the first communication device can obtain the first parameter based on a first tensor storing data that has been detected to be normal, or the first communication device sends the first tensor to the second communication device, and then the first communication device obtains the first parameter from the second communication device, and the first parameter is obtained by the second communication device based on the first tensors sent by at least two first communication devices.
[0145] In a possible implementation, the first communication device obtains the first parameter based on a first tensor storing data that has been detected to be normal. Figure 3 As shown in step S1, the first parameter is obtained by the first communication device.
[0146] For example, to facilitate understanding of the embodiments of this application, the following uses a distributed anomaly detection application scenario as an example for explanation. Figure 7 , Figure 7 A schematic diagram of a distributed anomaly detection application scenario provided by an embodiment of the present application. Among them, an example of the first communication device is a regional site, Figure 7 The application scenario includes n regional sites, namely the first communication device. When it is not necessary to perform network-wide data detection, the measurement data of the regional sites does not need to be uploaded to the central site, namely the second communication device, and network anomaly detection can be performed directly by the regional sites.
[0147] The specific process of obtaining the first parameter is as follows:
[0148] First, the regional site, i.e., the first communication device, detects the data to be detected in the previous detection period T-1 of the first period T1, and stores and calculates the detected normal data to obtain the first tensor, i.e., the tensor sketch, and the orthogonal tensor of the feature space, such as the aforementioned Figure 5 In the example That is, the first communication device stores normal data in a detection cycle before the first cycle in the first tensor to obtain the current first tensor and the first parameter.
[0149] In an embodiment of the present application, the first communication device obtains the first parameter from itself and uses the first tensor, namely the tensor sketch, to store normal data to complete local data detection, which can reduce transmission overhead and storage overhead and is suitable for application scenarios of local detection.
[0150] In a possible implementation, a first communication device sends a first tensor to a second communication device, and then the first communication device obtains a first parameter from the second communication device, where the first parameter is obtained by the second communication device based on at least two first tensors sent by the first communication device.
[0151] For example, Figure 3As shown in step S2, step S3 and step S4, the details are as follows:
[0152] S2. The first communication device sends a first tensor to the second communication device.
[0153] Before obtaining the first parameter, the first communication device sends a first tensor to the second communication device. The first tensor stores normal data detected before the first cycle. As can be seen from the above, the dimension of the first tensor is smaller than the dimension of the tensor of the detected normal data.
[0154] For example, Figure 7 As shown in step a1 in the example, before the first cycle, each regional site, that is, each first communication device, has detected normal data and stored it, and as mentioned above Figure 5 or with Figure 6 The example calculates a tensor sketch, i.e., a first tensor, and executes step a2 to send the first tensor, i.e., the tensor sketch, to the central site, i.e., the second communication device, so that the central site receives the first tensor sent by at least two regional sites.
[0155] Then, the second communication device may obtain the first parameter based on step S3.
[0156] S3. The second communication device determines a first parameter based on at least two first tensors.
[0157] The second communication device determines a first parameter based on at least two first tensors.
[0158] Specifically, such as Figure 7 In the example, each regional site (i.e., the first communication device) sends its own tensor Sketch (i.e., the first tensor) to the central site within a detection period T. To obtain network-wide data features, the central site needs to fuse the tensor Sketches from each regional site and then calculate the feature space of the overall data based on the fused tensor Sketch.
[0159] In a possible implementation, the second communication device fuses at least two first tensors to obtain a second tensor and a first parameter, where the dimension of the second tensor is equal to the dimension of the first tensor.
[0160] For the sake of illustration, in order to facilitate understanding of the embodiments of this application, Figure 7 The central site in the example can be integrated with the tensor sketch, which is the implementation of the first tensor. Figure 8 For example, Figure 8 A schematic diagram of the tensor sketch that can be fused provided in the embodiment of this application. Among them, two tensors with different dimensions and Their corresponding tensor Sketch, i.e. the first tensor, is and Tensor A1 and tensor A2 are concatenated in the first dimension to obtain the tensor The mergibility of tensor Sketch means that by simply using tensor SketchB1 and tensor SketchB2, and fusing B1 and B2, we can get a tensor that is close to the original large tensor A. That is, the second tensor, and the dimension size of the fused tensor Sketch does not change.
[0161] In an embodiment of the present application, the second communication device fuses multiple first tensors to obtain a first parameter, and the second communication device, ie, the central site, wirelessly stores a large amount of data, thereby reducing the storage overhead of the central site.
[0162] In one possible implementation, the second communication device stores at least one first tensor to obtain a stored tensor. When the stored tensor includes horizontal slices of zero values, the second communication device stores the unstored horizontal slices of the first tensor into the zero-valued horizontal slices of the stored tensor to obtain a second tensor and a first parameter. Or, when the stored tensor does not include horizontal slices of zero values, the second communication device processes the stored tensor to obtain a stored tensor including horizontal slices of zero values, and stores the unstored horizontal slices of the first tensor into the zero-valued horizontal slices of the stored tensor to obtain a second tensor and a first parameter.
[0163] In the implementation of the present application, it is described how to use a second tensor with the same dimension as the first tensor to represent the data of multiple first tensors, thereby improving the reliability of the solution.
[0164] In one possible implementation, the second communication device performs a fast Fourier transform on the storage tensor to obtain a conversion tensor. Then, the second communication device performs a tensor singular value decomposition on each front slice of the conversion tensor to obtain a corresponding diagonal matrix and an orthogonal matrix, and obtains a diagonal tensor and an orthogonal tensor based on the diagonal matrix and orthogonal matrix corresponding to each front slice. Then, the second communication device performs an inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then performs a tensor product to obtain a storage tensor including horizontal slices of zero values.
[0165] For example, Figure 7 In the example, suppose there are two distributed regional sites 1 and 2. During the monitoring period T, the normal data tensors A1 and A2 are collected. The two distributed regional sites maintain their own tensors SketchB1 and SketchB2, and send them to the central site after T time period. The central site fuses tensors SketchB1 and SketchB2 to obtain the fused tensor SketchB, which is the second tensor, and its orthogonal tensor That is the first parameter. The fused tensor SketchB represents the tensor Sketch of all normal data tensors, orthogonal tensors That is, the first parameter represents the feature space of the detected historical data. The specific steps of the tensor Sketch fusion algorithm are as follows:
[0166] Input: Tensor and tensors
[0167] Output: Fused tensor Orthogonal tensor of tensor Sketch B
[0168] Step B1: Initialize a tensor with all zero values The specific implementation is similar to the above-mentioned step A2, and will not be repeated here.
[0169] Step B2: Execute B(i,:,:)=B1(i,:,:) on each horizontal slice of the tensor SketchB1.
[0170] Specifically, the tensor Each horizontal slice of is stored in tensor B(i,:,:). Since tensor SketchB1 and tensor SketchB have the same dimensions, this step is equivalent to B = B1. At this point, tensor SketchB represents the storage tensor and has no zero-valued horizontal slices. In order to store another tensor SketchB2, a "reduction" operation is required.
[0171] Step B3: Perform a "reduction" operation on tensor Sketch B to obtain tensor Sketch B with zero-valued horizontal slices.
[0172] Description: Performs the "reduce" operation described in steps A1-A4 above on tensor Sketch B. The input is the currently stored tensor, Sketch B, and the parameter l. Note that the parameter l used to generate tensors SketchB1, SketchB2, and SketchB is the same. The output is the reduced tensor Sketch B, with zero-valued horizontal slices.
[0173] Step B4: Store each horizontal slice SketchB2(i,:,:) of tensor SketchB2 in the zero-valued horizontal slice of tensor Sketch B in sequence. Similarly, if tensor Sketch B has no zero-valued horizontal slice, perform a reduction operation so that each horizontal slice of tensor SketchB2 is stored in tensor Sketch B.
[0174] In the distributed anomaly detection application scenario, each regional site maintains a tensor Sketch, which is the first tensor. The tensor SketchB maintained by the i-th regional site is recorded as i , for example, Figure 7 As shown in FIG, after the detection period T, the regional site sends B i To the central site, the tensor Sketch set received by the central site is {B1,B2,…,B n}.like Figure 9 As shown, Figure 9 A schematic diagram of the fusion of n tensor sketches provided in the embodiment of this application. The central site first fuses B1 and B2 to obtain the fused tensor SketchB 12 , then B 12 Fusion with B3 to obtain B 123 , and so on, we will eventually fuse n B i The second tensor is tensor SketchB, and the feature space of historical normal data is obtained, which is the first parameter.
[0175] Specifically, such as Figure 7 The central site shown in FIG performs steps a3 and a4. The central site merges the tensor sketches and calculates the feature space of the merged tensor sketch.
[0176] In the implementation of the present application, a method for obtaining the first parameter, namely the feature space, based on multiple first tensors is specifically described, which reflects the reliability of the solution.
[0177] It should be noted that the aforementioned Figure 5 or Figure 6 The specific implementation of the "reduction" operation is only used as an example to understand the embodiments of the present application. It can be understood that in actual application scenarios, other implementation methods, calculation formulas or conversion methods can also be used to store or represent larger data with smaller data structures. The specific implementation is not limited here.
[0178] Then, the second communication device sends the first parameter, i.e., the feature space, to the first communication device, as shown in step S4 below:
[0179] S4. The second communication device sends the first parameter to the first communication device.
[0180] The second communication device sends the first parameter to at least two first communication devices, that is, the first communication device receives the first parameter sent by the second communication device.
[0181] For example, Figure 7 The central site shown in FIG performs step a5, where the central site sends the feature space to each regional site.
[0182] In an embodiment of the present application, the first communication device obtains the first parameter from the second communication device, which is suitable for full network data detection, and the second communication device does not need to store the original normal data tensor, thereby reducing the storage overhead of the central site, and does not require the central site to calculate the feature space based on the original normal data, thereby reducing the performance requirements for the central site.
[0183] It should be noted that the aforementioned steps S2 to S4 are another implementation of the aforementioned step S1. It can be understood that there is no limitation on the order of their execution.
[0184] After obtaining the first parameter, the first communication device detects, based on the first parameter, that the first measurement data is normal data, and that the first measurement data belongs to data to be detected for abnormality within a first period, where the first period indicates the period during which the data to be detected is abnormal. Furthermore, the first communication device stores the first measurement data in the first tensor after the first tensor is updated. And / or the first communication device detects, based on the first parameter, that the second measurement data is abnormal data, and that the second measurement data belongs to data to be detected for abnormality within the first period. This is specifically described in steps S5, S6, and S7 below.
[0185] S5. The first communication device detects, based on the first parameter, that the first measurement data is normal data.
[0186] The first communication device detects first measurement data as normal data based on the first parameter. The first measurement data belongs to data to be detected as abnormal within a first period, and the first period is used to indicate a period in which the data to be detected is abnormal.
[0187] For example, the following is still Figure 7 The example of the first communication device, i.e., the regional site, is described, wherein the first measurement data is detected as normal data based on the first parameter. The first measurement data may be Figure 7 The newly arrived data shown in , that is, the data to be detected for abnormality in the current cycle, that is, the first cycle (it should be noted that the cycle of the newly arrived data can be used as an example of the first cycle for illustration only, and is not limited here), wherein the historical data is the data that has been detected. Specifically, the following still takes the first parameter obtained in the aforementioned S3 step as an example, that is, the orthogonal tensor representing the feature space of normal data of the entire network in the periodic time period Its first communication device, i.e., the regional site, obtains the first parameter, i.e., the orthogonal tensor Then, anomaly detection is performed based on the orthogonal tensor.
[0188] To facilitate understanding of the anomaly detection based on orthogonal tensors described in the embodiments of the present application, the implementation principle and specific steps are briefly described below.
[0189] Using orthogonal tensors Anomaly detection is an unsupervised anomaly detection method based on subspace. Its main idea is to: The dataset is divided into two subspaces: the normal subspace and the abnormal subspace. Normal data is well represented by the normal subspace when projected into it, while abnormal data cannot. Therefore, if the length of the projection of a data to be detected is greater than a threshold, it means that the data is far away from the normal subspace and is reported as abnormal data.
[0190] In one possible implementation, the first communication device obtains an anomaly score of the first measurement data based on the first parameter, and determines that the first measurement data is normal data based on the anomaly score of the first measurement data being less than a threshold, where the threshold is used to detect whether the data is abnormal or normal.
[0191] For example, the following still takes the first parameter as the orthogonal tensor Assume that the orthogonal tensor The first k side slices of Remember to do And sent to the regional site, that is, from arrive The normal subspace is formed, and the rest (from arrive ) form an abnormal subspace. Determine the new data to be detected at the current time t Is it abnormal data? We need to solve X t The projection length to the normal subspace is expressed as in yes reshape, is an orthogonal tensor The first k side slices of Indicates the current data D t Projection into subspace The projection coordinates of It is the square of the Frobenius norm of the tensor.
[0192] Solution That is, given data D t and subspace Find coordinates Make Minimum. when hour, Minimum, will Substitute into the solution and simplify it, and we can get the minimum value is The minimum value s obtained by the above formula is the data X tProjection to normal subspace The projection length of X can be regarded as an anomaly score, that is, if the anomaly score s is greater than a certain threshold α, it means that the data X t Far away from the normal subspace, it is reported as abnormal; if the abnormal score s is not greater than the threshold α, it means that the data X t Can be well represented by the normal subspace and near the subspace, it is reported as normal.
[0193] It should be noted that, in the embodiment of the present application, the first parameter is an orthogonal tensor It is only used as an example to understand the embodiment of the present application and does not substantially limit the present solution. It is understandable that the first parameter can also be an orthogonal tensor. The normal subspace or abnormal subspace, or other forms of parameters, are not limited here.
[0194] For example, when the first communication device is Figure 7 After obtaining the first parameter for the regional site in the first measurement data, an anomaly score of the first measurement data can be obtained based on the first parameter. If the anomaly score is less than a threshold, the first measurement data is normal data.
[0195] In an embodiment of the present application, a specific implementation method is described in which the first communication device determines that the first measurement data is normal data based on the first parameter. This method does not require a central site to perform data detection, and data detection is implemented by distributed regional sites. Therefore, the central site is avoided from performing large amounts of data calculations, reducing the performance requirements for the central site. There is no need to send the first measurement data to the central site, which reduces transmission overhead and reduces the demand for network bandwidth.
[0196] S6. The first communication device stores the first measurement data in the first tensor after the first tensor is updated.
[0197] The first communication device stores the first measurement data in the first tensor after the first tensor is updated.
[0198] In one possible implementation, when the first tensor has a zero-valued horizontal slice, the first communication device stores the first measurement data in the zero-valued horizontal slice of the first tensor to obtain an updated first tensor. Alternatively, when the first tensor does not have a zero-valued horizontal slice, the first communication device processes the first tensor to obtain a first tensor including a zero-valued horizontal slice, and stores the first measurement data in the zero-valued horizontal slice of the first tensor to obtain an updated first tensor.
[0199] In one possible implementation, the first communication device performs a fast Fourier transform on the first tensor to obtain a conversion tensor, and then performs a tensor singular value decomposition on each frontal slice of the conversion tensor to obtain a corresponding diagonal matrix and an orthogonal matrix. The first communication device obtains a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each frontal slice, and then performs an inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then performs a tensor product to obtain a first tensor including horizontal slices of zero values. It should be noted that the specific implementation method is similar to the "reduction" operation on the tensor sketch in the aforementioned example to obtain a tensor sketch including horizontal slices of zero values, and the details will not be repeated here.
[0200] In the embodiments of the present application, a specific implementation method for obtaining a first tensor including a horizontal slice of zero values is provided, thereby improving the reliability of the solution.
[0201] In the embodiments of the present application, it is described how the first communication device uses a first tensor of fixed dimension to store a steady stream of normal data, thereby reducing storage overhead and lowering the cost of anomaly detection across the entire network.
[0202] For example, to better understand step S5 and step S6 of the embodiment of the present application, refer to Figure 10 For example, Figure 10 A schematic diagram of abnormal detection of data to be detected provided in an embodiment of the present application. Figure 7 The central station in the second communication device will orthogonal tensor Send it to each distributed regional site, i.e. the first communication device, for abnormality detection. If the data to be detected X t That is, the first measurement data is normal data, so the regional site sets X t Stored in tensor SketchB as horizontal slices i That is, the horizontal slice of the zero value of the first tensor. Figure 10 As shown, assuming that there is data X to be detected t , X t+1 and X t+2 , where X t and X t+1 is normal data, X t+2 Is abnormal data. Perform anomaly detection on the data to be tested in turn, that is, solve its anomaly score s and compare it with the threshold. If the anomaly score is greater than the threshold, it is reported as abnormal, otherwise it is reported as normal. Normal data, that is, the first measurement data, is stored in the tensor SketchB i , if the tensor SketchB i The horizontal slice without zero values stores the newly arrived normal data, and then performs a "reduction" operation so that it can continue to store the continuously arriving normal data.
[0203] For example, the specific implementation process is described below:
[0204] Input: tensor of region sites Issued by the central site Parameter k, newly arrived data X t ;
[0205] Output: X t Whether it is normal data, the updated tensor SketchB1 is the first tensor after the update.
[0206] Step C1: Reshape into
[0207] Specifically, the process of reshaping is to transform X t Reshape from a frontal slice into horizontal slices and take the orthogonal tensor The first k side slices are taken as the normal subspace.
[0208] Step C2: Calculate D t The anomaly score s is calculated as
[0209] Specifically, it is known that D t and Substitute the formula to solve the anomaly score s.
[0210] Step C3: Compare s with the threshold α. If s>α, proceed to step C3.1; otherwise, proceed to step C3.2.
[0211] Step C3.1: X t To report as abnormal, end;
[0212] Step C3.2: X t If the report is normal, execute step C4.
[0213] Step C4: X t Stored in the form of horizontal slices to tensor SketchB i , if B i For horizontal slices without zero values, a "reduction" operation is performed so that it can continue to store normal data that continues to arrive.
[0214] In this application, the anomaly score is calculated by the tensor Sketch, i.e., the first tensor. The theorem is given directly below to theoretically guarantee the error between the anomaly score obtained using the original tensor, i.e., the tensor used to detect normal data, and the anomaly score obtained using its tensor Sketch.
[0215] A new data X to be tested t, assuming that the anomaly score s is obtained from the tensor SketchB, the anomaly score is obtained from the original tensor A, and the error between them is:
[0216]
[0217] Where v is the tensor A T *A and tensor B T *The minimum difference of B singular values.
[0218] According to the formula, the anomaly score obtained by calculating the feature space of the original tensor Compared with the anomaly score s obtained by calculating the feature space of the tensor Sketch, the upper bound of the error between them is controllable.
[0219] From this, we can see that the anomaly score obtained based on the feature space obtained by the tensor sketch is reliable for judging whether the data is abnormal.
[0220] And / or, the first communication device executes step S7:
[0221] S7. The first communication device detects that the second measurement data is abnormal data based on the first parameter.
[0222] The first communication device detects, based on the first parameter, that the second measurement data is abnormal data, where the second measurement data belongs to the data to be detected as abnormal within the aforementioned first period.
[0223] For example, the following continues Figure 10 For example, the second measurement data may be Figure 10 X in t+2 , solve its anomaly score s and compare it with the threshold. If its anomaly score is greater than the threshold, it is reported as an anomaly.
[0224] It should be noted that there is no limitation on the execution order of step S7 and the aforementioned step S5, and step S5 and step S7 do not necessarily exist in the same cycle, which is not specifically limited here.
[0225] In a possible implementation manner, the first communication device records and notifies that the second measurement data and / or the third measurement data are abnormal data through at least one of a log, an alarm, or a TRAP.
[0226] In the embodiments of the present application, multiple implementations of reporting abnormal data are provided, increasing the diversity and selectivity of the solutions.
[0227] In one possible implementation, after the first communication device stores the first measurement data in the updated first tensor after the first tensor is updated in step S6, the first communication device further transmits the updated first tensor to the second communication device. The second communication device then receives a second parameter from the second communication device, the second parameter being derived by the second communication device based on the updated first tensors transmitted by at least two first communication devices. This is specifically described in steps S8, S9, and S10 below:
[0228] S8. The first communication device sends the updated first tensor to the second communication device.
[0229] The first communication device detects the data to be detected in the first cycle to obtain an updated first tensor, and the first communication device sends the updated first tensor to the second communication device.
[0230] It should be noted that this is similar to the first communication device sending the first tensor to the second communication device, and the details will not be repeated here.
[0231] S9. The second communication device determines a second parameter based on the at least two updated first tensors.
[0232] The second communication device receives at least two updated first tensors sent by the first communication device, and the second communication device determines the second parameter based on the at least two updated first tensors. It should be noted that the specific implementation is similar to the aforementioned second communication device determining the first parameter based on the at least two first tensors, and the details are not repeated here.
[0233] S10. The second communication device sends a second parameter to at least two first communication devices.
[0234] The second communication device sends the second parameter to at least two first communication devices, and the first communication devices prepare for subsequent data detection after receiving the second parameter.
[0235] In an embodiment of the present application, the first communication device also sends the updated first tensor to the second communication device to obtain a second parameter, which can prepare for subsequent detection data, and can obtain the corresponding feature space based on the normal data of the entire network in real time, thereby more accurately detecting data anomalies, reflecting the real-time nature of the solution and improving the accuracy of data detection.
[0236] In one possible implementation, the first communication device determines, based on the second parameter, whether third measurement data is abnormal data or normal data, where the third measurement data belongs to data to be detected as abnormal within a second period, the second period being after the first period. Exemplarily, the second period is a period subsequent to the first period.
[0237] It should be noted that the first communication device determines whether the third measurement parameter is abnormal data or normal data based on the second parameter. The specific implementation process is similar to that described in the aforementioned example in which the first communication device determines whether the first measurement data is normal data or the second measurement data is abnormal data based on the parameter, and the details will not be repeated here.
[0238] In an embodiment of the present application, the first communication device determines whether the third measurement data is abnormal data or normal data based on the second parameter, which can realize real-time detection of the data, and since the second parameter is obtained from at least two updated first tensors, its accuracy for detection is improved.
[0239] In an embodiment of the present application, a first communication device obtains a first parameter, and the first parameter is obtained based on a first tensor storing detected data, the dimension of the first tensor being fixed, and the dimension of the first tensor being smaller than the dimension of the tensor of the detected normal data. The first communication device detects that the first measurement data is normal data based on the first parameter, and the first measurement data belongs to the data to be detected for abnormality within a first period, and the first period is used to indicate the period in which the current detection data is abnormal. The first communication device stores the first measurement data in a first tensor updated from the first tensor, the dimension of the first tensor being smaller than the dimension of the tensor of the data to be detected for abnormality within the first period. And / or, the first communication device detects that the second measurement data is abnormal data based on the first parameter, and the second measurement data also belongs to the data to be detected for abnormality within the first period. The first communication device obtains a first parameter, and the first parameter is obtained based on a first tensor with a fixed dimension, then detects the first measurement data based on the first parameter, and stores the detected normal data in the first tensor to obtain an updated first tensor, and the dimension of the first tensor is smaller than the dimension of the first measurement data, thereby achieving the goal of storing normal data in a smaller space, thereby reducing storage overhead. Furthermore, the first communication device detects the second measurement data as abnormal data based on the first parameter, thereby realizing network abnormality detection without transmitting the original measurement data, thereby reducing transmission overhead and further reducing network costs.
[0240] In order to better understand the beneficial effects of the above-mentioned embodiments of the present application, multiple examples are provided below for illustration.
[0241] The following is an example of verifying the data detection method provided by this application. The Internet traffic tracking dataset (Abilene traffic dataset) was used for experiments and compared with two representative online anomaly detection algorithms: a vector-based anomaly detection algorithm (represented by osPCA) and a tensor-based bidirectional principal component analysis (PCA) online anomaly detection algorithm (represented by BPCA). The Abilene traffic dataset was collected from a US backbone network consisting of 12 nodes. The data was collected every 5 minutes for six months to obtain network-wide traffic data.
[0242] (1) Indicators for evaluating algorithm performance, including true positive rate, false positive rate, and time cost:
[0243] True Positive Rate (TPR): A true positive indicates that the current event is an anomaly, and the detector also determines that it is an anomaly. The true positive rate measures the proportion of correctly identified anomalies to the total number of anomalies.
[0244] False Positive Rate (FPR): A false positive occurs when the detector identifies an event as abnormal despite the current event being normal. The false positive rate measures the proportion of normal events that are incorrectly identified as abnormal.
[0245] Time overhead: It measures the average time required by the anomaly detection algorithm when the data to be detected arrives.
[0246] High true positive rate, low false positive rate and small time overhead mean better anomaly detection performance.
[0247] (2) Parameter settings:
[0248] Tensor Sketch Size: The Abilene traffic dataset has 12 nodes, and each time slot has a dimension of 12 × 12. There are 48,384 time slots of data, and the entire dataset has a dimension of 12 × 12 × 48,384. Setting the Tensor Sketch dimension to 10 × 12 × 12 means that the Tensor Sketch stores data equivalent to 10 time slots.
[0249] Outlier setting: 50% of the time slots are randomly selected to inject outliers, and 10% of the data in the selected time slots are randomly selected to inject outliers that obey the Gaussian distribution (mu, sigma).
[0250] (3) Performance analysis, discussing the influence of four parameters on the accuracy of anomaly detection, namely: parameter l in the "reduction" operation, parameter k in anomaly detection, threshold, and injected anomaly mu. It should be noted that when deploying the application scenario of network data detection, it is necessary to first determine the values of parameter l in the "reduction" operation, parameter k in anomaly detection, threshold, etc., and it is necessary to inject the anomaly mu parameter to determine the abnormal data to ensure obtaining the first tensor sketch from normal data.
[0251] Fix the size of the tensor Sketch as 10×12×12, and discuss the influence of parameter l on TPR and FPR under the same mu, parameter k, and threshold:
[0252] Parameter l represents the "reduction" level. The smaller the parameter l, the more zero-value horizontal slices appear in the tensor after the "reduction" operation. As shown, discuss the influence of parameter l on TPR and FPR. Figure 11 This is a schematic diagram of the influence of parameter l on TPR and FPR provided by the embodiment of the present application. Among them, take the value of l as 3 to 10, which meets the parameter requirements (1 < l ≤ min(L, I2)), that is, 1 < l ≤ min(10, 12). When the value of l is larger, TPR and FPR are smaller. Among them, TPR drops from 90.5% to 85.9%, and FPR drops from 3.3% to 0.03%. Select a fixed l = 9 for the subsequent performance tests.
[0253] Fix the size of the Tensor Sketch as 10×12×!2, fix l = 9, and discuss the influence of parameter k on TPR and FPR under the same mu and threshold:
[0254] Parameter k represents selecting the first k lateral slices of the orthogonal tensor as the normal subspace, and the lateral slices from the (k + 1)-th to the I2-th as the abnormal subspace. As Figure 12 shown, the influence of parameter k on TPR and FPR. Figure 12 This is a schematic diagram of the influence of parameter k on TPR and FPR provided by the embodiment of the present application. Among them, take the value of k as 3 to 7. When the value of k is larger, TPR and FPR are larger. Among them, TPR rises from 66.4% to 91%, and FPR rises from 0.01% to 1.5%. Considering a suitable TPR and FPR, so select k = 5 for the subsequent performance tests.
[0255] Fix the size of the Tensor Sketch as 10×12×12, fix l = 9, fix k = 5, and discuss the influence of the same mu and threshold on TPR and FPR:
[0256] In the anomaly detection framework, when the anomaly score of the data to be detected is greater than the threshold, it is reported as anomaly data. In order to obtain a suitable threshold, two weeks of data are first used for training to obtain the anomaly scores of two weeks of normal data. These anomaly scores are sorted from small to large, and it is assumed that the largest anomaly score is taken as the threshold, expressed as perThreshold = 100%, that is, the anomaly score that is not less than 100% of these sorted anomaly scores is taken as the threshold. Therefore, the threshold selected at perThreshold = 100% is greater than the threshold selected at perThreshold = 98%. As Figure 13 As shown in the figure, the value of perThreshold is 100%, 98%, 96%, 94%, 92%, 90%, and the impact of threshold on TPR and FPR. Figure 13 This diagram illustrates the impact of thresholds on TPR and FPR in this embodiment. As the perThreshold value increases, the threshold increases, and the TPR and FPR decrease. The TPR decreases from 95.3% to 94.3%, and the FPR decreases from 5.0% to 0.85%. A larger threshold has a greater impact on FPR, so a perThreshold of 100% was selected for subsequent performance testing.
[0257] Fix the size of tensor sketch to 10×12×12, l=9, k=5, and perThreshold=100%, and discuss the effect of different mu on TPR and FPR, as well as the differences in TPR and FPR between different algorithms:
[0258] like Figure 14 As shown, Figure 14 A schematic diagram of the effect of mu on TPR and FPR provided in the embodiment of the present application. The value of mu is taken as 0.01-0.1. When the value of mu is larger, the TPR is larger, and the effect of FPR is not obvious. The proposed tensor Sketch-based anomaly detection algorithm (labeled as Ours) has a TPR increase from 94.7% to 97.9%, and an FPR of around 0.3%. The proposed tensor Sketch-based anomaly detection algorithm has a higher TPR and a lower FPR than BPCA and osPCA, and its anomaly detection performance is better than BPCA and osPCA.
[0259] In the tensor sketch parameter settings above, the tensor sketch size is set to 10×12×12, the "reduction" level l=9, and the orthogonal tensor k=5. Below, we discuss the space overhead and compression ratio comparison of using tensor sketches for anomaly detection versus using raw data for anomaly detection:
[0260] The memory overhead of tensor sketch is divided into two parts: one is the memory size of tensor SketchB, and the other is the feature space Memory size. When the anomaly detection data volume is 10,000 time slots, that is, 12×12×10,000, if the original data is used for anomaly detection, the memory overhead is the sum of the tensor raw data and the feature space memory: 12×12×10,000+12×5×10,000=2,040,000. If the tensor Sketch is used for anomaly detection, the memory overhead is 10×12×12+12×5×12=2,160. The calculation formula for defining the compression ratio = (B memory size + The memory size of the original tensor storage scheme is calculated as follows: 2160÷2040000=0.00106. When the anomaly detection data volume is 12×12×10000, the compression ratio is 2160÷2040000=0.00106. As shown in Table 1 below, Table 1 is a data table of the compression ratio of the tensor sketch to the original data provided in an embodiment of the present application. The data shows that when the anomaly detection data volume increases from 12×12×10000 to 12×12×30000, the compression performance of anomaly detection using the tensor sketch is better.
[0261]
[0262] Table 1
[0263] Anomaly detection time overhead analysis:
[0264] by Figure 15 To illustrate, Figure 15 A schematic diagram of the time overhead of anomaly detection provided by the embodiment of this application. Specifically, Figure 15 The time cost of the three anomaly detection methods provided by this application, BPCA and osPCA, is shown in the horizontal axis, which is the number of anomaly detections, i.e., the amount of anomaly detection data up to 2, 4, 6, 8, and 10 weeks respectively, and the vertical axis is the anomaly detection time required to detect 2, 4, 6, 8, and 10 weeks of data. Among these three anomaly detection methods, although the time cost of osPCA is less than that of the method proposed in this application, Figure 14 As can be seen from the figure, the TPR and FPR of osPCA, two indicators reflecting the detection accuracy performance, are worse than those of the method proposed in the present invention. In the embodiment of the present application, the time overhead for calculating the data of a time slot is 1.2 milliseconds, which can meet the continuous data flow in the network.
[0265] Next, another traffic dataset, Geant, is used to verify the data detection method provided in the embodiments of this application. At the same time, it is compared with the vector-based outlier detection algorithm (osPCA) and the tensor-based two-way PCA online outlier detection algorithm (BPCA), and the performance is compared in terms of the true positive rate (TPR), false positive rate (FPR), and time overhead. The Geant traffic dataset is collected from a cross-European research network consisting of 23 nodes. The whole network traffic data is collected every 15 minutes for four months.
[0266] (1) Parameter settings:
[0267] Size of the tensor sketch: The Geant traffic dataset has 23 nodes. The size of each time slot dimension is 23×23, and there are 10772 time slot data in total. The size of the entire dataset dimension is 23×23×10772. Set the dimension of TensorSketch to 15×23×23, indicating that Tensor Sketch stores data of 15 time slot sizes.
[0268] Setting of outliers: Similarly, randomly select 50% of the time slots to inject outliers, and randomly select 10% of the traffic data in the selected time slots to inject outliers that follow a Gaussian distribution (mu, sigma).
[0269] (2) Performance analysis, discussing the influence of four parameters on the outlier detection accuracy, namely: parameter l in the "reduction" operation, parameter k in outlier detection, threshold, and injected outlier mu.
[0270] Fix the size of Tensor Sketch at 15×23×23, and discuss the influence of parameter l on TPR and FPR under the same mu, parameter k, and threshold:
[0271] Parameter l represents the "reduction" level. The smaller the parameter l, the more zero-value horizontal slices appear in the tensor SketchB after the "reduction" operation. As Figure 16 shown, discuss the influence of parameter l on TPR and FPR. Figure 16 This is another schematic diagram of the influence of parameter l on TPR and FPR provided in the embodiments of this application. Take the values of l as [2, 4, 6, 8, 10, 12, 14], which meet the parameter requirements (1 < l ≤ min(L, I2)), that is, 1 < l ≤ min(15, 23). When the value of l is larger, TPR and FPR are smaller, where TPR drops from 90.9% to 89.6%, and FPR drops from 0.24% to 0.11%. Select a fixed l = 8 for the subsequent performance tests.
[0272] Fix the size of Tensor Sketch to 15×23×23 and l=8, and discuss the impact of parameter k on TPR and FPR under the same mu and threshold:
[0273] Parameter k indicates the selection of orthogonal tensor First k side slices As the normal subspace, the side slice from the k+1th to the I2th side slice is the abnormal subspace. Figure 17 The effect of parameter k on TPR and FPR is shown. Figure 17 This is another diagram showing the effect of parameter k on TPR and FPR, as provided in this embodiment. The value of k ranges from 5 to 12. As k increases, TPR and FPR increase, with TPR increasing from 89.6% to 93% and FPR from 0.13% to 0.22%. Considering an appropriate TPR and FPR, k = 8 was selected for subsequent performance testing.
[0274] Fix the size of Tensor Sketch to 15×23×23, fix l=8, and fix k=8, and discuss the impact of the same mu and threshold on TPR and FPR:
[0275] Similarly, in order to obtain a suitable threshold, we first use two weeks of data for training to obtain the anomaly scores of the normal data for two weeks. These anomaly scores are sorted from small to large, and the largest anomaly score is taken as the threshold, expressed as perThreshold = 100%, that is, the anomaly score that is not less than 100% of these sorted anomaly scores is taken as the threshold. Figure 18 As shown, Figure 18 Another schematic diagram of the impact of thresholds on TPR and FPR provided in the embodiment of this application. The impact of thresholds on TPR and FPR is shown with perThreshold values ranging from 99% to 100%. As the perThreshold value increases, the threshold increases, and the TPR and FPR decrease, with TPR decreasing from 100% to 90% and FPR decreasing from 5.0% to 0.85%. A larger threshold has a greater impact on FPR, so a threshold of perThreshold = 100% was selected for subsequent performance testing.
[0276] Fix the size of Tensor Sketch to 15×23×23, fix l=8, fix k=8, and fix perThreshold=100%, and discuss the effects of different mu on TPR and FPR, as well as the differences in TPR and FPR of each algorithm:
[0277] like Figure 19 As shown, Figure 19Another schematic diagram of the effect of mu on TPR and FPR provided in the embodiment of the present application. Taking the value of mu as 0.00001 to 0.0001, when the value of mu increases, the TPR increases, and the FPR decreases slightly. The proposed tensor-Sketch-based anomaly detection algorithm (labeled as Ours) increases the TPR from 2.17% to 99.9%, and decreases the FPR from 0.24% by 0.11%. The proposed tensor-Sketch-based anomaly detection algorithm has a higher TPR and a lower FPR than BPCA and osPCA, and its anomaly detection performance is better than BPCA and osPCA.
[0278] In the above Tensor Sketch parameter settings, the Tensor Sketch size is determined to be 15×23×23, the "reduction" level l = 8, and the top k of the orthogonal tensor is 8. Please refer to the data shown in Table 2 below. Table 2 is another data table of the compression ratio of tensor sketch to original data provided in the embodiment of this application. It discusses the space overhead and compression ratio comparison of anomaly detection using Tensor Sketch and using original data for anomaly detection:
[0279]
[0280] Table 2
[0281] The memory overhead of tensor Sketch is divided into two parts. One part is tensor The memory size of the other part is the feature space Memory size. When the anomaly detection data volume is 3000 time slots, if the original data is used for anomaly detection, the memory overhead is the sum of the tensor raw data and the feature space memory: 23×23×3000+23×8×3000=2139000. If the tensor Sketch is used for anomaly detection, the memory overhead is 15×23×23+23×8×23=12167. The calculation formula for defining the compression ratio is (B memory size + The compression ratio is 12167 ÷ 2139000 = 0.0057. As shown in Table 2, as the amount of anomaly detection data increases from 23 × 23 × 3000 to 23 × 23 × 9000, the compression performance of anomaly detection using Tensor Sketch improves.
[0282] Anomaly detection time overhead analysis:
[0283] by Figure 20 For example, Figure 20This is another schematic diagram of the anomaly detection time overhead, specifically the time overhead of the three anomaly detection methods proposed in this application, BPCA and osPCA. The horizontal axis is the number of anomaly detections, which are the amount of anomaly detection data of up to 2, 4, 6, 8, and 10 weeks respectively, and the vertical axis is the anomaly detection time required to detect 2, 4, 6, 8, and 10 weeks of data. Calculating one time slot data, the time overhead of the method proposed in the present invention, BPCA, and osPCA are 0.92 milliseconds, 3.59 milliseconds, and 0.04 milliseconds, respectively. Although osPCA has the smallest time overhead, it is a vector-based anomaly detection solution, and the anomaly detection accuracy is not high. However, the method proposed in the present invention, the anomaly detection time of one time slot data, can meet the data that continuously arrives in the network.
[0284] The above two embodiments illustrate how the embodiments of the present application are deployed in actual applications. In this application, storing data through the first tensor, namely the tensor sketch, and performing anomaly detection can reduce storage overhead, time overhead, etc., and can detect data in real time.
[0285] To better understand the application of the embodiments of the present application, the following provides an example application scenario of the method provided by the present application. For example, the implementation and interaction process of the distributed anomaly detection framework based on Tensor Sketch is demonstrated. Furthermore, the proposed solution is compared with a centralized anomaly detection framework in terms of anomaly detection accuracy and communication overhead in a cluster performance monitoring data (Multi-Cluster Performance Monitoring BigData, MBD) for batch processing of big data.
[0286] Implementation and interaction process of the distributed anomaly detection framework based on Tensor Sketch:
[0287] In the previous method embodiments, the tensor Sketch model based on Tensor SVD (such as the aforementioned steps A1 to A4), the centralized fusion algorithm of the tensor Sketch (such as the aforementioned steps B1 to B4), and the distributed anomaly detection algorithm based on the tensor Sketch (such as the aforementioned steps C1 to C4) are described.
[0288] For ease of understanding, the following is still based on the above Figure 7 The following example illustrates this. Figure 7As shown in the figure, in a distributed network, there is one central site and n regional sites. Each regional site converts its normal data into a tensor sketch. The regional site sends its tensor sketch to the central site. The central site fuses the tensor sketch and calculates the feature space of the fused tensor sketch. The feature space is then sent to each regional site for distributed anomaly detection. The following describes the implementation and interaction process of a distributed anomaly detection framework based on tensor sketches in this distributed network.
[0289] (1) Completion object: n regional sites.
[0290] Interaction Events: Each regional site initializes the Tensor Sketch and its parameters, completes anomaly detection within each monitoring area within monitoring period T1, and stores normal data in the Tensor Sketch. After T1, each regional site uploads its own Tensor Sketch to the central site.
[0291] Detailed description: n regional sites initialize the same size Tensor Sketch, the same parameters l and k. The Tensor Sketch formed by the i-th regional site in the monitoring time period T1 is Then the set of Tensor Sketches of n regional sites in the monitoring time period T1 is For the sake of convenience, we take regional site 1 as an example. After regional site 1 is initialized, it is trained with a small amount of normal data to obtain the current anomaly detection threshold α1 and the normal data feature space At this time, regional site 1 has α1 and In the following T1 time period, monitoring data arrives in the form of streaming data. Regional site 1 calculates the anomaly score of the current monitoring data to be judged according to the "distributed anomaly detection algorithm based on tensor Sketch", that is, steps A1 to A4 in the aforementioned method embodiment. If the anomaly score is greater than the threshold, the current monitoring data is judged to be abnormal, otherwise it is normal. Normal monitoring data is stored in if If it cannot be stored, the "reduction" operation will be executed. After the T1 period, the regional site 1 will Upload to the central site.
[0292] (2) Completion object: central site.
[0293] Interaction event: After time period T1, the central site receives Fuse and obtain the fused tensor and feature space Will Send to n regional sites.
[0294] Detailed description: The central site executes the "centralized fusion algorithm of tensor Sketch", fusion Get the fused tensor and orthogonal tensors in Continue to save at the central site, Sent to n regional sites.
[0295] (3) Completion object: regional site.
[0296] Interaction event: n regional sites received Then, take the first k side slices As the normal subspace, the n regional sites reinitialize the Tensor Sketch and its parameters. During the following T2 period, anomaly detection is completed and normal data is stored in the Tensor Sketch. After T2, each regional site uploads its Tensor Sketch to the central site.
[0297] Detailed description: During the T2 period, n regional sites obtain the feature space of normal data of the entire network. And initialize the tensor In the following T2 period, monitoring data arrives in the form of streaming data. The regional site calculates the anomaly score of the current monitoring data to be judged based on the "distributed anomaly detection algorithm based on tensor Sketch". If the anomaly score is greater than the threshold, the current monitoring data is judged to be abnormal, otherwise it is normal. Normal monitoring data is stored in if If the storage is not possible, the "reduction" operation will be performed. After the T2 period, the n regional sites will Upload to the central site.
[0298] (4) Completion object: central site.
[0299] Interaction event: After time period T2, the central site receives The central site will and Fusion, get And its corresponding orthogonal tensor in Continue to save at the central site, Sent to n regional sites.
[0300] Detailed description: The central site executes the "tensor Sketch centralized fusion algorithm" i.e. the above steps B1 to B4, and converts the tensor Sketch obtained in the previous fusion into And this time I received Do the fusion and get the fusion and orthogonal tensors This is considered as the feature space of normal data for the entire network up to time period T2 and will be sent to each regional site.
[0301] Through the above interactions, the central site and regional sites complete distributed anomaly detection in time periods T1 and T2. After being sent to each regional site, each regional site and the central site repeat the above (3) (4) interactions in sequence, thereby completing the data anomaly detection for the next T3 time period.
[0302] In an embodiment of the present application, the method provided by the present application uses an MBD multi-node multi-indicator data set for simulation experiments, and is compared with a distributed anomaly detection solution (Original data) that uploads original data to a central site. MBD is a cluster server data set containing five nodes, with 26 indicators on each node, including memory usage percentage, disk I / O wait time per second, CPU I / O wait time, etc. Each node collects these 26 indicators every half a minute and generates one piece of data, which contains a total of 3 days of data. In the experimental design, every 26 pieces of data in each node form a time slot data, so each node has a total of 309 time slot data, that is, the amount of original data for each node is 26×26×309.
[0303] (1) Parameter setting and performance analysis:
[0304] Distributed anomaly detection accuracy:
[0305] In terms of parameter settings, the Tensor Sketch size for each node is set to 15×26×26, with fixed parameters l = 10 and k = 8. Every T = 40 time slots, each node uploads the Tensor Sketch to the central site for tensor sketch fusion. The resulting orthogonal tensor is sent to each node for anomaly detection in the next time slot.
[0306] Figure 21 A schematic diagram of the TPR and FPR of distributed anomaly detection provided in an embodiment of the present application, which shows the TPF and FPR of distributed anomaly detection under the MBD dataset. Compared with the distributed anomaly detection scheme directly using raw data, although the TPR and FPR indicators of the distributed anomaly detection scheme directly using raw data are slightly better than the tensor Sketch-based distributed anomaly detection proposed in the present invention, the numerical difference is small, and as mu increases, the TPR and FPR indicators of the two are close.
[0307] The following is an example of Table 3, which is a data table comparing the anomaly detection overhead provided by the embodiment of the present application. It mainly compares the communication overhead of centralized anomaly detection with that of distributed anomaly detection in the embodiment of the present application:
[0308]
[0309] Table 3
[0310] In a centralized anomaly detection solution, regional sites need to upload raw data to the central site and download the feature space of normal data from the central site, resulting in significant communication overhead. The single upload communication overhead refers to the raw data uploaded by all regional sites within a measurement cycle. For example, in the MBD dataset, assuming a single node uploads 100 time slots of data during a measurement cycle, the data volume is 26 × 26 × 100. Therefore, the total data uploaded by the five nodes is 26 × 26 × 100 × 5 = 338,000. The single download communication overhead refers to the feature space downloaded from the central site by all regional sites after a measurement cycle. For example, in the MBD dataset, assuming a single node uploads 100 time slots of data during a measurement cycle, the central site receives 26 × 26 × 500 data transmitted from the five nodes and generates a feature space of 26 × 8 × 500. Therefore, the total data volume of the feature space downloaded by the five nodes is 26 × 8 × 500 × 5 = 520,000.
[0311] In the embodiment of the present application, the regional site only needs to upload a small tensor Sketch and download the feature space of the fused tensor Sketch. The single upload communication overhead refers to the small tensor Sketch uploaded by all regional sites in one measurement cycle, that is, assuming that a single node uploads a tensor Sketch of size 15×26×26 in one measurement cycle, the total amount of data uploaded by the five nodes is 15×26×26×5=50700. The single download communication overhead refers to the feature space downloaded by all regional sites from the central site after one measurement cycle, that is, after one measurement cycle, the central site receives the tensor Sketch from the five nodes, fuses and generates a feature space of size 26×8×26, so the amount of data downloaded by the five nodes in the feature space is 26×8×26×5=27040.
[0312] From the above analysis, it can be seen that the sum of the communication costs in the centralized anomaly detection solution is 338,000 + 520,000 = 858,000, and the sum of the communication costs in the embodiment of the present application is 50,700 + 27,040 = 77,740. The ratio of the communication costs of the two is 858,000:77,740≈11:1.
[0313] As shown in Table 3, since the tensor Sketch and feature space sizes of a single node are fixed, as the number of detections increases, the ratio of the communication overhead of the centralized anomaly detection scheme to the distributed anomaly detection scheme increases, and the advantage of the distributed anomaly detection scheme in saving communication overhead is more obvious.
[0314] In the embodiment of the present application, an application scenario of distributed anomaly detection is specifically described, a specific implementation method of the present solution is provided, and the reliability of the solution is improved. In addition, the embodiment of the present application compares the differences between centralized anomaly detection and the solution of the embodiment of the present application. The present solution reduces communication overhead, namely transmission overhead and storage overhead, and does not require uploading of original measurement data, thereby reducing the security risk of data leakage.
[0315] To implement the various functions of the methods provided in the embodiments of the present application, the first communication device and the second communication device may each include hardware structures and / or software modules, and implement the aforementioned functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular one of the aforementioned functions is implemented in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.
[0316] like Figure 22 As shown, the embodiment of the present application also provides a communication device 2200. For details, please refer to Figure 22 , Figure 22 This is a structural diagram of a communication device in an embodiment of the present application. The communication device 2200 can be a routing device in a network device, such as at least one of a router, a switch, and a hub, or a device capable of obtaining data from a terminal device or a network device. In one possible implementation, the communication device 2200 may include a module or unit that corresponds one-to-one to the method / operation / step / action performed by the first communication device in the above-mentioned method embodiment. The unit may be a hardware circuit, or software, or a combination of a hardware circuit and software. In one possible implementation, the communication device 2200 may include: a processing unit 2202. The processing unit 2202 can be used to execute the steps of obtaining a first parameter in the above-mentioned method embodiment, detecting that the first measurement data is normal data based on the first parameter, and storing the first measurement data in the first tensor to obtain an updated first tensor, and / or detecting that the second measurement data is abnormal data based on the first parameter.
[0317] In another possible implementation, the communication device may further include a receiving unit 2201 and a sending unit 2203. The sending unit 2203 may be used to execute the step of sending the first tensor to the second tensor as in the above method embodiment; the receiving unit 2201 may be used to execute the step of receiving the first parameter sent by the second communication device as in the above method embodiment.
[0318] In an embodiment of the present application, the processing unit 2202 is used to obtain a first parameter, which is obtained based on a first tensor storing data that has been detected to be normal. The dimension of the first tensor is fixed, and the dimension of the first tensor is smaller than the dimension of the tensor of data that has been detected to be normal. Then the processing unit 2202 is also used to detect that the first measurement data is normal data based on the first parameter, and the first measurement data belongs to the data to be detected as abnormal within the first period, and the first period is used to indicate the period in which the current data to be detected is abnormal. Then, the processing unit 2202 is also used to store the first measurement data in the first tensor after the first tensor is updated. And / or, the processing unit is also used to detect that the second measurement data is abnormal data based on the first parameter, and the second measurement data belongs to the data to be detected as abnormal within the first period. And the first parameter can also be the first parameter sent by the second communication device received by the receiving unit 2201. In this embodiment of the present application, processing unit 2202 obtains a first parameter, which is obtained based on a first tensor of fixed dimension. It then detects first measurement data based on the first parameter and stores the normal data in the first tensor to obtain an updated first tensor. The dimension of the first tensor is smaller than that of the first measurement data, thereby storing normal data in a smaller space and reducing storage overhead. Furthermore, processing unit 2202 detects that the second measurement data is abnormal data based on the first parameter, thereby achieving network anomaly detection without transmitting the original measurement data, thereby reducing transmission overhead and further reducing network costs.
[0319] In other possible designs, the above-mentioned receiving unit 2201, processing unit 2202 and sending unit 2203 can execute the methods / operations / steps / actions in various possible implementation methods of the above-mentioned method embodiments one by one.
[0320] In a possible design, the processing unit 2202 is specifically configured to obtain an abnormality score of the first measurement data based on the first parameter.
[0321] The processing unit 2202 is specifically configured to determine that the first measurement data is normal data based on the anomaly score of the first measurement data being less than a threshold, where the threshold is used to detect whether the data is abnormal or normal.
[0322] Alternatively, the processing unit 2202 is specifically configured to obtain an abnormality score of the second measurement data based on the first parameter.
[0323] The processing unit 2202 is specifically configured to determine that the second measurement data is abnormal data based on the abnormal score of the second measurement data being greater than a threshold.
[0324] In a possible design, after storing the first measurement data in the first tensor to obtain the updated first tensor, the sending unit 2203 is further configured to send the updated first tensor to the second communication device.
[0325] The receiving unit 2201 is further configured to receive a second parameter sent by a second communication device, where the second parameter is obtained by the second communication device based on the updated first tensors sent by at least two first communication devices.
[0326] In a possible design, the above-mentioned processing unit 2202 is also used to determine whether the third measurement data is the abnormal data or the normal data based on the second parameter, and the third measurement data belongs to the data to be detected as abnormal within the second cycle, and the second cycle is after the first cycle.
[0327] In a possible design, the processing unit 2202 is further configured to record and notify that the second measurement data is abnormal data through at least one of logs, alarms, or TRAPs.
[0328] In a possible design, the processing unit 2202 is specifically configured to, when the first tensor has a horizontal slice with a zero value, store the first measurement data in the horizontal slice with a zero value to obtain an updated first tensor.
[0329] Alternatively, the processing unit 2202 is specifically configured to, when the first tensor does not have a horizontal slice with a zero value, process the first tensor to obtain a first tensor including a horizontal slice with a zero value.
[0330] The processing unit 2202 is specifically configured to store the first measurement data in a horizontal slice of zero value to obtain an updated first tensor.
[0331] In one possible design, the processing unit 2202 is specifically configured to perform a fast Fourier transform on the first tensor to obtain a transformed tensor.
[0332] The processing unit 2202 is specifically configured to perform tensor singular value decomposition on each frontal slice of the transformation tensor to obtain a corresponding diagonal matrix and an orthogonal matrix.
[0333] The processing unit 2202 is specifically configured to obtain a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each frontal slice.
[0334] The processing unit 2202 is specifically configured to perform inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then perform tensor product to obtain a first tensor including horizontal slices of zero values.
[0335] Please refer to the above for the beneficial effects of the various designs of the communication devices mentioned above. Figure 3The beneficial effects of the various implementation methods corresponding to each other in the method embodiments are not described in detail here.
[0336] It should be noted that Figure 22 The information interaction, execution process, etc. between the modules / units in the first communication device described in the corresponding embodiment are the same as those in the present application. Figure 3 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0337] like Figure 23 As shown, the embodiment of the present application also provides a communication device 2300. For details, please refer to Figure 23 , Figure 23 This is another structural diagram of the communication device of an embodiment of the present application. The communication device 2300 can be a routing device in a network device, such as at least one of a router, a switch, and a hub, or a device capable of obtaining data from a terminal device or a network device. In one possible implementation, the communication device 2300 may include a module or unit that corresponds to the method / operation / step / action performed by the first communication device in the above method embodiment. The unit may be a hardware circuit, or software, or a combination of a hardware circuit and software. In one possible implementation, the communication device 2300 may include: a receiving unit 2301, a processing unit 2302, and a sending unit 2303. The receiving unit 2301 can be used to perform the step of receiving a first tensor sent by two first communication devices in the above method embodiment, the processing unit 2302 can be used to perform the step of determining a first parameter based on at least two first tensors in the above method embodiment, and the sending unit 2303 can be used to perform the step of sending a first parameter to at least two first communication devices in the above method embodiment.
[0338] In an embodiment of the present application, the receiving unit 2301 receives a first tensor sent by at least two first communication devices, wherein the first tensor is used to store data that has been detected to be normal, the dimension of the first tensor is fixed, and the dimension of the first tensor is smaller than the dimension of the tensor of the data that has been detected to be normal. Then, the processing unit 2302 determines a first parameter based on at least two first tensors, and the first parameter is used for the first communication device to detect the first measurement data, and the first measurement data is the data to be detected as abnormal. The sending unit 2302 is used to send the first parameter to at least two first communication devices, so that the first communication device detects whether the first measurement data is abnormal based on the first parameter, and when the first measurement data is normal data, the first measurement data is stored in the first tensor to obtain an updated first tensor. In an embodiment of the present application, the receiving unit 2301 receives at least two first tensors, and the first tensor stores the data that has been detected to be normal, and the dimension of the first tensor is smaller than the dimension of the tensor of the stored data, thereby reducing the transmission overhead, and wirelessly transmitting the original data reduces the security risk of leaking the data. The processing unit 2302 determines the first parameter based on at least two first tensors to obtain the feature space corresponding to the normal data without processing a large amount of data, thereby reducing the performance requirements for the central site, i.e., the communication device 2300. Then the sending unit 2303 sends the first parameter to at least two first communication devices, and the entire network data detection can be distributed to multiple first communication devices for partitioned detection, thereby improving the detection efficiency and reducing the performance requirements for the communication device 2300.
[0339] In other possible designs, the above-mentioned receiving unit 2301, processing unit 2302 and sending unit 2303 can execute the methods / operations / steps / actions in various possible implementation methods of the above-mentioned method embodiments one by one.
[0340] In a possible design, the processing unit 2302 is specifically used to fuse at least two first tensors to obtain a second tensor and a first parameter, and the dimension of the second tensor is equal to the dimension of the first tensor.
[0341] In a possible design, the processing unit 2302 is specifically used to store a first tensor to obtain a stored tensor.
[0342] The processing unit 2302 is specifically configured to, when the stored tensor includes a zero-valued horizontal slice, store the unstored horizontal slice of the first tensor into the zero-valued horizontal slice of the stored tensor to obtain a second tensor and the first parameter.
[0343] Alternatively, the processing unit 2302 is specifically configured to, when the storage tensor does not include a horizontal slice of zero value, process the storage tensor to obtain a storage tensor including a horizontal slice of zero value.
[0344] The processing unit 2302 is specifically configured to store the unstored horizontal slice of the first tensor into the zero-valued horizontal slice of the stored tensor to obtain the second tensor and the first parameter.
[0345] In one possible design, the processing unit 2302 is specifically configured to perform a fast Fourier transform on the stored tensor to obtain a transformed tensor.
[0346] The processing unit 2302 is specifically configured to perform tensor singular value decomposition on each frontal slice of the transformation tensor to obtain a corresponding diagonal matrix and an orthogonal matrix.
[0347] The processing unit 2302 is specifically configured to obtain a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each frontal slice.
[0348] The processing unit 2302 is specifically configured to perform inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then perform tensor product to obtain a storage tensor including horizontal slices of zero values.
[0349] Please refer to the above for the beneficial effects of the various designs of the communication devices mentioned above. Figure 3 The beneficial effects of the various implementation methods in the method embodiments are corresponding to each other, and the details are not repeated here.
[0350] It should be noted that Figure 23 The information interaction, execution process, etc. between the modules / units in the second communication device described in the corresponding embodiment are the same as those in the present application. Figure 3 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0351] like Figure 24 , this application also provides a communication device, please refer to Figure 24 , Figure 24 This is another structural diagram of the communication device according to the embodiment of the present application. The communication device may be deployed with Figure 22 or Figure 23 The modules described in the corresponding embodiment are used to implement Figure 22 or Figure 23Regarding the functions of the communication device in the corresponding embodiment, specifically, the communication device may include one or more central processing units (CPUs) 2401 (e.g., one or more central processing units), a memory 2402, and an input / output (I / O) device. The CPU 2401 is configured to execute the steps performed by the first communication device or the steps performed by the second communication device in the method embodiment, the memory 2402 is configured to store at least the first tensor and the first and / or second parameters, and the I / O is configured to receive measurement data or the first tensor or transmit the feature space, i.e., the first parameter or the second parameter.
[0352] Please refer to the above for the beneficial effects of the communication device of this application. Figure 3 The beneficial effects of the various implementation methods in the method embodiments are corresponding to each other, and the details are not repeated here.
[0353] It should be noted that Figure 24 The information interaction, execution process, etc. between the modules / units in the first communication device or the second communication device described in the corresponding embodiment are the same as those in the present application. Figure 3 The corresponding method embodiments are based on the same concept. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0354] In addition, each functional module or unit in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules or units may be integrated into one module or unit. The above-mentioned integrated modules or units may be implemented in the form of hardware or software functional modules.
[0355] Next, another communication device provided by the embodiment of the present application is introduced. Figure 25 , Figure 25 This is another structural diagram of the communication device according to the embodiment of the present application. The communication device 2500 may be deployed with Figure 25 The modules described in the corresponding embodiment are used to implement Figure 25Regarding the functions of the communication device in the corresponding embodiment, specifically, the communication device 2500 is implemented by one or more servers. The communication device 2500 may vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 2522 (for example, one or more central processing units) and memory 2532, and one or more storage media 2530 (for example, one or more mass storage devices). Among them, the memory 2532 and the storage medium 2530 can be temporary storage or permanent storage. The program stored in the storage medium 2530 may include one or more modules (not shown in the figure), each module may include a series of instruction operations in the communication device 2500. Furthermore, the CPU 2522 can be configured to communicate with the storage medium 2530 to execute a series of instruction operations in the storage medium 2530 on the communication device 2500.
[0356] The communication device 2500 may also include one or more power supplies 2526 , one or more wired or wireless network interfaces 2550 , and / or one or more input / output interfaces 2558 .
[0357] In the embodiment of the present application, the central processing unit 2522 is used to execute Figure 3 Corresponding to the method in the embodiment. For example, the central processing unit 2522 can be used to: obtain a first parameter, which is obtained based on a first tensor storing data that has been detected as normal, wherein the dimension of the first tensor is fixed and smaller than the dimension of the tensor of the data that has been detected as normal. Then, based on the first parameter, the first measurement data is detected as normal data, wherein the first measurement data belongs to the data to be detected as abnormal within a first period, wherein the first period is used to indicate the period in which the data to be detected is abnormal. The first measurement data is stored in the first tensor after the first tensor is updated. And / or, based on the first parameter, the second measurement data is detected as abnormal data, wherein the second measurement data belongs to the data to be detected as abnormal within the first period. The dimension of the first tensor is smaller than the dimension of the first measurement data, thereby achieving storage of normal data in a smaller space, thereby reducing storage overhead. And based on the first parameter, the second measurement data is detected as abnormal data, thereby achieving network anomaly detection without transmitting the original measurement data, thereby reducing transmission overhead and further reducing network costs.
[0358] Alternatively, the central processor 2522 can be configured to: receive a first tensor sent by at least two first communication devices, the first tensor being used to store data that has been detected as normal, the first tensor having a fixed dimension and smaller than the dimension of the tensor of the data that has been detected as normal; and determine a first parameter based on the at least two first tensors, the first parameter being used by the first communication device to detect first measurement data, the first measurement data being the data to be detected as abnormal; and transmit the first parameter to the at least two first communication devices. In an embodiment of the present application, the at least two first tensors are received, the first tensor storing the data that has been detected as normal, and the first tensor having a dimension smaller than the dimension of the tensor of the stored data, thereby reducing transmission overhead and wirelessly transmitting the original data, reducing the security risk of data leakage. Determining the first parameter based on the at least two first tensors to obtain a feature space corresponding to the normal data eliminates the need to process large amounts of data, thereby reducing performance requirements for the central site, i.e., the communication device 2500. The first parameter is then transmitted to the at least two first communication devices, allowing the detection of network-wide data to be distributed to multiple first communication devices for partitioned detection, thereby improving detection efficiency and reducing performance requirements for the communication device 200.
[0359] It should be noted that the CPU 2522 can also be used to execute the Figure 7 For any step in the corresponding method embodiment, the specific content can be found in the description of the method embodiment shown above in this application, and will not be repeated here.
[0360] An embodiment of the present application also provides a computer-readable storage medium, including computer-readable instructions. When the computer-readable instructions are executed on a computer, the computer executes any one of the implementation methods shown in the aforementioned method embodiments.
[0361] An embodiment of the present application also provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run on a computer, the computer executes any one of the implementation methods shown in the aforementioned method embodiments.
[0362] The present application also provides a chip or chip system, which may include a processor. The chip may also include a memory (or storage module) and / or a transceiver (or communication module), or the chip is coupled to a memory (or storage module) and / or a transceiver (or communication module), wherein the transceiver (or communication module) can be used to support the chip for wired and / or wireless communication, and the memory (or storage module) can be used to store a program or a set of instructions, and the processor calls the program or the set of instructions to implement the above-mentioned method embodiment, the operation performed by the terminal or network device in any possible implementation of the method embodiment. The chip system may include the above chip, and may also include the above chip and other discrete devices, such as memory (or storage module) and / or transceiver (or communication module).
[0363] The present application also provides a communication system, which may include the above-mentioned first node and second node. The communication system may be used to implement the operations performed by the first node or the second node in the above-mentioned method embodiment and any possible implementation manner of the method embodiment.
[0364] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0365] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware, and of course can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, training equipment, or network equipment, etc.) to execute the methods described in each embodiment of the present application.
[0366] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0367] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, training equipment or data center to another website, computer, training equipment or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a high-density digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive (SSD)).
Claims
1. A data detection method, It is characterized in that include: The first communication device acquires the first parameter, where the first parameter is obtained based on a first tensor storing the data that has been detected to be normal, where the dimension of the first tensor is fixed and is smaller than the dimension of the tensor of the data that has been detected to be normal; The first communication device detects, based on the first parameter, that first measurement data is normal data, the first measurement data belongs to data to be detected as abnormal within a first period, and the first period is used to indicate a period in which the current data to be detected is abnormal; The first communication device stores the first measurement data in the first tensor after the first tensor is updated; And / or, the first communication device detects second measurement data as abnormal data based on the first parameter, and the second measurement data belongs to data to be detected as abnormal within the first period.
2. The method according to claim 1, It is characterized in that Before the first communication device acquires the first parameter, the method further includes: The first communication device sends the first tensor to the second communication device; The first communication device acquiring the first parameter includes: The first communication device receives the first parameter sent by the second communication device, where the first parameter is obtained by the second communication device based on at least two of the first tensors sent by the first communication device.
3. The method according to claim 1 or 2, It is characterized in that The first communication device detecting that the first measurement data is normal data based on the first parameter includes: The first communication device acquires an abnormality score of the first measurement data based on the first parameter; The first communication device determines that the first measurement data is the normal data based on that the abnormality score of the first measurement data is less than a threshold value, and the threshold value is used to detect whether the data is abnormal or normal; Or, the first communication device detecting that the second measurement data is abnormal data based on the first parameter includes: The first communication device acquires an abnormality score of the second measurement data based on the first parameter; The first communication device determines that the second measurement data is the abnormal data based on that the abnormality score of the second measurement data is greater than a threshold.
4. The method according to any one of claims 1 to 3, It is characterized in that After the first communication device stores the first measurement data in the first tensor after the first tensor is updated, the method further includes: The first communication device sends the updated first tensor to the second communication device; The first communication device receives a second parameter sent by the second communication device, where the second parameter is obtained by the second communication device based on the updated first tensors sent by at least two of the first communication devices.
5. The method according to claim 4, It is characterized in that The method further comprises: The first communication device determines, based on the second parameter, that third measurement data is the abnormal data or the normal data, and the third measurement data belongs to data to be detected as abnormal in a second cycle, and the second cycle is after the first cycle.
6. The method according to claim 5, It is characterized in that The method further comprises: The first communication device records and notifies that the second measurement data and / or the third measurement data are abnormal data in at least one manner of log, alarm or TRAP.
7. The method according to any one of claims 1 to 6, It is characterized in that The first communication device stores the first measurement data in the first tensor to obtain an updated first tensor, which includes: When the first tensor has a horizontal slice with a zero value, the first communication device stores the first measurement data in the horizontal slice with a zero value to obtain an updated first tensor; or, when the first tensor does not have the horizontal slice of the zero value, the first communication device processes the first tensor to obtain the first tensor including the horizontal slice of the zero value; The first communication device stores the first measurement data in the horizontal slice of the zero value to obtain the updated first tensor.
8. The method according to claim 7, It is characterized in that The first communication device processes the first tensor to obtain the first tensor including the horizontal slice of the zero value, comprising: The first communication device performs a fast Fourier transform on the first tensor to obtain a conversion tensor; The first communication device performs tensor singular value decomposition on each front slice of the conversion tensor to obtain a corresponding diagonal matrix and an orthogonal matrix; The first communication device obtains a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each of the frontal slices; The first communication device performs inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then performs tensor product to obtain the first tensor including the horizontal slice of the zero value.
9. A data detection method, It is characterized in that include: The second communication device receives a first tensor sent by at least two first communication devices, where the first tensor is used to store data that has been detected to be normal, and the dimension of the first tensor is fixed, and the dimension of the first tensor is smaller than the dimension of the tensor of the data that has been detected to be normal; The second communication device determines a first parameter based on at least two of the first tensors, where the first parameter is used by the first communication device to detect first measurement data, where the first measurement data is data to be detected for abnormality; The second communication device sends the first parameter to the at least two first communication devices.
10. The method according to claim 9, It is characterized in that The second communication device determines the first parameter based on at least two of the first tensors, including: The second communication device fuses the at least two of the first tensors to obtain a second tensor and the first parameter, and the dimension of the second tensor is equal to the dimension of the first tensor.
11. The method according to claim 10, It is characterized in that The second communication device fuses the at least two first tensors to obtain a second tensor and the first parameter, including: The second communication device stores the first tensor to obtain a stored tensor; When the stored tensor includes a horizontal slice of zero value, the second communication device stores the unstored horizontal slice of the first tensor into the horizontal slice of zero value of the stored tensor to obtain the second tensor and the first parameter; or, when the storage tensor does not include the horizontal slice of the zero value, the second communication device processes the storage tensor to obtain the storage tensor including the horizontal slice of the zero value; The second communication device stores the unstored horizontal slice of the first tensor into the zero-valued horizontal slice of the storage tensor to obtain the second tensor and the first parameter.
12. The method according to claim 11, It is characterized in that Processing, by the second communication device, the stored tensor to obtain the stored tensor including the horizontal slice of the zero value comprises: The second communication device performs a fast Fourier transform on the stored tensor to obtain a conversion tensor; The second communication device performs tensor singular value decomposition on each front slice of the conversion tensor to obtain a corresponding diagonal matrix and an orthogonal matrix; The second communication device obtains a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each of the frontal slices; The second communication device performs inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then performs tensor product to obtain the storage tensor including the horizontal slice of the zero value.
13. A communication device, It is characterized in that include: A processing unit, configured to obtain the first parameter, where the first parameter is obtained based on a first tensor storing the data that has been detected to be normal, where the dimension of the first tensor is fixed and is smaller than the dimension of the tensor of the data that has been detected to be normal; The processing unit is further used to detect that the first measurement data is normal data based on the first parameter, the first measurement data belongs to data to be detected as abnormal within a first period, and the first period is used to indicate a period in which the current data to be detected is abnormal; The processing unit is further configured to store the first measurement data in the first tensor after the first tensor is updated; And / or, the processing unit is further configured to detect, based on the first parameter, second measurement data as abnormal data, wherein the second measurement data belongs to data to be detected as abnormal within the first period.
14. The device according to claim 13, It is characterized in that The communication device further comprises: a sending unit, configured to send the first tensor to a second communication device; A receiving unit is used to receive the first parameter sent by the second communication device, where the first parameter is obtained by the second communication device based on the first tensors sent by at least two of the first communication devices.
15. The device according to claim 13 or 14, It is characterized in that The processing unit is specifically configured to obtain an abnormality score of the first measurement data based on the first parameter; The processing unit is specifically configured to determine that the first measurement data is the normal data based on that the abnormality score of the first measurement data is less than a threshold value, wherein the threshold value is used to detect whether the data is abnormal or normal; Or, the processing unit is specifically configured to obtain an abnormality score of the second measurement data based on the first parameter; The processing unit is specifically configured to determine that the second measurement data is the abnormal data based on that the abnormal score of the second measurement data is greater than a threshold.
16. The device according to any one of claims 13 to 15, It is characterized in that After storing the first measurement data in the first tensor to obtain the updated first tensor, The sending unit is further configured to send the updated first tensor to the second communication device; The receiving unit is further configured to receive a second parameter sent by the second communication device, where the second parameter is obtained by the second communication device based on the updated first tensors sent by at least two of the first communication devices.
17. The device according to claim 16, It is characterized in that The processing unit is further used to determine whether third measurement data is the abnormal data or the normal data based on the second parameter, and the third measurement data belongs to data to be detected as abnormal in a second cycle, and the second cycle is after the first cycle.
18. The device according to claim 17, It is characterized in that The processing unit is further configured to record and notify that the second measurement data is abnormal data in at least one of a log, an alarm, or a TRAP.
19. The device according to any one of claims 13 to 18, It is characterized in that The processing unit is specifically configured to, when the first tensor has a horizontal slice with a zero value, store the first measurement data in the horizontal slice with a zero value to obtain the updated first tensor; Or, the processing unit is specifically configured to, when the first tensor does not have the horizontal slice of the zero value, process the first tensor to obtain the first tensor including the horizontal slice of the zero value; The processing unit is specifically configured to store the first measurement data in the horizontal slice of the zero value to obtain the updated first tensor.
20. The device according to claim 19, It is characterized in that The processing unit is specifically configured to perform a fast Fourier transform on the first tensor to obtain a conversion tensor; The processing unit is specifically used to perform tensor singular value decomposition on each front slice of the transformation tensor to obtain a corresponding diagonal matrix and an orthogonal matrix; The processing unit is specifically configured to obtain a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each of the frontal slices; The processing unit is specifically used to perform inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then perform tensor product to obtain the first tensor including the horizontal slice of the zero value.
21. A communication device, It is characterized in that include: A receiving unit, configured to receive a first tensor sent by at least two first communication devices, wherein the first tensor is used to store data that has been detected to be normal, and the dimension of the first tensor is fixed, and the dimension of the first tensor is smaller than the dimension of the tensor of the data that has been detected to be normal; a processing unit, configured to determine a first parameter based on at least two of the first tensors, wherein the first parameter is used by the first communication device to detect first measurement data, wherein the first measurement data is data to be detected for abnormality; A sending unit is used to send the first parameter to the at least two first communication devices.
22. The device according to claim 21, It is characterized in that The processing unit is specifically used to fuse the at least two first tensors to obtain a second tensor and the first parameter, and the dimension of the second tensor is equal to the dimension of the first tensor.
23. The device according to claim 22, It is characterized in that The processing unit is specifically configured to store the first tensor to obtain a stored tensor; The processing unit is specifically configured to, when the stored tensor includes a horizontal slice of zero value, store the unstored horizontal slice of the first tensor into the horizontal slice of zero value of the stored tensor to obtain the second tensor and the first parameter; Or, the processing unit is specifically configured to, when the storage tensor does not include the horizontal slice of the zero value, process the storage tensor to obtain the storage tensor including the horizontal slice of the zero value; The processing unit is specifically configured to store the unstored horizontal slice of the first tensor into the zero-valued horizontal slice of the stored tensor to obtain the second tensor and the first parameter.
24. The device according to claim 23, It is characterized in that The processing unit is specifically used to perform a fast Fourier transform on the stored tensor to obtain a conversion tensor; The processing unit is specifically used to perform tensor singular value decomposition on each front slice of the transformation tensor to obtain a corresponding diagonal matrix and an orthogonal matrix; The processing unit is specifically configured to obtain a diagonal tensor and an orthogonal tensor based on the diagonal matrix and the orthogonal matrix corresponding to each of the frontal slices; The processing unit is specifically used to perform inverse Fourier transform on the diagonal tensor and the orthogonal tensor respectively, and then perform tensor product to obtain the storage tensor including the horizontal slice of the zero value.
25. A communication device, It is characterized in that include: A processor, the processor is coupled to a memory, the memory stores instructions, and the processor is used to execute the instructions so that the communication device executes the method according to any one of claims 1 to 12.
26. A computer-readable storage medium comprising computer-readable instructions, It is characterized in that When the computer-readable instructions are executed on a computer, the method according to any one of claims 1 to 12 is executed.
27. A computer program product comprising computer readable instructions, It is characterized in that When the computer-readable instructions are executed on a computer, the method according to any one of claims 1 to 12 is executed.
Citation Information
Patent Citations
Online network traffic abnormality detection method and system based on tensor model
CN110138614A
Method and device for jointly training model
CN115345298A
Data processing method of detecting and recovering missing values, outliers and patterns in tensor stream data
US20220374498A1
Detecting anomalous behaviour in an edge communication network
WO2023285864A1
