A memory data anomaly detection method and system

By performing data anomaly detection on the memory and using reduction processing and cluster analysis, the problem of relying on external servers for memory data anomaly detection is solved, real-time and accurate anomaly detection is achieved, and the reliability and efficiency of the system are improved.

CN118571269BActive Publication Date: 2024-10-22SHENZHEN COMOS INTELLIGENT TECHNOLOGY CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411046059.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-10-22
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

In the existing technology, memory data anomaly detection relies on external servers, resulting in a decrease in real-time detection, making it difficult to detect memory anomalies in a timely manner, and is affected by network connection stability and bandwidth.

Method used

Implement the data anomaly detection method on the memory. By obtaining the data stream, perform reduction processing, calculate the data density and unimodal data density, initially screen potential abnormal data points, and determine formal abnormal data points through cluster analysis to achieve independent monitoring and manage.

Benefits of technology

It improves the real-time and accuracy of data anomaly detection, reduces system risks caused by single point failures, reduces computational complexity and resource consumption, and improves system reliability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118571269B_ABST
    Figure CN118571269B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for detecting data anomalies in a memory, and relates to the field of data processing technology. The method includes: obtaining a data stream; when the number of data points in the data stream exceeds a preset number, simplifying the data stream with the goal of maintaining data distribution characteristics; calculating the data density and unimodal data density of each data point in the simplified data stream; performing preliminary screening according to the data density of each data point to determine potential abnormal data points; performing cluster analysis on the potential abnormal data points; and determining formal abnormal data points from each potential abnormal data point according to the cluster analysis results. The present invention can perform data anomaly self-detection on the memory, so that the memory has an independent monitoring function, can realize real-time monitoring and management of stored data without relying on an external server, and does not need to be limited by network conditions, thereby improving the real-time performance of data anomaly detection and reducing system risks caused by single point failures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for detecting memory data anomaly. Background Art

[0002] Memory plays a key role in computer systems. It is a hardware component used to store and retrieve data and instructions. For example, in security monitoring systems, memory can be used to store data streams captured by security equipment such as cameras. However, the memory in current security monitoring systems is prone to single point failures, causing the entire security monitoring system to fail. Therefore, it is essential to detect anomalies in the data in the memory.

[0003] Current data anomaly detection mainly relies on external servers. The storage device transmits the acquired data stream to the external server through the network for data anomaly detection. The anomaly performance is heavily dependent on the stability and bandwidth of the network connection. Delays in data transmission and processing will lead to a decrease in the real-time performance of anomaly detection, making it difficult to detect storage anomalies in a timely manner. Summary of the invention

[0004] In order to solve the technical problem that the current data anomaly detection mainly relies on external servers, the memory transmits the acquired data stream to the external server through the network for data anomaly detection, the anomaly performance is seriously dependent on the stability and bandwidth of the network connection, and the delay in data transmission and processing will lead to the decline of the real-time performance of anomaly detection, making it difficult to detect memory anomalies in time, the present invention provides a memory data anomaly detection method and system.

[0005] The technical solution provided by the embodiment of the present invention is as follows:

[0006] First aspect:

[0007] A memory data anomaly detection method provided by an embodiment of the present invention is applied to a memory, comprising:

[0008] S1: Get data stream;

[0009] S2: When the number of data points in the data stream exceeds a preset number, the data stream is simplified with the goal of maintaining the data distribution characteristics;

[0010] S3: Calculate the data density and unimodal data density of each data point in the simplified data stream;

[0011] S4: performing preliminary screening according to the data density of each of the data points to determine potential abnormal data points;

[0012] S5: Cluster analysis of potential abnormal data points;

[0013] S6: According to the cluster analysis results, determine the formal abnormal data points from various potential abnormal data points.

[0014] Second aspect:

[0015] An embodiment of the present invention provides a memory data anomaly detection system, comprising:

[0016] processor;

[0017] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the memory data anomaly detection method as described in the first aspect is implemented.

[0018] The third aspect:

[0019] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for detecting memory data anomalies as described in the first aspect is implemented.

[0020] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0021] (1) In the present invention, data anomaly self-detection is performed on the storage device, so that the storage device has an independent monitoring function, and can realize real-time monitoring and management of stored data without relying on an external server and being limited by network conditions. The real-time performance of data anomaly detection is improved, and stored data anomalies can be detected in a timely and accurate manner, thereby improving the reliability of the system equipped with the storage device and reducing the system risk caused by single point failures.

