CN115935166A - Detection model training method and device and related equipment - Google Patents

Detection model training method and device and related equipment Download PDF

Info

Publication number
CN115935166A
CN115935166A CN202211597852.4A CN202211597852A CN115935166A CN 115935166 A CN115935166 A CN 115935166A CN 202211597852 A CN202211597852 A CN 202211597852A CN 115935166 A CN115935166 A CN 115935166A
Authority
CN
China
Prior art keywords
curve
detection model
data
tool
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211597852.4A
Other languages
Chinese (zh)
Inventor
邵琳
袁绿赞
朱成龙
李希
汪旺
潘旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fanuc Mechatronics Co Ltd
Original Assignee
Beijing Fanuc Mechatronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Fanuc Mechatronics Co Ltd filed Critical Beijing Fanuc Mechatronics Co Ltd
Priority to CN202211597852.4A priority Critical patent/CN115935166A/en
Publication of CN115935166A publication Critical patent/CN115935166A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention provides a detection model training method, a detection model training device and related equipment, wherein the method comprises the following steps: acquiring a training data set, wherein the training data set comprises sample data; generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data; determining a corresponding target detection model in at least two detection models based on each characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes; and training the target detection model based on the characteristic data set to obtain a tool detection model. According to the method, a large amount of sample data of the cutter is obtained, the sample data is subjected to label classification and then feature extraction, and the extracted features are matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect of the cutter is improved.

Description

