Instrument state detection method and device, storage medium and electronic equipment
Through continuous sampling of instrument signals and the application of multiple evaluation strategies, automated detection of instrument status is achieved, solving the problems of low detection efficiency and poor accuracy in the prior art, and improving detection efficiency and accuracy.
Patent Information
- Application Number
- CN202411009066.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-19
AI Technical Summary
The existing instrument status detection method requires a lot of manpower and time, has low detection efficiency, and the detection results are affected by personal experience, so the accuracy is poor.
By continuously sampling the instrument signal, data bad points are eliminated, frozen and blockage fault detection, data volatility evaluation and outlier value detection are carried out, and instrument status detection results are generated to achieve automated detection.
It reduces manpower consumption, improves detection efficiency and real-time performance, can promptly detect abnormal states of the instrument, avoid interference from human factors, and improves detection accuracy.
Smart Images

Figure CN118980401A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial automation, and in particular to an instrument state detection method and device, a storage medium and an electronic device. Background Art
[0002] Various types of measuring instruments are one of the widely used tools in industrial production scenarios. These instruments (i.e., measuring instruments) are used to measure various physical quantities such as pressure, temperature, flow, liquid level, voltage, current, etc. in the production process. The measurement results of the instruments play an important role in the industrial control process.
[0003] In order to ensure the accuracy of instrument measurement results, in industrial production scenarios, it is usually necessary to detect the status of the instrument to determine whether the instrument is still working properly. At present, the main way to detect the status of the instrument is to conduct regular manual on-site inspections, that is, staff regularly inspect each instrument equipment at the production site.
[0004] In actual production scenarios, there are usually a large number of instruments on the production site. Based on the existing instrument status detection method, a large number of instruments need to be inspected manually on site, which consumes a lot of manpower and time, and the detection efficiency is low. Secondly, the detection results of the instrument status are affected by personal experience and judgment, and some abnormalities that are not obvious externally are difficult to detect by manual inspection, which makes the accuracy of instrument status detection poor. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an instrument status detection method to solve the problems that the existing instrument status detection method requires a lot of manpower and time, has low detection efficiency, and the detection result is affected by personal experience and has poor detection accuracy.
[0006] The embodiment of the present invention also provides an instrument status detection device to ensure the actual implementation and application of the above method.
[0007] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0008] A method for detecting an instrument state, comprising:
[0009] When it is necessary to perform status detection on a target instrument, determining an original metering data set corresponding to the target instrument; the original metering data set includes a plurality of metering values obtained by continuously sampling an instrument signal of the target instrument;
[0010] Performing data bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set;
[0011] Determine a data set average value, a data set maximum value, and a data set minimum value corresponding to the target metering data set, and perform freezing and blocking fault detection on the target instrument based on the data set average value, the data set maximum value, and the data set minimum value to obtain a fault detection result; the fault detection result indicates whether the target instrument has a freezing or blocking fault;
[0012] Determining a target data volatility assessment strategy corresponding to the target instrument among a plurality of preset data volatility assessment strategies;
[0013] Based on the target data volatility assessment strategy, a data volatility assessment is performed on the target measurement data set to obtain a data volatility assessment result; the data volatility assessment result indicates whether there is an abnormal data volatility phenomenon in the target measurement data set;
[0014] Performing outlier detection on the target measurement data set to obtain an outlier detection result; the outlier detection result indicates whether there is an outlier in the target measurement data set;
[0015] A state detection result of the target meter is generated based on the fault detection result, the data volatility assessment result and the abnormal value detection result.
[0016] In the above method, optionally, the step of removing bad pixels from the original metering data set to obtain a target metering data set corresponding to the original metering data set includes:
[0017] For each measurement value in the original measurement data set, determining data information corresponding to the measurement value, the data information including a timestamp and a quality code corresponding to the measurement value;
[0018] According to the data information corresponding to each of the measurement values, detecting whether each of the measurement values is a data bad pixel, and marking the measurement value detected as a data bad pixel as a data value to be removed;
[0019] Each of the data values to be eliminated in the original metering data set is eliminated, and the original metering data set after the data elimination is completed is used as the target metering data set.
[0020] Optionally, the method described above includes performing data volatility assessment on the target measurement data set based on the target data volatility assessment strategy to obtain a data volatility assessment result, including:
[0021] According to a predetermined first time length, the target measurement data set is split into data to obtain a plurality of first sub-data sets corresponding to the target measurement data set;
[0022] For each of the first sub-datasets, based on each measurement value in the first sub-dataset, calculate the mean value and standard deviation corresponding to the first sub-dataset;
[0023] For each measurement value in each of the first sub-datasets, determining a volatility corresponding to the measurement value based on a mean value and a standard deviation corresponding to the first sub-dataset;
[0024] For each of the first sub-datasets, based on the volatility corresponding to each measurement value in the first sub-dataset, determining a volatility assessment result corresponding to the first sub-dataset, wherein the volatility assessment result corresponding to the first sub-dataset indicates whether there is an abnormal data fluctuation phenomenon in the first sub-dataset;
[0025] According to the volatility assessment results corresponding to each of the first sub-data sets, a first volatility assessment result corresponding to the target measurement data set is determined, and the first volatility assessment result is used as the data volatility assessment result.
[0026] Optionally, the method described above includes performing data volatility assessment on the target measurement data set based on the target data volatility assessment strategy to obtain a data volatility assessment result, including:
[0027] According to a predetermined second time length, the target measurement data set is split into data sub-data sets to obtain a plurality of second sub-data sets corresponding to the target measurement data set;
[0028] By using a preset average value evaluation method, each of the second sub-data sets is evaluated for average value, so as to obtain an average value evaluation result corresponding to each of the second sub-data sets; the average value evaluation method is a moving average method or an exponential smoothing method;
[0029] For each measurement value in each of the second sub-datasets, determining a difference index corresponding to the measurement value, the difference index representing a degree of difference between the measurement value and an average value evaluation result corresponding to the second sub-dataset;
[0030] For each of the second sub-datasets, based on the difference index corresponding to each measurement value in the second sub-dataset, determining a volatility assessment result corresponding to the second sub-dataset, wherein the volatility assessment result corresponding to the second sub-dataset indicates whether there is an abnormal data fluctuation phenomenon in the second sub-dataset;
[0031] According to the volatility assessment results corresponding to each of the second sub-data sets, the second volatility assessment result corresponding to the target measurement data set is determined, and the second volatility assessment result is used as the data volatility assessment result.
[0032] In the above method, optionally, performing outlier detection on the target measurement data set to obtain an outlier detection result includes:
[0033] Determining the quartile corresponding to the target measurement data set;
[0034] Based on the quartiles, determining the interquartile range corresponding to the target measurement data set;
[0035] Based on the quartiles and the interquartile range, an upper data limit value and a lower data limit value are calculated, and an interval formed by the upper data limit value and the lower data limit value is used as a target numerical interval;
[0036] For each measurement value in the target measurement data set, judging whether the measurement value is an abnormal value based on the target numerical interval, and obtaining a judgment result corresponding to the measurement value;
[0037] The outlier detection result is determined according to the judgment results corresponding to each measurement value in the target measurement data set.
[0038] The above method may optionally further include:
[0039] Determining an actual sampling frequency corresponding to the original measurement data set;
[0040] Determine a set sampling frequency corresponding to the target instrument;
[0041] Based on the actual sampling frequency and the set sampling frequency, a sampling frequency evaluation is performed on the target meter to obtain a sampling frequency evaluation result.
[0042] The above method may optionally further include:
[0043] If the outlier detection result indicates that an outlier exists in the target measurement data set, determining each outlier measurement value among each measurement value of the target measurement data set;
[0044] Obtaining data information corresponding to each of the abnormal measurement values;
[0045] The fault location is performed according to the data information corresponding to each of the abnormal measurement values to obtain a fault location result.
[0046] An instrument status detection device, comprising:
[0047] A first determination unit is used to determine an original metering data set corresponding to the target meter when a state detection of the target meter is required; the original metering data set includes a plurality of metering values obtained by continuously sampling an instrument signal of the target meter;
[0048] A data screening unit, used for performing bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set;
[0049] a fault detection unit, used to determine a data set average value, a data set maximum value, and a data set minimum value corresponding to the target metering data set, and based on the data set average value, the data set maximum value, and the data set minimum value, perform freezing and blocking fault detection on the target instrument to obtain a fault detection result; the fault detection result indicates whether the target instrument has a freezing or blocking fault;
[0050] A second determining unit, configured to determine a target data volatility assessment strategy corresponding to the target instrument from among a plurality of preset data volatility assessment strategies;
[0051] A volatility assessment unit, configured to perform data volatility assessment on the target measurement data set based on the target data volatility assessment strategy to obtain a data volatility assessment result; the data volatility assessment result indicates whether there is abnormal data volatility in the target measurement data set;
[0052] An outlier detection unit, configured to perform outlier detection on the target measurement data set to obtain an outlier detection result; the outlier detection result indicates whether there is an outlier in the target measurement data set;
[0053] The result generating unit is used to generate the state detection result of the target instrument based on the fault detection result, the data volatility assessment result and the abnormal value detection result.
[0054] A storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned instrument status detection method.
[0055] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to execute the above-mentioned instrument status detection method.
[0056] An instrument state detection method provided based on the above-mentioned embodiment of the present invention includes: when it is necessary to perform state detection on a target instrument, determining an original metering data set corresponding to the target instrument; the original metering data set includes a plurality of metering values obtained by continuously sampling an instrument signal of the target instrument; performing data bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set; determining a data set average value, a data set maximum value, and a data set minimum value corresponding to the target metering data set, and performing freezing and blocking fault detection on the target instrument based on the data set average value, the data set maximum value, and the data set minimum value to obtain a fault detection result; the fault detection result indicates whether the target instrument has freezing or blocking faults; determining a target data volatility evaluation strategy corresponding to the target instrument among a plurality of preset data volatility evaluation strategies; performing data volatility evaluation on the target metering data set based on the target data volatility evaluation strategy to obtain a data volatility evaluation result; the data volatility evaluation result indicates whether the target metering data set has data volatility abnormality; performing outlier detection on the target metering data set to obtain an outlier detection result; the outlier detection result indicates whether there is an outlier in the target metering data set; generating a state detection result of the target instrument based on the fault detection result, the data volatility evaluation result, and the outlier detection result. By applying the method provided in the embodiment of the present invention, based on the statistical analysis of the metering data set of the instrument, it is possible to detect whether the instrument has freezing or blocking faults, evaluate whether the metering data of the instrument has abnormal data fluctuations, and detect whether the metering data of the instrument has abnormal values, thereby realizing automatic detection of the instrument status. Based on the method provided in the present invention, automatic detection of the instrument status can be realized, which can reduce manpower consumption, help improve detection efficiency, and improve the real-time performance of instrument status detection, which is conducive to timely detection of abnormal status of the instrument for abnormal processing. Secondly, it can avoid the interference of human factors on the detection results, and can also identify abnormalities that are difficult to detect manually, which is conducive to improving the detection accuracy of the instrument status. In addition, in the process of instrument status detection, only the metering data of the instrument needs to be collected, the type of data used is simple, and the method of obtaining data is convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0058] Figure 1 A method flow chart of an instrument status detection method provided by an embodiment of the present invention;
[0059] Figure 2 A schematic diagram of an instrument signal in a normal state provided by an embodiment of the present invention;
[0060] Figure 3 A schematic diagram of an instrument signal with abnormal data fluctuation provided by an embodiment of the present invention;
[0061] Figure 4 A schematic diagram of an instrument signal with an abnormal value provided by an embodiment of the present invention;
[0062] Figure 5 A schematic diagram of an instrument status detection process provided by an embodiment of the present invention;
[0063] Figure 6 A schematic diagram of the structure of an instrument status detection device provided by an embodiment of the present invention;
[0064] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0067] The embodiment of the present invention provides an instrument status detection method, which can be applied to a monitoring system of a field instrument, and the execution subject can be a server of the monitoring system. The method flow chart of the method is as follows: Figure 1 As shown, including:
[0068] S101: When a state detection of a target instrument is required, determining an original metering data set corresponding to the target instrument; the original metering data set includes a plurality of metering values obtained by continuously sampling an instrument signal of the target instrument;
[0069] The method provided in the embodiment of the present invention can be applied to the status detection scenario of various on-site metering instruments, including AI (analog input) instruments and DI (digital input) instruments, which can specifically include temperature metering instruments, pressure metering instruments, flow metering instruments, etc. The metering value of the instrument usually changes over time, for example Figure 2 As shown, the curve is the instrument signal of a certain instrument in a normal state, and the measurement value in the instrument signal is in an up and down fluctuation state.
[0070] In the method provided by the embodiment of the present invention, the monitoring system can sample the instrument signal of each instrument in real time, obtain the metering data of each instrument, and store the metering data of each instrument in a real-time database. The monitoring system can periodically perform status detection on each instrument. When the time point for detecting the status of a certain instrument is reached, the instrument is used as the target instrument and the status detection is performed on the target instrument. The metering values obtained by continuously sampling the instrument signal of the target instrument are read from the real-time database to obtain the original metering data set corresponding to the target instrument. Specifically, the original metering data set may include the metering values of the instrument signal within a specified time period. For example, it can be set to detect the instrument once a day, so all the metering values of the instrument on that day can be used as the original metering data set in the time order of data sampling.
[0071] S102: performing bad pixel elimination processing on the original metrology data set to obtain a target metrology data set corresponding to the original metrology data set;
[0072] In the method provided by the embodiment of the present invention, the monitoring system first performs data bad point detection on each metering value in the original metering data set, and removes the metering values detected as data bad points in the original metering data set from the data set, and uses the data set after removing the data bad points as the target metering data set.
[0073] S103: determining a data set average value, a data set maximum value, and a data set minimum value corresponding to the target metering data set, and performing freezing and blocking fault detection on the target instrument based on the data set average value, the data set maximum value, and the data set minimum value to obtain a fault detection result; the fault detection result indicates whether the target instrument has freezing or blocking faults;
[0074] In the method provided by the embodiment of the present invention, the monitoring system calculates the average value based on all the metering values in the target metering data set, and takes the average value of all the metering values as the data set average value. The metering values in the target metering data set are compared in size to determine the maximum and minimum values in each metering value, and the maximum value in each metering value is taken as the maximum value of the data set, and the minimum value in each metering value is taken as the minimum value of the data set. According to the average value of the data set, the maximum value of the data set and the minimum value of the data set, it is detected whether the target instrument has a freezing or blocking fault, and a fault detection result is obtained. Specifically, the average value of the data set, the maximum value of the data set and the minimum value of the data set can be numerically compared. If the average value of the data set, the maximum value of the data set and the minimum value of the data set are all equal, it is determined that the target instrument has a freezing or blocking fault. In the application scenario of the instrument, the metering value of the instrument usually has a certain fluctuation, but when the instrument has a freezing or blocking problem, the metering value collected by the instrument usually does not change, that is, the waveform of the instrument signal is straight. Therefore, by comparing the average value of the data set, the maximum value of the data set and the minimum value of the data set, it can be detected whether the target instrument may have a freezing or blocking fault.
[0075] It should be noted that in actual application scenarios, there are other faults that manifest as the meter's measurement value no longer changing, such as sensor failure, line break or connection failure, range overrun, etc. Comparison based on the average value, maximum value and minimum value of the data set can also be used to detect the corresponding faults.
[0076] S104: Determine a target data volatility assessment strategy corresponding to the target instrument from among a plurality of preset data volatility assessment strategies;
[0077] In the method provided in the embodiment of the present invention, different data volatility assessment strategies can be pre-set in the monitoring system, that is, different methods for assessing data volatility, such as data volatility assessment based on Z-score, volatility assessment based on moving average, volatility assessment based on exponential smoothing value, etc. The monitoring system can use different data volatility assessment strategies for assessment of different types of instruments, so for each preset data volatility assessment strategy, the corresponding instrument type is pre-configured. The data volatility assessment method in each data volatility assessment strategy can adopt an existing assessment method, or other assessment methods can be configured as needed.
[0078] In the method provided by an embodiment of the present invention, during the state detection process of the target instrument, the monitoring system may select, according to the instrument type of the target instrument, a data volatility assessment strategy that matches the instrument type of the target instrument from various data volatility assessment strategies as the target data volatility assessment strategy.
[0079] S105: Based on the target data volatility assessment strategy, perform data volatility assessment on the target measurement data set to obtain a data volatility assessment result; the data volatility assessment result indicates whether there is abnormal data volatility in the target measurement data set;
[0080] In the method provided in the embodiment of the present invention, the monitoring system can perform data volatility assessment on the target metering data set through the target data volatility assessment strategy. Specifically, the volatility assessment index corresponding to each metering value in the target metering data set can be calculated through the target data volatility assessment strategy, and whether the fluctuation of each metering value in the target metering data set is normal can be judged on the basis of the above, so as to determine whether there is abnormal data fluctuation in the target metering data set, thereby obtaining the data volatility assessment result. It can be understood that when the meter is in a normal state, the metering value in the meter signal usually fluctuates within a certain range. When the metering value in the meter signal fluctuates violently beyond a certain range, it is usually regarded as that the meter is in an abnormal working state. For example Figure 3 An instrument signal with abnormal data fluctuation is shown. It can be seen that the instrument signal has obvious data fluctuation, such as the signal segment indicated by "instrument data fluctuation".
[0081] S106: performing outlier detection on the target measurement data set to obtain an outlier detection result; the outlier detection result indicates whether there is an outlier in the target measurement data set;
[0082] In the method provided in the embodiment of the present invention, the monitoring system can perform outlier detection on the target metering data set through a predetermined outlier detection method, that is, detect whether there are abnormal data values (i.e., outliers) in each metering value in the target metering data set, thereby obtaining an outlier detection result. The outlier detection result includes a conclusion on whether there are outliers in the target metering data set. If there are outliers in the target metering data set, the outlier detection result may also include metering values in the target metering data set that are determined to be outliers. It can be understood that when the meter is in a normal state, the metering values in the instrument signal usually show a certain change pattern. When abnormal metering values appear in the instrument signal, it is usually regarded that the meter is in an abnormal working state. For example Figure 4 An instrument signal with an abnormal value is shown, and it can be seen that there are measurement values in the instrument signal that are significantly different from most measurement values, such as the measurement value indicated by "instrument abnormal value". The detection method of the abnormal value in the embodiment of the present invention can adopt the existing data abnormal value detection method, and other abnormal value detection methods can also be configured as needed.
[0083] S107: Generate a state detection result of the target instrument based on the fault detection result, the data volatility assessment result and the abnormal value detection result.
[0084] In the method provided by the embodiment of the present invention, the monitoring system can generate a detection report for evaluating the metrological health status of the target instrument based on the fault detection result, the data volatility assessment result and the abnormal value detection result, and use the detection report as the status detection result of the target instrument. It can be understood that according to the fault detection result, the data volatility assessment result and the abnormal value detection result, the operating status of the target instrument can be described from the dimensions of instrument freezing and blocking faults, instrument data volatility and instrument data abnormal status, so as to present the metrological health status of the target instrument.
[0085] Based on the method provided by the embodiment of the present invention, when it is necessary to perform status detection on the target instrument, the original metering data set of the target instrument is determined, including multiple metering values obtained by continuously sampling the instrument signal of the target instrument; bad pixel removal processing is performed on the original metering data set to obtain a target metering data set corresponding to the original metering data set; the data set average value, data set maximum value and data set minimum value corresponding to the target metering data set are determined, and based on the data set average value, data set maximum value and data set minimum value, freezing and blocking fault detection is performed on the target instrument to obtain a fault detection result; among multiple preset data volatility evaluation strategies, a target data volatility evaluation strategy corresponding to the target instrument is determined; based on the target data volatility evaluation strategy, data volatility evaluation is performed on the target metering data set to obtain a data volatility evaluation result; outlier detection is performed on the target metering data set to obtain an outlier detection result; based on the fault detection result, the data volatility evaluation result and the outlier detection result, a status detection result of the target instrument is generated. By applying the method provided in the embodiment of the present invention, based on the statistical analysis of the metering data set of the instrument, it is possible to detect whether the instrument has freezing or blocking faults, evaluate whether the metering data of the instrument has abnormal data fluctuations, and detect whether the metering data of the instrument has abnormal values, thereby realizing automatic detection of the instrument status. Based on the method provided in the present invention, automatic detection of the instrument status can be realized, which can reduce manpower consumption, help improve detection efficiency, and improve the real-time performance of instrument status detection, which is conducive to timely detection of abnormal status of the instrument for abnormal processing. Secondly, it can avoid the interference of human factors on the detection results, and can also identify abnormalities that are difficult to detect manually, which is conducive to improving the detection accuracy of the instrument status. In addition, in the process of instrument status detection, only the metering data of the instrument needs to be collected, the type of data used is simple, and the method of obtaining data is convenient.
[0086] exist Figure 1 On the basis of the method shown in the figure, in the method provided by the embodiment of the present invention, the process of removing bad pixels from the original metering data set mentioned in step S102 to obtain a target metering data set corresponding to the original metering data set includes:
[0087] For each measurement value in the original measurement data set, determining data information corresponding to the measurement value, the data information including a timestamp and a quality code corresponding to the measurement value;
[0088] In the method provided by the embodiment of the present invention, during the collection and storage process of the measurement value, a timestamp and a quality code corresponding to the measurement value will be generated. The timestamp corresponding to the measurement value refers to the time data recording the time when the measurement value is generated, and the quality code corresponding to the measurement value is the characterization data for evaluating the data quality (such as data accuracy, data integrity, etc.) of the measurement value.
[0089] During the instrument status detection process, the monitoring system can obtain the timestamp and quality code of each measurement value in the original measurement data set, and use the timestamp and quality code corresponding to the measurement value as data information.
[0090] According to the data information corresponding to each of the measurement values, detecting whether each of the measurement values is a data bad pixel, and marking the measurement value detected as a data bad pixel as a data value to be removed;
[0091] In the method provided by the embodiment of the present invention, the monitoring system determines whether the data quality, data continuity and timing of each metering value in data collection are normal through the data information of each metering value in the original metering data set, so as to detect whether each metering value is a data bad point. If the metering value is detected as a data bad point, the metering value is marked as a data value to be eliminated.
[0092] Each of the data values to be eliminated in the original metering data set is eliminated, and the original metering data set after the data elimination is completed is used as the target metering data set.
[0093] In the method provided by the embodiment of the present invention, the monitoring system can remove the measurement values marked as bad points in the original measurement data set, that is, remove all data values to be removed from the original measurement data set, and use the original measurement data set after removing all data values to be removed as the target measurement data set.
[0094] It should be noted that, in the specific implementation process, whether there are bad data points in the original measurement data set, that is, whether there are data values to be eliminated, and the number of data values to be eliminated, are all determined by the actual detection situation. There may also be no bad data points in the original measurement data set. If there are no bad data points in the original measurement data set, the original measurement data set can be directly used as the target measurement data set.
[0095] exist Figure 1On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of performing data volatility assessment on the target measurement data set based on the target data volatility assessment strategy and obtaining the data volatility assessment result mentioned in step S105 includes:
[0096] According to a predetermined first time length, the target measurement data set is split into data to obtain a plurality of first sub-data sets corresponding to the target measurement data set;
[0097] In the method provided in the embodiment of the present invention, the target data volatility assessment strategy is to calculate the volatility based on the mean value and the standard deviation, thereby realizing the strategy of data volatility assessment. The data volatility assessment method in the embodiment of the present invention is generally applied to instruments with relatively stable measurement values under normal conditions, such as temperature measurement instruments, pressure measurement instruments, etc.
[0098] In the method provided by the embodiment of the present invention, a time length, i.e., a first time length, can be pre-set for splitting the data set. In the process of data volatility assessment, each measurement value in the target measurement data set can be split in time order according to the first time length, and each data set obtained by splitting is used as each first sub-data set. For example, if the first time length is five minutes, then five minutes is used as a time interval, and starting from the first measurement value in the target measurement data set, the measurement value generated every five minutes is used as a sub-data set.
[0099] For each of the first sub-datasets, based on each measurement value in the first sub-dataset, calculate the mean value and standard deviation corresponding to the first sub-dataset;
[0100] In the method provided by the embodiment of the present invention, for each first sub-dataset, the average value of each measurement value in the sub-dataset is calculated, and the average value of each measurement value is used as the average value corresponding to the sub-dataset, and the standard deviation of each measurement value in the sub-dataset is calculated, and the standard deviation of each measurement value is used as the standard deviation corresponding to the sub-dataset. The calculation method of the average value and the standard deviation can be as follows:
[0101]
[0102] Among them, Mean represents the average value of the data set, x i represents the i-th data point in the data set (i.e., the measurement value in the embodiment of the present invention), and n is the total number of data points. Variance represents the variance of the data set, which can measure the degree to which the data points deviate from the mean. Standard Deviation represents the standard deviation of the data set, which is the square root of the variance and represents the standard distance of the data points from the mean.
[0103] For each measurement value in each of the first sub-datasets, determining a volatility corresponding to the measurement value based on a mean value and a standard deviation corresponding to the first sub-dataset;
[0104] In the method provided by the embodiment of the present invention, for each first sub-data set, based on the mean value and standard deviation corresponding to the sub-data, the Z-score corresponding to each measurement value in the sub-data set is calculated, and the Z-score corresponding to each measurement value is used as the volatility corresponding to the measurement value. The calculation method of the volatility corresponding to the measurement value can be as follows:
[0105] Z=(x-Mean) / Standard Deviation (Formula 4)
[0106] Wherein, Z represents the volatility (i.e., Z-score) corresponding to the data point x (i.e., the measurement value), and the definitions of the remaining parameters can be found in the previous embodiments. The Z-score represents the distance between the data point and the mean value, measured in units of standard deviation.
[0107] For each of the first sub-datasets, based on the volatility corresponding to each measurement value in the first sub-dataset, determining a volatility assessment result corresponding to the first sub-dataset, wherein the volatility assessment result corresponding to the first sub-dataset indicates whether there is an abnormal data fluctuation phenomenon in the first sub-dataset;
[0108] In the method provided by the embodiment of the present invention, whether the data fluctuation in each first sub-dataset is abnormal is evaluated by the volatility of the measurement value in each first sub-dataset, that is, whether there is an abnormal data fluctuation phenomenon in the first sub-dataset is evaluated, so as to obtain the volatility evaluation result corresponding to each first sub-dataset. For example, a volatility threshold may be set in advance, and the volatility corresponding to the measurement value may be compared with the volatility threshold. If the volatility of the measurement value exceeds the volatility threshold, the measurement value is marked as a measurement value with abnormal fluctuation. If the number of measurement values marked as abnormal fluctuation in the first sub-dataset reaches a predetermined number threshold, it is considered that there is an abnormal data fluctuation phenomenon in the first sub-dataset.
[0109] According to the volatility assessment results corresponding to each of the first sub-data sets, a first volatility assessment result corresponding to the target measurement data set is determined, and the first volatility assessment result is used as the data volatility assessment result.
[0110] In the method provided by the embodiment of the present invention, based on the volatility assessment results corresponding to each first sub-data set, it is assessed whether there is a data fluctuation abnormality in the target measurement data set, thereby obtaining a first volatility assessment result, which is used as the data fluctuation assessment result. For example, if there is at least one volatility assessment result among the volatility assessment results corresponding to each first sub-data set that indicates that there is a data fluctuation abnormality in the corresponding first sub-data set, it is considered that there is a data fluctuation abnormality in the target measurement data set.
[0111] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of performing data volatility assessment on the target measurement data set based on the target data volatility assessment strategy and obtaining the data volatility assessment result mentioned in step S105 includes:
[0112] According to a predetermined second time length, the target measurement data set is split into data sub-data sets to obtain a plurality of second sub-data sets corresponding to the target measurement data set;
[0113] In the method provided in the embodiment of the present invention, the target data volatility assessment strategy is a strategy for implementing data volatility assessment based on a moving average or an exponential smoothing value. The data volatility assessment method in the embodiment of the present invention can be applied to meters whose metering values accumulate changes under normal conditions (i.e., cumulative meters), such as flow metering meters.
[0114] In the method provided by the embodiment of the present invention, a time length, namely, a second time length, is pre-set for splitting the data set. In the process of data volatility assessment, each measurement value in the target measurement data set can be split in time order according to the second time length, and each data set obtained by the splitting is used as each second sub-data set. For example, if the first time length is ten minutes, ten minutes is used as a time interval, and starting from the first measurement value in the target measurement data set, the measurement values generated every ten minutes are formed into a sub-data set.
[0115] By using a preset average value evaluation method, each of the second sub-data sets is evaluated for average value, so as to obtain an average value evaluation result corresponding to each of the second sub-data sets; the average value evaluation method is a moving average method or an exponential smoothing method;
[0116] In the method provided by the embodiment of the present invention, the average value corresponding to each second sub-data set is calculated by the moving average method or the exponential smoothing method, and the average value calculated thereby is used as the average value evaluation result corresponding to the second sub-data set. That is, if the moving average method is adopted, then for each second sub-data set, based on each measurement value in the sub-data set, a moving average value is calculated, and the calculated moving average value is used as the average value evaluation result corresponding to the sub-data set. If the exponential smoothing method is adopted, for each second sub-data set, based on each measurement value in the sub-data set, an exponential smoothing value is calculated, and the exponential smoothing value is used as the average value evaluation result corresponding to the sub-data set. It can be understood that in the process of evaluating data volatility, each second sub-data set uses the same method to calculate the average value evaluation result. The moving average method (i.e., the calculation principle of the moving average value) and the exponential smoothing method (i.e., the calculation principle of the exponential smoothing value) are both existing statistical methods, which will not be described in detail here. The calculation method of the moving average value and the calculation method of the exponential smoothing value can be shown as follows:
[0117]
[0118] ES t =ax t +(1-a)ES t-1 (Formula 6)
[0119] Among them, MAt represents the moving average corresponding to time t, k is the size of the moving window, and x i Indicates the data point corresponding to time point i. ES t represents the exponential smoothing value at time point t, a is the smoothing constant, x t is the data point at time t (i.e., the current data point), ES t-1 Represents the exponentially smoothed value at time t-1.
[0120] For each measurement value in each of the second sub-datasets, determining a difference index corresponding to the measurement value, the difference index representing a degree of difference between the measurement value and an average value evaluation result corresponding to the second sub-dataset;
[0121] In the method provided by an embodiment of the present invention, for each measurement value in each second sub-data set, the difference index corresponding to the measurement value is calculated based on the average value evaluation result corresponding to the sub-data set. For example, the difference between the measurement value and the average value evaluation result can be calculated, and the difference is used as the difference index corresponding to the measurement value.
[0122] For each of the second sub-datasets, based on the difference index corresponding to each measurement value in the second sub-dataset, determining a volatility assessment result corresponding to the second sub-dataset, wherein the volatility assessment result corresponding to the second sub-dataset indicates whether there is an abnormal data fluctuation phenomenon in the second sub-dataset;
[0123] In the method provided by the embodiment of the present invention, whether the data fluctuation in the second sub-dataset is abnormal is evaluated according to the difference index of each measurement value in the second sub-dataset, that is, whether there is an abnormal data fluctuation phenomenon is evaluated, and the volatility evaluation result corresponding to the second sub-dataset is obtained. For example, a difference index threshold value can be pre-set, and the difference index corresponding to the measurement value can be compared with the difference index threshold value. If the difference index of the measurement value exceeds the difference index threshold value, the measurement value is marked as a measurement value with abnormal fluctuation. If the number of measurement values marked as abnormal fluctuation in the second sub-dataset reaches a predetermined number threshold, the data fluctuation in the second sub-dataset is considered to be abnormal.
[0124] According to the volatility assessment results corresponding to each of the second sub-data sets, the second volatility assessment result corresponding to the target measurement data set is determined, and the second volatility assessment result is used as the data volatility assessment result.
[0125] In the method provided by the embodiment of the present invention, based on the volatility assessment results corresponding to each second sub-data set, it is assessed whether there is a data fluctuation abnormality in the target measurement data set, thereby obtaining a second volatility assessment result, which is used as the data fluctuation assessment result. For example, if there is at least one volatility assessment result among the volatility assessment results corresponding to each second sub-data set that indicates that there is a data fluctuation abnormality in the corresponding second sub-data set, it is considered that there is a data fluctuation abnormality in the target measurement data set.
[0126] It should be noted that the data volatility assessment method provided in the embodiment of the present invention is only for better illustrating the specific embodiment of the method provided by the present invention. In the specific implementation process, the moving average value and exponential smoothing value of the data set can also be combined to perform data volatility assessment on the data set.
[0127] exist Figure 1 On the basis of the method shown, in the method provided by the embodiment of the present invention, the process of performing outlier detection on the target measurement data set and obtaining an outlier detection result mentioned in step S106 includes:
[0128] Determining the quartile corresponding to the target measurement data set;
[0129] In the method provided by the embodiment of the present invention, the quartiles corresponding to the target metering data set are calculated according to each metering value in the target metering data set. Quartiles are an existing statistical analysis indicator and are not introduced in detail here. Specifically, the metering values in the target metering data set can be sorted in order from small to large, and the sorted data set can be divided into four equal parts, each containing 25% of the data points, and the quartiles corresponding to the target metering data set are determined accordingly. The quartiles corresponding to the target metering data set include the first quartile, the second quartile and the third quartile. The first quartile (Q1) is the value at the 25% position, the second quartile (Q2, i.e., the median) is the value at the 50% position, and the third quartile (Q3) is the value at the 75% position.
[0130] Based on the quartiles, determining the interquartile range corresponding to the target measurement data set;
[0131] In the method provided in the embodiment of the present invention, the interquartile range (IQR) is calculated based on the quartiles corresponding to the target measurement data set. The calculation method of the interquartile range (IQR) can be as follows:
[0132] IQR=Q3-Q1 (Formula 7)
[0133] Among them, IQR represents interquartile range, Q3 represents the third quartile, and Q1 represents the first quartile.
[0134] Based on the quartiles and the interquartile range, an upper data limit value and a lower data limit value are calculated, and an interval formed by the upper data limit value and the lower data limit value is used as a target numerical interval;
[0135] In the method provided by the embodiment of the present invention, according to the quartiles and interquartile range corresponding to the target measurement data set, a numerical upper limit (i.e., the data upper limit value) and a numerical lower limit (i.e., the data lower limit value) are calculated, thereby determining a target numerical range. It can be understood that the upper limit value of the target numerical range is the calculated data upper limit value, and the lower limit value of the target numerical range is the calculated data lower limit value. Specifically, the interquartile range can be multiplied by a predetermined coefficient (the predetermined coefficient is 1.5) to obtain a first product, and a difference operation is performed on the first quartile in the quartile and the first product, and the difference between the first quartile and the first product is used as the data lower limit value, and a sum operation is performed on the third quartile in the quartile and the first product, and the sum of the third quartile and the first product is used as the data upper limit value. The calculation method of the data upper limit value and the data lower limit value can be as follows:
[0136] LB=Q1-1.5×IQR (Equation 8)
[0137] UB=Q3+1.5×IQR (Equation 9)
[0138] Among them, LB represents the lower limit of the data, UB represents the upper limit of the data, IQR represents the interquartile range, Q1 represents the first quartile, and Q3 represents the third quartile.
[0139] For each measurement value in the target measurement data set, judging whether the measurement value is an abnormal value based on the target numerical interval, and obtaining a judgment result corresponding to the measurement value;
[0140] In the method provided by the embodiment of the present invention, for each measurement value in the target measurement data set, the measurement value is compared with the upper and lower limits of the target numerical interval to determine whether the measurement value falls within the target numerical interval. If the measurement value falls within the target numerical interval, it is considered that the measurement value is not an abnormal value. If the measurement value does not fall within the target numerical interval, it is considered that the measurement value is an abnormal value, thereby obtaining a judgment result corresponding to the measurement value, which characterizes whether the measurement value is an abnormal value.
[0141] The outlier detection result is determined according to the judgment results corresponding to each measurement value in the target measurement data set.
[0142] In the method provided by the embodiment of the present invention, the outlier detection result is determined according to the judgment results corresponding to each measurement value, that is, if there is a judgment result representing that the measurement value is an outlier among the judgment results corresponding to each measurement value, that is, there is a measurement value determined to be an outlier, then it is considered that there is an outlier in the target measurement data set. If there is no measurement value determined to be an outlier, then there is no outlier in the target measurement data set.
[0143] exist Figure 1 On the basis of the method shown, the method provided in the embodiment of the present invention further includes:
[0144] Determining an actual sampling frequency corresponding to the original measurement data set;
[0145] Determine a set sampling frequency corresponding to the target instrument;
[0146] In the method provided by the embodiment of the present invention, the monitoring system can calculate the actual sampling frequency of the original metering data set through the timestamps corresponding to each metering value in the original metering data set. The sampling frequency set for the target meter is obtained from the pre-stored meter configuration data, and the pre-set sampling frequency is used as the set sampling frequency corresponding to the target meter.
[0147] Based on the actual sampling frequency and the set sampling frequency, a sampling frequency evaluation is performed on the target meter to obtain a sampling frequency evaluation result.
[0148] In the method provided by the embodiment of the present invention, the monitoring system can evaluate the target instrument in the dimension of sampling frequency through the actual sampling frequency and the set sampling frequency to obtain a sampling frequency evaluation result, and the sampling frequency evaluation result represents whether there is an abnormality in the sampling frequency of the target instrument. For example, the actual sampling frequency and the set sampling frequency can be compared to analyze whether the actual sampling frequency and the set sampling frequency are consistent, so as to determine whether there is a sampling frequency abnormality, thereby causing data abnormality. At the same time, the actual sampling frequency can be tested for frequency fluctuation to identify whether the sampling frequency fluctuates or mutates, and then used to identify whether there is a sensor failure or data transmission problem.
[0149] exist Figure 1 On the basis of the method shown, the method provided in the embodiment of the present invention further includes:
[0150] If the outlier detection result indicates that an outlier exists in the target measurement data set, determining each outlier measurement value among each measurement value of the target measurement data set;
[0151] In the method provided by the embodiment of the present invention, if the outlier detection result indicates that an outlier exists in the target measurement data set, the measurement value marked as an outlier in the target measurement data set may be used as the abnormal measurement value.
[0152] Obtaining data information corresponding to each of the abnormal measurement values;
[0153] The fault location is performed according to the data information corresponding to each of the abnormal measurement values to obtain a fault location result.
[0154] In the method provided in the embodiment of the present invention, the monitoring system can obtain data information such as the timestamp of each abnormal measurement value, and locate the time of the fault occurrence according to the timestamp in the data information of each abnormal measurement value, thereby obtaining a fault location result.
[0155] In order to better illustrate the method provided by the embodiment of the present invention, on the basis of the methods provided by the above embodiments, in combination with actual application scenarios, the embodiment of the present invention provides another instrument status detection method. The instrument status detection method provided by the embodiment of the present invention can be implemented based on the instrument monitoring system, which mainly includes a data acquisition module, a real-time database (used to store and manage data that changes over time, which needs to be read and written quickly), a calculation module and an instrument health report module. The data acquisition module uses a field bus to connect the sensors and actuators of each instrument, collects the metering values of each instrument in real time, and converts and encapsulates the collected metering values and writes them into the real-time database in real time. The calculation module reads the metering values in the real-time database, and calculates the required various statistical indicators according to the pre-configured calculation method, including mean, maximum, minimum, variance, standard deviation, quartile, interquartile range, Z-score, moving average, exponential smoothing value, etc., and performs abnormal value detection, fault detection and data volatility evaluation on the instrument status according to various statistical indicators, so as to obtain the detection result of the instrument status. The instrument health report module generates an instrument health report based on the instrument status detection results, which may include abnormal measurement value warning, diagnostic analysis, health status score and other contents.
[0156] like Figure 5 As shown, the instrument status detection process provided by the embodiment of the present invention mainly includes:
[0157] The measurement values of field instruments are collected in real time and stored in a real-time database via remote transmission.
[0158] When status detection is required, the required metering data set can be obtained from the real-time database;
[0159] After obtaining the metering data set, first perform timestamp analysis and collection frequency evaluation on the metering data set. Timestamp analysis mainly checks the timestamp corresponding to the metering value to determine the continuity and timing of data collection. At the same time, based on the timestamp and quality code, the bad points of the metering value are identified, the bad points in the metering data set are removed, and the data after the bad points are removed is applied to the subsequent state analysis. The collection frequency evaluation mainly analyzes whether the actual collection frequency of the instrument is consistent with the set frequency of the instrument to determine whether there may be data anomalies caused by abnormal collection frequency. Identify fluctuations or mutations in the collection frequency to identify whether there may be sensor failures or data transmission problems.
[0160] Based on the metering data set after removing bad data points, instrument status analysis, instrument volatility analysis and instrument outlier analysis are performed respectively.
[0161] Regarding the instrument status analysis, it is mainly to compare the average value, maximum value and minimum value of the metering data set. If the average value, maximum value and minimum value are consistent, it is judged that the instrument corresponding to the metering data set may have a problem of blockage or freezing.
[0162] Regarding instrument volatility analysis, it is mainly based on the instrument type, and the volatility (Z-score), moving average evaluation or exponential smoothing value evaluation method is selected as needed to evaluate the volatility of the meter values in the metering data set, identify whether the data fluctuates within the normal range, and identify whether the instrument has abnormal data fluctuations.
[0163] The analysis of meter outliers is mainly based on quartiles to analyze whether there are abnormal metering values in the metering data set, so as to identify whether there may be metering failures or metering errors. The time and location of the fault can be located by combining the timestamp and acquisition frequency of the outliers.
[0164] Based on the method provided by the embodiment of the present invention, the automatic detection of the instrument status can be realized, and the instrument health assessment report can be generated regularly, providing a basis for the instrument engineer to maintain and make decisions on the metering instrument. Compared with the traditional on-site inspection of instruments, it is difficult to find the freezing and blocking problems of on-site instruments. The method provided by the embodiment of the present invention can realize the regular monitoring and early warning of the instrument status, improve the timeliness and economy of instrument status detection, and ensure the stability and safety of instrument operation.
[0165] and Figure 1 Corresponding to the instrument status detection method shown in FIG. 1 , the embodiment of the present invention further provides an instrument status detection device for detecting Figure 1 The specific implementation of the method shown in FIG. 1 is a schematic diagram of the structure of the device. Figure 6 As shown, including:
[0166] The first determination unit 201 is used to determine an original metering data set corresponding to the target meter when a state detection of the target meter is required; the original metering data set includes a plurality of metering values obtained by continuously sampling an instrument signal of the target meter;
[0167] A data screening unit 202 is used to perform bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set;
[0168] The fault detection unit 203 is used to determine the data set average value, data set maximum value and data set minimum value corresponding to the target metering data set, and perform freezing and blocking fault detection on the target instrument based on the data set average value, the data set maximum value and the data set minimum value to obtain a fault detection result; the fault detection result indicates whether the target instrument has freezing or blocking fault;
[0169] A second determining unit 204 is used to determine a target data volatility assessment strategy corresponding to the target instrument from among a plurality of preset data volatility assessment strategies;
[0170] The volatility assessment unit 205 is used to perform data volatility assessment on the target measurement data set based on the target data volatility assessment strategy to obtain a data volatility assessment result; the data volatility assessment result indicates whether there is abnormal data fluctuation in the target measurement data set;
[0171] An outlier detection unit 206 is used to perform outlier detection on the target measurement data set to obtain an outlier detection result; the outlier detection result indicates whether there is an outlier in the target measurement data set;
[0172] The result generating unit 207 is used to generate a state detection result of the target instrument based on the fault detection result, the data volatility assessment result and the abnormal value detection result.
[0173] By using the device provided by the embodiment of the present invention, based on the statistical analysis of the metering data set of the instrument, it is possible to detect whether the instrument has freezing or blocking faults, evaluate whether the metering data of the instrument has abnormal data fluctuations, and detect whether the metering data of the instrument has abnormal values, thereby realizing automatic detection of the instrument status. Based on the device provided by the present invention, automatic detection of the instrument status can be realized, which can reduce manpower consumption, help improve detection efficiency, and improve the real-time performance of instrument status detection, which is conducive to timely detection of abnormal status of the instrument for abnormal processing. Secondly, it can avoid the interference of human factors on the detection results, and can also identify abnormalities that are difficult to detect manually, which is conducive to improving the detection accuracy of the instrument status. In addition, in the process of instrument status detection, only the metering data of the instrument needs to be collected, the type of data used is simple, and the method of obtaining data is convenient.
[0174] exist Figure 6 On the basis of the device shown, the device provided by the embodiment of the present invention can be further expanded into multiple units. The function of each unit can refer to the description of each embodiment provided for the instrument status detection method above, and no further examples will be given here.
[0175] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned instrument status detection method.
[0176] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 7As shown, it specifically includes a memory 301 and one or more instructions 302, wherein the one or more instructions 302 are stored in the memory 301 and are configured to be executed by one or more processors 303 to perform the following operations:
[0177] When it is necessary to perform status detection on a target instrument, determining an original metering data set corresponding to the target instrument; the original metering data set includes a plurality of metering values obtained by continuously sampling an instrument signal of the target instrument;
[0178] Performing data bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set;
[0179] Determine a data set average value, a data set maximum value, and a data set minimum value corresponding to the target metering data set, and perform freezing and blocking fault detection on the target instrument based on the data set average value, the data set maximum value, and the data set minimum value to obtain a fault detection result; the fault detection result indicates whether the target instrument has a freezing or blocking fault;
[0180] Determining a target data volatility assessment strategy corresponding to the target instrument among a plurality of preset data volatility assessment strategies;
[0181] Based on the target data volatility assessment strategy, a data volatility assessment is performed on the target measurement data set to obtain a data volatility assessment result; the data volatility assessment result indicates whether there is an abnormal data volatility phenomenon in the target measurement data set;
[0182] Performing outlier detection on the target measurement data set to obtain an outlier detection result; the outlier detection result indicates whether there is an outlier in the target measurement data set;
[0183] A state detection result of the target meter is generated based on the fault detection result, the data volatility assessment result and the abnormal value detection result.
[0184] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0185] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0186] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting an instrument state, characterized in that: include: When it is necessary to perform status detection on a target instrument, determining an original metering data set corresponding to the target instrument; The original metering data set includes a plurality of metering values obtained by continuously sampling the meter signal of the target meter; Performing data bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set; Determine a data set average value, a data set maximum value, and a data set minimum value corresponding to the target metering data set, and perform freezing and blocking fault detection on the target instrument based on the data set average value, the data set maximum value, and the data set minimum value to obtain a fault detection result; The fault detection result indicates whether the target instrument has a freezing or blocking fault; Determining a target data volatility assessment strategy corresponding to the target instrument among a plurality of preset data volatility assessment strategies; Based on the target data volatility assessment strategy, performing data volatility assessment on the target measurement data set to obtain a data volatility assessment result; The data volatility assessment result indicates whether the target measurement data set has abnormal data fluctuation phenomenon; Performing outlier detection on the target measurement data set to obtain an outlier detection result; The outlier detection result indicates whether there is an outlier in the target measurement data set; A state detection result of the target meter is generated based on the fault detection result, the data volatility assessment result and the abnormal value detection result.
2. The instrument status detection method according to claim 1, characterized in that: The step of performing bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set includes: For each measurement value in the original measurement data set, determining data information corresponding to the measurement value, the data information including a timestamp and a quality code corresponding to the measurement value; According to the data information corresponding to each of the measurement values, detecting whether each of the measurement values is a data bad pixel, and marking the measurement value detected as a data bad pixel as a data value to be removed; Each of the data values to be eliminated in the original metering data set is eliminated, and the original metering data set after the data elimination is completed is used as the target metering data set.
3. The instrument status detection method according to claim 1, characterized in that: The step of performing data volatility assessment on the target measurement data set based on the target data volatility assessment strategy to obtain a data volatility assessment result includes: According to a predetermined first time length, the target measurement data set is split into data to obtain a plurality of first sub-data sets corresponding to the target measurement data set; For each of the first sub-datasets, based on each measurement value in the first sub-dataset, calculate the mean value and standard deviation corresponding to the first sub-dataset; For each measurement value in each of the first sub-datasets, determining a volatility corresponding to the measurement value based on a mean value and a standard deviation corresponding to the first sub-dataset; For each of the first sub-datasets, based on the volatility corresponding to each measurement value in the first sub-dataset, determining a volatility assessment result corresponding to the first sub-dataset, wherein the volatility assessment result corresponding to the first sub-dataset indicates whether there is an abnormal data fluctuation phenomenon in the first sub-dataset; According to the volatility assessment results corresponding to each of the first sub-data sets, a first volatility assessment result corresponding to the target measurement data set is determined, and the first volatility assessment result is used as the data volatility assessment result.
4. The instrument status detection method according to claim 1, characterized in that: The step of performing data volatility assessment on the target measurement data set based on the target data volatility assessment strategy to obtain a data volatility assessment result includes: According to a predetermined second time length, the target measurement data set is split into data sub-data sets to obtain a plurality of second sub-data sets corresponding to the target measurement data set; By using a preset average value evaluation method, each of the second sub-data sets is evaluated for average value, so as to obtain an average value evaluation result corresponding to each of the second sub-data sets; the average value evaluation method is a moving average method or an exponential smoothing method; For each measurement value in each of the second sub-datasets, determining a difference index corresponding to the measurement value, the difference index representing a degree of difference between the measurement value and an average value evaluation result corresponding to the second sub-dataset; For each of the second sub-datasets, based on the difference index corresponding to each measurement value in the second sub-dataset, determining a volatility assessment result corresponding to the second sub-dataset, wherein the volatility assessment result corresponding to the second sub-dataset indicates whether there is an abnormal data fluctuation phenomenon in the second sub-dataset; According to the volatility assessment results corresponding to each of the second sub-data sets, the second volatility assessment result corresponding to the target measurement data set is determined, and the second volatility assessment result is used as the data volatility assessment result.
5. The instrument status detection method according to claim 1, characterized in that: The performing outlier detection on the target measurement data set to obtain an outlier detection result includes: Determining the quartile corresponding to the target measurement data set; Based on the quartiles, determining the interquartile range corresponding to the target measurement data set; Based on the quartiles and the interquartile range, an upper data limit value and a lower data limit value are calculated, and an interval formed by the upper data limit value and the lower data limit value is used as a target numerical interval; For each measurement value in the target measurement data set, judging whether the measurement value is an abnormal value based on the target numerical interval, and obtaining a judgment result corresponding to the measurement value; The outlier detection result is determined according to the judgment results corresponding to each measurement value in the target measurement data set.
6. The instrument status detection method according to claim 1, characterized in that: Also includes: Determining an actual sampling frequency corresponding to the original measurement data set; Determine a set sampling frequency corresponding to the target instrument; Based on the actual sampling frequency and the set sampling frequency, a sampling frequency evaluation is performed on the target meter to obtain a sampling frequency evaluation result.
7. The instrument status detection method according to claim 1, characterized in that: Also includes: If the outlier detection result indicates that an outlier exists in the target measurement data set, determining each outlier measurement value among each measurement value of the target measurement data set; Obtaining data information corresponding to each of the abnormal measurement values; The fault location is performed according to the data information corresponding to each of the abnormal measurement values to obtain a fault location result.
8. An instrument status detection device, characterized in that: include: A first determining unit, configured to determine an original metering data set corresponding to a target meter when a state detection of the target meter is required; The original metering data set includes a plurality of metering values obtained by continuously sampling the meter signal of the target meter; A data screening unit, used for performing bad pixel elimination processing on the original metering data set to obtain a target metering data set corresponding to the original metering data set; a fault detection unit, used to determine a data set average value, a data set maximum value, and a data set minimum value corresponding to the target metering data set, and perform freezing and blocking fault detection on the target instrument based on the data set average value, the data set maximum value, and the data set minimum value to obtain a fault detection result; The fault detection result indicates whether the target instrument has a freezing or blocking fault; A second determining unit, configured to determine a target data volatility assessment strategy corresponding to the target instrument from among a plurality of preset data volatility assessment strategies; A volatility assessment unit, configured to perform data volatility assessment on the target measurement data set based on the target data volatility assessment strategy to obtain a data volatility assessment result; The data volatility assessment result indicates whether the target measurement data set has abnormal data fluctuation phenomenon; An outlier detection unit, used to perform outlier detection on the target measurement data set to obtain an outlier detection result; The outlier detection result indicates whether there is an outlier in the target measurement data set; The result generating unit is used to generate the state detection result of the target instrument based on the fault detection result, the data volatility assessment result and the abnormal value detection result.
9. A storage medium, characterized in that: The storage medium includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the instrument status detection method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The device comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the instrument status detection method according to any one of claims 1 to 7.