[0022] (2) In the present invention, when the number of data points in a data stream exceeds a preset number, the data stream is simplified with the goal of maintaining the data distribution characteristics. This can reduce the amount of calculation, reduce the calculation complexity, save storage and computing resources, further improve the real-time performance of data anomaly detection, and enable the system to run more efficiently.

[0023] (3) In the present invention, a preliminary screening is first performed based on the data density of each of the data points to determine potential abnormal data points, thereby reducing the amount of calculation for subsequent precise detection. Then, a cluster analysis is performed on the potential abnormal data points to determine the formal abnormal data points from each of the potential abnormal data points, thereby improving the accuracy of abnormality detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 A schematic diagram of a flow chart of a method for detecting abnormal data in a memory provided by an embodiment of the present invention;

[0026] Figure 2 A schematic diagram of the structure of a memory data anomaly detection system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0028] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0029] In the embodiments of the present invention, "image" and "picture" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same. "of", "corresponding, relevant" and "corresponding" can sometimes be used interchangeably. It should be noted that when the difference between them is not emphasized, the meanings they intend to express are the same.

[0030] In the embodiments of the present invention, sometimes the subscripts such as W 1 It may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meanings they express are the same.

[0031] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0032] Reference Manual Attached Figure 1 , showing a flow chart of a memory data anomaly detection method provided by an embodiment of the present invention.

[0033] The embodiment of the present invention provides a memory data anomaly detection method, which is applied to the memory and can be implemented on the memory itself without the help of an external server. By performing data anomaly self-detection on the memory, the memory has an independent monitoring function, and can realize real-time monitoring and management of stored data without relying on an external server, without being limited by network conditions, and can improve the real-time performance of data anomaly detection, can detect storage data anomalies in a timely and accurate manner, can improve the reliability of the system equipped with the memory, and reduce the system risk caused by single point failure.

[0034] The processing flow of the memory data anomaly detection method may include the following steps:

[0035] S1: Get the data stream.

[0036] S2: When the number of data points in the data stream exceeds a preset number, the data stream is simplified with the goal of maintaining the data distribution characteristics.

[0037] Among them, those skilled in the art can set the size of the preset number according to actual conditions, and the present invention does not limit it.

[0038] In the present invention, when the number of data points in the data stream exceeds a preset number, the data stream is simplified with the goal of maintaining the data distribution characteristics, which can reduce the amount of calculation, reduce the calculation complexity, save storage and computing resources, further improve the real-time performance of data anomaly detection, and enable the system to run more efficiently.

[0039] In a possible implementation, S2 specifically includes sub-steps S201 and S202:

[0040] S201: Construct a simplified objective function with the goal of maintaining data distribution characteristics.

[0041] Optionally, the reduction objective function is specifically:

[0042] ,

[0043] in, f represents the simplified objective function, Y represents the data set after reduction. Z Represents the original data set before simplification and the data set after simplification Y is the original dataset Z A subset of a i Represents the original data set Z The i The simplified result of data points is =1, it means to keep the i data points, when =0, it means to remove the i data points, m Represents the original data set Z The total number of data in Indicates i Data points and simplified data set Y The average Euclidean distance between points in the KNN neighborhood in, Indicates i data points and the original dataset Z The average Euclidean distance between points in the KNN neighborhood in .

[0044] Furthermore, KNN (K nearest neighbors) refers to the K data points in a data set that are closest to a data point. i Data points and simplified data set Y When calculating the average Euclidean distance between points in the KNN neighborhood in i The Euclidean distance between the K data points and each data point in the data set Y is taken as the K data points with the smallest Euclidean distance. i data points in the dataset Y The K nearest neighbors in are found, and then the average Euclidean distance between them is calculated.

[0045] It should be noted that by calculating the average Euclidean distance between a data point and its nearest neighbor, we can understand the local density of the data point in the data set. If the average Euclidean distance of a data point is large, it means that it may be in a sparse data area and may be an outlier.

[0046] It should be noted that the purpose of simplification is to retain 3 / 4 of the data in the original data set through simplification while maintaining the data distribution characteristics as much as possible.

