Self-adaptive storage method and system for time sequence data of chemical device
By collecting time sequence data in chemical equipment and distinguishing data types based on alarm status and fluctuation conditions, adaptively selecting storage solutions and using efficient compression algorithms, the data squeezing problem is solved, and the efficiency and real-time nature of data storage and transmission are achieved.
Patent Information
- Application Number
- CN202311372111.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-04-22
AI Technical Summary
During the production process, due to the high data collection frequency of chemical equipment, the time series data volume continues to increase, resulting in data squeezing problems, affecting the real-time and authenticity of production safety status analysis.
By collecting the timing data of each monitoring point, distinguishing abnormal characteristic data from normal characteristic data based on the alarm status and fluctuation conditions, adaptively selecting storage solutions, and using an efficient adaptive compression algorithm for data compression and decompression.
Without affecting the analysis of the safety production risk state, the reduction of data storage burden and the improvement of real-time transmission are achieved, the data compression ratio and compression rate are maximized, and the key process data with high information entropy is provided.
Smart Images

Figure CN119861861A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method for adaptively storing time series data of a chemical plant and a system for adaptively storing time series data of a chemical plant. Background Art
[0002] In order to ensure the safe and stable operation of the production process of chemical plants, most companies use industrial control systems such as DCS, PLC, SCADA, SIS, etc. to ensure the stability of the chemical process and the integrity of equipment and facilities. In this process, a large number of process temperature, pressure, liquid level and equipment vibration, speed, temperature and other production parameters need to be collected. The data collection cycle can be as short as milliseconds, resulting in a large number of data collection, processing and storage tasks in the production process of chemical plants, which brings great pressure to the data transmission bandwidth in the enterprise's safe production process. Therefore, it is necessary to efficiently compress the time series data of chemical production plants to save the storage space of chemical production data and reduce the time and space overhead of data transmission and permanent storage.
[0003] The data in chemical production equipment can be roughly divided into three categories: the first is the state quantity of the switch that controls the transmitter; the second is the state quantity of the switch that detects various valves and rotating equipment; the third is the analog quantity of temperature, pressure, liquid level and vibration, speed and temperature that monitor the stability of the process and the integrity of the equipment. Since the production parameters of various state quantities change at a low frequency, the space overhead occupied by data acquisition and transmission is small and no compression is required. Since the acquisition frequency of analog signals such as temperature, pressure, and speed can reach up to 400Hz, the amount of data in the acquisition process is also increasing, which will lead to the problem of squeezing the time series data of chemical equipment, thereby affecting the real-time and authenticity of the analysis and judgment of the safety production status of chemical equipment. Therefore, how to reduce the data storage burden and improve the real-time transmission under the premise of ensuring that the main information of chemical time series data is not lost has important research significance. Based on this, it is urgent to propose a new time series data storage scheme for chemical equipment. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method and system for adaptively storing time series data of a chemical plant, so as to at least solve the problem of squeezing of time series data of a chemical plant caused by the continuous increase in the amount of data during the collection process.
[0005] In order to achieve the above-mentioned purpose, the first aspect of the present invention provides a method for adaptively storing time series data of a chemical plant, the method comprising: collecting time series data sent back by each monitoring point, and distinguishing the alarm status of each monitoring point based on the time series data; based on the alarm status of each monitoring point, calibrating the transmission data message of each monitoring point; based on the calibration result of each transmission data message, adaptively selecting a storage scheme for the corresponding transmission data; executing the storage scheme to store each storage data.
[0006] Optionally, the alarm status of each monitoring point is distinguished based on the time series data, including: matching the alarm threshold value of the corresponding monitoring point based on each time series data, and determining the alarm level of each time series data; obtaining the alarm priority level of each monitoring point based on a preset alarm priority determination rule corresponding to each monitoring point; forming a binary array of the corresponding monitoring point based on the alarm level of the time series data of each monitoring point and the alarm priority level of the corresponding monitoring point; and determining the alarm status level of the corresponding monitoring point based on the binary array of each monitoring point.
[0007] Optionally, the preset alarm priority determination rules include: determining the severity level of the alarm consequences of the corresponding monitoring point based on the importance level of the monitored object of the monitoring point in the preset chemical plant knowledge graph, each monitoring point corresponds to an alarm consequence severity level, and the entire chemical plant includes multiple alarm consequence severity levels; determining the alarm allowable response time of the corresponding monitoring point based on the maximum time that the monitoring point can continue to operate after a failure, and based on the alarm allowable response time of each monitoring point, the alarm allowable response time level is divided into levels according to the preset time interval division rules to obtain the alarm allowable response time level of each monitoring point, and the entire chemical plant includes multiple alarm allowable response time levels; traversing the pairwise combination relationships of multiple alarm consequence severity levels and multiple alarm allowable response time levels, calibrating an alarm priority level for each pairwise combination relationship, and obtaining an alarm priority level comparison table as the preset alarm priority determination rules.
[0008] Optionally, the alarm status of each monitoring point is distinguished based on the time series data, including: processing the time series data of each monitoring point in the previous monitoring cycle based on a sliding window method to obtain n data groups at m consecutive moments; calculating the mean and variance of each data group as the distribution characteristics of the corresponding data group; comparing the distribution characteristics of the corresponding data group with the distribution characteristics of the data groups in the previous two monitoring cycles adjacent to the corresponding data group, and determining the data fluctuation situation of the corresponding monitoring point based on the comparison result; determining the abnormal data fluctuation state of the corresponding monitoring point based on the fluctuation situation as the alarm state of the corresponding monitoring point.
[0009] Optionally, the data fluctuation determination rule and abnormal data fluctuation state determination rule of each monitoring point are:
[0010]
[0011] in, is the mean of the i-th data group; is the variance of the ith data group.
[0012] Optionally, the alarm status of each monitoring point includes: a high / low characteristic status and / or an abnormal data fluctuation status.
[0013] Optionally, the corresponding transmission data message calibration of each monitoring point includes: if there is no alarm state at the monitoring point, or the alarm state is a low characteristic state, or the alarm state is a non-abnormal data fluctuation, then the transmission data message calibration of the target monitoring point is performed based on the normal data message calibration scheme; if the alarm state of the monitoring point is a high characteristic state, then the transmission data message calibration of the target monitoring point is performed based on the first abnormal data message calibration scheme; if the alarm state of the monitoring point is an abnormal data fluctuation, then the transmission data message calibration of the target monitoring point is performed based on the second abnormal data message calibration scheme; wherein the calibration identifiers of the normal data message calibration scheme, the first abnormal data message calibration scheme and the second abnormal data message calibration scheme are different.
[0014] Optionally, based on the calibration results of each transmission data message, a storage scheme corresponding to the transmission data is adaptively selected, including: if the calibration result of the transmission data message is the result of calibration by a normal data message calibration scheme, transmission data compression is performed based on preset data compression rules, data transmission is performed based on the compressed transmission data, and the compressed transmission data is decompressed and stored when data needs to be stored; if the calibration result of the transmission data message is the result of calibration by the first abnormal data message calibration scheme or the second abnormal data message calibration scheme, the transmission data is directly stored.
[0015] Optionally, the preset data compression rules include: in response to a trigger signal that identifies a data point to be compressed, initializing the data compression tolerance and the standard deviation of the current data set; compressing the transmitted data based on the SDT compression algorithm to complete this compression interval; calculating the standard deviation of this compression interval, and combining it with the standard deviation of the previous compression interval to obtain a new data compression tolerance; and using the new data compression tolerance as the initialization data compression tolerance for the next compression interval.
[0016] Optionally, the decompressing and storing the compressed transmission data when data needs to be stored includes: determining two adjacent compressed data points of the data to be decompressed; decompressing the data between the two adjacent compressed data points based on a decompression algorithm to obtain complete data; wherein the decompression algorithm is:
[0017]
[0018] Among them, x A and x B Adjacent compressed data points A and B; x i I have data between point A and point B; t A is the sampling time of compressed data point A; t Bis the sampling time of compressed data point B.
[0019] The second aspect of the present invention provides a chemical plant time series data adaptive storage system, the system comprising: a collection unit, used to collect the time series data sent back by each monitoring point, and distinguish the alarm status of each monitoring point based on the time series data; a calibration unit, used to calibrate the transmission data message of each monitoring point based on the alarm status of each monitoring point; a scheme determination unit, used to adaptively select the storage scheme of the corresponding transmission data based on the calibration result of each transmission data message; a storage unit, used to execute the storage scheme and store each storage data.
[0020] A third aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, enables the computer to execute the above-mentioned method for adaptively storing timing data of a chemical plant.
[0021] A fourth aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for adaptively storing timing data of a chemical plant when executing the computer program.
[0022] Through the above technical scheme, the scheme of the present invention identifies the abnormal characteristic data and normal characteristic data of the device according to the alarm status and fluctuation of the production data points of the device, and formulates a data adaptive compression transmission processing method for the normal characteristic data, so as to achieve the retention of the fluctuation characteristics of the normal data without affecting the analysis of the safety production risk state, and maximize the data compression ratio and compression rate. According to the alarm status and abnormal fluctuation state, the key characteristic information in the time series data is retained, and the compression and decompression of the conventional time series data is realized by using an efficient adaptive compression algorithm, so as to solve the problems of huge amount of data, unclear information characteristics and high data processing overhead in the safety production process of chemical equipment, realize the efficient integration of the time series data of chemical equipment, and provide key process data with high information entropy for the safety production risk state analysis of chemical equipment.
[0023] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0025] Figure 1 It is a flowchart of the steps of a method for adaptively storing time series data of a chemical plant provided by one embodiment of the present invention;
[0026] Figure 2 It is a system structure diagram of a chemical plant time series data adaptive storage system provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0027] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0028] In order to ensure the safe and stable operation of the production process of chemical plants, most companies use industrial control systems such as DCS, PLC, SCADA, SIS, etc. to ensure the stability of the chemical process and the integrity of equipment and facilities. In this process, a large number of process temperature, pressure, liquid level and equipment vibration, speed, temperature and other production parameters need to be collected. The data collection cycle can be as short as milliseconds, resulting in a large number of data collection, processing and storage tasks in the production process of chemical plants, which brings great pressure to the data transmission bandwidth in the enterprise's safe production process. Therefore, it is necessary to efficiently compress the time series data of chemical production plants to save the storage space of chemical production data and reduce the time and space overhead of data transmission and permanent storage.
[0029] The data in chemical production equipment can be roughly divided into three categories: the first is the state quantity of the switch that controls the transmitter; the second is the state quantity of the switches of various valves and rotating equipment; the third is the analog quantity of temperature, pressure, liquid level and vibration, speed and temperature that monitor the stability of the process and the integrity of the equipment. Since the production parameters of various state quantities change at a low frequency, the space overhead occupied by data acquisition and transmission is small and no compression is required. Since the acquisition frequency of analog signals such as temperature, pressure, and speed can reach up to 400Hz, the amount of data in the acquisition process is also increasing, which will lead to the problem of squeezing the time series data of chemical equipment, thereby affecting the real-time and authenticity of the analysis and judgment of the safety production status of chemical equipment. Therefore, how to reduce the data storage burden and improve the real-time transmission under the premise of ensuring that the main information of chemical time series data is not lost is of great research significance.
[0030] Based on this, the scheme of the present invention proposes an adaptive storage method for time series data of a chemical plant. The scheme of the present invention identifies abnormal feature data and normal feature data of the plant according to the alarm status and fluctuation of the production data points of the plant, and formulates a data adaptive compression transmission processing method for normal feature data, so as to achieve the retention of normal data fluctuation characteristics without affecting the analysis of production safety risk status, and maximize the data compression ratio and compression rate. The key feature information in the time series data is retained according to the alarm status and abnormal fluctuation status, and the compression and decompression of conventional time series data are realized by using an efficient adaptive compression algorithm, so as to solve the problems of huge amount of data for safety risk assessment in the production safety process of chemical plants, unclear information characteristics, and high data processing overhead, realize efficient integration of chemical plant time series data, and provide key process data with high information entropy for the analysis of production safety risk status of chemical plants.
[0031] Figure 1 This is a flow chart of a method for adaptively storing time series data of a chemical plant provided by one embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a method for adaptively storing time series data of a chemical plant, the method comprising:
[0032] Step S10: collecting the time series data sent back by each monitoring point, and distinguishing the alarm status of each monitoring point based on the time series data.
[0033] Specifically, the method of distinguishing the alarm status of each monitoring point based on the time series data includes: matching the alarm threshold value of the corresponding monitoring point based on each time series data to determine the alarm level of each time series data; obtaining the alarm priority level of each monitoring point based on the preset alarm priority level determination rule corresponding to each monitoring point; forming a binary array of the corresponding monitoring point based on the alarm level of the time series data of each monitoring point and the alarm priority level of the corresponding monitoring point; and determining the alarm status level of the corresponding monitoring point based on the binary array of each monitoring point.
[0034] Furthermore, the preset alarm priority determination rules include: determining the severity level of the alarm consequences of the corresponding monitoring point based on the importance level of the monitored object of the monitoring point in the preset chemical plant knowledge graph, each monitoring point corresponds to an alarm consequence severity level, and the entire chemical plant includes multiple alarm consequence severity levels; determining the alarm allowable response time of the corresponding monitoring point based on the maximum time that the monitoring point can continue to operate after a failure, and based on the alarm allowable response time of each monitoring point, the alarm allowable response time level is divided into levels according to the preset time interval division rules to obtain the alarm allowable response time level of each monitoring point, and the entire chemical plant includes multiple alarm allowable response time levels; traversing the pairwise combination relationship between multiple alarm consequence severity levels and multiple alarm allowable response time levels, calibrating an alarm priority level for each pairwise combination relationship, and obtaining an alarm priority level comparison table as the preset alarm priority determination rule.
[0035] Embodiment 1:
[0036] The priority level of the alarm is divided according to the severity of the alarm consequences and the allowable response time of each process point of the chemical plant. The severity of the alarm consequences (the possible consequences of not responding to the alarm) is divided into four levels: critical, large, medium, and small. The severity level of the consequences is obtained through the hazard and operability analysis (HAZOP) and protection layer analysis (LOPA). The critical state is the risk of personal injury or serious impact on the entire device, the large state is the possibility of personal injury or major impact on the entire device, the medium state is the significant impact on the device output, and the small state is the local loss caused by unqualified products. The allowable response time of the alarm is the maximum time allowed for the operator from the occurrence of the alarm to the completion of the correct response operation, which is divided into three levels: immediate action (less than 5 minutes), rapid (5 minutes to 15 minutes), and as soon as possible (more than 15 minutes). The priority level of the point alarm is determined according to the alarm priority matrix shown in Table 1. The alarm should be divided into level 1 alarm, level 2 alarm, and level 3 alarm.
[0037]
[0038] Table 1 Alarm priority matrix
[0039] Furthermore, the binary array based on each monitoring point determines the alarm status level of the corresponding monitoring point, including: determining the information entropy of the corresponding monitoring point based on the binary array; determining the high characteristic state or low characteristic state of the corresponding monitoring point based on the level classification rule of the information entropy, and using the high / low characteristic state of each monitoring point as the alarm status level of the corresponding monitoring point.
[0040] Furthermore, the alarm status of each monitoring point is distinguished based on the time series data, including: processing the time series data of each monitoring point in the previous monitoring cycle based on the sliding window method to obtain n data groups of m consecutive moments; calculating the mean and variance of each data group as the distribution characteristics of the corresponding data group; comparing the distribution characteristics of the corresponding data group with the distribution characteristics of the data groups of the previous two monitoring cycles adjacent to the corresponding data group, and determining the data fluctuation situation of the corresponding monitoring point based on the comparison result; determining the abnormal data fluctuation state of the corresponding monitoring point based on the fluctuation situation as the alarm state of the corresponding monitoring point.
[0041] Embodiment 2:
[0042] According to the alarm limit set for each process point number in the process card of the chemical plant, it is determined whether there is an alarm at the process point, that is, whether the current process point data exceeds the set first-level threshold and second-level threshold. Data that exceeds the first-level threshold but does not exceed the second-level threshold is in a high alarm state / low alarm state, and data that exceeds the second-level threshold is in a high-high alarm state / low-low alarm state.
[0043] Finally, the information entropy of the process point data is determined according to the alarm priority level of the process point number and the current alarm status, and whether the current point data is high-feature data or low-feature data is determined according to the size of the information entropy. The determination matrix is shown in Table 2:
[0044]
[0045] Table 2 Judgment matrix
[0046] High-characteristic alarm data mainly reflects that the operating parameters of the device production process have undergone important changes, which may have an adverse impact on the safe production of the device. Therefore, the high-characteristic alarm data information is retained and the message flag bit during the data transmission process is marked as "00". The remaining low-characteristic data is determined to be in an abnormal fluctuation state.
[0047] Furthermore, the data fluctuation determination rules and abnormal data fluctuation state determination rules of each monitoring point are as follows:
[0048]
[0049] in, is the mean of the i-th data group; is the variance of the ith data group.
[0050] Preferably, the alarm status of each monitoring point includes: a high / low characteristic status and / or an abnormal data fluctuation status.
[0051] Embodiment three:
[0052] Based on the low-feature data determined in the previous stage, a sliding window method is used to establish a data group of n consecutive m moments, and the mean and variance of the data group are calculated to determine the distribution characteristics of the data group, and compared with the distribution characteristics of the previous two groups of data to determine the abnormal fluctuation of the data group. The calculation process is as follows:
[0053] 1) Create a data set of m consecutive moments
[0054] X i =[x i ,x i+1 ,…,x i+m ]
[0055] 2) Calculate the mean and variance of the data set
[0056]
[0057]
[0058] 3) Determine abnormal fluctuations in data
[0059]
[0060] Abnormal fluctuation data mainly reflects abnormal conditions such as step changes in the operating parameters of the device production process, which is generally a precursor to an accident. If not paid attention to in time, it may induce a safety production accident of the device. Therefore, the abnormal fluctuation data information is retained and the message flag bit during the data transmission process is marked as "01". The rest of the regular time series data is compressed.
[0061] Step S20: Based on the alarm status of each monitoring point, the transmission data message of each monitoring point is calibrated accordingly.
[0062] Specifically, if there is no alarm state at the monitoring point, or the alarm state is a low characteristic state, or the alarm state is a non-abnormal data fluctuation, the transmission data message calibration of the target monitoring point is performed based on the normal data message calibration scheme; if the alarm state of the monitoring point is a high characteristic state, the transmission data message calibration of the target monitoring point is performed based on the first abnormal data message calibration scheme; if the alarm state of the monitoring point is an abnormal data fluctuation, the transmission data message calibration of the target monitoring point is performed based on the second abnormal data message calibration scheme; wherein the calibration identifiers of the normal data message calibration scheme, the first abnormal data message calibration scheme and the second abnormal data message calibration scheme are different.
[0063] Step S30: Based on the calibration results of each transmission data message, adaptively select a storage solution corresponding to the transmission data.
[0064] Specifically, if the calibration result of the transmission data message is the result of calibration by a normal data message calibration scheme, transmission data compression is performed based on preset data compression rules, data transmission is performed based on the compressed transmission data, and when data needs to be stored, the compressed transmission data is decompressed and stored; if the calibration result of the transmission data message is the result of calibration by the first abnormal data message calibration scheme or the second abnormal data message calibration scheme, the transmission data is directly stored.
[0065] Embodiment 4:
[0066] Due to the high frequency and large amount of data collected in the production of chemical plants, a large amount of data in the normal production process of the plant is normal data with low data information characteristics, while there are fewer data with high information characteristics such as alarms and abnormal fluctuations. Therefore, it is necessary to compress the conventional data during the data collection and transmission process to reduce the pressure on transmission bandwidth and storage processing while maximizing the information characteristics of the time series data. Set the initial parameters and the data compression tolerance ΔE range to ΔE min ≤ΔE≤ΔE max , the maximum time period for data compression is T max , the standard deviation of the original data set in the current interval is σ, the standard deviation of the original data set in the previous compression interval is σ′, the expected compression error of the data set is δ, and the maximum compression error of a certain compression interval is δ max , the average value of the original data set in the current compression interval is u.
[0067] Preferably, the preset data compression rules include: in response to a trigger signal that identifies a data point to be compressed, initializing the data compression tolerance and the standard deviation of the current data set; compressing the transmitted data based on the SDT compression algorithm to complete this compression interval; calculating the standard deviation of this compression interval, and combining it with the standard deviation of the previous compression interval to calculate a new data compression tolerance; and using the new data compression tolerance as the initialization data compression tolerance for the next compression interval.
[0068] In the embodiment of the present invention, the compression process is as follows:
[0069] 1) Initialize the above parameters according to the original time series data set, σ′=σ=ΔE.
[0070] 2) Get the data points to be compressed. If the time interval of this compression interval is within T max If it is within the range, proceed to step 3; otherwise, terminate the revolving door compression algorithm within the compression interval and go to step 4.
[0071] 3) Perform standard SDT compression, that is, calculate the slopes of the two doors when the two revolving doors rotate to the data point, and compare them with the slopes of the two doors in the previous compression interval. The slope of the upper door is the largest of the two compression intervals, and the slope of the lower door is the smallest of the two compression intervals. Determine whether the slope of the upper door is greater than or equal to the slope of the lower door. If so, exit the compression of the compression interval and go to step 4, otherwise go to step 2.
[0072] 4) When the compression interval ends, the data in the interval is decompressed. The maximum compression error Where i=1,2,…,n. If δ max ≥δ, then δ max The corresponding original data is recorded; otherwise, no processing is done. Finally, the last data point of the interval is saved.
[0073] 5) Calculate the average value of the original data within the compression interval Then the standard deviation of the original data in the compression interval is
[0074] 6) Compare the standard deviations σ and σ′ of the two compression intervals and recalculate ΔE. If σ = 0, it means there is no fluctuation in the compression interval, so reset ΔE and σ. if Indicates that the data begins to fluctuate greatly. if Indicates that the data starts to fluctuate less. At the same time, in order to ensure that ΔE is not infinitely large or infinitely small, ΔE must satisfy the condition ΔE min ≤ΔE≤ΔE max , if ΔE min >ΔE, then ΔE=ΔE min If ΔE max <ΔE, then ΔE=ΔE max .
[0075] 7) Update the compression interval standard deviation σ, that is, σ′=σ.
[0076] 8) If there are data points to be compressed, go to step 2) to continue compression; otherwise exit.
[0077] Step S40: Execute the storage scheme to store various storage data.
[0078] Specifically, two adjacent compressed data points of the data to be decompressed are determined; and the data between the two adjacent compressed data points is decompressed based on a decompression algorithm to obtain complete data; wherein the decompression algorithm is:
[0079]
[0080] Among them, x A and x B Adjacent compressed data points A and B; x i I have data between point A and point B; t A is the sampling time of compressed data point A; t B is the sampling time of compressed data point B.
[0081] Embodiment five:
[0082] First, determine the flag bit of the data message. If it is "00", it is high-characteristic alarm data, and the data is directly stored if it is not compressed; if it is "01", it is abnormal fluctuation data, and the data is directly stored if it is not compressed; if it is "11", it is regular time series data, and the data has been compressed and needs to be decompressed before storage. Data point x A and data point x B If A and B are two adjacent data points after compression, the data between data points A and B can be decompressed using the following formula to obtain the approximate value of the data point and store it in the database.
[0083] In an embodiment of the present invention, the scheme of the present invention proposes an adaptive compression processing method, storage medium and system for chemical plant production time series data, which can identify abnormal characteristic data and normal characteristic data of the device according to the alarm status and fluctuation of the device production data points, and formulate a data adaptive compression transmission processing method for normal characteristic data, so as to retain the normal data fluctuation characteristics without affecting the safety production risk status analysis, and maximize the data compression ratio and compression rate.
[0084] The scheme of the present invention can retain key feature information in time series data according to the alarm state and abnormal fluctuation state, and use an efficient adaptive compression algorithm to realize compression and decompression of conventional time series data, so as to solve the problems of huge amount of safety risk assessment data, unclear information features and high data processing overhead in the safe production process of chemical plants, realize efficient integration of time series data of chemical plants, and provide key process data with high information entropy for the analysis of safety production risk status of chemical plants.
[0085] In possible application scenarios, the solution of the present invention can perform adaptive compression processing on time series data for analog quantities such as temperature, pressure, liquid level, etc. in chemical process that change very slowly over time. This can improve the data compression ratio and reduce data transmission bandwidth and storage processing efficiency without affecting the real-time performance of the data and key information.
[0086] Preferably, the scheme of the present invention can perform adaptive compression processing on time series data for analog quantities such as vibration, switch status, spindle current, etc. of key equipment in chemical plants that frequently change between maximum and minimum values, thereby improving the data compression ratio and reducing data transmission bandwidth and storage processing efficiency without affecting the real-time performance of the data and key information.
[0087] Preferably, the scheme of the present invention can perform adaptive compression processing on time series data for analog quantities that mutate at a relatively small frequency, such as flammable and toxic gas monitoring in chemical plants, thereby improving the data compression ratio and reducing data transmission bandwidth and storage processing efficiency without affecting data real-time performance and key information.
[0088] Figure 2 1 is a system structure diagram of a chemical plant time series data adaptive storage system provided by an embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides a chemical plant time series data adaptive storage system, the system comprising:
[0089] The collection unit is used to collect the time series data sent back by each monitoring point, and distinguish the alarm status of each monitoring point based on the time series data.
[0090] Specifically, the method of distinguishing the alarm status of each monitoring point based on the time series data includes: matching the alarm threshold value of the corresponding monitoring point based on each time series data to determine the alarm level of each time series data; obtaining the alarm priority level of each monitoring point based on the preset alarm priority level determination rule corresponding to each monitoring point; forming a binary array of the corresponding monitoring point based on the alarm level of the time series data of each monitoring point and the alarm priority level of the corresponding monitoring point; and determining the alarm status level of the corresponding monitoring point based on the binary array of each monitoring point.
[0091] Furthermore, the preset alarm priority determination rules include: determining the severity level of the alarm consequences of the corresponding monitoring point based on the importance level of the monitored object of the monitoring point in the preset chemical plant knowledge graph, each monitoring point corresponds to an alarm consequence severity level, and the entire chemical plant includes multiple alarm consequence severity levels; determining the alarm allowable response time of the corresponding monitoring point based on the maximum time that the monitoring point can continue to operate after a failure, and based on the alarm allowable response time of each monitoring point, the alarm allowable response time level is divided into levels according to the preset time interval division rules to obtain the alarm allowable response time level of each monitoring point, and the entire chemical plant includes multiple alarm allowable response time levels; traversing the pairwise combination relationship between multiple alarm consequence severity levels and multiple alarm allowable response time levels, calibrating an alarm priority level for each pairwise combination relationship, and obtaining an alarm priority level comparison table as the preset alarm priority determination rule.
[0092] Furthermore, the binary array based on each monitoring point determines the alarm status level of the corresponding monitoring point, including: determining the information entropy of the corresponding monitoring point based on the binary array; determining the high characteristic state or low characteristic state of the corresponding monitoring point based on the level classification rule of the information entropy, and using the high / low characteristic state of each monitoring point as the alarm status level of the corresponding monitoring point.
[0093] Furthermore, the alarm status of each monitoring point is distinguished based on the time series data, including: processing the time series data of each monitoring point in the previous monitoring cycle based on the sliding window method to obtain n data groups of m consecutive moments; calculating the mean and variance of each data group as the distribution characteristics of the corresponding data group; comparing the distribution characteristics of the corresponding data group with the distribution characteristics of the data groups of the previous two monitoring cycles adjacent to the corresponding data group, and determining the data fluctuation situation of the corresponding monitoring point based on the comparison result; determining the abnormal data fluctuation state of the corresponding monitoring point based on the fluctuation situation as the alarm state of the corresponding monitoring point.
[0094] According to the alarm limit set for each process point number in the process card of the chemical plant, it is determined whether there is an alarm at the process point, that is, whether the current process point data exceeds the set first-level threshold and second-level threshold. Data that exceeds the first-level threshold but does not exceed the second-level threshold is in a high alarm state / low alarm state, and data that exceeds the second-level threshold is in a high-high alarm state / low-low alarm state.
[0095] Furthermore, the data fluctuation determination rules and abnormal data fluctuation state determination rules of each monitoring point are as follows:
[0096]
[0097] in, is the mean of the i-th data group; is the variance of the ith data group.
[0098] Preferably, the alarm status of each monitoring point includes: a high / low characteristic status and / or an abnormal data fluctuation status.
[0099] Based on the low-feature data determined in the previous stage, a sliding window method is used to establish a data group of n consecutive m moments, and the mean and variance of the data group are calculated to determine the distribution characteristics of the data group, and compared with the distribution characteristics of the previous two groups of data to determine the abnormal fluctuation of the data group. The calculation process is as follows:
[0100] 1) Create a data set of m consecutive moments
[0101] X i =[x i ,x i+1,…,x i+m ]
[0102] 2) Calculate the mean and variance of the data set
[0103]
[0104]
[0105] 3) Determine abnormal fluctuations in data
[0106]
[0107] Abnormal fluctuation data mainly reflects abnormal conditions such as step changes in the operating parameters of the device production process, which is generally a precursor to an accident. If not paid attention to in time, it may induce a safety production accident of the device. Therefore, the abnormal fluctuation data information is retained and the message flag bit during the data transmission process is marked as "01". The rest of the regular time series data is compressed.
[0108] The calibration unit is used to calibrate the transmission data message of each monitoring point based on the alarm status of each monitoring point.
[0109] Specifically, if there is no alarm state at the monitoring point, or the alarm state is a low characteristic state, or the alarm state is a non-abnormal data fluctuation, the transmission data message calibration of the target monitoring point is performed based on the normal data message calibration scheme; if the alarm state of the monitoring point is a high characteristic state, the transmission data message calibration of the target monitoring point is performed based on the first abnormal data message calibration scheme; if the alarm state of the monitoring point is an abnormal data fluctuation, the transmission data message calibration of the target monitoring point is performed based on the second abnormal data message calibration scheme; wherein the calibration identifiers of the normal data message calibration scheme, the first abnormal data message calibration scheme and the second abnormal data message calibration scheme are different.
[0110] The scheme determination unit is used to adaptively select a storage scheme corresponding to the transmission data based on the calibration results of each transmission data message.
[0111] Specifically, if the calibration result of the transmission data message is the result of calibration by a normal data message calibration scheme, transmission data compression is performed based on preset data compression rules, data transmission is performed based on the compressed transmission data, and when data needs to be stored, the compressed transmission data is decompressed and stored; if the calibration result of the transmission data message is the result of calibration by the first abnormal data message calibration scheme or the second abnormal data message calibration scheme, the transmission data is directly stored.
[0112] Due to the high frequency and large amount of data collected in the production of chemical plants, a large amount of data in the normal production process of the plant is normal data with low data information characteristics, while there are fewer data with high information characteristics such as alarms and abnormal fluctuations. Therefore, it is necessary to compress the conventional data during the data collection and transmission process to reduce the pressure on transmission bandwidth and storage processing while maximizing the information characteristics of the time series data. Set the initial parameters and the data compression tolerance ΔE range to ΔE min ≤ΔE≤ΔE max , the maximum time period for data compression is T max , the standard deviation of the original data set in the current interval is σ, the standard deviation of the original data set in the previous compression interval is σ′, the expected compression error of the data set is δ, and the maximum compression error of a certain compression interval is δ max , the average value of the original data set in the current compression interval is u.
[0113] Preferably, the preset data compression rules include: in response to a trigger signal that identifies a data point to be compressed, initializing the data compression tolerance and the standard deviation of the current data set; compressing the transmitted data based on the SDT compression algorithm to complete this compression interval; calculating the standard deviation of this compression interval, and combining it with the standard deviation of the previous compression interval to calculate a new data compression tolerance; and using the new data compression tolerance as the initialization data compression tolerance for the next compression interval.
[0114] The storage unit is used to execute the storage scheme and store various data.
[0115] Specifically, two adjacent compressed data points of the data to be decompressed are determined; and the data between the two adjacent compressed data points is decompressed based on a decompression algorithm to obtain complete data; wherein the decompression algorithm is:
[0116]
[0117] Among them, x A and x B Adjacent compressed data points A and B; x i I have data between point A and point B; t A is the sampling time of compressed data point A; t B is the sampling time of compressed data point B.
[0118] First, determine the flag bit of the data message. If it is "00", it is high-characteristic alarm data, and the data is directly stored if it is not compressed; if it is "01", it is abnormal fluctuation data, and the data is directly stored if it is not compressed; if it is "11", it is regular time series data, and the data has been compressed and needs to be decompressed before storage. Data point x A and data point x BIf A and B are two adjacent data points after compression, the data between data points A and B can be decompressed using the following formula to obtain the approximate value of the data point and store it in the database.
[0119] The embodiment of the present invention further provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned method for adaptively storing timing data of a chemical plant.
[0120] Those skilled in the art will understand that all or part of the steps in the method for implementing the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions for making a single-chip microcomputer, a chip or a processor (processor) perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0121] The optional embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the technical concept of the embodiments of the present invention, the technical scheme of the embodiments of the present invention can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the embodiments of the present invention. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.
[0122] In addition, various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed in the embodiments of the present invention.
Claims
1. A method for adaptively storing time series data of a chemical plant, characterized in that: The method comprises: Collecting the time series data sent back by each monitoring point, and distinguishing the alarm status of each monitoring point based on the time series data; Based on the alarm status of each monitoring point, the transmission data message of each monitoring point is calibrated accordingly; Based on the calibration results of each transmission data message, adaptively select the storage scheme corresponding to the transmission data; Execute the storage scheme to store various storage data.
2. The method according to claim 1, characterized in that The distinguishing the alarm status of each monitoring point based on the time series data includes: Match the alarm threshold values of the corresponding monitoring points based on each time series data to determine the alarm level of each time series data; Based on the preset alarm priority determination rules corresponding to each monitoring point, the alarm priority corresponding to each monitoring point is obtained; Based on the alarm level of the time series data of each monitoring point and the alarm priority level of the corresponding monitoring point, a binary array of the corresponding monitoring point is formed; Based on the binary array of each monitoring point, the alarm status level of the corresponding monitoring point is determined.
3. The method according to claim 2, characterized in that The preset alarm priority determination rules include: Based on the importance level of the monitoring object of the monitoring point in the preset chemical plant knowledge graph, the severity level of the alarm consequence of the corresponding monitoring point is determined. Each monitoring point corresponds to an alarm consequence severity level, and the entire chemical plant includes multiple alarm consequence severity levels; Based on the maximum time that the monitoring point can continue to operate after a failure occurs, the alarm allowable response time of the corresponding monitoring point is determined, and the alarm allowable response time of each monitoring point is divided into levels according to the preset time interval division rules to obtain the alarm allowable response time level of each monitoring point. The entire chemical plant includes multiple alarm allowable response time levels; Traverse the pairwise combination relationships between multiple alarm consequence severity levels and multiple alarm allowed response time levels, calibrate an alarm priority level for each pairwise combination relationship, and obtain an alarm priority level comparison table as a preset alarm priority level determination rule.
4. The method according to claim 2, characterized in that: The step of determining the alarm status level of the corresponding monitoring point based on the binary array of each monitoring point includes: Determine the information entropy of the corresponding monitoring point based on the binary array; The high characteristic state or low characteristic state of the corresponding monitoring point is determined based on the level classification rule of information entropy, and the high / low characteristic state of each monitoring point is used as the alarm state level of the corresponding monitoring point.
5. The method according to claim 1, characterized in that The distinguishing the alarm status of each monitoring point based on the time series data includes: Based on the sliding window method, the time series data of each monitoring point in the previous monitoring cycle are processed to obtain n consecutive data groups of m moments; Calculate the mean and variance of each data group as the distribution characteristics of the corresponding data group; Compare the distribution characteristics of the corresponding data group with the distribution characteristics of the data groups of the first two monitoring periods adjacent to the corresponding data group, and determine the data fluctuation of the corresponding monitoring point based on the comparison result; Based on the fluctuation situation, the abnormal data fluctuation state of the corresponding monitoring point is determined as the alarm state of the corresponding monitoring point.
6. The method according to claim 5, characterized in that The rules for determining the data fluctuation situation and abnormal data fluctuation status of each monitoring point are as follows: in, is the mean of the i-th data group; is the variance of the ith data group.
7. The method according to claim 1, characterized in that The alarm status of each monitoring point includes: High / low characteristic status and / or abnormal data fluctuation status.
8. The method according to claim 7, characterized in that The corresponding transmission data message calibration of each monitoring point includes: If there is no alarm state at the monitoring point, or the alarm state is a low characteristic state, or the alarm state is a non-abnormal data fluctuation, the transmission data message of the target monitoring point is calibrated based on the normal data message calibration scheme; If the alarm state of the monitoring point is a high characteristic state, the transmission data message of the target monitoring point is calibrated based on the first abnormal data message calibration scheme; If the alarm status of the monitoring point is abnormal data fluctuation, the transmission data message of the target monitoring point is calibrated based on the second abnormal data message calibration scheme; wherein, The normal data message calibration scheme, the first abnormal data message calibration scheme and the second abnormal data message calibration scheme have different calibration identifiers.
9. The method according to claim 1, characterized in that: The adaptively selecting a storage scheme for the corresponding transmission data based on the calibration results of each transmission data message includes: If the transmission data message calibration result is the result of the normal data message calibration scheme, the transmission data is compressed based on the preset data compression rule, data is transmitted based on the compressed transmission data, and when data needs to be stored, the compressed transmission data is decompressed and stored; If the transmission data message calibration result is the result of calibration using the first abnormal data message calibration scheme or the second abnormal data message calibration scheme, the transmission data is directly stored.
10. The method according to claim 9, characterized in that The preset data compression rule includes: In response to a trigger signal identifying a data point to be compressed, initializing a data compression tolerance and a standard deviation of a current data set; Compress the transmission data based on the SDT compression algorithm to complete this compression interval; Calculate the standard deviation of this compression interval and combine it with the standard deviation of the previous compression interval to obtain a new data compression tolerance; The new data compression tolerance is used as the initialization data compression tolerance for the next compression interval.
11. The method according to claim 9, characterized in that The step of decompressing the compressed transmission data and then storing the data when the data needs to be stored comprises: Determine two adjacent compressed data points of the data to be decompressed; Decompress the data between two adjacent compressed data points based on the decompression algorithm to obtain complete data; The decompression algorithm is: Among them, x A and x B Adjacent compressed data points A and B; x i My data between point A and point B; t A is the sampling time of compressed data point A; t B is the sampling time of compressed data point B.
12. A chemical plant time series data adaptive storage system, characterized in that: The system comprises: A collection unit, used to collect the time series data sent back by each monitoring point, and distinguish the alarm status of each monitoring point based on the time series data; A calibration unit, used for calibrating the transmission data message of each monitoring point according to the alarm status of each monitoring point; A scheme determination unit, used for adaptively selecting a storage scheme corresponding to the transmission data based on the calibration results of each transmission data message; The storage unit is used to execute the storage scheme and store various data.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method for adaptively storing time series data of a chemical plant as described in any one of claims 1 to 11.
14. An electronic 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, the method for adaptively storing time series data of a chemical plant as described in any one of claims 1 to 11 is implemented.