Detection model training method and apparatus, and related device

By acquiring a training dataset to generate a feature dataset and selecting a target detection model from multiple detection models for training, the problem of poor tool anomaly detection in existing technologies is solved, and more accurate tool status monitoring is achieved.

CN115935166BActive Publication Date: 2026-05-01BEIJING FANUC MECHATRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING FANUC MECHATRONICS CO LTD
Filing Date
2022-12-12
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, hardware-based detection of tool anomalies suffers from poor detection results.

Method used

By acquiring a training dataset, a feature dataset is generated, and a target detection model is selected from multiple detection models based on the feature data for training, thus generating a tool detection model. The target detection model is then trained using the feature dataset to improve the detection performance.

Benefits of technology

It improves the detection of tool abnormalities and enables more accurate tool status monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115935166B_ABST
    Figure CN115935166B_ABST
Patent Text Reader

Abstract

The application provides a detection model training method and device and related equipment, the method comprising: obtaining a training data set, the training data set comprising sample data; generating a feature data set based on the sample data, the feature data set comprising feature data; determining a corresponding target detection model for each feature data in at least two detection models, the detection conditions of different detection models being different in the at least two detection models, wherein the detection conditions comprise at least one of a tool type and a tool attribute; and training the target detection model based on the feature data set to obtain a tool detection model. The application extracts features from sample data of a large number of tools after classifying the sample data by labels, matches the extracted features with at least two detection models to determine a target detection model, and then trains the determined target detection model, thereby improving the detection effect of tools.
Need to check novelty before this filing date? Find Prior Art

Description

Detection model training methods, devices and related equipment Technical Field

[0001] This invention relates to the field of computers, and in particular to a method, apparatus and related equipment for training a detection model. Background Technology

[0002] With the industrial development of the machining industry, the impact of tool malfunctions and related machining process anomalies on machining is becoming increasingly significant. Therefore, detecting tool malfunctions is crucial. Currently, tool detection is generally achieved by installing sensors and other devices directly around the tool using hardware. However, this method is limited by equipment design and cannot accurately reflect the current state of the tool during machining, resulting in poor detection performance. Summary of the Invention

[0003] This invention provides a detection model training method, apparatus, and related equipment, which solves the problem of poor detection performance in the prior art.

[0004] In a first aspect, embodiments of the present invention provide a detection model training method, the method comprising:

[0005] Obtain a training dataset, which includes sample data, namely, data related to tool operation, including normal sample data and abnormal sample data;

[0006] A feature dataset is generated based on the sample data. The feature dataset includes feature data, which is used to reflect the attribute characteristics of the tool operation corresponding to each sample data.

[0007] Based on each of the aforementioned feature data, a corresponding target detection model is determined in at least two detection models. In the at least two detection models, the detection conditions corresponding to different detection models are different, wherein the detection conditions include at least one of tool type and tool attribute.

[0008] The target detection model is trained based on the feature dataset to obtain a tool detection model.

[0009] Optionally, obtaining the training dataset includes:

[0010] Collect tool sample data during tool operation;

[0011] Calculate a first curve of the tool sample data, which is used to indicate the main motor load value when the tool is running under no-load conditions;

[0012] The second curve, the third curve, and the fourth curve are determined based on the first curve. The second curve is the reference curve of the tool, the third curve is the boundary curve of the tool, and the fourth curve is the minimum value curve in the tool sample data.

[0013] Normal or abnormal sample data are generated based on the first curve, the second curve, the third curve, and the fourth curve;

[0014] A training dataset is generated based on the normal sample data and / or the abnormal sample data.

[0015] Optionally, determining the second, third, and fourth curves based on the first curve includes:

[0016] The first curve is divided into M samples within a processing cycle. A weighted calculation is performed based on the M samples and N sampling points to obtain the second curve. The first curve is composed of the M samples.

[0017] The mean difference between the M samples and the second curve is calculated based on each sampling point. The mean and standard deviation are calculated based on the mean difference, and a third curve is generated based on the mean and standard deviation.

[0018] The minimum sample is determined from the M samples, and a fourth curve is generated based on the minimum sample.

[0019] Optionally, a feature dataset is generated based on the sample data, including:

[0020] Based on the first curve and the second curve, a first distance coefficient and a second distance coefficient are obtained. The first distance coefficient is the distance coefficient between the first curve and the second curve, and the second distance coefficient is the limit distance coefficient between the first curve and the second curve.

[0021] Feature data is generated based on the first distance coefficient, the second distance coefficient, and the type of the cutting tool;

[0022] A feature dataset is generated based on the feature data.

[0023] Optionally, the step of calculating the first distance coefficient and the second distance coefficient based on the first curve and the second curve includes:

[0024] Calculate the mean, maximum, minimum, and median of each sample in the training dataset, and generate data distribution features based on the mean, maximum, minimum, and median;

[0025] The correlation coefficient for each sample is calculated based on the first curve and the second curve. The correlation coefficient includes a negative morphological coefficient and a positive morphological coefficient, which are used to indicate the correlation between the first curve and the second curve for each sample.

[0026] The first distance coefficient and the second distance coefficient are calculated using the mean method.

[0027] Optionally, generating feature data based on the first distance coefficient, the second distance coefficient, and the type of the tool includes:

[0028] Feature data is generated based on the data distribution characteristics, the negative morphological coefficient, the positive morphological coefficient, the first distance coefficient, and the second distance coefficient.

[0029] Optionally, determining the corresponding target detection model among at least two detection models based on each of the feature data includes:

[0030] When the type of the tool is a tapping tool, the target detection model is determined as the first detection model;

[0031] If the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3, the target detection model is determined as the second detection model;

[0032] If the correlation coefficient is greater than 2, the target detection model is determined as the third detection model;

[0033] If the first ratio is greater than the second ratio, the target detection model is determined as the fourth detection model. The first ratio is the proportion of points on the third curve that are greater than the first curve to the total number of points in the entire processing cycle, and the second ratio is the proportion of points on the third curve that are greater than the fourth curve to the total number of points in the entire processing cycle.

[0034] Optionally, when the target model is the first detection model, training the target detection model based on the feature dataset to obtain the tool detection model includes:

[0035] Obtain the monitoring level coefficient, and calculate the first upper boundary and the first lower boundary of the first monitoring boundary based on the monitoring level coefficient and the first distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0036] The first monitoring level is calculated based on the first upper boundary and the first lower boundary;

[0037] The first detection model is trained based on the first monitoring level and the feature database to obtain the first tool detection model.

[0038] Optionally, when the target model is a second detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0039] Obtain the monitoring level coefficient, and calculate the second upper boundary and the second lower boundary of the second monitoring boundary based on the monitoring level coefficient and the second distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0040] The second monitoring level is calculated based on the second upper boundary and the second lower boundary;

[0041] The second detection model is trained based on the second monitoring level and the feature database to obtain the second tool detection model.

[0042] Optionally, when the target model is a third detection model, training the target detection model based on the training dataset and the feature dataset to obtain a tool detection model includes:

[0043] Calculate the load mean difference for each sampling point based on the M samples and N sampling points;

[0044] The mean and standard deviation of each sampling point are calculated based on the difference in the mean load of each sampling point.

[0045] The third monitoring level is calculated based on the average value and standard deviation.

[0046] The third detection model is trained based on the third monitoring level and the feature database to obtain the third tool detection model.