[0047] It should be noted that by reducing the difference between the average Euclidean distance accumulations, the distribution characteristics of the original data can be maintained as much as possible, ensuring that the simplified data set can accurately represent the original data set, so that important information will not be lost in subsequent analysis and detection.

[0048] However, in actual applications, in a normal data stream, the data in high-density areas and low-density areas are far less than that in medium-density areas (low-density areas are generally considered to be outliers). In order to extract the data in the medium-density areas to a greater extent, the present invention introduces a distribution term into the simplification objective function.

[0049] Optionally, the reduction objective function is specifically:

[0050] ,

[0051] in, f represents the simplified objective function, Y represents the data set after reduction. Z Represents the original data set before simplification and the data set after simplification Y is the original dataset Z A subset of a i Represents the original data set Z The i The simplified result of data points is =1, it means to keep the i data points, when =0, it means to remove the i data points, m Represents the original data set Z The total number of data in Indicates i Data points and simplified data set Y The average Euclidean distance between points in the KNN neighborhood in, Indicates i data points and the original dataset Z The average Euclidean distance between points in the KNN neighborhood in, e represents a natural constant, l 1 represents the weight coefficient of the distribution difference term, l 2 Represents the weight coefficient of the distribution term.

[0052] Among them, those skilled in the art can set the weight coefficient of the distribution difference term according to the actual situation. l 1 and the weight coefficient of the distribution term l 2 The present invention does not limit the size.

[0053] It should be noted that by introducing the simplification objective function of the distribution term, the data in the intermediate density area can be retained to a greater extent, ensuring that the simplified data set has good representativeness and diversity, improving the accuracy of anomaly detection and the robustness of the system, while optimizing resource utilization, so that the system can perform data anomaly self-detection efficiently and reliably.

[0054] Furthermore, the data that is farther away from the current moment (the longer the received time) has a lower reference value, and the data that is closer to the current moment (the shorter the received time) has a higher reference value. In order to extract data that is closer to the current moment to a greater extent, that is, as time goes by, older data may no longer have reference value. The present invention introduces a received time term into the simplification objective function. By reducing the weight of older data, the proportion of these invalid data in the data set can be reduced.

[0055] Optionally, the reduction objective function is specifically:

[0056] ,

[0057] in, f represents the simplified objective function, Y represents the data set after reduction. Z Represents the original data set before simplification and the data set after simplification Y is the original dataset Z A subset of a i Represents the original data set Z The i The simplified result of data points is =1, it means to keep the i data points, when =0, it means to remove the i data points, m Represents the original data set Z The total number of data in Indicates i Data points and simplified data set Y The average Euclidean distance between points in the KNN neighborhood in, Indicates i data points and the original dataset Z The average Euclidean distance between points in the KNN neighborhood in, e represents a natural constant, t i Indicates i The length of time data points have been received, l 1 represents the weight coefficient of the distribution difference term, l 2 represents the weight coefficient of the distribution term, l 3 Indicates the weight coefficient of the received duration item.

[0058] It should be noted that by introducing the received time term in the reduction objective function, data closer to the current time can be retained first, improving the reference value of the data and the real-time response capability of the system. This can not only more accurately reflect the current system status and improve the accuracy and efficiency of anomaly detection, but also optimize resource utilization, enhance the adaptability and stability of the system, and enable the system to efficiently and reliably perform data anomaly self-detection.

[0059] S202: When the number of data points in the data stream exceeds a preset number, the data stream is simplified by searching for the best subset of the original data set through a genetic algorithm with the goal of minimizing the reduction objective function.

[0060] Among them, the genetic algorithm (GA) is an optimization algorithm that simulates natural selection and genetic mechanisms. It is a search algorithm based on the principle of biological evolution and is used to solve complex optimization and search problems. The genetic algorithm gradually evolves the optimal solution to adapt to the environment by simulating the inheritance, mutation and selection mechanisms in the natural selection process.

[0061] Specifically, whether to perform binary coding on each data simplification may be performed, for example, setting the simplification to 1 and setting the simplification to 0.

[0062] The inverse of the simplified objective function is used as the fitness function of the genetic algorithm.

[0063] Initialize the population Q 1 , the population contains multiple individuals, each of which represents a subset of the original data set;

[0064] For the initial population Q 1 Adopt an elite selection strategy, arrange individuals from large to small according to the objective function value, and replace the 1 / 4 individuals with the worst objective function value with new individuals to form a new population Q 2 .

