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 only a part of the embodiments of the present application, and not all of the embodiments. 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.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. When an element is referred to as being "disposed on" another element, it can be directly on the other element or intervening elements may also be present.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In the prior art, the health state of the dispensing equipment is usually diagnosed by manually setting a normal dispensing amount range, tracing whether dispensing abnormality occurs or not through the quality of a workpiece after dispensing, and notifying a maintenance worker to maintain the dispensing equipment if the quality of the workpiece is poor. The mode of monitoring after damage is often to monitor after finding defective products, which causes great loss.
The above prior art has at least the following problems: the normal range of the dispensing amount control is set by practitioners with abundant experience, and because the experience of each practitioner is inconsistent, a uniform range standard is not easy to form, and the normal range or the early warning range of dispensing is not easy to set. Moreover, the existing dispensing equipment gives an alarm or a rear-end detector finds a problem, and usually, when the operating dispensing amount exceeds or is smaller than a normal range and causes an abnormality, the dispensing equipment has been operated for a period of time, so that many defective products are generated, even the performance of the dispensing equipment is damaged, and the service life of the dispensing equipment is shortened.
An embodiment of the present application provides a training method, including:
obtaining historical data formed by the historical operation of the glue dispensing equipment, wherein the historical data comprises characteristic information and a rotating speed corresponding to the characteristic information, the characteristic information comprises at least one of voltage, current and load, the voltage and the current are the voltage and the current loaded on the glue dispensing equipment, the load comprises a load set when the glue dispensing equipment operates, and the rotating speed comprises the rotating speed of a glue outlet control assembly on the glue dispensing equipment;
splitting the historical data to form a training sample and a verification sample, wherein the training sample is a set of a first part of the characteristic information and the corresponding rotating speed, and the verification sample is a set of a second part of the characteristic information and the corresponding rotating speed;
training a preset basic model according to the training sample to obtain a basic training model;
inputting a verification sample to a basic training model, and determining verification parameters;
determining that the verification parameters meet preset requirements;
and determining a diagnosis model based on the verification parameters meeting the preset requirements.
An embodiment of the present application further provides an electronic device, which includes a processor and a storage medium, where the storage medium includes readable instructions, and the readable instructions are used for being executed by the processor to perform the training method.
The application provides a training method of a diagnosis model and an electronic device executing the training method, historical data formed in the dispensing process of dispensing equipment is trained to form the diagnosis model, and then early warning rotating speed or an early warning interval can be obtained through the diagnosis model, a solution for training the diagnosis model is provided, the formation of an early warning range is enabled to depend on big data information more, the working experience of non-personnel is avoided, the automation and the intellectualization of a factory are facilitated, the popularization of different dispensing equipment can be realized, and the real-time monitoring of the dispensing equipment can be realized.
An embodiment of the present application provides an apparatus health diagnosis method, which is used for determining a health state of a dispensing apparatus, and includes:
receiving operation data of the dispensing equipment, wherein the operation data comprises characteristic information and a rotating speed corresponding to the characteristic information, the characteristic information comprises at least one of voltage, current and load, the voltage and the current are the voltage and the current loaded on the dispensing equipment, the load comprises a load set when the dispensing equipment operates, and the rotating speed comprises the rotating speed of a glue outlet control assembly on the dispensing equipment;
inputting the characteristic information to a diagnosis model to obtain an early warning rotating speed, wherein the diagnosis model is obtained based on historical data training of the dispensing equipment;
and determining the health state of the dispensing equipment according to the early warning rotating speed and the rotating speed.
The application provides an equipment health diagnosis method and an equipment health diagnosis device, wherein operation data of dispensing equipment are input into a trained diagnosis model to form an early warning rotating speed or an early warning interval, the acquired rotating speed and the early warning rotating speed or the early warning interval are compared to determine the health state of the dispensing equipment, if the health state of the dispensing equipment is to be damaged, personnel are informed to stop the machine or automatically adjust the machine, and the generation of defective products caused by the fact that early warning cannot be performed can be avoided.
The embodiments of the present application will be further described with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present application provides a method for training a diagnostic model, including:
in some embodiments, the dispensing apparatus is exemplified as a dispensing apparatus employing an AB-type glue. The AB type glue, also called as two-component glue, is widely used for filling and sealing products due to its excellent bonding strength and good storage performance. The dispensing equipment controls the dispensing of glue through an A/B valve, and is a key part of the dispensing equipment. When the screw of the A/B valve breaks down, the dispensing flow rate is abnormal, the dispensing mixing ratio is different from the set ratio, and defective products are generated. Based on this, through the technical scheme of some embodiments of this application, realize the rotational speed of real-time diagnosis screw rod, and then diagnose the health status of A/B valve and even some adhesive deposite equipment, reduce because of the screw rod unusual leads to the emergence of processingquality is bad to avoid the untimely problem of early warning.
And S110, obtaining historical data formed by the historical operation of the dispensing equipment.
Referring to fig. 2, the dispensing apparatus 100 outputs the glue 10 by inputting a set current and voltage, so as to perform a dispensing operation on the workpiece 20, and the glue discharging control component 30 (e.g., a screw) for producing the glue 10 reaches a corresponding rotation speed. The historical data refers to operation data of the dispensing apparatus 100 at a predetermined period of time or at a plurality of different time points in the past, and the operation data includes characteristic information and a rotation speed corresponding to the characteristic information. The characteristic information includes at least one of a voltage, a current, and a load, where the voltage and the current are input current and input voltage of the dispensing apparatus 100, the load may include a set of loads when the dispensing apparatus 100 operates, and the rotation speed includes a rotation speed of the dispensing control component 30 (e.g., a screw) on the dispensing apparatus 100.
Referring to fig. 3, in some embodiments, before the steps of forming the training sample and verifying the training sample, the training method further includes:
s111a, forming any quartile of voltage, current, load and rotating speed based on historical data;
s112b, determining abnormal values in the historical data according to the quartile and the preset proportion;
and S113c, removing abnormal values in the historical data.
After obtaining historical data formed by the historical operation of the dispensing equipment, removing abnormal values in the historical data by a quartile bit difference method so as to keep parameter data when the dispensing equipment normally operates.
Taking the voltage in the history data as an example, please refer to fig. 4, a first quartile Q1, a third quartile Q3, and a quartile distance IQR in the voltage in the history data are calculated, the quartile distance IQR is located between the first quartile Q1 and the third quartile Q3, the proportion corresponding to the quartile distance IQR is 50%, and the voltage exceeding the range from Q1-1.5 IQR to Q3+1.5 IQR is an abnormal value.
In other embodiments, referring to fig. 5, after the steps of forming the training sample and verifying the sample, the training method further comprises:
s111d, forming a quartile of any voltage, current, load and rotating speed based on the training sample and the verification sample;
s112e, determining abnormal values in the training sample and the verification sample according to the quartile and the preset proportion;
and S113f, removing abnormal values in the training samples and the verification samples.
After the training sample and the verification sample are formed, abnormal values in the training sample and the verification sample are removed through a quartile difference method, so that parameter data of the dispensing equipment in normal operation are reserved.
The act of culling outliers may be provided after splitting the historical data.
Taking the voltages in the training samples as an example, please continue to refer to fig. 4, a first quartile Q1, a third quartile Q3, and a quartile range IQR are calculated, where the quartile range IQR is located between the first quartile Q1 and the third quartile Q3, the proportion of the quartile range IQR is 50%, and the voltages exceeding the range of Q1-1.5 IQR to Q3+1.5 IQR are abnormal values.
In some embodiments, referring to fig. 6, the training method further includes:
s114, determining the mean value and the standard deviation of the characteristic information;
and S115, standardizing the characteristic information according to the mean value and the standard deviation.
In some embodiments, the normalized feature information overrides the non-normalized feature information portion of the historical data, and subsequent processing is performed on the historical data after passing the processing.
Wherein the characteristic information in the historical data can be normalized by Z-Score to improve the generalization capability of the model, for example, changing the mean to 0 and the variance to 1.
In some embodiments, the feature information in the training samples and the validation samples may be normalized after forming the training samples and the validation samples and rejecting outliers in the training samples and the validation samples, thereby improving the generalization capability of the model.
Please refer to fig. 1 again:
and S120, splitting the historical data to form a training sample and a verification sample.
The historical data is divided into a first part and a second part, the training sample is a set of the first part characteristic information and the corresponding rotating speed, and the verification sample is a set of the second part characteristic information and the corresponding rotating speed. For example, if the history data includes a load (5,7,9) and a corresponding rotation speed (100,105,120), one of the forming methods is: the training samples (5,100) and (7,105) and the verification sample (9,120) are used to complete the splitting.
Referring to fig. 7, in some embodiments, the step of splitting the historical data, forming training samples and verifying samples includes:
s121, randomly splitting historical data into N samples, wherein N is an integer and is more than 1;
illustratively, the historical data is randomly split into N samples, where N may be 2, 3, 4, 5, 6 …, and N is an integer and greater than 1.
S122, randomly selecting N-1 samples to form training samples, and forming the remaining 1 sample into a verification sample.
Illustratively, the model is trained by randomly selecting N-1 samples from N samples as training samples. The remaining 1 sample was selected as the validation sample to test the trained model. For example, N is 10, and 1 st, 2 nd, 3 rd, 4 th, 5 th, 6 th, 7 th, 8 th, 9 th samples are selected as training samples, and 10 th samples are selected as verification samples; or selecting 1 st, 2 nd, 3 rd, 4 th, 6 th, 7 th, 8 th, 9 th and 10 th samples as training samples and 5 th samples as verification samples; by analogy, 10 groups of training samples and verification samples can be obtained, and 10 times of iterative training can be performed on the model. Therefore, the accuracy of training the sample and verifying the sample training model is improved.
A plurality of groups of training samples and verification samples with different sample numbers can be formed for iterative training, so that the accuracy of the model is improved.
And S130, training a preset basic model according to the training samples to obtain a basic training model.
The preset basic model can be trained through the XGBOOST machine learning algorithm, so that a basic training model is obtained. The XGB OST machine learning algorithm has the advantages that data does not need to be carefully normalized, discrete characteristic continuous characteristics can be used by being randomly mixed, and a neural network needs to be finely designed and can accept missing data. It will be appreciated that, on small and medium datasets, the integrated tree model is preferred. The neural network is recommended on a large data set, and the neural network model is preferentially used for data with higher structuralization, particularly voice, pictures and languages. The rotation speed data sequence belongs to the characteristic of a small data set, accords with the input condition of the XGboost, combines the characteristic that the XGboost can self-learn and accurately judge the discrete value, and is suitable for the dispensing scene.
Wherein the input is a training sample I { (x, y)1),(x2,y2),...(xm,ym) The method comprises the following steps of }, the maximum iteration time T, a loss function L and regularization coefficients lambda and gamma;
the output is a strong learner f (x);
for the iteration round number T ═ 1,2.. T there are:
a. calculate the ith sample (i-1, 2.. m) at the current wheel loss function L based on f
t-1(x
i) First derivative g
tiAnd second derivative h
tiCalculate the first derivative sum of all samples
And the second derivative sum
b. The decision tree is split based on the current node attempt, the default score is 0, and G and H are the sum of the first-order and second-order derivatives of the current node needing splitting;
for the feature number K1, 2.. K:
GL=0,HL=0
arranging the samples from small to large according to the characteristic k, sequentially taking out the ith sample, and sequentially calculating the sum of first-order and second-order derivatives of the left subtree and the right subtree after the current sample is placed in the left subtree:
GL=GL+gti,GR=G-GLHL=HL+hti,HR=H-HL
try to update the maximum score:
c. and splitting the subtrees based on the division features and the feature values corresponding to the maximum score.
d. If the maximum score is 0, the current judgment tree is completely established, and w of all leaf areas is calculatedtjGet weak learner ht(x) Updating strong learning device ft(x) Entering the next round of weak learner iteration to finally obtain a basic training model; if the maximum score is not 0, go to step 2 and continue to attempt to split the decision tree.
It is understood that in other embodiments, other algorithms may be used to train the training samples, such as neural network algorithms.
Referring to fig. 9, in some embodiments, the step of training a preset basic model according to the training samples to obtain a basic training model includes:
s131, inputting the characteristic information and the corresponding rotating speed to a preset basic model to form a diagnosis parameter;
s132, determining that the diagnosis parameter is equal to a preset value;
s133, forming an adjustment set based on the fact that the diagnosis parameters are equal to preset values;
and S134, obtaining a basic training model according to the adjustment set and the preset basic model.
The preset basic model is continuously adjusted through the adjustment set, and a basic training model with high accuracy can be obtained. The score value calculated by the XGBOOST model is the maximum value, and the preset value is the parameter when the optimal parameter corresponds to global convergence or local convergence.
Please refer to fig. 1 again:
and S140, inputting a verification sample to the basic training model, and determining verification parameters.
The verification parameters are output results obtained after the verification samples are input into the basic training model, and the output results can determine whether the classification of the basic training model is accurate or not. For example, the accuracy of the verification sample as a verification parameter.
S150, determining that the verification parameters meet preset requirements.
The method mainly comprises the step of diagnosing whether the obtained verification parameters meet preset requirements or not. And (4) taking the accuracy of the verification sample as a verification parameter, for example, if the accuracy is greater than 98%, determining that the verification parameter meets the preset requirement.
And S160, determining a diagnosis model based on the verification parameter meeting the preset requirement.
Illustratively, after multiple iterations, the corresponding basic training model is obtained when the score maximum value is obtained, and it is determined that the verification parameter score meets the preset requirement, for example, the score value is 0, and at this time, the corresponding basic training model is the diagnostic model. When the verification parameters meet the preset requirements, the difference between the diagnosed data and the ideal data is in accordance with the preset difference range, and at the moment, the diagnostic model can be determined to be usable, namely, the training is completed.
Referring to fig. 8, in other embodiments, the step of determining a diagnostic model includes:
s161, setting random parameters of the basic training model based on the fact that the basic training model meets the preset requirements;
s162, searching the basic training model according to the random parameters to form a search result;
s163, determining that the search result meets the requirement;
s164, determining the optimal parameters of the basic training model based on the search result meeting the requirements;
and S165, determining a diagnosis model according to the basic training model and the optimal parameters.
The optimal parameters of the basic training model can be searched through a random parameter optimization method, and then a diagnosis model with high accuracy is formed according to the optimal parameters. The random parameter optimization method comprises the following steps: and generating enough feasible solutions in the range of the value domain, then respectively calculating the cost of each feasible solution, and selecting a minimum feasible solution as the optimal solution of random search according to the cost, namely the optimal parameter in the application. It should be noted that the cost function is a function that maps the value of the random event or its related random variables into a non-negative real number to represent the "risk" or "loss" of the random event; the value range is the range over which the search is determined.
Referring to fig. 10, an electronic device 200 is further provided in an embodiment of the present application, and includes a processor 210 and a storage medium 220, where the storage medium 220 includes readable instructions 221, and the readable instructions 221 are used for the processor 210 to execute any of the training methods described above.
The electronic device 200 includes, but is not limited to, a computer, a dedicated device, a data center, a server, and other hardware devices. In one embodiment, the electronic device 200 may be a microcomputer including at least one processor 210, wherein the processor 210 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), and/or the like.
The storage medium 220 is used to store various types of data in the electronic device 200, such as various databases, program codes, and the like. In some embodiments, storage medium 220 may include, but is not limited to, Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other optical Disc storage, magnetic disk storage, tape storage, or any other medium readable by a computer that can be used to carry or store data.
The application provides a training method and electronic equipment for executing the training method, wherein a diagnosis model is formed by training historical data formed in the glue dispensing process of glue dispensing equipment, the rotating speed of a glue outlet control component (such as a screw) is acquired through a sensor, and is compared with an early warning rotating speed or an early warning interval output by the diagnosis model, so that the real-time diagnosis of the health state of the glue dispensing equipment is realized. The training method capable of constructing the diagnosis model can realize the popularization of different dispensing equipment and enhance the generalization performance of the diagnosis model. And then can obtain early warning rotational speed or early warning interval through the diagnostic model, provide the solution of diagnostic model training, make the formation of early warning scope rely on big data information more, but not personnel's work experience, do benefit to the mill and realize automation and intellectuality, can realize the popularization of different dispensing equipment and realize dispensing equipment's real-time supervision.
Referring to fig. 11, an embodiment of the present invention further provides an apparatus health diagnosis method for determining a health state of a dispensing apparatus, where some steps may be the same as or similar to the technical solutions described in the above parts of the training method.
In some embodiments, the dispensing apparatus is exemplified as a dispensing apparatus employing an AB-type glue. The AB type glue, also called as two-component glue, is widely used for filling and sealing products due to its excellent bonding strength and good storage performance. The dispensing equipment controls the dispensing of glue through an A/B valve, and is a key part of the dispensing equipment. When the screw of the A/B valve breaks down, the dispensing flow rate is abnormal, the dispensing mixing ratio is different from the set ratio, and defective products are generated. Based on this, through the technical scheme of some embodiments of this application, realize the rotational speed of real-time diagnosis screw rod, and then diagnose the health status of A/B valve and even some adhesive deposite equipment, reduce because of the screw rod unusual leads to the emergence of processingquality is bad to avoid the untimely problem of early warning.
The diagnostic method comprises the following steps:
s510, receiving operation data of the dispensing equipment;
the operating data comprises characteristic information and a rotating speed corresponding to the characteristic information, the characteristic information comprises at least one of voltage, current and load, the voltage and the current are the voltage and the current loaded on the dispensing equipment, the load comprises a load set when the dispensing equipment operates, and the rotating speed comprises the rotating speed of the glue outlet control assembly of the dispensing equipment in the operating process in the figure 3;
s520, inputting the characteristic information to a diagnosis model to obtain an early warning rotating speed, wherein the diagnosis model is obtained based on historical data training of the dispensing equipment;
s530, determining the health state of the dispensing equipment according to the early warning rotating speed and the rotating speed.
Referring to fig. 12, in some embodiments, the method further comprises:
s511, determining the mean value and the standard deviation of the characteristic information;
and S512, standardizing the characteristic information according to the mean value and the standard deviation.
In some embodiments, the normalized feature information overrides the non-normalized feature information portion of the operational data, and subsequent processing is performed on the operational data after passing through the processing.
Wherein the feature information can be normalized by Z-Score to improve the generalization capability of the model, e.g. mean to 0 and variance to 1.
Referring to fig. 13, in some embodiments, the step of forming the warning interval includes:
s531, inputting the early warning rotating speed to a preset distribution model to establish standard normal distribution of the early warning rotating speed;
s532, determining a first standard deviation of the early warning rotating speed according to the standard normal distribution of the early warning rotating speed;
and S533, forming a first early warning interval based on the first standard deviation.
The first standard deviation is a range value, and the first standard deviation can be set according to actual needs. For example, the first standard deviation is (-2o ', 2o '), and o ' is the standard deviation in a standard normal distribution.
In some embodiments, the step of determining the health state of the dispensing device comprises:
and determining the health state of the dispensing equipment as a first state based on the rotating speed exceeding a first early warning interval. Wherein, the first state is a state needing shutdown.
In the above embodiment, when the early warning rotation speed of the dispensing equipment is input to the preset distribution model, the health state of the dispensing equipment and whether early warning is given can be determined according to the early warning interval, so that the generation of defective products caused by failure in early warning can be avoided. Wherein the predetermined distribution model is illustratively a 6sigma model. Or directly comparing the early warning rotating speed with the rotating speed, for example, if the rotating speed is greater than or less than the early warning rotating speed, the health state of the dispensing equipment is diagnosed to be bad.
Referring to fig. 14, in some embodiments, the step of forming the warning interval further includes:
s534, determining a second standard deviation of the early warning rotating speed according to the standard normal distribution of the early warning rotating speed;
s535, forming a second early warning interval based on the second standard deviation, wherein the second early warning interval is in the first early warning interval;
and S536, determining that the rotating speed exceeds the second early warning interval, and within the first early warning interval, determining that the health state of the dispensing equipment is the second state.
The second standard deviation is a range value, and the second standard deviation can be set according to actual needs. For example, the first standard deviation is (-o ', o '), o ' being the standard deviation in a standard normal distribution. The second state is an early warning state, and at this time, a maintenance worker is required to adjust parameters of the dispensing device 100.
Referring to fig. 15, an apparatus 300 for diagnosing device health is further provided in an embodiment of the present application, and includes a processor 310 and a storage medium 320, where the storage medium 320 includes readable instructions 321, and the readable instructions 321 are used for the processor 310 to execute the above method for diagnosing device health.
The device health diagnosis apparatus 300 includes, but is not limited to, a computer, a dedicated device, a data center, a server, and other hardware devices. In one embodiment, the health diagnosis apparatus 300 may be a microcomputer including at least one processor 310, wherein the processor 310 may include an Application Processor (AP), a modem processor, a Graphic Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), and the like.
The storage medium 320 is used to store various types of data, such as various databases, program codes, and the like, in the device health diagnosis apparatus 300. In some embodiments, storage medium 320 may include, but is not limited to, Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other optical Disc storage, magnetic disk storage, tape storage, or any other medium readable by a computer that can be used to carry or store data.
The application provides an equipment health diagnosis method and an equipment health diagnosis device, wherein operation data of dispensing equipment are input into a trained diagnosis model to form an early warning rotating speed or an early warning interval, the acquired rotating speed and the early warning rotating speed or the early warning interval are compared to determine the health state of the dispensing equipment, if the health state of the dispensing equipment is to be damaged, personnel are informed to stop the machine or automatically adjust the machine, and the generation of defective products caused by the fact that early warning cannot be performed can be avoided.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural.
Finally, it should be noted that the above embodiments are only intended to illustrate the technical solutions of the present application and not to limit the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made to the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application.