[0047] Optionally, when the target model is a third detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0048] The mean and standard deviation are calculated based on the positive morphological coefficients of the normal sample data.

[0049] The fourth monitoring level is calculated based on the mean and standard deviation.

[0050] The fourth detection model is trained based on the fourth monitoring level and the feature database to obtain the fourth tool detection model.

[0051] Secondly, embodiments of the present invention also provide a method for detecting tool abnormalities, the method comprising:

[0052] Feature extraction is performed on the tool data to be inspected to obtain target feature data;

[0053] Based on the target feature data, a corresponding target detection model is determined from at least two detection models. The detection conditions for different detection models are different, and the detection conditions include at least one of tool type and tool attribute.

[0054] The tool data to be detected is input into a trained target detection model, and the recognition result is output. The recognition result is used to indicate whether the tool data to be detected is abnormal data.

[0055] Thirdly, embodiments of the present invention also provide a detection model training apparatus, the apparatus comprising:

[0056] The acquisition module is used to acquire a training dataset, which includes sample data, which is relevant data of tool operation, and the sample data includes normal sample data and abnormal sample data.

[0057] A generation module is used to generate a feature dataset based on the sample data. The feature dataset includes feature data, which reflects the attribute characteristics of the tool operation corresponding to each sample data.

[0058] The determination module is used to determine the corresponding target detection model in at least two detection models based on each of the feature data, wherein the detection conditions corresponding to the different detection models are different, and the detection conditions include at least one of tool type and tool attribute;

[0059] The training module is used to train the target detection model based on the feature dataset to obtain the tool detection model.

[0060] Fourthly, embodiments of the present invention also provide an apparatus for detecting tool malfunctions. The apparatus includes:

[0061] The extraction module is used to extract features from the tool data to be inspected, and obtain target feature data.

[0062] The model confirmation module is used to determine the corresponding target detection model among at least two detection models based on the target feature data. Among the at least two detection models, the detection conditions corresponding to different detection models are different, wherein the detection conditions include at least one of tool type and tool attribute.

[0063] The output module is used to input the tool data to be detected into the trained target detection model and output the recognition result, which is used to indicate whether the tool data to be detected is abnormal data.

[0064] Fifthly, embodiments of the present invention also provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0065] Memory, used to store computer programs;

[0066] The processor, when executing a program stored in memory, implements the detection model training method described in any one of the first aspects, or the method for detecting tool anomalies described in the second aspect.

[0067] In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements the detection model training method described in any one of the first aspects, or the method for detecting tool anomalies described in the second aspect.

[0068] This invention provides a method, apparatus, and related equipment for training a detection model. The method includes: acquiring a training dataset, which includes sample data, specifically tool operation data, including normal and abnormal sample data; generating a feature dataset based on the sample data, the feature dataset including feature data reflecting the attribute characteristics of tool operation corresponding to each sample data; determining a corresponding target detection model from at least two detection models based on each feature data, wherein the detection conditions for different detection models are different, and the detection conditions include at least one of tool type and tool attribute; and training the target detection model based on the feature dataset to obtain a tool detection model. This invention improves the tool detection effect by acquiring a large amount of tool sample data, performing label classification on the sample data, extracting features, and then matching the extracted features with at least two detection models to determine the target detection model, thereby training the determined target detection model. Attached Figure Description

[0069] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0070] Figure 1 is a flowchart illustrating a detection model training method provided in an embodiment of the present invention;

[0071] Figure 2 is a flowchart illustrating a method for detecting tool abnormalities provided in an embodiment of the present invention;

[0072] Figure 3 is a schematic diagram of a detection model training device provided in an embodiment of the present invention;

[0073] Figure 4 is a schematic diagram of a device for detecting tool abnormalities provided in an embodiment of the present invention;

[0074] Figure 5 is a schematic diagram of the structure of the electronic device according to an embodiment of the present invention. Detailed Implementation

[0075] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0076] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0077] Furthermore, the terms "first," "second," etc., may be used herein to describe various directions, actions, steps, or elements, but these directions, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step, or element from another direction, action, step, or element. For example, without departing from the scope of this application, a first speed difference may be referred to as a second speed difference, and similarly, a second speed difference may be referred to as a first speed difference. Both the first speed difference and the second speed difference are speed differences, but they are not the same speed difference. The terms "first," "second," etc., should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0078] This application provides a method for training a detection model, the method comprising:

[0079] Step 101: Obtain the training dataset, which includes sample data, which is relevant data of tool operation, and includes normal sample data and abnormal sample data.

[0080] In this embodiment, the training dataset includes multiple sample data, which are obtained by sampling the tool at multiple sampling points during tool operation. Specifically, the sample data includes normal sample data and abnormal sample data. Normal sample data refers to data generated when the tool is operating normally, while abnormal sample data refers to data generated when problems occur during tool operation.

[0081] It should be noted that, in this embodiment, the training dataset can be a sample library, which stores multiple sample data.

[0082] Step 102: Generate a feature dataset based on the sample data. The feature dataset includes feature data, which is used to reflect the attribute characteristics of the tool operation corresponding to each sample data.

[0083] In this embodiment, feature data is obtained by extracting and analyzing the acquired sample data. This feature data reflects the relevant attribute characteristics of the cutting tool. For example, attribute characteristics include, but are not limited to, distance coefficients, correlation coefficients, etc., of the sample data; however, no specific limitations are imposed in this embodiment.

[0084] It should be noted that, in this embodiment, the feature dataset can be a feature database, which stores multiple feature data.

[0085] Step 103: Based on each of the feature data, determine the corresponding target detection model in at least two detection models. In the at least two detection models, the detection conditions corresponding to different detection models are different. The detection conditions include at least one of tool type and tool attribute.

[0086] In this embodiment, the model library includes multiple detection models. Four detection models are used as examples: ECM monitoring model, PCM monitoring model, EIM monitoring model, and CSM monitoring model. The sample data required for training differs for each model. When acquiring sample data, the detection model to which the sample data belongs is determined based on detection conditions, and then the detection model is trained. It should be noted that in this embodiment, the detection conditions can be determined based on the type of tool, tool attributes, etc.

[0087] Step 140: Train the target detection model based on the feature dataset to obtain the tool detection model.

[0088] In this embodiment, multiple detection models are trained separately using feature datasets. When the number of feature datasets is large, multiple detection models can be trained separately. After multiple detection models are trained, when tool data is input, the tool data can be judged to determine whether the data is normal.

[0089] This invention provides a method for training a detection model. The method includes: acquiring a training dataset, which includes sample data, specifically tool operation data, including normal and abnormal sample data; generating a feature dataset based on the sample data, the feature dataset including feature data reflecting the attribute characteristics of tool operation corresponding to each sample data; determining a corresponding target detection model from at least two detection models based on each feature data, wherein different detection models have different detection conditions, and the detection conditions include at least one of tool type and tool attribute; and training the target detection model based on the feature dataset to obtain a tool detection model. This invention improves tool detection performance by acquiring a large amount of tool sample data, performing label classification on the sample data, extracting features, and then matching the extracted features with at least two detection models to determine a target detection model, thereby training the determined target detection model.

[0090] Optionally, obtaining the training dataset includes:

[0091] Collect tool sample data during tool operation;