[0065] It should be noted that the elite selection strategy ensures that individuals with higher objective function values ​​can be retained to the next generation. These high-quality individuals carry better genes and contribute to the evolution and optimization of the overall population.

[0066] For populations Q 2 Perform a crossover operation, from the population Q 2 Randomly select two sets of solution vectors as parents, generate a random number, and compare the random number with the crossover probability p e Compare the size, if the random number is less than the crossover probability pe , then the parent is cross-operated to generate new individuals to form a population Q 3 , new individual y 1 , y 2 The generation method is as follows:

[0067] ,

[0068] in, x 1 , x 2 Represents the parent, rand Represents a random number between 0 and 1.

[0069] It should be noted that through the crossover operation, the genes of the two parents are recombined, and the generated offspring contains some characteristics of the parents. This gene recombination can increase the diversity of the population and prevent the population from converging to the local optimal solution too early.

[0070] For populations Q 3 Perform mutation operation, from the population Q 3 Randomly select a parent x 3 , generate a random number and compare the random number with the mutation probability P m Compare the size, if the random number is smaller than the mutation probability P m , then for the parent x 3 Perform mutation operations to generate new individuals y 3 Replace the original individuals to form a population Q 4 , new individual y 3 The generation method is as follows:

[0071] ,

[0072] in, x max represents the individual with the highest fitness value, rand Represents a random number between 0 and 1. x 3 , x 4 , x 5 , x 6 Indicates different individuals.

[0073] It should be noted that the differential vector is introduced to replace the random perturbation in the traditional genetic algorithm. The differential vector is the difference between several individuals in the current population. This mutation method is more targeted, can better retain useful information, help accelerate the convergence speed, and can more effectively guide the algorithm to search in the direction of the global optimal solution. Therefore, compared with the traditional random mutation operation, it is less likely to fall into the local optimal solution.

[0074] Determine whether the number of iterations has reached the maximum number of iterations. If so, determine the subset represented by the individual with the highest fitness value as the best subset. Otherwise, return to the step of selecting individuals in the population and continue iterating.

[0075] S3: Calculate the data density and unimodal data density of each data point in the simplified data stream.

[0076] Optionally, the data density is specifically:

[0077] ,

[0078] in, Indicates k The data density of the data points is x k Indicates the first k data points, m k Before k The mean of the data points, m k-1 Before k - the mean of 1 data point, X k Before k The average scalar product of the data points, X k-1 Before k - the average scalar product of 1 data point, Represents the modulo operation.

[0079] Optionally, the data points are represented in the form of data feature vectors. For example, a data point is specifically ( b 1 , b 2 , b 3 …), b 1 Indicates the amount of data, b 2 Indicates the data type, b 3Indicates the data timestamp. Of course, it can also include IP address, MAC address, user ID, etc. The present invention does not limit the specific content of the data point.

[0080] Among them, the scalar product reflects the similarity or correlation between two vectors.

[0081] The unimodal data density is specifically:

[0082] ,

[0083] in, Indicates k The unimodal data density of the data points.

[0084] Unimodal data density is a metric that evaluates the density of data points within a single mode or peak region. Unimodal data density is used to identify points in a dataset that are located in a unimodal region, and is particularly useful for detecting outliers that are within a major peak region.

[0085] It should be noted that there are many ways to calculate data density. In order to achieve efficient calculation of stream data, the present invention adopts a recursive method to calculate data density.

[0086] In the present invention, a recursive formula is used to update the mean and the average scalar product, so that the density of each new data point can be efficiently calculated in a data stream environment without storing and recalculating the information of all data points.

[0087] S4: Perform preliminary screening based on the data density of each data point to identify potential abnormal data points.

[0088] In a possible implementation, S4 specifically includes:

[0089] S401: Calculate the mean data density and the mean unimodal data density:

[0090] ,

[0091] in, Before k The mean of the data density of data points, Before k -The mean of the data density of 1 data point, Before k The mean of the unimodal data density of data points, Before k - Mean of the unimodal data density with 1 data point.

[0092] It should be noted that the data density mean and the unimodal data density mean are efficiently calculated through the recursive formula, which reduces the amount of calculation and storage requirements, so that preliminary screening can be performed quickly in a large-scale data stream environment.