Detection model training method and device and related equipment
Technical Field
The invention relates to the field of computers, in particular to a detection model training method, a detection model training device and related equipment.
Background
With the industrial development of the machining industry, the influence of the abnormity of the cutter and the abnormity of the machining process related to the cutter on machining is more and more obvious, so that the detection of the abnormal state of the cutter is very important. At present, equipment such as sensors are directly additionally arranged around a cutter in a hardware mode to detect the cutter, but the mode can limit equipment design and cannot completely and accurately reflect the current state of the cutter in the machining process, so that the problem of poor detection effect is caused.
Disclosure of Invention
The embodiment of the invention provides a detection model training method, a detection model training device and related equipment, and solves the problem of poor detection effect in the prior art.
In a first aspect, an embodiment of the present invention provides a detection model training method, where the method includes:
acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of a cutter, and the sample data comprises normal sample data and abnormal sample data;
generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data which is used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data;
determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and training the target detection model based on the characteristic data set to obtain a tool detection model.
Optionally, the acquiring the training data set includes:
collecting sample data of the cutter in the operation process of the cutter;
calculating a first curve of tool sample data, wherein the first curve is used for indicating a main motor load value when the tool runs in a no-load mode;
determining a second curve, a third curve and a fourth curve according to the first curve, wherein the second curve is a reference curve of the cutter, the third curve is a boundary curve of the cutter, and the fourth curve is a minimum value curve in the cutter sample data;
generating normal sample data or abnormal sample data based on the first curve, the second curve, the third curve and the fourth curve;
and generating a training data set according to the normal sample data and/or the abnormal sample data.
Optionally, the determining a second curve, a third curve, and a fourth curve according to the first curve includes:
splitting the first curve into M samples in one processing period, and performing weighting calculation according to the M samples and the N sampling points to obtain a second curve, wherein the first curve consists of the M samples;
calculating mean differences of the M samples and the second curve based on each sampling point, calculating mean values and standard deviations according to the mean differences, and generating a third curve based on the mean values and the standard deviations;
a minimum sample is determined among the M samples, and a fourth curve is generated based on the minimum sample.
Optionally, generating a feature data set based on the sample data includes:
calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient, wherein the first distance coefficient is a distance coefficient between the first curve and the second curve, and the second distance coefficient is a 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 characteristic data set according to the characteristic data.
Optionally, the calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient includes:
calculating the mean value, the maximum value, the minimum value and the median of each sample in the training data set, and generating data distribution characteristics based on the mean value, the maximum value, the minimum value and the median;
calculating a correlation coefficient corresponding to each sample based on the first curve and the second curve, wherein the correlation coefficient comprises a negative form coefficient and a positive form coefficient, and the negative form coefficient and the positive form coefficient are used for indicating the correlation degree between the first curve and the second curve of each sample;
and calculating the first distance coefficient and the second distance coefficient by using a mean value calculation mode.
Optionally, the 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 feature, the negative form factor, the positive form factor, the first distance factor, and the second distance factor.
Optionally, the determining a corresponding target detection model in at least two detection models based on each feature data includes:
determining the target detection model as a first detection model under the condition that the type of the cutter is a tapping cutter;
determining the target detection model as a second detection model if the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3;
determining the target detection model as a third detection model if the correlation coefficient is greater than 2;
and under the condition that a first proportion is larger than a second proportion, determining the target detection model as a fourth detection model, wherein the first proportion is the proportion of points of which the third curve is larger than the first curve to the number of points in the whole machining period, and the second proportion is the proportion of points of which the third curve is larger than the fourth curve to the number of points in the whole machining period.
Optionally, when the target model is the first detection model, the training the target detection model based on the feature data set to obtain the tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a first upper boundary and a first lower boundary of a first monitoring boundary according to the monitoring grade coefficient and the first distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a first monitoring level according to the first upper boundary and the first lower boundary;
and training the first detection model according to the first monitoring grade and the feature database to obtain a first tool detection model.
Optionally, when the target model is a second detection model, the training the target detection model based on the feature data set to obtain a tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a second upper boundary and a second lower boundary of a second monitoring boundary according to the monitoring grade coefficient and the second distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a second monitoring level according to the second upper boundary and the second lower boundary;
and training the second detection model according to the second monitoring grade and the characteristic database to obtain a second cutter detection model.
Optionally, in a case that the target model is a third detection model, the training the target detection model based on the training data set and the feature data set to obtain a tool detection model includes:
calculating the load average value difference of each sampling point according to the M samples and the N sampling points;
calculating the average value and the standard deviation of each sampling point according to the load average value difference of each sampling point;
calculating a third monitoring grade according to the average value and the standard deviation;
and training the third detection model according to the third monitoring grade and the feature database to obtain a third cutter detection model.
Optionally, in a case that the target model is a third detection model, training the target detection model based on the feature data set to obtain a tool detection model includes:
calculating a mean value and a standard deviation based on the normal morphological coefficient of the normal sample data;
calculating a fourth monitoring grade according to the mean value and the standard deviation;
and training the fourth detection model according to the fourth monitoring grade and the feature database to obtain a fourth tool detection model.
In a second aspect, an embodiment of the present invention further provides a method for detecting a tool anomaly, where the method includes:
carrying out feature extraction on tool data to be detected to obtain target feature data;
determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
inputting the tool data to be detected into a trained target detection model, and outputting a recognition result, wherein the recognition result is used for indicating whether the tool data to be detected is abnormal data.
In a third aspect, an embodiment of the present invention further provides a detection model training apparatus, where the apparatus includes:
the acquisition module is used for acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of the cutter, and the sample data comprises normal sample data and abnormal sample data;
the generating module is used for generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data, and the characteristic data is used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data;
the determining module is used for determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and the training module is used for training the target detection model based on the characteristic data set to obtain a cutter detection model.
In a fourth aspect, an embodiment of the present invention further provides an apparatus for detecting a tool anomaly, where the apparatus includes:
the extraction module is used for extracting the characteristics of the tool data to be detected to obtain target characteristic data;
the model confirmation module is used for determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and the output module is used for inputting the cutter data to be detected into the trained target detection model and outputting a recognition result, wherein the recognition result is used for indicating whether the cutter data to be detected is abnormal data.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and a processor configured to implement the method for training a detection model according to any one of the first aspect or the method for detecting a tool anomaly according to the second aspect when executing a program stored in the memory.
In a sixth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for training a detection model according to any one of the first aspect or the method for detecting a tool anomaly according to the second aspect.
The invention provides a detection model training method, a detection model training device and related equipment, wherein the method comprises the following steps: acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of a cutter, and the sample data comprises normal sample data and abnormal sample data; generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data which are used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data; determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes; and training the target detection model based on the characteristic data set to obtain a tool detection model. According to the method, a large amount of sample data of the cutter is obtained, the sample data is subjected to label classification and then feature extraction, and the extracted features are matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect of the cutter is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below.
Fig. 1 is a schematic flowchart of a detection model training method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for detecting tool anomalies according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a detection model training apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for detecting tool anomalies according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but could have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, or elements, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, the first speed difference may be referred to as a second speed difference, and similarly, the second speed difference may be referred to as a first speed difference, without departing from the scope of the present application. The first speed difference value and the second speed difference value are both speed difference values, but they are not the same speed difference value. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
The embodiment of the application provides a detection model training method, which comprises the following steps:
101, obtaining a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of the cutter, and the sample data comprises normal sample data and abnormal sample data.
In this embodiment, the training data set includes a plurality of sample data, where the sample data is obtained by sampling the tool through a plurality of sampling points in the tool operation process, and specifically, the sample data includes normal sample data and abnormal sample data, where the normal sample data refers to data generated by normal operation of the tool, and the abnormal sample data refers to data generated when the tool has a problem in operation.
In this embodiment, the training data set may be a sample library, and a plurality of sample data are stored in the sample library.
And 102, generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data, and the characteristic data is used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data.
In this embodiment, feature data is obtained by performing feature extraction and analysis on the obtained sample data, where the feature data reflects relevant attribute features of the tool. For example, the attribute feature includes, but is not limited to, a distance coefficient, a correlation coefficient, and the like of the sample data, and is not specifically limited in this embodiment.
In this embodiment, the feature data set may be a feature database, and a plurality of feature data are stored in the feature database.
103, determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes.
In this embodiment, the model library includes a plurality of detection models, and in this embodiment, 4 detection models are taken as an example for description, and are respectively an ECM monitoring model, a PCM monitoring model, an EIM monitoring model, and a CSM monitoring model. For different models, sample data to be trained is different, when the sample data is acquired, the detection model to which the sample data belongs is judged according to the detection condition, and then the detection model is trained, it should be noted that the detection condition in this embodiment may be determined by the type of the tool, the attribute of the tool, and the like.
And 140, training the target detection model based on the characteristic data set to obtain a tool detection model.
In this embodiment, the plurality of detection models are trained through the feature data sets, when the number of the feature data sets is large, the plurality of detection models can be trained respectively, and after the plurality of detection models are trained, when tool data is input, whether the tool data is normal data can be judged.
The invention provides a detection model training method, which comprises the following steps: acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of a cutter, and the sample data comprises normal sample data and abnormal sample data; generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data which is used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data; determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes; and training the target detection model based on the characteristic data set to obtain a tool detection model. According to the method, a large amount of sample data of the cutter is obtained, the sample data is subjected to label classification and then feature extraction, and the extracted features are matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect of the cutter is improved.
Optionally, the acquiring a training data set includes:
collecting sample data of the cutter in the operation process of the cutter;
calculating a first curve of cutter sample data, wherein the first curve is used for indicating a main motor load value when the cutter runs in a no-load mode;
determining a second curve, a third curve and a fourth curve according to the first curve, wherein the second curve is a reference curve of the cutter, the third curve is a boundary curve of the cutter, and the fourth curve is a minimum value curve in the cutter sample data;
generating normal sample data or abnormal sample data based on the first curve, the second curve, the third curve and the fourth curve;
and generating a training data set according to the normal sample data and/or the abnormal sample data.
Optionally, the determining a second curve, a third curve and a fourth curve according to the first curve includes:
splitting the first curve into M samples in a processing period, and performing weighting calculation according to the M samples and the N sampling points to obtain a second curve, wherein the first curve consists of the M samples;
calculating mean differences of the M samples and the second curve based on each sampling point, calculating mean values and standard deviations according to the mean differences, and generating a third curve based on the mean values and the standard deviations;
a minimum sample is determined among the M samples, and a fourth curve is generated based on the minimum sample.
In this embodiment, the collected sample data (data without tag) is first stored in the sample database. In the system initialization stage, a first curve, namely a no-load curve (the no-load curve is a sample curve when a cutter does not contact a workpiece to be processed and can simulate a data curve when the cutter is broken) is collected once and stored in a sample library, in addition, in the system initialization stage, the first batch of label-free samples are executed once when products are deployed, the subsequent process is started, the system initialization step is completed, and the initialization results of sample labels and monitoring model parameters are output.
Calculating a second curve, wherein the second curve is a reference curve base _ line of the sample, and the calculating method comprises the following steps: assuming that a processing cycle is T, each Sample data is Sample _ datai, and m samples are total, the Sample data is matrix { (SL 11, SL12, SL13, …, SL 14), (SL 21, SL22, SL23, …, SL2 n), …, (SLm 1, SLm2, SLm3, …, SLmn) }, where n is the number of data sampling points in one processing cycle,
Figure BDA0003994040140000091
note: when the process is an initialization process, the data entering the step is the first batch of unlabeled sample data).
And calculating a third curve, wherein the third curve is a boundary curve border _ line of the sample, and the calculation method comprises the following steps: calculating the average value difference of each sampling point between each sample curve and the reference curve, wherein the formula is as follows: d ij =SL ijj Wherein: i is an e [1,m],j∈[1,n](ii) a Calculating the average sum of the average differences
Figure BDA0003994040140000092
m is the number of samples; calculating a boundary curve, and the formula is as follows: border = μ dj ±Zσ djj Wherein: j is an element [1,n]And Z is set to be 6 and can be adjusted according to actual conditions.
Calculating a fourth curve which is a minimum curve min _ line and storing the fourth curve in a sample library, wherein the calculation method comprises the following steps: and calculating the minimum value of each sampling point in the processing period.
It should be noted that the anomaly detection module performs anomaly monitoring by using a system initialization result, and updates a monitoring result to a sample label; the labeled samples are used to recalculate and update the reference curve and the sample boundary curve. The update mechanism of this step is as follows: after the system is initialized, updating for the first time and executing; the updating period can be adjusted according to the actual situation by adopting timing updating or according to the sample size at the later stage, and the system has no mandatory requirement on the updating mechanism.
Optionally, generating a feature data set based on the sample data includes:
calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient, wherein the first distance coefficient is a distance coefficient between the first curve and the second curve, and the second distance coefficient is a 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 characteristic data set according to the characteristic data.
Optionally, the calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient includes:
calculating the mean value, the maximum value, the minimum value and the median of each sample in the training data set, and generating data distribution characteristics based on the mean value, the maximum value, the minimum value and the median;
calculating a correlation coefficient corresponding to each sample based on the first curve and the second curve, wherein the correlation coefficient comprises a negative form coefficient and a positive form coefficient, and the negative form coefficient and the positive form coefficient are used for indicating the correlation degree between the first curve and the second curve of each sample;
and calculating the first distance coefficient and the second distance coefficient by using a mean value calculation mode.
In the embodiment, the tool machining type is a configuration feature, and is directly stored in the feature library during configuration. And then sequentially calculating the mean value, the maximum value, the minimum value and the median of each sample to form data distribution characteristics. And (3) calculating a correlation coefficient of each sample and the reference curve (a Pearson correlation coefficient can be adopted, and a calculation method for adjusting the correlation coefficient according to the data characteristics in practical application) to obtain a positive form coefficient. And calculating the correlation coefficient of each sample curve and the no-load curve to obtain a negative form coefficient. The positive form factor and the negative form factor form a curve form characteristic. Calculating a first distance coefficient between the no-load curve and the reference curve, namely a distance coefficient xecm, and calculating the following formula:
xecm = (csecm-nsecm)/csecm, wherein csecm is the mean value of a reference curve in a machining cycle, and nsecm is the mean value of a no-load curve in the machining cycle.
And calculating a second distance coefficient between the no-load curve and the reference curve, namely a limit distance coefficient xpcml, wherein the calculation formula is as follows: xpml = (cspcml-nspcml)/cspcml, where cspcml is the minimum value of the reference curve during the process cycle and nspcml is the minimum value of the no-load curve during the process cycle.
And calculating a form coefficient between the no-load curve and the reference curve, namely corr _ border _ base, wherein Pearson correlation coefficient calculation is adopted, and the calculation method can be adjusted according to the data characteristics in practical application.
And calculating the proportion of points of the boundary curve which are larger than the unloaded curve to the number of points in the whole processing period, and naming the points as r _ border _ idle. And calculating the proportion of points of the boundary curve which are larger than the minimum curve to the number of points in the whole processing period, and naming the proportion as r _ border _ min.
In this embodiment, the feature data is generated based on the data distribution feature, the negative form factor, the positive form factor, the first distance factor, and the second distance factor.
The characteristic result is stored in a characteristic library, the characteristic library of the system comprises a reference characteristic library and a sample characteristic library, and specific descriptions of various characteristics are shown in a table 1:
Figure BDA0003994040140000111
Figure BDA0003994040140000121
TABLE 1
Optionally, the determining a corresponding target detection model in at least two detection models based on each feature data includes:
determining the target detection model as a first detection model under the condition that the type of the cutter is a tapping cutter;
determining the target detection model as a second detection model if the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3;
determining the target detection model as a third detection model if the correlation coefficient is greater than 2;
and under the condition that a first proportion is larger than a second proportion, determining the target detection model as a fourth detection model, wherein the first proportion is the proportion of points of which the third curve is larger than the first curve to the number of points in the whole machining period, and the second proportion is the proportion of points of which the third curve is larger than the fourth curve to the number of points in the whole machining period.
In the embodiment, whether the machining type is a tapping cutter is judged, if yes, a PCM monitoring model is selected, and if not, the next step is carried out; and judging whether xecm is larger than a threshold value 1, if so, selecting an ECM monitoring model, and otherwise, entering the next step. The value of the threshold value 1 is (0,1), and can be set to 0.4 according to experience and adjusted according to actual conditions; and judging whether the corr _ border _ base is larger than a threshold value 2, if so, selecting a CSM monitoring model, and otherwise, entering the next step. Wherein, the threshold 2 is between [ -1, 1], the threshold 2 can be set to 0.7 according to experience, and can be adjusted according to actual conditions; and judging whether the distance coefficient xecm _ border of the boundary curve is larger than a threshold value 3, if so, selecting an ECM monitoring algorithm, and otherwise, entering the next step. The threshold value 3 is (0,1), can be set to 0.01 according to experience, and can be adjusted according to actual conditions; and judging whether r _ border _ idle is larger than r _ border _ min, if so, selecting the EIM monitoring model, and otherwise, entering the next step. If the conditions are not met, no matching model exists, and the cutter does not meet abnormal monitoring conditions.
Optionally, when the target model is the first detection model, the training the target detection model based on the feature data set to obtain the tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a first upper boundary and a first lower boundary of a first monitoring boundary according to the monitoring grade coefficient and the first distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a first monitoring level according to the first upper boundary and the first lower boundary;
and training the first detection model according to the first monitoring grade and the feature database to obtain a first tool detection model.
In this embodiment, when the target model is the first detection model, the corresponding relationship between monitoring level coefficients yecm, yecm and xecm is calculated as shown in table 2 below:
xecm 0.01<xecm<0.3 0.3≤xecm<0.5 0.5≤xecm
yecm 0.1 0.15 0.2
TABLE 2
Calculating a monitoring boundary:
and (3) calculating an upper boundary:
Figure BDA0003994040140000131
lower bound calculation:
Figure BDA0003994040140000132
the monitoring grades are 100 grades, the maximum and minimum of the grades are as above, and the intermediate grade is linearly calculated.
Initializing a monitoring level:
upper bound level initialization
Substituting the maximum average value of the samples into formula 1 of Step2.1 to calculate and obtain ecm _ u, and selecting the minimum value larger than the ecm _ u from the ecm _ ulv _ 1-ecm _ ulv _100 as an initial upper monitoring grade;
lower boundary level initialization
And substituting the minimum average value of the samples into a formula 2 of Step2.2 to calculate and obtain ecm _ l, and selecting the maximum value smaller than the ecm _ l as the initial lower monitoring grade from ecm _ llv _1 to ecm _ llv _ 100.
Self-adaptive adjustment of monitoring level:
and updating the data after the sample label, repeating the steps and updating the monitoring level.
Optionally, in a case that the target model is a second detection model, training the target detection model based on the feature data set to obtain a tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a second upper boundary and a second lower boundary of a second monitoring boundary according to the monitoring grade coefficient and the second distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a second monitoring level according to the second upper boundary and the second lower boundary;
and training the second detection model according to the second monitoring grade and the characteristic database to obtain a second cutter detection model.
In this embodiment, when the target model is the second detection model, the corresponding relationship between the monitoring level coefficients ypcml, ypcml and xpcml is calculated as shown in table 3 below:
xpcml 0.1<xpcml<0.3 0.3≤xpcml<0.5 0.5≤xpcml
ypcml 0.1 0.15 0.2
TABLE 3
And (3) calculating a monitoring boundary:
pcm _ llv _1= cspcml-ypcml (cspcml-nspcml) formula 3
pcm _ llv _100= 95%. Nspcml equation 4
The monitoring levels are 100 levels in total, the maximum and minimum values of the levels are as above, and the intermediate levels are linearly calculated.
Initializing a monitoring level:
substituting the minimum value of the sample into a formula 3 of Step2.1 to obtain pcm _ l by calculation, and selecting the maximum value smaller than pcm _ l as an initial monitoring grade from pcm _ llv _ 1-pcm _ llv _ 100;
self-adaptive adjustment of monitoring level: and updating the data after the sample label, repeating the steps and updating the monitoring level.
Optionally, in a case that the target model is a third detection model, the training the target detection model based on the training data set and the feature data set to obtain a tool detection model includes:
calculating the load average value difference of each sampling point according to the M samples and the N sampling points;
calculating the average value and the standard deviation of each sampling point according to the load average value difference of each sampling point;
calculating a third monitoring grade according to the average value and the standard deviation;
and training the third detection model according to the third monitoring grade and the feature database to obtain a third cutter detection model.
In this embodiment, assuming that a processing cycle is T, each Sample data is Sample _ datai, and there are m samples, the main motor load values are matrices { (SL 11, SL12, SL13, …, SL 14), (SL 21, SL22, SL23, …, SL2 n), …, (SLm 1, SLm2, SLm3, …, SLmn) }, where n is the number of data sampling points in one processing cycle. The model training process is shown in fig. 2, and the model training steps are as follows:
the reference curve is set as:
Figure BDA0003994040140000151
wherein: j is an element [1,n]M is the number of samples;
and calculating the load average value difference of each sampling point, wherein the formula is as follows: d ij =SL ijj Wherein: i is an e [1,m],j∈[1,n];
Calculating the average value and the standard deviation of the load mean value difference of each sampling point, wherein the formula is as follows:
Figure BDA0003994040140000152
wherein: j is an element [1,n]M is the number of samples;
calculating a monitoring boundary, wherein the formula is as follows: border = μ dj ±Zσ djj Wherein: j is an element of [1,n]Z is 3.5 as default and can be adjusted according to actual conditions;
self-adaptive adjustment of monitoring level:
and updating the data after the sample label, repeating the steps and updating the monitoring level.
Optionally, when the target model is a third detection model, the training the target detection model based on the feature data set to obtain a tool detection model includes:
calculating a mean value and a standard deviation based on the normal morphological coefficient of the normal sample data;
calculating a fourth monitoring level according to the mean value and the standard deviation;
and training the fourth detection model according to the fourth monitoring grade and the feature database to obtain a fourth cutter detection model.
In the embodiment, a positive morphological coefficient of a sample with a positive label is extracted from a feature library; calculating the mean value and standard deviation of the positive form coefficient obtained in the step; calculating a monitoring boundary, wherein the formula is as follows: threshold (Threshold) r =μ r -Zσ r Wherein: the default of Z is 3.5, and the Z can be adjusted according to actual conditions; self-adaptive adjustment of monitoring level: and updating the data after the sample label, repeating the second step and the third step, and updating the monitoring level.
It should be noted that, after the system is initialized, the monitoring level is updated for the first time and must be executed; the updating period can be adjusted according to the actual situation by adopting timing updating or according to the sample size at the later stage, and the system has no mandatory requirement on the updating mechanism.
In another embodiment, anomaly detection may also be provided, including: a) Real-time monitoring: and detecting data generated during tool machining in real time according to the selected monitoring model and the monitoring grade, wherein the detection steps for each model are as follows:
the ECM monitoring model comprises: judging whether the average characteristic exceeds a detection boundary or not, and if so, judging that the average characteristic is abnormal;
PCM monitoring model: judging whether the minimum value characteristic exceeds a detection boundary or not, and if so, judging that the minimum value characteristic is abnormal;
EIM monitoring model: judging whether the whole data curve exceeds 30% of the detection curve (note: 30% is an empirical value and can be adjusted according to actual use conditions), and if so, judging that the data curve is abnormal;
CSM monitoring model: and judging whether the positive morphological coefficient characteristic is smaller than a detection threshold, and if so, judging that the positive morphological coefficient characteristic is abnormal.
And outputting the sample label of each sample during detection, and updating the sample library.
In another embodiment, an embodiment of the present invention further provides a method for detecting tool anomalies, where the method includes:
step 201, performing feature extraction on tool data to be detected to obtain target feature data.
Step 202, determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of a tool type and a tool attribute.
Step 203, inputting the tool data to be detected into the trained target detection model, and outputting a recognition result, wherein the recognition result is used for indicating whether the tool data to be detected is abnormal data.
In this embodiment, the target characteristic data of the tool to be detected is obtained by performing characteristic extraction on the tool data to be detected, the target characteristic data is matched with the detection model and then input into the trained model for identification, and an identification result is output, wherein the identification result is used for indicating whether the tool data to be detected is normal data or abnormal data, and when the tool data to be detected is abnormal data, a worker needs to be reminded.
The invention provides a detection model training method, which comprises the following steps: carrying out feature extraction on tool data to be detected to obtain target feature data; determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes; inputting the tool data to be detected into a trained target detection model, and outputting a recognition result, wherein the recognition result is used for indicating whether the tool data to be detected is abnormal data. According to the invention, the sample data of a large number of cutters is obtained, the label classification is carried out on the sample data, the characteristic extraction is carried out, and then the extracted characteristic is matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect on the cutters is improved.
The invention also provides a detection model training device, which comprises:
an obtaining module 310, configured to obtain a training data set, where the training data set includes sample data, where the sample data is data related to operation of a tool, and the sample data includes normal sample data and abnormal sample data;
a generating module 320, configured to generate a feature data set based on the sample data, where the feature data set includes feature data, and the feature data is used to reflect an attribute feature of tool operation corresponding to each sample data;
a determining module 330, configured to determine, based on each of the feature data, a corresponding target detection model in at least two detection models, where detection conditions corresponding to different detection models are different, where the detection conditions include at least one of a tool type and a tool attribute;
a training module 340, configured to train the target detection model based on the feature data set, so as to obtain a tool detection model.
Optionally, the acquiring the training data set includes:
collecting sample data of the cutter in the operation process of the cutter;
calculating a first curve of cutter sample data, wherein the first curve is used for indicating a main motor load value when the cutter runs in a no-load mode;
determining a second curve, a third curve and a fourth curve according to the first curve, wherein the second curve is a reference curve of the cutter, the third curve is a boundary curve of the cutter, and the fourth curve is a minimum value curve in the cutter sample data;
generating normal sample data or abnormal sample data based on the first curve, the second curve, the third curve and the fourth curve;
and generating a training data set according to the normal sample data and/or the abnormal sample data.
Optionally, the determining a second curve, a third curve and a fourth curve according to the first curve includes:
splitting the first curve into M samples in a processing period, and performing weighting calculation according to the M samples and the N sampling points to obtain a second curve, wherein the first curve consists of the M samples;
calculating mean differences of the M samples and the second curve based on each sampling point, calculating a mean and a standard deviation from the mean differences, and generating a third curve based on the mean and the standard deviation;
a minimum sample is determined among the M samples, and a fourth curve is generated based on the minimum sample.
Optionally, generating a feature data set based on the sample data includes:
calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient, wherein the first distance coefficient is a distance coefficient between the first curve and the second curve, and the second distance coefficient is a 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 characteristic data set according to the characteristic data.
Optionally, the calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient includes:
calculating the mean value, the maximum value, the minimum value and the median of each sample in the training data set, and generating data distribution characteristics based on the mean value, the maximum value, the minimum value and the median;
calculating a correlation coefficient corresponding to each sample based on the first curve and the second curve, wherein the correlation coefficient comprises a negative form coefficient and a positive form coefficient, and the negative form coefficient and the positive form coefficient are used for indicating the correlation degree between the first curve and the second curve of each sample;
and calculating the first distance coefficient and the second distance coefficient by using a mean value calculation mode.
Optionally, the 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 feature, the negative form factor, the positive form factor, the first distance factor, and the second distance factor.
Optionally, the determining a corresponding target detection model in at least two detection models based on each feature data includes:
determining the target detection model as a first detection model under the condition that the type of the cutter is a tapping cutter;
determining the target detection model as a second detection model if the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3;
determining the target detection model as a third detection model if the correlation coefficient is greater than 2;
and under the condition that a first proportion is larger than a second proportion, determining the target detection model as a fourth detection model, wherein the first proportion is the proportion of points of the third curve, which are larger than the first curve, in the number of points in the whole machining period, and the second proportion is the proportion of points of the third curve, which are larger than the fourth curve, in the number of points in the whole machining period.
Optionally, when the target model is the first detection model, the training the target detection model based on the feature data set to obtain the tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a first upper boundary and a first lower boundary of a first monitoring boundary according to the monitoring grade coefficient and the first distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a first monitoring level according to the first upper boundary and the first lower boundary;
and training the first detection model according to the first monitoring grade and the feature database to obtain a first tool detection model.
Optionally, when the target model is a second detection model, the training the target detection model based on the feature data set to obtain a tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a second upper boundary and a second lower boundary of a second monitoring boundary according to the monitoring grade coefficient and the second distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a second monitoring level according to the second upper boundary and the second lower boundary;
and training the second detection model according to the second monitoring grade and the characteristic database to obtain a second cutter detection model.
Optionally, in a case that the target model is a third detection model, the training the target detection model based on the training data set and the feature data set to obtain a tool detection model includes:
calculating the load average value difference of each sampling point according to the M samples and the N sampling points;
calculating the average value and the standard deviation of each sampling point according to the load average value difference of each sampling point;
calculating a third monitoring grade according to the average value and the standard deviation;
and training the third detection model according to the third monitoring grade and the feature database to obtain a third cutter detection model.
Optionally, in a case that the target model is a third detection model, training the target detection model based on the feature data set to obtain a tool detection model includes:
calculating a mean value and a standard deviation based on the normal morphological coefficient of the normal sample data;
calculating a fourth monitoring grade according to the mean value and the standard deviation;
and training the fourth detection model according to the fourth monitoring grade and the feature database to obtain a fourth cutter detection model.
According to the invention, the sample data of a large number of cutters is obtained, the label classification is carried out on the sample data, the characteristic extraction is carried out, and then the extracted characteristic is matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect on the cutters is improved.
The invention also provides a device for detecting the abnormity of the cutter, which comprises:
the extraction module is used for extracting the characteristics of the tool data to be detected to obtain target characteristic data;
the model confirmation module is used for determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and the output module is used for inputting the cutter data to be detected into the trained target detection model and outputting a recognition result, wherein the recognition result is used for indicating whether the cutter data to be detected is abnormal data.
According to the invention, the sample data of a large number of cutters is obtained, the label classification is carried out on the sample data, the characteristic extraction is carried out, and then the extracted characteristic is matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect on the cutters is improved.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, as shown in fig. 5, the electronic device 500 includes a memory 510 and a processor 520, the number of the processors 520 in the electronic device 500 may be one or more, and one processor 320 is taken as an example in fig. 5; the memory 510 and the processor 520 in the server may be connected by a bus or other means, and fig. 5 illustrates the connection by the bus as an example.
The memory 510 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the title generation method in the embodiment of the present invention, and the processor 520 executes various functional applications and data processing of the server/terminal/server by executing the software programs, instructions, and modules stored in the memory 510, so as to implement the above-mentioned method for detecting model training or method for detecting tool anomaly.
Wherein the processor 320 is configured to run the computer program stored in the memory 310, and implement the following steps:
acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of the cutter, and the sample data comprises normal sample data and abnormal sample data;
generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data which is used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data;
determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and training the target detection model based on the characteristic data set to obtain a tool detection model.
Optionally, the acquiring the training data set includes:
collecting sample data of the cutter in the operation process of the cutter;
calculating a first curve of tool sample data, wherein the first curve is used for indicating a main motor load value when the tool runs in a no-load mode;
determining a second curve, a third curve and a fourth curve according to the first curve, wherein the second curve is a reference curve of the cutter, the third curve is a boundary curve of the cutter, and the fourth curve is a minimum value curve in the cutter sample data;
generating normal sample data or abnormal sample data based on the first curve, the second curve, the third curve and the fourth curve;
and generating a training data set according to the normal sample data and/or the abnormal sample data.
Optionally, the determining a second curve, a third curve and a fourth curve according to the first curve includes:
splitting the first curve into M samples in a processing period, and performing weighting calculation according to the M samples and the N sampling points to obtain a second curve, wherein the first curve consists of the M samples;
calculating mean differences of the M samples and the second curve based on each sampling point, calculating mean values and standard deviations according to the mean differences, and generating a third curve based on the mean values and the standard deviations;
a minimum sample is determined among the M samples, and a fourth curve is generated based on the minimum sample.
Optionally, generating a feature data set based on the sample data includes:
calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient, wherein the first distance coefficient is a distance coefficient between the first curve and the second curve, and the second distance coefficient is a 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 characteristic data set according to the characteristic data.
Optionally, the calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient includes:
calculating the mean value, the maximum value, the minimum value and the median of each sample in the training data set, and generating data distribution characteristics based on the mean value, the maximum value, the minimum value and the median;
calculating a correlation coefficient corresponding to each sample based on the first curve and the second curve, wherein the correlation coefficient comprises a negative form coefficient and a positive form coefficient, and the negative form coefficient and the positive form coefficient are used for indicating the correlation degree between the first curve and the second curve of each sample;
and calculating the first distance coefficient and the second distance coefficient by using a mean value calculation mode.
Optionally, the 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 feature, the negative form factor, the positive form factor, the first distance factor, and the second distance factor.
Optionally, the determining a corresponding target detection model in at least two detection models based on each feature data includes:
determining the target detection model as a first detection model under the condition that the type of the cutter is a tapping cutter;
determining the target detection model as a second detection model if the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3;
determining the target detection model as a third detection model if the correlation coefficient is greater than 2;
and under the condition that a first proportion is larger than a second proportion, determining the target detection model as a fourth detection model, wherein the first proportion is the proportion of points of the third curve, which are larger than the first curve, in the number of points in the whole machining period, and the second proportion is the proportion of points of the third curve, which are larger than the fourth curve, in the number of points in the whole machining period.
Optionally, when the target model is the first detection model, the training the target detection model based on the feature data set to obtain the tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a first upper boundary and a first lower boundary of a first monitoring boundary according to the monitoring grade coefficient and the first distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a first monitoring level according to the first upper boundary and the first lower boundary;
and training the first detection model according to the first monitoring grade and the feature database to obtain a first tool detection model.
Optionally, when the target model is a second detection model, the training the target detection model based on the feature data set to obtain a tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a second upper boundary and a second lower boundary of a second monitoring boundary according to the monitoring grade coefficient and the second distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a second monitoring level according to the second upper boundary and the second lower boundary;
and training the second detection model according to the second monitoring grade and the characteristic database to obtain a second cutter detection model.
Optionally, in a case that the target model is a third detection model, the training the target detection model based on the training data set and the feature data set to obtain a tool detection model includes:
calculating the load average value difference of each sampling point according to the M samples and the N sampling points;
calculating the average value and the standard deviation of each sampling point according to the load average value difference of each sampling point;
calculating a third monitoring grade according to the average value and the standard deviation;
and training the third detection model according to the third monitoring grade and the feature database to obtain a third cutter detection model.
Optionally, in a case that the target model is a third detection model, training the target detection model based on the feature data set to obtain a tool detection model includes:
calculating a mean value and a standard deviation based on the normal morphological coefficient of the normal sample data;
calculating a fourth monitoring grade according to the mean value and the standard deviation;
and training the fourth detection model according to the fourth monitoring grade and the feature database to obtain a fourth tool detection model.
Or
Carrying out feature extraction on tool data to be detected to obtain target feature data;
determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
inputting the tool data to be detected into a trained target detection model, and outputting a recognition result, wherein the recognition result is used for indicating whether the tool data to be detected is abnormal data.
According to the invention, the sample data of a large number of cutters is obtained, the label classification is carried out on the sample data, the characteristic extraction is carried out, and then the extracted characteristic is matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect on the cutters is improved.
The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory may further include memory located remotely from the processor, which may be connected to the 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.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method of detecting model training or detecting tool anomalies, the method comprising:
acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of a cutter, and the sample data comprises normal sample data and abnormal sample data;
generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data which is used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data;
determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and training the target detection model based on the characteristic data set to obtain a tool detection model.
Optionally, the acquiring the training data set includes:
collecting sample data of the cutter in the operation process of the cutter;
calculating a first curve of tool sample data, wherein the first curve is used for indicating a main motor load value when the tool runs in a no-load mode;
determining a second curve, a third curve and a fourth curve according to the first curve, wherein the second curve is a reference curve of the cutter, the third curve is a boundary curve of the cutter, and the fourth curve is a minimum value curve in the cutter sample data;
generating normal sample data or abnormal sample data based on the first curve, the second curve, the third curve and the fourth curve;
and generating a training data set according to the normal sample data and/or the abnormal sample data.
Optionally, the determining a second curve, a third curve and a fourth curve according to the first curve includes:
splitting the first curve into M samples in a processing period, and performing weighting calculation according to the M samples and the N sampling points to obtain a second curve, wherein the first curve consists of the M samples;
calculating mean differences of the M samples and the second curve based on each sampling point, calculating mean values and standard deviations according to the mean differences, and generating a third curve based on the mean values and the standard deviations;
a minimum sample is determined among the M samples, and a fourth curve is generated based on the minimum sample.
Optionally, generating a feature data set based on the sample data includes:
calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient, wherein the first distance coefficient is a distance coefficient between the first curve and the second curve, and the second distance coefficient is a 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 characteristic data set according to the characteristic data.
Optionally, the calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient includes:
calculating the mean value, the maximum value, the minimum value and the median of each sample in the training data set, and generating data distribution characteristics based on the mean value, the maximum value, the minimum value and the median;
calculating a correlation coefficient corresponding to each sample based on the first curve and the second curve, wherein the correlation coefficient comprises a negative form coefficient and a positive form coefficient, and the negative form coefficient and the positive form coefficient are used for indicating the correlation degree between the first curve and the second curve of each sample;
and calculating the first distance coefficient and the second distance coefficient by using a mean value calculation mode.
Optionally, the 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 feature, the negative form factor, the positive form factor, the first distance factor, and the second distance factor.
Optionally, the determining a corresponding target detection model in at least two detection models based on each feature data includes:
determining the target detection model as a first detection model under the condition that the type of the cutter is a tapping cutter;
determining the target detection model as a second detection model if the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3;
determining the target detection model as a third detection model if the correlation coefficient is greater than 2;
and under the condition that a first proportion is larger than a second proportion, determining the target detection model as a fourth detection model, wherein the first proportion is the proportion of points of which the third curve is larger than the first curve to the number of points in the whole machining period, and the second proportion is the proportion of points of which the third curve is larger than the fourth curve to the number of points in the whole machining period.
Optionally, when the target model is the first detection model, the training the target detection model based on the feature data set to obtain the tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a first upper boundary and a first lower boundary of a first monitoring boundary according to the monitoring grade coefficient and the first distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a first monitoring level according to the first upper boundary and the first lower boundary;
and training the first detection model according to the first monitoring grade and the feature database to obtain a first tool detection model.
Optionally, in a case that the target model is a second detection model, training the target detection model based on the feature data set to obtain a tool detection model includes:
acquiring a monitoring grade coefficient, and calculating a second upper boundary and a second lower boundary of a second monitoring boundary according to the monitoring grade coefficient and the second distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a second monitoring level according to the second upper boundary and the second lower boundary;
and training the second detection model according to the second monitoring grade and the characteristic database to obtain a second cutter detection model.
Optionally, in a case that the target model is a third detection model, the training the target detection model based on the training data set and the feature data set to obtain a tool detection model includes:
calculating the load average value difference of each sampling point according to the M samples and the N sampling points;
calculating the average value and the standard deviation of each sampling point according to the load average value difference of each sampling point;
calculating a third monitoring grade according to the average value and the standard deviation;
and training the third detection model according to the third monitoring grade and the feature database to obtain a third cutter detection model.
Optionally, in a case that the target model is a third detection model, training the target detection model based on the feature data set to obtain a tool detection model includes:
calculating a mean value and a standard deviation based on the normal morphological coefficient of the normal sample data;
calculating a fourth monitoring level according to the mean value and the standard deviation;
and training the fourth detection model according to the fourth monitoring grade and the feature database to obtain a fourth cutter detection model.
Or
Carrying out feature extraction on tool data to be detected to obtain target feature data;
determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of cutter type and cutter attribute;
inputting the tool data to be detected into a trained target detection model, and outputting a recognition result, wherein the recognition result is used for indicating whether the tool data to be detected is abnormal data.
Of course, the storage medium provided by the embodiment of the present invention includes computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in a title generation method provided by any embodiment of the present invention.
According to the method, a large amount of sample data of the cutter is obtained, the sample data is subjected to label classification and then feature extraction, and the extracted features are matched with at least two detection models to determine the target detection model, so that the determined target detection model is trained, and the detection effect of the cutter is improved.
The computer-readable storage media of embodiments of the invention may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (16)

