Industrial time series data re-characterization method, equipment and medium based on constant approximation
Through the industrial timing data re-representation method based on constant approximation, the problems of high-dimensionality, noise confusion and trend difficulty in industrial timing data processing are solved, and data processing efficiency is improved and computing resources are optimized.
Patent Information
- Application Number
- CN202411260089.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-10
AI Technical Summary
Industrial timing data processing faces problems such as high-dimensionality, noise confounding, difficulty in capturing trends in traditional methods, and low computing efficiency, resulting in low data processing efficiency and large computing resources.
An industrial time series data re-representation method based on constant approximation is proposed. Through interval segment division and constant approximation cardinality determination, constant approximation and data compression are performed, and finally fitted to obtain a re-representation curve.
It effectively reduces the redundancy and noise information of data, reduces the data dimension, improves data processing efficiency, can more accurately capture the nonlinear and volatility trends of data, and reduces the demand for computing resources.
Smart Images

Figure CN118796914B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrical digital data processing, and in particular to a method, device and medium for re-characterizing industrial time series data based on constant approximation. Background Art
[0002] In the field of industrial big data analysis, efficient processing and analysis of time series data face many technical challenges. First, time series data are usually high-dimensional and often mixed with noise and non-critical information, which not only increases the complexity of the data, but also interferes with data mining algorithms. Secondly, traditional linear fitting-based methods are difficult to effectively capture the trend of data, especially when faced with industrial data with large fluctuations and high complexity. In addition, industrial applications require data processing methods to respond quickly while minimizing the use of computing resources. Existing change point detection methods have low computational efficiency when processing a large number of change points, which is not conducive to rapid identification and analysis of trends. Summary of the invention
[0003] In order to solve the above problems, the present invention proposes an industrial time series data re-characterization method based on constant approximation, including:
[0004] Collect industrial time series data from a preset data source, and generate a corresponding industrial time series data sequence according to the collection timestamp of the industrial time series data;
[0005] Determine the number of intervals into which the industrial time series data sequence needs to be divided according to the re-characterization accuracy of the industrial time series data, and determine a constant approximation cardinality for approximating the industrial time series data according to the number of intervals;
[0006] According to the constant approximation base, the industrial time series data is subjected to constant approximation to obtain an approximate array consisting of a plurality of approximated target industrial time series data;
[0007] Constructing a data compression array for storing the re-characterized target industrial time series data, and initializing the data compression array; wherein the array elements of the data compression array are empty;
[0008] According to the numerical size relationship between adjacent target industrial time series data in the approximate array, the target industrial time series data is compressed, and the data compression array is filled according to the target industrial time series data obtained after the data compression to obtain a target data compression array;
[0009] According to the target data compression array, a re-characterization curve corresponding to the industrial time series data sequence is obtained by fitting.
[0010] In an implementation of the present invention, data compression is performed on the target industrial time series data according to the numerical value relationship between adjacent target industrial time series data in the approximate array, specifically including:
[0011] Determine the number of elements contained in the approximate array, and compare the number of elements with a preset subscript to determine the size relationship between the number of elements and the preset subscript; wherein the elements in the approximate array refer to target industrial time series data, and the preset subscript is used to locate the elements in the approximate array;
[0012] In the case where the preset subscript is not greater than the number of elements, locating the target element in the approximate array whose corresponding subscript is the preset subscript, and determining a previous target element in the approximate array that is adjacent to the target element;
[0013] Determine the original numerical size relationship between the target element and the previous target element, perform data compression on the target industrial time series data based on data compression modes corresponding to different original numerical size relationships, iteratively locate the target element and the previous target element during the data compression process, and judge whether the trend of the target industrial time series data has changed during each iterative positioning, and if the trend has changed, use the currently located previous target element as the target industrial time series data obtained after data compression.
[0014] In one implementation of the present invention, during each iterative positioning, determining whether the trend of the target industrial time series data has changed specifically includes:
[0015] In each iteration of positioning, the preset index is increased by 1 to obtain an updated preset index;
[0016] Repositioning the target element and the previous target element in the approximate array according to the updated preset index, and determining the numerical value relationship between the repositioned target element and the previous target element;
[0017] The numerical value relationship is compared with the original numerical value relationship, and when the numerical value relationship is different from the original numerical value relationship, it is determined that the trend of the target industrial time series data has changed.
[0018] In an implementation of the present invention, determining a constant approximation base for approximating the industrial time series data according to the number of interval segments specifically includes:
[0019] Traversing the industrial time series data sequence to select the first industrial time series data with the largest corresponding value and the second industrial time series data with the smallest corresponding value from the industrial time series data sequence;
[0020] The difference between the first industrial time series data and the second industrial time series data is calculated, and a constant approximation base for approximating the industrial time series data is determined according to a ratio between the difference and the number of interval segments.
[0021] In an implementation of the present invention, according to the constant approximation cardinality, the industrial time series data is subjected to constant approximation to obtain an approximate array consisting of a plurality of approximated target industrial time series data, specifically including:
[0022] Generate a corresponding upward constant set and downward constant set according to the constant approximation cardinality; wherein the upward constant set and the downward constant set contain multiple constant values, and the constant values divide the industrial time series data sequence into a plurality of constant intervals, and the interval length of each constant interval is the constant approximation cardinality;
[0023] For each industrial time series data, based on the upward constant set and the downward constant set, determine the constant interval where the industrial time series data is located, and perform upward constants and downward constants on the industrial time series data respectively to obtain corresponding upward constant values and downward constant values;
[0024] Based on the upward constant value and the downward constant value, the industrial time series data is approximated by constants to obtain an approximate array consisting of a number of transformed target industrial time series data; wherein the target industrial time series data is the upward constant value or the downward constant value.
[0025] In an implementation of the present invention, based on the upward constant value and the downward constant value, the industrial time series data is subjected to constant approximation, specifically including:
[0026] Constructing a constant approximation formula for performing constant approximation on the industrial time series data, and determining a constant approximation reference value corresponding to the industrial time series data according to the constant approximation formula;
[0027] According to the constant approximation reference value, selecting the upward constant value or the downward constant value, and performing constant approximation on the industrial time series data;
[0028] The constant approximation formula is expressed as:
[0029]
[0030] in, represents a constant approximate reference value, It means to round up to a constant value. It means taking a constant value downward. Represents industrial time series data.
[0031] In an implementation of the present invention, according to the constant approximation reference value, the upward constant value or the downward constant value is selected to perform constant approximation on the industrial time series data, specifically including:
[0032] Determine whether the constant approximate reference value is greater than 0;
[0033] If yes, select the downward constant value to perform constant approximation on the industrial time series data;
[0034] If not, the upward constant value is selected to perform constant approximation on the industrial time series data.
[0035] In one implementation of the present invention, generating a corresponding upward constant set and a downward constant set according to the constant approximation cardinality specifically includes:
[0036] The upward constant set is expressed as:
[0037]
[0038] The downward constant set is expressed as:
[0039]
[0040] in, Represents the first industrial time series data, Represents the second industrial time series data, represents the constant approximate cardinality, and N represents the number of interval segments.
[0041] An embodiment of the present invention provides an industrial time series data re-characterization device based on constant approximation, the device comprising:
[0042] at least one processor;
[0043] and, a memory communicatively coupled to the at least one processor;
[0044] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the industrial time series data re-characterization method based on constant approximation as described in any one of the above items.
[0045] An embodiment of the present invention provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0046] An industrial time series data re-characterization method based on constant approximation as described in any of the above items.
[0047] The industrial time series data re-characterization method based on constant approximation proposed by the present invention can bring the following beneficial effects:
[0048] By dividing the industrial time series data into interval segments and determining the constant approximate cardinality, the redundant and noisy information in the original industrial time series data can be effectively reduced, the data dimension can be reduced, and the efficiency of data processing can be improved.
[0049] By performing constant approximation and data compression on industrial time series data, and then performing curve fitting based on the compressed target industrial time series data, the nonlinearity and volatility trends of the data can be captured more effectively, which is particularly suitable for complex and changeable industrial time series data. In addition, the key change point information can be retained during the data compression process, so that the re-characterization curve obtained by fitting can more realistically reflect the dynamic characteristics of the original data.
[0050] Data compression significantly reduces the amount of data that needs to be processed, thereby reducing the demand for computing resources, increasing processing speed, and meeting the needs of industrial applications for rapid response. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0052] Figure 1 A flow chart of an industrial time series data re-characterization method based on constant approximation provided in an embodiment of the present invention;
[0053] Figure 2 A schematic diagram of a curve of an industrial time series data sequence provided by an embodiment of the present invention;
[0054] Figure 3 An approximate fitting diagram of industrial time series data constants in an application scenario provided by an embodiment of the present invention;
[0055] Figure 4 An industrial time series data re-characterization curve diagram in an application scenario provided by an embodiment of the present invention;
[0056] Figure 5 An existing industrial time series data fitting diagram in an application scenario provided by an embodiment of the present invention;
[0057] Figure 6 A re-characterization curve diagram of existing industrial time series data in an application scenario provided by an embodiment of the present invention;
[0058] Figure 7 A schematic diagram of the structure of an industrial time series data re-characterization device based on constant approximation provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0060] Traditional industrial time series data processing methods are mostly implemented through discrete Fourier transform (DFT), discrete wavelet transform (DWT), singular value decomposition (SVD), piecewise aggregation approximation (PAA), piecewise linear approximation (PLA) and symbolic aggregation approximation (SAX) technologies. Among them, DFT is limited in its ability to process non-periodic or non-stationary signals and is sensitive to noise. Although DWT can provide time and frequency information, the selection of its scale and displacement has a significant impact on the results, the computational complexity is high, and professional knowledge is required to select a suitable wavelet basis. Although SVD can reduce the data dimension and extract the main features, it is sensitive to noise, and the reasonable selection of the decomposition order requires professional knowledge, which may cause the loss of important information. PAA may ignore local details while simplifying the data, and its number and length of segments need to be determined according to specific application scenarios. PLA performs well in capturing local linear trends, but the representation of nonlinear data is not accurate enough, and the selection of segment boundaries has a significant impact on the results. SAX simplifies data representation, but the parameter selection has a significant impact on the results, the conversion process may lose numerical information, and it is not applicable to some data types.
[0061] The high noise sensitivity of the above-mentioned prior arts, especially in environments with weak signals or strong noise, seriously affects the accuracy of re-characterization of industrial time series data. The complexity of parameter selection increases the technical threshold and requires reliance on professional knowledge and experience. The inconsistent quality of industrial data, such as labeling errors, missing data, or imbalanced categories, seriously restricts the effectiveness of re-characterization technology. In addition, existing models may lack the ability to generalize across industries or equipment. Some technologies, such as methods based on wavelet transform or SVD, have high computational complexity and large demand for computing resources, which limits their application in resource-constrained environments and has limitations in rapid response. The nonlinearity, non-stationarity, and mutation characteristics of industrial time series data make it difficult for existing technologies to accurately capture the essential trends of the data.
[0062] In order to more effectively depict the trend of industrial time series data and retain the key information therein, an existing trend extraction method (CN201910672987.4) achieves accurate extraction of data trends by collecting raw data, drawing data curves, finding optimal segmentation values and local extreme points, and dividing data into data blocks for trend analysis. This method does not require preprocessing such as filtering or smoothing, directly extracts features from raw data, and determines the trend type (rising, unchanged, falling) through univariate linear fitting, effectively avoiding the loss of data features. However, this method relies on finding the optimal segmentation value to extract the envelope centerline. There are certain technical difficulties in determining this optimal segmentation value. In addition, the identification of local extreme points may be sensitive to noise. If there is noise or outliers in the raw data, it may affect the accurate identification of local extreme points, thereby affecting the results of trend analysis. At the same time, when segmenting, it depends on finding all divisors of the length value of the original data and finding the best segmentation according to the constraints. However, if the length value of the original data is a prime number, the segmentation and feature extraction scheme cannot be obtained. Therefore, this trend extraction method has certain technical defects and it is difficult to extract more accurate data trends.
[0063] Data compression can effectively reduce computing resources and improve the response speed of industrial time series data. Currently, many data compression methods have been applied to time series data compression. An existing data compression method (CN202311703829.3) proposes a fast compression method for time series data based on constant approximation. This method achieves effective identification and retention of key inflection point information while ensuring fast compression, and reduces information loss, by acquiring time series data, configuring transformation bases, performing constant approximation, extracting key points of state changes, performing interval state division, and compressing the original data and storing the compressed data in a database. The disadvantage of this method is that industrial time series data has certain vibrations under actual working conditions compared to other types of time series data, and many data will fluctuate up and down near a constant base line. This method performs a single rounding transformation on the fluctuating data. It will directly take the larger value for the points slightly larger than the rounding base, and take the current rounding base for the points slightly smaller than the rounding base. Even a small fluctuation will be judged as a large oscillation, which may cause a more obvious deviation between the compressed data and the original data to a certain extent, resulting in serious distortion of the compressed data.
[0064] Based on this, an embodiment of the present invention proposes an industrial time series data re-characterization method based on constant approximation, which aims to solve the shortcomings of the above-mentioned existing industrial time series big data re-characterization methods in terms of high-dimensional data dimensionality reduction, trend identification and data compression, and clearly depict the time series trend line of industrial big data, and make the trends in different regions easy to identify, providing a solid foundation for further analysis and judgment.
[0065] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0066] like Figure 1 As shown, the industrial time series data re-characterization method based on constant approximation provided by an embodiment of the present invention includes:
[0067] S101: Collect industrial time series data from a preset data source, and generate a corresponding industrial time series data sequence according to the collection timestamp of the industrial time series data.
[0068] In the industrial field, time series data records information such as equipment status, production indicators, and environmental parameters that change over time. Analyzing the trends of industrial time series data can provide a data basis for subsequent data analysis and judgment.
[0069] Industrial time series data may come from a variety of data sources, such as sensors, PLCs, monitoring systems, and IoT devices. Industrial time series data is collected from the above preset data sources. For the collected industrial time series data, it is necessary to first perform integrity verification and preprocessing operations. Among them, integrity verification means that the industrial time series data should be continuous and have no missing values or intervals. This process can be achieved by verifying the collection timestamp of the industrial time series data. By judging whether the timestamp is evenly distributed or conforms to a specific time series pattern, the integrity of the industrial time series data is verified. After completing the integrity verification, the industrial time series data needs to be tested for volatility. In other words, in order to ensure the validity of the industrial time series data, it should be avoided that the data points are static or constant on the time axis, that is, the industrial time series data should show a certain volatility or variability. The volatility can be evaluated by calculating the statistics of the data (such as variance, standard deviation). For industrial time series data that have not passed the above verification, it is possible to consider re-collecting the industrial time series data.
[0070] After completing the above verification process, in order to ensure the quality and consistency of the data set, for missing values or outliers in the industrial time series data, data cleaning operations such as interpolation, smoothing or outlier removal can be used to preprocess the industrial time series data. The industrial time series data after the above operations can be used for subsequent trend analysis. In order to make it easier to analyze, the industrial time series data needs to be sorted according to the acquisition timestamp, and the sorted data is organized into a time series form to obtain the corresponding industrial time series data sequence. The industrial time series data sequence is essentially a sequence composed of numerical values, including numerical values corresponding to multiple industrial time series data.
[0071] S102: Determine the number of interval segments into which the industrial time series data sequence needs to be divided according to the re-characterization accuracy of the industrial time series data, and determine a constant approximation base for approximating the industrial time series data according to the number of interval segments.
[0072] Re-characterizing industrial time series data is essentially to perform trend analysis on industrial time series data, so as to determine the trend of industrial time series data through the trend curve obtained by re-characterization, and provide a data basis for subsequent data analysis and judgment. In order to simplify the efficiency of trend extraction and improve the efficiency of data analysis, the constant approximation method is considered, that is, the industrial time series data sequence is divided into several intervals. It should be noted that the division mentioned here is actually to divide the data values corresponding to the industrial time series data into intervals, and the industrial time series data of each interval is approximated by a constant in the interval. Among them, the number of divided intervals depends on the re-characterization accuracy of the data, which is usually related to the analysis requirements of the data and the acceptable error range, and can be set according to actual conditions. The number of intervals is positively correlated with the re-characterization accuracy. The larger the number of intervals, the higher the re-characterization accuracy of the industrial time series data. In addition, in general, the re-characterized industrial time series data will have a higher degree of fit with the original industrial time series data and a lower compression rate.
[0073] After determining the number of intervals, it is also necessary to determine the actual length of each interval so that the industrial time series data sequence can be more easily segmented when extracting trends. The actual length mentioned here is called the constant approximate cardinality. The constant approximate cardinality is related to the number of intervals. The industrial time series data sequence is traversed, and the first industrial time series data with the largest corresponding value and the second industrial time series data with the smallest corresponding value are selected from the industrial time series data sequence. The difference between the first industrial time series data and the second industrial time series data is calculated. This difference represents the numerical range of the industrial time series data. After clarifying the data value range of the industrial time series data sequence and the number of intervals to be divided, the interval length of each interval can be obtained by simply using the ratio between the above difference and the number of intervals. The ratio calculated at this time can be used as the constant approximate cardinality of the industrial time series data.
[0074] like Figure 2 The curve diagram of an industrial time series data sequence shown in the figure shows that when the industrial time series data is vibration velocity, the corresponding data curve can be fitted according to the industrial time series data sequence. The horizontal axis of the curve is the acquisition timestamp, and the vertical axis is the vibration velocity, that is, the data value corresponding to the industrial time series data. Among them, these industrial time series data sequences are divided into 6 intervals. According to the ratio between the difference between the maximum value and the minimum value and the number of intervals, the constant approximation base used for constant approximation of this industrial time series data sequence can be determined. The constant approximation base is reflected on the data curve as the interval length of each interval of the vertical axis of the curve.
[0075] S103: Perform constant approximation on the industrial time series data according to the constant approximation base, and obtain an approximate array consisting of a plurality of approximated target industrial time series data.
[0076] The constant approximation cardinality is not directly used for constant approximation of industrial time series data, but is used to determine which interval each data point should be classified into. By selecting a representative value in the interval as the value of the data point after constant approximation, the constant approximation of industrial time series data can be achieved. According to the target industrial time series data obtained after constant approximation, the corresponding approximate array can be constructed. On the basis of retaining the key information of industrial time series data, the approximate array can also effectively reflect the trend between industrial time series data, and can provide good data support for subsequent analysis and judgment.
[0077] In one embodiment, according to the above content, each industrial time series data will be replaced by the representative value of the interval in which it is located. This process needs to be realized through the mapping relationship between the industrial time series data and the representative value. In the embodiment of the present invention, the representative value exists in the form of an integer. In order to clarify the above mapping relationship, two sets need to be generated according to the constant approximation cardinality: one is an upward constant set for upward constants, and the other is a downward constant set for downward constants.
[0078] The upward constant set is expressed as:
[0079]
[0080] Taking the constant set downwards is expressed as:
[0081]
[0082] in, Represents the first industrial time series data, Represents the second industrial time series data, represents the constant approximate cardinality, and N represents the number of interval segments.
[0083] These two sets are actually composed of a series of constant values based on constant approximation cardinality. The constant value divides the industrial time series data sequence into several constant intervals, and the interval length of each constant interval is the constant approximation cardinality. However, the above constant set is not directly used to map each industrial time series data, but to determine to which value the industrial time series data should be approximated upward or downward.
[0084] Therefore, for each industrial time series data in the industrial time series data sequence, based on the upward constant set and the downward constant set, the constant interval in which the industrial time series data is located can be determined. According to the constant interval, the industrial time series data can be respectively subjected to upward constants and downward constants to obtain the corresponding upward constant values and downward constant values. For example, if a certain industrial time series data is 4.2 and its constant interval is [4,4.5], then the corresponding upward constant value becomes 4 and the downward constant value becomes 4.5.
[0085] After the industrial time series data is rounded up and rounded down, it is necessary to perform further constant approximation to clarify which constant value it should be mapped to. In this way, through constant approximation, an approximate array consisting of several transformed target industrial time series data can be obtained. It can be understood that the approximate array is composed of the upward constant value and the downward constant value, and the transformed target industrial time series data is one of the upward constant value and the downward constant value.
[0086] In one embodiment, the process of constant approximation can be understood as selecting a constant value that is closer to the industrial time series data as its representative value. Before performing constant approximation on the industrial time series data, a corresponding constant approximation formula needs to be constructed. According to the constant approximation formula, the constant approximation reference value of the industrial time series data can be determined. The constant approximation reference value is used to indicate whether the industrial time series data is closer to the constant value taken upward or the constant value taken downward, which directly determines how the industrial time series data is mapped to the nearest constant value. The constant approximation formula can be expressed as:
[0087]
[0088] in, represents a constant approximate reference value, It means to round up to a constant value. It means taking a constant value downward. Represents industrial time series data.
[0089] According to the constant approximation reference value calculated by the above constant approximation formula, it is possible to select an upward constant value or a downward constant value to perform constant approximation on the industrial time series data. Specifically, it is determined whether the constant approximation reference value is greater than 0. If so, it means that the industrial time series data is closer to its corresponding downward constant value. At this time, the downward constant value should be selected to perform constant approximation on the industrial time series data. If it is not greater than 0, it means that the industrial time series data is closer to its corresponding upward constant value. At this time, the upward constant value should be selected to perform constant approximation on the industrial time series data. The target industrial time series data obtained by the above transformation is the corresponding downward constant value or upward constant value. In this way, when facing data fluctuations between industrial time series data, the data with small data fluctuations can be fitted into a straight line by taking a constant upward or downward. While improving the fitting effect, the compression rate can also be improved, and fewer data points can be used to describe the changes in industrial time series data.
[0090] S104: construct a data compression array for storing the re-characterized target industrial time series data, and initialize the data compression array; wherein the array elements of the data compression array are empty.
[0091] When analyzing the trend of industrial time series data, due to the large amount of data, it will take up a lot of resources and affect the computing efficiency. Data compression for the target industrial time series data is a necessary optimization operation. By compressing the target industrial data, the size or complexity of the data can be significantly reduced. The compressed target industrial time series data is stored in a data compression array. Before compression, when this data compression array is constructed, it needs to be initialized. The array elements in the initialized data compression array are empty, recorded as i=0, and a preset subscript t is set. The preset subscript is set to 2 in the initial state to locate the elements in the approximate array.
[0092] S105: compressing the target industrial time series data according to the numerical size relationship between adjacent target industrial time series data in the approximate array, and filling the data compression array according to the target industrial time series data obtained after the data compression to obtain the target data compression array.
[0093] The data compression operation in the embodiment of the present invention is achieved by judging whether the trends between adjacent target industrial time series data are consistent, wherein the trend can be determined by the numerical value relationship between adjacent target industrial time series data in the approximate array. When the trends of multiple target industrial time series data are continuously the same, one value can be selected to represent multiple target industrial time series data, so that the compression of the target time series data is achieved by reducing the amount of data, and the compressed target industrial time series data needs to be stored in the initialized data compression array, and the filled data compression array is used as the target data compression array.
[0094] In one embodiment, the number of elements contained in the approximate array is determined, and the number of elements is compared with a preset subscript to determine the size relationship between the number of elements and the preset subscript; wherein the elements in the approximate array refer to the target industrial time series data. When the preset subscript is not greater than the number of elements, it means that the number of elements in the target compressed data does not exceed the total amount of data in the industrial time series data sequence, and the corresponding data compression operation can be continued at this time. Otherwise, it means that the compression of all target industrial time series data has been completed.
[0095] When compressing industrial time series data, it is necessary to locate the target element in the approximate array whose corresponding subscript is the preset subscript, and determine the previous target element adjacent to the target element in the approximate array. It should be noted that since the preset subscript obtained by initialization is 2, the located target element and the previous target element are the first data in the approximate array. and the second data . For the target element and the previous target element, the original numerical size relationship between the target element and the previous target element is determined, and the target industrial time series data is compressed based on the data compression modes corresponding to different original numerical size relationships. The target element and the previous target element are iteratively located during the data compression process. In each iterative positioning, it is necessary to determine whether the trend of the target industrial time series data has changed. If the trend has changed, it is necessary to stop moving the element index backward, and use the currently located previous target element as the target industrial time series data obtained after data compression.
[0096] Among them, iterative positioning refers to shifting the target industrial time series data in the approximate array backward one position in turn. By judging whether the numerical relationship between adjacent target industrial time series data changes before and after the shift, it can be determined whether the data trend is consistent.
[0097] Specifically, add 1 to the preset subscript to obtain an updated preset subscript. According to the updated preset subscript, reposition the target element and the previous target element in the approximate array until the numerical relationship between the repositioned target element and the previous target element is complementary to the original numerical relationship, and the iterative positioning is completed. In other words, when the trend remains consistent, continue to iterate and position one element backward until the numerical relationship is different from the original numerical relationship, indicating that the current trend has changed from the initial trend. At this time, it indicates that the compression operation of the above-mentioned target industrial time series data has been completed, and it is necessary to stop iterating and position, and use the last located previous target element as the target industrial time series data obtained after data compression, and fill it into the data compression data.
[0098] In the initial state, That is Fill it into the target data compression array. There are three types of numerical size relationships: greater than, less than, and equal to. and The numerical relationship between them, and the corresponding compression mode can be expressed as:
[0099] (1) If , enter the judgment loop, set t=t+1 and judge whether ,until Stop the loop when
[0100] (2) If , enter the judgment loop, set t=t+1 and judge whether ,until Stop the loop when
[0101] (3) If Enter the judgment loop, set t=t+1 and judge whether ,until Stop the loop when
[0102] S106: According to the target data compression array, a re-characterization curve corresponding to the industrial time series data sequence is obtained by fitting.
[0103] After completing the above, the data points contained in the target data compression array are re-characterized data based on constant approximation. According to the target data compression array, the re-characterization curve corresponding to the industrial time series data sequence is fitted. The re-characterization curve can reflect the original trend of the industrial time series data sequence, and compared with the original data, the re-characterization curve is drawn by the target industrial time series data after data compression, with less data volume. It can occupy less computing resources while retaining key information, effectively improving data processing efficiency.
[0104] Figure 3 An original curve chart of industrial time series data in an application scenario provided by an embodiment of the present invention, Figure 4 The industrial time series data re-characterization curve diagram in an application scenario provided by an embodiment of the present invention. Figure 3 and Figure 4 As shown in the figure, N is 15. After constant approximation and data compression, the industrial time series data is compared. It can be seen that the industrial time series data curve after re-characterization can more intuitively reflect the data trend than the original industrial time series data curve while retaining the key information of the industrial time series data.
[0105] The mean square error (MSE) is used as an indicator to measure the difference between the re-characterized fitted value and the actual observed value. The smaller the MSE value, the smaller the difference between the re-characterized data value and the actual observed value, and the better the model fit. The calculation formula of MSE is as follows:
[0106]
[0107] Where n is the total number of observations, is the ith observation, is the i-th fitted value.
[0108] In the embodiment of the present application, the ratio of the total number of compressed data to the total number of original data is used to measure the compression effect of the time series data after data re-characterization, which is specifically expressed as:
[0109]
[0110] in, is the total number of data points in the re-characterized industrial time series data, is the total number of data points in the original industrial time series data.
[0111] In one embodiment, the transmission shaft vibration velocity data generated by a coal mine ventilator under real working conditions is used as a test case. The data is sampled in time series at intervals of approximately 5 seconds. The selected test data set covers 387 data points with a time span of 30 minutes and is tested at an accuracy of N=15. Based on the compression algorithm provided by the embodiment of the present application and the prior art CN202311703829.3, the data is trend-fitted, and the respective effects and performance indicators are compared.
[0112] Figure 5 An existing industrial time series data fitting diagram in an application scenario provided by an embodiment of the present invention, Figure 6 This is a graph of the re-characterization of existing industrial time series data in an application scenario provided by an embodiment of the present invention. Analyzing the above fitting results, "A method and system for rapid compression of time series data based on integer transformation", when N=15, the MSE is 0.0010530781840879, and P is 83%. The re-characterization method provided in the embodiment of the present application, when N=15, the MSE is 0.00022426145879572864, and P is 76%. This result proves that the data compression rate and fitting rate of the embodiment of the present application are better than the existing compression methods, which not only ensures the quality of data compression, but also achieves more accurate trend fitting.
[0113] The above are embodiments of the method proposed by the present invention. Based on the same idea, some embodiments of the present invention also provide devices and non-volatile computer storage media corresponding to the above methods.
[0114] Figure 7 A schematic diagram of the structure of an industrial time series data re-characterization device based on constant approximation provided by an embodiment of the present invention. Figure 7 As shown, including:
[0115] at least one processor; and,
[0116] at least one processor is communicatively connected to a memory; wherein,
[0117] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the industrial time series data re-characterization method based on constant approximation as described in any one of the above items.
[0118] An embodiment of the present invention provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0119] An industrial time series data re-characterization method based on constant approximation as described in any of the above items.
[0120] The various embodiments of the present invention are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0121] The devices and media provided in the embodiments of the present invention correspond one-to-one to the methods, and therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0122] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0123] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0124] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0126] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0127] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0128] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0129] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0130] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. The industrial time series data re-characterization method based on constant approximation is characterized by: The method comprises: Collect industrial time series data from a preset data source, and generate a corresponding industrial time series data sequence according to the collection timestamp of the industrial time series data; According to the re-characterization accuracy of the industrial time series data, determine the number of interval segments into which the industrial time series data sequence needs to be divided, and according to the number of interval segments, determine a constant approximation cardinality for approximating the industrial time series data; wherein the constant approximation cardinality represents the actual length of each interval segment; According to the constant approximation base, the industrial time series data is subjected to constant approximation to obtain an approximate array consisting of a plurality of approximated target industrial time series data; Constructing a data compression array for storing the re-characterized target industrial time series data, and initializing the data compression array; wherein the array elements of the data compression array are empty; According to the numerical size relationship between adjacent target industrial time series data in the approximate array, the target industrial time series data is compressed, and the data compression array is filled according to the target industrial time series data obtained after the data compression to obtain a target data compression array; According to the target data compression array, fitting a re-characterization curve corresponding to the industrial time series data sequence; According to the number of interval segments, determining a constant approximation base for approximating the industrial time series data specifically includes: Traversing the industrial time series data sequence to select the first industrial time series data with the largest corresponding value and the second industrial time series data with the smallest corresponding value from the industrial time series data sequence; Calculating a difference between the first industrial time series data and the second industrial time series data, and determining a constant approximation base for approximating the industrial time series data according to a ratio between the difference and the number of interval segments; According to the constant approximation base, the industrial time series data is subjected to constant approximation to obtain an approximate array consisting of a plurality of approximated target industrial time series data, specifically including: Generate a corresponding upward constant set and downward constant set according to the constant approximation cardinality; wherein the upward constant set and the downward constant set contain multiple constant values, and the constant values divide the industrial time series data sequence into a plurality of constant intervals, and the interval length of each constant interval is the constant approximation cardinality; For each industrial time series data, based on the upward constant set and the downward constant set, determine the constant interval where the industrial time series data is located, and perform upward constants and downward constants on the industrial time series data respectively to obtain corresponding upward constant values and downward constant values; Based on the upward constant value and the downward constant value, the industrial time series data is subjected to constant approximation to obtain an approximate array consisting of a plurality of transformed target industrial time series data; wherein the target industrial time series data is the upward constant value or the downward constant value; According to the numerical size relationship between adjacent target industrial time series data in the approximate array, data compression is performed on the target industrial time series data, specifically including: Determine the number of elements contained in the approximate array, and compare the number of elements with a preset subscript to determine the size relationship between the number of elements and the preset subscript; wherein the elements in the approximate array refer to target industrial time series data, and the preset subscript is used to locate the elements in the approximate array; In the case where the preset subscript is not greater than the number of elements, locating the target element in the approximate array whose corresponding subscript is the preset subscript, and determining a previous target element in the approximate array that is adjacent to the target element; Determine the original numerical size relationship between the target element and the previous target element, perform data compression on the target industrial time series data based on data compression modes corresponding to different original numerical size relationships, and iteratively locate the target element and the previous target element during the data compression process to determine whether the trend of the target industrial time series data has changed during each iterative positioning, and if the trend has changed, use the currently located previous target element as the target industrial time series data obtained after data compression.
2. The industrial time series data re-characterization method based on constant approximation according to claim 1, characterized in that: In each iterative positioning, it is determined whether the trend of the target industrial time series data has changed, specifically including: In each iteration of positioning, the preset index is increased by 1 to obtain an updated preset index; Repositioning the target element and the previous target element in the approximate array according to the updated preset index, and determining the numerical value relationship between the repositioned target element and the previous target element; The numerical value relationship is compared with the original numerical value relationship, and when the numerical value relationship is different from the original numerical value relationship, it is determined that the trend of the target industrial time series data has changed.
3. The industrial time series data re-characterization method based on constant approximation according to claim 1, characterized in that: Based on the upward constant value and the downward constant value, the industrial time series data is subjected to constant approximation, specifically including: Constructing a constant approximation formula for performing constant approximation on the industrial time series data, and determining a constant approximation reference value corresponding to the industrial time series data according to the constant approximation formula; According to the constant approximation reference value, selecting the upward constant value or the downward constant value, and performing constant approximation on the industrial time series data; The constant approximation formula is expressed as: in, represents a constant approximate reference value, It means to round up to a constant value. It means taking a constant value downward. Represents industrial time series data.
4. The industrial time series data re-characterization method based on constant approximation according to claim 3 is characterized in that: According to the constant approximation reference value, the upward constant value or the downward constant value is selected to perform constant approximation on the industrial time series data, specifically including: Determine whether the constant approximate reference value is greater than 0; If yes, select the downward constant value to perform constant approximation on the industrial time series data; If not, the upward constant value is selected to perform constant approximation on the industrial time series data.
5. The industrial time series data re-characterization method based on constant approximation according to claim 1, characterized in that: According to the constant approximation cardinality, a corresponding upward constant set and downward constant set are generated, specifically including: The upward constant set is expressed as: The downward constant set is expressed as: in, Represents the first industrial time series data, Represents the second industrial time series data, represents the constant approximate cardinality, and N represents the number of interval segments.
6. Industrial time series data re-characterization equipment based on constant approximation, characterized in that: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the industrial time series data re-characterization method based on constant approximation as described in any one of claims 1 to 5.
7. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: The industrial time series data re-characterization method based on constant approximation as described in any one of claims 1 to 5.
Citation Information
Patent Citations
An automatic trend extraction method based on data blocks
CN110489810B
Time series data rapid compression method and system based on rounding transformation
CN117851159A
Unmanned charging pile transaction data intelligent management system based on big data
CN117353751A
Time series data compression method and collection method, device and readable storage medium
WO2024179110A1