Abnormal early warning method and device for real-time signal acquisition
Through the abnormal warning method of real-time signal acquisition, based on adjacent periodic data analysis, the problem of abnormal data events affecting efficiency in periodic sampling is solved, and abnormal warning and efficient data acquisition are realized.
Patent Information
- Application Number
- CN202510313502.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-29
Smart Images

Figure CN120386996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of anomaly warning, and in particular, to an anomaly warning method and device for real-time signal acquisition. Background Art
[0002] The necessity of real-time data acquisition in scientific research has become increasingly prominent, especially in research fields that require high precision, dynamic adjustment, and rapid response. It can not only accelerate the scientific research process but also enhance the depth and breadth of research.
[0003] Usually during application, a sampling period is set, and real-time acquisition data of a preset number of periods is obtained in a periodic sampling manner. Then subsequent analysis is carried out based on these data.
[0004] There is a big problem in the above method. If there are abnormal data events in periodic sampling, then systematic analysis and troubleshooting need to be carried out based on all the acquired data. If it does not affect subsequent analysis, no processing is required. However, once it affects subsequent analysis, generally the entire data needs to be discarded and re-sampled, which greatly affects the efficiency of overall data acquisition.
[0005] Therefore, it is necessary to design an anomaly warning method that can find out the abnormal data acquisition time periods as real-time as possible, carry out anomaly troubleshooting as early as possible, and improve work efficiency. Summary of the Invention
[0006] The purpose of the present invention is to at least solve one of the deficiencies of the prior art, and provide an anomaly warning method for real-time signal acquisition.
[0007] To achieve the above purpose, the present invention adopts the following technical solutions:
[0008] Specifically, an anomaly warning method for real-time signal acquisition is proposed, including the following:
[0009] Step 110: Determine the sampling period T, the number of sampling periods N, and the number of times M of real-time signal acquisition in each sampling period. Define a loop variable i and initialize it to i = 1, then go to step 120;
[0010] Step 120: Perform real-time signal acquisition in the i-th sampling period to obtain the i-th data sequence, then go to step 130;
[0011] Step 130: Determine whether i is equal to 1. If so, increase the value of i by 1 and go to step 120 to run. If not, go to step 140;
[0012] Step 140: Perform fluctuation anomaly analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain a fluctuation anomaly analysis result, then go to step 150;
[0013] Step 150: If the result of the fluctuation anomaly analysis in the i-th sampling period indicates an anomaly, issue an anomaly warning and stop data acquisition; if there is no anomaly, proceed to Step 160.
[0014] Step 160: Determine whether i is equal to N. If i is equal to N, stop data acquisition and output all data sequences; if not, increment the value of i by 1 and proceed to Step 120.
[0015] Furthermore, specifically, perform a fluctuation anomaly analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain the result of the fluctuation anomaly analysis, including:
[0016] Denote the (i - 1)-th data sequence as {T i-1 1, T i-1 2,..., T i-1 M}, where T i-1 j represents the j-th element in the (i - 1)-th data sequence, and j ∈ [1, M].
[0017] Using the real-time signal acquisition time of any element T i-1 1, T i-1 2,..., T i-1 M} in the (i - 1)-th data sequence as the x-coordinate and the value of T i-1 j as the y-coordinate, M data points in the xy coordinate system are obtained. i-1
[0018] Perform a curve algorithm fitting on these M data points in the xy coordinate system to obtain the characteristic curve of the (i - 1)-th data sequence, denoted as characteristic curve i - 1, and then translate the characteristic curve i - 1 T units in the positive x-axis direction to obtain the judgment curve.
[0019] Denote the i-th data sequence as {T i 1, T i 2,..., T i M}, where T i j represents the j-th element in the i-th data sequence.
[0020] Using the real-time signal acquisition time of any element T i 1, T i 2,..., T i M} in the i-th data sequence as the x-coordinate and the value of T i j as the y-coordinate, M data points in the xy coordinate system are obtained. i
[0021] Calculate the shortest distances from these M data points to the judgment curve respectively to obtain the shortest distance sequence {T i _zd1, T i _zd2, ..., T i _zdM}, T i _zdj represents the j-th element in the shortest distance sequence corresponding to the i-th data sequence;
[0022] Traverse {T i _zd1, T i _zd2, ..., T i _zdM}, find out the elements whose numerical values of any element are greater than the preset distance threshold and count the number as R;
[0023] Judge whether the value of R is greater than the preset quantity threshold. If it is greater than the preset quantity threshold, mark that there is a fluctuation anomaly in the i-th sampling period. If it is not greater than the preset quantity threshold, mark that there is no fluctuation anomaly in the i-th sampling period.
[0024] Furthermore, specifically, perform a curve algorithm fitting on M data points in the xy coordinate system based on the least squares method to obtain a characteristic curve.
[0025] Furthermore, the method further includes,
[0026] Set a dynamic compensation coefficient α, for the shortest distance sequence {T i _zd1, T i _zd2, ..., T i _zdM}, the calculation method of α is as follows,
[0027] Calculate the average value of {T i _zd1, T i _zd2, ..., T i _zdM} and denote it as avg_T i ;
[0028] Judge the numerical range interval where avg_T i is located, and read the value of α according to the numerical range interval where avg_T i is located;
[0029] Use the preliminary distance threshold * α as the preset distance threshold for this round of data judgment;
[0030] Among them, a mapping relationship between the numerical range interval and the value of α is pre-established, and a standard constant value is preset as the preliminary distance threshold.
[0031] Furthermore, the method further includes,
[0032] When the analysis result of the fluctuation anomaly in the i-th sampling period is abnormal, pack and send the data collected in the i-th sampling period and all previous sampling periods to the relevant management personnel.
[0033] The present invention also provides an abnormal warning device for real-time signal acquisition, including the following:
[0034] An initialization module, configured to determine a sampling period T, a number N of sampling periods, and a number M of times for real-time signal acquisition in each sampling period, define a loop variable i and initialize it to i = 1, and transfer to the data acquisition module for operation;
[0035] A data acquisition module, configured to perform real-time signal acquisition in the i-th sampling period to obtain the i-th data sequence, and transfer to the first conditional judgment module for operation;
[0036] A first conditional judgment module, configured to judge whether i is equal to 1. If so, increase the value of i by 1 and transfer to the data acquisition module for operation. If not, transfer to the fluctuation abnormal analysis module for operation;
[0037] A fluctuation abnormal analysis module, configured to perform fluctuation abnormal analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain a fluctuation abnormal analysis result, and transfer to the second conditional judgment module;
[0038] A second conditional judgment module, configured to, when the fluctuation abnormal analysis result of the i-th sampling period indicates that there is an abnormality, perform abnormal warning and stop data acquisition. If there is no abnormality, transfer to the third conditional judgment module;
[0039] A third conditional judgment module, configured to judge whether i is equal to N. If i is equal to N, stop data acquisition and output all data sequences. If i is not equal to N, increase the value of i by 1 and transfer to the data acquisition module for operation.
[0040] The beneficial effects of the present invention are as follows:
[0041] The present invention provides an abnormal warning method for real-time signal acquisition. Considering that the continuously sampled data in adjacent periods should have a certain degree of smoothness. Based on this, fluctuation abnormal analysis is performed on the sampled data in adjacent periods. When there is a fluctuation abnormality in the current sampling period, data sampling is first paused and an abnormal warning is given to inform relevant personnel to conduct abnormal troubleshooting. The abnormal warning method and device for real-time signal acquisition proposed by the present invention can monitor the data abnormality situation in the current sampling period, avoid wasting a lot of energy in subsequent data acquisition when there is indeed data abnormality, and thus improve the work efficiency of relevant staff. Description of the Drawings
[0042] By elaborating on the embodiments shown in the accompanying drawings, the above and other features of the present disclosure will become more apparent. In the accompanying drawings of the present disclosure, the same reference numerals represent the same or similar elements. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
[0043] Figure 1 The figure shows a flowchart of an abnormal warning method for real-time signal acquisition according to the present invention;
[0044] Figure 2 The figure shows a structural schematic diagram of an abnormal warning device for real-time signal acquisition according to the present invention. Detailed implementation manners
[0045] The following will clearly and completely describe the concept, specific structure, and technical effects generated by the present invention in combination with embodiments and drawings to fully understand the purpose, solution, and effects of the present invention. It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The same reference numerals used throughout the drawings indicate the same or similar parts.
[0046] Embodiment 1. Refer to Figure 1 The present invention provides an abnormal warning method for real-time signal acquisition, including the following:
[0047] Step 110: Determine the sampling period T, the number of sampling periods N, and the number of times M of real-time signal acquisition required in each sampling period. Define a loop variable i and initialize it to i = 1, then go to step 120;
[0048] Step 120: Perform real-time signal acquisition in the i-th sampling period to obtain the i-th data sequence, then go to step 130;
[0049] Step 130: Determine whether i is equal to 1. If it is, increase the value of i by 1 and go to step 120 to run. If not, go to step 140;
[0050] Step 140: Perform fluctuation abnormality analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain the fluctuation abnormality analysis result, then go to step 150;
[0051] Step 150: If the fluctuation abnormality analysis result in the i-th sampling period indicates that there is an abnormality, perform an abnormal warning and stop data acquisition. If there is no abnormality, go to step 160 to run;
[0052] Step 160 , determine whether i is equal to N. If it is equal to N, stop data collection and output all data sequences. If it is not equal to N, increase the value of i by 1 and go to step 120 to execute.
[0053] In this first embodiment, it is considered that the continuous period sampling data should have a certain degree of smoothness. Based on this, the fluctuation anomaly analysis of the adjacent period sampling data is performed. When the fluctuation anomaly exists in the current sampling period, data sampling is first suspended and an anomaly warning is issued to inform relevant personnel to conduct an anomaly investigation. The anomaly warning method for real-time acquisition signals proposed by the present invention can monitor data anomalies in the current sampling period, avoiding the waste of a large amount of energy on subsequent data collection when data anomalies do exist, thereby improving the work efficiency of relevant personnel.
[0054] As a preferred embodiment of the present invention, specifically, based on the i-th data sequence and the i-1-th data sequence, fluctuation anomaly analysis is performed to obtain fluctuation anomaly analysis results, including:
[0055] The i-1th data sequence is recorded as {T i-1 1. T i-1 2, ..., T i-1 M}, T i-1 j represents the jth element in the i-1th data sequence, j∈[1,M];
[0056] Take the i-1th data sequence {T i-1 1. T i-1 2, ..., T i-1 Any element T in M} i-1 j’s real-time signal acquisition time is taken as the x-coordinate, T i-1 The value of j is used as the y coordinate to obtain M data points located in the xy coordinate system;
[0057] Perform curve fitting on the M data points in the xy coordinate system to obtain the characteristic curve of the i-1th data sequence, which is recorded as characteristic curve i-1. Then, the characteristic curve i-1 is translated T times in the positive direction of the x-axis to obtain the judgment curve;
[0058] The i-th data sequence is recorded as {T i 1. T i 2, ..., T i M}, T i j represents the jth element in the i-th data sequence;
[0059] Take the i-th data sequence {T i 1. T i 2, ..., T i Any element T in M} i j’s real-time signal acquisition time is taken as the x-coordinate, Ti The value of j is used as the y - coordinate to obtain M data points located in the xy - coordinate system;
[0060] Calculate the shortest distance from each of these M data points to the decision curve to obtain the shortest - distance sequence {T i _zd1, T i _zd2,..., T i _zdM} corresponding to the i - th data sequence, where T i _zdj represents the j - th element in the shortest - distance sequence corresponding to the i - th data sequence;
[0061] Traverse {T i _zd1, T i _zd2,..., T i _zdM}, find the elements whose values of any element are greater than the preset distance threshold and count the number, denoted as R;
[0062] Judge whether the value of R is greater than the preset quantity threshold. If it is greater than the preset quantity threshold, mark that there is a fluctuation anomaly in the i - th sampling period; if it is not greater than the preset quantity threshold, mark that there is no fluctuation anomaly in the i - th sampling period.
[0063] In this preferred embodiment, considering that the continuously - sampled data in adjacent periods should have a certain smoothness, based on this, perform a fluctuation - anomaly analysis on the sampled data in adjacent periods. Use the relevant data of the previous period to perform curve fitting to obtain a characteristic curve representing the previous period (i.e., the estimated situation of the real - time data in the previous period). Based on this, considering the smoothness of the next period, translate the characteristic curve representing the previous period into the current period as an approximate standard line, and then use the above - mentioned method to make a smooth - estimation judgment on the distance from the data in the current period to the standard line. If the fluctuation is large, then it is considered that there is a warning event. At this time, let the staff conduct a verification. If not, continue sampling. If there is, conduct a check on relevant factors.
[0064] As a preferred embodiment of the present invention, specifically, perform a curve - algorithm fitting on the M data points in the xy - coordinate system based on the least - squares method to obtain a characteristic curve.
[0065] In this preferred embodiment, perform data - curve fitting by means of the least - squares method. Of course, other algorithms that can fit well are also acceptable.
[0066] As a preferred embodiment of the present invention, the method further includes,
[0067] Set a dynamic compensation coefficient α, and for the shortest - distance sequence {T i _zd1, T i _zd2,..., T i_zdM}, the calculation method of α is as follows.
[0068] Calculate {T i _zd1, T i _zd2,..., T i The average value of {_zdM} is denoted as avg_T i ;
[0069] Judge the numerical range interval where avg_T i is located, and read the value of α according to the numerical range interval where avg_T i is located;
[0070] Use the preliminary distance threshold * α as the preset distance threshold to perform data judgment for this round;
[0071] Among them, a mapping relationship is pre - established between the numerical range interval and the value of α, and a standard constant value is preset as the preliminary distance threshold.
[0072] In this preferred embodiment, considering that there may be more extreme values (the possibility of anomalies occurring is high at this time), not only the number of data with the shortest distance exceeding the range is considered, but also a balance process is performed on the overall shortest distance, and the adjustment of the threshold is determined according to the balance situation (average value situation) to balance the impact of this situation. The following is an example. For example, if avg_T i is in the range [a, b], and the mapping relationship of α associated with [a, b] pre - established is α = 0.8, then use 0.8 times the preliminary distance threshold as the preset distance threshold. That is to say, at this time, the fluctuation situation is large and the possibility of anomalies occurring is high, so the preset distance threshold is adjusted smaller to be more sensitive to anomalies.
[0073] As a preferred embodiment of the present invention, the method further includes
[0074] When the result of the fluctuation anomaly analysis in the i - th sampling period is that there is an anomaly, pack and send the data collected in the i - th sampling period and all previous sampling periods to the relevant management personnel.
[0075] In this preferred embodiment, considering the anomaly investigation of the relevant management personnel, all relevant data is packed and sent in advance for their reference and analysis.
[0076] Referring to Figure 2 , the present invention also proposes an abnormal early - warning device for real - time signal acquisition, including the following:
[0077] An initialization module 100, used to determine the sampling period T, the number of sampling periods N, the number of times M of real - time signal acquisition required in each sampling period, define a loop variable i and initialize it to make i = 1, and transfer to the data acquisition module for operation;
[0078] The data acquisition module 200 is used to perform real-time signal acquisition in the i-th sampling period to obtain the i-th data sequence, and then transfer to the first conditional judgment module for operation;
[0079] The first conditional judgment module 300 is used to judge whether i is equal to 1. If so, increase the value of i by 1 and transfer to the data acquisition module for operation. If not, transfer to the fluctuation anomaly analysis module for operation;
[0080] The fluctuation anomaly analysis module 400 is used to perform fluctuation anomaly analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain the fluctuation anomaly analysis result, and then transfer to the second conditional judgment module;
[0081] The second conditional judgment module 500 is used to, when the fluctuation anomaly analysis result in the i-th sampling period indicates that there is an anomaly, give an anomaly warning and stop data acquisition. If there is no anomaly, transfer to the third conditional judgment module;
[0082] The third conditional judgment module 600 is used to judge whether i is equal to N. If i is equal to N, stop data acquisition and output all data sequences. If i is not equal to N, increase the value of i by 1 and transfer to the data acquisition module for operation.
[0083] In this Embodiment 2, considering that the continuously sampled data in consecutive periods should have a certain smoothness. Based on this, fluctuation anomaly analysis is performed on the sampled data in adjacent periods. When there is a fluctuation anomaly in the current sampling period, data sampling is first paused and an anomaly warning is given to inform relevant personnel to conduct anomaly investigation. The anomaly warning device for real-time signal acquisition proposed by the present invention can monitor the data anomaly situation in the current sampling period, avoid wasting a lot of energy on subsequent data acquisition when there is indeed data anomaly, and thus improve the work efficiency of relevant staff.
[0084] Although the description of the present invention has been quite detailed and several of the described embodiments have been described in particular, it is not intended to be limited to any of these details or embodiments or any particular embodiment, but rather should be regarded as providing a broad interpretation of these claims in light of the prior art by reference to the appended claims, so as to effectively cover the intended scope of the present invention. In addition, the present invention has been described above in terms of embodiments foreseeable by the inventor for the purpose of providing a useful description, and those non-substantive modifications to the present invention that are not currently foreseeable may still represent equivalent modifications of the present invention.
[0085] As mentioned above, it is only the preferred embodiment of the present invention. The present invention is not limited to the above-mentioned implementation manners. As long as it achieves the technical effects of the present invention by the same means, it should fall within the protection scope of the present invention. Within the protection scope of the present invention, its technical solutions and / or implementation manners can have various different modifications and changes.
Claims
1. An abnormal warning method for real-time signal acquisition, characterized in that, including the following: Step 110: Determine the sampling period T, the number of sampling periods N, and the number of times M of real-time signal acquisition required in each sampling period. Define a loop variable i and initialize it to i = 1, then go to Step 120; Step 120: Perform real-time signal acquisition in the i-th sampling period to obtain the i-th data sequence, then go to Step 130; Step 130: Determine whether i is equal to 1. If it is, increase the value of i by 1 and go to Step 120 to run. If not, go to Step 140; Step 140: Perform fluctuation anomaly analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain the fluctuation anomaly analysis result, then go to Step 150; Step 150: If the fluctuation anomaly analysis result in the i-th sampling period indicates that there is an anomaly, issue an anomaly warning and stop data acquisition. If there is no anomaly, go to Step 160 to run; Step 160: Determine whether i is equal to N. If it is equal to N, stop data acquisition and output all data sequences. If it is not equal to N, increase the value of i by 1 and go to Step 120 to run.
2. The abnormal early warning method for real-time signal acquisition according to claim 1, wherein, Specifically, performing fluctuation anomaly analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain the fluctuation anomaly analysis result includes: Denote the (i - 1)-th data sequence as {T i-1 1, T i-1 2,..., T i-1 M}, T i-1 j represents the j-th element in the (i - 1)-th data sequence, where j ∈ [1, M]; Take the i-1th data sequence {T i-1 1. T i-1 2, ..., T i-1 Any element T in M} i-1 j’s real-time signal acquisition time is taken as the x-coordinate, T i-1 The value of j is used as the y coordinate to obtain M data points located in the xy coordinate system; Performing curve algorithm fitting on these M data points in the xy coordinate system to obtain the characteristic curve of the (i - 1)-th data sequence, denoted as characteristic curve i - 1, and then translating the characteristic curve i - 1 by T lengths in the positive x-axis direction to obtain the determination curve; Let the $i$-th data sequence be $\{T i _1, T i _2, \ldots, T i _M\}$, where $T i _j$ represents the $j$-th element in the $i$-th data sequence; Take the i-th data sequence {T i 1. T i 2, ..., T i Any element T in M} i j’s real-time signal acquisition time is taken as the x-coordinate, T i The value of j is used as the y coordinate to obtain M data points located in the xy coordinate system; Calculate the shortest distances from these M data points to the decision curve respectively to obtain the shortest distance sequence {T i _zd1, T i _zd2,..., T i _zdM} corresponding to the i-th data sequence, where T i _zdj represents the j-th element in the shortest distance sequence corresponding to the i-th data sequence; Traverse {T i _zd1, T i _zd2,..., T i _zdM}, find out the elements whose numerical value of any element is greater than the preset distance threshold and count the number, denoted as R; Determine whether the value of R is greater than the preset quantity threshold. If it is greater than the preset quantity threshold, mark that there is a fluctuation anomaly in the i-th sampling period. If it is not greater than the preset quantity threshold, mark that there is no fluctuation anomaly in the i-th sampling period.
3. The abnormal warning method for real-time signal acquisition according to claim 2 is characterized in that: Specifically, performing curve algorithm fitting on the M data points in the xy coordinate system based on the least squares method to obtain the characteristic curve.
4. An abnormal warning method for real-time signal acquisition according to claim 2, characterized in that The method further includes: Set the dynamic compensation coefficient α. For the shortest distance sequence {T i _zd1, T i _zd2,..., T i _zdM}, the calculation method of α is as follows: Calculate {T i _zd1, T i _zd2,..., T i _zdM}, and denote the average value as avg_T i ; Determine avg_T i in the numerical range interval it belongs to, and read the value of α according to the numerical range interval i to which avg_T belongs; Using the preliminary distance threshold *α as the preset distance threshold for this round of data judgment; Among them, a mapping relationship between the pre-established numerical range interval and the value of α is established, and a standard constant value is preset as the preliminary distance threshold.
5. The abnormal warning method for real-time signal acquisition according to claim 1, characterized in that, The method further includes: When the fluctuation anomaly analysis result in the i-th sampling period indicates that there is an anomaly, package the data collected in the i-th sampling period and all previous sampling periods and send it to the relevant management personnel.
6. An abnormal early warning device for real-time signal acquisition, characterized in that, including the following: Initialization module, used to determine the sampling period T, the number of sampling periods N, and the number of times M of real-time signal acquisition required in each sampling period. Define a loop variable i and initialize it to i = 1, then go to the data acquisition module to run; Data acquisition module, used to perform real-time signal acquisition in the i-th sampling period to obtain the i-th data sequence, then go to the first condition judgment module to run; First condition judgment module, used to determine whether i is equal to 1. If it is, increase the value of i by 1 and go to the data acquisition module to run. If not, go to the fluctuation anomaly analysis module to run; Fluctuation anomaly analysis module, used to perform fluctuation anomaly analysis based on the i-th data sequence and the (i - 1)-th data sequence to obtain the fluctuation anomaly analysis result, then go to the second condition judgment module; The second condition judgment module is used to, when the result of the fluctuation anomaly analysis in the i-th sampling period is that there is an anomaly, give an anomaly warning and stop data acquisition; if there is no anomaly, transfer to the third condition judgment module. The third condition judgment module is used to judge whether i is equal to N. If it is equal to N, stop data acquisition and output all data sequences; if it is not equal to N, increase the value of i by 1 and transfer to the data acquisition module for operation.