Consistency test exception detection method, exception detection device and test equipment
By decomposing the input signal into sparse and low-rank matrices and combining correlation coefficients and codebook judgments, the problem of low anomaly detection efficiency in consistency testing is solved, and fast and accurate anomaly localization and identification are achieved.
Patent Information
- Application Number
- CN202511353598.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-09-22
AI Technical Summary
Existing technologies have low efficiency in detecting anomalies during consistency testing, requiring manual operation to locate the position of erroneous bits, which is inefficient.
By storing the input signal in the form of a data matrix and decomposing it into a sparse matrix and a low-rank matrix, the abnormal position is quickly located by using the position of the abnormal element in the sparse matrix. At the same time, the correlation coefficient is used to determine whether the signal is normal, and accurate identification is performed by using normal and abnormal codebooks.
It enables rapid and accurate location of abnormal input signals, improves detection efficiency and accuracy, reduces the subjectivity of human judgment, and is suitable for anomaly detection of complex signals.
Smart Images

Figure CN120880890B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to an anomaly detection method, anomaly detection device, and testing equipment for conformance testing. Background Technology
[0002] The telecommunications industry ensures that devices from different companies can communicate and work together by establishing protocols and specifying specific code patterns required for testing at the physical layer. Conformance testing verifies whether the device under test (DUT) conforms to the protocol. During conformance testing, if the code pattern of the signal under test does not match the specific code pattern, it will lead to a conformance test anomaly. In related technologies, after a conformance test anomaly, manual operation is required to locate the erroneous bit position to determine the cause of the anomaly, which is inefficient. Summary of the Invention
[0003] This application discloses an anomaly detection method, anomaly detection device, and testing equipment for consistency testing, which solves the problem of low anomaly detection efficiency in consistency testing.
[0004] Firstly, this application provides an anomaly detection method for consistency testing, applied to instrument testing equipment, comprising: storing the input signal in the form of a data matrix based on the periodicity of the input signal of the device under test, wherein the elements of the data matrix are data in the data stream corresponding to the input signal; each row in the data matrix corresponds to one or more cycles of the input signal, or multiple rows in the data matrix correspond to one cycle of the input signal; decomposing the data matrix into a sparse matrix and one or more low-rank matrices, determining the positions of the valid elements in the sparse matrix to determine the anomaly positions of the input signal, wherein the sum of the sparse matrix and one or more low-rank matrices is equal to the data matrix, and the valid elements are non-zero or non-empty elements.
[0005] Taking a data matrix where each row corresponds to one or more periods of the input signal as an example, due to the periodicity of the input signal, when the input signal is normal, the elements in each row of the data matrix are the same. When the input signal is abnormal, some elements in a few rows of the data matrix (i.e., abnormal elements) are different from the elements at corresponding positions in other rows (i.e., normal elements). Therefore, the location of the abnormal element can be found by comparing the differences between the elements at the same position in each row. Taking a data matrix where multiple rows correspond to one period of the input signal as an example, the multiple rows corresponding to one period can be grouped together. Due to the periodicity of the input signal, when the input signal is normal, the elements in each group of the data matrix are the same. When the input signal is abnormal, some elements in a few groups of the data matrix (i.e., abnormal elements) are different from the elements at corresponding positions in other groups (i.e., normal elements). Therefore, the location of the abnormal element can be found by comparing the differences between the elements at the same position in each group. Since the data matrix is usually a large matrix, comparing the differences between the elements at the same position in each row or group is very time-consuming and computationally complex. In this embodiment, matrix decomposition decomposes the data matrix into a sparse matrix and one or more low-rank matrices, enabling rapid differentiation between abnormal and normal elements. Abnormal elements are primarily, or even entirely, located in the sparse matrix, while normal elements are primarily, or even entirely, located in one or more low-rank matrices. Specifically, since abnormal elements constitute only a minority of the total elements in the data matrix, the matrix corresponding to the abnormal elements is a sparse matrix. Because the normal elements are identical in each row (or group) after removing the influence of abnormal elements, the rank of the one or more matrices containing the normal elements is much smaller than the number of rows or columns, thus the normal elements in the data matrix correspond to one or more low-rank matrices. The sparse matrix contains very few non-zero elements, allowing for rapid identification of abnormal element positions, which correspond to the positions of abnormal elements in the data matrix, i.e., the abnormal positions of the input signal. Therefore, this application provides an automated anomaly detection method that facilitates rapid and accurate location of abnormal input signal positions, with low computational complexity and wide applicability, particularly suitable for anomaly detection of complex signals in instrument testing equipment.
[0006] In one possible implementation, the number of differences between the sum of one or more low-rank matrices and the data matrix is less than or equal to 5% of the total number of elements in the data matrix.
[0007] In matrix factorization, the number of differing elements between the sum of one or more low-rank matrices obtained from the factorization and the data matrix reflects the similarity between the resulting low-rank matrices and the data matrix. In other words, the number of differing elements corresponds to the number of outliers. Considering that the number of outliers usually accounts for a small proportion of the total number of elements in the data matrix, the low-rank matrices obtained from the factorization should be as similar to the data matrix as possible. In this embodiment, setting the number of differing elements to less than or equal to 5% of the total number of elements in the data matrix helps ensure that the matrix factorization is reasonable and reliable, thereby improving the accuracy of anomaly detection.
[0008] In one possible implementation, when each row in the data matrix corresponds to one or more cycles of the input signal, the number of identical rows in each of the one or more low-rank matrices is greater than or equal to 95% of its total number of rows; when multiple rows in the data matrix correspond to one cycle of the input signal, multiple rows corresponding to one cycle are grouped together, and the number of identical groups in each of the one or more low-rank matrices is greater than or equal to 95% of its total number of groups.
[0009] In this embodiment, considering that the rows or groups in the low-rank matrix correspond to the periodicity of the input signal, and that the low-rank matrix mainly or entirely consists of normal elements, the rows or groups of each low-rank matrix can be as similar as possible; in other words, the number of identical rows or groups can be as large as possible. Setting the number of identical rows or groups in each low-rank matrix obtained in the matrix decomposition to be greater than or equal to 95% of its total number of rows or groups helps to ensure that the matrix decomposition is reasonable and effective, thereby improving the accuracy of anomaly detection.
[0010] In one possible implementation, a data stream corresponding to the input signal is obtained based on the input signal; one or more correlation coefficients are obtained based on the data stream and one or more codebooks, each correlation coefficient being used to characterize the degree of correlation between the data stream and a codebook; and the normality of the data stream is determined based on the one or more correlation coefficients.
[0011] In this embodiment, the corresponding data stream is obtained from the input signal, and a correlation coefficient is calculated between the data stream and one or more codebooks to characterize the degree of correlation between the data stream and the codebooks. These correlation coefficients are then used to determine whether the data stream is normal. This approach provides a quantitative standard for judging the state of the data stream, avoiding the subjectivity and uncertainty of relying solely on human experience. It enables a rapid, accurate, and objective assessment of whether the data stream meets expectations, effectively improving detection efficiency and accuracy, and helping to promptly detect anomalies in the input signal.
[0012] In one possible implementation, obtaining a data stream corresponding to the input signal based on the input signal includes: obtaining a data stream corresponding to the input signal based on the input signal and one or more level thresholds.
[0013] In the embodiments of this application, by using one or more level thresholds to quantize the input signal, the resulting data stream can ignore or reduce the influence of small noise in the input signal, improve data reliability, and achieve accurate generation of the data stream.
[0014] In one possible implementation, one or more codebooks include one or more normal codebooks, which are codebooks corresponding to normal signals; one or more correlation coefficients include one or more first correlation coefficients, each first correlation coefficient being used to characterize the correlation between the data stream and a normal codebook; one or more correlation coefficients are obtained based on the data stream and one or more codebooks; and determining whether the data stream is normal based on the one or more correlation coefficients includes: obtaining one or more first correlation coefficients based on the data stream and one or more normal codebooks; if one of the one or more first correlation coefficients is greater than a first preset threshold, outputting first indication information, the first indication information being used to characterize that the input signal is normal.
[0015] In this embodiment, one or more normal codebooks corresponding to normal signals are pre-set. A first correlation coefficient is calculated using the data stream and these normal codebooks. The normality of the input signal is determined based on the comparison between the first correlation coefficient and a first preset threshold. This scheme provides a clear and quantitative standard for judging the normality of signals, avoiding errors in subjective judgment, and can quickly and accurately identify whether the input signal is in a normal state. Furthermore, when the first correlation coefficient is greater than the first preset threshold, a first indication information representing the normality of the signal is output in a timely manner, which helps to improve the efficiency and reliability of signal detection.
[0016] In one possible implementation, one or more codebooks include one or more abnormal codebooks, the abnormal codebooks being codebooks corresponding to abnormal signals; one or more correlation coefficients include one or more second correlation coefficients, each second correlation coefficient being used to characterize the degree of correlation between the data stream and an abnormal codebook; one or more correlation coefficients are obtained based on the data stream and one or more codebooks; and determining whether the data stream is normal based on the one or more correlation coefficients includes: obtaining one or more second correlation coefficients based on the data stream and one or more abnormal codebooks; if the largest of the one or more second correlation coefficients is greater than a second preset threshold, outputting second indication information, the second indication information being used to indicate the cause of the abnormality corresponding to the largest second correlation coefficient.
[0017] In this embodiment of the application, by setting one or more abnormal codebooks in the device, calculating the second correlation coefficient between the data stream and the abnormal codebook, and comparing the maximum second correlation coefficient with the second preset threshold, the specific cause of the abnormality is located, thus realizing a technical leap from "whether it is abnormal" to "what kind of abnormality".
[0018] In one possible implementation, the codebook includes one or more normal codebooks and one or more abnormal codebooks, where the normal codebook corresponds to a normal signal and the abnormal codebook corresponds to an abnormal signal; the one or more correlation coefficients include one or more third correlation coefficients and one or more fourth correlation coefficients, each third correlation coefficient characterizing the correlation between the data stream and a normal codebook, and each fourth correlation coefficient characterizing the correlation between the data stream and an abnormal codebook; one or more correlation coefficients are obtained based on the data stream and one or more codebooks; and determining whether the data stream is normal based on the one or more correlation coefficients includes: obtaining one or more third correlation coefficients based on the data stream and one or more normal codebooks; each third correlation coefficient... The three correlation coefficients are used to characterize the correlation between the data stream and a normal codebook. If one of the three correlation coefficients is greater than a third preset threshold, a third indication is output, which indicates that the input signal is normal. If any one of the three correlation coefficients is less than the third preset threshold, one or more fourth correlation coefficients are obtained based on the data stream and one or more abnormal codebooks. Each fourth correlation coefficient is used to characterize the correlation between the data stream and an abnormal codebook. If the largest fourth correlation coefficient is greater than a fourth preset threshold, a fourth indication is output, which indicates the cause of the abnormality corresponding to the largest fourth correlation coefficient.
[0019] In this embodiment, a complete signal judgment system is constructed by simultaneously setting normal and abnormal codebooks. Considering that the number of normal codebooks needed for matching is likely less than the number of abnormal codebooks—for example, the normal codebook can be determined based on information such as the signal type selected by the user—this helps to reduce the range of normal codebooks needed for matching, resulting in a smaller number of normal codebooks. Therefore, a third correlation coefficient is first calculated using the data stream and the normal codebook. If there is a case where the correlation coefficient is greater than a third preset threshold, the input signal can be quickly determined to be normal, improving the recognition efficiency of normal signals. If all third correlation coefficients are less than the threshold, a fourth correlation coefficient is further calculated using the data stream and the abnormal codebook. When the largest fourth correlation coefficient is greater than a fourth preset threshold, not only can the signal be accurately determined to be abnormal, but the specific cause of the abnormality can also be directly located. This phased and refined judgment method improves the accuracy, comprehensiveness, and efficiency of signal detection, helping to quickly detect the cause of input signal abnormalities.
[0020] In one possible implementation, the abnormal codebook includes at least one of the following: a polarity reversal codebook, a word order reversal codebook, a Ungrey codebook, and a user-defined abnormal codebook.
[0021] In this embodiment, by constructing an anomaly codebook that includes a polarity reversal codebook, a word order reversal codebook, a Weigray encoding codebook, and a user-defined anomaly codebook, comprehensive coverage and accurate identification of test anomalies are achieved. The hybrid architecture of "basic anomaly codebook + user-defined codebook" not only includes the three most common types of typical fault codebooks in industrial testing, but also expands the system's applicability through the user-defined codebook, enabling flexible adaptation to various special test scenarios and novel anomaly modes. This open anomaly codebook design enhances the scalability and scenario applicability of the anomaly detection method in this embodiment, providing a standardized yet personalized solution for instrument testing, and improving the intelligence level and practical value of instrument testing equipment.
[0022] Secondly, this application provides an instrument testing device, including: a communication interface; and a processor coupled to the communication interface, used to execute an anomaly detection method for consistency testing in any embodiment of the first aspect.
[0023] Thirdly, this application provides an anomaly detection device for consistency testing, comprising: a matrix forming module, used to store the input signal in the form of a data matrix based on the periodicity of the input signal of the device under test, wherein the elements of the data matrix are data in the data stream corresponding to the input signal; each row in the data matrix corresponds to one or more periods of the input signal, or multiple rows in the data matrix correspond to one period of the input signal; and a matrix decomposition module, used to decompose the data matrix into a sparse matrix and one or more low-rank matrices, determine the positions of the valid elements in the sparse matrix to determine the abnormal positions of the input signal, wherein the sum of the sparse matrix and one or more low-rank matrices is equal to the data matrix, and the valid elements are non-zero or non-empty elements.
[0024] Fourthly, this application provides a computer-readable storage medium, which includes a computer program or instructions. When the computer program or instructions are executed on a computer, the computer performs an anomaly detection method for the conformity test in any embodiment of the first aspect.
[0025] Fifthly, this application provides a computer program product comprising: a computer program or instructions that, when executed on a computer, cause the computer to perform an anomaly detection method for the consistency test in any embodiment of the first aspect.
[0026] The technical principles and beneficial effects of the second, third, fourth and fifth aspects can be referred to the relevant explanations in the first aspect above, and will not be repeated here. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 A schematic diagram of the structure of a testing system provided in an embodiment of this application is shown;
[0029] Figure 2 This illustration shows a flowchart of an anomaly detection method for consistency testing provided in an embodiment of this application. Figure 1 ;
[0030] Figure 3 This illustration shows a flowchart of an anomaly detection method for consistency testing provided in an embodiment of this application. Figure 2 ;
[0031] Figure 4 This illustration shows a flowchart of an anomaly detection method for consistency testing provided in an embodiment of this application. Figure 3 ;
[0032] Figure 5 A schematic diagram illustrating a polarity reversal anomaly provided in an embodiment of this application is shown;
[0033] Figure 6 This illustration shows a schematic diagram of a cause of word order reversal anomaly provided in an embodiment of this application;
[0034] Figure 7 A schematic diagram illustrating a cause of non-Gray coding anomalies provided in an embodiment of this application is shown;
[0035] Figure 8 This illustration shows a schematic diagram of an exception cause display provided in an embodiment of this application;
[0036] Figure 9 This illustration shows a flowchart of an anomaly detection method for consistency testing provided in an embodiment of this application. Figure 4 ;
[0037] Figure 10 This illustration shows a flowchart of an anomaly detection method for consistency testing provided in an embodiment of this application. Figure 5 ;
[0038] Figure 11 This illustration shows a data matrix provided in an embodiment of this application. Figure 1 ;
[0039] Figure 12 This illustration shows a data matrix provided in an embodiment of this application. Figure 2 ;
[0040] Figure 13 This illustration shows a data matrix provided in an embodiment of this application. Figure 3 ;
[0041] Figure 14 A schematic diagram of a matrix decomposition provided in an embodiment of this application is shown;
[0042] Figure 15 This illustration shows an anomaly detection result of a consistency test provided in an embodiment of this application. Figure 1 ;
[0043] Figure 16 This illustration shows an anomaly detection result of a consistency test provided in an embodiment of this application. Figure 2 ;
[0044] Figure 17 This illustration shows a schematic diagram of the structure of an anomaly detection device for consistency testing provided in an embodiment of this application;
[0045] Figure 18 A schematic diagram of an instrument testing device provided in an embodiment of this application is shown.
[0046] Explanation of reference numerals in the attached figures:
[0047] 1-Test system;
[0048] 11-Instrument testing equipment; 12-Equipment under test;
[0049] 111-Processor; 112-Memory; 113-Communication interface;
[0050] 6-Anomaly detection device for consistency testing;
[0051] 61 - Matrix Formation Module; 62 - Matrix Decomposition Module. Detailed Implementation
[0052] It should be noted that the terms "first" and "second" used in the embodiments of this application are only used to distinguish features of the same type and should not be construed as indicating relative importance, quantity, order, etc.
[0053] The terms "exemplary" or "for example" used in the embodiments of this application are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0054] The terms “coupling,” “coupled,” and “connection” used in the embodiments of this application should be interpreted broadly. For example, they can refer to a physical direct connection or an indirect connection achieved through electronic devices.
[0055] First, let me explain some of the basic concepts involved in this application:
[0056] Low-rank matrices: The "rank" of a matrix is the number of vectors in a maximal linearly independent subset of its row (or column) vectors, reflecting the amount of independent information contained in the matrix. A low-rank matrix is one whose rank is much smaller than its number of rows and columns. If a matrix is low-rank, it means that it contains far less information than its large size suggests. This information can be represented by a few sets of "basic components."
[0057] Sparse matrix: A matrix is "sparse" because the vast majority of its elements are zero, with only a small number of elements being non-zero. Sparsity focuses on the distribution of elements within the matrix, rather than the underlying information structure.
[0058] Matrix factorization involves breaking down a complex, large matrix into the product or sum of several simpler, smaller matrices with specific mathematical properties to discover latent, unobservable features within the data. For example, a complex matrix can be decomposed into low-rank matrices and sparse matrices. In the electrical communications industry, interoperability between devices relies on standardized protocol systems. Manufacturers must strictly adhere to the physical layer specifications defined by these protocols to ensure system compatibility. In the field of physical layer conformance testing, protocol standards typically specify particular code patterns for test signals. These code patterns have definite mathematical structures and statistical properties, and their length is usually on the order of 2^N-1 (where N is the polynomial order), often reaching thousands to tens of thousands of bits. During conformance testing, if the code pattern of the signal under test does not match the specific code pattern, the test will fail.
[0059] In related technologies, after a consistency check fails, manual operation is required to locate the faulty bit in order to determine the cause of the anomaly, which is inefficient.
[0060] Example 1:
[0061] To address the aforementioned technical problems, this application provides an anomaly detection method for consistency testing, applicable to, for example... Figure 1 The instrument testing equipment 11 in the test system 1 shown.
[0062] like Figure 1 As shown, the test system 1 includes an instrument testing device 11 and a device under test (DUT) 12. The DUT 12 includes a positive (P) terminal and a negative (N) terminal. The DUT 12 inputs signals to the instrument testing device 11 through the positive (P) terminal and the negative (N) terminal.
[0063] The instrument testing device 11 is used to perform code pattern detection and anomaly (anomaly cause and / or anomaly location) judgment on the input signal, and output prompt information, such as no anomaly, anomaly location, or anomaly cause. The instrument testing device 11 can have built-in codebooks commonly used in hardware design, configuration, and testing, including normal codebooks and anomaly codebooks. It also supports user-imported custom codebooks for comparison with the input code pattern, and can call codebooks from external devices, i.e., storing anomaly codebooks on external devices and using them through invocation. The instrument testing device 11 specifically performs the anomaly detection process or principle of consistency testing, such as... Figures 2-16 As shown.
[0064] like Figure 2 As shown, Figure 2 This paper illustrates a flowchart of an anomaly detection method for consistency testing provided in an embodiment of this application, specifically including steps S31-S32:
[0065] S31. Obtain the data stream corresponding to the input signal based on the input signal of the device under test.
[0066] In some examples, the voltage value of the input signal can be used as an element of the data stream to determine the data stream corresponding to the input signal. The data stream can be a bit data stream, meaning the input signal is represented using single-bit or multi-bit data.
[0067] In a specific embodiment, taking a non-return-to-zero (NRZ) input signal as an example, the NRZ signal carries data through two different voltage levels (high and low). The input signal is sampled, and the variation of the sampled input signal voltage value over time is shown in Table 1 below (input signal voltage unit: V, sampling interval: 1 ns):
[0068] Table 1
[0069]
[0070] Table 1 shows the data stream corresponding to the input signal: 2.5, 2.5, 0.5, 0.5, 2.5, 2.5, 0.5, 0.5, 2.5, 2.5, ... The period is 4, and the data stream corresponding to each period is: 2.5, 2.5, 0.5, 0.5.
[0071] In other examples, a data stream corresponding to the input signal can be obtained based on the input signal and one or more level thresholds. The level thresholds can be pre-configured by the user. The data stream can be a bit data stream, meaning the input signal is represented using single-bit or multi-bit data.
[0072] As one implementation, a data stream corresponding to the input signal is obtained based on the input signal and a level threshold. A level threshold can be set, with values greater than or less than this threshold represented by different data. For example, if the level threshold is set to 0V, when the input signal voltage is greater than 0V, it is determined to be a first logic level (or logic high), which can be represented by a single bit (e.g., 1) or multiple bits (e.g., 11). When the input signal voltage is less than 0V, it is determined to be a second logic level (or logic low), which can be represented by a single bit (e.g., 0) or multiple bits (e.g., 00).
[0073] In a specific embodiment, taking the input signal as an NRZ code as an example, the NRZ signal carries data through two different levels (high level and low level). Logically, only a level threshold needs to be set, and the voltage value of the input signal is compared with the threshold. When the signal voltage is higher than the threshold, it is determined to be a logic high level, which can be represented by the bit data "1"; when the signal voltage is lower than the threshold, it is determined to be a logic low level, which can be represented by the bit data "0".
[0074] In another specific embodiment, the input signal is acquired. The changes in the acquired input signal voltage over time are shown in Table 2 below (input signal voltage unit: V, sampling interval: 1 ns):
[0075] Table 2
[0076]
[0077] The threshold voltage is set to 1.5V. When the signal voltage is >1.5V, it is determined to be a logic high level and represented by bit data "1"; when the signal voltage is <1.5V, it is determined to be a logic low level and represented by bit data "0".
[0078] Based on the set level threshold, the signal voltage of each sampling point is judged, and a bit data stream is generated, as shown in Table 3:
[0079] Table 3
[0080]
[0081] The final bit data stream is: 1100111000…….
[0082] As another implementation, a data stream corresponding to the input signal is obtained based on the input signal and multiple level thresholds. This multi-threshold design can flexibly adapt to input signals of different amplitudes, improving the accuracy and applicability of signal conversion.
[0083] For example, by setting three level thresholds, such as a first level threshold, a second level threshold, and a third level threshold, and with the first level threshold, the second level threshold, and the third level threshold increasing sequentially, the input signal can be divided into four different levels, such as a first level, a second level, a third level, and a fourth level, with the first level, the second level, the third level, and the fourth level increasing sequentially, which can be represented by a combination of two bits of data.
[0084] In one specific embodiment, taking a four-level pulse amplitude modulation (PAM4) code pattern as an example, the PAM4 code pattern uses four different voltage levels to carry data. Logically, three voltage level thresholds need to be set, and the voltage value of the input signal is compared with these three thresholds.
[0085] One specific judgment rule is as follows:
[0086] When the signal voltage is less than the first level threshold, it is determined to be the first logic level, which can be represented by the first value, such as bit data "00".
[0087] When the first level threshold is greater than the signal voltage but less than the second level threshold, it is determined to be the second logic level, which can be represented by the second value, such as bit data "01";
[0088] When the second level threshold is greater than the signal voltage but less than the third level threshold, it is determined to be the third logic level, which can be represented by the third value, such as bit data "10".
[0089] When the signal voltage is greater than the third level threshold, it is determined to be the fourth logic level, which can be represented by the fourth value, such as bit data "11".
[0090] In another specific embodiment, the input signal is acquired. The changes in the acquired input signal voltage over time are shown in Table 4 below (input signal voltage unit: V, sampling interval: 1 ns):
[0091] Table 4
[0092]
[0093] Set three voltage thresholds: the first voltage threshold is 1.0V, the second voltage threshold is 2.0V, and the third voltage threshold is 3.0V.
[0094] Based on the set level threshold, the signal voltage of each sampling point is judged, and a bit data stream is generated, as shown in Table 5:
[0095] Table 5
[0096]
[0097] Each pair of adjacent bits is combined into a complete bit data stream, and the final bit data stream is: 00010110101111000101…….
[0098] The bit data stream is then mapped to a data matrix. Since the input signal can be any periodic code pattern, the bit data in the data matrix is also periodic. Each row of the data matrix contains one or more periods of bit data from the bit data stream, and each row contains the same number of bits. See the reference for details. Figure 3 , Figure 4 and Figure 5 Corresponding implementation examples.
[0099] In the embodiments of this application, by using one or more level thresholds to quantize the input signal, the resulting data stream can ignore or reduce the influence of small noise in the input signal, improve data reliability, and achieve accurate generation of the data stream.
[0100] S32. Based on the data stream and one or more codebooks, obtain one or more correlation coefficients, and determine whether the data stream is normal based on one or more correlation coefficients.
[0101] In some examples, a codebook is a predefined and stored set of mappings used to match and analyze an input signal, after it has been converted into a data stream or bit data stream, against the ideal waveform or bit sequence corresponding to a specific code pattern. The codebook records the waveform characteristics of the ideal bit sequence under different code patterns, as well as mathematical models or reference templates used to calculate correlations. The codebook provides a benchmark for comparing similarity with the input signal. By calculating the correlation coefficient (such as cross-correlation coefficient) between the input signal and the ideal template corresponding to the codebook, the degree of matching between the input signal and the expected code pattern can be quantified.
[0102] Different data streams or bit data streams can correspond to different code patterns, and different code patterns correspond to different codebooks. Correlation operations are performed between a data stream and one or more codebooks to obtain one or more correlation coefficients. Each correlation coefficient is used to characterize the degree of correlation between the data stream and a codebook.
[0103] In some examples, one or more codebooks include one or more normal codebooks, where the normal codebook is the codebook corresponding to the normal signal, such as... Figure 3 As shown, step S32 specifically includes steps S321a-S322a:
[0104] S321a. Based on the data stream and one or more normal codebooks, obtain one or more first correlation coefficients.
[0105] In some examples, the normal codebook can be determined based on the signal type (i.e., code pattern) selected by the user.
[0106] S322a. If one of the one or more first correlation coefficients is greater than a first preset threshold, output first indication information. The first indication information is used to indicate that the input signal is normal.
[0107] In some examples, the first preset threshold can be an empirical or theoretical value (such as signal processing, communication theory, statistical principles, and the needs of specific application scenarios) used to determine the degree of matching between the input signal's code pattern and a specific code pattern. For example, if the first preset threshold is 0.9, it means that when the correlation coefficient is greater than 0.9, the input signal's code pattern can be considered to have a relatively high degree of matching with the specific code pattern.
[0108] In some examples, the initial indication information is presented to the user through the display interface of the instrument test device 11 (such as an oscilloscope).
[0109] For the embodiments shown in steps S321a-S322a, one or more normal codebooks corresponding to normal signals are pre-set. A first correlation coefficient is calculated using the data stream and these normal codebooks. The normality of the input signal is determined based on the comparison between the first correlation coefficient and a first preset threshold. This scheme provides a clear and quantitative standard for judging the normality of signals, avoiding errors in subjective judgment, and can quickly and accurately identify whether the input signal is in a normal state. When the first correlation coefficient is greater than the first preset threshold, a first indication information representing the normality of the signal is output in a timely manner, which helps to improve the efficiency and reliability of signal detection.
[0110] In other examples, one or more codebooks include one or more exception codebooks, where the exception codebook is the codebook corresponding to the exception signal, such as... Figure 4 As shown, step S32 specifically includes steps S321b-S322b:
[0111] S321b: Based on the data stream and one or more abnormal codebooks, obtain one or more second correlation coefficients.
[0112] In some examples, multiple exception codebooks are built into the instrumentation test equipment. The exception codebooks include at least one of the following: polarity inversion codebook, word order inversion codebook, unGray encoded codebook, and user-defined exception codebook. Polarity inversion codebook, word order inversion codebook, and unGray encoded codebook are three common exception codebooks used in hardware design, configuration, and testing.
[0113] In one example, such as Figure 5 , Figure 6 and Figure 7 As shown, Figure 5 This illustration shows a schematic diagram of a polarity reversal anomaly provided in an embodiment of this application. Figure 6 This illustration shows a schematic diagram of a word order reversal anomaly provided in an embodiment of this application. Figure 7 This illustration shows a schematic diagram of a cause of an ungray coding anomaly provided in an embodiment of this application.
[0114] like Figure 5 As shown, polarity reversal is caused by reversing the positive and negative connections during wiring. For example, with the 011000 symbol (a symbol is the smallest unit of a digital signal), if the positive and negative connections are reversed during wiring, the resulting data will be 100111.
[0115] like Figure 6 As shown, word order reversal means that the high-order bits and low-order bits in a bit sequence are reversed. For example, in... Figure 6 In this context, MSB and LSB represent the "Most Significant Bit" and "Least Significant Bit," respectively.
[0116] MSB (Most Significant Bit): Refers to the bit with the highest weight in a binary number, i.e., the leftmost bit. Figure 6 In this context, MSB represents the first bit of a binary number.
[0117] LSB (Least Significant Bit): Refers to the bit with the least weight in a binary number, that is, the rightmost bit. Figure 6 In this context, LSB stands for the last bit of a binary number.
[0118] Figure 6 Word reversal means reversing the byte order of a binary number, but the bit order within each byte (such as the most significant bit still corresponding to the most significant bit) remains unchanged. For example, in this embodiment, using Gray encoding, the code element is 011000 (the corresponding Gray encoding is 130), which becomes 101000 (the corresponding Gray encoding is 330) after word reversal.
[0119] like Figure 7 The image shows the difference between Gray encoding and non-Gray encoding. In Gray encoding, only one binary bit differs between two adjacent numbers. Figure 7 The code is 011011. If it is Gray code, then the decimal number corresponding to 01 is 1, the decimal number corresponding to 10 is 3, and the decimal number corresponding to 11 is 2. The change of adjacent numbers is limited to one position.
[0120] Weigray encoding does not have this restriction; adjacent numbers can have multiple different binary bits. Figure 7 As shown, the same code 011011, in the case of non-Gray encoding, corresponds to the decimal number 1 for 01, the decimal number 2 for 10, and the decimal number 3 for 11. Adjacent numbers may have multiple position variations.
[0121] Furthermore, it supports user-imported custom anomaly codebooks. By constructing anomaly codebooks that include polarity reversal codebooks, word order reversal codebooks, Weigray encoding codebooks, and user-defined anomaly codebooks, comprehensive coverage and accurate identification of test anomalies are achieved. The hybrid architecture of "basic anomaly codebook + user-defined codebook" not only includes the three most common types of typical fault codebooks in industrial testing, but also expands the system's applicability through user-defined codebooks, enabling flexible adaptation to various special test scenarios and new anomaly modes. This open anomaly codebook design enhances the scalability and scenario applicability of the anomaly detection method in this embodiment, providing a standardized yet personalized solution for instrument testing, and improving the intelligence level and practical value of instrument testing equipment.
[0122] S322b: If the largest of one or more second correlation coefficients is greater than a second preset threshold, output second indication information. The second indication information is used to indicate the abnormal cause corresponding to the largest second correlation coefficient.
[0123] In some examples, the second preset threshold can be an empirical or theoretical value (such as signal processing, communication theory, statistical principles, and the needs of specific application scenarios) used to determine the degree of matching between the input signal's code pattern and a specific code pattern. For example, if the second preset threshold is 0.9, it means that when the correlation coefficient is greater than 0.9, the input signal's code pattern can be considered to have a relatively high degree of matching with the specific code pattern.
[0124] In other examples, the second indication information is presented to the user through the display interface of the instrument test device 11 (such as an oscilloscope).
[0125] In one specific embodiment, such as Figure 8 As shown, Figure 8This diagram illustrates an example of displaying an error cause according to an embodiment of this application. Figure 8 The display interface of the instrument testing equipment shown displays "Warning: Please confirm that the polarity is correct". The specific form of the warning is not limited here.
[0126] For the embodiments shown in steps S321b-S322b, by setting one or more abnormal codebooks in the device, by calculating the second correlation coefficient between the data stream and the abnormal codebook, and by comparing the maximum second correlation coefficient with the second preset threshold, the specific cause of the abnormality is located, thus realizing a technical leap from "whether it is abnormal" to "what kind of abnormality".
[0127] In some other examples, the codebook includes one or more normal codebooks and one or more abnormal codebooks, where the normal codebook corresponds to the normal signal and the abnormal codebook corresponds to the abnormal signal, such as... Figure 9 As shown, step S32 specifically includes steps S321c-S324c:
[0128] S321c: Based on the data stream and one or more normal codebooks, one or more third correlation coefficients are obtained.
[0129] In some examples, each third correlation coefficient is used to characterize the degree of correlation between the data stream and a normal codebook. The third correlation coefficient can be the first correlation coefficient from step S321a.
[0130] S322c. If one of the three correlation coefficients is greater than the third preset threshold, output the third indication information. The third indication information is used to indicate that the input signal is normal.
[0131] In some examples, the third preset threshold can be an empirical or theoretical value (such as signal processing, communication theory, statistical principles, and the needs of specific application scenarios) used to determine the degree of matching between the input signal's code pattern and a specific code pattern. For example, if the third preset threshold is 0.9, it means that when the correlation coefficient is greater than 0.9, the input signal's code pattern can be considered to have a relatively high degree of matching with the specific code pattern. The third preset threshold can be the first preset threshold in step S322a.
[0132] S323c: If any one of the three correlation coefficients is less than the third preset threshold, one or more fourth correlation coefficients are obtained based on the data stream and one or more abnormal codebooks.
[0133] In some examples, each fourth correlation coefficient is used to characterize the degree of correlation between the data stream and an anomalous codebook. The fourth correlation coefficient can be the second correlation coefficient from step S321b.
[0134] S324c: When the largest fourth correlation coefficient among one or more fourth correlation coefficients is greater than the fourth preset threshold, output fourth indication information. The fourth indication information is used to indicate the abnormal cause corresponding to the largest fourth correlation coefficient.
[0135] In some examples, the fourth preset threshold can be an empirical or theoretical value (such as a value derived from signal processing, communication theory, statistical principles, or the requirements of specific application scenarios) used to determine the degree of matching between the input signal's code pattern and a specific code pattern. For example, if the fourth preset threshold is 0.9, it means that when the correlation coefficient is greater than 0.9, the input signal's code pattern can be considered to have a relatively high degree of matching with the specific code pattern. The fourth preset threshold can be the second preset threshold in step S322b.
[0136] For the embodiments shown in steps S321c-S324c, a complete signal judgment system is constructed by simultaneously setting normal codebooks and abnormal codebooks. Considering that the number of normal codebooks needed for matching is likely less than the number of abnormal codebooks, for example, the normal codebook can be determined based on information such as the signal type selected by the user. This helps to reduce the range of normal codebooks needed for matching, resulting in a smaller number of normal codebooks. Therefore, a third correlation coefficient is first calculated using the data stream and the normal codebook. If there is a case where the correlation coefficient is greater than a third preset threshold, the input signal can be quickly determined to be normal, improving the recognition efficiency of normal signals. If all third correlation coefficients are less than the threshold, a fourth correlation coefficient is further calculated using the data stream and the abnormal codebook. When the largest fourth correlation coefficient is greater than a fourth preset threshold, not only can the signal be accurately determined to be abnormal, but the specific cause of the abnormality can also be directly located. This phased and refined judgment method improves the accuracy, comprehensiveness, and efficiency of signal detection, helping to quickly detect the cause of input signal abnormalities.
[0137] In the embodiments disclosed in steps S31-S32, the corresponding data stream is obtained from the input signal, and a correlation coefficient is calculated between the data stream and one or more codebooks to characterize the degree of correlation between the data stream and the codebooks. Then, based on these correlation coefficients, it is determined whether the data stream is normal. This method provides a quantitative standard for judging the state of the data stream, avoiding the subjectivity and uncertainty of relying solely on human experience. It can quickly, accurately, and objectively assess whether the data stream meets expectations, effectively improving detection efficiency and accuracy, and helping to promptly detect anomalies in the input signal.
[0138] In some embodiments, such as Figure 9As shown, when the largest of one or more fourth correlation coefficients is less than or equal to the fourth threshold, step S325 is executed to locate the abnormal position in the signal under test. In other examples, if any one of one or more third correlation coefficients is less than the third preset threshold, step S325 can also be executed to locate the abnormal position in the input signal. That is, if any one of one or more third correlation coefficients is less than the third preset threshold, it indicates that there is an abnormality in the input signal, and then the abnormal position in the input signal is further located. In still other examples, step S325 can also be executed after step S324c, that is, after determining the cause of the abnormality in the input signal, the abnormal position in the input signal is further located.
[0139] For example, the abnormal location in the input signal in step S325 can be identified using methods described below. Figure 10 The method shown is used for positioning.
[0140] The above embodiments address scenarios where the matching degree between the data stream and both the normal and abnormal codebooks is low. By locating the abnormal position in the signal under test, users can determine the cause of the abnormality based on the abnormal position (for example, users can judge the cause of the abnormality by viewing the data at the abnormal position and judging the cause of the abnormality based on the data characteristics), providing a more comprehensive method for determining the cause of the abnormality.
[0141] like Figure 10 As shown, this application provides an anomaly detection method for conformance testing, used to locate the abnormal position in the signal under test (the input signal of the device under test) that causes test failure. Figure 10 As shown, the specific steps include S41-S42:
[0142] S41. Based on the periodicity of the input signal of the device under test, the input signal is stored in the form of a data matrix.
[0143] In some examples, the elements of the data matrix are data from the data stream corresponding to the input signal; each row of the data matrix corresponds to one or more periods of the input signal, or multiple rows of the data matrix correspond to one period of the input signal. It should be understood that normal (i.e., without anomalies) input signals are typically strictly periodic, while abnormal input signals are typically approximately periodic. For ease of explanation, normal and abnormal input signals will be collectively referred to as periodic below. Each period in an abnormal input signal may not be strictly equal; that is, a few periods in an abnormal input signal may differ from other periods, and these few periods are often where the anomaly lies. It should also be understood that because the input signal is periodic, the corresponding data stream is also periodic.
[0144] In a specific embodiment, taking the data stream corresponding to the input signal shown in Table 1 above as 2.5, 2.5, 0.5, 0.5, 2.5, 2.5, 0.5, 0.5, 2.5, 2.5, ... as an example, it can be seen that the period is 4, and each period contains the data: 2.5, 2.5, 0.5, 0.5. The data contained in this input signal can be stored in the form of a data matrix, such as... Figure 11 As shown, each row in the data matrix corresponds to one period (period T1) of the input signal; as Figure 12 As shown, each row in the data matrix corresponds to two periods of the input signal (period T2 and period T3); as Figure 13 As shown, the two rows in the data matrix correspond to one cycle of the input signal (cycle T4 includes the first half-cycle T41 and the second half-cycle T42).
[0145] S42. Decompose the data matrix into a sparse matrix and one or more low-rank matrices, determine the positions of the effective elements in the sparse matrix, and thus determine the abnormal positions of the input signal.
[0146] In some examples, the period (which line) of the abnormal bit data and the bit position within that period can be output in the form of an indication message.
[0147] In some examples, the sum of a sparse matrix and one or more low-rank matrices obtained from decomposition equals the data matrix.
[0148] Taking a data matrix where each row corresponds to one or more cycles of the input signal as an example, due to the periodicity of the input signal, when the input signal is normal (corresponding to error-free data stream), the elements in each row of the data matrix are the same. When the input signal is abnormal (corresponding to errors in the data stream), some elements in a few rows of the data matrix (i.e., abnormal elements) differ from the elements at corresponding positions in other rows (i.e., normal elements). Therefore, the location of abnormal elements can be found by comparing the differences between elements at the same position in each row. Taking a data matrix where multiple rows correspond to one cycle of the input signal as an example, multiple rows corresponding to one cycle can be grouped together. Due to the periodicity of the input signal, when the input signal is normal, the elements in each group of the data matrix are the same. When the input signal is abnormal, some elements in a few groups of the data matrix (i.e., abnormal elements) differ from the elements at corresponding positions in other groups (i.e., normal elements). Therefore, the location of abnormal elements can be found by comparing the differences between elements at the same position in each group. Since the data matrix is usually a large matrix, comparing the differences between elements at the same position in each row or group is time-consuming and computationally complex.
[0149] The above embodiment decomposes the data matrix into a sparse matrix and one or more low-rank matrices through matrix factorization, enabling rapid differentiation between outlier and normal elements. Outlier elements are primarily, or even entirely, located in the sparse matrix, while normal elements are primarily, or even entirely, located in one or more low-rank matrices. Specifically, since outlier elements constitute only a minority of the data matrix, the matrix corresponding to the outlier elements is a sparse matrix. After removing the influence of outlier elements, each row (or group) of normal elements is identical, and the rank of the one or more matrices containing the normal elements will be much smaller than the number of rows or columns, thus allowing the normal elements in the data matrix to correspond to one or more low-rank matrices.
[0150] Sparse matrices contain very few non-zero elements, allowing for the rapid identification of anomalous elements. These anomalous elements correspond to the positions of anomalous elements in the data matrix, and thus to the anomalous positions of the input signal. Therefore, this application provides an automated anomaly detection method that facilitates rapid and accurate location of anomalous positions in input signals. It also boasts low computational complexity and wide applicability, particularly suitable for anomaly detection of complex signals in instrumentation and testing equipment.
[0151] like Figure 14 As shown, Figure 14 This diagram illustrates a matrix decomposition method provided in an embodiment of this application. By using a data matrix... X (The original matrix, including normal bit data and error bit data, where black circles represent normal bit data and circles filled with diagonal lines represent error bit data), performs low-rank decomposition to obtain a low-rank matrix with no or almost no errors. M and a sparse matrix containing only bit errors E (Sparse matrix) E In the sparse matrix, blank circles represent empty bits or zeros, indicating that the data at the current position is error-free. Normal bits correspond to the preceding normal elements, and erroneous bits correspond to the preceding abnormal elements. E The data at the positions of valid elements (i.e., non-empty or non-zero elements) (circles filled with diagonal lines in the diagram) are the bit error data, or anomalous data. By periodically constructing a data matrix based on the input signal and decomposing it into a sparse matrix and a low-rank matrix, the anomalous data is explicitly defined as the valid elements in the sparse matrix. This approach allows the scheme to precisely focus on the truly meaningful anomalous information within the sparse matrix, effectively filtering out the interference from the regular periodic data represented by the low-rank matrix. This enables rapid and accurate location of anomalies in complex signal data, significantly improving the accuracy and specificity of anomaly detection.
[0152] Position information is used to characterize the location of abnormal bit data in the data matrix. This position information includes first position information and second position information. The first position information characterizes the row of the abnormal bit data in the data matrix, i.e., the period in the bit data stream. The second position information characterizes the column of the abnormal bit data in the data matrix, i.e., the bit position within the period. By accurately outputting the row (first position information) and column (second position information) positions of abnormal bits in the data matrix, computational speed and accuracy are improved.
[0153] In another example, the number of anomalous elements can also be obtained based on the data matrix. When the data is in bit form, the number of anomalous elements is the same as the number of bits. In a specific embodiment, such as... Figure 15 As shown, Figure 15 This diagram illustrates the anomaly detection results of a consistency test provided in an embodiment of this application. The instrument testing equipment outputs information about the number of abnormal bits in the bit data stream (total number of bit errors: X) and the location information (row of bit errors: XX, and column of bit errors: XXX, where the row of bit errors is the first location information and the column of bit errors is the second location information) in the form of a report.
[0154] In another specific embodiment, such as Figure 16 As shown, Figure 16 This diagram illustrates an anomaly detection result of a conformance test provided in an embodiment of this application. For example, the total number of error bits can be 6, including the 7th bit position in the 1st row, the 8th bit position in the 1st row, the 9th bit position in the 1st row, the 12th bit position in the 7th row, the 28th bit position in the 7th row, and the 39th bit position in the 7th row of the data matrix.
[0155] In some examples, the number of differences between the sum of the low-rank matrices obtained from one or more decompositions and the data matrix is less than or equal to 5% of the total number of elements in the data matrix. It should be understood that in the case of decomposing the data matrix into a low-rank matrix and a sparse matrix, the sum of the low-rank matrices obtained from one or more decompositions is the low-rank matrix itself.
[0156] In matrix factorization, the number of differing elements between the sum of one or more low-rank matrices obtained from the factorization and the data matrix reflects the similarity between the resulting low-rank matrices and the data matrix. In other words, the number of differing elements corresponds to the number of outliers. Considering that the proportion of outliers to the total number of elements in the data matrix is usually small, the low-rank matrices obtained from the factorization should be as similar to the data matrix as possible. In the above embodiment, setting the number of differing elements to less than or equal to 5% of the total number of elements in the data matrix helps ensure that the matrix factorization is reasonable and reliable, thereby improving the accuracy of anomaly detection.
[0157] In some examples, where each row in the data matrix corresponds to one or more periods of the input signal, the number of identical rows in each low-rank matrix obtained from one or more decompositions is greater than or equal to 95% of its total number of rows;
[0158] In the case where multiple rows in the data matrix correspond to one period of the input signal, multiple rows corresponding to one period are grouped together, and the number of identical groups in each low-rank matrix obtained by one or more decompositions is greater than or equal to 95% of its total number of groups.
[0159] In the above embodiments, considering that the rows or groups in the low-rank matrix correspond to the periodicity of the input signal, and that the low-rank matrix mainly or even entirely consists of normal elements, the rows or groups of each low-rank matrix can be as similar as possible. In other words, the number of identical rows or groups can be as large as possible. Setting the number of identical rows or groups in each low-rank matrix obtained in the matrix decomposition to be greater than or equal to 95% of its total number of rows or groups helps to ensure that the matrix decomposition is reasonable and effective, thereby improving the accuracy of anomaly detection.
[0160] In some embodiments, the number of differences between the sum of the low-rank matrices obtained from one or more decompositions and the data matrix is less than or equal to 5% of the total number of elements in the data matrix. Furthermore, when each row in the data matrix corresponds to one or more periods of the input signal, the number of identical rows in each of the low-rank matrices obtained from one or more decompositions is greater than or equal to 95% of its total number of rows. This better ensures the effectiveness of matrix decomposition and further improves the accuracy of anomaly detection.
[0161] Example 2:
[0162] This embodiment also provides a computer-readable storage medium. Those skilled in the art will understand that implementing all or part of the processes in the above embodiments can be accomplished by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0163] This embodiment also provides a computer program product, which includes: a computer program or instructions, which, when the computer program or instructions are run on a computer, cause the computer to perform a consistency test of any of the foregoing embodiments, an anomaly detection method.
[0164] Example 3:
[0165] This embodiment also provides an anomaly detection device for consistency testing, such as... Figure 17 As shown, Figure 17 This diagram illustrates the structure of an anomaly detection device for conformance testing according to an embodiment of this application. The anomaly detection device (i.e., anomaly data detection device) 6 for conformance testing includes a matrix forming module 61 and a matrix decomposition module 62. The matrix forming module 61 is used to store the input signal in the form of a data matrix based on the periodicity of the input signal of the device under test. The elements of the data matrix are data from the data stream corresponding to the input signal; each row in the data matrix corresponds to one or more periods of the input signal, or multiple rows in the data matrix correspond to one period of the input signal. The matrix decomposition module 62 is used to decompose the data matrix into a sparse matrix and one or more low-rank matrices, determine the positions of valid elements in the sparse matrix to determine the abnormal positions of the input signal, wherein the sum of the sparse matrix and one or more low-rank matrices is equal to the data matrix, and the valid elements are non-zero or non-empty elements.
[0166] In some examples, the number of differences between the sum of one or more low-rank matrices obtained by matrix factorization module 62 and the data matrix is less than or equal to 5% of the total number of elements in the data matrix.
[0167] In some examples, where each row in the data matrix corresponds to one or more periods of the input signal, the number of identical rows in each of the one or more low-rank matrices obtained by the matrix decomposition module 62 is greater than or equal to 95% of its total number of rows;
[0168] In the case where multiple rows in the data matrix correspond to one period of the input signal, multiple rows corresponding to one period are grouped together. The number of identical groups in each of the one or more low-rank matrices obtained by the matrix decomposition module 62 is greater than or equal to 95% of its total number of groups.
[0169] In some examples, the anomaly detection device for consistency testing also includes:
[0170] The data stream acquisition module is used to obtain the data stream corresponding to the input signal based on the input signal.
[0171] The judgment module is used to obtain one or more correlation coefficients based on the data stream and one or more codebooks, and to judge whether the data stream is normal based on the one or more correlation coefficients. Each correlation coefficient is used to characterize the degree of correlation between the data stream and a codebook.
[0172] In some examples, the data stream acquisition module is also used to obtain the data stream corresponding to the input signal based on the input signal and one or more level thresholds.
[0173] In some examples, when one or more codebooks include one or more normal codebooks, and the normal codebook is the codebook corresponding to the normal signal, the judgment module is also used to obtain one or more first correlation coefficients based on the data stream and one or more normal codebooks; if one of the one or more first correlation coefficients is greater than a first preset threshold, the first indication information is output, and the first indication information is used to characterize that the input signal is normal.
[0174] In some examples, when one or more codebooks include one or more abnormal codebooks, and the abnormal codebook is the codebook corresponding to the abnormal signal, the judgment module is also used to obtain one or more second correlation coefficients based on the data stream and one or more abnormal codebooks; if the largest of the one or more second correlation coefficients is greater than a second preset threshold, the second indication information is output, and the second indication information is used to indicate the abnormal cause corresponding to the largest second correlation coefficient.
[0175] In some examples, when the codebook includes one or more normal codebooks and one or more abnormal codebooks, where the normal codebook corresponds to the normal signal and the abnormal codebook corresponds to the abnormal signal, the judgment module is also used to obtain one or more third correlation coefficients based on the data stream and one or more normal codebooks; each third correlation coefficient is used to characterize the correlation between the data stream and a normal codebook; if one of the one or more third correlation coefficients is greater than a third preset threshold, third indication information is output, which is used to characterize that the input signal is normal; if any one of the one or more third correlation coefficients is less than the third preset threshold, one or more fourth correlation coefficients are obtained based on the data stream and one or more abnormal codebooks; each fourth correlation coefficient is used to characterize the correlation between the data stream and an abnormal codebook; when the largest fourth correlation coefficient among the one or more fourth correlation coefficients is greater than a fourth preset threshold, fourth indication information is output, which is used to indicate the abnormal cause corresponding to the largest fourth correlation coefficient.
[0176] In some examples, the exception codebook in the judgment module includes at least one of the following: polarity inversion codebook, word order inversion codebook, unGray encoded codebook, and user-defined exception codebook.
[0177] Example 4:
[0178] This embodiment also provides an instrument testing device, such as... Figure 18 As shown, Figure 18 This illustration shows a schematic diagram of an instrument testing device according to an embodiment of this application. The instrument testing device 11 includes one or more processors 111, a memory 112, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or otherwise installed as needed. The processor can process instructions executed within the instrument testing device 11, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface).
[0179] In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory units, if needed. Similarly, multiple instrumentation test devices 11 can be connected, each providing some of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system).
[0180] Processor 111 may be a central processing unit, a network processor, or a combination thereof. Processor 111 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPRS), or any combination thereof.
[0181] The memory 112 stores instructions executable by at least one processor 111 to cause the at least one processor 111 to perform the method shown in the above embodiments.
[0182] The memory 112 may include a program storage area and a data storage area. The program storage area may store the operating system and an application program required for at least one function. The data storage area may store data created by the use of the instrument testing device 11 as displayed on a mini-program landing page. In addition, the memory 112 may include high-speed random access memory and may also include non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device.
[0183] The memory 112 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 112 may also include a combination of the above types of memory.
[0184] The instrument testing device 11 also includes a communication interface 113 for communicating with other devices or communication networks.
[0185] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0186] Each of the above modules or units can be implemented through software or a combination of software and hardware. For example, the matrix forming module 61 and the matrix decomposition module 62 can both be implemented based on software.
[0187] In this application, "implemented through software" means that the processor reads and executes program instructions stored in memory to implement the functions corresponding to the aforementioned modules or units. Here, the processor refers to a processing circuit capable of executing program instructions, including but not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., and other processing circuits capable of running program instructions. In other embodiments, the processor may also include circuits with other processing functions (such as hardware circuits for hardware acceleration, bus and interface circuits, etc.). The processor can be presented as an integrated chip, for example, as an integrated chip whose processing function only includes executing software instructions, or it can also be presented as a SoC (system on a chip), that is, on a single chip, in addition to the processing circuit capable of running program instructions (usually referred to as the "core"), it also includes other hardware circuits for implementing specific functions (of course, these hardware circuits can also be implemented separately based on ASIC or FPGA). Correspondingly, the processing functions, in addition to executing software instructions, may also include various hardware acceleration functions (such as AI calculation, encoding / decoding, compression / decompression, etc.).
[0188] It should be noted that this application, when implemented through software or a combination of software and hardware, may use different software and is not limited to using only one type of software. For example, one module or unit may be implemented using a CPU, while another module or unit may be implemented using a DSP. Of course, it is not limited to using the same software (such as all being implemented through a CPU) for some or all modules or units.
[0189] The foregoing preferred embodiments have further illustrated the objectives, technical solutions, and advantages of the present invention. It should be understood that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method of anomaly detection for conformance testing, the method comprising: The application is applied to an instrument test device, comprising: storing an input signal of a device under test in a data matrix based on periodicity of the input signal, elements of the data matrix being data in a data stream corresponding to the input signal, each row of the data matrix corresponding to one or more periods of the input signal, or multiple rows of the data matrix corresponding to one period of the input signal; decomposing the data matrix into a sparse matrix and one or more low-rank matrices, determining positions of effective elements in the sparse matrix to determine abnormal positions of the input signal, wherein the sum of the sparse matrix and the one or more low-rank matrices is equal to the data matrix, the effective elements being non-zero or non-empty elements, and the number of difference elements of the sum of the one or more low-rank matrices and the data matrix is less than or equal to 5% of the total number of elements of the data matrix; obtaining a data stream corresponding to the input signal based on the input signal; obtaining one or more correlation coefficients based on the data stream and one or more codebooks, each correlation coefficient being used to represent a correlation degree of the data stream and a codebook; and judging whether the data stream is normal according to the one or more correlation coefficients.
2. The anomaly detection method of consistency testing according to claim 1, wherein, In the case that each row of the data matrix corresponds to one or more periods of the input signal, the number of identical rows of each low-rank matrix in the one or more low-rank matrices is greater than or equal to 95% of the total number of rows of the low-rank matrix itself. In the case that multiple rows of the data matrix correspond to one period of the input signal, the multiple rows corresponding to one period form a group, and the number of identical groups of each low-rank matrix in the one or more low-rank matrices is greater than or equal to 95% of the total number of groups of the low-rank matrix itself.
3. The anomaly detection method of consistency testing according to claim 1, wherein, The obtaining of the data stream corresponding to the input signal based on the input signal comprises: obtaining the data stream corresponding to the input signal based on the input signal and one or more level thresholds.
4. The anomaly detection method of consistency test according to claim 1 or 3, characterized in that, The one or more codebooks comprise one or more normal codebooks, the normal codebooks being codebooks corresponding to normal signals, and the one or more correlation coefficients comprise one or more first correlation coefficients, each first correlation coefficient being used to represent a correlation degree of the data stream and a normal codebook; The obtaining of the one or more correlation coefficients based on the data stream and one or more codebooks comprises: obtaining the one or more first correlation coefficients based on the data stream and the one or more normal codebooks; and If there is a first correlation coefficient greater than a first preset threshold in the one or more first correlation coefficients, first indication information is output, the first indication information being used to represent that the input signal is normal. The one or more codebooks comprise one or more abnormal codebooks, the abnormal codebooks being codebooks corresponding to abnormal signals, and the one or more correlation coefficients comprise one or more second correlation coefficients, each second correlation coefficient being used to represent a correlation degree of the data stream and an abnormal codebook; 5. The anomaly detection method of consistency test according to claim 1 or 3, characterized in that, obtaining one or more correlation coefficients based on the data stream and one or more codebooks; and determining whether the data stream is normal according to the one or more correlation coefficients, comprising: obtaining one or more second correlation coefficients based on the data stream and one or more abnormal codebooks; if a largest one of the one or more second correlation coefficients is greater than a second preset threshold, outputting second indication information, the second indication information being used to indicate an abnormal reason corresponding to the largest one of the second correlation coefficients.
6. The anomaly detection method of consistency test according to claim 1 or 3, characterized in that, The codebooks comprise one or more normal codebooks and one or more abnormal codebooks, the normal codebooks being codebooks corresponding to normal signals, and the abnormal codebooks being codebooks corresponding to abnormal signals; the one or more correlation coefficients comprise one or more third correlation coefficients and one or more fourth correlation coefficients, each third correlation coefficient being used to represent a correlation degree of the data stream and a normal codebook, and each fourth correlation coefficient being used to represent a correlation degree of the data stream and an abnormal codebook. obtaining one or more correlation coefficients based on the data stream and one or more codebooks; and determining whether the data stream is normal according to the one or more correlation coefficients, comprising: obtaining one or more third correlation coefficients based on the data stream and the one or more normal codebooks; if a third correlation coefficient in the one or more third correlation coefficients is greater than a third preset threshold, outputting third indication information, the third indication information being used to represent that the input signal is normal; if any third correlation coefficient in the one or more third correlation coefficients is less than the third preset threshold, obtaining one or more fourth correlation coefficients based on the data stream and one or more abnormal codebooks; if a largest one of the one or more fourth correlation coefficients is greater than a fourth preset threshold, outputting fourth indication information, the fourth indication information being used to indicate an abnormal reason corresponding to the largest one of the fourth correlation coefficients.
7. The anomaly detection method of consistency testing according to claim 5, wherein, The abnormal codebooks comprise at least one of the following: a polarity inversion codebook, a word order inversion codebook, a non-Grey coding codebook, and a user-defined abnormal codebook.
8. An instrument testing apparatus characterized by, comprising: a communication interface; a processor coupled to the communication interface and configured to perform the abnormality detection method of the consistency test according to any one of claims 1-7.
9. An anomaly detection apparatus of a conformance test, characterized by comprising: comprising: a matrix forming module configured to store an input signal of a device under test in a data matrix based on periodicity of the input signal, an element of the data matrix being data in a data stream corresponding to the input signal; each row of the data matrix corresponds to one period or multiple periods of the input signal, or multiple rows of the data matrix correspond to one period of the input signal. a matrix decomposition module configured to decompose the data matrix into one sparse matrix and one or more low-rank matrices, determine positions of valid elements in the sparse matrix to determine abnormal positions of the input signal, wherein the one sparse matrix and the one or more low-rank matrices are equal to the data matrix, the valid elements are non-zero or non-empty elements, and a number of difference elements between the one or more low-rank matrices and the data matrix is less than or equal to 5% of a total number of elements in the data matrix; a data stream obtaining module configured to obtain a data stream corresponding to the input signal based on the input signal; a judging module configured to obtain one or more correlation coefficients based on the data stream and one or more codebooks, each correlation coefficient being used to represent a correlation degree between the data stream and a codebook, and determine whether the data stream is normal according to the one or more correlation coefficients.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer programs or instructions; when the computer programs or instructions are run on a computer, the computer executes the anomaly detection method for consistency test according to any one of claims 1-7.
11. A computer program product, characterised in that, The computer program product comprises computer programs or instructions; when the computer programs or instructions are run on a computer, the computer executes the anomaly detection method for consistency test according to any one of claims 1-7.
Citation Information
Patent Citations
Device and method for positioning fault point in transmission network
CN101631050A
Consistency detection method and device, electronic equipment and computer readable storage medium
CN118244139A