Abnormality detection method and device, equipment and storage medium
By generating execution parameter sets and using a Gaussian mixture model to determine whether cache devices are abnormal, the problem of low accuracy in memory anomaly detection is solved, and higher detection accuracy is achieved.
Patent Information
- Application Number
- CN202411061386.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2026-02-03
AI Technical Summary
The accuracy of memory anomaly detection in existing technologies is relatively low.
By receiving the test factor type, generating the execution parameter group, executing the test code, identifying invalid test factor types, modifying the parameter group, and using a Gaussian mixture model to determine whether the cache device is abnormal.
It improves the accuracy of memory anomaly detection, realizes the automatic generation and correction of test parameter sets, and increases the accuracy of detection.
Smart Images

Figure CN121459904A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cache technology, and in particular to an anomaly detection method, apparatus, device and storage medium. Background Technology
[0002] With the continuous development of information technology, a large number of tasks have now been digitized, and data computation and information storage are mainly performed in computers. The reliability of memory is one of the keys to accurate computation, but memory can suffer from soft failures.
[0003] Currently, the existing technology for determining whether a memory has failed typically involves detecting the number of bit flips.
[0004] However, the inventors have discovered that the existing technology has at least the following technical problems: the accuracy of current memory anomaly detection is low. Summary of the Invention
[0005] This application provides an anomaly detection method, apparatus, device, and storage medium to solve the problem of low accuracy in detecting memory anomalies.
[0006] In a first aspect, this application provides an anomaly detection method, comprising: receiving a test factor type input by a user; generating an execution parameter group based on the test factor type; executing test code using the execution parameter group to obtain an error occurrence feature value corresponding to the execution parameter group; determining an invalid test factor type in the execution parameter group using the error occurrence feature value and the execution parameter group; modifying the test factor of the invalid test factor type based on the error occurrence feature value to obtain a usage parameter group; executing test code using the usage parameter group to obtain a new error occurrence feature value corresponding to the usage parameter group and the cache line; and determining whether the cache device is abnormal based on the new error occurrence feature value and a preset Gaussian mixture model.
[0007] In one possible implementation, generating an execution parameter group based on the test factor type includes: generating test factors corresponding to the test factor type; generating a parameter group using the test factors; identifying conflicting parameter groups in the parameter group; modifying the test factors in the conflicting parameter group using preset adjustment rules to obtain a new parameter group corresponding to the conflicting parameter group; and determining the parameter group other than the conflicting parameter group and the new parameter group as the execution parameter group.
[0008] In one possible implementation, determining the conflicting parameter group in the parameter group includes: if the target parameter group contains a basic test factor in a preset constraint diagram and a conflicting factor corresponding to the basic test factor, then the target parameter group is determined as a conflicting parameter group; accordingly, the test factors in the conflicting parameter group are modified using preset adjustment rules to obtain a new parameter group corresponding to the conflicting parameter group, including: finding the replacement factor corresponding to the conflicting factor in the preset constraint diagram; replacing the conflicting factor with the replacement factor until the target parameter group does not simultaneously contain the basic test factor and the corresponding conflicting factor in the preset constraint diagram, thus obtaining a new parameter group.
[0009] In one possible implementation, the invalid test factor type in the execution parameter group is determined by using the error occurrence feature value and the execution parameter group. This includes: using the error occurrence feature value and the test factors in the execution parameter group, calculating the N types of correlation between each type of test factor and the error occurrence feature value; ranking the various types of correlation of each type of test factor; calculating the average value of the various types of correlation ranking corresponding to the target test factor type; if the difference between any type of correlation ranking of the target test factor type and the average value is greater than a preset value, or the average value is less than a preset ranking threshold, then the target execution parameter group is determined as an invalid test factor type.
[0010] In one possible implementation, the error occurrence characteristic value includes the error occurrence frequency or the single execution time; accordingly, based on the error occurrence characteristic value, the test factors of the invalid test factor type are modified to obtain the usage parameter group, including: replacing the remaining test factors in the invalid test factor type with the M test factors with the highest error occurrence frequency in the invalid test factor type to obtain the usage parameter group; or, replacing the remaining test factors in the invalid test factor type with the M test factors with the shortest single execution time in the invalid test factor type to obtain the usage parameter group.
[0011] In one possible implementation, the new error occurrence characteristic value includes a new error occurrence frequency or a new single execution time; accordingly, based on the new error occurrence characteristic value and a preset Gaussian mixture model, it is determined whether the cache device is abnormal, including: if the new error occurrence frequency is greater than or equal to the frequency-weighted sum of the mean and standard deviation of the largest sub-model in the Gaussian mixture model, then the cache device is determined to be abnormal; or, if the new single execution time is less than or equal to the time-weighted sum of the mean and standard deviation of the smallest sub-model in the Gaussian mixture model, then the cache device is determined to be abnormal.
[0012] In one possible implementation, after determining whether the cache device is abnormal based on the new error occurrence characteristic value and the preset Gaussian mixture model, the method further includes: if the new error occurrence characteristic value is greater than or equal to the mean of the smallest sub-model in the Gaussian mixture model and less than or equal to the mean of the largest sub-model in the Gaussian mixture model, then the Gaussian mixture model is updated using the corresponding usage parameter set, the new error occurrence characteristic value, and the Gaussian mixture model; if the new error occurrence characteristic value is less than the mean of the smallest sub-model in the Gaussian mixture model and greater than the first weighted sum of the mean and standard deviation of the smallest sub-model, or the new error occurrence characteristic value is greater than the mean of the largest sub-model in the Gaussian mixture model and less than the second weighted sum of the mean and standard deviation of the largest sub-model, then the new error occurrence characteristic value and the corresponding usage parameter set are stored until the number of stored new error occurrence characteristic values and usage parameter sets exceeds a preset threshold, and the Gaussian mixture model is updated using the new error occurrence characteristic value, the usage parameter set, and the Gaussian mixture model.
[0013] Secondly, this application provides an anomaly detection device, comprising: a type receiving module for receiving test factor types input by a user; a parameter group generation module for generating an execution parameter group based on the test factor types; a feature value acquisition module for executing test code using the execution parameter group to obtain error occurrence feature values corresponding to the execution parameter group; a type determination module for determining invalid test factor types in the execution parameter group using the error occurrence feature values and the execution parameter group; a parameter group modification module for modifying test factors of invalid test factor types based on the error occurrence feature values to obtain a usage parameter group; a feature value acquisition module for executing test code using the usage parameter group to obtain new error occurrence feature values corresponding to the usage parameter group and cache lines; and an anomaly determination module for determining whether a cache device is abnormal based on the new error occurrence feature values and a preset Gaussian mixture model.
[0014] Thirdly, this application provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the anomaly detection method as described in the first aspect.
[0015] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the anomaly detection method as described in the first aspect.
[0016] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the anomaly detection method as described in the first aspect.
[0017] The anomaly detection method, apparatus, device, and storage medium provided in this application select test factors by test factor type and combine them to obtain an execution parameter group. Test code is executed using the execution parameter group to obtain error occurrence characteristic values. The test factors in the parameter group are modified using the error occurrence characteristic values to obtain a usage parameter group. Test code is then executed using the usage parameter group to obtain new error occurrence characteristic values. These new error occurrence characteristic values and a Gaussian mixture model are used to determine whether the cache device is abnormal. This achieves automatic generation and correction of the parameter group used for testing, and increases the accuracy of anomaly detection by using error occurrence characteristic values combined with a Gaussian mixture model to determine whether the cache device is abnormal. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of the anomaly detection method provided in the embodiments of this application;
[0020] Figure 2 A flowchart illustrating the anomaly detection method provided in this application embodiment;
[0021] Figure 3 This is a schematic diagram of a preset constraint diagram provided in an embodiment of this application;
[0022] Figure 4 This is a schematic diagram of the overall anomaly detection process provided in the embodiments of this application;
[0023] Figure 5 This is a schematic diagram of the anomaly detection device provided in the embodiments of this application;
[0024] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0025] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0026] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0027] First, let me explain the terms used in this application:
[0028] Soft failures refer to sudden jumps in cache cells during software execution. Soft failures typically do not damage the device; the cache continues to function normally after power-down and power-back. The main impacts of soft failures are data corruption, program errors, system crashes, or other unexpected behaviors during software operation. The most prominent manifestation of a soft failure is a single-event upset (SEU), where a single event causes a 0 to become a 1, or a 1 to become a 0, in a memory cell. With advancements in device technology, cell density is continuously increasing, making devices increasingly sensitive to soft failures. External environmental factors, such as latitude (magnetic field) and temperature (hot carriers), can also exacerbate soft failure triggering. The timing of soft failure triggering is random and unpredictable; even the same code at the same execution time may not trigger a soft failure again. Overall, most cells are in good condition, and the time for soft failure triggering generally exceeds the device's lifespan; only a small number of defective cells are sensitive to soft failures.
[0029] With the rapid development of information technology, numerous tasks have undergone comprehensive digital transformation, and the accurate calculation and efficient storage of data increasingly rely on computer systems. In this process, the reliability of memory, as one of the core elements ensuring computational accuracy, is of paramount importance. However, a potential challenge facing memory is soft failure, which can affect the integrity and accuracy of data.
[0030] Current mainstream technologies for identifying memory failures primarily focus on monitoring the number of bit flips, using this as a basis for assessing the health of the memory and identifying any potential failure risks. However, this approach has relatively low accuracy.
[0031] To address the aforementioned technical problems, the inventors propose the following technical concept: By receiving test factor types, generating corresponding test factors, assembling test factors into execution parameter groups, executing test code using the execution parameter groups, obtaining error occurrence characteristic values, identifying invalid parameter groups in the execution parameter groups based on the error occurrence characteristic values, modifying them to obtain usable parameter groups, executing test code again using the usable parameter groups, obtaining new error occurrence characteristic values corresponding to cache lines, and using the new error occurrence characteristic values and a preset Gaussian mixture model to determine whether the cache lines are abnormal.
[0032] Figure 1 This is a schematic diagram illustrating an application scenario of the anomaly detection method provided in the embodiments of this application. For example... Figure 1 In this scenario, the following is included: terminal device 101.
[0033] In the specific implementation process, the terminal device 101 may include computers, servers, tablets, mobile phones, PDAs (personal digital assistants), and laptops, etc., and their hardware includes memory.
[0034] Terminal device 101 is used to execute the contents of this scheme and determine whether the cache line of its own memory is abnormal.
[0035] It is understood that the scenarios illustrated in the embodiments of this application do not constitute a specific limitation on the anomaly detection method. In other feasible embodiments of this application, the above scenarios may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components, which can be determined according to the actual application scenario and are not limited here. Figure 1 The scenario shown can be implemented by hardware, software, or a combination of both.
[0036] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0037] Figure 2 This is a flowchart illustrating the anomaly detection method provided in an embodiment of this application. The execution entity of this embodiment may be... Figure 1 Terminal device 101 in the middle. For example... Figure 2 As shown, the method includes:
[0038] S201: The type of test factor to receive user input.
[0039] In this step, the test factor type can be obtained by receiving user input strings, voice commands, etc.
[0040] S202: Generate the execution parameter group based on the test factor type.
[0041] This step may include reading the execution parameters corresponding to the test factor type from a preset parameter table and combining the execution parameters into a parameter group; or it may include randomly selecting test factors from the parameter range corresponding to the test factor type from a preset parameter range table to obtain the execution parameter group.
[0042] The preset parameter range table is shown in Table 1.
[0043] Table 1. Parameter Range Diagram
[0044] Test Factor Type Parameter range A True B {3,8,10} C False D [1,10000] E 4 F (3,5)
[0045] The parameter range section shows different types of parameter ranges, including: Boolean input: Only True and False are available. True indicates all options are selected, and False indicates the default value is selected (e.g., test factor type A, C). Single-value input: Only one numeric value or string is used, indicating that only that value is used (e.g., test factor type E). Discrete input: Represented by curly braces, indicating that the option value within the curly braces can be used (e.g., test factor type B). Range input: Represented by square brackets, indicating that the exponent between two numeric values is used (e.g., test factor type D). Exclusionary input: Represented by parentheses, indicating that the option value within the parentheses is not used, and the others can be used (e.g., test factor type F).
[0046] In one possible implementation, special exceptions may occur during input parameter parsing, and corresponding exception handling measures will be taken for these exceptions: Discrete input contains values outside the range: use the default value. Discrete input contains duplicate values: ignore the value. Range input's range is completely outside the maximum and minimum values: use the maximum and minimum values as the range. Range input's range exceeds the boundary: ignore the portion exceeding the boundary. Excluded input excludes all option values: use the default value. Excluded input contains values outside the range: ignore the value. Single-value input is outside the maximum and minimum values: use the default value. Input parameters are not explicitly given as options: use True or the default value.
[0047] S203: Execute the test code using the execution parameter set and obtain the error occurrence characteristic value corresponding to the execution parameter set.
[0048] In this step, the test code can be pre-entered or pre-selected by the staff, and can include at least one of the following two types of operations: serialization read / write and arithmetic.
[0049] Serialization read and write operations consist of two basic operations: a read operation R(i)->V+=A[i] and a write operation W(i, C)->A[i]=C, where V represents a temporary variable, R represents the read operation, W represents the write operation, C represents a constant, and i represents the address index being accessed. A serialization operation can be generated by permuting and combining these two basic operations. S {R(i),W(i,C),R(i),...,W(i+1,C)} N The curly braces contain multiple read and write operations. A serialization operation can access multiple indices, such as index i and index i+1. S represents the step size. After the serialization operation is completed, the index i of the next serialization operation will become i+S. N represents the number of times the current serialization operation is repeated. When the number of repetitions N is reached, the index within the current serialization operation becomes i+S.
[0050] The execution code within the computation module is categorized into single-address, dual-address, and triple-address operations, providing the five types of operations listed above. Single-address operations include V+=A[i], A[i]=C; dual-address operations include A[i]=B[i], V=A[i]+B[i]; triple-address operations include A[i]=B[i]+C[i], where V represents a temporary variable and C represents a constant. These operations incorporate some CPU commands to simulate CPU behavior when accessing memory. These five operations are immutable and cannot be changed by the user; however, the user can determine which computation operations are excluded from the test execution through initialization configuration. The execution of computation operations is alternating, meaning each operation has a set execution count; once the count is reached, the test item switches to the next computation operation.
[0051] The test code reads the configuration file during initialization. If no serialization read / write operation is configured in the configuration file, the operation will be used by default; otherwise, the serialization operation configured in the configuration will be executed.
[0052] S204: Use the error occurrence characteristic value and the execution parameter group to determine the invalid test factor type in the execution parameter group.
[0053] This step may include calculating the error occurrence characteristic value and the correlation of test factors in the execution parameter group, and identifying test factor types with low correlation as invalid test factor types.
[0054] S205: Based on the error occurrence characteristic value, modify the test factor of the invalid test factor type to obtain the parameter group to be used.
[0055] In this step, invalid test factors of the same type that belong to the invalid test factor type and whose error occurrence characteristic value meets the preset requirements are used to replace other invalid test factors of the same type, thereby completing the update of test factors in the execution parameter group and obtaining the usage parameter group.
[0056] S206: Using the parameter set, execute the test code to obtain the new error occurrence characteristic value corresponding to the parameter set and the cache line.
[0057] This step is similar to step S203 above, and will not be repeated here.
[0058] S207: Determine whether the cache device is abnormal based on the new error occurrence characteristic value and the preset Gaussian mixture model.
[0059] This step may include determining whether the cache device is abnormal based on the position of the new error occurrence feature value in the preset Gaussian mixture model (whether the distance from the average value of the sub-models in the Gaussian mixture model is greater than a preset length).
[0060] As can be seen from the description of the above embodiments, the embodiments of this application select test factors by test factor type and combine them to obtain execution parameter group, execute test code using execution parameter group to obtain error occurrence feature value, modify the test factors in parameter group using error occurrence feature value to obtain usage parameter group, execute test code using usage parameter group to obtain new error occurrence feature value, use new error occurrence feature value and Gaussian mixture model to determine whether cache device is abnormal, realize automatic generation of parameter group used for test, and correct the parameter group, use error occurrence feature value combined with Gaussian mixture model to determine whether cache device is abnormal, and increase the accuracy of anomaly detection.
[0061] In one possible implementation, after step S207 above, if a cache line is determined to be abnormal, an alarm message corresponding to the cache device is output.
[0062] In one possible implementation, step S202 above, generating an execution parameter group based on the test factor type, includes:
[0063] S2021: Generate test factors corresponding to the test factor type.
[0064] This step is similar to step S202 above, and will not be repeated here.
[0065] S2022: Parameter sets are generated using test factors.
[0066] This step may include concatenating test factors into a single field; it may also include concatenating test factors in a preset order corresponding to the test factor type to obtain a parameter group; or it may include writing test factors into a file at the position corresponding to the test factor type to obtain a parameter group.
[0067] S2023: Identify conflicting parameter groups in the parameter group.
[0068] This step may include finding the test factor type corresponding to each test factor in the parameter group, searching a preset constraint table, and determining whether the test factors conflict with each other in the parameter group.
[0069] The constraint table is shown in Table 2.
[0070] Table 2 Constraint Diagram
[0071]
[0072] A value of -1 within a constraint indicates no constraint. If the value is not -1, the constraint will be given in the form X / Y->Z. Here, X and Y represent the two constraint option values, and Z represents the new option value to be modified to. X has higher priority than Y; that is, if both X and Y option values exist, the value of Y should be modified first.
[0073] Based on priority, the constraints in the factor table can be resolved sequentially. For example, in option 2, if the parameter group contains three parameters {B1, C1, D1}, then according to priority, the constraints of B1 and C1 are processed first, changing C1 to C3. Since C3 has no constraint on D1, the process is complete. If the parameter group contains three parameters {B2, C1, D1}, then B2 and C1 have no constraint, and only the constraints of C1 and D1 need to be processed. In option 3, when both C1 and D1 appear, D1 is processed first, so D1 is changed to D2.
[0074] The option values are constrained to generate a test item table, which is used for subsequent execution units.
[0075] S2024: Using preset adjustment rules, modify the test factors in the conflict parameter group to obtain a new parameter group corresponding to the conflict parameter group.
[0076] In this step, the adjustment rules can also be modified by changing the test factors in the constraint table in step S2023 above to obtain a new set of parameters. The replacement process is detailed in step S2023 above and will not be repeated here.
[0077] S2025: Determine the parameter groups other than the conflicting parameter groups in the parameter group, as well as the new parameter group, as the execution parameter group.
[0078] In this step, for example, if the parameter groups include parameter groups A, B, C, D, and E, and the conflicting parameter groups are A, B, and D, after executing step S2024, new parameter groups a, b, and d are obtained. These new parameter groups a, b, and d, along with parameter groups C and E, are determined as the execution parameter groups. Alternatively, if there are 10 parameter groups before executing step S2024, and 4 of them are conflicting parameter groups, then the 4 new parameter groups obtained after executing step S2024, along with the remaining 6 unmodified parameter groups, are determined as the execution parameter groups.
[0079] As can be seen from the description of the above embodiments, the embodiments of this application generate test factors and form parameter groups, determine the conflicting parameter groups in the parameter groups, and adjust the conflicting parameter groups using adjustment rules to obtain the execution parameter group. This achieves the goal of avoiding conflicts in the test factors in the parameter groups, ensuring the normal operation of the test code, and avoiding detection errors.
[0080] In one possible implementation, step S2023 above, determining the conflicting parameter groups in the parameter group, includes:
[0081] S231: If the target parameter group contains the basic test factors in the preset constraint diagram and the conflict factors corresponding to the basic test factors, then the target parameter group is determined as the conflict parameter group.
[0082] This step may include determining the test factor with higher priority in the preset constraint graph as the basic test factor if the test factor in the target parameter group has two adjacent test factors in the preset constraint graph, and determining the test factors adjacent to the basic test factor as conflict factors.
[0083] The preset constraint diagram can be pre-set by the staff.
[0084] Figure 3 This is a schematic diagram of a preset constraint provided for an embodiment of this application. For example... Figure 3 As shown, the constraint graph is created starting from the root node, and there is one and only one root node in the graph. The root node is only used to mark the starting point and has no practical meaning. Constraints are constructed starting from the root node. A constraint has three components: a starting point, an ending point, and weighted edges. Each of the three components stores the option value for a certain choice. The starting point value and the weighted edge weight value constitute the constraint, and the ending point value is the result that the weight value needs to be transformed into. For example... Figure 3 As shown, B1 is the starting point relative to C1, and C1 is the ending point relative to B1. The two points are connected by an edge with weight C2. B1 and C2 constitute a constraint, and C2 needs to be converted to C1. The purpose of constructing a constraint graph is that in reality, there may be multiple pairs of constraints in a parameter group, so it is necessary to consider the order in which constraints are processed. In this embodiment, constraints are processed in order of their distance from the starting point to the root node, with the shorter the distance, the higher the priority of the starting constraint.
[0085] Accordingly, in step S2024 above, the test factors in the conflict parameter group are modified using preset adjustment rules to obtain a new parameter group corresponding to the conflict parameter group, including:
[0086] S241: Find the replacement factor corresponding to the conflict factor in the preset constraint diagram.
[0087] In this step, conflict factors are represented by edges in the constraint graph, and the factors connected by the edges in the direction away from the root node are determined as replacement factors.
[0088] For example, Figure 3 In this context, D1 is the substitution factor for D2, and C1 is the substitution factor for C2.
[0089] S242: Replace conflicting factors with replacement factors until the target parameter group does not simultaneously contain the basic test factors and corresponding conflicting factors in the preset constraint diagram, thus obtaining a new parameter group.
[0090] This step may include deleting conflicting factors from the parameter group and writing replacement factors into the corresponding positions in the parameter group to obtain a new parameter group.
[0091] As can be seen from the description of the above embodiments, the embodiments of this application, when the parameter group includes basic test factors and conflict factors in the preset diagram, replace the conflict factors with replacement factors in the constraint diagram to update the parameter group, thereby ensuring the stable and correct operation of the test program and ensuring the accuracy of the test.
[0092] In one possible implementation, during the constraint graph creation process, node distances can be set according to performance-priority constraints. Before formal testing, all test items can be pre-tested. A parameter is selected, and with all other parameters identical, the ratio of the maximum to minimum test time for different parameter values is calculated. The larger the ratio, the more critical the parameter's impact on performance, and the closer it is to the root node in the constraint graph. After determining the node distances, it can be confirmed whether there are constraints between parameter values within a node and other parameter values. If constraints exist, the transformed parameter values are further confirmed, and the current node is connected to the node containing the transformed parameter value. The edge weight used for the connection is the value of the constraint with the current node. This constructs the constraint graph. After construction, the distance of a node from the root node in the graph may not be a single value, for example... Figure 3 The distances from E1 to the root node are 2 and 3 (self-loops are ignored when calculating the distance). This scheme stipulates that the maximum distance is selected as the priority criterion.
[0093] Constraint processing is performed iteratively; after one constraint processing step is completed, old constraints may be eliminated or new constraints may be generated. For example... Figure 3 As shown, if a parameter group contains three parameters B1, C2, and D2, the constraints of B1 and C2 are processed first according to priority. After processing, C2 becomes C1, which will further trigger the constraints of C1 and D2. Therefore, D2 needs to be processed again to change D2 to D1.
[0094] Intra-linear loops in the graph represent the retained values of an option that have been filtered out after option-error module correlation analysis. During constraint processing, the constraint graph is scanned first, and nodes containing self-loops are selected and their values are replaced with the values of the remaining options.
[0095] In one possible implementation, apart from self-loops, there are no cycles greater than 1 in the constraint graph. If a cycle exists, processing the constraints on that cycle will inevitably lead to an infinite loop. In this embodiment, the SCC (Strongly Connected Component) traversal method can be used to check for the existence of cycles in the constraint graph.
[0096] In one possible implementation, step S204 above, which uses error occurrence characteristic values to determine invalid parameter groups in the execution parameter group, includes:
[0097] S2041: Using error occurrence characteristic values and execution parameter groups, calculate the N-type correlation between various test factors and error occurrence characteristic values.
[0098] This step may include using the values of the same type of test factors in each execution parameter group, as well as the error occurrence characteristic values corresponding to the execution parameter group, to calculate the correlation. The types of correlation may include at least one of Pearson correlation coefficient, Spearman correlation coefficient, random forest correlation coefficient, etc.
[0099] Where N is a positive integer. Error occurrence characteristics can include single execution time or error occurrence frequency.
[0100] S2042: Rank the various correlations of different test factors.
[0101] In this step, the test factors are ranked according to their correlation values, based on the type of correlation, to obtain the ranking of each set of execution parameters under each type of correlation.
[0102] For example, there are currently 5 execution parameter groups, and each execution parameter group contains 4 types of test factors. There are three types of correlation between the test factors and the error occurrence characteristic value. In each execution parameter group, under the type A correlation, these 4 types of test factors have a ranking, and the same applies under the type B correlation and type C correlation.
[0103] S2043: Calculate the average value of the correlation rankings for each type of target test factor.
[0104] This step may include summing the various relevance rankings of the target test factor type and then dividing by the number of relevance ranking types.
[0105] The target test factor type can be any test factor type.
[0106] S2044: If the difference between the relevance ranking of any type of target test factor type and the average value is greater than the preset value, or the average value is less than the preset ranking threshold, then the target test factor type is determined to be an invalid test factor type.
[0107] In this step, the preset values and preset ranking thresholds can be set by the staff.
[0108] For example, if the A-class relevance ranking of test factor type 1 is 3, the average value is 10, the difference is 7, and the preset value is 5, then the difference is greater than the preset value, and test factor type 1 is determined to be an invalid parameter group; as another example, if the average value of test factor type 2 is 10, and the preset ranking threshold is 9, then because the average value is greater than the preset ranking threshold, test factor type 2 is determined to be an invalid parameter group.
[0109] As can be seen from the description of the above embodiments, the embodiments of this application calculate the correlation between test factor types and error occurrence feature values, rank the correlation of test factor types, calculate the average value of the ranking, and determine the target test factor type as an invalid test factor type when the difference between the correlation ranking of any type of target test factor type and the average value is greater than a preset value, or the average value is less than a preset ranking threshold. This facilitates the modification of subsequent test factors, thereby reducing program execution time and detection costs during the soft failure detection process.
[0110] In one possible implementation, error occurrence characteristics include error occurrence frequency or single execution time.
[0111] Error frequency refers to the number of soft failures that occur within a unit of test time. Execution time per test can be the time required to execute one test.
[0112] Accordingly, in step S205 above, the test factor of the invalid test factor type is modified according to the error occurrence characteristic value to obtain the parameter group to be used, including: S205A or step S205B.
[0113] S205A: Use the M test factors with the highest error frequency in the invalid test factor type to replace the remaining test factors in the invalid test factor type to obtain the parameter group.
[0114] In this step, the remaining test factors are those other than the M test factors with the highest error frequency among the invalid test factor types.
[0115] For example, if there are 5 invalid test factor types (with 5 execution parameter groups, each containing test factors of the invalid test factor type), and M is 1, then the test factor with the highest error frequency is used to replace the other 4 test factors, and the resulting execution parameter group is determined as the usage parameter group. As another example, if there are 10 test factors and M is 2, then the 2 test factors with the highest error frequency are randomly used to replace the other 8 test factors, and the resulting execution parameter group is determined as the usage parameter group.
[0116] Where M is a positive integer, such as 1, 2, 3.
[0117] S205B: Use the M test factors with the shortest single execution time from each invalid test factor type to replace the remaining test factors in the invalid test factor type, and obtain the parameter group to use.
[0118] This step may include sorting the test factors in the invalid test factor type by single execution time from smallest to largest, and replacing the other test factors with the top M test factors to obtain the parameter group to be used. The replacement process is similar to step S205A above, and will not be described again here.
[0119] As can be seen from the description of the above embodiments, the embodiments of this application replace other test factors under the invalid test factor type with test factors that have a higher error frequency or shorter single execution time, thereby increasing the success rate of anomaly detection or reducing the anomaly detection time and increasing the testing efficiency.
[0120] In one possible implementation, the new error occurrence characteristics include a new error occurrence frequency or a new single execution time.
[0121] Accordingly, in step S207 above, determining whether the cache device is abnormal based on the new error occurrence characteristic value and the preset Gaussian mixture model includes:
[0122] S2071: If the frequency of a new error is greater than or equal to the frequency-weighted sum of the mean and standard deviation of the largest submodel in the Gaussian mixture model, then an anomaly is determined to exist in the cache line.
[0123] In this step, the largest submodel is the submodel with the largest mean in the Gaussian mixture model. The frequency-weighted sum can be obtained by weighting the mean and standard deviation of the largest submodel. The mean and standard deviation of the rightmost submodel in the Gaussian mixture model can be predetermined based on the data from the Gaussian mixture model. For example, the frequency-weighted sum S = μ r +1.25σ r , where μ r σ represents the mean of the rightmost sub-model. r This represents the standard deviation of the rightmost sub-model, and 1.25 is the weight value. Other values can be used for the weight value.
[0124] S2072: If the new single execution time is less than or equal to the time-weighted sum of the mean and standard deviation in the Gaussian mixture model, then an anomaly is determined to exist in the cache line.
[0125] This step is similar to step S2071 above, and will not be repeated here.
[0126] As can be seen from the description of the above embodiments, the embodiments of this application determine that there is an anomaly in the cache device when the error occurrence frequency is greater than or equal to the frequency weighted sum, or the single execution time is less than or equal to the time weighted sum, thereby achieving accurate judgment of cache device anomaly.
[0127] In one possible implementation, after determining whether the cache device is abnormal based on the new error occurrence characteristic value and the preset Gaussian mixture model in step S207, the method further includes step S208A or step S208B.
[0128] S208A: If the new error occurrence feature value is greater than or equal to the mean of the smallest submodel in the Gaussian mixture model, and less than or equal to the mean of the largest submodel in the Gaussian mixture model, then the corresponding parameter set, the new error occurrence feature value, and the Gaussian mixture model are used to update the Gaussian mixture model.
[0129] In this step, the smallest sub-model can be the sub-model with the smallest mean in the Gaussian mixture model. The largest sub-model is the same as in step S2071 above, and will not be repeated here. The process of updating the existing Gaussian mixture model includes: mixing the parameter set, the new error occurrence feature values, and the old parameters in the preset Gaussian mixture model, and randomly sampling them into multiple parameter sets. A Gaussian mixture model is then built for each parameter set. After modeling, the sub-models within each Gaussian mixture model are sorted according to their mean. Under the same ranking, the sub-model with the smallest standard deviation is selected as the sub-model of the new model, thus completing the update of the existing Gaussian mixture model.
[0130] S208B: If the new error occurrence feature value is less than the mean of the smallest submodel in the Gaussian mixture model and greater than the first weighted sum of the mean and standard deviation of the smallest submodel, or if the new error occurrence feature value is greater than the mean of the largest submodel in the Gaussian mixture model and less than the second weighted sum of the mean and standard deviation of the largest submodel, then store the new error occurrence feature value and the corresponding set of parameters to be used, until the number of stored new error occurrence feature values and set of parameters to be used exceeds the preset threshold, and then update the Gaussian mixture model by using the new error occurrence feature value and set of parameters to be used, and the Gaussian mixture model.
[0131] In this step, the weight values used in calculating the first weighted sum and the second weighted sum can be preset. For example, the first weighted sum is S... l =μ l -1.25σ l μ l σ represents the mean of the smallest submodel. l The standard deviation of the smallest submodel is represented by a weight of -1.25, and the second weighted sum is, for example, S. r =μ r -1.25σ r μ r σ represents the mean of the largest submodel. rThis represents the standard deviation of the largest submodel, with a weight of 1.25. Other weight values are also possible. The weights of the second weighted sum can be opposite in sign to those of the first weighted sum. This step can also be expressed as when the eigenvalue is less than μ due to an error. l And greater than S l When the error occurs, store the new error occurrence characteristic value and the corresponding parameter group; or when the error occurrence characteristic value is greater than μ r And less than S r At that time, new error occurrence characteristic values and corresponding parameter groups are stored. The preset quantity threshold can be pre-set by staff based on experimental data or empirical parameters. The process of updating the Gaussian mixture model is similar to step S208A above and will not be repeated here.
[0132] In one possible implementation, the deviation distance for determining the device that triggers an anomaly due to a soft failure is adjusted using an adaptive strategy, α*σ, initially set to 1.25 (or other user-defined values). The number of points within the intervals from the leftmost sub-Gaussian mean μ to μ-α*σ and from the rightmost sub-Gaussian mean μ to μ+α*σ is defined as S. A threshold TH is set, and the time t for S to reach TH is defined as t. Dividing the current t by the previous t, if the ratio is greater than 1, α is reduced; conversely, if the ratio is less than 1, α is increased. This ensures that the growth rate of points within the two intervals is approximately consistent.
[0133] As can be seen from the description of the above embodiments, the embodiments of this application can effectively alleviate the interference of noise points and improve the stability of the model by increasing the amount of data in the model while detecting anomalies.
[0134] Figure 4 This is a schematic diagram of the overall anomaly detection process provided in an embodiment of this application. Figure 4 As shown, the overall anomaly detection process includes: receiving test factors, selecting configurations based on constraints, obtaining execution parameter sets, performing read / write operations and / or computations on a given sequence using the execution parameter sets, obtaining error occurrence feature values, determining whether the cache device is abnormal based on the error occurrence feature values and the Gaussian mixture model, updating the model using the error occurrence feature values that can be retained, and restoring the memory, cache, and environment variables to the state at the start of the test or preparing the context content required to initialize the next test item.
[0135] Figure 5 This is a schematic diagram of the anomaly detection device provided in an embodiment of this application. Figure 5 As shown, the anomaly detection device 500 includes: a type receiving module 501, a parameter group generation module 502, a feature value acquisition module 503, a type determination module 504, a parameter group modification module 505, a feature value acquisition module 506, and an anomaly determination module 507.
[0136] The type receiving module 501 is used to receive the test factor type input by the user;
[0137] The parameter group generation module 502 is used to generate execution parameter groups according to the test factor type;
[0138] The feature value acquisition module 503 is used to execute test code using the execution parameter set and obtain the error occurrence feature value corresponding to the execution parameter set;
[0139] The type determination module 504 is used to determine the type of invalid test factor in the execution parameter group by using the error occurrence characteristic value and the execution parameter group;
[0140] The parameter group modification module 505 is used to modify the test factors of invalid test factor types according to the error occurrence characteristic value to obtain the parameter group to be used;
[0141] The feature value acquisition module 506 is used to execute test code using the parameter set and obtain new error occurrence feature values corresponding to the parameter set and cache line.
[0142] The exception determination module 507 is used to determine whether a cache line is abnormal based on the new error occurrence characteristic value and the preset Gaussian mixture model.
[0143] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0144] In one possible implementation, the parameter group generation module 502 is specifically used to generate test factors corresponding to the test factor type; generate parameter groups using test factors; determine conflicting parameter groups in the parameter group; modify the test factors in the conflicting parameter group using preset adjustment rules to obtain a new parameter group corresponding to the conflicting parameter group; and determine the parameter groups other than the conflicting parameter groups and the new parameter group in the parameter group as the execution parameter group.
[0145] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0146] In one possible implementation, the parameter group generation module 502 is specifically used to determine the target parameter group as a conflict parameter group if the target parameter group contains basic test factors and conflict factors corresponding to the basic test factors in the preset constraint diagram; accordingly, the test factors in the conflict parameter group are modified according to preset adjustment rules to obtain a new parameter group corresponding to the conflict parameter group, including: finding the replacement factor corresponding to the conflict factor in the preset constraint diagram; replacing the conflict factor with the replacement factor until the target parameter group does not contain both the basic test factor and the corresponding conflict factor in the preset constraint diagram at the same time, thus obtaining a new parameter group.
[0147] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0148] In one possible implementation, the type determination module 504 is used to calculate the N types of correlation between various test factors and error occurrence feature values using error occurrence feature values and test factors in the execution parameter group; rank the various types of correlation of various test factors; calculate the average value of the various types of correlation ranking corresponding to the target test factor type; if the difference between any type of correlation ranking of the target test factor type and the average value is greater than a preset value, or the average value is less than a preset ranking threshold, then the target execution parameter group is determined as an invalid test factor type.
[0149] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0150] In one possible implementation, the error occurrence characteristic value includes the error occurrence frequency or the single execution time; the parameter group modification module 505 is specifically used to replace the remaining test factors in the invalid test factor type with the M test factors with the highest error occurrence frequency in the invalid test factor type to obtain the parameter group to use; or, to replace the remaining test factors in the invalid test factor type with the M test factors with the shortest single execution time in the invalid test factor type to obtain the parameter group to use.
[0151] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0152] In one possible implementation, the new error occurrence characteristic value includes a new error occurrence frequency or a new single execution time; the anomaly determination module 507 is specifically used to determine that the cache device is abnormal if the new error occurrence frequency is greater than or equal to the frequency-weighted sum of the mean and standard deviation of the largest sub-model in the Gaussian mixture model; or, if the new single execution time is less than or equal to the time-weighted sum of the mean and standard deviation of the smallest sub-model in the Gaussian mixture model, the cache device is abnormal.
[0153] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0154] In one possible implementation, the new error occurrence characteristic value includes a new error occurrence frequency or a new single execution time; the anomaly detection device 500 also includes a model update module 508.
[0155] The model update module 508 is specifically used to create a new Gaussian mixture model if the new error occurrence feature value is greater than or equal to the mean of the smallest submodel in the Gaussian mixture model and less than or equal to the mean of the largest submodel in the Gaussian mixture model, by using the corresponding parameter set, the new error occurrence feature value, and the Gaussian mixture model; if the new error occurrence feature value is less than the mean of the smallest submodel in the Gaussian mixture model and greater than the first weighted sum of the mean and standard deviation of the smallest submodel, or if the new error occurrence feature value is greater than the mean of the largest submodel in the Gaussian mixture model and less than the second weighted sum of the mean and standard deviation of the largest submodel, then the new error occurrence feature value and the corresponding parameter set are stored, until the number of stored new error occurrence feature values and parameter sets exceeds a preset threshold, and a new Gaussian mixture model is created by using the new error occurrence feature value, parameter set, and Gaussian mixture model.
[0156] The apparatus provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effects are similar, and will not be described again here.
[0157] To implement the above embodiments, this application also provides an electronic device.
[0158] refer to Figure 6 The diagram illustrates a structural schematic of an electronic device 600 suitable for implementing embodiments of this application. The electronic device 600 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0159] like Figure 6As shown, the electronic device 600 may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 601 and a memory 602 communicatively connected to the processor. The processor can perform various appropriate actions and processes based on programs stored in the memory 602, computer-executed instructions, or programs loaded from the storage device 608 into the random access memory (RAM) 603, implementing the anomaly detection method in any of the above embodiments. The memory may be a read-only memory (ROM). The RAM 603 also stores various programs and data required for the operation of the electronic device 600. The processing device 601, the memory 602, and the RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0160] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0161] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a memory 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of the embodiments of this application.
[0162] It should be noted that the computer-readable storage medium described above in this application can be a computer-readable signal medium or a computer storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0163] The aforementioned computer-readable storage medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0164] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.
[0165] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0166] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0167] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the units do not necessarily limit the module itself; for example, a type receiving module can also be described as a "test factor type receiving module".
[0168] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0169] This application also provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, it implements the technical solution of the anomaly detection method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the anomaly detection method, and can be found in the implementation principle and beneficial effects of the anomaly detection method, which will not be repeated here.
[0170] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0171] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the technical solution of the anomaly detection method in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the anomaly detection method, and can be found in the implementation principle and beneficial effects of the anomaly detection method, which will not be repeated here.
[0172] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
[0173] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0174] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. An anomaly detection method, characterized in that, include: Receive the type of test factor input by the user; Generate an execution parameter group based on the test factor type; The test code is executed using the execution parameter set to obtain the error occurrence characteristic value corresponding to the execution parameter set; Using the error occurrence characteristic value and the execution parameter group, the invalid test factor type in the execution parameter group is determined; Based on the error occurrence characteristic value, modify the test factor of the invalid test factor type to obtain the parameter group to be used; Using the aforementioned parameter set, the test code is executed to obtain new error occurrence characteristic values corresponding to the parameter set and the cache line; Based on the new error occurrence characteristics and the preset Gaussian mixture model, determine whether the cache device is abnormal.
2. The method according to claim 1, characterized in that, The step of generating an execution parameter group based on the test factor type includes: Generate test factors corresponding to the test factor type; The test factors are used to generate parameter sets; Identify the conflicting parameter groups in the parameter group; By using preset adjustment rules, the test factors in the conflict parameter group are modified to obtain a new parameter group corresponding to the conflict parameter group; The parameter groups other than the conflicting parameter groups in the parameter group, as well as the new parameter group, are determined as the execution parameter groups.
3. The method according to claim 2, characterized in that, Determining the conflicting parameter groups in the parameter group includes: If the target parameter group contains the basic test factors in the preset constraint diagram and the conflict factors corresponding to the basic test factors, then the target parameter group is determined as the conflict parameter group. Accordingly, the step of modifying the test factors in the conflict parameter group using preset adjustment rules to obtain a new parameter group corresponding to the conflict parameter group includes: Find the replacement factor corresponding to the conflict factor in the preset constraint diagram; The conflicting factors are replaced with the replacement factors until the target parameter group does not simultaneously contain the basic test factors and corresponding conflicting factors in the preset constraint diagram, thus obtaining a new parameter group.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the invalid test factor type in the execution parameter group using the error occurrence characteristic value and the execution parameter group includes: Using the error occurrence characteristic value and the test factors in the execution parameter group, calculate the N types of correlations between various test factors and the error occurrence characteristic value; Rank the correlations of various test factors; Calculate the average value of the relevance rankings for each type of target test factor; If the difference between the relevance ranking of any type of target test factor and the average value is greater than a preset value, or the average value is less than a preset ranking threshold, then the target execution parameter group is determined to be an invalid test factor type.
5. The method according to any one of claims 1 to 4, characterized in that, The error occurrence characteristic values include error occurrence frequency or single execution time; Accordingly, the step of modifying the test factor of the invalid test factor type according to the error occurrence characteristic value to obtain the parameter group includes: The remaining test factors in the invalid test factor type are replaced with the M test factors that have the highest error frequency from the invalid test factor type to obtain the parameter set; or, The remaining test factors in the invalid test factor type are replaced by the M test factors with the shortest single execution time from the invalid test factor type to obtain the parameter group.
6. The method according to any one of claims 1 to 5, characterized in that, The new error occurrence characteristic values include new error occurrence frequency or new single execution time; Accordingly, determining whether the cache device is abnormal based on the new error occurrence characteristic values and the preset Gaussian mixture model includes: If the frequency of the new error is greater than or equal to the frequency-weighted sum of the mean and standard deviation of the largest sub-model in the Gaussian mixture model, then it is determined that the cache device is abnormal. or, If the new single execution time is less than or equal to the time-weighted sum of the mean and standard deviation of the smallest submodel in the Gaussian mixture model, then the cache device is determined to be abnormal.
7. The method according to any one of claims 1 to 6, characterized in that, After determining whether the cache device is abnormal based on the new error occurrence characteristic values and the preset Gaussian mixture model, the process further includes: If the new error occurrence feature value is greater than or equal to the mean of the smallest submodel in the Gaussian mixture model, and less than or equal to the mean of the largest submodel in the Gaussian mixture model, then the Gaussian mixture model is updated using the corresponding parameter set, the new error occurrence feature value, and the Gaussian mixture model. If the new error occurrence feature value is less than the mean of the smallest submodel in the Gaussian mixture model and greater than the first weighted sum of the mean and standard deviation of the smallest submodel, or if the new error occurrence feature value is greater than the mean of the largest submodel in the Gaussian mixture model and less than the second weighted sum of the mean and standard deviation of the largest submodel, then the new error occurrence feature value and the corresponding set of parameters are stored until the number of stored new error occurrence feature values and set of parameters exceeds a preset threshold. Then, the Gaussian mixture model is updated using the new error occurrence feature value and set of parameters, and the Gaussian mixture model itself.
8. An anomaly detection device, characterized in that, include: The type receiving module is used to receive the test factor type input by the user; The parameter group generation module is used to generate an execution parameter group based on the test factor type. The feature value acquisition module is used to execute test code using the execution parameter group and obtain the error occurrence feature value corresponding to the execution parameter group; The type determination module is used to determine the invalid test factor type in the execution parameter group using the error occurrence characteristic value and the execution parameter group; The parameter group modification module is used to modify the test factors of the invalid test factor type according to the error occurrence characteristic value to obtain the parameter group to be used; The feature value acquisition module is used to execute the test code using the parameter set to obtain a new error occurrence feature value corresponding to the parameter set and the cache line. The anomaly determination module is used to determine whether the cache device is abnormal based on the new error occurrence characteristic value and the preset Gaussian mixture model.
9. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the anomaly detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the anomaly detection method as described in any one of claims 1 to 7.