Dynamic threshold generation method, apparatus, device and storage medium
By acquiring historical data sets of monitoring indicators from the industrial control system and dynamically generating thresholds, the problem of erroneous alarms caused by traditional static thresholds is solved, thus improving the operation and maintenance efficiency of the industrial control system.
Patent Information
- Application Number
- CN202211135224.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-09-19
AI Technical Summary
Traditional methods for monitoring the operational status of industrial control systems rely on human experience to configure static thresholds, leading to frequent error alarms and reduced operational efficiency.
By acquiring historical data sets of monitoring indicators at different times, thresholds are dynamically generated. The thresholds of the monitoring indicators at corresponding times are obtained based on the historical data sets, and dynamic thresholds are generated based on the thresholds at different times.
Significantly reduces the number of error alarms, improves the efficiency of industrial control system operation and maintenance, meets the needs of massive monitoring indicators, and avoids manual configuration of thresholds.
Smart Images

Figure CN115563180B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of industrial control technology, and in particular relates to a dynamic threshold generation method, apparatus, device and storage medium. Background Technology
[0002] In the operation and maintenance of industrial control systems, operational status monitoring is an essential part. It provides maintenance personnel with operational status information of the industrial control system, monitors faults in real time, and provides alarms. Traditional operational status monitoring methods usually rely on human experience to manually configure static thresholds for monitoring indicators for monitoring and analysis. However, this method is often subject to human experience errors, which can easily lead to false alarms and reduce the operational efficiency of industrial control systems. Summary of the Invention
[0003] This application provides a dynamic threshold generation method, apparatus, device, and storage medium, which can solve the problem that existing technologies are prone to causing erroneous alarms and reducing the operation and maintenance efficiency of industrial control systems.
[0004] A first aspect of this application provides a dynamic threshold generation method, including:
[0005] Obtain historical data sets of the monitoring indicators at different times;
[0006] Based on the historical data set, the threshold values of the monitoring indicators at the corresponding times in the historical data set are obtained;
[0007] Based on the thresholds at different times, the dynamic thresholds of the monitoring indicators are obtained.
[0008] A second aspect of this application provides a dynamic threshold generation apparatus, comprising:
[0009] The historical data acquisition module is used to acquire historical data sets of monitoring indicators at different times.
[0010] A separate threshold acquisition module is used to obtain the threshold of the monitoring indicator at the corresponding time in the historical data set based on the historical data set.
[0011] The dynamic threshold acquisition module is used to obtain the dynamic threshold of the monitoring indicators based on the threshold at different times.
[0012] A third aspect of this application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the dynamic threshold generation method described above.
[0013] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the dynamic threshold generation method described above.
[0014] The dynamic threshold generation method provided in the first aspect of this application obtains historical data sets of monitoring indicators at different times, obtains the threshold of the monitoring indicator at the corresponding time of the historical data set, and obtains the dynamic threshold of the monitoring indicator based on the threshold at different times. The monitoring indicator has different thresholds at different times, so that the threshold of the monitoring indicator can change with time. Compared with the traditional static threshold, the operation and maintenance performance of the industrial control system is better, and the number of error alarms can be significantly reduced, thereby improving the efficiency of operation and maintenance.
[0015] It is understood that the beneficial effects of the second, third and fourth aspects mentioned above can be found in the relevant descriptions in the first aspect above, and will not be repeated here. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 A flowchart illustrating the dynamic threshold generation method provided in this application embodiment;
[0018] Figure 2 A flowchart illustrating step S12 provided in an embodiment of this application;
[0019] Figure 3 A flowchart illustrating step S21 provided in an embodiment of this application;
[0020] Figure 4 A flowchart illustrating step S31 provided in an embodiment of this application;
[0021] Figure 5 This is a flowchart illustrating step S42 provided in an embodiment of this application;
[0022] Figure 6 This is a flowchart illustrating step S32 provided in an embodiment of this application;
[0023] Figure 7 This is a flowchart illustrating step S22 provided in an embodiment of this application;
[0024] Figure 8 This is a schematic diagram of the structure of the dynamic threshold generation device provided in the embodiments of this application;
[0025] Figure 9This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0026] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.
[0027] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0028] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0029] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0030] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0031] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. "A plurality" means "two or more."
[0032] Example 1
[0033] Embodiment 1 of this application provides a dynamic threshold generation method, which can be executed by the processor of a terminal device when running a corresponding computer program. It is used to acquire historical data sets of monitoring indicators at different times, obtain the threshold of the monitoring indicator at the corresponding time of the historical data set, and obtain the dynamic threshold of the monitoring indicator based on the threshold at different times. This method can significantly reduce the number of false alarms and improve the efficiency of operation and maintenance.
[0034] like Figure 1 As shown, the dynamic threshold generation method provided in this embodiment includes the following steps S11 to S13:
[0035] S11. Obtain historical data sets of monitoring indicators at different times.
[0036] In application, the aforementioned monitoring indicators can be indicators related to the operating status of the industrial control system, such as flow rate indicators. The aforementioned historical data sets can be the operating status data of the monitoring indicators over the past several days, such as flow rate data for the past 30 days. Obtaining historical data sets of the monitoring indicators at different times can mean obtaining historical data sets of the monitoring indicators at each hour within a 24-hour period, such as obtaining flow rate data at 8:00, 9:00, 10:00, 11:00, and 12:00 every day for the past 30 days. The specific time slots can be determined by the operating time of the industrial control system.
[0037] S12. Based on the historical data set, obtain the threshold values of the monitoring indicators at the corresponding times in the historical data set.
[0038] In application, the above-mentioned method of obtaining the threshold of the monitoring indicator at the corresponding time in the historical data set can be based on the historical data set of the monitoring indicator at a certain time. For example, the threshold of the flow indicator at 9 o'clock can be obtained based on the historical data set of the flow indicator at 10 o'clock, and the threshold of the flow indicator at 10 o'clock can be obtained based on the historical data set of the flow indicator at 9 o'clock.
[0039] S13. Based on the thresholds at different times, obtain the dynamic thresholds of the monitoring indicators.
[0040] In application, the dynamic threshold of the monitoring indicator obtained based on the threshold at different times can be obtained by taking the threshold of the monitoring indicator at each hour within 24 hours, thus obtaining the dynamic threshold of the monitoring indicator including each hour within 24 hours.
[0041] The dynamic threshold generation method provided in this application obtains historical data sets of monitoring indicators at different times, obtains the threshold of the monitoring indicator at the corresponding time of the historical data set, and obtains the dynamic threshold of the monitoring indicator based on the threshold at different times. The monitoring indicator has different thresholds at different times, so that the threshold of the monitoring indicator can change with time. Compared with the traditional static threshold, the operation and maintenance performance of the industrial control system is better, which can significantly reduce the number of error alarms and improve the operation and maintenance efficiency. Moreover, the dynamic threshold of the monitoring indicator can be obtained based on the historical data set of the monitoring indicator, avoiding manual configuration of the threshold and meeting the needs of massive monitoring indicators.
[0042] Example 2
[0043] Embodiment 2 of this application provides a dynamic threshold generation method based on Embodiment 1, which can be executed by the processor of a terminal device when running a corresponding computer program.
[0044] like Figure 2 As shown, step S12 may include: S21, obtaining the baseline data set of the monitoring indicator at the corresponding time in the historical data set based on the historical data set; S22, calculating the threshold of the monitoring indicator at the corresponding time in the historical data set based on the baseline data set.
[0045] In applications, such as Figure 3 As shown, step S21 may include: S31, sorting and filtering the data in the historical data group to obtain the sample data group at the corresponding time of the historical data group; S32, dividing the data in the sample data group into multiple sample data groups, each sample data group containing multiple data; S33, calculating the mean square error of each sample data group, and taking the data in the sample data group with the smallest mean square error as the benchmark data group.
[0046] Furthermore, such as Figure 4 As shown, step S31 may include: S41, sorting and filtering the data in the historical data group to obtain the preliminary sample data group at the corresponding time of the historical data group; S42, dividing the preliminary sample data group into multiple preliminary sample groups, and obtaining the sample data group according to the preliminary sample groups.
[0047] Furthermore, such as Figure 5As shown, step S42 may include: S51, obtaining the number of first groups and the interval length based on the maximum value of the data in the preliminary sample data group; S52, setting numerical intervals in sequence with the number of first groups, the length of each numerical interval being the interval length; S53, filling the data in the preliminary sample data group into the corresponding numerical intervals, and taking the data in one numerical interval as a preliminary sample group; S54, summarizing the data in the preliminary sample group with the most data and the data in the two adjacent preliminary sample groups to obtain the sample data group.
[0048] Furthermore, such as Figure 6 As shown, step S32 may include: S61, calculating the number of second groups and the number of samples based on the preset reliability and the number of data in the sample data group; S62, taking values from the data in the sample data group through a sliding window with a length equal to the number of samples, to obtain sample data groups with a number equal to the number of second groups, wherein the number of data in each sample data group is the number of samples.
[0049] Furthermore, such as Figure 7 As shown, step S22 may include: S71, taking the maximum value of the data in the benchmark data group as the upper baseline value and the minimum value of the data in the benchmark data group as the lower baseline value; S72, calculating the upper tolerance boundary value based on the preset tolerance and the upper baseline value, and calculating the lower tolerance boundary value based on the preset tolerance and the lower baseline value; S73, using the upper tolerance boundary value and the lower tolerance boundary value as the threshold values of the monitoring indicator at the corresponding time in the historical data group.
[0050] Taking the traffic flow indicator as an example, the historical data set of the traffic flow indicator obtained is the traffic flow data at 9:00 AM every day for the past 30 days, as shown in Table 1:
[0051] 1 43.65 16 38.97 2 46.29 17 47.61 3 39.88 18 39.73 4 50.78 19 50.18 5 46.77 20 43.86 6 43.47 21 33.76 7 38.26 22 38.79 8 47.44 23 34.85 9 49.63 24 46.87 10 37.64 25 38.52 11 48.32 26 50.76 12 45.17 27 41.74 13 50.33 28 46.86 14 43.00 29 38.54 15 40.85 30 48.89
[0052] Table 1
[0053] Then step S41 can be to sort the flow data in Table 1 in ascending order and remove the maximum and minimum values to obtain the preliminary sample data set of flow index at point 9: {34.85, 37.64, 38.26, 38.52, 38.54, 38.79, 38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89, 49.63, 50.18, 50.33, 50.76}.
[0054] Step S51 can be to obtain the composite number 54 that is closest to 50.76 based on the maximum value of the data in the preliminary sample data group, and obtain the two factors 6 and 9 that are closest to each other of 54. Then, 9 is used as the number of the first group and 6 is used as the interval length.
[0055] Step S52 can be to set 9 numerical intervals in sequence as follows: [0, 6], [6.01, 12], [12.01, 18], [18.01, 24], [24.01, 30], [30.01, 36], [36.01, 42], [42.01, 48], [48.01, 54], with each numerical interval having a length of 6.
[0056] Step S53 can be to fill the data in the preliminary sample data group into the corresponding numerical ranges mentioned above, resulting in four preliminary sample groups as follows:
[0057] Preliminary sample group 1: {34.85};
[0058] Preliminary sample group two: {37.64, 38.26, 38.52, 38.54, 38.79, 38.97, 39.73, 39.88, 40.85, 41.74};
[0059] Preliminary sample group three: {43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61};
[0060] Preliminary sample group four: {48.32, 48.89, 49.63, 50.18, 50.33, 50.76}.
[0061] As can be seen from the above, the preliminary sample group three has the most data. Therefore, step S54 can be to summarize the data in the preliminary sample group three, the data in the preliminary sample group two, and the data in the preliminary sample group four to obtain the sample data group as follows: {37.64, 38.26, 38.52, 38.54, 38.79, 38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89, 49.63, 50.18, 50.33, 50.76}.
[0062] Step S61 can be based on a preset reliability of 0.8 and the number of data in the sample data group of 27, to calculate the number of samples: 27 × 0.8 = 21.6, round the result to get the number of samples as 21, and the number of the second group is 27 - 21 + 1 = 7.
[0063] Step S62 can be performed by taking values from the sample data group using a sliding window of length 21. Specifically, values are taken from the 1st to the 21st data point, from the 2nd to the 22nd data point, and so on, up to the 7th to the 27th data point. The resulting 7 sample data groups are as follows:
[0064] Sample data group 1: {37.64, 38.26, 38.52, 38.54, 38.79, 38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61};
[0065] Sample data group 2: {38.26, 38.52, 38.54, 38.79, 38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32};
[0066] Sample data group 3: {38.52, 38.54, 38.79, 38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89};
[0067] Sample data group four: {38.54, 38.79, 38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89, 49.63};
[0068] Sample data group five: {38.79, 38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89, 49.63, 50.18};
[0069] Sample data group six: {38.97, 39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89, 49.63, 50.18, 50.33};
[0070] Sample data group seven: {39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89, 49.63, 50.18, 50.33, 50.76}.
[0071] The number of data points in each sample data group is 21.
[0072] Step S33 can be to calculate the mean squared error of the above 7 sample data groups respectively, and the results are as follows: the mean squared error of sample data group 1 is 12.49, the mean squared error of sample data group 2 is 12.65, the mean squared error of sample data group 3 is 12.92, the mean squared error of sample data group 4 is 13.17, the mean squared error of sample data group 5 is 13.14, the mean squared error of sample data group 6 is 12.70, and the mean squared error of sample data group 7 is 11.96. As shown above, the sample data group seven has the smallest mean squared error. Therefore, the data in sample data group seven will be used as the baseline data group: {39.73, 39.88, 40.85, 41.74, 43.00, 43.47, 43.65, 43.86, 45.17, 46.29, 46.77, 46.86, 46.87, 47.44, 47.61, 48.32, 48.89, 49.63, 50.18, 50.33, 50.76}.
[0073] Step S71 can be to take the maximum value of 50.76 in the above-mentioned baseline data group as the upper baseline value of the dynamic baseline of the flow index at 9 points, and the minimum value of 39.73 as the lower baseline value of the dynamic baseline of the flow index at 9 points.
[0074] Step S72 can be to calculate the upper tolerance boundary value based on a preset tolerance such as 0.1 and the upper baseline value of 50.76: 50.76×(1+0.1)=55.84, and to calculate the lower tolerance boundary value based on a preset tolerance such as 0.1 and the lower baseline value of 39.73: 39.73×(1-0.1)=35.76.
[0075] The tolerance boundary value provides a permissible range for data to exceed the baseline. When real-time data values cross the tolerance boundary, the system will generate an alarm. Therefore, step S73 can use the upper tolerance boundary value of 55.84 and the lower tolerance boundary value of 35.76 as the threshold for the flow indicator at 9 o'clock. Similarly, based on historical data sets of complete hourly moments over 30 days, a dynamic threshold encompassing every hourly moment within a 24-hour period can be obtained.
[0076] The dynamic threshold generation method provided in this application utilizes historical data sets to form dynamic thresholds that include every hour within a 24-hour period. The monitored indicators have different thresholds at different times, allowing the thresholds of the monitored indicators to change over time. Compared with traditional static thresholds, this method provides superior performance for the operation and maintenance of industrial control systems, significantly reduces the number of error alarms, and improves the efficiency of operation and maintenance.
[0077] Example 3
[0078] like Figure 8 As shown, this embodiment also provides a dynamic threshold generation device, the dynamic threshold generation device 800 including:
[0079] The historical data acquisition module 801 is used to acquire historical data sets of monitoring indicators at different times.
[0080] The separate threshold acquisition module 802 is used to obtain the threshold of the monitoring indicator at the corresponding time in the historical data group based on the historical data group;
[0081] The dynamic threshold acquisition module 803 is used to obtain the dynamic threshold of the monitoring indicators based on the threshold at different times.
[0082] Optionally, the separate threshold acquisition module 802 includes:
[0083] The baseline data acquisition unit is used to obtain the baseline data set of the monitoring indicators at the corresponding time in the historical data set based on the historical data set.
[0084] A separate threshold calculation unit is used to calculate the threshold of the monitoring indicator at the corresponding time in the historical data set based on the baseline data set.
[0085] Optionally, the benchmark data acquisition unit includes:
[0086] The sample data acquisition unit is used to sort and filter the data in the historical data set to obtain the sample data set corresponding to the historical data set at the corresponding time.
[0087] The sample data grouping unit is used to divide the data in the sample data group into multiple sample data groups, and each sample data group contains multiple data;
[0088] The data variance calculation unit is used to calculate the mean squared error of each sample data group, and the data in the sample data group with the smallest mean squared error is used as the baseline data group.
[0089] Optionally, the sample data acquisition unit includes:
[0090] The preliminary sample acquisition unit is used to sort and filter the data in the historical data set to obtain the preliminary sample data set corresponding to the historical data set at the corresponding time.
[0091] The preliminary sample grouping unit is used to divide the preliminary sample data group into multiple preliminary sample groups, and obtain the sample data group based on the preliminary sample grouping.
[0092] Optionally, the initial sample grouping unit includes:
[0093] The first grouping determination unit is used to determine the number of first groups and the interval length based on the maximum value of the data in the preliminary sample data group;
[0094] The numerical interval setting unit is used to set numerical intervals in sequence, with the number of intervals being equal to the number of the first group. The length of each numerical interval is the interval length.
[0095] The numerical interval filling unit is used to fill the numerical interval with the data in the preliminary sample data group in sequence to obtain the preliminary sample grouping of the first group number;
[0096] The sample data aggregation unit is used to aggregate the data from the initial sample group with the most data and the data from the two adjacent initial sample groups to obtain a sample data group.
[0097] Optionally, the sample data grouping unit includes:
[0098] The second grouping determination unit is used to calculate the number of second groups and the number of samples based on the preset reliability and the number of data in the sample data group;
[0099] The sample data retrieval unit is used to retrieve data values from the sample data group through a sliding window with a length equal to the number of samples, resulting in sample data groups with a number equal to the number of the second group. The number of data in each sample data group is the number of samples.
[0100] Optionally, the individual threshold calculation unit includes:
[0101] The upper and lower baseline acquisition unit is used to take the maximum value of the data in the reference data group as the upper baseline value and the minimum value of the data in the reference data group as the lower baseline value.
[0102] The tolerance boundary acquisition unit is used to calculate the upper tolerance boundary value based on the preset tolerance and the upper baseline value, and to calculate the lower tolerance boundary value based on the preset tolerance and the lower baseline value.
[0103] The indicator threshold calculation unit is used to use the upper tolerance boundary value and the lower tolerance boundary value as the threshold values of the monitoring indicator at the corresponding time in the historical data set.
[0104] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0105] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0106] This application embodiment also provides a terminal device 900, such as... Figure 9 As shown, it includes a memory 901, a processor 902, and a computer program 903 stored in the memory 901 and executable on the processor 902. When the processor 902 executes the computer program 903, it implements the steps of the dynamic threshold generation method provided in the first aspect.
[0107] In applications, terminal devices may include, but are not limited to, processors and memory. Figure 9This is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than illustrated, or a combination of certain components, or different components, such as input / output devices, network access devices, etc. Input / output devices may include cameras, audio capture / playback devices, displays, etc. Network access devices may include network modules for wireless network communication with external devices.
[0108] In applications, the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0109] In applications, the memory may be an internal storage unit of the terminal device in some embodiments, such as the hard drive or RAM of the terminal device. In other embodiments, the memory may be an external storage device of the terminal device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. The memory may also include both internal and external storage units of the terminal device. The memory is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of computer programs. The memory can also be used to temporarily store data that has been output or will be output.
[0110] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.
[0111] This application implements all or part of the processes in the methods of the above embodiments, which can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.
[0112] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0113] Those skilled in the art will recognize that the device and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0114] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interface, or the device may be indirectly coupled or communicated, and may be electrical, mechanical, or other forms.
[0115] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A dynamic threshold generation method, characterized in that, include: Obtain historical data sets of the monitoring indicators at different times; Based on the historical data set, the threshold of the monitoring indicator at the corresponding time in the historical data set is obtained; Based on the threshold at different times, the dynamic threshold of the monitoring indicator is obtained; wherein, the dynamic threshold of the monitoring indicator is used to monitor the operating status of the industrial control system. The step of obtaining the threshold of the monitoring indicator at the corresponding time in the historical data set based on the historical data set includes: Based on the historical data set, the baseline data set of the monitoring indicator at the corresponding time in the historical data set is obtained; Based on the baseline data set, the threshold of the monitoring indicator at the corresponding time in the historical data set is calculated; The step of obtaining the baseline data set for the monitoring indicator at the corresponding time in the historical data set, based on the historical data set, includes: The data in the historical data group is sorted and filtered to obtain the sample data group corresponding to the time of the historical data group; The data in the sample data group is divided into multiple sample data groups, and each sample data group contains multiple data; Calculate the mean squared error for each of the sample data groups, and take the data in the sample data group with the smallest mean squared error as the baseline data group.
2. The dynamic threshold generation method as described in claim 1, characterized in that, The step of sorting and filtering the data in the historical data set to obtain the sample data set corresponding to the historical data set at the specified time includes: The data in the historical data set is sorted and filtered to obtain the preliminary sample data set corresponding to the time of the historical data set. The preliminary sample data group is divided into multiple preliminary sample groups, and the sample data group is obtained based on the preliminary sample groups.
3. The dynamic threshold generation method as described in claim 2, characterized in that, The step of dividing the preliminary sample data group into multiple preliminary sample groups, and obtaining the sample data group based on the preliminary sample groups, includes: Based on the maximum value of the data in the preliminary sample data group, the number of the first group and the interval length are obtained; Set numerical intervals in sequence, the number of which is equal to the number of the first group, and the length of each numerical interval is the interval length; Fill the data in the preliminary sample data group into the corresponding numerical range, and take the data in one numerical range as a preliminary sample group; The data from the preliminary sample group with the most data and the data from the two adjacent preliminary sample groups are combined to obtain the sample data group.
4. The dynamic threshold generation method as described in claim 1, characterized in that, The process involves dividing the data in the sample data group into multiple sample data groups, each of which contains multiple data items, including: The number of second groups and the number of samples are calculated based on the preset reliability and the number of data in the sample data group; The data in the sample data group is sampled by a sliding window with a length equal to the number of samples, resulting in sample data groups with a number equal to the number of the second group. The number of data in each sample data group is the same as the number of samples.
5. The dynamic threshold generation method as described in claim 1, characterized in that, The step of calculating the threshold of the monitoring indicator at the corresponding time in the historical data set based on the benchmark data set includes: The maximum value of the data in the reference data set is taken as the upper baseline value, and the minimum value of the data in the reference data set is taken as the lower baseline value. The upper tolerance boundary value is calculated based on the preset tolerance and the upper baseline value, and the lower tolerance boundary value is calculated based on the preset tolerance and the lower baseline value. The upper tolerance boundary value and the lower tolerance boundary value are used as the threshold values of the monitoring index at the corresponding time in the historical data set.
6. A dynamic threshold generation device, characterized in that, include: The historical data acquisition module is used to acquire historical data sets of monitoring indicators at different times. A separate threshold acquisition module is used to obtain the threshold of the monitoring indicator at the corresponding time in the historical data group based on the historical data group; A dynamic threshold acquisition module is used to obtain the dynamic threshold of the monitoring indicator based on the threshold at different times; wherein, the dynamic threshold of the monitoring indicator is used to monitor the operating status of the industrial control system. The individual threshold acquisition module includes: The baseline data acquisition unit is used to obtain the baseline data set of the monitoring indicators at the corresponding time in the historical data set based on the historical data set. A separate threshold calculation unit is used to calculate the threshold of the monitoring indicator at the corresponding time in the historical data set based on the baseline data set; The reference data acquisition unit includes: The sample data acquisition unit is used to sort and filter the data in the historical data set to obtain the sample data set corresponding to the historical data set at the corresponding time. The sample data grouping unit is used to divide the data in the sample data group into multiple sample data groups, and each sample data group contains multiple data; The data variance calculation unit is used to calculate the mean squared error of each sample data group, and the data in the sample data group with the smallest mean squared error is used as the baseline data group.
7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the dynamic threshold generation method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the dynamic threshold generation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for generating service threshold by historical data based on network monitoring indexes
CN105406991A