Method, device and equipment for fault detection of a cigarette redrying machine and readable storage medium
By dividing the time window of cigarette dryer sensor data and training the neural network model through comparative learning, combined with wavelet decomposition technology, the problem of low dryer fault detection efficiency is solved, efficient fault identification and positioning is achieved, and equipment maintenance costs are reduced.
Patent Information
- Application Number
- CN202211508944.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-11-29
AI Technical Summary
In the existing technology, the failure detection efficiency of tobacco drying machines is low, resulting in equipment failures affecting tobacco quality and causing economic losses. In addition, the lack of sufficient fault data makes effective detection difficult.
By acquiring sensor data from cigarette drying machines, dividing the data into time windows and preprocessing them, a detection model is trained using a contrastive learning neural network model, and combined with wavelet decomposition technology, faulty sensors can be identified.
It improves the efficiency and accuracy of fault detection, reduces the need for detection in fault-free situations, and reduces equipment maintenance costs.
Smart Images

Figure CN115758086B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information processing, and in particular to a cigarette drying machine fault detection method, device, equipment and readable storage medium. BACKGROUND
[0002] With the continuous improvement of modern industrial production and scientific and technological level of cigarette factory, the development trend of large-scale, continuous, high-speed and automation of drying section machine equipment has become increasingly obvious. However, due to the influence of inevitable factors such as mechanical parts itself, operation condition of equipment, operation management and maintenance deficiency, drying section machine may have various faults. Once the drying section equipment fails, it will affect the normal drying of tobacco, reduce the quality of finished products, and bring huge economic losses to enterprises. The drying machine includes key devices such as hot air system and pipeline system. By installing sensors on these key devices, the running data of the equipment can be collected.
[0003] At present, the main fault detection is to collect signals and extract fault features and classify faults from the collected information. However, due to the relatively small number of drying machine faults, there is insufficient fault data, and general machine learning models cannot efficiently detect drying machine faults. SUMMARY
[0004] The present application provides a cigarette drying machine fault detection method, device, equipment and readable storage medium, which solves the defect of low efficiency of drying machine fault detection in the prior art, and realizes efficient detection of drying machine fault.
[0005] The present application provides a cigarette drying machine fault detection method, which comprises:
[0006] Obtaining detection data of each sensor of the cigarette drying machine;
[0007] Dividing the detection data of each sensor into a plurality of time window data according to time slices, and taking the detection data of all sensors corresponding to the same time window as a detection sample;
[0008] Training a detection model according to the detection sample to obtain a trained detection model;
[0009] Inputting the detection data of different time windows of the drying machine to be detected into the trained detection model in batches respectively to obtain the prediction results corresponding to different time windows respectively; the prediction results include positive class detection data or negative class detection data;
[0010] Obtaining the detection data of the same time window detected by the sensor of the drying machine in the normal state, and taking the detection data as standard detection data;
[0011] In a case that the prediction result is positive class detection data, according to the prediction result and the standard detection data, fault detection data is determined; the fault detection data is detection data of all sensors corresponding to a time window;
[0012] The fault detection data is subjected to wavelet decomposition to determine a number corresponding to a fault sensor.
[0013] According to the method for fault detection of a cigarette cutting dryer provided by the application, the detection sample is pretreated before being sent into the detection model, and the pretreated detection sample is used as an input of the detection model to train the model.
[0014] According to the method for fault detection of a cigarette cutting dryer provided by the application, the pretreatment comprises:
[0015] The detection sample is subjected to normalization processing to obtain a normalized detection sample.
[0016] The normalized detection sample is used as an original sample, twice noise is added to the original sample respectively to obtain a sample pair with the same class as the original sample, and the sample pair is used as a positive class sample pair.
[0017] The positive class sample pair is subjected to random mask operation respectively to obtain two sample pairs with different classes from the original sample, and the two sample pairs are used as negative class sample pairs.
[0018] The negative class sample pairs and the positive class sample pairs are used as inputs of the detection model to train the model.
[0019] According to the method for fault detection of a cigarette cutting dryer provided by the application, the negative class sample pairs and the positive class sample pairs are used as inputs of the detection model to train the model, which comprises:
[0020] The positive class sample pairs and the negative class sample pairs are respectively input into two same encoders to map the positive class sample pairs and the negative class sample pairs from a high-dimensional space to a new vector space, so as to obtain positive class sample vectors and negative class sample vectors respectively.
[0021] The positive class sample vectors and the negative class sample vectors are subjected to dimension reduction to obtain reduced positive class sample vectors and reduced negative class sample vectors.
[0022] Cosine similarity is used to calculate the similarity between samples in a low-dimensional space, and scale cross-entropy loss is used to make samples of the same class closer in space and samples of different classes farther in space, so as to obtain the trained detection model.
[0023] According to the method for detecting faults of a cigarette cutting dryer provided in the application, in the case that the prediction result is positive class detection data, the fault detection data is determined according to the prediction result and the standard detection data, and the method comprises the following steps:
[0024] According to the normal detection data, the marking threshold score corresponding to the trained detection model in the case that the prediction result is positive class data is determined, and the threshold score corresponding to the prediction result is determined.
[0025] The marking threshold score is compared with the threshold score respectively, and in the case that the marking threshold score is greater than the threshold score, the positive class detection data corresponding to the threshold score is taken as the fault detection data.
[0026] According to the method for detecting faults of a cigarette cutting dryer provided in the application, in the case that the marking threshold score is less than the threshold score, the positive class detection data corresponding to the threshold score is taken as the detection data of the cigarette cutting dryer in the normal state.
[0027] According to the method for detecting faults of a cigarette cutting dryer provided in the application, in the case that the prediction result is negative class detection data, the negative class detection data is taken as the fault detection data and is decomposed by wavelet to determine the number corresponding to the fault sensor.
[0028] The application further provides a device for detecting faults of a cigarette cutting dryer, which comprises an acquisition unit configured to acquire detection data of each sensor of the cigarette cutting dryer.
[0029] A division unit is configured to divide the detection data of each sensor into a plurality of time window data according to time segments, and take the detection data corresponding to all sensors in the same time window as a detection sample.
[0030] A training unit is configured to train a detection model according to the detection sample to obtain a trained detection model.
[0031] A detection unit is configured to input the detection data of different time windows of a cigarette cutting dryer to be detected into the trained detection model in batches to obtain prediction results corresponding to different time windows respectively, wherein the prediction results comprise positive class detection data or negative class detection data.
[0032] The acquisition unit is further configured to acquire detection data of the same time window detected by the sensor of the cigarette cutting dryer in the normal state, and take the detection data as standard detection data.
[0033] a determination unit, configured to determine, when the prediction result is positive detection data, fault detection data based on the prediction result and the standard detection data; the fault detection data being detection data of all sensors corresponding to a certain time window;
[0034] The determining unit is further configured to perform wavelet decomposition on the fault detection data to determine a serial number corresponding to the fault sensor.
[0035] The present invention also provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for detecting faults in a cigarette cut dryer as described above is implemented.
[0036] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting a fault in a cigarette cut dryer as described above is implemented.
[0037] The method, device, equipment and readable storage medium for detecting faults in a tobacco cut dryer provided by the present invention first detect the overall status of the equipment, so that fault detection of each sensor is only required when a fault occurs in the tobacco cut dryer equipment. This improves the efficiency of fault detection when tobacco cut dryer equipment failures occur less frequently in cigarette factories.
[0038] Secondly, this application achieves data enhancement of positive samples by adding noise to the original samples, and generates negative samples by random masking, so as to perform model training without the need for fault data and achieve higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 This is a flow chart of a method for detecting faults in a cut cigarette drying machine provided by the present invention;
[0041] Figure 2 This is a network framework diagram of a cigarette drying machine fault detection method based on time window comparative learning according to the present invention;
[0042] Figure 3 This is a second flow chart of the method for detecting faults in a cut cigarette drying machine provided by the present invention;
[0043] Figure 4A structure block diagram of a cigarette cutting straw machine fault detection device provided by the present application is provided.
[0044] Figure 5 A structure diagram of an electronic device provided by the present application is provided. DETAILED DESCRIPTION
[0045] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0046] Figure 1 A method flowchart of a cigarette cutting straw machine fault detection provided by the present application is provided, as shown in the figure, the method comprises the following steps: Figure 1
[0047] Step 101: Obtain detection data of each sensor of the cigarette cutting straw machine.
[0048] Specifically, the cigarette cutting straw machine is respectively provided with sensors at key parts such as the hot air system and the pipeline system to detect the running state of each device.
[0049] Step 102: Divide the detection data of each sensor into several time window data according to time segments, and take the detection data of all sensors corresponding to the same time window as a detection sample.
[0050] Specifically, the data of each sensor of the cigarette cutting straw machine is collected, and each sensor data is divided into time window data according to time segments, and the time window data of all sensors is combined into a sample. The present application requires reading the sensor signals at the same time and in the normal state, so the data collection is performed after the normal running of the device for half an hour, and the missing values are filled. The time window size is set, and all the collected sensor data is divided by using the sliding time window method. All the sensor data in the same time window is combined into a sample according to the sensor number, for example, if there are x sensors, and each time window contains y data, then the time window data of each sample is x*y. In this embodiment, 500 data points are taken as a time segment, and the sensor time window is divided.
[0051] Further, before the detection sample is sent into the detection model, the detection sample is further preprocessed, and the preprocessed detection sample is taken as the input of the detection model to train the model.
[0052] The preprocessing comprises:
[0053] normalizing the detection sample to obtain a normalized detection sample;
[0054] adding twice noise to the normalized detection sample as an original sample to obtain a sample pair same as the original sample in category, and taking the sample pair as a positive sample pair;
[0055] performing random mask operation on the positive sample pair to obtain two sample pairs different from the original sample in category, and taking the two sample pairs as negative sample pairs;
[0056] taking the negative sample pairs and the positive sample pair as inputs of a detection model to train the model.
[0057] Specifically, in order to eliminate the influence of scale difference on each sensor data, the divided data needs to be normalized, so that the value of each data point is within the range of 0-1.
[0058] Secondly, the original samples are all obtained under the normal state of the cutter, and are regarded as positive samples. In this application, two samples same as the original samples are obtained by adding twice Gaussian noise to the original samples, that is, both belong to positive samples, and the two positive samples form a positive sample pair. Then, the formed positive sample pair is generated by adding random mask to generate two samples different from the original samples in category, that is, both belong to negative samples, thereby forming a negative sample pair.
[0059] It should be noted that the same category samples are positive examples to each other, and the different category samples are negative examples to each other, that is, the positive sample pairs are positive examples to each other, the negative sample pairs are also positive examples to each other, and the positive samples and the negative samples are negative examples to each other.
[0060] wherein, for each original sample, a sample same as the original sample in category is generated by adding 50 decibel noise. The specific adding method is as follows: the noise power (P n ) is calculated by the noise decibel and the original sample data, and a random signal is generated by using the standard normal distribution, which is added to the original sample data after being multiplied by 2 to obtain the noise value.
[0061] The signal-to-noise ratio formula is as follows:
[0062]
[0063]
[0064] In the formula, P s and P n represent the effective power of the signal and the noise respectively; x(t) represents the signal, that is, the original sample data.
[0065] The way of adding a random mask to the positive class sample pair is as follows:
[0066] A Boolean matrix of the original sample size is randomly generated, and the random matrix is kept unchanged. Then, where the matrix element is Flase, the opposite value of the original value is assigned, and where the matrix element is True, the original sample value is assigned, so that the final generated sample is inconsistent with the original sample class. Since the random matrix remains unchanged, the sample class generated by the random mask method is consistent.
[0067] The method provided by the application encodes the positive class sample pair and the negative class sample pair to obtain vectors, and reduces the dimensions of the vectors to obtain reduced positive class sample vectors and negative class sample vectors; the cosine similarity is used to calculate the similarity between the samples in the low-dimensional space, and the scale cross-entropy loss is used to make the samples of the same class closer in the space, and the samples of different classes farther in the space, so as to obtain the trained detection model. The method improves the efficiency of the training model.
[0068] Step 103: training a detection model according to the detection sample to obtain a trained detection model.
[0069] The following will be described in detail how to train a detection model according to the detection sample to obtain a trained detection model:
[0070] The positive class sample pair and the negative class sample pair are respectively input into the same two encoders to map the positive class sample pair and the negative class sample pair from a high-dimensional space to a new vector space, so as to obtain positive class sample vectors and negative class sample vectors; the positive class sample vectors and the negative class sample vectors are reduced in dimension to obtain reduced positive class sample vectors and negative class sample vectors; the cosine similarity is used to calculate the similarity between the samples in the low-dimensional space, and the scale cross-entropy loss is used to make the samples of the same class closer in the space, and the samples of different classes farther in the space, to obtain the trained detection model.
[0071] Specifically, the application inputs two types of samples into the model for training, learns the general features of the data set by the similarity between the samples of the same class and the difference between the samples of different classes, so that the distance between the samples of the same class is reduced, and the distance between the samples of different classes is increased, and the model framework is as shown in Figure 2
[0072] The application determines the state of a cigarette condenser by comparing a learning neural network model. The application inputs a positive sample pair and a negative sample pair into two identical encoders respectively, maps the sample pair from a high-dimensional space to a new vector space, and outputs a 2048-dimensional vector. That is, the positive sample pair or the negative sample pair is first put into two identical encoders to project the sample to a new vector space. The application uses a ResNet-50 architecture as its encoder, which is referred to as f(·). After the original sample is processed by the encoder, a 2048-dimensional vector h is output.
[0073] Meanwhile, to realize model optimization, the obtained 2048-dimensional vector is put into a neural network composed of two fully connected layers again to project it to a low-dimensional space, and an 128-dimensional vector is output.
[0074] The specific method of model training is as follows: through the way of contrast learning, the similarity between samples of the same class and the difference between different samples are learned, so that the spatial distance between samples of the same class becomes smaller, and the spatial distance between different samples becomes larger. Specifically, the cosine similarity is used to calculate the similarity between samples in the low-dimensional space, and the scale cross-entropy loss is used to make samples of the same class closer in space and samples of different classes farther in space. According to the requirements of the upper input and the actual output, the number of neurons of the fully connected layer is set. The Adam algorithm is selected as the optimization algorithm of the training model, and the Relu function is used as the neuron activation function to train the model.
[0075] In this embodiment, the sample vector h obtained by the f(·) network is put into a small neural network to map the vector representation of the sample to a space that can be compared, that is, a representation space suitable for loss calculation. The small neural network is composed of two fully connected networks, uses ReLU as the activation function, and uses Adam as the model optimization algorithm. The network is referred to as g(·). The h vector representation is processed by g(·) to output a 128-dimensional vector z.
[0076] Through the definition of the loss function, the distance between samples that are positive examples to each other is made smaller, and the distance between samples that are negative examples to each other is made larger.
[0077] The specific formula is as follows:
[0078]
[0079]
[0080] where l i,jLoss represents the loss of sample i and j sample pair, the numerator part is used to describe the similarity degree of the positive sample, and the denominator part represents the sum of the similarity degree of the current sample and the other samples in the batch size, that is, the similarity probability of sample i and j can be represented by the formula. Where z i represents the vector representation of the sample after f(·) and g(·) network, τ represents the temperature parameter, which is used to control the sensitivity of the loss to the negative sample pair, and sim represents the cosine similarity of the two vectors. L represents the loss of all pairs and takes the average, and 2N represents the 2N samples after preprocessing of the N samples in the original batchSize.
[0081] The numerator part of the first formula increases, indicating that the similarity degree of the positive sample increases, and the denominator decreases, indicating that the similarity degree of the negative sample decreases, so as to update the encoder network and the single-layer fully connected network by minimizing L.
[0082] The method for detecting faults of a cigarette drying machine provided by the application obtains positive sample pairs by adding noise to original samples, and obtains negative sample pairs by masking the positive sample pairs. Finally, a detection model is trained according to the positive sample pairs and the negative sample pairs. The method learns the general characteristics of the data set by the similarities between samples of the same category and the differences between samples of different categories, so that the distance between samples of the same category is reduced and the distance between samples of different categories is increased. The model is trained without fault data, thereby improving the accuracy of model detection.
[0083] Step 104: The detection data of the cigarette drying machine in different time windows to be detected is input into the trained detection model in batches, respectively, to obtain prediction results corresponding to different time windows, respectively. The prediction results include positive detection data or negative detection data.
[0084] Step 105: Obtain detection data of the same time window detected by the sensor of the cigarette drying machine in a normal state as standard detection data.
[0085] Step 106: In the case where the prediction result is positive detection data, determine fault detection data according to the prediction result and the standard detection data. The fault detection data is the detection data of all sensors corresponding to a certain time window.
[0086] Specifically, by the trained model, the positive sample space can be minimized, so that the sample data in the normal state of the cutter can be correctly classified, and the minimum threshold score of the positive sample space is counted; by the trained model, the minimum similar space of the random mask sample can be found. However, since the data categories of the training are only positive data and negative data, but the negative data does not represent fault data, so the data in the fault state of the cutter does not belong to the positive class or the negative class, but due to the binary classification problem, the nearest space is selected, so that the fault sample is classified as a normal sample, which is regarded as a false positive class. Therefore, according to the prediction result and the standard detection data, it is further judged whether it is fault detection data. Only in the case of confirming the fault detection data, wavelet decomposition is carried out to determine the number corresponding to the fault sensor, otherwise it is the detection data of the cigarette cutter in the normal state.
[0087] Step 107: performing wavelet decomposition on the fault detection data to determine the number corresponding to the fault sensor.
[0088] Specifically, the present application first detects the overall state of the equipment, so that only in the case of fault of the cutter equipment, the fault detection of each sensor is needed, and the detection method is wavelet decomposition.
[0089] When it is detected that the cutter is in a fault state, the current sensor time window data and the sensor time window data in the normal state are subjected to wavelet decomposition, and the energy of each layer of decomposed wavelet coefficient is calculated, and the difference between the energies in the two states is compared to perform fault detection. Take 100 sensor time window data in the normal state, and select db10 as the wavelet base to perform four-layer single-scale wavelet decomposition, that is, only the high-frequency part is decomposed each time, and the high-frequency part and the low-frequency part are decomposed, and the high-frequency part is further decomposed, and finally CD1, CD2, CD3, CD4 and CA4 five signal components are obtained, wherein CD i represents the high-frequency signal of the i-th layer, and CA i represents the low-frequency signal of the i-th layer. The energy of each signal component is calculated. The energy value calculation formula is as follows:
[0090]
[0091] Through experiments, it is found that the fault state data has a greater impact on the high-frequency signal, so when judging the fault, the energy value of the high-frequency signal is selected for comparison. If the energy value of the high-frequency signal after wavelet decomposition of the current sensor is suddenly changed from the energy value of the normal state data, it means that the current sensor is in a fault state, and the sensor number is output.
[0092] The method provided by the application determines the state of the cigarette cutting dryer device through a comparative learning neural network model, and when a fault occurs, fault positioning is realized through wavelet decomposition, and the sensor number corresponding to the fault part is output. The method makes it necessary to detect the fault of each sensor only when the cutting dryer device has a fault, thereby improving the fault detection efficiency in the case that the cutting dryer device of the cigarette factory has few faults.
[0093] Further, the detailed process of how to determine the fault detection data according to the prediction result and the standard detection data in the case that the prediction result is positive class detection data is described as follows:
[0094] First, the labeled threshold score corresponding to the prediction result in the case that the prediction result is positive class data is determined according to the normal detection data, and the threshold score corresponding to the prediction result is determined. The labeled threshold score is compared with the threshold score respectively, and in the case that the labeled threshold score is greater than the threshold score, the positive class detection data corresponding to the threshold score is taken as the fault detection data. In the case that the labeled threshold score is less than the threshold score, the positive class detection data corresponding to the threshold score is taken as the detection data of the cutting dryer in a normal state.
[0095] Specifically, the standard threshold score is used to avoid the occurrence of false positives in the present application. The standard threshold score is obtained by inputting the normal detection data into the trained detection model according to the prediction result. In the model verification stage, the original sample in the training stage is used to generate an element library through an encoder, and the element library includes the vector data representation and the category label of the original sample. By counting the classification scores of the positive class samples and the element library, the labeled threshold score when the classification is correct is obtained. In the test stage, when the sample is classified as a negative class, it means that the minimum similarity space difference with the normal sample is too large, which belongs to the fault state. When the sample is classified as a positive class, if it is less than the threshold score, it means that the sample is a false positive, and it should be classified as a negative class, otherwise it is a positive class. By counting the labeled threshold score of the positive example sample classified correctly, the classification error of the fault data is reduced. When the sample belongs to the positive class and the score is greater than the threshold score, it means that it is normal data, otherwise it is fault data.
[0096] Figure 3 Fig. 2 is a flowchart of the method for detecting the fault of the cigarette cutting dryer provided by the application. Figure 3 As shown in the figure, the method comprises the following steps:
[0097] S1, collecting the running data of the cigarette cutting dryer from the device sensors through the data acquisition system, and dividing the collected sensor signals into time window data according to the length of the time segment set by the human.
[0098] S2, normalize each time window data, so that the data value is between 0 and 1.
[0099] S3, combine all sensor data in the same time window into a sample according to the sensor number.
[0100] S4, by adding two Gaussian noises to the original sample, two samples with the same category as the original sample are obtained, i.e. both belong to positive class samples, so the two samples form a positive class sample pair.
[0101] S5, add random masks to the positive class sample pair obtained in the previous step to generate two samples with different categories from the original sample, i.e. both belong to negative class samples, so the two samples form a negative class sample pair.
[0102] S6, input the sample pair that is a positive example (i.e. a sample pair of the same category) into the same two encoders, map the sample pair from a high-dimensional space to a new vector space, and output a 2048-dimensional vector.
[0103] S7, put the vector obtained in the previous step into a neural network composed of two fully connected layers, project it to a low-dimensional space, and output a 128-dimensional vector.
[0104] S8, set the number of neurons in the fully connected layer according to the input and actual output requirements. Select Adam algorithm as the optimization algorithm for the training model, and use Relu function as the neuron activation function. Through model training, calculate the similarity between samples in low-dimensional space using cosine similarity, and through scale cross-entropy loss, make the positive examples closer in space and the negative examples farther apart in space.
[0105] S9, model verification stage: use the original samples in the training stage to generate an element library through the encoder, which includes the vector data representation and category label of the original sample. By counting the classification scores of positive samples and the element library, the threshold score of correct classification is obtained.
[0106] S10, model test: when the sample is classified as negative, it means that the minimum similarity space difference with the normal sample is too large, which belongs to the fault state. When classified as positive, if less than the threshold score, it means that the sample is a false positive, which should be classified as negative, otherwise it is a positive class.
[0107] S11, when the current device state is detected as a fault, decompose each sensor time window data by wavelet, and compare it with the wavelet decomposition under normal state. When a sudden change occurs, it is considered as a fault sensor, and its sensor number is output.
[0108] As Figure 4As shown, the cigarette redrying machine fault detection device provided by the present application is described below, and the cigarette redrying machine fault detection device described below can be correspondingly referred to the cigarette redrying machine fault detection method described above.
[0109] A cigarette redrying machine fault detection device comprises:
[0110] An acquisition unit 401 is configured to acquire detection data of each sensor of a cigarette redrying machine.
[0111] A division unit 402 is configured to divide the detection data of each sensor into a plurality of time window data according to time segments, and take the detection data of all sensors corresponding to a same time window as a detection sample.
[0112] A training unit 403 is configured to train a detection model according to the detection sample, and obtain a trained detection model.
[0113] A detection unit 404 is configured to input detection data of different time windows of a cigarette redrying machine to be detected into the trained detection model in batches respectively, and obtain prediction results corresponding to different time windows respectively; the prediction results comprise positive class detection data or negative class detection data.
[0114] The acquisition unit 401 is further configured to acquire detection data of the same time window detected by sensors of the cigarette redrying machine in a normal state, and take the detection data as standard detection data.
[0115] A determination unit 405 is configured to determine fault detection data according to the prediction result and the standard detection data in a case where the prediction result is positive class detection data; the fault detection data is detection data of all sensors corresponding to a certain time window.
[0116] The determination unit 405 is further configured to perform wavelet decomposition on the fault detection data, and determine a number corresponding to a fault sensor.
[0117] Figure 5 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 5 As shown, the electronic device can include a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 can complete mutual communication through the communications bus 540. The processor 510 can invoke a logical instruction in the memory 530 to execute a cigarette redrying machine fault detection method, which comprises:
[0118] Acquire detection data of each sensor of a cigarette cutting dryer;
[0119] Divide the detection data of each sensor into several time window data according to time segments, and take the detection data of all sensors corresponding to the same time window as a detection sample;
[0120] Train a detection model according to the detection sample, and obtain a trained detection model;
[0121] Input the detection data of different time windows of a cigarette cutting dryer to be detected into the trained detection model in batches respectively, and obtain the prediction results corresponding to different time windows respectively; the prediction results include positive class detection data or negative class detection data;
[0122] Acquire detection data of the same time window of sensors of a cigarette cutting dryer under a normal state, and take the detection data as standard detection data;
[0123] In the case that the prediction result is positive class detection data, determine fault detection data according to the prediction result and the standard detection data; the fault detection data is the detection data of all sensors corresponding to a certain time window;
[0124] Carry out wavelet decomposition on the fault detection data, and determine the number corresponding to a fault sensor.
[0125] In addition, the logical instructions in the memory 530 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0126] On the other hand, the present application also provides a computer program product, which comprises a computer program, the computer program can be stored on a non-transitory computer readable storage medium, and the computer program is executed by a processor, so that the computer can execute the cigarette cutting dryer fault detection method provided by the above-mentioned methods.
[0127] In yet another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the method for detecting faults of a cigarette cutting straw machine provided by the above method.
[0128] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0129] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus necessary universal hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some part of the embodiments.
[0130] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting faults in a cigarette cut dryer, characterized in that: include: Obtain detection data from various sensors of the cigarette drying machine; Divide the detection data of each sensor into a plurality of time window data according to time segments, and take the detection data corresponding to all sensors in the same time window as a detection sample; Training a detection model according to the detection sample to obtain a trained detection model; Inputting the detection data of different time windows of the cigarette drying machine to be detected into the trained detection model in batches to obtain prediction results corresponding to the different time windows; the prediction results include: positive detection data or negative detection data; Acquire detection data of the same time window detected by the sensor of the cigarette cut drying machine under normal conditions, and use the detection data as standard detection data; In the case where the prediction result is positive detection data, fault detection data is determined based on the prediction result and the standard detection data; the fault detection data is the detection data of all sensors corresponding to a certain time window; Performing wavelet decomposition on the fault detection data to determine the number corresponding to the fault sensor; Before the test sample is sent to the test model, the test sample is preprocessed; the preprocessed test sample is used as the input of the test model to train the model; The pretreatment includes: performing normalization processing on the test sample to obtain a normalized test sample; Using the normalized detection sample as the original sample, adding noise twice respectively to obtain a sample pair with the same category as the original sample, and using it as the positive sample pair; Performing random masking operations on the positive sample pairs respectively to obtain two sample pairs with different categories from the original sample pairs, and using them as negative sample pairs; Training the model using the negative sample pairs and the positive sample pairs as inputs of the detection model; The training of the model using the negative sample pair and the positive sample pair as inputs of the detection model includes: Inputting the positive sample pair and the negative sample pair into the same two encoders respectively, so that the positive sample pair and the negative sample pair are mapped from the high-dimensional space to a new vector space, thereby obtaining a positive sample vector and a negative sample vector respectively; Performing dimensionality reduction on the positive sample vector and the negative sample vector to obtain a positive sample vector and a negative sample vector after dimensionality reduction; The cosine similarity is used to calculate the similarity between samples in the low-dimensional space, and the scaled cross entropy loss is used to make the samples of the same category closer in space, and the samples of different categories farther in space, thereby obtaining the trained detection model.
2. The method for detecting faults in a cigarette cut dryer according to claim 1, characterized in that: In a case where the prediction result is positive detection data, determining the fault detection data according to the prediction result and the standard detection data includes: Determine, based on the standard test data, a labeling threshold score corresponding to the trained detection model when the prediction result is positive data; Determining a threshold score corresponding to the prediction result; The labeled threshold score is compared with the threshold score respectively. When the labeled threshold score is greater than the threshold score, the positive detection data corresponding to the threshold score is used as the fault detection data.
3. The method for detecting failure of a cut cigarette drying machine according to claim 2, characterized in that: In a case where the labeled threshold score is less than the threshold score, the positive class detection data corresponding to the threshold score is used as the detection data indicating that the cigarette cut dryer is in a normal state.
4. The method for detecting faults in a cigarette cut dryer according to claim 1, wherein: In the case that the prediction result is negative detection data, the negative detection data is used as fault detection data and wavelet decomposition is performed to determine the serial number corresponding to the faulty sensor.
5. A device for executing the method for detecting faults in a cigarette cut dryer according to claim 1, characterized in that: include: An acquisition unit, used to acquire detection data of various sensors of the cigarette cut dryer; A division unit, configured to divide the detection data of each sensor into a plurality of time window data according to time segments; The detection data corresponding to all sensors in the same time window are taken as a detection sample; A training unit, configured to train a detection model based on the detection samples to obtain a trained detection model; A detection unit is configured to input detection data of different time windows of the cigarette drying machine to be detected into the trained detection model in batches to obtain prediction results corresponding to the different time windows; the prediction results include: positive detection data or negative detection data; The acquisition unit is further configured to acquire detection data of the same time window detected by the sensor in the normal state of the cigarette cut drying machine, and use the detection data as standard detection data; a determination unit, configured to determine, when the prediction result is positive detection data, fault detection data based on the prediction result and the standard detection data; the fault detection data being detection data of all sensors corresponding to a certain time window; The determining unit is further configured to perform wavelet decomposition on the fault detection data to determine a serial number corresponding to the fault sensor.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for detecting faults in a cigarette cut drying machine according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting faults in a cigarette cut drying machine according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Disk fault detection method and device, computer equipment and storage medium
CN113656228A
Power failure prediction method and device based on weighted extreme learning machine
CN114154701A