[0092] Calculate a first curve of the tool sample data, which is used to indicate the main motor load value when the tool is running under no-load conditions;

[0093] The second curve, the third curve, and the fourth curve are determined based on the first curve. The second curve is the reference curve of the tool, the third curve is the boundary curve of the tool, and the fourth curve is the minimum value curve in the tool sample data.

[0094] Normal or abnormal sample data are generated based on the first curve, the second curve, the third curve, and the fourth curve;

[0095] A training dataset is generated based on the normal sample data and / or the abnormal sample data.

[0096] Optionally, determining the second, third, and fourth curves based on the first curve includes:

[0097] The first curve is divided into M samples within a processing cycle. A weighted calculation is performed based on the M samples and N sampling points to obtain the second curve. The first curve is composed of the M samples.

[0098] The mean difference between the M samples and the second curve is calculated based on each sampling point. The mean and standard deviation are calculated based on the mean difference, and a third curve is generated based on the mean and standard deviation.

[0099] The minimum sample is determined from the M samples, and a fourth curve is generated based on the minimum sample.

[0100] In this embodiment, the collected sample data (unlabeled data) is first stored in the sample database. During the system initialization phase, the first curve, namely the no-load curve (the no-load curve is the sample curve when the tool is not in contact with the workpiece during machining, which can simulate the data curve when the tool breaks), is collected once and stored in the sample database. In addition, during the system initialization phase, this process can be executed once when deploying the product. The first batch of unlabeled samples enters the subsequent process, completes the system initialization steps, and outputs the initialization results of sample labels and monitoring model parameters.

[0101] The second curve is calculated as the baseline curve (base_line) for the samples. The calculation method is as follows: Let one processing cycle be T, each sample data point be Sample_datai, and there be a total of m samples. Then the sample data is a matrix {(SL11,SL12,SL13,…,SL14),(SL21,SL22,SL23,…,SL2n),…,(SLm1,SLm2,SLm3,…,SLmn)}, where n is the number of data sampling points within one processing cycle.

[0102] Note: When this process is an initialization process, the data entering this step is the first batch of unlabeled sample data.

[0103] Calculate the third curve, which is the borderline of the samples. The calculation method is as follows: Calculate the mean difference between each sampling point and the baseline curve for each sample curve, using the following formula: d ij =SL ij -μ j Where: i∈[1,m], j∈[1,n]; calculate the average of the mean differences obtained in the previous step.

[0104] m is the number of samples; calculate the boundary curve using the following formula: border = μ dj ±Zσ dj +μ j , where: j∈[1,n], Z is set to 6, which can be adjusted according to the actual situation.

[0105] Calculate the fourth curve, which is the minimum value curve min_line, and store it in the sample library. The calculation method is as follows: calculate the minimum value of each sampling point within the processing cycle.

[0106] It should be noted that the anomaly detection module uses the system initialization results for anomaly monitoring and updates the monitoring results to the sample labels; it recalculates and updates the baseline curve and sample boundary curve using labeled samples. The update mechanism for this step is as follows: the first update after system initialization is mandatory; subsequent updates can be performed on a scheduled basis or based on the sample size. The update cycle can be adjusted according to the actual situation. This system does not have a mandatory requirement for the update mechanism.

[0107] Optionally, a feature dataset is generated based on the sample data, including:

[0108] Based on the first curve and the second curve, a first distance coefficient and a second distance coefficient are obtained. The first distance coefficient is the distance coefficient between the first curve and the second curve, and the second distance coefficient is the limit distance coefficient between the first curve and the second curve.

[0109] Feature data is generated based on the first distance coefficient, the second distance coefficient, and the type of the cutting tool;

[0110] A feature dataset is generated based on the feature data.

[0111] Optionally, the step of calculating the first distance coefficient and the second distance coefficient based on the first curve and the second curve includes:

[0112] Calculate the mean, maximum, minimum, and median of each sample in the training dataset, and generate data distribution features based on the mean, maximum, minimum, and median;

[0113] The correlation coefficient for each sample is calculated based on the first curve and the second curve. The correlation coefficient includes a negative morphological coefficient and a positive morphological coefficient, which are used to indicate the correlation between the first curve and the second curve for each sample.

[0114] The first distance coefficient and the second distance coefficient are calculated using the mean method.

[0115] In this embodiment, the tool processing type is a configuration feature, which is directly stored in the feature library during configuration. Then, the mean, maximum, minimum, and median of each sample are calculated sequentially to form the data distribution characteristics. The correlation coefficient between each sample and the baseline curve is calculated (Pearson correlation coefficient can be used; the calculation method can be adjusted according to the data characteristics in practical applications), yielding a positive morphological coefficient. The correlation coefficient between each sample curve and the unloaded curve is calculated, yielding a negative morphological coefficient. The above positive and negative morphological coefficients form the curve morphology characteristics. The first distance coefficient between the unloaded curve and the baseline curve, i.e., the distance coefficient xecm, is calculated using the following formula:

[0116] xecm = (csecm - nsecm) / csecm, where csecm is the average value of the baseline curve during the processing cycle, and nsecm is the average value of the no-load curve during the processing cycle.

[0117] The second distance coefficient between the no-load curve and the reference curve, i.e. the limit distance coefficient xpcml, is calculated as follows: xpcml=(cspcml–nspcml) / cspcml, where cspcml is the minimum value of the reference curve during the processing cycle, and nspcml is the minimum value of the no-load curve during the processing cycle.

[0118] The morphological coefficient between the unloaded curve and the baseline curve is calculated and named corr_border_base. Pearson correlation coefficient is used here for calculation. In actual applications, the calculation method can be adjusted according to the characteristics of the data.

[0119] The proportion of points whose boundary curve is greater than the idle curve within the total number of points in the entire processing cycle is calculated and named r_border_idle. The proportion of points whose boundary curve is greater than the minimum curve within the total number of points in the entire processing cycle is calculated and named r_border_min.

[0120] It should be noted that in this embodiment, feature data is generated based on the data distribution characteristics, the negative morphological coefficient, the positive morphological coefficient, the first distance coefficient, and the second distance coefficient.

[0121] The above feature results are stored in the feature library. The feature library of this system includes a benchmark feature library and a sample feature library. The specific descriptions of various features are shown in Table 1:

[0122]

[0123]

[0124] Table 1

[0125] Optionally, determining the corresponding target detection model among at least two detection models based on each of the feature data includes:

[0126] When the type of the tool is a tapping tool, the target detection model is determined as the first detection model;

[0127] If the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3, the target detection model is determined as the second detection model;

[0128] If the correlation coefficient is greater than 2, the target detection model is determined as the third detection model;

[0129] If the first ratio is greater than the second ratio, the target detection model is determined as the fourth detection model. The first ratio is the proportion of points on the third curve that are greater than the first curve to the total number of points in the entire processing cycle, and the second ratio is the proportion of points on the third curve that are greater than the fourth curve to the total number of points in the entire processing cycle.

