An incremental working condition category automatic detection and marking method and system
By initializing and dimensionality reduction processing of the incremental data of chemical equipment sensor data, combined with similarity calculation and deep learning model, automatic detection, labeling and management of chemical processes is realized, and the problem of insufficient manpower and computing resources for real-time monitoring and diagnosis in the existing technology is solved, and the level of automated management of equipment operation is improved.
Patent Information
- Application Number
- CN202310282293.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-21
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-03-21
AI Technical Summary
The existing technology cannot effectively utilize sensor data on chemical equipment for real-time incremental data annotation and analysis, resulting in large labor investment and insufficient computing resources, and the inability to realize real-time monitoring and diagnosis of chemical processes.
By obtaining sensor incremental data, performing dimensionality reduction processing after initialization, using similarity calculation and threshold judgment to achieve automatic detection and annotation, combining deep learning models such as autoencoder for feature extraction and reconstruction, automatically expanding the sample library and performing working condition category detection.
It realizes automatic detection and management of operating data of chemical process equipment, reduces labor costs, reduces computing and storage requirements, and improves the understanding and management capabilities of equipment operation status.
Smart Images

Figure CN116339256B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated PID control, and in particular to a method and system for automatically detecting and labeling incremental working condition categories. Background Art
[0002] In recent years, accidents have occurred frequently in the chemical industry, which not only cause economic losses but may also seriously endanger lives. Therefore, monitoring and diagnosis of chemical equipment operation are particularly important.
[0003] Chemical equipment is currently equipped with numerous sensors, providing a crucial foundation for monitoring and diagnosing operational processes. However, leveraging this existing sensor data for real-time monitoring and diagnosis has become a crucial challenge. Because these numerous sensors collect vast amounts of data, some reaching terabytes, data-driven machine learning and deep learning methods have become crucial for addressing chemical process monitoring and diagnosis. While these methods are highly mature, most are supervised learning methods, requiring sample classifications for training and prediction. Sensor data volumes are enormous, often spanning long timeframes and collected frequently. Manually labeling data for each time period can be labor-intensive and potentially impossible. Unsupervised methods, such as clustering and dimensionality reduction, can only analyze and label historical data and are unable to perform real-time labeling and analysis of incremental data. The sheer volume of data also renders some traditional analysis methods inadequate due to limitations in computing memory and resources.
[0004] These are all practical challenges faced in analyzing, detecting, and labeling sensor data from chemical processes. Current technologies are unable to effectively address these issues, and they still require significant investment from technical personnel. Therefore, to address these issues, a method for automatically detecting and labeling incremental data in real time is urgently needed. Summary of the Invention
[0005] The present invention provides an incremental automatic detection and labeling method and system for working condition categories, which are used to overcome at least one technical problem existing in the prior art.
[0006] In one aspect, an embodiment of the present invention provides an incremental method for automatically detecting and labeling working condition categories, comprising:
[0007] After acquiring sensor incremental data and initializing it, the initial data set is obtained;
[0008] Performing dimensionality reduction processing on the initial data set to obtain a feature data set, wherein the feature data set includes incremental samples at multiple different time points;
[0009] Setting a sample library, wherein the sample library includes multiple historical categories and initial samples;
[0010] Selecting the incremental sample corresponding to the first time point as a feature sample;
[0011] Calculating a first similarity, wherein the calculating the first similarity comprises: calculating a similarity between the feature sample and each initial sample in the sample library to obtain a first similarity;
[0012] Arrange the first similarities in descending order to obtain a sorting index, take the first k sorting indexes, and obtain the categories of the feature samples under the first k sorting indexes respectively, which are recorded as the first category;
[0013] Initialize the category of the feature sample, recorded as the second category;
[0014] Classify the first category according to type to obtain p classification indexes;
[0015] Select the first classification index as the calculation index;
[0016] Calculating a second similarity, the calculating the second similarity comprising: calculating a similarity between each initial sample in the sample library and corresponding to the calculation index in the first category, and obtaining the second similarity by threshold calculation;
[0017] According to the magnitude relationship between the first similarity and the second similarity under the same first category, determine whether the feature sample belongs to the first category; if so, determine the first category as the final category of the feature sample; if not, add 1 to the calculation index, and determine whether the calculation index is less than or equal to p; if so, go to the step of calculating the second similarity; if not, determine the second category as the final category of the feature sample;
[0018] Determine whether the final category belongs to the historical category. If not, add the feature sample to the sample library and mark the category. If so, determine whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirement. If not, add the feature sample to the sample library and mark the category. If so, determine whether the feature sample is more representative. If so, add the feature sample to the sample library and mark the category. If not, directly go to the step of determining whether the current time point is the last time point.
[0019] Determine whether the current time point is the last time point. If so, return to the current sample library. If not, select the incremental sample corresponding to the next time point as the feature sample and go to the first similarity calculation step.
[0020] Optionally, the dimensionality reduction process is performed on the initial data set to obtain a feature data set, specifically:
[0021] Mapping the initial data set into feature Z1 through the encoding network, and then mapping feature Z1 to the initial data set through the decoding network to obtain reconstructed data;
[0022] When the reconstruction error between the reconstructed data and the initial data set meets the set value, the corresponding feature Z1 is used as the feature data set.
[0023] Optionally, a distance-based calculation method is used to calculate the similarity.
[0024] Optionally, the similarity is calculated using a Manhattan distance calculation method; or the similarity is calculated using a Euclidean distance calculation method.
[0025] Optionally, a second similarity is obtained by threshold calculation, specifically:
[0026] The cumulative distribution quantile value of the similarity between the initial samples in the first category corresponding to the calculation index is taken as the second similarity.
[0027] Optionally, judging whether the feature sample belongs to the first category according to the magnitude relationship between the first similarity and the second similarity under the first category is specifically:
[0028] The first similarity and the second similarity are compared. When the first similarity is greater than the second similarity, the feature sample belongs to the first category; otherwise, the feature sample does not belong to the first category.
[0029] Optionally, determining whether the feature sample is more representative is as follows:
[0030] After replacing any initial sample corresponding to the final category in the sample library with the feature sample, calculate the variance, which is recorded as the first variance;
[0031] Calculate the variance of the initial samples corresponding to the final category in the sample library, and record it as the second variance;
[0032] The first variance and the second variance are compared. When the first variance is greater than the second variance, it indicates that the feature sample is more representative.
[0033] On the other hand, the present invention also provides an incremental automatic detection and labeling system for working condition categories, comprising:
[0034] The acquisition module is used to obtain sensor incremental data and perform initialization processing to obtain the initial data set;
[0035] A dimensionality reduction module is used to perform dimensionality reduction processing on the initial data set to obtain a feature data set, wherein the feature data set includes incremental samples at multiple different time points;
[0036] A setting module, used to set a sample library, wherein the sample library includes multiple historical categories and initial samples;
[0037] A first selection module is used to select the incremental sample corresponding to the first time point as a feature sample;
[0038] A first calculation module is configured to calculate a first similarity, wherein the calculating the first similarity comprises: calculating a similarity between the feature sample and each initial sample in the sample library to obtain a first similarity;
[0039] a sorting module, configured to arrange the first similarities in descending order to obtain sorting indexes, take the first k sorting indexes, and obtain the categories of the feature samples under the first k sorting indexes respectively, which are recorded as first categories;
[0040] An initialization module, used for initializing the category of the feature sample, recorded as the second category;
[0041] A classification module, configured to classify the first category according to type to obtain m classification indexes;
[0042] The second selection module is used to select the first classification index as the calculation index;
[0043] A second calculation module is configured to calculate a second similarity, wherein the calculating the second similarity comprises: calculating the similarity between each initial sample in the first category corresponding to the calculation index in the sample library, and obtaining the second similarity through threshold calculation;
[0044] A first judgment module is configured to judge whether the feature sample belongs to the first category based on the magnitude relationship between the first similarity and the second similarity under the first category; if so, determine the first category as the final category of the feature sample; if not, add 1 to the calculation index, and judge whether the calculation index is less than or equal to m; if so, proceed to the step of calculating the second similarity; if not, determine the second category as the final category of the feature sample;
[0045] The second judgment module is used to judge whether the final category belongs to the historical category. If not, the feature sample is added to the sample library and the category is marked. If so, it is judged whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirement. If not, the feature sample is added to the sample library and the category is marked. If so, it is judged whether the feature sample is more representative. If so, the feature sample is added to the sample library and the category is marked. If not, it directly goes to the step of judging whether the current time point is the last time point.
[0046] The third judgment module is used to judge whether the current time point is the last time point. If so, return to the current sample library; if not, select the incremental sample corresponding to the next time point as the feature sample and go to the first similarity calculation step.
[0047] Optionally, the dimensionality reduction module includes an encoding module and a decoding module;
[0048] The encoding module is used to map the initial data set into features Z1 through an encoding network;
[0049] The decoding module is used to map the feature Z1 to the initial data set through a decoding network to obtain reconstructed data.
[0050] Optionally, it further includes a third calculation module and a comparison module;
[0051] The third calculation module is used to calculate the variance after replacing any initial sample corresponding to the final category in the sample library with the feature sample, which is recorded as the first variance; and is also used to calculate the variance of the initial sample corresponding to the final category in the sample library, which is recorded as the second variance;
[0052] The comparison module is used to compare the first variance and the second variance. When the first variance is greater than the second variance, it indicates that the feature sample is more representative.
[0053] The innovative features of the embodiments of the present invention include:
[0054] 1. In this embodiment, the automatic expansion of the sample library and the detection and labeling of the working condition categories are achieved through similarity recognition based on the dimensionality reduction data, which can realize the automatic detection of the operating data of the chemical process equipment and the automatic management of the operating conditions. It can not only enable the enterprise to better understand and manage the operating status of the equipment, but also reduce labor costs. It is one of the innovations of the embodiment of the present invention.
[0055] 2. In this embodiment, dimensionality reduction processing is performed on a large amount of multidimensional data, which can reduce storage memory and computing power, thereby reducing the requirements for computing memory and computing power resources, which is one of the innovations of the embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0057] Figure 1A flow chart of a method for automatically detecting and labeling incremental working condition categories provided by an embodiment of the present invention;
[0058] Figure 2 A flowchart of dimensionality reduction processing provided by an embodiment of the present invention;
[0059] Figure 3 A flow chart for determining sample representativeness according to an embodiment of the present invention;
[0060] Figure 4 A schematic structural diagram of an incremental automatic detection and labeling system for working condition categories provided by an embodiment of the present invention;
[0061] Figure 5 A schematic structural diagram of a dimensionality reduction module provided in an embodiment of the present invention;
[0062] Figure 6 Another structural diagram of the incremental working condition category automatic detection and labeling system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.
[0064] It should be noted that the terms "including," "having," and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or device.
[0065] The embodiments of the present invention disclose a method and system for automatically detecting and labeling incremental working condition categories, which are described in detail below.
[0066] Figure 1 For a flow chart of the incremental working condition category automatic detection and marking method provided by the embodiment of the present invention, please refer to Figure 1 The present invention provides an incremental automatic detection and labeling method for working condition categories, including:
[0067] Step 1: Obtain sensor incremental data and perform initialization processing to obtain the initial data set;
[0068] Step 2: Perform dimensionality reduction on the initial data set to obtain a feature data set, which contains incremental samples at multiple different time points;
[0069] Step 3: Set up a sample library, which contains multiple historical categories and initial samples;
[0070] Step 4: Select the incremental sample corresponding to the first time point as the feature sample;
[0071] Step 5: Calculating the first similarity, which includes: calculating the similarity between the feature sample and each initial sample in the sample library to obtain the first similarity;
[0072] Step 6: Arrange the first similarities in descending order to obtain the sorting index, take the first k sorting indexes, and obtain the categories of the feature samples under the first k sorting indexes respectively, which are recorded as the first category;
[0073] Step 7: Initialize the category of the feature sample, recorded as the second category;
[0074] Step 8: Classify the first category according to type and obtain m classification indexes;
[0075] Step 9: Select the first classification index as the calculation index;
[0076] Step 10: Calculating the second similarity, which includes: calculating the similarity between each initial sample in the first category corresponding to the calculation index in the sample library, and obtaining the second similarity through threshold calculation;
[0077] Step 11: Based on the magnitude relationship between the first similarity and the second similarity under the same first category, determine whether the feature sample belongs to the first category. If so, determine the first category as the final category of the feature sample; if not, add 1 to the calculation index and determine whether the calculation index is less than or equal to m. If so, go to the step of calculating the second similarity. If not, determine the second category as the final category of the feature sample;
[0078] Step 12: Determine whether the final category belongs to the historical category. If not, add the feature sample to the sample library and mark the category. If so, determine whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirement. If not, add the feature sample to the sample library and mark the category. If so, determine whether the feature sample is more representative. If so, add the feature sample to the sample library and mark the category. If not, directly go to the step of determining whether the current time point is the last time point.
[0079] Step 13: Determine whether the current time point is the last time point. If so, return to the current sample library. If not, select the incremental sample corresponding to the next time point as the feature sample and go to the first similarity calculation step.
[0080] Specifically, please refer to Figure 1 The method for automatically detecting and labeling incremental working condition categories provided in this embodiment obtains incremental data from chemical industry sensors through step 1. The incremental data obtained here can be real-time incremental data or historical incremental data. When collecting incremental data, including data from multiple sensors, the collection frequency can be set to 30 seconds. Of course, the setting of 30 seconds here is only an example and does not limit this application. In different usage scenarios, the collection frequency can be specifically set as needed.
[0081] When collecting incremental data, assuming that the collection process includes n time points and m sensors, the collected incremental data can be expressed as During the collection process, there may be missing values, outliers, etc. Therefore, the collected incremental data needs to be initialized. For example, the missing values and outliers are filled with the previous data, and then the filled data set is normalized to obtain the initial data set.
[0082] The initial data set obtained after initialization of the incremental data is often of high dimension, and the cost of computing and storage is also high. Therefore, in order to reduce the requirements for computing and storage, in step 2, the initial data set is subjected to dimensionality reduction processing, and the initial data set is extracted to a suitable dimension, which can reduce the amount of computation while retaining the main information.
[0083] In this embodiment, data dimensionality reduction is achieved through a deep learning model. For example, an autoencoder can be used to extract feature information. When extracting feature information, the initial data set is first mapped to feature Z1 through the encoding network, and then the feature Z1 is mapped to the initial data set through the decoding network to obtain reconstructed data. By repeating the above encoding and decoding actions until the error between the reconstructed data and the initial data set no longer decreases, the encoding and decoding actions are terminated, and the corresponding feature Z1 at this time is used as the feature data set. This feature data set contains incremental samples at multiple different time points, which not only retains the main features of the incremental samples in the initial data set, but also reduces the amount of calculation, thereby reducing the requirements for calculation and storage.
[0084] In step 3, a sample library is set up. The sample library contains multiple historical categories, each of which contains at least one initial sample. An existing sample library can be used, or a data sample set from a known normal operating condition over a period of time, such as an hour, can be selected to form the sample library.
[0085] Since the feature dataset contains incremental samples at multiple time points, it is necessary to traverse each incremental sample in the feature dataset in turn when calculating similarity. Therefore, in this embodiment, a feature sample is selected in step 4. To avoid repeated calculations and missing samples, a loop traversal is performed according to the time points. For example, the incremental sample corresponding to the first time point is first selected as the feature sample, and the incremental sample corresponding to the second time point is selected as the feature sample next time, and so on until the last time point.
[0086] After obtaining the feature sample, its first similarity is calculated in step 5. Since the sample library contains multiple initial samples, when calculating the first similarity, it is necessary to sequentially calculate the similarity between the feature sample and each initial sample, thereby obtaining multiple first similarities. In step 6, the multiple first similarities are sorted from largest to smallest to obtain a sorting index. Then, the first k sorting indices are taken, and the categories of the feature samples under the first k sorting indices are obtained. Here, the category of the initial sample corresponding to each sorting index is used as the category of the feature sample under the corresponding sorting index, and the category of the feature sample at this time is recorded as the first category.
[0087] Each incremental sample initially collected has its own category. In step 7, the category of the feature sample is initialized. The initialized category here is the category to which the sample originally belongs, which is recorded as the second category.
[0088] Among the multiple initial samples in the sample library, some may belong to the same category. Therefore, some of the k first categories obtained in step 6 belong to the same category. In step 8, the k first categories are classified by type, and first categories of the same type are placed in the same category, resulting in m classification indexes. In step 9, the first classification index is selected as the calculation index.
[0089] In order to determine the category of the feature sample, this embodiment calculates the similarity between the initial samples in the first category corresponding to the index in the sample library in step 10, and obtains the second similarity by performing threshold calculation on the similarity.
[0090] After obtaining the second similarity, in step 11, the first similarity and the second similarity under the same category are compared, and based on the size relationship between the two, it is determined whether the feature sample belongs to the first category. For example, when the first similarity is greater than the second similarity, it means that the similarity of the incremental sample is higher, that is, it means that the feature sample belongs to the first category, and the first category is used as the final category of the feature sample. When the first similarity is less than or equal to the second similarity, it means that the feature sample does not belong to the first category. At this time, it is necessary to determine whether the feature sample belongs to other categories in the classification index. Therefore, 1 is added to the calculation index, and it is determined whether the newly obtained calculation index is less than or equal to m. When it is less than or equal to m, it means that there is still a corresponding classification index for the calculation index, and the process jumps to step 10, recalculates the second similarity, and determines whether the feature sample belongs to the category of the next classification index. The above steps are repeated until the calculation index is greater than m. If the feature sample still does not belong to the first category, the second category is determined as the final category of the feature sample.
[0091] After obtaining the final category of the feature sample, determine in step 12 whether the final category belongs to the historical category in the sample library. If not, it indicates that the feature sample is a new working condition. The feature sample is added to the sample library and its category is marked. If it does, since the number of samples under each category in the sample library is limited, it is necessary to determine whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirements. The predetermined requirements here refer to the upper limit of the number. For example, if the upper limit of the number of samples under a certain category is 20, then the predetermined requirement refers to 20. When the number does not reach the upper limit, the feature sample is added to the sample library and its category is marked. When the number of initial samples reaches the upper limit, the variance is used to calculate whether the feature sample is more representative. If it is more representative, the feature sample is added to the sample library and the category is marked. Otherwise, go directly to step 13.
[0092] Since the feature data set contains incremental samples at multiple time points, when calculating the similarity, it is necessary to traverse each incremental sample in the feature data set in turn. Therefore, after detecting the category of an incremental sample, in step 13, by judging whether the time point corresponding to the current incremental sample is the last time point, it is judged whether all incremental samples in the feature data set have been detected. If the current time point is the last time point, it means that all incremental samples in the feature data set have been detected, the current sample library is the final sample library, and the current sample library is returned. If the current time point is not the last time point, it means that there are incremental samples in the feature data set that have not been detected. At this time, the incremental samples at the next time point are detected, that is, the incremental samples corresponding to the next time point are selected as feature samples, and the process jumps to step 5 to repeat the above steps to detect the current feature sample.
[0093] The incremental automatic detection and labeling method for operating condition categories provided by this invention reduces the dimensionality of large amounts of multidimensional data, reducing storage memory and computational complexity, thereby lowering the requirements for memory and computing resources. Based on the reduced dimensionality data, similarity recognition enables automatic expansion of the sample library and detection and labeling of operating condition categories. This enables automatic detection of chemical process equipment operating data and automatic management of operating conditions, enabling enterprises to better understand and manage equipment operating conditions while reducing labor costs.
[0094] Optionally, Figure 2 For a flowchart of dimensionality reduction processing provided by an embodiment of the present invention, please refer to Figure 1 and Figure 2 In step 2, the initial data set is subjected to dimensionality reduction processing to obtain a feature data set, specifically: step 21, the initial data set is mapped to feature Z1 through the encoding network, and then the feature Z1 is mapped to the initial data set through the decoding network to obtain reconstructed data; step 22, when the reconstruction error between the reconstructed data and the initial data set meets the set value, the corresponding feature Z1 is used as the feature data set.
[0095] Specifically, please refer to Figure 1 and Figure 2 In this embodiment, data dimensionality reduction is achieved through a deep learning model. For example, an autoencoder can be used to extract feature information. When extracting feature information, the initial data set X is first encoded through the encoding network. i Mapped to feature Z1, and then mapped to the initial data set through the decoding network, the reconstructed data X i ′ , then reconstruct the data X i ′ With the initial dataset X i The reconstruction error between By repeatedly performing the above encoding and decoding actions until the data X is reconstructed i ′ With the initial dataset X i The reconstruction error between the two values satisfies a set value. For example, the set value can be that if the reconstruction error does not decrease compared to the previous reconstruction error, the reconstruction error satisfies the set value. When the reconstruction error satisfies the set value, the encoding and decoding process ends, and the corresponding feature Z1 is used as the feature dataset. This feature dataset contains incremental samples at multiple different time points. This not only retains the main features of the incremental samples in the initial dataset, but also reduces the amount of computation, thereby reducing the requirements for computing and storage.
[0096] Optionally, a distance-based calculation method is used to calculate the similarity. Specifically, this embodiment uses a distance-based calculation method to calculate the similarity. In different embodiments, different distance calculation methods can be used, for example, the Manhattan distance calculation method. Euclidean distance calculation method Or Mahalanobis distance calculation method Etc., where Z1 and Z2 represent samples at different times, j represents the sensor number, and S is the covariance matrix of Z1 and Z2.
[0097] When calculating the first similarity according to the above calculation method, assuming that the feature sample Z1 at a certain moment is [1, 2, 3], and the initial sample Z2 at a certain moment in the sample library is [4, 5, 6], then the distance between the feature sample Z1 and the initial sample Z2 is calculated according to the Manhattan distance calculation method. In this way, the similarity between the two can be obtained.
[0098] Alternatively, refer to Figure 1 In step 10, the second similarity is obtained by threshold calculation, specifically: the cumulative distribution quantile value of the similarity between each initial sample under the first category corresponding to the calculation index is taken as the second similarity.
[0099] Specifically, please refer to Figure 1 In this embodiment, when calculating the second similarity, the similarity sim between the initial samples in a certain category is first calculated, and then the cumulative distribution quantile sim' of all the similarities sim in the category is taken, and the cumulative distribution quantile sim' is used as the second similarity.
[0100] Alternatively, refer to Figure 1 In step 11, based on the size relationship between the first similarity and the second similarity under the same first category, it is determined whether the feature sample belongs to the first category. Specifically, the sizes of the first similarity and the second similarity are compared. When the first similarity is greater than the second similarity, the feature sample belongs to the first category. Otherwise, the feature sample does not belong to the first category.
[0101] Specifically, when determining the category of a feature sample, the first and second similarities within the same category are compared, and based on the magnitude relationship between the two, a determination is made as to whether the feature sample belongs to the first category. For example, when the first similarity is greater than the second similarity, it indicates that the similarity of the incremental sample is higher, which means that the feature sample belongs to the first category, and the first category is then used as the final category of the feature sample. If the first similarity is less than or equal to the second similarity, it indicates that the feature sample does not belong to the first category.
[0102] Optionally, Figure 3For a flow chart of sample representativeness determination provided by an embodiment of the present invention, please refer to Figure 1 and Figure 3 In step 12, it is determined whether the feature sample is more representative, specifically: step 121, replace any initial sample corresponding to the final category in the sample library with the feature sample and calculate the variance, which is recorded as the first variance; step 122, calculate the variance of the initial sample corresponding to the final category in the sample library, which is recorded as the second variance; step 123, compare the first variance and the second variance. When the first variance is greater than the second variance, it means that the feature sample is more representative.
[0103] Specifically, please refer to Figure 1 and Figure 3 In this embodiment, representativeness is measured based on variance. When judging representativeness, the variance of the feature sample is first calculated through step 121. When calculating the variance of the feature sample, any initial sample corresponding to the final category in the sample library is replaced with the feature sample, and then the variance is calculated. For example, assuming that the feature sample is a, and the initial samples corresponding to the final category in the sample library are (b, c, d, e), then an initial sample such as c is randomly selected and replaced with a. The sample obtained after replacement is (b, a, d, e). The variance of (b, a, d, e) can be calculated as the variance of the feature sample, which is recorded as the first variance.
[0104] The variance of the initial samples corresponding to the final category in the sample library is calculated in step 122 and recorded as the second variance. The variance calculation method can refer to the existing technology and will not be described in detail here.
[0105] After obtaining the first variance and the second variance, the first variance and the second variance are compared in step 123. When the first variance is greater than the second variance, it indicates that the feature sample is more representative, and the feature sample is added to the sample library and the category is marked; otherwise, the feature sample is discarded and subsequent calculations are continued.
[0106] Based on the same inventive concept, the present invention also provides an incremental automatic detection and marking system for working condition categories. Figure 4 For a structural diagram of an incremental working condition category automatic detection and labeling system provided by an embodiment of the present invention, please refer to Figure 4 The incremental working condition category automatic detection and labeling system 100 provided in this embodiment includes:
[0107] An acquisition module 101 is used to acquire sensor incremental data and perform initialization processing to obtain an initial data set;
[0108] A dimensionality reduction module 102 is used to perform dimensionality reduction processing on the initial data set to obtain a feature data set, where the feature data set includes incremental samples at multiple different time points;
[0109] A setting module 103 is used to set a sample library, which includes multiple historical categories and initial samples;
[0110] A first selection module 104 is configured to select an incremental sample corresponding to a first time point as a feature sample;
[0111] A first calculation module 105 is configured to calculate a first similarity, where the first similarity calculation includes: calculating a similarity between the feature sample and each initial sample in the sample library to obtain the first similarity;
[0112] The sorting module 106 is configured to sort the first similarities in descending order to obtain sorting indexes, take the first k indexes, and obtain the categories of the feature samples under the first k sorting indexes, which are recorded as first categories;
[0113] Initialization module 107, used to initialize the category of feature samples, recorded as the second category;
[0114] A classification module 108 is configured to classify the first category according to type to obtain m classification indexes;
[0115] The second selection module 109 is used to select the first classification index as the calculation index;
[0116] The second calculation module 110 is configured to calculate a second similarity, wherein the second similarity calculation includes: calculating the similarity between each initial sample in the first category corresponding to the calculation index in the sample library, and obtaining the second similarity through threshold calculation;
[0117] A first judgment module 111 is configured to determine whether the feature sample belongs to the first category based on the magnitude relationship between the first similarity and the second similarity under the first category. If so, the first category is determined as the final category of the feature sample. If not, the calculation index is incremented by 1, and a determination is made as to whether the calculation index is less than or equal to m. If so, the step of calculating the second similarity is performed. If not, the second category is determined as the final category of the feature sample.
[0118] The second judgment module 112 is used to judge whether the final category belongs to the historical category. If not, the feature sample is added to the sample library and the category is marked. If so, it is judged whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirement. If not, the feature sample is added to the sample library and the category is marked. If so, it is judged whether the feature sample is more representative. If so, the feature sample is added to the sample library and the category is marked. If not, it directly goes to the step of judging whether the current time point is the last time point.
[0119] The third judgment module 113 is used to judge whether the current time point is the last time point. If so, return to the current sample library; if not, select the incremental sample corresponding to the next time point as the feature sample and go to the first similarity calculation step.
[0120] Specifically, please refer to Figure 4 The incremental working condition automatic detection and labeling system provided in this embodiment acquires incremental data from chemical industry sensors through acquisition module 101. The incremental data acquired here can be real-time incremental data or historical incremental data. When acquiring incremental data, including data from multiple sensors, the acquisition frequency can be set to 30 seconds. Of course, the setting of 30 seconds here is only an example and does not limit this application. In different usage scenarios, the acquisition frequency can be specifically set as needed.
[0121] When collecting incremental data, assuming that the collection process includes n time points and m sensors, the collected incremental data can be expressed as During the collection process, there may be missing values, outliers, etc. Therefore, the collected incremental data needs to be initialized. For example, the missing values and outliers are filled with the previous data, and then the filled data set is normalized to obtain the initial data set.
[0122] The initial data set obtained after initialization processing of the incremental data often has a high dimension and requires high costs for calculation and storage. Therefore, in order to reduce the requirements for calculation and storage, the dimensionality reduction module 102 is used to reduce the dimensionality of the initial data set and extract the initial data set to a suitable dimension, thereby retaining the main information while reducing the amount of calculation.
[0123] In this embodiment, data dimensionality reduction is achieved through a deep learning model. For example, an autoencoder can be used to extract feature information. When extracting feature information, the initial data set is first mapped to feature Z1 through the encoding network, and then the feature Z1 is mapped to the initial data set through the decoding network to obtain reconstructed data. By repeating the above encoding and decoding actions until the error between the reconstructed data and the initial data set no longer decreases, the encoding and decoding actions are terminated, and the corresponding feature Z1 at this time is used as the feature data set. This feature data set contains incremental samples at multiple different time points, which not only retains the main features of the incremental samples in the initial data set, but also reduces the amount of calculation, thereby reducing the requirements for calculation and storage.
[0124] The sample library is set up by the setting module 103. The sample library includes multiple historical categories, each of which includes at least one initial sample. An existing sample library can be used here, or a data sample set of a known normal operating condition within a period of time, such as an hour, can be selected to form the sample library.
[0125] Since the feature dataset contains incremental samples at multiple time points, it is necessary to traverse each incremental sample in the feature dataset in turn when calculating similarity. Therefore, in this embodiment, a feature sample is selected by the first selection module 104. To avoid repeated calculations and missing samples, a loop traversal is performed according to the time points. For example, the incremental sample corresponding to the first time point is first selected as the feature sample, and the incremental sample corresponding to the second time point is next selected as the feature sample, and so on until the last time point.
[0126] After obtaining the feature sample, its first similarity is calculated using the first calculation module 105. Since the sample library contains multiple initial samples, when calculating the first similarity, it is necessary to sequentially calculate the similarity between the feature sample and each initial sample, thereby obtaining multiple first similarities. The multiple first similarities are arranged in descending order by the sorting module 106 to obtain a sorting index. The first k sorting indexes are then taken, and the categories of the feature samples under the first k sorting indexes are obtained. Here, the category of the initial sample corresponding to each sorting index is used as the category of the feature sample under the corresponding sorting index, and the category of the feature sample at this time is recorded as the first category.
[0127] Each incremental sample initially collected has its own category. The category of the feature sample is initialized by the initialization module 107. The initialized category here is the category to which the sample originally belongs, which is recorded as the second category.
[0128] Among the multiple initial samples in the sample library, some may belong to the same category. Therefore, some of the k first categories belong to the same type. The classification module 108 classifies the k first categories by type, placing the first categories of the same type into the same category, resulting in m classification indexes. The second selection module 109 then selects the first classification index as the calculation index.
[0129] In order to determine the category of the feature sample, this embodiment calculates the similarity between the initial samples in the first category corresponding to the calculation index in the sample library through the second calculation module 110, and obtains the second similarity by performing threshold calculation on the similarity.
[0130] After obtaining the second similarity, the first judgment module 111 is used to compare the first similarity and the second similarity under the same category, and based on the size relationship between the two, it is determined whether the feature sample belongs to the first category. For example, when the first similarity is greater than the second similarity, it means that the similarity of the incremental sample is higher, that is, it means that the feature sample belongs to the first category, and the first category is used as the final category of the feature sample. When the first similarity is less than or equal to the second similarity, it means that the feature sample does not belong to the first category. At this time, it is necessary to determine whether the feature sample belongs to other categories in the classification index. Therefore, 1 is added to the calculation index, and it is determined whether the newly obtained calculation index is less than or equal to m. When it is less than or equal to m, it means that there is still a corresponding classification index for the calculation index. The second similarity is recalculated, and it is determined whether the feature sample belongs to the category of the next classification index. The above steps are repeated until the calculation index is greater than m. If the feature sample still does not belong to the first category, the second category is determined as the final category of the feature sample.
[0131] After obtaining the final category of the feature sample, the second judgment module 112 is used to determine whether the final category belongs to the historical category in the sample library. If not, it indicates that the feature sample is a new working condition. The feature sample is added to the sample library and its category is marked. If it does, since the number of samples under each category in the sample library is limited, it is necessary to determine whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirement. The predetermined requirement here refers to the upper limit of the number. For example, if the upper limit of the number of samples under a certain category is 20, then the predetermined requirement refers to 20. When the number does not reach the upper limit, the feature sample is added to the sample library and its category is marked. When the number of initial samples reaches the upper limit, the variance is used to calculate whether the feature sample is more representative. If it is more representative, the feature sample is added to the sample library and the category is marked. Otherwise, go directly to the next step.
[0132] Since the feature data set contains incremental samples at multiple time points, when calculating the similarity, it is necessary to traverse each incremental sample in the feature data set in turn. Therefore, after detecting the category of an incremental sample, the third judgment module 113 is used to determine whether the time point corresponding to the current incremental sample is the last time point, thereby determining whether all incremental samples in the feature data set have been detected. If the current time point is the last time point, it indicates that all incremental samples in the feature data set have been detected, and the current sample library is the final sample library, and the current sample library is returned. If the current time point is not the last time point, it indicates that there are incremental samples in the feature data set that have not been fully detected. At this time, the incremental samples at the next time point are detected, that is, the incremental samples corresponding to the next time point are selected as feature samples, and the first similarity of the newly selected feature samples is calculated, and the above steps are repeated to detect the current feature sample.
[0133] The incremental automatic detection and labeling system for operating condition categories provided by this invention reduces the dimensionality of large amounts of multidimensional data, reducing storage memory and computational complexity, thereby lowering the requirements for memory and computing resources. Based on the reduced dimensionality data, similarity recognition enables automatic expansion of the sample library and detection and labeling of operating condition categories. This system can automatically detect operating data for chemical process equipment and automatically manage its operating conditions. This not only enables enterprises to better understand and manage equipment operating conditions, but also reduces labor costs.
[0134] Optionally, Figure 5 A structural diagram of the dimensionality reduction module 102 provided in an embodiment of the present invention is shown in FIG. Figure 4 and Figure 5 The dimensionality reduction module 102 includes an encoding module 1021 and a decoding module 1022; the encoding module 1021 is used to map the initial data set to feature Z1 through the encoding network; the decoding module 1022 is used to map the feature Z1 to the initial data set through the decoding network to obtain reconstructed data.
[0135] Specifically, please refer to Figure 4 and Figure 5 In this embodiment, data dimensionality reduction is achieved through a deep learning model. For example, an autoencoder can be used to extract feature information. The dimensionality reduction module 102 includes an encoding module 1021 and a decoding module 1022. When extracting feature information, the encoding module 1021 first converts the initial data set X into i Mapped to feature Z1, the decoding module 1022 then maps feature Z1 to the initial data set through the decoding network to obtain the reconstructed data X i ′ , then reconstruct the data X i ′ With the initial dataset X i The reconstruction error between By repeatedly performing the above encoding and decoding actions until the data X is reconstructed i ′ With the initial dataset X i The reconstruction error between the two values satisfies a set value. For example, the set value can be that if the reconstruction error does not decrease compared to the previous reconstruction error, the reconstruction error satisfies the set value. When the reconstruction error satisfies the set value, the encoding and decoding process ends, and the corresponding feature Z1 is used as the feature dataset. This feature dataset contains incremental samples at multiple different time points. This not only retains the main features of the incremental samples in the initial dataset, but also reduces the amount of computation, thereby reducing the requirements for computing and storage.
[0136] Optionally, Figure 6For another structural diagram of the incremental working condition category automatic detection and labeling system provided by the embodiment of the present invention, please refer to Figure 6 The incremental working condition category automatic detection and labeling system 100 also includes a third calculation module 114 and a comparison module 115; the third calculation module 114 is used to calculate the variance after replacing any initial sample corresponding to the final category in the sample library with the feature sample, which is recorded as the first variance; and is also used to calculate the variance of the initial sample corresponding to the final category in the sample library, which is recorded as the second variance; the comparison module 115 is used to compare the first variance and the second variance. When the first variance is greater than the second variance, it means that the feature sample is more representative.
[0137] Specifically, please refer to Figure 6 In this embodiment, representativeness is measured based on variance. When judging representativeness, the variance of the feature sample is first calculated by the third calculation module 114. When calculating the variance of the feature sample, the feature sample is used to replace any initial sample corresponding to the final category in the sample library, and then the variance is calculated. For example, assuming that the feature sample is a, and the initial samples corresponding to the final category in the sample library are (b, c, d, e), then an initial sample such as c is randomly selected and replaced with a. The sample obtained after replacement is (b, a, d, e). The variance of (b, a, d, e) can be calculated as the variance of the feature sample, which is recorded as the first variance.
[0138] Then, the variance of the initial samples corresponding to the final category in the sample library is calculated by the third calculation module 114, which is recorded as the second variance. The variance calculation method can refer to the existing technology and will not be described here in detail.
[0139] After obtaining the first variance and the second variance, the comparison module 115 is used to compare the first variance and the second variance. When the first variance is greater than the second variance, it means that the feature sample is more representative, and the feature sample is added to the sample library and the category is marked; otherwise, the feature sample is discarded and subsequent calculations are continued.
[0140] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0141] Those skilled in the art will appreciate that the modules in the apparatuses of the embodiments may be distributed in the apparatuses of the embodiments as described in the embodiments, or may be located in one or more apparatuses different from the embodiments with corresponding changes. The modules in the above embodiments may be combined into one module or further divided into multiple sub-modules.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An incremental automatic detection and labeling method for working condition categories, characterized in that: include: After acquiring sensor incremental data and initializing it, the initial data set is obtained; Performing dimensionality reduction processing on the initial data set to obtain a feature data set, wherein the feature data set includes incremental samples at multiple different time points; Setting a sample library, wherein the sample library includes multiple historical categories and initial samples; Selecting the incremental sample corresponding to the first time point as a feature sample; Calculating a first similarity, wherein the calculating the first similarity comprises: calculating a similarity between the feature sample and each initial sample in the sample library to obtain a first similarity; Arrange the first similarities in descending order to obtain a sorting index, take the first k sorting indexes, and obtain the categories of the feature samples under the first k sorting indexes respectively, which are recorded as the first category; Initialize the category of the feature sample, recorded as the second category; Classify the first category according to type to obtain p classification indexes; Select the first classification index as the calculation index; Calculating a second similarity, the calculating the second similarity comprising: calculating a similarity between each initial sample in the sample library and corresponding to the calculation index in the first category, and obtaining the second similarity by threshold calculation; According to the magnitude relationship between the first similarity and the second similarity under the same first category, determine whether the feature sample belongs to the first category; if so, determine the first category as the final category of the feature sample; if not, add 1 to the calculation index, and determine whether the calculation index is less than or equal to p; if so, go to the step of calculating the second similarity; if not, determine the second category as the final category of the feature sample; Determine whether the final category belongs to the historical category. If not, add the feature sample to the sample library and mark the category. If so, determine whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirement. If not, add the feature sample to the sample library and mark the category. If so, determine whether the feature sample is more representative. If so, add the feature sample to the sample library and mark the category. If not, directly go to the step of determining whether the current time point is the last time point. Determine whether the current time point is the last time point. If so, return to the current sample library. If not, select the incremental sample corresponding to the next time point as the feature sample and go to the first similarity calculation step.
2. The incremental automatic detection and labeling method for working condition categories according to claim 1 is characterized in that: The dimensionality reduction process is performed on the initial data set to obtain a feature data set, specifically: Mapping the initial data set into feature Z1 through the encoding network, and then mapping feature Z1 to the initial data set through the decoding network to obtain reconstructed data; When the reconstruction error between the reconstructed data and the initial data set meets the set value, the corresponding feature Z1 is used as the feature data set.
3. The incremental automatic detection and labeling method for working condition categories according to claim 1 is characterized in that: The similarity is calculated using a distance-based calculation method.
4. The incremental automatic detection and labeling method for working condition categories according to claim 3 is characterized in that: The similarity is calculated using the Manhattan distance method or the Euclidean distance method.
5. The incremental automatic detection and labeling method for working condition categories according to claim 1 is characterized in that: The second similarity is obtained by threshold calculation, specifically: The cumulative distribution quantile value of the similarity between the initial samples in the first category corresponding to the calculation index is taken as the second similarity.
6. The incremental automatic detection and labeling method for working condition categories according to claim 1 is characterized in that: The determining whether the feature sample belongs to the first category according to the magnitude relationship between the first similarity and the second similarity under the first category is specifically as follows: The first similarity and the second similarity are compared. When the first similarity is greater than the second similarity, the feature sample belongs to the first category; otherwise, the feature sample does not belong to the first category.
7. The incremental automatic detection and labeling method for working condition categories according to claim 1 is characterized in that: Determine whether the feature sample is more representative, specifically: After replacing any initial sample corresponding to the final category in the sample library with the feature sample, calculate the variance, which is recorded as the first variance; Calculate the variance of the initial samples corresponding to the final category in the sample library, and record it as the second variance; The first variance and the second variance are compared. When the first variance is greater than the second variance, it indicates that the feature sample is more representative.
8. An incremental automatic detection and labeling system for working condition categories, characterized by: include: The acquisition module is used to obtain sensor incremental data and perform initialization processing to obtain the initial data set; A dimensionality reduction module is used to perform dimensionality reduction processing on the initial data set to obtain a feature data set, wherein the feature data set includes incremental samples at multiple different time points; A setting module, used to set a sample library, wherein the sample library includes multiple historical categories and initial samples; A first selection module is used to select the incremental sample corresponding to the first time point as a feature sample; A first calculation module is configured to calculate a first similarity, wherein the calculating the first similarity comprises: calculating a similarity between the feature sample and each initial sample in the sample library to obtain a first similarity; a sorting module, configured to arrange the first similarities in descending order to obtain sorting indexes, take the first k sorting indexes, and obtain the categories of the feature samples under the first k sorting indexes respectively, which are recorded as first categories; An initialization module, used for initializing the category of the feature sample, recorded as the second category; A classification module, configured to classify the first category according to type to obtain m classification indexes; The second selection module is used to select the first classification index as the calculation index; A second calculation module is configured to calculate a second similarity, wherein the calculating the second similarity comprises: calculating the similarity between each initial sample in the first category corresponding to the calculation index in the sample library, and obtaining the second similarity through threshold calculation; A first judgment module is configured to judge whether the feature sample belongs to the first category based on the magnitude relationship between the first similarity and the second similarity under the first category; if so, determine the first category as the final category of the feature sample; if not, add 1 to the calculation index, and judge whether the calculation index is less than or equal to m; if so, proceed to the step of calculating the second similarity; if not, determine the second category as the final category of the feature sample; The second judgment module is used to judge whether the final category belongs to the historical category. If not, the feature sample is added to the sample library and the category is marked. If so, it is judged whether the number of initial samples corresponding to the final category in the sample library meets the predetermined requirement. If not, the feature sample is added to the sample library and the category is marked. If so, it is judged whether the feature sample is more representative. If so, the feature sample is added to the sample library and the category is marked. If not, it directly goes to the step of judging whether the current time point is the last time point. The third judgment module is used to judge whether the current time point is the last time point. If so, return to the current sample library; if not, select the incremental sample corresponding to the next time point as the feature sample and go to the first similarity calculation step.
9. The incremental automatic detection and labeling system for working condition categories according to claim 8, characterized in that: The dimensionality reduction module includes an encoding module and a decoding module; The encoding module is used to map the initial data set into features Z1 through an encoding network; The decoding module is used to map the feature Z1 to the initial data set through a decoding network to obtain reconstructed data.
10. The incremental automatic detection and labeling system for working condition categories according to claim 8, characterized in that: Also includes a third calculation module and a comparison module; The third calculation module is used to calculate the variance after replacing any initial sample corresponding to the final category in the sample library with the feature sample, which is recorded as the first variance; and is also used to calculate the variance of the initial sample corresponding to the final category in the sample library, which is recorded as the second variance; The comparison module is used to compare the first variance and the second variance. When the first variance is greater than the second variance, it indicates that the feature sample is more representative.
Citation Information
Patent Citations
Incremental learning method and system based on small number of labeled samples
CN112132179A
Part surface defect increment detection method based on double-branch matching network
CN112381788A