[0093] S402: When there is a data point satisfying > or > , the data point is identified as a potential abnormal data point.

[0094] In the present invention, data density reflects the position of a data point in the overall distribution, while unimodal data density reflects the situation of a data point in the local peak area. Calculating data density and unimodal data density simultaneously and using these two densities as screening criteria can more comprehensively identify potential abnormal data points.

[0095] S5: Perform cluster analysis on potential abnormal data points.

[0096] Optionally, a K-Means algorithm, a KNN algorithm, etc. may be used for cluster analysis. The present invention provides a new cluster analysis method:

[0097] In a possible implementation, S5 specifically includes sub-steps S501 to S504:

[0098] S501: Obtain current potential abnormal data points x j , j Represents the number of potentially anomalous data points that have been identified.

[0099] S502: Determine whether the current potential abnormal data point meets the first preset condition. If yes, take the current potential abnormal data point as the center of the new cluster. Otherwise, proceed to the next step.

[0100] Optionally, the first preset condition is specifically:

[0101] ,

[0102] or, ,

[0103] in, Represents the data density of the current potential abnormal data point, Indicates n The data density of the cluster center, max means taking the maximum value, and min means taking the minimum value. N represents the total number of clusters;

[0104] The data density calculation method is as follows:

[0105] ,

[0106] in, u represents the independent variable, u = x j or c n , X PA represents the average scalar product of the identified potential anomaly data points, m PA represents the mean of the identified potential abnormal data points, Represents modular operation;

[0107] S503: Determine whether the current potential abnormal data point meets the second preset condition; if so, use the current potential abnormal data point as the center of the new cluster; otherwise, classify the current potential abnormal data point into the cluster where the nearest cluster center is located, and update the cluster center and cluster support.

[0108] Optionally, the second preset condition is specifically:

[0109] ,

[0110] in, x j Indicates j Potentially abnormal data points, c n Indicates n cluster centers, min means taking the minimum value, N represents the total number of clusters, t PA Indicates the distance threshold.

[0111] Optionally, the distance threshold is specifically:

[0112] ,

[0113] in, X PA represents the average scalar product of the identified potential anomaly data points, m PA Represents the mean of the identified potential anomalous data points.

[0114] It should be noted that the new cluster center can be more accurately identified and determined through the two-step screening of the first preset condition and the second preset condition. The first preset condition is mainly based on data density, and the second preset condition is based on the distance threshold. The combination of the two can more comprehensively consider the distribution and abnormal characteristics of data points.

[0115] Optionally, the cluster support updating method is specifically as follows:

[0116] ,

[0117] in, Indicates the updated n The support of a cluster, s n Indicates the number before the update n The support of a cluster.

[0118] Optionally, the cluster center update method is specifically as follows:

[0119] ,

[0120] in, Indicates the updated n Cluster centers, c n Indicates the number before the update n Cluster centers, x j Indicates j Potentially abnormal data points.

[0121] It should be noted that by recursively updating the cluster center and cluster support, the cluster structure can be dynamically adjusted to adapt to changes in the data stream. This ensures that when the data characteristics change, the cluster can still accurately reflect the current data distribution.

[0122] S6: According to the cluster analysis results, determine the formal abnormal data points from various potential abnormal data points.

[0123] In a possible implementation, S6 specifically includes: determining the potential abnormal data points in the clusters whose cluster support is less than the preset support as formal abnormal data points.

[0124] Among them, those skilled in the art can set the size of the preset support according to actual conditions, and the present invention does not limit it.

[0125] It should be noted that low cluster support usually means that the cluster contains fewer samples, and these samples may be significantly different from other samples. Identifying data points in these clusters as formal outliers can more accurately identify true outlier data points.

[0126] In the present invention, firstly, a preliminary screening is performed according to the data density of each data point to determine the potential abnormal data points, thereby reducing the amount of calculation for subsequent precise detection. Then, a cluster analysis is performed on the potential abnormal data points to determine the formal abnormal data points from each potential abnormal data point, thereby improving the accuracy of abnormality detection.

[0127] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0128] (1) In the present invention, data anomaly self-detection is performed on the storage device, so that the storage device has an independent monitoring function, and can realize real-time monitoring and management of stored data without relying on an external server and being limited by network conditions. The real-time performance of data anomaly detection is improved, and stored data anomalies can be detected in a timely and accurate manner, thereby improving the reliability of the system equipped with the storage device and reducing the system risk caused by single point failures.

[0129] (2) In the present invention, when the number of data points in a data stream exceeds a preset number, the data stream is simplified with the goal of maintaining the data distribution characteristics. This can reduce the amount of calculation, reduce the calculation complexity, save storage and computing resources, further improve the real-time performance of data anomaly detection, and enable the system to run more efficiently.

[0130] (3) In the present invention, a preliminary screening is first performed based on the data density of each data point to determine the potential abnormal data points, thereby reducing the amount of calculation for subsequent precise detection. Then, a cluster analysis is performed on the potential abnormal data points to determine the formal abnormal data points from each potential abnormal data point, thereby improving the accuracy of abnormality detection.

[0131] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a memory data anomaly detection system provided by the present invention.

[0132] The present invention further provides a memory data anomaly detection system 20, which is applied to the above-mentioned memory data anomaly detection method, comprising:

[0133] Processor 201;

[0134] The memory 202 stores computer-readable instructions, and when the computer-readable instructions are executed by the processor 201, the memory data anomaly detection method as described in the method embodiment is implemented.

[0135] The memory data anomaly detection system 20 provided by the present invention can execute the above-mentioned memory data anomaly detection method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0136] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0137] (1) In the present invention, data anomaly self-detection is performed on the storage device, so that the storage device has an independent monitoring function, and can realize real-time monitoring and management of stored data without relying on an external server and being limited by network conditions. The real-time performance of data anomaly detection is improved, and stored data anomalies can be detected in a timely and accurate manner, thereby improving the reliability of the system equipped with the storage device and reducing the system risk caused by single point failures.

[0138] (2) In the present invention, when the number of data points in a data stream exceeds a preset number, the data stream is simplified with the goal of maintaining the data distribution characteristics. This can reduce the amount of calculation, reduce the calculation complexity, save storage and computing resources, further improve the real-time performance of data anomaly detection, and enable the system to run more efficiently.

[0139] (3) In the present invention, a preliminary screening is first performed based on the data density of each of the data points to determine potential abnormal data points, thereby reducing the amount of calculation for subsequent precise detection. Then, a cluster analysis is performed on the potential abnormal data points to determine the formal abnormal data points from each of the potential abnormal data points, thereby improving the accuracy of abnormality detection.

[0140] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0141] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0142] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention 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, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0143] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0144] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0145] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0146] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0148] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0149] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0150] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0151] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0152] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the memory data anomaly detection method as described in the method embodiment.

[0153] A computer-readable storage medium provided by the present invention can implement the steps and effects of the memory data anomaly detection method of the above method embodiment. To avoid repetition, the present invention will not go into details.

[0154] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0155] (1) In the present invention, data anomaly self-detection is performed on the storage device, so that the storage device has an independent monitoring function, and can realize real-time monitoring and management of stored data without relying on an external server and being limited by network conditions. The real-time performance of data anomaly detection is improved, and stored data anomalies can be detected in a timely and accurate manner, thereby improving the reliability of the system equipped with the storage device and reducing the system risk caused by single point failures.

[0156] (2) In the present invention, when the number of data points in a data stream exceeds a preset number, the data stream is simplified with the goal of maintaining the data distribution characteristics. This can reduce the amount of calculation, reduce the calculation complexity, save storage and computing resources, further improve the real-time performance of data anomaly detection, and enable the system to run more efficiently.

[0157] (3) In the present invention, a preliminary screening is first performed based on the data density of each of the data points to determine potential abnormal data points, thereby reducing the amount of calculation for subsequent precise detection. Then, a cluster analysis is performed on the potential abnormal data points to determine the formal abnormal data points from each of the potential abnormal data points, thereby improving the accuracy of abnormality detection.

[0158] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0159] There are a few points to note:

[0160] (1) The drawings of the embodiments of the present invention only involve structures related to the embodiments of the present invention. Other structures may refer to conventional designs.