1. A method for training a test model, the method comprising:
acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of the cutter, and the sample data comprises normal sample data and abnormal sample data;
generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data which are used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data;
determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and training the target detection model based on the characteristic data set to obtain a tool detection model.
2. The method of claim 1, wherein the obtaining a training data set comprises:
collecting sample data of the cutter in the operation process of the cutter;
calculating a first curve of tool sample data, wherein the first curve is used for indicating a main motor load value when the tool runs in a no-load mode;
determining a second curve, a third curve and a fourth curve according to the first curve, wherein the second curve is a reference curve of the cutter, the third curve is a boundary curve of the cutter, and the fourth curve is a minimum value curve in the cutter sample data;
generating normal sample data or abnormal sample data based on the first curve, the second curve, the third curve and the fourth curve;
and generating a training data set according to the normal sample data and/or the abnormal sample data.
3. The method of claim 2, wherein determining a second curve, a third curve, and a fourth curve from the first curve comprises:
splitting the first curve into M samples in a processing period, and performing weighting calculation according to the M samples and the N sampling points to obtain a second curve, wherein the first curve consists of the M samples;
calculating mean differences of the M samples and the second curve based on each sampling point, calculating a mean and a standard deviation from the mean differences, and generating a third curve based on the mean and the standard deviation;
a minimum sample is determined among the M samples, and a fourth curve is generated based on the minimum sample.
4. A method according to claim 3, wherein generating a feature data set based on the sample data comprises:
calculating according to the first curve and the second curve to obtain a first distance coefficient and a second distance coefficient, wherein the first distance coefficient is a distance coefficient between the first curve and the second curve, and the second distance coefficient is a 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 characteristic data set according to the characteristic data.
5. The method of claim 4, wherein said calculating from said first curve and said second curve to obtain a first distance coefficient and a second distance coefficient comprises:
calculating the mean value, the maximum value, the minimum value and the median of each sample in the training data set, and generating data distribution characteristics based on the mean value, the maximum value, the minimum value and the median;
calculating a correlation coefficient corresponding to each sample based on the first curve and the second curve, wherein the correlation coefficient comprises a negative form coefficient and a positive form coefficient, and the negative form coefficient and the positive form coefficient are used for indicating the correlation degree between the first curve and the second curve of each sample;
and calculating the first distance coefficient and the second distance coefficient by using a mean value calculation mode.
6. The method of claim 5, wherein generating feature data based on the first distance coefficient, the second distance coefficient, and the type of the tool comprises:
generating feature data based on the data distribution feature, the negative form factor, the positive form factor, the first distance factor, and the second distance factor.
7. The method of claim 5, wherein said determining a corresponding object detection model among at least two detection models based on each of said feature data comprises:
determining the target detection model as a first detection model under the condition that the type of the cutter is a tapping cutter;
determining the target detection model as a second detection model if the first distance coefficient is greater than 1 or the second distance coefficient is greater than 3;
determining the target detection model as a third detection model if the correlation coefficient is greater than 2;
and under the condition that a first proportion is larger than a second proportion, determining the target detection model as a fourth detection model, wherein the first proportion is the proportion of points of the third curve, which are larger than the first curve, in the number of points in the whole machining period, and the second proportion is the proportion of points of the third curve, which are larger than the fourth curve, in the number of points in the whole machining period.
8. The method according to claim 7, wherein in a case that the target model is a first detection model, the training the target detection model based on the feature data set to obtain a tool detection model comprises:
acquiring a monitoring grade coefficient, and calculating a first upper boundary and a first lower boundary of a first monitoring boundary according to the monitoring grade coefficient and the first distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a first monitoring level according to the first upper boundary and the first lower boundary;
and training the first detection model according to the first monitoring grade and the feature database to obtain a first tool detection model.
9. The method of claim 7, wherein in the case that the target model is a second detection model, the training the target detection model based on the feature data set to obtain a tool detection model comprises:
acquiring a monitoring grade coefficient, and calculating a second upper boundary and a second lower boundary of a second monitoring boundary according to the monitoring grade coefficient and the second distance coefficient, wherein the monitoring grade coefficient is used for determining the monitoring degree of the cutter;
calculating a second monitoring level according to the second upper boundary and the second lower boundary;
and training the second detection model according to the second monitoring grade and the characteristic database to obtain a second cutter detection model.
10. The method of claim 7, wherein in the case that the target model is a third detection model, the training the target detection model based on the training data set and the feature data set to obtain a tool detection model comprises:
calculating the load average value difference of each sampling point according to the M samples and the N sampling points;
calculating the average value and the standard deviation of each sampling point according to the load average value difference of each sampling point;
calculating a third monitoring grade according to the average value and the standard deviation;
and training the third detection model according to the third monitoring grade and the feature database to obtain a third cutter detection model.
11. The method of claim 7, wherein in the case that the target model is a third detection model, the training the target detection model based on the feature data set to obtain a tool detection model comprises:
calculating a mean value and a standard deviation based on the normal morphological coefficient of the normal sample data;
calculating a fourth monitoring grade according to the mean value and the standard deviation;
and training the fourth detection model according to the fourth monitoring grade and the feature database to obtain a fourth tool detection model.
12. A method of detecting tool anomalies, the method comprising:
carrying out feature extraction on tool data to be detected to obtain target feature data;
determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
inputting the tool data to be detected into a trained target detection model, and outputting a recognition result, wherein the recognition result is used for indicating whether the tool data to be detected is abnormal data.
13. A test pattern training apparatus, comprising:
the acquisition module is used for acquiring a training data set, wherein the training data set comprises sample data, the sample data is related to the operation of the cutter, and the sample data comprises normal sample data and abnormal sample data;
the generating module is used for generating a characteristic data set based on the sample data, wherein the characteristic data set comprises characteristic data, and the characteristic data is used for reflecting the attribute characteristics of the operation of the cutter corresponding to each sample data;
the determining module is used for determining a corresponding target detection model in at least two detection models based on each feature data, wherein detection conditions corresponding to different detection models in the at least two detection models are different, and the detection conditions comprise at least one of tool types and tool attributes;
and the training module is used for training the target detection model based on the characteristic data set to obtain a cutter detection model.
14. An apparatus for detecting tool anomalies, the apparatus comprising:
the extraction module is used for extracting the characteristics of the cutter data to be detected to obtain target characteristic data;
the model confirmation module is used for determining a corresponding target detection model in at least two detection models according to the target characteristic data, wherein detection conditions corresponding to different detection models are different in the at least two detection models, and the detection conditions comprise at least one of tool types and tool attributes;
and the output module is used for inputting the cutter data to be detected into the trained target detection model and outputting a recognition result, wherein the recognition result is used for indicating whether the cutter data to be detected is abnormal data.
15. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method for training a detection model according to any one of claims 1 to 11 or the method for detecting a tool anomaly according to claim 12 when executing a program stored in a memory.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method for detection model training according to any one of claims 1 to 11, or carries out the method for detection of tool anomalies according to claim 12.
CN202211597852.4A 2022-12-12 2022-12-12 Detection model training method and device and related equipment Pending CN115935166A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211597852.4A CN115935166A (en) 2022-12-12 2022-12-12 Detection model training method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211597852.4A CN115935166A (en) 2022-12-12 2022-12-12 Detection model training method and device and related equipment