[0130] In this embodiment, the process is as follows: First, it is determined whether the machining type is a tapping tool. If so, the PCM monitoring model is selected; otherwise, proceed to the next step. Next, it is determined whether xecm is greater than threshold 1. If so, the ECM monitoring model is selected; otherwise, proceed to the next step. Threshold 1 is between (0, 1), and can be set to 0.4 based on experience, but can be adjusted according to actual conditions. Then, it is determined whether corr_border_base is greater than threshold 2. If so, the CSM monitoring model is selected; otherwise, proceed to the next step. Threshold 2 is between [-1, 1], and can be set to 0.7 based on experience, but can be adjusted according to actual conditions. Finally, it is determined whether the distance coefficient xecm_border of the boundary curve is greater than threshold 3. If so, the ECM monitoring algorithm is selected; otherwise, proceed to the next step. Threshold 3 is between (0, 1), and can be set to 0.01 based on experience, but can be adjusted according to actual conditions. Finally, it is determined whether r_border_idle is greater than r_border_min. If so, the EIM monitoring model is selected; otherwise, proceed to the next step. If none of the above conditions are met, there is no matching model, and the tool does not meet the abnormal monitoring conditions.

[0131] Optionally, when the target model is the first detection model, training the target detection model based on the feature dataset to obtain the tool detection model includes:

[0132] Obtain the monitoring level coefficient, and calculate the first upper boundary and the first lower boundary of the first monitoring boundary based on the monitoring level coefficient and the first distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0133] The first monitoring level is calculated based on the first upper boundary and the first lower boundary;

[0134] The first detection model is trained based on the first monitoring level and the feature database to obtain the first tool detection model.

[0135] In this embodiment, when the target model is the first detection model, the monitoring level coefficient yecm is calculated. The correspondence between yecm and xecm is shown in Table 2 below:

[0136] xecm0.01<xecm<0.30.3≤xecm<0.50.5≤xecmyecm0.10.150.2 surface

[0137] Table 2

[0138] Calculate the monitoring boundary:

[0139] Upper boundary calculation:

[0140]

[0141] Lower boundary calculation:

[0142]

[0143] There are 100 monitoring levels in total. The maximum and minimum values ​​for each level are shown above, and intermediate levels are calculated linearly.

[0144] Initialize monitoring level:

[0145] Upper boundary level initialization

[0146] Substitute the maximum mean of the sample into Formula 1 in Step 2.1 to calculate ecm_u. Select the minimum value greater than ecm_u from ecm_ulv_1 to ecm_ulv_100 as the initial monitoring level.

[0147] Lower boundary level initialization

[0148] Substitute the minimum mean of the sample into formula 2 in Step 2.2 to calculate ecm_l. Select the maximum value less than ecm_l from ecm_llv_1 to ecm_llv_100 as the initial monitoring level.

[0149] Adaptive adjustment of monitoring level:

[0150] After updating the sample labels, repeat the above steps to update the monitoring level.

[0151] Optionally, when the target model is a second detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0152] Obtain the monitoring level coefficient, and calculate the second upper boundary and the second lower boundary of the second monitoring boundary based on the monitoring level coefficient and the second distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0153] The second monitoring level is calculated based on the second upper boundary and the second lower boundary;

[0154] The second detection model is trained based on the second monitoring level and the feature database to obtain the second tool detection model.

[0155] In this embodiment, when the target model is the second detection model, the monitoring level coefficient ypcml is calculated. The correspondence between ypcml and xpcml is shown in Table 3 below:

[0156] xpcml0.1<xpcml<0.30.3≤xpcml<0.50.5≤xpcmlypcml0.10.150.2 surface

[0157] Table 3

[0158] Calculate the monitoring boundary:

[0159] pcm_llv_1=cspcml–ypcml*(cspcml-nspcml) Formula 3

[0160] pcm_llv_100 = 95% * nspcml Formula 4

[0161] There are 100 monitoring levels in total. The maximum and minimum values ​​for each level are shown above, and intermediate levels are calculated linearly.

[0162] Initialize monitoring level:

[0163] Substitute the minimum value of the sample into formula 3 in Step 2.1 to calculate pcm_l. Select the maximum value less than pcm_l from pcm_llv_1 to pcm_llv_100 as the initial monitoring level.

[0164] Adaptive adjustment of monitoring level: After updating the sample labels, repeat the above steps to update the monitoring level.

[0165] Optionally, when the target model is a third detection model, training the target detection model based on the training dataset and the feature dataset to obtain a tool detection model includes:

[0166] Calculate the load mean difference for each sampling point based on the M samples and N sampling points;

[0167] The mean and standard deviation of each sampling point are calculated based on the difference in the mean load of each sampling point.

[0168] The third monitoring level is calculated based on the average value and standard deviation.

[0169] The third detection model is trained based on the third monitoring level and the feature database to obtain the third tool detection model.

[0170] In this embodiment, let a processing cycle be T, each sample data point be Sample_datai, and there be a total of m samples. Then, the main motor load value is matrix {(SL11,SL12,SL13,…,SL14),(SL21,SL22,SL23,…,SL2n),…,(SLm1,SLm2,SLm3,…,SLmn)}, where n is the number of data sampling points in one processing cycle. The model training process is shown in Figure 2, and the model training steps are as follows:

[0171] Let the reference curve be: Where: j∈[1,n], m is the number of samples;

[0172] The formula for calculating the load mean difference at each sampling point is as follows: d ij =SL ij -μ j Where: i∈[1,m], j∈[1,n];

[0173] The average and standard deviation of the load mean difference at each sampling point are calculated using the following formula:

[0174] Where: j∈[1,n], m is the number of samples;

[0175] The monitoring boundary is calculated using the following formula: border = μ dj ±Zσ dj +μ j Where: j∈[1,n], Z defaults to 3.5, which can be adjusted according to the actual situation;

[0176] Adaptive adjustment of monitoring level:

[0177] After updating the sample labels, repeat the above steps to update the monitoring level.

[0178] Optionally, when the target model is a third detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0179] The mean and standard deviation are calculated based on the positive morphological coefficients of the normal sample data.

[0180] The fourth monitoring level is calculated based on the mean and standard deviation.

[0181] The fourth detection model is trained based on the fourth monitoring level and the feature database to obtain the fourth tool detection model.

[0182] In this embodiment, the positive morphological coefficients of samples with positive labels are extracted from the feature library; the mean and standard deviation of the positive morphological coefficients obtained in the previous step are calculated; and the monitoring boundary is calculated using the following formula: Threshold r =μ r -Zσ r Where Z is 3.5 by default and can be adjusted according to the actual situation; adaptive adjustment of monitoring level: after updating the data with sample labels, repeat steps two and three to update the monitoring level.

[0183] It should be noted that the monitoring level must be updated for the first time after system initialization; subsequent updates can be scheduled or based on sample size, and the update cycle can be adjusted according to the actual situation. This system does not have a mandatory requirement for the update mechanism.

[0184] In another embodiment, anomaly detection can also be configured, including: a) Real-time monitoring: Real-time detection of data generated during tool processing based on the selected monitoring model and monitoring level. For each model, the detection steps are as follows:

[0185] ECM monitoring model: Determines whether the mean feature exceeds the detection boundary; if it does, it is judged as an anomaly.

[0186] PCM monitoring model: Determines whether the minimum feature exceeds the detection boundary; if it does, it is judged as an anomaly.

[0187] EIM monitoring model: Determines whether the entire data curve exceeds 30% of the detection curve (Note: 30% is an empirical value and can be adjusted according to actual usage). If it exceeds, it is judged as abnormal.

[0188] CSM monitoring model: Determines whether the positive morphological coefficient feature is less than the detection threshold; if it is, it is judged as abnormal.