[0161] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0162] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0163] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for detecting memory data anomaly, characterized in that: Applied to memory, including: S1: Get data stream; S2: When the number of data points in the data stream exceeds a preset number, simplifying the data stream with the goal of maintaining data distribution characteristics; S3: Calculate the data density and unimodal data density of each data point in the simplified data stream; S4: performing preliminary screening according to the data density of each of the data points to determine potential abnormal data points; S5: Cluster analysis of potential abnormal data points; S6: According to the cluster analysis results, determine the formal abnormal data points from various potential abnormal data points; Wherein, the S2 specifically includes: S201: construct a simplified objective function with the goal of maintaining data distribution characteristics; S202: When the number of data points in the data stream exceeds a preset number, the data stream is simplified by searching for the best subset of the original data set through a genetic algorithm with the goal of minimizing the reduction objective function; The simplified objective function is specifically: , in, represents the simplified objective function, X represents the data set after reduction. Z Represents the original data set before simplification and the data set after simplification X is the original dataset Z A subset of Represents the original data set Z The i The simplified result of data points is =1, it means to keep the i data points, when =0, it means to remove the i data points, Represents the original data set Z The total number of data in Indicates i Data points and the reduced dataset X The average Euclidean distance between points in the KNN neighborhood in, Indicates i data points and the original dataset Z The average Euclidean distance between points in the KNN neighborhood in, e represents a natural constant, Indicates i The length of time data points have been received, λ 1 represents the weight coefficient of the distribution difference term, λ 2 represents the weight coefficient of the distribution item, λ 3 represents the weight coefficient of the received duration item.

2. The memory data anomaly detection method according to claim 1, characterized in that: The data density is specifically: , in, Indicates k The data density of the data points is Indicates the first k data points, Before k The mean of the data points, Before k - the mean of 1 data point, Before k The average scalar product of the data points, Before k - the average scalar product of 1 data point, Represents modular operation; The unimodal data density is specifically: , in, Indicates k The unimodal data density of the data points.

3. The memory data anomaly detection method according to claim 2, characterized in that: The S4 specifically includes: S401: Calculate the mean data density and the mean unimodal data density: , in, Before k The mean of the data density of data points, Before k -The mean of the data density of 1 data point, Before k The mean of the unimodal data density of data points, Before k - Mean of the unimodal data density of 1 data point; S402: When there is a data point satisfying > or > , the data point is identified as a potential abnormal data point.

4. The memory data anomaly detection method according to claim 1, characterized in that: The S5 specifically includes: S501: Obtain current potential abnormal data points , j Indicates the number of potentially anomalous data points that have been identified; S502: Determine whether the current potential abnormal data point meets the first preset condition; if so, take the current potential abnormal data point as the center of the new cluster; otherwise, proceed to the next step; The first preset condition is specifically: , or, , in, Represents the data density of the current potential abnormal data point, Indicates n The data density of the cluster center, max means taking the maximum value, and min means taking the minimum value. N represents the total number of clusters; The data density calculation method is as follows: , in, u represents the independent variable, u = or , represents the average scalar product of the identified potential anomaly data points, represents the mean of the identified potential abnormal data points, Represents modular operation; S503: Determine whether the current potential abnormal data point meets the second preset condition; if so, use the current potential abnormal data point as the center of the new cluster; otherwise, classify the current potential abnormal data point into the cluster where the nearest cluster center is located, and update the cluster center and cluster support; The second preset condition is specifically: , in, Indicates j Potentially abnormal data points, Indicates n cluster centers, min means taking the minimum value, N represents the total number of clusters, Indicates the distance threshold; The distance threshold is specifically: , in, represents the average scalar product of the identified potential anomaly data points, represents the mean of the identified potential anomalous data points; The cluster support update method is as follows: , in, Indicates the updated n The support of a cluster, Indicates the number before the update n The support of a cluster; The cluster center update method is as follows: , in, Indicates the updated n Cluster centers, Indicates the number before the update n Cluster centers, Indicates j Potentially abnormal data points.

5. The memory data anomaly detection method according to claim 4, characterized in that: The S6 is specifically: Potential abnormal data points in clusters whose cluster support is less than a preset support are determined as formal abnormal data points.

6. A memory data anomaly detection system, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the memory data anomaly detection method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Interactive decision tree construction method based on attribute reduction

    CN108416395A

  • Network traffic anomaly detection method and device

    CN109067725A

  • Abnormal value elimination method for lake water level long-time sequence monitoring data

    CN114817228A

  • Data analysis method based on big data

    CN117708636A

  • Attack bypass blocking method and system based on network abnormal behavior analysis

    CN118199971A