Publications (1)

Publication Number Publication Date
CN115935166A true CN115935166A (en) 2023-04-07

Family

ID=86700486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211597852.4A Pending CN115935166A (en) 2022-12-12 2022-12-12 Detection model training method and device and related equipment

Country Status (1)

Country Link
CN (1) CN115935166A (en)

Similar Documents

Publication Publication Date Title
CN112631240A (en) Spacecraft fault active detection method and device
CN112966879A (en) Environmental test chamber fault prediction method and device, computer equipment and storage medium
CN111177655B (en) Data processing method and device and electronic equipment
CN112419268A (en) Method, device, equipment and medium for detecting image defects of power transmission line
CN115204536A (en) Building equipment fault prediction method, device, equipment and storage medium
CN114360581A (en) Method and device for identifying equipment fault and electronic equipment
CN115793590A (en) Data processing method and platform suitable for system safety operation and maintenance
CN113487223B (en) Risk assessment method and system based on information fusion
CN112363465B (en) Expert rule set training method, trainer and industrial equipment early warning system
CN115984158A (en) Defect analysis method and device, electronic equipment and computer readable storage medium
CN112183555B (en) Method and system for detecting welding quality, electronic device and storage medium
CN112785556A (en) Reinspection method, reinspection device, electronic equipment and computer-readable storage medium
CN111062827B (en) Engineering supervision method based on artificial intelligence mode
CN113033639A (en) Training method of abnormal data detection model, electronic device and storage medium
CN112884018A (en) Power grid line fault recognition model training method and power grid line inspection method
CN110704614B (en) Information processing method and device for predicting user group type in application
CN115935166A (en) Detection model training method and device and related equipment
CN113469237B (en) User intention recognition method, device, electronic equipment and storage medium
CN114155412A (en) Deep learning model iteration method, device, equipment and storage medium
CN114077663A (en) Application log analysis method and device
CN113139332A (en) Automatic model construction method, device and equipment
CN112579429A (en) Problem positioning method and device
CN114821327B (en) Method and system for extracting and processing characteristics of power line and tower and storage medium
CN109800923A (en) distributed wind power generation short-term power combination prediction method
CN116911852B (en) RPA user dynamic information monitoring method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination