CN116268545A - Diagnosis method and calibration method for cigarette weight detection - Google Patents

Diagnosis method and calibration method for cigarette weight detection Download PDF

Info

Publication number
CN116268545A
CN116268545A CN202310579229.4A CN202310579229A CN116268545A CN 116268545 A CN116268545 A CN 116268545A CN 202310579229 A CN202310579229 A CN 202310579229A CN 116268545 A CN116268545 A CN 116268545A
Authority
CN
China
Prior art keywords
data
weight
online
offline
cigarettes
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.)
Granted
Application number
CN202310579229.4A
Other languages
Chinese (zh)
Other versions
CN116268545B (en
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.)
Shenzhen Hongyunzhi Technology Co ltd
Original Assignee
Shenzhen Hongyunzhi Technology 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 Shenzhen Hongyunzhi Technology Co ltd filed Critical Shenzhen Hongyunzhi Technology Co ltd
Priority to CN202310579229.4A priority Critical patent/CN116268545B/en
Publication of CN116268545A publication Critical patent/CN116268545A/en
Application granted granted Critical
Publication of CN116268545B publication Critical patent/CN116268545B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A24TOBACCO; CIGARS; CIGARETTES; SIMULATED SMOKING DEVICES; SMOKERS' REQUISITES
    • A24CMACHINES FOR MAKING CIGARS OR CIGARETTES
    • A24C5/00Making cigarettes; Making tipping materials for, or attaching filters or mouthpieces to, cigars or cigarettes
    • A24C5/32Separating, ordering, counting or examining cigarettes; Regulating the feeding of tobacco according to rod or cigarette condition
    • A24C5/34Examining cigarettes or the rod, e.g. for regulating the feeding of tobacco; Removing defective cigarettes
    • A24C5/3424Examining cigarettes or the rod, e.g. for regulating the feeding of tobacco; Removing defective cigarettes by weighing
    • 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

  • Manufacturing Of Cigar And Cigarette Tobacco (AREA)

Abstract

The invention discloses a diagnosis method and a calibration method for cigarette weight detection. Comprising the following steps: placing an identification code for the tobacco stem; acquiring at least on-line weight data of n cigarettes by using an on-line cigarette weight detector; taking out n cigarettes from m cigarettes; acquiring offline weight data of n cigarettes by using an offline cigarette weight test bench; matching offline weight data corresponding to the n cigarettes with online cigarette weight data based on the identity identification code, and further obtaining diagnosis data; the diagnosis data comprises online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance, and a correlation coefficient between the online diagnosis data and the offline diagnosis data; the central processing unit is configured with a detection error prediction model, and the weight detection error of the online cigarette weight detector is determined based on online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance and a correlation coefficient between the online diagnosis data and the offline diagnosis data.

Description

Diagnosis method and calibration method for cigarette weight detection
Technical Field
The invention relates to the technical field of cigarette detection, in particular to a diagnosis method and a calibration method for cigarette weight detection.
Background
In the production process of cigarette making machines, the weight of cigarettes is one of important process indexes. In practical applications, a microwave moisture density detector is generally used to detect the weight of cigarettes. And then the signal processing electronic control system SES is utilized to adjust the tobacco shred amount by adjusting the position of an executing mechanism (such as a leveling disc) so as to control the weight of cigarettes, thereby forming closed-loop control.
The microwave moisture density detector is used as a judge to detect and reject abnormal data, and is used as an athlete to regulate the weight of cigarettes. When the microwave moisture density detector detects abnormality, detects calibration slope and intercept parameters are not calibrated in time, the problems of inaccurate weight removal, abnormal standard deviation and the like can be caused due to distortion of weight detection results.
Based on this, it is needed to propose a diagnosis method and a calibration method for detecting the weight of cigarettes, so as to determine the detection error of the microwave moisture density detector. Based on the detection error, accurate calibration of parameters such as calibration slope, intercept and the like is realized, and the position of the cutter head is accurately adjusted by further utilizing the SRM weight control module, so that accurate adjustment of tobacco shred quantity is realized.
Disclosure of Invention
The invention aims to provide a diagnosis method and a calibration method for detecting the weight of cigarettes so as to determine the detection error of an online cigarette weight detector. Based on the detection error, accurate calibration of parameters such as calibration slope, intercept and the like is realized, and finally accurate control of the weight of the cigarettes is realized.
In a first aspect, the present invention provides a method for diagnosing weight detection of cigarettes, the method for diagnosing weight detection of cigarettes being applied to a cigarette production system, the cigarette production system including a cigarette machine, an on-line weight detector, an off-line weight test stand and a central processor; the diagnosis method for detecting the weight of the cigarettes comprises the following steps:
each batch of cigarette making machine produces m cigarettes, and each cigarette has an identification code;
in the process of transmitting cigarettes in rows, at least acquiring on-line weight data of n sample cigarettes by using an on-line cigarette weight detector, wherein n is less than m;
sampling cigarettes, and taking n sampling cigarettes out of m cigarettes;
acquiring offline weight data of n sampling cigarettes by using an offline cigarette weight test bench;
matching offline weight data corresponding to the n sampling cigarettes with online cigarette weight data based on the identity identification code, and further obtaining diagnosis data; the diagnosis data comprises online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance, and a correlation coefficient between the online diagnosis data and the offline diagnosis data; wherein the online diagnostic data includes an online weight mean, an online weight standard deviation, an online weight maximum, and an online weight minimum determined based on the online weight data; the offline diagnostic data includes an offline weight mean, an offline weight standard deviation, an offline weight maximum, and an offline weight minimum determined based on the offline weight data;
And configuring a detection error prediction model in the central processing unit, wherein the detection error prediction model determines the weight detection error of the online cigarette weight detector based on online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance and a correlation coefficient between the online diagnosis data and the offline diagnosis data.
Compared with the prior art, the invention not only obtains the online weight data of the n sampling cigarettes through the online cigarette weight detector, but also obtains more accurate offline weight data of the n sampling cigarettes through the offline cigarette weight test bench. Weight data is obtained from both online and offline dimensions by the method described above prior to a cigarette weight detection diagnosis. Compared with the manual weight data acquisition provided in the prior art, the weight data acquisition method is convenient, efficient and accurate, and can acquire various types of data such as cigarette quality index data, weight data, suction resistance, length, ventilation degree and the like, namely, the weight data is not limited, and based on the weight data, data support can be provided for diagnosis of detection of other dimensions (non-weight) of the cigarette.
In addition, the on-line weight data and the off-line weight data included in each sampling cigarette are matched by using the identification code of each cigarette, and based on the on-line weight data and the off-line weight data, the diagnosis data of n sampling cigarettes are further acquired. At this time, the diagnosis data includes online diagnosis data, offline diagnosis data, a difference between the offline weight variance and the online weight variance, and a correlation coefficient between the online diagnosis data and the offline diagnosis data. The diagnosis data integrates on-line, off-line, on-line and off-line differences, correlation and the like, so that the diagnosis data is more comprehensive and multidimensional, and the accuracy of cigarette weight detection and diagnosis can be effectively improved based on the diagnosis data.
And moreover, a detection error prediction model is configured in the central processing unit, and the diagnosis data is input into the detection error prediction model, so that the weight detection error of the online cigarette weight detector can be determined, and data support is provided for the subsequent calibration of online cigarette weight detection.
As one possible implementation, the detection error prediction model is a model determined based on XGBoost loss function.
Under the condition of adopting the technical scheme, compared with the GBDT model provided by the prior art, the XGBoost loss function is more accurate, and has higher running efficiency and better robustness. Based on this, the weight detection error outputted by the detection error prediction model to which the algorithm is applied will be more accurate.
As one possible implementation manner, the method for determining the detection error prediction model based on the XGBoost loss function is as follows:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
Dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
training the XGBoost loss function by utilizing a training data set;
adopting a cross verification method and optimizing the XGBoost loss function based on a verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using a test data set, and configuring the XGBoost loss function meeting the test requirement in a central processing unit.
As a possible implementation manner, in the process of transmitting cigarettes in rows, the online weight data of each of m cigarettes is acquired by using an online cigarette weight detector, and online weight data of n sampling cigarettes are screened out of m groups of online weight data.
In a second aspect, the invention also provides a calibration method for detecting the weight of a cigarette, and the calibration method for detecting the weight of the cigarette is applied to a cigarette production system, wherein the cigarette production system comprises a cigarette making machine, an online cigarette weight detector, an offline cigarette weight test board and a central processing unit; the calibration method for detecting the weight of the cigarettes comprises the following steps:
Each batch of cigarette making machine produces m cigarettes, and each cigarette has an identification code;
in the process of transmitting cigarettes in rows, at least acquiring on-line weight data of n sample cigarettes by using an on-line cigarette weight detector, wherein n is less than m;
sampling cigarettes, and taking n sampling cigarettes out of m cigarettes;
acquiring offline weight data of each of the n sampling cigarettes by using an offline cigarette weight test bench;
matching offline weight data corresponding to the n sampling cigarettes with online cigarette weight data based on the identity code, and further acquiring calibration data; the calibration data comprises online calibration data, offline calibration data, and differences between offline weight variances and online weight variances; wherein the online calibration data includes an online weight average value, an online weight average value of maximum 3 numbers, an online weight average value of minimum 3 numbers, an online weight median, an online weight 25-bit number, and an online weight 75-bit number determined based on the online weight data; the offline calibration data includes an offline weight average value, an offline weight average value of maximum 3 numbers, an offline weight average value of minimum 3 numbers, an offline weight median, an offline weight 25 quantile, and an offline weight 75 quantile determined based on the offline weight data;
And configuring a detection slope prediction model in the central processing unit, wherein the detection slope prediction model determines a detection slope based on the online calibration data, the offline weight variance and the difference value of the online weight variance.
Compared with the prior art, the calibration method for the cigarette weight detection has the same beneficial effects as the diagnosis method for the cigarette weight detection provided by the first aspect and/or any implementation manner of the first aspect, and is not described in detail herein.
As a possible implementation manner, after matching the offline weight data corresponding to the n sample cigarettes with the online cigarette weight data based on the identification code, and further obtaining the calibration data, the method further includes:
the central processing unit is provided with a detection intercept prediction model, and the detection intercept prediction model determines the detection intercept based on-line calibration data and off-line calibration data.
As a possible implementation manner, after determining the detection slope and the detection intercept, the calibration method further includes:
and calibrating the on-line cigarette weight detector according to the detection slope and the detection intercept.
As one possible implementation, the detection slope prediction model is a model determined based on XGBoost loss function; the detection intercept prediction model is a model determined based on XGBoost loss function.
As one possible implementation, the detection slope prediction model is a model determined based on XGBoost loss function, and the specific method is as follows:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
selecting an XGBoost loss function, and training the XGBoost loss function by utilizing a training data set;
adopting a cross verification method and optimizing the XGBoost loss function based on a verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using a test data set, and configuring the XGBoost loss function meeting the test requirement in a central processing unit.
As one possible implementation, the detection intercept prediction model is a model determined based on XGBoost loss function, and the specific method is as follows:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
selecting an XGBoost loss function, and training the XGBoost loss function by utilizing a training data set;
adopting a cross verification method and optimizing the XGBoost loss function based on a verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using a test data set, and configuring the XGBoost loss function meeting the test requirement in a central processing unit.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a logic block diagram of a cigarette production system provided by an embodiment of the present invention;
FIG. 2 is a flow chart of a diagnostic method for cigarette weight detection provided by an embodiment of the present invention;
FIG. 3 is a block diagram of a modeling flow of a detection error prediction model/a detection slope prediction model/a detection intercept prediction model according to an embodiment of the present invention;
FIG. 4 is a flow chart of modeling a detection error prediction model according to an embodiment of the present invention;
FIG. 5 is a flowchart of a calibration method for detecting the weight of a cigarette according to an embodiment of the present invention;
FIG. 6 is a flow chart of modeling of a detection slope prediction model provided by an embodiment of the present invention;
FIG. 7 is a flow chart of modeling a detection intercept prediction model provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It is to be understood that the terminology used herein is for the purpose of describing particular example embodiments only, and is not intended to be limiting. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprising," "including," and "having" are inclusive and therefore specify the presence of stated features, elements, and/or components, but do not preclude the presence or addition of one or more other features, elements, components, and/or groups thereof.
In the description of the present invention, unless explicitly stated and limited otherwise, the terms "disposed" and "connected" should be interpreted broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be directly connected or indirectly connected through an intermediate medium. The specific meaning of the above terms in the present invention can be understood by those skilled in the art according to the specific circumstances.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
For ease of description, spatially relative terms, such as "bottom," "front," "upper," "inclined," "lower," "top," "inner," "horizontal," "outer," and the like, may be used herein to describe one element or feature's relationship to another element or feature as illustrated in the figures. Such spatially relative terms are intended to encompass different orientations of the mechanism in use or operation in addition to the orientation depicted in the figures. For example, if the mechanism in the figures is turned over, elements described as "below" or "beneath" other elements or features would then be oriented "above" or "over" the other elements or features. Thus, the example term "below … …" may include both upper and lower orientations.
Before describing the diagnosis method and the calibration method for detecting the weight of the cigarette provided by the embodiment of the invention, a few basic concepts are described in detail.
The microwave density detector belongs to one of the on-line cigarette weight detectors. The device is an on-line detection device for the density of cigarettes, which is equipped on each main stream cigarette making machine at present, and dynamically controls the real-time weight of on-line cigarettes together with a weight control system. The microwave density detector is mainly used for detecting the density and humidity of cigarettes at high speed and providing data such as the weight of the cigarettes for the weight control system by pulse signals or CAN bus communication signals.
And when the detection slope=1, the detection slope parameter of the microwave density detector represents the mg number corresponding to each 1us pulse width of the microwave density detector. For example, a detection slope of 1.3 indicates that 1us corresponds to 1.3mg.
The pulse width of the microwave density detector is converted into an actual cigarette weight value through linear conversion, and the detection intercept parameter of the microwave density detector is a constant term of the phase conversion.
The weight detection error of the measuring head included in the microwave density detector is characterized by adopting standard deviation parameters. The weight detection error of the microwave density detector is subjected to the distribution of the front and the standard deviation of the measuring head included in the microwave density detector can be used as the standard deviation of the weight detection error.
The detection error prediction model, the detection slope prediction model and the detection intercept prediction model configured in the central processing unit provided by the embodiment of the invention are based on the XGBoost model, namely the XGBoost loss function. In other words, sample data is input into the XGBoost model, machine learning is performed, the XGBoost model with optimal parameters is finally selected as a basic model of a detection error prediction model, a detection slope prediction model and a detection intercept prediction model, and then different diagnosis parameters and calibration parameters are input based on different predicted target parameters (weight detection error, detection slope and detection intercept). The gradient-lifting tree model (Gradient Boosting Decison Tree, GBDT) provided in the prior art and the XGBoost model adopted in the embodiment of the present invention will be described in comparison.
GBDT is also a member of the ensemble family of learning, and in GBDT iteration, it is assumed that the strong learner obtained in the previous iteration is
Figure SMS_1
The loss function is
Figure SMS_2
The goal of this round of iteration is to find a weak learner of CART regression tree model
Figure SMS_3
Let the loss function of the present round
Figure SMS_4
Minimum.
The negative gradient of the loss function fits the approximation of the loss of the round, and thus fits a CART regression tree. The negative gradient of the loss function of the ith sample of the t-th round is expressed as:
Figure SMS_5
by means of
Figure SMS_6
Fitting a CART regression tree to obtain a t regression tree, corresponding to the leaf node region
Figure SMS_7
. Where J is the number of leaf nodes.
For the samples in each leaf node, the output value that minimizes the loss function, i.e., that fits the leaf node best, is found
Figure SMS_8
The following are provided:
Figure SMS_9
the decision tree fitting function for this round is obtained as follows:
Figure SMS_10
the expression of the strong learner finally obtained by this round is as follows:
Figure SMS_11
a general method for fitting the loss error is found by fitting the negative gradient of the loss function, so that the problem of classification regression can be solved by GBDT by fitting the negative gradient of the loss function without a round of classification problem or regression problem.
The regression algorithm for GBDT is as follows:
The input is a training set sample
Figure SMS_12
Maximum number of iterations T, loss function L.
Output is strong learner
Figure SMS_13
1) Initializing weak learners
Figure SMS_14
2) For iteration round number
Figure SMS_15
The method comprises the following steps:
a) For the sample
Figure SMS_16
Calculating a negative gradient
Figure SMS_17
b) Utilize%
Figure SMS_18
Fitting a CART regression tree to obtain a t regression tree, wherein the corresponding leaf node area is
Figure SMS_19
. wherein
Figure SMS_20
Is the number of leaf nodes of the regression tree t.
c) For leaf area j=1, 2, ·j, the best fit value is calculated
Figure SMS_21
d) Updating strong learning device
Figure SMS_22
3) Obtaining the expression of the strong learner f (x)
Figure SMS_23
The GBDT classification algorithm is as follows:
the classification algorithm of GBDT is not different from the regression algorithm of GBDT in concept, but because the sample output is not a continuous value, but discrete class, an error that cannot fit the class output directly from the output class is caused. To solve this problem, there are mainly two methods, one is to use an exponential loss function, where GBDT is degraded into the Adaboost algorithm. Another method is a method using a log-likelihood loss function similar to logistic regression. That is, the difference between the predicted probability value and the true probability value of the category is used to fit the penalty. Only GBDT classification with log likelihood loss function is discussed herein. While there are binary classification and multiple classification for log likelihood loss functions, the binary classification algorithm is mainly described below.
For binary GBDT, if a log-likelihood loss function similar to logistic regression is used, the loss function is:
Figure SMS_24
wherein
Figure SMS_25
. Then the negative gradient error at this time is
Figure SMS_26
For the generated decision tree, the best negative gradient fit value for each leaf node is
Figure SMS_27
Because the above method is difficult to optimize, approximate values are generally used instead of the above values
Figure SMS_28
The binary GBDT classification and GBDT regression algorithm process is the same except for the negative gradient calculation and the linear search of the best negative gradient fit of the leaf nodes.
The main advantages of GBDT are:
1) Various types of data, including continuous and discrete values, can be flexibly processed.
2) The accuracy of the prediction can also be relatively high with relatively little tuning time. This is relative to the SVM.
3) Using some robust loss functions, the robustness to outliers is very strong. Such as the Huber loss function and the Quantile loss function.
The main disadvantages of GBDT are:
1) Because of the dependency relationship between weak learners, it is difficult to train data in parallel.
Compared with the original algorithm GBDT, XGBoost is mainly optimized from the following three aspects:
firstly, optimizing an algorithm: in the weak learner model selection of the algorithm, compared with GBDT, only decision trees are supported, and many other weak learners can be directly used. On the loss function of the algorithm, a regularization part is added besides the loss of the algorithm. In the optimization mode of the algorithm, the GBDT loss function only carries out negative gradient (first-order Taylor) expansion on the error part, and the XGBoost loss function carries out second-order Taylor expansion on the error part, so that the error part is more accurate.
Secondly, optimizing the operation efficiency of the algorithm: and (3) making parallel selection on each weak learner, such as the process of establishing a decision tree, and finding out proper sub-tree splitting features and feature values. Before parallel selection, all the characteristic values are sorted and grouped, so that the parallel selection is convenient. For the characteristics of the packet, a proper packet size is selected, and the CPU cache is used for reading acceleration. Each packet is saved to multiple hard disks to increase IO speed.
Thirdly, optimizing algorithm robustness: for the characteristics of the missing values, the processing mode of the missing values is determined by enumerating whether all the missing values enter a left subtree or a right subtree at the current node. The algorithm itself adds L1 and L2 regularization terms, so that overfitting can be prevented, and generalization capability is stronger.
xGBoost loss function, GBDT loss function
Figure SMS_29
On the basis of (a), adding regularization terms as follows:
Figure SMS_30
here, the
Figure SMS_31
Is the number of leaf nodes
Figure SMS_32
Is the first
Figure SMS_33
Optimal value of each leaf node. Here, the
Figure SMS_34
And used in GBDT
Figure SMS_35
Having the same meaning, except that XGBoost is used in the model
Figure SMS_36
A value representing the leaf area.
The loss function of the final XGBoost can be expressed as:
Figure SMS_37
finally, the above loss function is minimized to obtain the first
Figure SMS_38
All of the decision trees are optimal
Figure SMS_39
Optimal solution for each leaf node region and each leaf node region
Figure SMS_40
. XGBoost does not fit the first derivative of taylor expansion as GBDT does, but rather expects to solve directly based on the second order taylor expansion of the loss function. The second order taylor expansion of the loss function is now:
Figure SMS_41
for convenience, the first and second derivatives of the ith sample at the tth weak learner may be noted as respectively
Figure SMS_42
,
Figure SMS_43
The loss function can now be expressed as:
Figure SMS_44
inside the loss function
Figure SMS_45
Is constant and has no influence on minimization and can be removed, and because of the first decision tree of each decision tree
Figure SMS_46
The values of the leaf nodes are the same value
Figure SMS_47
The loss function can therefore continue to be reduced.
Figure SMS_48
The sum of the first and second derivatives of each leaf node region sample is expressed separately as follows:
Figure SMS_49
,
Figure SMS_50
the form of the final loss function can be expressed as:
Figure SMS_51
the XGBoost algorithm has the following main flow:
the main algorithm flow of XGBoost is based on a decision tree weak classifier.
The input is a training set sample
Figure SMS_52
Maximum number of iterations
Figure SMS_53
Loss function
Figure SMS_54
Regularization coefficient
Figure SMS_55
The output is a strong learner f (x)
For iteration round number
Figure SMS_56
The method comprises the following steps:
1) Calculate the first
Figure SMS_57
Individual samples
Figure SMS_59
At the current wheel loss function
Figure SMS_60
Based on
Figure SMS_61
Is the first derivative of (2)
Figure SMS_62
Second derivative
Figure SMS_63
Calculating the first derivative sum of all samples
Figure SMS_64
Second derivative
Figure SMS_58
2) Based on the current node attempting to split the decision tree, default score
Figure SMS_65
Figure SMS_66
And
Figure SMS_67
first and second derivatives for nodes currently in need of splittingAnd (3) summing.
For characteristic sequence number
Figure SMS_68
a)
Figure SMS_69
b.1 The samples are arranged from small to large according to the characteristic k, the ith sample is taken out in sequence, and after the current sample is placed into the left subtree, the first-order derivative and the second-order derivative of the left subtree and the right subtree are calculated in sequence:
Figure SMS_70
Figure SMS_71
b.2 Attempting to update the maximum score:
Figure SMS_72
3) The subtrees are split based on the partition features and feature values corresponding to the maximum score.
4) If the maximum score is 0, the current decision tree is built, and all leaf areas are calculated
Figure SMS_73
Obtaining weak learner
Figure SMS_74
Updating strong learning device
Figure SMS_75
If the maximum score is not 0, go to step 2) to continue to attempt splitting the decision tree.
The XGBoost loss function is used as a tool for machine learning, and the embodiment of the invention provides a cigarette weight detection diagnosis method and a calibration method. It should be further explained that the prediction models used in both the diagnostic method and the calibration method are prediction models obtained based on machine learning training of XGBoost loss functions. The model training method is basically consistent, except that the input parameters of the prediction model in the diagnosis method are different from those of the prediction model in the calibration method, and the output results are also different, for example, the weight detection error finally output in the diagnosis method, and the detection slope and the detection intercept finally output in the diagnosis method. The following describes in detail a diagnosis method for detecting the weight of a cigarette according to an embodiment of the present invention with reference to the accompanying drawings.
Referring to fig. 1, the method for detecting and diagnosing the weight of the cigarette and the method for calibrating the weight of the cigarette provided by the embodiment of the invention are both applied to a cigarette production system. The cigarette production system at least comprises a cigarette making machine, an online cigarette weight detector, an offline cigarette weight test board and a central processing unit. It should be further explained that the cigarette making machine is used for producing cigarettes and delivering the produced cigarettes to the next process in rows, and in practical application, the delivery of the cigarettes may be divided into front rows and rear rows, that is, the front and rear cigarettes are delivered simultaneously. The cigarette making machine is any one of the cigarette making machines provided in the prior art, and is not particularly limited herein. The online cigarette weight detector can be a microwave density detector, is arranged on a conveying path for conveying cigarettes, can be a position above a driving belt, and is used for acquiring weight data of the cigarettes on line in real time and defining the weight data as online weight data. The off-line cigarette weight testing platform can be a device independent of the cigarette making machine and the on-line cigarette weight detector, and is used for off-line detection of weight data of the sampled cigarettes, and can be defined as off-line weight data. Of course, the offline cigarette weight testing platform may be a comprehensive testing platform, and may measure other parameters such as cigarette quality index data, suction resistance, length and ventilation degree besides the weight data of the sampled cigarettes. The central processing unit can be a CMIS intelligent system, is internally configured with different prediction models, and has the functions of data transceiving and processing. Can be in communication with an on-line cigarette weight detector and an off-line cigarette weight test stand for receiving diagnostic data and calibration data.
In order to solve any one of the technical problems in the prior art, the method for diagnosing weight detection of cigarettes, see fig. 2, specifically includes the following steps:
s10, producing m cigarettes in each batch by the cigarette making machine, wherein each cigarette is provided with an identification code. The identification code can be a two-dimensional code or a bar code, etc., and is loaded with batch numbers, serial numbers, etc. For example, a cigarette machine may produce 7000 cigarettes in a batch, and 7000 cigarettes are transferred to the next process in a front row and a rear row.
S11, in the process of row transmission of cigarettes, at least acquiring on-line weight data of n cigarettes by using an on-line cigarette weight detector, wherein n is smaller than m. It should be further explained that the n cigarettes are sampling cigarettes. For example, the online weight data of the n cigarettes may be acquired separately. The online weight data of m cigarettes in a batch can be obtained, and then n groups of online weight data of n sampling cigarettes are screened out from the m groups of online weight data.
S12, sampling cigarettes, and taking out n cigarettes from m cigarettes. For example, 30 cigarettes are taken out of a batch of 7000 cigarettes. The specific sampling method can be as follows:
S120, sampling preparation, namely determining whether sampling conditions are met, and if the sampling box is determined to be empty, indicating that the sampling conditions are met, sampling can be started.
S121, sampling selection, determining the sampling number, the sampling front and back rows, the sampling type and the like. The sampling type may include short branch weight random sampling, among others.
S121, taking out 30 cigarettes from 7000 cigarettes, and transferring the 30 cigarettes into a sampling box by means of random grabbing or blowing.
S13, acquiring offline weight data of n cigarettes by using an offline cigarette weight test bench. In practical application, the sampling data can be collected in batches, and the sampling result is checked, including the batch number of the sampled cigarettes and the determination of sampling statistics.
S14, matching the offline weight data corresponding to the n cigarettes with the online weight data based on the identification code. If n sampling cigarettes are provided, a sampling cigarettes are from front smoke discharge cigarettes, n-a sampling cigarettes are from rear smoke discharge cigarettes, when data matching is performed, front data matching and rear data matching of sampling data are required, and then in front and rear data, on-line weight data and off-line weight data of single cigarettes are further matched.
And after the matching is completed, the online weight data and the offline weight data are processed to obtain diagnosis data. The diagnosis data comprises online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance, and a correlation coefficient between the online diagnosis data and the offline diagnosis data; wherein the online diagnostic data includes an online weight mean, an online weight standard deviation, an online weight maximum, and an online weight minimum determined based on the online weight data; the offline diagnostic data includes an offline weight mean, an offline weight standard deviation, an offline weight maximum, and an offline weight minimum determined based on the offline weight data. It should be further explained that the type of diagnostic data may be classified into diagnostic data obtained by direct measurement, such as online diagnostic data, offline diagnostic data. Diagnostic data obtained by calculation such as the difference between the offline weight variance and the online weight variance and the correlation coefficient of the online diagnostic data and the offline diagnostic data are included in addition.
And S15, configuring a detection error prediction model in the central processing unit, and determining the weight detection error of the online cigarette weight detector based on online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance and a correlation coefficient between the online diagnosis data and the offline diagnosis data by the detection error prediction model.
It should be further explained that the detection error prediction model is a model determined based on XGBoost loss function, that is, based on the obtained sample data, a machine learning method is applied to train XGBoost loss function until an XGBoost loss function with optimal parameters is determined as the detection error prediction model.
It should be further explained that, the training methods of the detection error prediction model, the detection slope prediction model and the detection intercept prediction model provided by the embodiment of the present invention are basically the same, and the logic thereof is as follows:
referring to fig. 3, the overall design of the above prediction model is that firstly, sample data is obtained, then data preprocessing such as data cleaning, protocol, transformation and the like and feature construction are performed, three XGBoost regression prediction models of detection errors, detection slopes and detection intercepts are established, and microwaves are diagnosed and calibrated according to the prediction results.
The data acquisition comprises on-line weight data, off-line weight data, batch numbers and the like of the single cigarettes. The data processing comprises the steps of obtaining an on-line weight average value, an off-line weight standard deviation, a weight maximum value, a weight minimum value, a correlation coefficient, a fitting slope and the like.
Training the XGBoost loss function by using a mechanical learning method and processed data to obtain a detection error prediction model, a detection slope prediction model and a detection intercept prediction model.
Referring to fig. 4, a method for determining a detection error prediction model based on XGBoost loss function is described in detail below:
and S150, acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulation sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulation sample data. It should be further explained that the simulated sample data conditions are as follows: first, the sample data is entirely subject to the N (mean, std 2) normal distribution; secondly, the measured value of the off-line cigarette weight test board is accurate; thirdly, the weight measurement error of the online cigarette weight detector obeys normal distribution; fourth, the initial sample data is independent and homodyne.
The specific method for acquiring the analog sample data is as follows:
the data of the off-line cigarette weight test board can be obtained by randomly extracting 30 cigarettes from 7000 cigarettes in actual production, and performing off-line weight data detection to obtain an off-line weight data simulation value.
Then, the simulation of the online weight normal data and the online weight abnormal data is performed. The simulation method of the online weight normal data is as follows: the online weight normal data obeys the distribution of Xi' -N (Xi, std & gt2), wherein Xi is an offline weight data simulation value which simulates the output of an offline cigarette weight test board, std is set to be 6, and the online weight normal data simulation value corresponding to each offline weight data simulation value is simulated according to each offline weight data simulation value. For example, 30 offline weight data simulation values correspond to 30 online weight normal data simulation values.
The first method is completely random, namely, 30 online weight abnormality data simulation values are randomly generated according to the total distribution of the weight of cigarettes and obeying the direct distribution of N (mean, std 2).
And secondly, the error is too large, xi' to N (Xi, std1 and 2), wherein Xi is an off-line weight data simulation value which simulates the output of an off-line cigarette weight test bench, std is set to be 10, and an on-line weight abnormal data simulation value corresponding to each off-line weight data simulation value is simulated according to each off-line weight data simulation value. For example, 30 offline weight data simulation values correspond to 30 online weight anomaly data simulation values.
And finally, summarizing sample data, wherein each sample data comprises 30 offline weight data simulation values, 30 online weight normal data simulation values, 30 online weight abnormal data simulation values and whether normal detection data exist, and 60 fields are total, wherein 60 fields are independent variables and 1 is a dependent variable.
S151, preprocessing the sample data to obtain a preprocessed data set; the preprocessing method comprises data cleaning, data reduction and data transformation.
Wherein the sample data can be obtained by data cleaning. Data reduction refers to compression of data, and data is reduced as much as possible under the condition that data information is not lost on the basis of understanding the content of the data.
The data transformation includes normalization, switching, and projection operations. That is, the original data will be converted into a suitable form for the corresponding data mining model. The embodiment of the invention performs dimensionless treatment on the characteristics, selects a threshold value method to perform conversion treatment on the evaluation index, and has the following specific formula:
is provided with N indexes to form M sample data
Figure SMS_76
Each index
Figure SMS_77
The values of (2) are all greater than 0.
a) Normalization processing of larger and more optimal indexes:
Figure SMS_78
b) Normalization processing of smaller and more optimal indexes:
Figure SMS_79
c) Normalization processing of the over-center and over-optimal indexes:
Figure SMS_80
in the formula (i) the formula (ii),
Figure SMS_81
Figure SMS_82
Figure SMS_83
respectively taking the minimum value, the maximum value and the optimal value of the ith index in the sample set;
Figure SMS_84
is the normalized index value.
S152, dividing the data set, and dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion. The training data set, the validation data set, and the test data set are partitioned based on the sample data in a 6:2:2 ratio.
S153, training the XGBoost loss function by using the training data set.
S154, adopting a cross-validation method and optimizing the XGBoost loss function based on the validation data set.
S155, evaluating the XGBoost loss function by using the mean square error as an evaluation index;
And S156, when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using the test data set, and configuring the XGBoost loss function meeting the test requirement in the central processing unit.
The diagnosis result of the diagnosis method for detecting the weight of the cigarette provided by the embodiment of the invention is verified. The specific verification scheme is as follows:
the first step: under the condition of ensuring normal weight detection, the short weight random sampling is firstly carried out through an applied weight detection abnormal verification process.
And a second step of: and (3) performing off-line detection on the sampling data, and matching the sampling data to obtain whether the quantity detection is abnormal or not.
And a third step of: repeating the steps 1-2 for 10 times to obtain the model prediction result under the normal condition of weight detection.
Fourth step: and (3) adjusting the weight data acquisition of the single cigarette so that the weight detection is abnormal.
Fifth step: and through an applied weight detection abnormality verification process, firstly, randomly sampling the weight of the short branch.
Sixth step: and (5) performing off-line detection on the sampling data, and matching the sampling data to obtain a weight detection normal prediction result.
Seventh step: repeating the steps 5-6 times to obtain a model prediction result under the abnormal condition of weight detection.
Eighth step: calculating an evaluation index of model prediction: and (5) equally dividing the error.
The test results were as follows:
only the data with normal weight detection errors are used in the test; a total of 26 tests were performed, and the prediction results of each detection error are shown in the following table, wherein the measurement of the microwave detection error is 6mg, and the model prediction average error is 1.72.
Table 1 detection error prediction value
Figure SMS_85
Compared with the prior art, the invention not only obtains the online weight data of the n sampling cigarettes through the online cigarette weight detector, but also obtains more accurate offline weight data of the n sampling cigarettes through the offline cigarette weight test bench. Before the weight detection and diagnosis of the cigarettes, weight data are acquired from two dimensions, namely on-line and off-line through the method, compared with manual weight data acquisition provided in the prior art, the weight data acquisition method is convenient, efficient and accurate, various types of data such as quality index data, weight data, suction resistance, length, ventilation degree and the like of the cigarettes can be acquired, namely the weight data are not limited, and based on the weight data, data support can be provided for the diagnosis of the other dimension (non-weight) detection of the cigarettes.
In addition, the on-line weight data and the off-line weight data included in each cigarette are matched by using the identification code of each cigarette, and based on the on-line weight data and the off-line weight data, the diagnosis data of n sampling cigarettes are further acquired. At this time, the diagnosis data includes online diagnosis data, offline diagnosis data, a difference between the offline weight variance and the online weight variance, and a correlation coefficient between the online diagnosis data and the offline diagnosis data. The diagnosis data integrates on-line, off-line, on-line and off-line differences, correlation and the like, so that the diagnosis data is more comprehensive and multidimensional, and the accuracy of cigarette weight detection and diagnosis can be effectively improved based on the diagnosis data.
And moreover, a detection error prediction model is configured in the central processing unit, and the diagnosis data is input into the detection error prediction model, so that the weight detection error of the online cigarette weight detector can be determined, and data support is provided for the subsequent calibration of online cigarette weight detection.
In a second aspect, the embodiment of the invention also provides a calibration method for detecting the weight of a cigarette, and the calibration method for detecting the weight of the cigarette is applied to a cigarette production system, wherein the cigarette production system comprises a cigarette making machine, an online cigarette weight detector, an offline cigarette weight test board and a central processing unit; the calibration method for the weight detection of cigarettes comprises the following steps, see fig. 5:
s20, producing m cigarettes in each batch by using a cigarette making machine, wherein each cigarette is provided with an identification code;
s21, acquiring at least on-line weight data of n cigarettes by using an on-line cigarette weight detector in the row transmission process, wherein n is smaller than m;
s22, sampling cigarettes, and taking out n cigarettes from m cigarettes;
s23, acquiring offline weight data of each of n cigarettes by using an offline cigarette weight test bench;
s24, matching offline weight data corresponding to the n cigarettes with online cigarette weight data based on the identity code, and further obtaining calibration data; the calibration data comprises online calibration data, offline calibration data, and differences between offline weight variances and online weight variances; wherein the online calibration data includes an online weight average value, an online weight average value of maximum 3 numbers, an online weight average value of minimum 3 numbers, an online weight median, an online weight 25-bit number, and an online weight 75-bit number determined based on the online weight data; the offline calibration data includes an offline weight average, an offline weight maximum of 3 numbers average, an offline weight minimum of 3 numbers average, an offline weight median, an offline weight 25 quantile, and an offline weight 75 quantile determined based on the offline weight data. It should be further explained that the type of diagnostic data may be classified into diagnostic data obtained by direct measurement, such as online diagnostic data, offline diagnostic data. Diagnostic data obtained by calculation such as the difference between the offline weight variance and the online weight variance and the correlation coefficient of the online diagnostic data and the offline diagnostic data are included in addition.
S25, configuring a detection slope prediction model in the central processing unit, and determining the detection slope by the detection slope prediction model based on the online calibration data, the offline weight variance and the difference value of the online weight variance.
Compared with the prior art, the calibration method for the cigarette weight detection has the same beneficial effects as the diagnosis method for the cigarette weight detection provided by the first aspect and/or any implementation manner of the first aspect, and is not described in detail herein.
As a possible implementation manner, after matching the offline weight data corresponding to the n cigarettes with the online cigarette weight data based on the identification code, and further obtaining the calibration data, the method further includes:
the central processing unit is provided with a detection intercept prediction model, and the detection intercept prediction model determines the detection intercept based on-line calibration data and off-line calibration data.
As a possible implementation manner, after determining the microwave detection slope and the detection intercept, the calibration method further includes:
and calibrating the on-line cigarette weight detector according to the microwave detection slope and the detection intercept.
As one possible implementation, the microwave detection slope prediction model is a model determined based on XGBoost loss function; the microwave detection slope prediction model is a model determined based on XGBoost loss function.
As one possible implementation, the microwave detection slope prediction model is a model determined based on XGBoost loss function, and the specific method is as follows, see fig. 6:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
selecting an XGBoost loss function, and training the XGBoost loss function by utilizing a training data set;
adopting a cross verification method and optimizing the XGBoost loss function based on a verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using a test data set, and configuring the XGBoost loss function meeting the test requirement in a central processing unit.
As one possible implementation, the detection intercept prediction model is a model determined based on XGBoost loss function, specifically as follows, see fig. 7:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
selecting an XGBoost loss function, and training the XGBoost loss function by utilizing a training data set;
adopting a cross verification method and optimizing the XGBoost loss function based on a verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using a test data set, and configuring the XGBoost loss function meeting the test requirement in a central processing unit.
Checking slope verification, wherein the slope before verification is k_old:
the first step:
the front row samples 30 samples randomly (mlp shows standard deviation std _ mv _ 1),
the back row samples 30 samples randomly (mlp shows standard deviation std_mv_2).
And a second step of:
the sampled data is subjected to a detection process,
front smoke branch detection standard deviation (std_act_1)
Post smoke branch detection standard deviation (std_act_2);
and a third step of:
calculating the current slope:
K_new=(std_act_1/ std_mv_1* k_old+ std_act_2/ std_mv_2* k_old)/2
fourth step:
when the difference between std_act_1-std_mv_1 and std_act_2-std_mv_2 is smaller than 1mg, the slope is the actual slope; the slope is calibrated at rest. Otherwise, the calibration slope is k_new, and repeating the steps 1-3 until the calibration slope is stopped. The actual true slope is obtained.
The model evaluation method is as follows:
the first step: the slope is calibrated by the original calibration slope method to obtain the true slope
And a second step of: obtaining predicted weight detection slope values according to a calibration procedure
And a third step of: repeating the second step by modifying the slope value, and obtaining the slope predicted value for a plurality of times
Fourth step: calculating a predictive evaluation index MSE (mean square error)
The test results were as follows:
firstly, obtaining a real slope of 1.002 by an original slope checking method. And secondly, obtaining a slope prediction result by adjusting the slope and predicting the slope by the applied slope. Calculation model predicts MSE (mean square error): 0.020752.
TABLE 2 weight detection slope prediction results
Figure SMS_86
Detection intercept verification (predictive verification of weight detection offset parameters), verification scheme is as follows:
the first step: under the condition of ensuring normal weight detection, the short weight random sampling is firstly carried out through an applied weight detection abnormal verification process.
And a second step of: and sampling the finished product cigarettes to obtain the actual deviation value of the current weight detection intercept.
And a third step of: and (3) performing off-line detection on the sampling data, and matching the sampling data to obtain a quantity detection intercept predicted value.
Fourth step: repeating the steps 2-3 times to obtain the model prediction result under the normal condition of weight detection
Fifth step: calculating the evaluation index of model prediction, and the mean square error
The test results were as follows, and the application weight drift prediction results were obtained:
the first step: randomly sampling short cigarettes and obtaining a weight deviation predicted value
And a second step of: sampling the target weights of the front and rear rows of the finished cigarettes to obtain actual finished cigarette weight values, and obtaining the following table:
TABLE 3 weight detection intercept prediction results
Figure SMS_87
Finally, calculating a predictive index value: MSE is 0.9769.
In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. The diagnosis method for detecting the weight of the cigarettes is characterized in that the diagnosis method for detecting the weight of the cigarettes is applied to a cigarette production system, and the cigarette production system comprises a cigarette making machine, an online cigarette weight detector, an offline cigarette weight test board and a central processing unit; the diagnosis method for detecting the weight of the cigarettes comprises the following steps:
each batch of the cigarette making machine produces m cigarettes, and each cigarette is provided with an identification code;
in the process of the cigarettes being transmitted in rows, at least acquiring on-line weight data of n sampling cigarettes by using the on-line cigarette weight detector, wherein n is less than m;
sampling cigarettes, and taking out the n sampling cigarettes from the m cigarettes;
acquiring offline weight data of the n sample cigarettes by using the offline cigarette weight test bench;
Matching the offline weight data corresponding to the n sampling cigarettes with online weight data based on the identification code, and further obtaining diagnostic data; the diagnosis data comprises online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance, and a correlation coefficient between the online diagnosis data and the offline diagnosis data; wherein the online diagnostic data includes an online weight mean, an online weight standard deviation, an online weight maximum, and an online weight minimum determined based on the online weight data; the offline diagnostic data includes an offline weight mean, an offline weight standard deviation, an offline weight maximum, and an offline weight minimum determined based on the offline weight data;
and the central processing unit is provided with a detection error prediction model, and the detection error prediction model determines the weight detection error of the online cigarette weight detector based on online diagnosis data, offline diagnosis data, a difference value between offline weight variance and online weight variance and a correlation coefficient between the online diagnosis data and the offline diagnosis data.
2. The method according to claim 1, wherein the detection error prediction model is a model determined based on XGBoost loss function; the XGBoost loss function is:
Figure QLYQS_1
3. The method of diagnosing a weight detection of a cigarette according to claim 2, wherein the method of determining the detection error prediction model based on XGBoost loss function is as follows:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing the sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
training an XGBoost loss function by utilizing the training data set;
adopting a cross verification method and optimizing an XGBoost loss function based on the verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using the test data set, and configuring the XGBoost loss function meeting the test requirement in the central processing unit.
4. The method according to claim 1, wherein the online weight data of each of m cigarettes is acquired by the online weight detector during the row transfer of cigarettes, and the online weight data of the n sampled cigarettes is selected from m sets of online weight data.
5. The calibration method for the cigarette weight detection is characterized in that the calibration method for the cigarette weight detection is applied to a cigarette production system, and the cigarette production system comprises a cigarette making machine, an online cigarette weight detector, an offline cigarette weight test board and a central processing unit; the calibration method for detecting the weight of the cigarettes comprises the following steps:
each batch of the cigarette making machine produces m cigarettes, and each cigarette is provided with an identification code;
in the process of the cigarettes being transmitted in rows, at least acquiring on-line weight data of n sampling cigarettes by using the on-line cigarette weight detector, wherein n is less than m;
sampling cigarettes, and taking out the n sampling cigarettes from the m cigarettes;
acquiring offline weight data of each of the n sampled cigarettes by using the offline cigarette weight test bench;
matching the offline weight data corresponding to the n sampling cigarettes with online cigarette weight data based on the identification code, and further acquiring calibration data; the calibration data comprises online calibration data, offline calibration data, and differences between offline weight variances and online weight variances; wherein the online calibration data includes an online weight average value, an online weight average value of maximum 3 numbers, an online weight average value of minimum 3 numbers, an online weight median, an online weight 25 minutes, and an online weight 75 minutes determined based on the online weight data; the offline calibration data comprises an offline weight average value, an offline weight average value of maximum 3 numbers, an offline weight average value of minimum 3 numbers, an offline weight median, an offline weight 25 quantile and an offline weight 75 quantile which are determined based on the offline weight data;
The central processing unit is provided with a detection slope prediction model, and the detection slope prediction model determines a detection slope based on the online calibration data, the offline weight variance and the difference value of the online weight variance.
6. The method of calibrating weight detection of cigarettes according to claim 5, wherein after matching the offline weight data corresponding to the n sampled cigarettes with online weight data based on the identification code, and further obtaining calibration data, the method further comprises:
the central processing unit is provided with a detection intercept prediction model, and the detection intercept prediction model determines the detection intercept based on-line calibration data and off-line calibration data.
7. The method of calibrating a cigarette weight test of claim 6, wherein after determining the test slope and the test intercept, the method further comprises:
and calibrating an online cigarette weight detector according to the detection slope and the detection intercept.
8. The method according to claim 5, wherein the detection slope prediction model is a model determined based on XGBoost loss function; the detection intercept prediction model is a model determined based on an XGBoost loss function;
The XGBoost loss function is:
Figure QLYQS_2
9. the method for calibrating weight detection of cigarettes according to claim 8, wherein the detection slope prediction model is a model determined based on an XGBoost loss function, and the method is as follows:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing the sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
selecting an XGBoost loss function, and training the XGBoost loss function by utilizing the training data set;
adopting a cross verification method and optimizing an XGBoost loss function based on the verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using the test data set, and configuring the XGBoost loss function meeting the test requirement in the central processing unit.
10. The method for calibrating weight detection of cigarettes according to claim 8, wherein the detection intercept prediction model is a model determined based on an XGBoost loss function, and is specifically implemented as follows:
acquiring sample data, acquiring initial sample data based on the online weight data and the offline weight data, further acquiring simulated sample data according to the error distribution characteristics of the online weight data and the offline weight data, and forming the sample data by the initial sample data and the simulated sample data;
preprocessing the sample data to obtain a preprocessed data set; the pretreatment method comprises data cleaning, data reduction and data transformation;
dividing the data set, dividing the preprocessed data set into a training data set, a verification data set and a test data set according to a preset proportion,
selecting an XGBoost loss function, and training the XGBoost loss function by utilizing the training data set;
adopting a cross verification method and optimizing an XGBoost loss function based on the verification data set;
using the mean square error as an evaluation index to evaluate the XGBoost loss function;
when the mean square error meets a preset threshold, testing the prediction effect of the XGBoost loss function by using the test data set, and configuring the XGBoost loss function meeting the test requirement in the central processing unit.
CN202310579229.4A 2023-05-23 2023-05-23 Diagnosis method and calibration method for cigarette weight detection Active CN116268545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310579229.4A CN116268545B (en) 2023-05-23 2023-05-23 Diagnosis method and calibration method for cigarette weight detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310579229.4A CN116268545B (en) 2023-05-23 2023-05-23 Diagnosis method and calibration method for cigarette weight detection

Publications (2)

Publication Number Publication Date
CN116268545A true CN116268545A (en) 2023-06-23
CN116268545B CN116268545B (en) 2023-08-15

Family

ID=86820619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310579229.4A Active CN116268545B (en) 2023-05-23 2023-05-23 Diagnosis method and calibration method for cigarette weight detection

Country Status (1)

Country Link
CN (1) CN116268545B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008848A (en) * 2006-12-26 2007-08-01 龙岩卷烟厂 Device for scanning detecting precision of detecting head in on-line testing cigarette weight control system
CN105388168A (en) * 2015-12-11 2016-03-09 贵州中烟工业有限责任公司 Verifying method of cigarette apparatus detection technology
JP2020012705A (en) * 2018-07-17 2020-01-23 株式会社東芝 Calibration method of microwave densitometer, and microwave densitometer
CN113108949A (en) * 2021-03-16 2021-07-13 北京工业大学 Model fusion-based sonde temperature sensor error prediction method
US20220012559A1 (en) * 2020-07-10 2022-01-13 Zhangjiakou Cigarette Factory Co., Ltd System and method for on-line analysis of structure of dried shredded tobacco
US20230100823A1 (en) * 2020-04-07 2023-03-30 Mprd Ltd Determining tobacco weight
CN116098313A (en) * 2022-12-08 2023-05-12 红云红河烟草(集团)有限责任公司 Online identification method for weight stability of cigarettes

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101008848A (en) * 2006-12-26 2007-08-01 龙岩卷烟厂 Device for scanning detecting precision of detecting head in on-line testing cigarette weight control system
CN105388168A (en) * 2015-12-11 2016-03-09 贵州中烟工业有限责任公司 Verifying method of cigarette apparatus detection technology
JP2020012705A (en) * 2018-07-17 2020-01-23 株式会社東芝 Calibration method of microwave densitometer, and microwave densitometer
US20230100823A1 (en) * 2020-04-07 2023-03-30 Mprd Ltd Determining tobacco weight
US20220012559A1 (en) * 2020-07-10 2022-01-13 Zhangjiakou Cigarette Factory Co., Ltd System and method for on-line analysis of structure of dried shredded tobacco
CN113108949A (en) * 2021-03-16 2021-07-13 北京工业大学 Model fusion-based sonde temperature sensor error prediction method
CN116098313A (en) * 2022-12-08 2023-05-12 红云红河烟草(集团)有限责任公司 Online identification method for weight stability of cigarettes

Also Published As

Publication number Publication date
CN116268545B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
JP6942741B2 (en) Identification for spectroscopic classification with reduced false positives
CN108777873A (en) The wireless sensor network abnormal deviation data examination method of forest is isolated based on weighted blend
CN109472004B (en) Comprehensive evaluation method, device and system for influences of climate change and human activities on hydrology and drought
TWI784887B (en) Device and method of providing quantification model and relevant non-transitory computer-readable medium
CN105928901A (en) Qualitative and quantitative combined near infrared quantitative model construction method
CN113053535B (en) Medical information prediction system and medical information prediction method
CN117390591B (en) Operation monitoring method and system for coal conveying belt sampling machine based on electric parameter analysis
CN110097928A (en) A kind of prediction technique and prediction model based on intestinal flora prediction tissue micronutrient levels
CN111339633B (en) Heat meter performance degradation evaluation method based on data change characteristic fuzzy measurement
CN109297534A (en) For evaluating the environmental parameter Weight Determination and system of indoor environmental quality
CN111428329A (en) Model-based machine learning system
CN111642782A (en) Tobacco leaf raw material efficacy positioning method based on cigarette formula requirements
CN116268545B (en) Diagnosis method and calibration method for cigarette weight detection
CN113858566B (en) Injection molding machine energy consumption prediction method and system based on machine learning
CN115457756B (en) Sensor calibration method and device
CN112164428B (en) Method and device for predicting properties of small drug molecules based on deep learning
CN116612820B (en) Dairy product production intelligent management platform based on data analysis
CN108256294A (en) A kind of device for being used to detect somatic mutation
CN116098313A (en) Online identification method for weight stability of cigarettes
CN115618190A (en) Environmental particulate matter concentration estimation method and system based on sensor data and terminal
Susetyoko et al. Characteristics of Accuracy Function on Multiclass Classification Based on Best, Average, and Worst (BAW) Subset of Random Forest Model
US20240190185A1 (en) Method and system for detecting swapped tires on a vehicle
CN109471363B (en) Industrial melt index soft measurement method based on post-effect function and rhododendron search
CN116433107B (en) Pipe product quality diagnosis system
CN116118154B (en) Extrusion processing control method and system for automotive interior raw materials

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
GR01 Patent grant
GR01 Patent grant