[0189] The system outputs the sample label for each sample during detection and updates the sample database.

[0190] In another embodiment, the present invention also provides a method for detecting tool abnormalities, the method comprising:

[0191] Step 201: Extract features from the tool data to be inspected to obtain target feature data.

[0192] Step 202: Determine the corresponding target detection model from at least two detection models based on the target feature data. The detection conditions for different detection models are different, and the detection conditions include at least one of tool type and tool attribute.

[0193] Step 203: Input the tool data to be detected into the trained target detection model and output the recognition result. The recognition result is used to indicate whether the tool data to be detected is abnormal data.

[0194] In this embodiment, feature extraction is performed on the tool data to be detected to obtain target feature data of the tool. After matching the target feature data with the detection model, the data is input into the trained model for recognition and the recognition result is output. The recognition result is used to indicate whether the tool data to be detected is normal or abnormal. When it is abnormal, the staff needs to be reminded.

[0195] This invention provides a detection model training method, comprising: extracting features from tool data to be detected to obtain target feature data; determining a corresponding target detection model from at least two detection models based on the target feature data, wherein the detection conditions for different detection models are different, and the detection conditions include at least one of tool type and tool attribute; inputting the tool data to be detected into the trained target detection model, and outputting a recognition result, wherein the recognition result is used to indicate whether the tool data to be detected is abnormal data. This invention improves the tool detection effect by acquiring a large amount of tool sample data, performing label classification on the sample data, extracting features, and then matching the extracted features with at least two detection models to determine the target detection model, thereby training the determined target detection model.

[0196] The present invention also provides a detection model training device, the device comprising:

[0197] The acquisition module 310 is used to acquire a training dataset, which includes sample data, which is relevant data of tool operation, and the sample data includes normal sample data and abnormal sample data.

[0198] The generation module 320 is used to generate a feature dataset based on the sample data. The feature dataset includes feature data, which is used to reflect the attribute characteristics of the tool operation corresponding to each sample data.

[0199] The determination module 330 is used to determine the corresponding target detection model in at least two detection models based on each of the feature data, wherein the detection conditions corresponding to the different detection models are different, and the detection conditions include at least one of tool type and tool attribute;

[0200] Training module 340 is used to train the target detection model based on the feature dataset to obtain a tool detection model.

[0201] Optionally, obtaining the training dataset includes:

[0202] Collect tool sample data during tool operation;

[0203] Calculate a first curve of the tool sample data, which is used to indicate the main motor load value when the tool is running under no-load conditions;

[0204] The second curve, the third curve, and the fourth curve are determined based on the first curve. The second curve is the reference curve of the tool, the third curve is the boundary curve of the tool, and the fourth curve is the minimum value curve in the tool sample data.

[0205] Normal or abnormal sample data are generated based on the first curve, the second curve, the third curve, and the fourth curve;

[0206] A training dataset is generated based on the normal sample data and / or the abnormal sample data.

[0207] Optionally, determining the second, third, and fourth curves based on the first curve includes:

[0208] The first curve is divided into M samples within a processing cycle. A weighted calculation is performed based on the M samples and N sampling points to obtain the second curve. The first curve is composed of the M samples.

[0209] The mean difference between the M samples and the second curve is calculated based on each sampling point. The mean and standard deviation are calculated based on the mean difference, and a third curve is generated based on the mean and standard deviation.

[0210] The minimum sample is determined from the M samples, and a fourth curve is generated based on the minimum sample.

[0211] Optionally, a feature dataset is generated based on the sample data, including:

[0212] Based on the first curve and the second curve, a first distance coefficient and a second distance coefficient are obtained. The first distance coefficient is the distance coefficient between the first curve and the second curve, and the second distance coefficient is the limit distance coefficient between the first curve and the second curve.

[0213] Feature data is generated based on the first distance coefficient, the second distance coefficient, and the type of the cutting tool;

[0214] A feature dataset is generated based on the feature data.

[0215] Optionally, the step of calculating the first distance coefficient and the second distance coefficient based on the first curve and the second curve includes:

[0216] Calculate the mean, maximum, minimum, and median of each sample in the training dataset, and generate data distribution features based on the mean, maximum, minimum, and median;

[0217] The correlation coefficient for each sample is calculated based on the first curve and the second curve. The correlation coefficient includes a negative morphological coefficient and a positive morphological coefficient, which are used to indicate the correlation between the first curve and the second curve for each sample.

[0218] The first distance coefficient and the second distance coefficient are calculated using the mean method.

[0219] Optionally, generating feature data based on the first distance coefficient, the second distance coefficient, and the type of the tool includes:

[0220] Feature data is generated based on the data distribution characteristics, the negative morphological coefficient, the positive morphological coefficient, the first distance coefficient, and the second distance coefficient.

[0221] Optionally, determining the corresponding target detection model among at least two detection models based on each of the feature data includes:

[0222] When the type of the tool is a tapping tool, the target detection model is determined as the first detection model;

[0223] If the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3, the target detection model is determined as the second detection model;

[0224] If the correlation coefficient is greater than 2, the target detection model is determined as the third detection model;

[0225] If the first ratio is greater than the second ratio, the target detection model is determined as the fourth detection model. The first ratio is the proportion of points on the third curve that are greater than the first curve to the total number of points in the entire processing cycle, and the second ratio is the proportion of points on the third curve that are greater than the fourth curve to the total number of points in the entire processing cycle.

[0226] Optionally, when the target model is the first detection model, training the target detection model based on the feature dataset to obtain the tool detection model includes:

[0227] Obtain the monitoring level coefficient, and calculate the first upper boundary and the first lower boundary of the first monitoring boundary based on the monitoring level coefficient and the first distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0228] The first monitoring level is calculated based on the first upper boundary and the first lower boundary;

[0229] The first detection model is trained based on the first monitoring level and the feature database to obtain the first tool detection model.

[0230] Optionally, when the target model is a second detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0231] Obtain the monitoring level coefficient, and calculate the second upper boundary and the second lower boundary of the second monitoring boundary based on the monitoring level coefficient and the second distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0232] The second monitoring level is calculated based on the second upper boundary and the second lower boundary;

[0233] The second detection model is trained based on the second monitoring level and the feature database to obtain the second tool detection model.

[0234] Optionally, when the target model is a third detection model, training the target detection model based on the training dataset and the feature dataset to obtain a tool detection model includes:

[0235] Calculate the load mean difference for each sampling point based on the M samples and N sampling points;

[0236] The mean and standard deviation of each sampling point are calculated based on the difference in the mean load of each sampling point.

[0237] The third monitoring level is calculated based on the average value and standard deviation.

[0238] The third detection model is trained based on the third monitoring level and the feature database to obtain the third tool detection model.

[0239] Optionally, when the target model is a third detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0240] The mean and standard deviation are calculated based on the positive morphological coefficients of the normal sample data.

[0241] The fourth monitoring level is calculated based on the mean and standard deviation.

[0242] The fourth detection model is trained based on the fourth monitoring level and the feature database to obtain the fourth tool detection model.

[0243] This invention acquires a large amount of tool sample data, performs label classification on the sample data, extracts features, and then matches the extracted features with at least two detection models to determine the target detection model. The determined target detection model is then trained, thereby improving the detection effect of tools.

[0244] The present invention also provides a device for detecting tool malfunctions, the device comprising:

[0245] The extraction module is used to extract features from the tool data to be inspected, and obtain target feature data.

[0246] The model confirmation module is used to determine the corresponding target detection model among at least two detection models based on the target feature data. Among the at least two detection models, the detection conditions corresponding to different detection models are different, wherein the detection conditions include at least one of tool type and tool attribute.

[0247] The output module is used to input the tool data to be detected into the trained target detection model and output the recognition result, which is used to indicate whether the tool data to be detected is abnormal data.

[0248] This invention acquires a large amount of tool sample data, performs label classification on the sample data, extracts features, and then matches the extracted features with at least two detection models to determine the target detection model. The determined target detection model is then trained, thereby improving the detection effect of tools.

[0249] Figure 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. As shown in Figure 5, the electronic device 500 includes a memory 510 and a processor 520. The number of processors 520 in the electronic device 500 can be one or more. In Figure 5, one processor 320 is used as an example. The memory 510 and processor 520 in the server can be connected by a bus or other means. In Figure 5, the connection by a bus is used as an example.

[0250] The memory 510, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the title generation method in the embodiments of the present invention. The processor 520 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions, and modules stored in the memory 510, that is, to implement the above-mentioned detection model training method or the method for detecting tool abnormalities.

[0251] The processor 320 is used to run the computer program stored in the memory 310, and performs the following steps:

[0252] Obtain a training dataset, which includes sample data, namely, data related to tool operation, including normal sample data and abnormal sample data;

[0253] A feature dataset is generated based on the sample data. The feature dataset includes feature data, which is used to reflect the attribute characteristics of the tool operation corresponding to each sample data.

[0254] Based on each of the aforementioned feature data, a corresponding target detection model is determined in at least two detection models. In the at least two detection models, the detection conditions corresponding to different detection models are different, wherein the detection conditions include at least one of tool type and tool attribute.

[0255] The target detection model is trained based on the feature dataset to obtain a tool detection model.

[0256] Optionally, obtaining the training dataset includes:

[0257] Collect tool sample data during tool operation;

[0258] Calculate a first curve of the tool sample data, which is used to indicate the main motor load value when the tool is running under no-load conditions;

[0259] The second curve, the third curve, and the fourth curve are determined based on the first curve. The second curve is the reference curve of the tool, the third curve is the boundary curve of the tool, and the fourth curve is the minimum value curve in the tool sample data.

[0260] Normal or abnormal sample data are generated based on the first curve, the second curve, the third curve, and the fourth curve;

[0261] A training dataset is generated based on the normal sample data and / or the abnormal sample data.

[0262] Optionally, determining the second, third, and fourth curves based on the first curve includes:

[0263] The first curve is divided into M samples within a processing cycle. A weighted calculation is performed based on the M samples and N sampling points to obtain the second curve. The first curve is composed of the M samples.

[0264] The mean difference between the M samples and the second curve is calculated based on each sampling point. The mean and standard deviation are calculated based on the mean difference, and a third curve is generated based on the mean and standard deviation.

[0265] The minimum sample is determined from the M samples, and a fourth curve is generated based on the minimum sample.

[0266] Optionally, a feature dataset is generated based on the sample data, including:

[0267] Based on the first curve and the second curve, a first distance coefficient and a second distance coefficient are obtained. The first distance coefficient is the distance coefficient between the first curve and the second curve, and the second distance coefficient is the limit distance coefficient between the first curve and the second curve.

[0268] Feature data is generated based on the first distance coefficient, the second distance coefficient, and the type of the cutting tool;

[0269] A feature dataset is generated based on the feature data.

[0270] Optionally, the step of calculating the first distance coefficient and the second distance coefficient based on the first curve and the second curve includes:

[0271] Calculate the mean, maximum, minimum, and median of each sample in the training dataset, and generate data distribution features based on the mean, maximum, minimum, and median;

[0272] The correlation coefficient for each sample is calculated based on the first curve and the second curve. The correlation coefficient includes a negative morphological coefficient and a positive morphological coefficient, which are used to indicate the correlation between the first curve and the second curve for each sample.

[0273] The first distance coefficient and the second distance coefficient are calculated using the mean method.

[0274] Optionally, generating feature data based on the first distance coefficient, the second distance coefficient, and the type of the tool includes:

[0275] Feature data is generated based on the data distribution characteristics, the negative morphological coefficient, the positive morphological coefficient, the first distance coefficient, and the second distance coefficient.

[0276] Optionally, determining the corresponding target detection model among at least two detection models based on each of the feature data includes:

[0277] When the type of the tool is a tapping tool, the target detection model is determined as the first detection model;

[0278] If the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3, the target detection model is determined as the second detection model;

[0279] If the correlation coefficient is greater than 2, the target detection model is determined as the third detection model;

[0280] If the first ratio is greater than the second ratio, the target detection model is determined as the fourth detection model. The first ratio is the proportion of points on the third curve that are greater than the first curve to the total number of points in the entire processing cycle, and the second ratio is the proportion of points on the third curve that are greater than the fourth curve to the total number of points in the entire processing cycle.

[0281] Optionally, when the target model is the first detection model, training the target detection model based on the feature dataset to obtain the tool detection model includes:

[0282] Obtain the monitoring level coefficient, and calculate the first upper boundary and the first lower boundary of the first monitoring boundary based on the monitoring level coefficient and the first distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0283] The first monitoring level is calculated based on the first upper boundary and the first lower boundary;

[0284] The first detection model is trained based on the first monitoring level and the feature database to obtain the first tool detection model.

[0285] Optionally, when the target model is a second detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0286] Obtain the monitoring level coefficient, and calculate the second upper boundary and the second lower boundary of the second monitoring boundary based on the monitoring level coefficient and the second distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0287] The second monitoring level is calculated based on the second upper boundary and the second lower boundary;

[0288] The second detection model is trained based on the second monitoring level and the feature database to obtain the second tool detection model.

[0289] Optionally, when the target model is a third detection model, training the target detection model based on the training dataset and the feature dataset to obtain a tool detection model includes:

[0290] Calculate the load mean difference for each sampling point based on the M samples and N sampling points;

[0291] The mean and standard deviation of each sampling point are calculated based on the difference in the mean load of each sampling point.

[0292] The third monitoring level is calculated based on the average value and standard deviation.

[0293] The third detection model is trained based on the third monitoring level and the feature database to obtain the third tool detection model.

[0294] Optionally, when the target model is a third detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0295] The mean and standard deviation are calculated based on the positive morphological coefficients of the normal sample data.

[0296] The fourth monitoring level is calculated based on the mean and standard deviation.

[0297] The fourth detection model is trained based on the fourth monitoring level and the feature database to obtain the fourth tool detection model.

[0298] or

[0299] Feature extraction is performed on the tool data to be inspected to obtain target feature data;

[0300] Based on the target feature data, a corresponding target detection model is determined from at least two detection models. The detection conditions for different detection models are different, and the detection conditions include at least one of tool type and tool attribute.

[0301] The tool data to be detected is input into a trained target detection model, and the recognition result is output. The recognition result is used to indicate whether the tool data to be detected is abnormal data.

[0302] This invention acquires a large amount of tool sample data, performs label classification on the sample data, extracts features, and then matches the extracted features with at least two detection models to determine the target detection model. The determined target detection model is then trained, thereby improving the detection effect of tools.

[0303] The memory may primarily comprise a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, which can be connected to a server / terminal / server via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0304] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a detection model training method or a method for detecting tool anomalies, the method comprising:

[0305] Obtain a training dataset, which includes sample data, namely, data related to tool operation, including normal sample data and abnormal sample data;

[0306] A feature dataset is generated based on the sample data. The feature dataset includes feature data, which is used to reflect the attribute characteristics of the tool operation corresponding to each sample data.

[0307] Based on each of the aforementioned feature data, a corresponding target detection model is determined in at least two detection models. In the at least two detection models, the detection conditions corresponding to different detection models are different, wherein the detection conditions include at least one of tool type and tool attribute.

[0308] The target detection model is trained based on the feature dataset to obtain a tool detection model.

[0309] Optionally, obtaining the training dataset includes:

[0310] Collect tool sample data during tool operation;

[0311] Calculate a first curve of the tool sample data, which is used to indicate the main motor load value when the tool is running under no-load conditions;

[0312] The second curve, the third curve, and the fourth curve are determined based on the first curve. The second curve is the reference curve of the tool, the third curve is the boundary curve of the tool, and the fourth curve is the minimum value curve in the tool sample data.

[0313] Normal or abnormal sample data are generated based on the first curve, the second curve, the third curve, and the fourth curve;

[0314] A training dataset is generated based on the normal sample data and / or the abnormal sample data.

[0315] Optionally, determining the second, third, and fourth curves based on the first curve includes:

[0316] The first curve is divided into M samples within a processing cycle. A weighted calculation is performed based on the M samples and N sampling points to obtain the second curve. The first curve is composed of the M samples.

[0317] The mean difference between the M samples and the second curve is calculated based on each sampling point. The mean and standard deviation are calculated based on the mean difference, and a third curve is generated based on the mean and standard deviation.

[0318] The minimum sample is determined from the M samples, and a fourth curve is generated based on the minimum sample.

[0319] Optionally, a feature dataset is generated based on the sample data, including:

[0320] Based on the first curve and the second curve, a first distance coefficient and a second distance coefficient are obtained. The first distance coefficient is the distance coefficient between the first curve and the second curve, and the second distance coefficient is the limit distance coefficient between the first curve and the second curve.

[0321] Feature data is generated based on the first distance coefficient, the second distance coefficient, and the type of the cutting tool;

[0322] A feature dataset is generated based on the feature data.

[0323] Optionally, the step of calculating the first distance coefficient and the second distance coefficient based on the first curve and the second curve includes:

[0324] Calculate the mean, maximum, minimum, and median of each sample in the training dataset, and generate data distribution features based on the mean, maximum, minimum, and median;

[0325] The correlation coefficient for each sample is calculated based on the first curve and the second curve. The correlation coefficient includes a negative morphological coefficient and a positive morphological coefficient, which are used to indicate the correlation between the first curve and the second curve for each sample.

[0326] The first distance coefficient and the second distance coefficient are calculated using the mean method.

[0327] Optionally, generating feature data based on the first distance coefficient, the second distance coefficient, and the type of the tool includes:

[0328] Feature data is generated based on the data distribution characteristics, the negative morphological coefficient, the positive morphological coefficient, the first distance coefficient, and the second distance coefficient.

[0329] Optionally, determining the corresponding target detection model among at least two detection models based on each of the feature data includes:

[0330] When the type of the tool is a tapping tool, the target detection model is determined as the first detection model;

[0331] If the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3, the target detection model is determined as the second detection model;

[0332] If the correlation coefficient is greater than 2, the target detection model is determined as the third detection model;

[0333] If the first ratio is greater than the second ratio, the target detection model is determined as the fourth detection model. The first ratio is the proportion of points on the third curve that are greater than the first curve to the total number of points in the entire processing cycle, and the second ratio is the proportion of points on the third curve that are greater than the fourth curve to the total number of points in the entire processing cycle.

[0334] Optionally, when the target model is the first detection model, training the target detection model based on the feature dataset to obtain the tool detection model includes:

[0335] Obtain the monitoring level coefficient, and calculate the first upper boundary and the first lower boundary of the first monitoring boundary based on the monitoring level coefficient and the first distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0336] The first monitoring level is calculated based on the first upper boundary and the first lower boundary;

[0337] The first detection model is trained based on the first monitoring level and the feature database to obtain the first tool detection model.

[0338] Optionally, when the target model is a second detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0339] Obtain the monitoring level coefficient, and calculate the second upper boundary and the second lower boundary of the second monitoring boundary based on the monitoring level coefficient and the second distance coefficient. The monitoring level coefficient is used to determine the degree of monitoring of the tool.

[0340] The second monitoring level is calculated based on the second upper boundary and the second lower boundary;

[0341] The second detection model is trained based on the second monitoring level and the feature database to obtain the second tool detection model.

[0342] Optionally, when the target model is a third detection model, training the target detection model based on the training dataset and the feature dataset to obtain a tool detection model includes:

[0343] Calculate the load mean difference for each sampling point based on the M samples and N sampling points;

[0344] The mean and standard deviation of each sampling point are calculated based on the difference in the mean load of each sampling point.

[0345] The third monitoring level is calculated based on the average value and standard deviation.

[0346] The third detection model is trained based on the third monitoring level and the feature database to obtain the third tool detection model.

[0347] Optionally, when the target model is a third detection model, training the target detection model based on the feature dataset to obtain a tool detection model includes:

[0348] The mean and standard deviation are calculated based on the positive morphological coefficients of the normal sample data.

[0349] The fourth monitoring level is calculated based on the mean and standard deviation.

[0350] The fourth detection model is trained based on the fourth monitoring level and the feature database to obtain the fourth tool detection model.

[0351] or

[0352] Feature extraction is performed on the tool data to be inspected to obtain target feature data;

[0353] Based on the target feature data, a corresponding target detection model is determined from at least two detection models. The detection conditions for different detection models are different, and the detection conditions include at least one of tool type and tool attribute.

[0354] The tool data to be detected is input into a trained target detection model, and the recognition result is output. The recognition result is used to indicate whether the tool data to be detected is abnormal data.

[0355] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in a title generation method provided in any embodiment of the present invention.

[0356] This invention acquires a large amount of tool sample data, performs label classification on the sample data, extracts features, and then matches the extracted features with at least two detection models to determine the target detection model. The determined target detection model is then trained, thereby improving the detection effect of tools.

[0357] The computer-readable storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0358] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0359] The program code contained on the storage medium can be transmitted using any suitable medium, including—but not limited to—wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0360] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0361] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for training a detection model, characterized in that, The method includes: acquiring a training dataset, the training dataset including sample data, the sample data being relevant data of tool operation, the sample data including normal sample data and abnormal sample data; acquiring the training dataset includes: collecting tool sample data during tool operation; calculating a first curve of the tool sample data, the first curve being used to indicate the main motor load value when the tool is running under no-load; determining a second curve, a third curve, and a fourth curve based on the first curve, the second curve being the reference curve of the tool, the third curve being the boundary curve of the tool, and the fourth curve being the minimum value curve in the tool sample data; based on the first curve, the second curve, and the... The third curve and the fourth curve generate normal sample data or abnormal sample data; a training dataset is generated based on the normal sample data and / or the abnormal sample data; a feature dataset is generated based on the sample data, the feature dataset including feature data, the feature data being used to reflect the attribute characteristics of tool operation corresponding to each sample data; a corresponding target detection model is determined based on each feature data among at least two detection models, the at least two detection models having different detection conditions, wherein the detection conditions include at least one of tool type and tool attribute; the target detection model is trained based on the feature dataset to obtain a tool detection model.

