An abnormal parameter adjustment method, device, equipment and storage medium
By using a target anomaly detection model to detect steel rolling parameters and generating a metric table using cosine similarity and Euclidean distance to replace anomalous parameters, the problem of low steel rolling pass rate and high adjustment cost was solved, achieving automated adjustment, improving the pass rate and reducing resource waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANXIN TUORI INFORMATION TECH CO LTD
- Filing Date
- 2022-03-17
- Publication Date
- 2026-06-05
AI Technical Summary
The complex rolling process parameters of structural steel result in a low pass rate, and the existing technology has high costs for manual adjustment.
The rolling parameters are detected by a pre-trained target anomaly detection model. Cosine similarity and Euclidean distance are calculated to generate a metric table. The anomaly parameters are replaced with the sorted normal parameters.
This reduced the number of times parameters needed to be manually adjusted, improved the pass rate of rolled steel sections, and reduced resource waste.
Smart Images

Figure CN114610703B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of steel section rolling, and particularly to a method, apparatus, equipment and storage medium for adjusting abnormal parameters. Background Technology
[0002] Currently, due to the large number and complex combination of process parameters in the rolling of structural steel, the yield rate of structural steel rolling is low, and the adjustment cost of manually adjusting process parameters to improve the yield rate of structural steel rolling is high.
[0003] Therefore, improving the pass rate of steel section rolling is a problem that needs to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for adjusting abnormal parameters, which can reduce the number of times parameters need to be manually adjusted, improve the pass rate of rolled steel sections, and thus reduce resource waste. The specific solution is as follows:
[0005] Firstly, this application discloses a method for adjusting abnormal parameters, including:
[0006] The rolling parameters to be detected are input into a pre-trained target anomaly detection model for detection, so as to obtain the detection results output by the target anomaly detection model corresponding to the rolling parameters to be detected;
[0007] If the detection result indicates that the rolling parameter to be detected is an abnormal parameter, then the cosine similarity and Euclidean distance between the rolling parameter to be detected and the normal parameters in the preset normal label set are calculated to obtain the first metric table;
[0008] The first metric table is indexed and associated with the normal parameters in the preset normal label set to generate the second metric table;
[0009] The second metric table is sorted according to a preset sorting method, and the abnormal parameter is replaced by the normal parameter corresponding to the first sort in the sorted second metric table.
[0010] Optionally, before inputting the rolling parameters to be detected into the pre-trained target anomaly detection model for detection, the method further includes:
[0011] The rolling parameters and corresponding specification values are collected to obtain the original dataset, and it is determined whether the specification values in the original dataset meet the first preset condition. If not, the samples corresponding to the specification values are removed from the original dataset to obtain the first dataset.
[0012] Determine whether the data in the first dataset meets the second preset condition. If yes, label the data as normal; otherwise, label the data as abnormal, so as to obtain the labeled first dataset.
[0013] The first labeled dataset is processed using a pre-defined unsupervised learning algorithm to obtain a second dataset, and the corresponding training set and test set are determined based on the second dataset.
[0014] The initial model, constructed based on a preset supervised learning algorithm, is trained multiple times using the training set, and the anomaly detection model obtained after each training is tested and evaluated using the test set to establish a corresponding evaluation index set.
[0015] The anomaly detection model corresponding to the evaluation index with the smallest value in the set of evaluation indicators is determined as the target anomaly detection model.
[0016] Optionally, after determining the anomaly detection model corresponding to the evaluation index with the smallest value in the set of evaluation indicators as the target anomaly detection model, the method further includes:
[0017] The target anomaly detection model is optimized based on a preset hyperparameter optimization algorithm to determine the optimized target anomaly detection model.
[0018] Optionally, determining whether the specification value in the original dataset meets a first preset condition, and if not, removing the sample corresponding to the specification value from the original dataset to obtain the first dataset, includes:
[0019] Determine whether the specification value is greater than a first preset threshold; if so, the specification value is identified as an outlier, and the sample corresponding to the specification value is removed from the original dataset to obtain a first dataset; wherein, the first preset threshold is a threshold determined based on the standard deviation corresponding to the specification value.
[0020] Optionally, after processing the labeled first dataset using a preset unsupervised learning algorithm to obtain the second dataset, the method further includes:
[0021] The data corresponding to the normal labels are filtered out from the second dataset to obtain the preset normal label set.
[0022] Optionally, the step of processing the labeled first dataset using a preset unsupervised learning algorithm to obtain a second dataset includes:
[0023] Select target data from the first tagged dataset and calculate the Euclidean distance and cosine similarity between the target rolling vector of the target data and the rolling vectors corresponding to the remaining data in the first tagged dataset to generate a third metric table;
[0024] The third metric table is indexed and associated with the data in the first tagged dataset to generate a fourth metric table, and the fourth metric table is sorted according to the preset sorting method to obtain the sorted fourth metric table.
[0025] The sorted fourth metric table is filtered according to the preset filtering principle to obtain the filtered fourth metric table, and the normal proportion value corresponding to the normal label data and the abnormal proportion value corresponding to the abnormal label data in the filtered fourth metric table are calculated.
[0026] The normal ratio value and the abnormal ratio value are compared to obtain the corresponding comparison result. Based on the comparison result, the corresponding target label is determined, and it is determined whether the label corresponding to the target data is consistent with the target label.
[0027] If so, calculate the absolute difference between the normal ratio value and the abnormal ratio value, and determine whether the absolute difference is not less than the second preset threshold. If so, add the target data to the dataset to obtain the second dataset.
[0028] Optionally, determining the corresponding target label based on the comparison result includes:
[0029] When the comparison result indicates that the normal ratio value is greater than the abnormal ratio value, the normal label corresponding to the normal ratio value is determined as the target label;
[0030] When the comparison result indicates that the normal ratio value is not greater than the abnormal ratio value, the abnormal label corresponding to the abnormal ratio value is determined as the target label.
[0031] Secondly, this application discloses an abnormal parameter adjustment device, comprising:
[0032] The number detection module is used to input the rolling parameters to be detected into a pre-trained anomaly detection model for detection, so as to obtain the detection result corresponding to the rolling parameters to be detected output by the target anomaly detection model;
[0033] The first metric table generation module is used to calculate the cosine similarity and Euclidean distance between the rolling parameter to be detected and the normal parameters in the preset normal label set if the detection result indicates that the rolling parameter to be detected is an abnormal parameter, so as to obtain the first metric table.
[0034] The second metric generation module is used to index and associate the first metric with the normal parameters in the preset normal label set to generate the second metric.
[0035] The parameter replacement module is used to sort the second metric table according to a preset sorting method, and replace the abnormal parameter with the normal parameter corresponding to the first sort in the sorted second metric table.
[0036] Thirdly, this application discloses an electronic device, including:
[0037] Memory, used to store computer programs;
[0038] A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed abnormal parameter adjustment method.
[0039] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed abnormal parameter adjustment method.
[0040] As can be seen, this application provides a method for adjusting abnormal parameters, including: inputting the rolling parameter to be detected into a pre-trained target anomaly detection model for detection, to obtain the detection result output by the target anomaly detection model corresponding to the rolling parameter to be detected; if the detection result indicates that the rolling parameter to be detected is an abnormal parameter, then calculating the cosine similarity and Euclidean distance between the rolling parameter to be detected and normal parameters in a preset normal label set to obtain a first metric table; indexing and associating the first metric table with the normal parameters in the preset normal label set to generate a second metric table; sorting the second metric table according to a preset sorting method, and replacing the abnormal parameter with the normal parameter corresponding to the first sorted parameter in the sorted second metric table. Therefore, this application detects abnormal rolling parameters to be detected through a pre-trained target anomaly detection model, determines normal parameters using the constructed sorted second metric table, and then replaces the abnormal parameter with the normal parameter, thereby reducing the number of manual parameter adjustments, improving the pass rate of steel rolling, and reducing resource waste. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0042] Figure 1This is a flowchart of an abnormal parameter adjustment method disclosed in this application;
[0043] Figure 2 A flowchart illustrating a specific target anomaly detection model creation method disclosed in this application;
[0044] Figure 3 This is a schematic diagram illustrating the relationship between the number of training iterations and the evaluation metrics of a model disclosed in this application.
[0045] Figure 4 This is a schematic diagram of a model training process disclosed in this application;
[0046] Figure 5 This is a schematic diagram illustrating the trends of various indicators of a self-learning anomaly detection model disclosed in this application.
[0047] Figure 6 This is a schematic diagram of an abnormal parameter adjustment device disclosed in this application;
[0048] Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] Currently, the rolling process for structural steel involves numerous and complex parameters, resulting in a low yield rate. Furthermore, existing technologies incurred high costs in adjusting these parameters to improve the yield rate. Therefore, this application provides a novel method for adjusting abnormal parameters. This method reduces the frequency of manual parameter adjustments, increases the yield rate, reduces resource waste, and enhances the intelligent application level of key positions, providing a direction for enterprises to reduce costs, increase efficiency, and achieve sustainable development.
[0051] This invention discloses a method for adjusting abnormal parameters, see [link to relevant documentation]. Figure 1 As shown, the method includes:
[0052] Step S11: Input the rolling parameters to be detected into the pre-trained target anomaly detection model for detection, so as to obtain the detection result output by the target anomaly detection model corresponding to the rolling parameters to be detected.
[0053] In this embodiment, the rolling parameters to be detected are the steel section rolling process parameters. These parameters are input into a pre-trained target anomaly detection model for detection. Essentially, inputting the rolling parameters to be detected into the target anomaly detection model means inputting the rolling parameter vector corresponding to the steel section rolling process parameters into the target anomaly detection model. The target anomaly detection model will then output the corresponding detection result, thereby determining whether the rolling parameter vector is an anomalous parameter vector.
[0054] It should be noted that before inputting the rolling parameters to be detected into the pre-trained target anomaly detection model for detection, an anomaly detection model needs to be established based on the rolling parameters involved in the steel production process and the specification parameters corresponding to the finished steel products, so as to obtain the target anomaly detection model used in this embodiment to detect whether the rolling parameters to be detected are abnormal parameters.
[0055] Step S12: If the detection result indicates that the rolling parameter to be detected is an abnormal parameter, then calculate the cosine similarity and Euclidean distance between the rolling parameter to be detected and the normal parameters in the preset normal label set to obtain the first metric table.
[0056] It should be noted that the aforementioned preset normal label set is the normal label set separated from the second dataset determined in the target anomaly detection model process, and the aforementioned first metric represents the similarity between the detected rolling parameter that is detected as an anomaly and all normal parameters in the preset normal label set.
[0057] Step S13: Index and associate the first metric table with the normal parameters in the preset normal label set to generate a second metric table.
[0058] It is understood that the first metric table is merged with the preset normal label set, and each normal parameter in the preset normal label is associated with the cosine similarity and Euclidean distance in the first metric table in step S12. That is, the second metric table contains the normal parameters used to replace the abnormal parameters and the corresponding cosine similarity and Euclidean distance.
[0059] Step S14: Sort the second metric table according to a preset sorting method, and replace the abnormal parameter with the normal parameter corresponding to the first sort in the sorted second metric table.
[0060] It should be noted that the aforementioned preset sorting method is based on the order of cosine similarity from high to low and Euclidean distance from low to high. Based on the cosine similarity and Euclidean distance, more suitable normal parameters for replacing anomalous parameters can be accurately determined. Sorting the second metric table is to efficiently determine the normal parameters; that is, the normal parameter in the first data entry corresponding to the first sorted item in the second metric table can be used to replace the anomalous parameter. This saves time spent searching for normal parameters that can replace anomalous parameters, thereby improving the efficiency of anomalous parameter adjustment.
[0061] As can be seen, the embodiments of this application detect abnormal rolling parameters by using a pre-trained target anomaly detection model, determine normal parameters by using a constructed sorted second metric table, and then replace the abnormal parameters with the normal parameters to reduce the number of times parameters need to be manually adjusted, improve the pass rate of steel rolling, and thus reduce resource waste.
[0062] Furthermore, embodiments of this application disclose a specific method for creating a target anomaly detection model, such as... Figure 2 As shown, the method includes:
[0063] Step S21: Collect rolling parameters and corresponding specification values to obtain an original dataset, and determine whether the specification values in the original dataset meet the first preset condition. If not, remove the sample corresponding to the specification value from the original dataset to obtain the first dataset.
[0064] In this embodiment, data collection is first required, namely, collecting rolling parameters and corresponding specification values to obtain the original dataset. That is, the rolling parameters of each steel piece and the specification data of the corresponding steel product are extracted, and the original dataset is constructed based on the rolling parameters and specification data. Then, the original dataset is cleaned by removing specification data that does not meet the first preset condition. For example, samples containing missing values and outliers in the original dataset A are removed, thereby obtaining the first dataset B after cleaning the original dataset A. The specific data cleaning method may include: determining whether the specification value is greater than a first preset threshold; if so, the specification value is identified as an outlier, and the sample corresponding to the specification value is removed from the original dataset to obtain the first dataset; wherein, the first preset threshold is a threshold determined based on the standard deviation corresponding to the specification value. For example, the Gaussian density function of the finished steel profiles for each specification is estimated to determine the standard deviation corresponding to the specification value. Specification values in the original dataset that are greater than 3 times the standard deviation are identified as outliers, and the samples corresponding to the outliers are removed from the original dataset to obtain the first dataset.
[0065] Step S22: Determine whether the data in the first dataset meets the second preset condition. If yes, label the data as normal; otherwise, label the data as abnormal to obtain the labeled first dataset.
[0066] In this embodiment, the main focus is on labeling the data in the first dataset. Specifically, corresponding labels are assigned to the data in the first dataset. When the data in the first dataset meets a second preset condition, it is labeled as "normal." When the data does not meet the second preset condition, it is labeled as "abnormal." After all the data in the first dataset is labeled, the first dataset becomes the labeled first dataset. For example, it determines whether the specification values of the first dataset B are within the standard error range. Data with specification values within the standard error range are labeled as "normal," and data with specification values outside the standard error range are labeled as "abnormal."
[0067] Step S23: Process the labeled first dataset using a preset unsupervised learning algorithm to obtain a second dataset, and determine the corresponding training set and test set based on the second dataset.
[0068] In this embodiment, after obtaining the first labeled dataset, a preset unsupervised learning algorithm is used to process the first labeled dataset to obtain a second dataset that can be used to train and test the anomaly detection model.
[0069] In this embodiment, the process of using a preset unsupervised learning algorithm to process the labeled first dataset to obtain a second dataset specifically includes: selecting target data from the labeled first dataset and calculating the Euclidean distance and cosine similarity between the target rolling vector of the target data and the rolling vectors corresponding to the remaining data in the labeled first dataset to generate a third metric table; indexing and associating the third metric table with the data in the labeled first dataset to generate a fourth metric table, and sorting the fourth metric table according to the preset sorting method to obtain a sorted fourth metric table; filtering the sorted fourth metric table according to a preset filtering principle to obtain a filtered fourth metric table, and calculating the filtered fourth metric table... The fourth metric table compares the normal percentage value corresponding to the normal label data with the abnormal percentage value corresponding to the abnormal label data. The normal percentage value and the abnormal percentage value are compared to obtain a comparison result. Based on the comparison result, a corresponding target label is determined, and it is determined whether the label corresponding to the target data is consistent with the target label. If so, the absolute difference between the normal percentage value and the abnormal percentage value is calculated, and it is determined whether the absolute difference is not less than a second preset threshold. If so, the target data is added to the dataset to obtain a second dataset. It is understood that the above processing operation is performed on the first dataset after labeling until all data in the first dataset after labeling has been traversed, thereby obtaining the second dataset. Specifically, determining the corresponding target label based on the comparison result further includes: when the comparison result indicates that the normal percentage value is greater than the abnormal percentage value, the normal label corresponding to the normal percentage value is determined as the target label.
[0070] When the comparison result indicates that the normal proportion value is not greater than the abnormal proportion value, the abnormal label corresponding to the abnormal proportion value is determined as the target label. Furthermore, after obtaining the second dataset, it is necessary to filter out data corresponding to the normal label from the second dataset to obtain the preset normal label set. It is understood that after randomly shuffling the second dataset, corresponding training and testing sets are divided to establish a target anomaly detection model. The preset normal label set separated from the second dataset is used to adjust the rolling parameters of the anomaly. For example, a target data X is sequentially selected from the labeled first dataset B, and the cosine similarity CS and Euclidean distance ED between the rolling vector of each target data X and the remaining rolling vectors in the labeled first dataset B are calculated sequentially, generating a CS and ED metric table T0 (the third metric table). Table T0 is associated with the label data in B by index to generate table T1 (the fourth metric table). Table T1 is sorted according to the cosine similarity CS from high to low and the Euclidean distance ED from low to high to obtain the sorted list. The sorted table T1 (the fourth metric table) is then filtered using the cosine similarity (CS) threshold α and the Euclidean distance (ED) threshold β. Specifically, data values greater than α and less than β are retained in the sorted fourth metric table to generate table T2 (the filtered fourth metric table). Multiple sorted T1 tables are obtained by sampling multiple target data X. Then, the CS and ED values of the last data point in each sorted T1 table that is closest to the target data X are determined. Finally, the mean of the CS values is calculated. The mean of the ED values is used to determine the threshold α and the threshold β. The proportion of normal labels P1 (normal percentage) and the proportion of abnormal labels P2 (abnormal percentage) in Table T2 are calculated. The larger label L (target label) is determined by comparing the values of P1 and P2. The label Y of the target data X selected from the first labeled dataset B is then queried. In other words, it is determined whether the label of the target data X is a normal label or an abnormal label. Then, it is determined whether the label Y is the same as the label L. If they are different, the target data X is not added to the stable dataset C (second dataset). If the datasets are the same, the absolute difference ΔP between the percentage of normal labels P1 and the percentage of abnormal labels P2 is calculated, i.e., ΔP = |P1 - P2|. When the absolute difference ΔP is greater than the threshold λ, the target data X is added to the stable dataset C; otherwise, it is not added. The value of the threshold λ can be determined by sampling several sets of the absolute difference ΔP and then calculating their mean. After the target data in the first dataset B after labeling is processed, the stable dataset C is obtained, and the normal label dataset D (preset normal label set) is separated from C.
[0071] Step S24: Use the training set to train the initial model built based on the preset supervised learning algorithm multiple times, and use the test set to test and evaluate the anomaly detection model obtained after each training to establish a corresponding evaluation index set.
[0072] It should be noted that the pre-defined supervised learning algorithm may include, but is not limited to, random forest algorithm and decision tree algorithm.
[0073] In this embodiment, the anomaly detection model is trained multiple times using the aforementioned training set, and the anomaly detection model after each training iteration is tested and evaluated using the aforementioned test set. The anomaly detection model after each training iteration and its corresponding evaluation metrics are then stored, and a corresponding evaluation metric set is established based on these evaluation metrics. For example... Figure 3 As shown, the evaluation metric of the anomaly detection model exhibits a trend of first decreasing and then increasing with the increase in training iterations. That is, as the number of training iterations increases, the model performs better, and the evaluation metric decreases. If an increase in the evaluation metric is detected during multiple training iterations, training of the model can be stopped. The closer the evaluation metric is to 0, the better the anomaly detection model performs. The calculation formula for the evaluation metric is as follows:
[0074] γ = 2 * (false positive rate * false negative rate) / (false positive rate + false negative rate);
[0075] Wherein, γ represents the evaluation index, the false negative rate = the number of samples that are actually abnormal out of the samples predicted as normal / the actual number of normal samples; the false positive rate = the number of samples that are actually normal out of the samples predicted as abnormal / the actual number of abnormal samples.
[0076] Step S25: Determine the anomaly detection model corresponding to the evaluation index with the smallest value in the set of evaluation indicators as the target anomaly detection model.
[0077] In this embodiment, the anomaly detection model corresponding to the evaluation index with the smallest value in the above evaluation index set is determined as the optimal model. That is, the optimal model is used as the target anomaly detection model for detecting abnormal rolling parameters.
[0078] In this embodiment, after determining the anomaly detection model corresponding to the evaluation index with the smallest value in the evaluation index set as the target anomaly detection model, the method may further include: optimizing the target anomaly detection model based on a preset hyperparameter optimization algorithm to determine the optimized target anomaly detection model. It is understood that, as... Figure 4As shown, firstly, a set of hyperparameters is preset as the initial hyperparameter set. The target anomaly detection model is then trained multiple times using this initial hyperparameter set to obtain the trained target anomaly detection model corresponding to the minimum evaluation metric. Then, based on the minimum evaluation metric from the previous model training result, it is determined whether a new set of hyperparameters needs to be determined. The target anomaly detection model is then trained again using the new hyperparameter set to obtain another trained target anomaly detection model corresponding to the minimum evaluation metric. This process of using each determined new hyperparameter set for model training is repeated, resulting in multiple trained target anomaly detection models corresponding to multiple different hyperparameter sets. The evaluation metric with the smallest value among the multiple minimum evaluation metrics corresponding to the multiple trained anomaly detection models is determined as the target evaluation metric, and the trained target anomaly detection model corresponding to the target evaluation metric is determined as the optimized target detection model. In other words, the target anomaly detection model is trained using multiple sets of hyperparameters. Each set of hyperparameters needs to be determined based on the results of the previous model training. When the previous training result already meets the preset conditions, it is no longer necessary to determine the next set of hyperparameters, thereby saving the final training time and improving the model training efficiency. The optimal model obtained after training the target anomaly detection model multiple times using each set of hyperparameters is the model with the smallest evaluation metric. Then, the optimal model corresponding to each set of hyperparameters and the minimum evaluation metric corresponding to the optimal model are stored. Finally, the model with the smallest evaluation metric is selected from the stored optimal models as the final model for training, i.e., the optimized target anomaly detection model. It should be noted that the above-mentioned preset hyperparameter optimization algorithm may include, but is not limited to, the Bayesian hyperparameter optimization algorithm.
[0079] It should be noted that during the detection process, the aforementioned target anomaly detection model can also be updated based on actual application conditions through self-learning. The self-learning process involves periodically inputting new rolling parameters and corresponding steel product specifications into the model, merging these new parameters and specifications with the original dataset A, and then repeating the data cleaning and processing steps to generate a new second dataset. A new set of normal labels is then separated from this second dataset, and new training and testing sets are used to train and optimize the target anomaly detection model, resulting in a new... The anomaly detection model generates false positive and false negative rates when testing on the new test set. These rates are then combined with time-series trend data to obtain false positive and false negative rate curves. The slope k of the line connecting the latest node and the nth node is calculated using these curves. The model then determines whether the slope k is within a threshold range θ. If the slope k is not within the threshold range θ, the model is not updated and manual intervention is required. If the slope k is within the range, the target anomaly detection model is automatically updated. In other words, the new target detection model is used for anomaly detection, where the threshold range θ ∈ [-1, 0], and the value of the number of nodes n can be determined based on the curve fluctuation period. Figure 5 The trends of false negative and false positive rates in the anomaly detection model during self-learning are shown. In other words, when the false positive rate decreases during the self-learning process, it indicates that the reliability of the anomaly detection model is gradually increasing.
[0080] Accordingly, this application also discloses an abnormal parameter adjustment device, see [link to relevant documentation]. Figure 6 As shown, the device includes:
[0081] The data detection module 11 is used to input the rolling parameters to be detected into a pre-trained anomaly detection model for detection, so as to obtain the detection result corresponding to the rolling parameters to be detected output by the target anomaly detection model;
[0082] The first metric table generation module 12 is used to calculate the cosine similarity and Euclidean distance between the rolling parameter to be detected and the normal parameters in the preset normal label set if the detection result indicates that the rolling parameter to be detected is an abnormal parameter, so as to obtain the first metric table.
[0083] The second metric table generation module 13 is used to index and associate the first metric table with the normal parameters in the preset normal label set to generate the second metric table.
[0084] The parameter replacement module 14 is used to sort the second metric table according to a preset sorting method, and replace the abnormal parameter with the normal parameter corresponding to the first sort in the sorted second metric table.
[0085] As can be seen from the above, this embodiment detects abnormal rolling parameters by using a pre-trained target anomaly detection model, determines normal parameters by using a constructed sorted second metric table, and then replaces the abnormal parameters with the normal parameters to reduce the number of times parameters need to be manually adjusted, improve the pass rate of steel rolling, and thus reduce resource waste.
[0086] In some specific embodiments, the abnormal parameter adjustment device may further include:
[0087] The parameter collection module is used to collect rolling parameters and corresponding specification values to obtain the raw dataset.
[0088] The first condition judgment module is used to determine whether the specification value in the original dataset meets the first preset condition. If it does not meet the condition, the sample corresponding to the specification value is removed from the original dataset to obtain the first dataset.
[0089] The second condition judgment module is used to determine whether the data in the first dataset meets the second preset condition. If yes, the data is labeled as normal; otherwise, the data is labeled as abnormal, so as to obtain the first dataset after labeling.
[0090] The data processing module is used to process the labeled first dataset using a preset unsupervised learning algorithm to obtain a second dataset, and to determine the corresponding training set and test set based on the second dataset.
[0091] The model training module is used to train the initial model constructed based on a preset supervised learning algorithm multiple times using the training set.
[0092] The model evaluation module is used to test and evaluate the anomaly detection model obtained after each training using the test set in order to establish a corresponding set of evaluation indicators.
[0093] In some specific embodiments, after determining the anomaly detection model corresponding to the evaluation index with the smallest value in the set of evaluation indicators as the target anomaly detection model, it may further include:
[0094] The model optimization module is used to optimize the target anomaly detection model based on a preset hyperparameter optimization algorithm to determine the optimized target anomaly detection model.
[0095] In some specific embodiments, the first condition judgment module may specifically include:
[0096] The first judgment unit is used to determine whether the specification value is greater than a first preset threshold.
[0097] A data removal unit is configured to determine the specification value as an outlier when the specification value is greater than the first preset threshold, and remove the sample corresponding to the specification value from the original dataset to obtain a first dataset; wherein the first preset threshold is a threshold determined based on the standard deviation corresponding to the specification value.
[0098] In some specific embodiments, after processing the labeled first dataset using a preset unsupervised learning algorithm to obtain the second dataset, the process may further include:
[0099] The data filtering module is used to filter out the data corresponding to the normal labels from the second dataset to obtain the preset normal label set.
[0100] In some specific embodiments, the data processing module may specifically include:
[0101] The first table generation unit is used to select target data from the first tagged dataset and calculate the Euclidean distance and cosine similarity between the target rolling vector of the target data and the rolling vectors corresponding to the other data in the first tagged dataset to generate a third metric table.
[0102] The second table generation unit is used to index and associate the third metric table with the data in the labeled first dataset to generate a fourth metric table, and sort the fourth metric table according to the preset sorting method to obtain the sorted fourth metric table.
[0103] The filtering unit is used to filter the sorted fourth metric table according to a preset filtering principle to obtain the filtered fourth metric table, and to calculate the normal percentage value corresponding to the normal label data and the abnormal percentage value corresponding to the abnormal label data in the filtered fourth metric table.
[0104] The label determination unit is used to compare the normal ratio value and the abnormal ratio value to obtain a corresponding comparison result, determine the corresponding target label based on the comparison result, and determine whether the label corresponding to the target data is consistent with the target label.
[0105] The dataset determination unit is used to calculate the absolute difference between the normal ratio value and the abnormal ratio value when the label corresponding to the target data is consistent with the target label, and to determine whether the absolute difference is not less than a second preset threshold. If so, the target data is added to the dataset to obtain a second dataset.
[0106] In some specific embodiments, the label determining unit may specifically include:
[0107] The first label determination subunit is used to determine the normal label corresponding to the normal ratio value as the target label when the comparison result indicates that the normal ratio value is greater than the abnormal ratio value.
[0108] The second label determination subunit is used to determine the abnormal label corresponding to the abnormal ratio value as the target label when the comparison result indicates that the normal ratio value is not greater than the abnormal ratio value.
[0109] Furthermore, embodiments of this application also provide an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0110] Figure 7 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the abnormal parameter adjustment method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0111] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0112] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0113] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the abnormal parameter adjustment method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0114] Furthermore, this application also discloses a storage medium storing a computer program, which, when loaded and executed by a processor, implements the abnormal parameter adjustment method steps disclosed in any of the foregoing embodiments.
[0115] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0116] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0117] The above provides a detailed description of the abnormal parameter adjustment method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for adjusting abnormal parameters, characterized in that, include: The rolling parameters and corresponding specification values are collected to obtain the original dataset, and it is determined whether the specification values in the original dataset meet the first preset condition. If not, the sample corresponding to the specification value is removed from the original dataset to obtain the first dataset. Determine whether the data in the first dataset meets the second preset condition. If yes, label the data with a normal label. If no, label the data with an abnormal label to obtain the first dataset after labeling. Select target data from the first tagged dataset and calculate the Euclidean distance and cosine similarity between the target rolling vector of the target data and the rolling vectors corresponding to the remaining data in the first tagged dataset to generate a third metric table; The third metric table is indexed and associated with the data in the first tagged dataset to generate a fourth metric table, and the fourth metric table is sorted according to a preset sorting method to obtain a sorted fourth metric table. The sorted fourth metric table is filtered according to the preset filtering principle to obtain the filtered fourth metric table, and the normal ratio value corresponding to the normal label data and the abnormal ratio value corresponding to the abnormal label data in the filtered fourth metric table are calculated. The preset filtering principle is that the cosine similarity is greater than the similarity threshold and the Euclidean distance is less than the distance threshold; the similarity threshold and the distance threshold are respectively the mean cosine similarity and the mean Euclidean distance of all the last group of data extracted from the fourth metric table after sorting all the target data; Based on the comparison result between the normal ratio value and the abnormal ratio value, the target label is set as a normal label or an abnormal label, and it is determined whether the label corresponding to the target data is consistent with the target label. If so, calculate the absolute difference between the normal ratio value and the abnormal ratio value, and determine whether the absolute difference is not less than the second preset threshold. If so, add the target data to the dataset to obtain the second dataset. The second preset threshold is the average of several absolute differences extracted from all absolute differences; A target anomaly detection model is obtained by using a pre-defined supervised learning algorithm and training it based on the second dataset; The rolling parameters to be detected are input into a pre-trained target anomaly detection model for detection, so as to obtain the detection results output by the target anomaly detection model corresponding to the rolling parameters to be detected; If the detection result indicates that the rolling parameter to be detected is an abnormal parameter, then the cosine similarity and Euclidean distance between the rolling parameter to be detected and the normal parameters in the preset normal label set are calculated to obtain the first metric table; The first metric table is indexed and associated with the normal parameters in the preset normal label set to generate the second metric table; The second metric table is sorted according to a preset sorting method, and the abnormal parameter is replaced by the normal parameter corresponding to the first sort in the sorted second metric table.
2. The abnormal parameter adjustment method according to claim 1, characterized in that, Before inputting the rolling parameters to be detected into the pre-trained target anomaly detection model for detection, the method further includes: The rolling parameters and corresponding specification values are collected to obtain the original dataset, and it is determined whether the specification values in the original dataset meet the first preset condition. If not, the samples corresponding to the specification values are removed from the original dataset to obtain the first dataset. Determine whether the data in the first dataset meets the second preset condition. If yes, label the data as normal; otherwise, label the data as abnormal, so as to obtain the labeled first dataset. The first labeled dataset is processed using a pre-defined unsupervised learning algorithm to obtain a second dataset, and the corresponding training set and test set are determined based on the second dataset. The initial model, constructed based on a preset supervised learning algorithm, is trained multiple times using the training set, and the anomaly detection model obtained after each training is tested and evaluated using the test set to establish a corresponding evaluation index set. The anomaly detection model corresponding to the evaluation index with the smallest value in the set of evaluation indicators is determined as the target anomaly detection model.
3. The abnormal parameter adjustment method according to claim 2, characterized in that, After determining the anomaly detection model corresponding to the evaluation index with the smallest value in the evaluation index set as the target anomaly detection model, the method further includes: The target anomaly detection model is optimized based on a preset hyperparameter optimization algorithm to determine the optimized target anomaly detection model.
4. The abnormal parameter adjustment method according to claim 2, characterized in that, The step of determining whether the specification value in the original dataset meets a first preset condition, and if not, removing the sample corresponding to the specification value from the original dataset to obtain the first dataset, includes: Determine whether the specification value is greater than a first preset threshold; if so, the specification value is identified as an outlier, and the sample corresponding to the specification value is removed from the original dataset to obtain a first dataset; wherein, the first preset threshold is a threshold determined based on the standard deviation corresponding to the specification value.
5. The abnormal parameter adjustment method according to claim 2, characterized in that, After processing the labeled first dataset using a preset unsupervised learning algorithm to obtain the second dataset, the method further includes: The data corresponding to the normal labels are filtered out from the second dataset to obtain the preset normal label set.
6. The abnormal parameter adjustment method according to claim 1, characterized in that, The step of setting the target label as a normal label or an abnormal label based on the comparison result of the normal ratio value and the abnormal ratio value includes: When the comparison result indicates that the normal ratio value is greater than the abnormal ratio value, the normal label corresponding to the normal ratio value is determined as the target label; When the comparison result indicates that the normal ratio value is not greater than the abnormal ratio value, the abnormal label corresponding to the abnormal ratio value is determined as the target label.
7. An abnormal parameter adjustment device, characterized in that, The method for adjusting abnormal parameters according to any one of claims 1 to 6 includes: The number detection module is used to input the rolling parameters to be detected into a pre-trained target anomaly detection model for detection, so as to obtain the detection result output by the target anomaly detection model corresponding to the rolling parameters to be detected; The first metric table generation module is used to calculate the cosine similarity and Euclidean distance between the rolling parameter to be detected and the normal parameters in the preset normal label set if the detection result indicates that the rolling parameter to be detected is an abnormal parameter, so as to obtain the first metric table. The second metric generation module is used to index and associate the first metric with the normal parameters in the preset normal label set to generate the second metric. The parameter replacement module is used to sort the second metric table according to a preset sorting method, and replace the abnormal parameter with the normal parameter corresponding to the first sort in the sorted second metric table.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the abnormal parameter adjustment method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the abnormal parameter adjustment method as described in any one of claims 1 to 6.