2. The method according to claim 1, characterized in that, The step of determining the second, third, and fourth curves based on the first curve includes: splitting the first curve into M samples within a processing cycle; performing a weighted calculation based on the M samples and N sampling points to obtain the second curve, wherein the first curve is composed of the M samples; calculating the mean difference between the M samples and the second curve based on each sampling point; calculating the mean and standard deviation based on the mean difference and generating the third curve based on the mean and standard deviation; determining the minimum sample among the M samples; and generating the fourth curve based on the minimum sample.

3. The method according to claim 2, characterized in that, Generating a feature dataset based on the sample data includes: calculating a first distance coefficient and a second distance coefficient based on the first curve and the second curve, wherein the first distance coefficient is the distance coefficient between the first curve and the second curve, and the second distance coefficient is the limit distance coefficient between the first curve and the second curve; generating feature data based on the first distance coefficient, the second distance coefficient, and the type of the tool; and generating a feature dataset based on the feature data.

4. The method according to claim 3, characterized in that, The step of calculating the first distance coefficient and the second distance coefficient based on the first curve and the second curve includes: calculating the mean, maximum value, minimum value and median of each sample in the training dataset, and generating data distribution features based on the mean, maximum value, minimum value and median; calculating the correlation coefficient corresponding to each sample based on the first curve and the second curve, the correlation coefficient including negative morphological coefficient and positive morphological coefficient, the negative morphological coefficient and positive morphological coefficient being used to indicate the correlation between the first curve and the second curve of each sample; and calculating the first distance coefficient and the second distance coefficient using the mean calculation method.

5. The method according to claim 4, characterized in that, The step of generating feature data based on the first distance coefficient, the second distance coefficient, and the type of the tool includes: generating feature data based on the data distribution characteristics, the negative morphology coefficient, the positive morphology coefficient, the first distance coefficient, and the second distance coefficient.

6. The method according to claim 4, characterized in that, The step of determining the corresponding target detection model among at least two detection models based on each of the feature data includes: when the tool type is a tapping tool, determining the target detection model as a first detection model; when the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3, determining the target detection model as a second detection model; when the correlation coefficient is greater than 2, determining the target detection model as a third detection model; and when the first ratio is greater than the second ratio, determining the target detection model as a fourth detection model, wherein the first ratio is the proportion of points on the third curve that are greater than the first curve to the total number of points in the entire processing cycle, and the second ratio is the proportion of points on the third curve that are greater than the fourth curve to the total number of points in the entire processing cycle.

7. The method according to claim 6, characterized in that, When the target detection model is the first detection model, training the target detection model based on the feature dataset to obtain the tool detection model includes: obtaining a monitoring level coefficient, and calculating a first upper boundary and a first lower boundary of the first monitoring boundary based on the monitoring level coefficient and the first distance coefficient, wherein the monitoring level coefficient is used to determine the degree of monitoring of the tool; calculating a first monitoring level based on the first upper boundary and the first lower boundary; and training the first detection model based on the first monitoring level and the feature dataset to obtain the first tool detection model.

8. The method according to claim 6, characterized in that, When the target detection model is the second detection model, training the target detection model based on the feature dataset to obtain the tool detection model includes: obtaining a monitoring level coefficient, and calculating a second upper boundary and a second lower boundary of the second monitoring boundary based on the monitoring level coefficient and the second distance coefficient, wherein the monitoring level coefficient is used to determine the degree of monitoring of the tool; calculating a second monitoring level based on the second upper boundary and the second lower boundary; and training the second detection model based on the second monitoring level and the feature dataset to obtain the second tool detection model.

9. The method according to claim 6, characterized in that, When the target detection model is a third detection model, training the target detection model based on the training dataset and the feature dataset to obtain a tool detection model includes: calculating the load mean difference of each sampling point based on the M samples and N sampling points; calculating the mean and standard deviation of each sampling point based on the load mean difference of each sampling point; calculating a third monitoring level based on the mean and standard deviation; and training the third detection model based on the third monitoring level and the feature dataset to obtain a third tool detection model.

10. The method according to claim 6, characterized in that, When the target detection model is the third detection model, the step of training the target detection model based on the feature dataset to obtain the tool detection model includes: calculating the mean and standard deviation based on the positive morphological coefficient of the normal sample data; calculating the fourth monitoring level based on the mean and standard deviation; and training the fourth detection model based on the fourth monitoring level and the feature dataset to obtain the fourth tool detection model.

11. A method for detecting tool abnormalities, characterized in that, The method for training a detection model according to any one of claims 1-10 includes: extracting features from tool data to be detected to obtain target feature data; determining a corresponding target detection model from at least two detection models based on the target feature data, wherein the detection conditions corresponding to the different detection models are different, and the detection conditions include at least one of tool type and tool attribute; inputting the tool data to be detected into the trained target detection model and outputting a recognition result, wherein the recognition result is used to indicate whether the tool data to be detected is abnormal data.

12. A detection model training device, characterized in that, The device includes: an acquisition module for acquiring a training dataset, the training dataset including sample data, the sample data being relevant data of tool operation, the sample data including normal sample data and abnormal sample data; the acquisition module is further configured to collect tool sample data during tool operation; calculate a first curve of the tool sample data, the first curve indicating the main motor load value when the tool is running under no-load; determine a second curve, a third curve, and a fourth curve based on the first curve, the second curve being the reference curve of the tool, the third curve being the boundary curve of the tool, and the fourth curve being the minimum value curve in the tool sample data; and based on the first curve, the second curve, the third curve, and the fourth curve... The system generates normal or abnormal sample data based on the curve; it generates a training dataset based on the normal and / or abnormal sample data; a generation module generates a feature dataset based on the sample data, the feature dataset including feature data reflecting the attribute characteristics of tool operation corresponding to each sample data; a determination module determines a corresponding target detection model based on each feature data among at least two detection models, wherein the detection conditions corresponding to different detection models are different, and the detection conditions include at least one of tool type and tool attribute; and a training module trains the target detection model based on the feature dataset to obtain a tool detection model.

13. A device for detecting tool malfunctions, characterized in that, The apparatus for training a detection model according to any one of claims 1-10 includes: an extraction module for extracting features from tool data to be detected to obtain target feature data; a model confirmation module for determining a corresponding target detection model among at least two detection models based on the target feature data, wherein the detection conditions corresponding to the different detection models are different, and the detection conditions include at least one of tool type and tool attribute; and an output module for inputting the tool data to be detected into the trained target detection model and outputting a recognition result, wherein the recognition result is used to indicate whether the tool data to be detected is abnormal data.

14. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; the processor is used to execute the program stored in the memory to implement the detection model training method of any one of claims 1-10, or to implement the tool anomaly detection method of claim 11.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the detection model training method of any one of claims 1-10, or the method for detecting tool anomalies as described in claim 11.

Citation Information

Patent Citations

  • Generating method and detecting method for tool detection model, system, equipment and medium

    CN111993158A

  • Operation machine anomaly detection method and device and operation machine

    CN115014821A