Anomaly detection method of polytetrafluoroethylene tube for cyanide sampling
By performing data correction and abnormality evaluation on the spectral curve of the polytetrafluoroethylene tube, using DTW algorithm and principal component analysis technology, the problems of inaccurate and low efficiency of abnormal detection results of polytetrafluoroethylene tubes in the prior art are solved, and higher detection accuracy and efficiency are achieved.
Patent Information
- Application Number
- CN202510346433.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The existing polytetrafluoroethylene tube abnormality detection methods are inaccurate when comparing pipe fittings of different batches of materials, and the detection results are inaccurate and low efficiency.
By obtaining the spectral curves of different forms of polytetrafluoroethylene tubes, data correction and abnormality evaluation are carried out, and the degree of matching and data difference of the spectral curve are determined by using DTW algorithm and principal component analysis technology, and then the abnormality of the pipe fittings is judged.
It improves the accuracy and efficiency of abnormal detection of PTFE tubes, can more accurately identify the differences in different batches of materials, and improves the reliability of the detection results.
Smart Images

Figure CN119880835A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of material testing, and in particular to a method for detecting abnormalities in a polytetrafluoroethylene tube for cyanide sampling. Background Art
[0002] PTFE pipes are often used in the chemical industry to transport or contain various chemicals, including cyanide, due to their excellent chemical stability and corrosion resistance. All fittings of PTFE pipes are rotationally molded without any plastic welds, making the product more reliable and providing a reliable guarantee for splash-free transportation. The fittings here include elbows, tees, crosses, reducers, etc. The quality inspection of PTFE pipes is to determine whether the PTFE pipes meet the standard requirements and whether there are any abnormalities. If the quality of PTFE pipes is not inspected, it will cause safety problems during the construction and application process, so it is an extremely important step to implement the quality inspection of PTFE pipes.
[0003] The existing method collects the spectral curve data of PTFE tubes of the same type and shape, determines the abnormal data points in the spectral curve data, and then realizes the quality inspection of PTFE tubes. However, when the existing method compares and analyzes PTFE tubes of the same shape, there are certain differences between PTFE tubes of different batches, that is, the standard products and the products to be inspected do not belong to the same batch of materials, resulting in inaccurate quality inspection results. In addition, each PTFE tube to be inspected is compared and analyzed with the standard PTFE tube, which reduces the efficiency of abnormal detection of PTFE tubes. Summary of the invention
[0004] In order to solve the technical problem that the accuracy of the abnormality detection results of the existing polytetrafluoroethylene tubes is low, the purpose of the present invention is to provide a method for detecting abnormalities of polytetrafluoroethylene tubes for cyanide sampling.
[0005] The present invention provides a method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling, comprising the following steps: Obtaining various spectral curves corresponding to polytetrafluoroethylene tubes of different forms to be detected; Divide each spectral curve into a preset number of sub-spectral curves, and use the sub-spectral curves as the first intervals in the spectral curves, and determine the initial matching degree of the target spectral curve corresponding to each first interval according to the absorbance of each data point in each first interval in each spectral curve; Determine each second interval in each first interval according to the slope of each data point in each first interval, and determine the data difference value corresponding to each second interval according to the principal component direction value of each second interval, the vector modulus value and the vector direction of each data point; Determine the data abnormality of each first interval according to the initial matching degree of the target spectral curve corresponding to each first interval and the data difference value corresponding to each second interval, and determine the scaling weight of each data point according to the data abnormality degree of each first interval and the absorbance of each data point; Correcting each spectral curve according to the scaling weight and absorbance of each data point in each spectral curve to obtain each corrected spectral curve, and determining the matching degree of the target spectral curve corresponding to each first interval according to the absorbance of each data point in each first interval of each corrected spectral curve; According to the slope value and absorbance of each data point in each spectral curve, the abnormality degree of each data point is determined, and according to the matching degree of the target spectral curve corresponding to each first interval and the abnormality degree of each data point, it is judged whether there is abnormality in different forms of polytetrafluoroethylene tubes.
[0006] Further, according to the principal component direction value of each second interval, the vector modulus value and the vector direction of each data point, the data difference value corresponding to each second interval is determined, including: Obtaining a first spectral curve and a second spectral curve from each spectral curve, calculating an absolute value of a difference between the principal component direction values of each second interval between the two spectral curves according to the principal component direction values of each second interval in the first spectral curve and the second spectral curve, and using the absolute value of the difference as a first difference index for each second interval in the two spectral curves, wherein the first spectral curve and the second spectral curve are any one of the spectral curves, and the first spectral curve is different from the second spectral curve; Adding the vector modulus value of each data point in each second interval of the first spectral curve and the vector modulus value of each data point in each second interval of the second spectral curve, taking the added value as the denominator of a ratio, and when taking the vector modulus value of each data point in each second interval of the first spectral curve as the numerator of the ratio, taking the ratio as the first difference degree of each data point in each second interval of the first spectral curve, and when taking the vector modulus value of each data point in each second interval of the second spectral curve as the numerator of the ratio, taking the ratio as the first difference degree of each data point in each second interval of the second spectral curve; Performing an addition process on the vector direction of each data point in each second interval of the first spectral curve and the vector direction of each data point in each second interval of the second spectral curve, taking the added value as the denominator of a ratio, and taking the ratio as the second difference degree of each data point in each second interval of the first spectral curve when the vector direction of each data point in each second interval of the first spectral curve is taken as the numerator of the ratio, and taking the ratio as the second difference degree of each data point in each second interval of the second spectral curve when the vector direction of each data point in each second interval of the second spectral curve is taken as the numerator of the ratio; Calculate the cumulative value of the sum of the first difference degree and the second difference degree of each data point in each second interval of the first spectral curve and the second spectral curve, use the cumulative value as the second difference index of each second interval, add the first difference index and the second difference index, and use the value after the addition processing after negative correlation mapping as the data difference value of each second interval.
[0007] Further, according to the initial matching degree of the target spectrum curve corresponding to each first interval and the data difference value corresponding to each second interval, the data abnormality degree of each first interval is determined, including: Performing negative correlation mapping on the initial matching degree of the target spectral curve corresponding to each first interval in the first spectral curve and the second spectral curve, and using the initial matching degree of the target spectral curve after the negative correlation mapping as the first data abnormality degree of each first interval; Screening out the maximum data difference value in each first interval of the first spectral curve and the maximum data difference value in each first interval of the second spectral curve, calculating the cumulative value of the data difference values corresponding to each second interval in each first interval of each spectral curve, taking the cumulative value as the denominator of the ratio, and when taking the maximum data difference value corresponding to each first interval in the first spectral curve as the numerator of the ratio, taking the ratio as the second data abnormality degree of each first interval in the first spectral curve, and when taking the maximum data difference value corresponding to each first interval in the second spectral curve as the numerator of the ratio, taking the ratio as the second data abnormality degree of each first interval in the second spectral curve; The product of the first data abnormality level and the second data abnormality level of each first interval is calculated, and the product is used as the data abnormality level of each first interval.
[0008] Further, according to the data abnormality degree of each first interval and the absorbance of each data point, the scaling weight of each data point is determined, including: Calculate the difference in absorbance of each data point in each first interval between the first spectral curve and the second spectral curve, and determine the degree of data anomaly after negative correlation mapping corresponding to the first interval where each data point in the first spectral curve and the second spectral curve is located; calculate the product of the difference in absorbance of each data point in each first interval and the degree of data anomaly after negative correlation mapping corresponding to the first interval where each data point in the first spectral curve is located, and use the product as the scaling weight of each data point in each first interval in the first spectral curve; calculate the difference in absorbance of each data point in each first interval and the product of the degree of data anomaly after negative correlation mapping corresponding to the first interval where each data point in the second spectral curve is located, and use the product as the scaling weight of each data point in each first interval in the second spectral curve.
[0009] Furthermore, each spectral curve is corrected according to the scaling weight and absorbance of each data point in each spectral curve to obtain each corrected spectral curve, including: According to the scaling weight and absorbance of each data point in the first spectral curve and the absorbance of each data point in the second spectral curve, the corrected absorbance corresponding to each data point in the first spectral curve is determined, and the calculation formula is: in, is the corrected absorbance of each data point in the jth first interval of the first spectral curve, is the first spectral curve, is the serial number of each first interval in the first spectrum curve, is the absorbance of each data point in the jth first interval of the first spectral curve, is the absorbance of each data point in the jth first interval of the second spectral curve, is the second spectral curve, is the scaling weight of each data point in the jth first interval in the first spectral curve; The absorbance of each data point in the first spectral curve is updated to the corrected absorbance to obtain each corrected spectral curve.
[0010] Furthermore, the degree of abnormality of each data point is determined according to the slope value and absorbance of each data point in each spectral curve, including: Determine the neighboring data points of each data point in each spectral curve, calculate the difference between the absorbance of each data point in the first spectral curve and the absorbance of its neighboring data points, and calculate the difference between the absorbance of each data point in the second spectral curve and the absorbance of its neighboring data points; When the product of the absorbance difference corresponding to each data point in the first spectral curve and the slope value is used as the numerator of the ratio, the product of the absorbance difference corresponding to each data point in the second spectral curve and the slope value is used as the denominator of the ratio, and the ratio is used as the abnormality degree of each data point in the first spectral curve; when the product of the absorbance difference corresponding to each data point in the second spectral curve and the slope value is used as the numerator of the ratio, the product of the absorbance difference corresponding to each data point in the first spectral curve and the slope value is used as the denominator of the ratio, and the ratio is used as the abnormality degree of each data point in the second spectral curve.
[0011] Further, judging whether polytetrafluoroethylene tubes of different forms are abnormal is performed based on the matching degree of the target spectrum curve corresponding to each first interval and the abnormal degree of each data point, including: If the matching degree of the target spectral curve corresponding to any first interval is not greater than the preset matching degree threshold, it is determined that the polytetrafluoroethylene tubes of different forms to be detected are abnormal, and the polytetrafluoroethylene tubes with the spectral curve corresponding to the first interval that is not greater than the preset matching degree threshold are regarded as abnormal polytetrafluoroethylene tubes; If the abnormality of any data point is greater than a preset abnormality threshold, it is determined that the polytetrafluoroethylene tubes of different forms to be detected are abnormal, and the polytetrafluoroethylene tubes of the spectrum curve corresponding to the data points greater than the preset abnormality threshold are regarded as abnormal polytetrafluoroethylene tubes; If the matching degree of the target spectrum curve corresponding to any first interval is greater than the preset matching degree threshold and the abnormality degree of any data point is not greater than the preset abnormality degree threshold, it is determined that there is no abnormality in the different forms of polytetrafluoroethylene tubes to be detected.
[0012] Further, determining each second interval in each first interval according to the slope of each data point in each first interval includes: According to the slope of each data point in each first interval, the change trend of the slope of the data points in each first interval is determined, and the change trend is decreasing and increasing. The spectral curve segment corresponding to the continuous decrease or continuous increase is used as the second interval in the first interval.
[0013] Further, according to the absorbance of each data point in each first interval in each spectral curve, determining the initial matching degree of the target spectral curve corresponding to each first interval includes: According to the absorbance of each data point in each first interval of any two spectral curves, the DTW algorithm is used to match any two spectral curves to obtain the initial matching degrees of multiple spectral curves corresponding to each first interval, and the maximum value is selected from the initial matching degrees of multiple spectral curves corresponding to each first interval, and the initial matching degree of the spectral curve corresponding to the maximum value is used as the initial matching degree of the target spectral curve.
[0014] The present invention has the following beneficial effects: The present invention provides a method for detecting abnormalities in polytetrafluoroethylene tubes for cyanide sampling. The method analyzes the degree of abnormality of the polytetrafluoroethylene tube by means of the physical properties of the polytetrafluoroethylene tube. The physical properties here refer to the spectral data of the polytetrafluoroethylene tube, which helps to improve the accuracy of abnormality detection of the polytetrafluoroethylene tube. The scaling weight of each data point in the spectral curve is determined by the data characteristics of the spectral curve corresponding to the polytetrafluoroethylene tubes of different forms to be detected, and the absorbance of each data point in the spectral curve is corrected by using the scaling weight to obtain each corrected spectral curve, and then the matching degree of the target spectral curve corresponding to each first interval in each spectral curve is obtained, which can overcome the defect of inaccurate matching degree caused by too large data amplitude change; when comparing and analyzing the spectral curves corresponding to the polytetrafluoroethylene tubes of different forms to be detected, based on the slope value and absorbance of each data point in each spectral curve, the abnormality degree of each data point can be obtained, which is helpful to detect multiple different forms of polytetrafluoroethylene tubes at the same time, and greatly improve the detection efficiency; analyzing whether the polytetrafluoroethylene tube has abnormalities from two perspectives, namely the matching degree of the target spectral curve corresponding to each first interval and the abnormality degree of the data point, is helpful to improve the completeness of polytetrafluoroethylene tube abnormality detection and enhance the reliability of polytetrafluoroethylene tube abnormality detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 The present invention is a flow chart of a method for detecting abnormalities in a polytetrafluoroethylene tube for cyanide sampling. DETAILED DESCRIPTION
[0017] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0018] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0019] Application scenario of this embodiment: When the spectrometer measures polytetrafluoroethylene tube products of the same material in different forms, the frequency range of the absorption wavelength of the obtained spectral data is the same, but the degree of absorption wavelength is different. Based on the properties of the above spectral data, using the spectral curves corresponding to polytetrafluoroethylene tubes in different forms, it can be judged whether there are abnormal data points in the spectral data of polytetrafluoroethylene tubes in different forms, and based on the judgment results, polytetrafluoroethylene tube abnormality detection can be achieved. Specifically, a method for detecting abnormalities in polytetrafluoroethylene tubes for cyanide sampling is provided, such as Figure 1 As shown, the following steps are included: S1, obtaining various spectral curves corresponding to polytetrafluoroethylene tubes of different forms to be detected.
[0020] It should be noted that each form of polytetrafluoroethylene tube has its corresponding spectral curve. The variation patterns of the spectral curves of polytetrafluoroethylene tube products of the same material and different forms are similar. When any one of the multiple spectral curves is abnormal, the variation pattern of the spectral curve will change, and it will be quite different from the variation patterns of other spectral curves. Based on the data features of multiple spectral curves, by comparing multiple spectral curves, the degree of abnormality of each data point in the multiple spectral curves can be obtained. By analyzing the degree of abnormality of each data point, the spectral curve with abnormality can be determined, thereby realizing abnormal detection of polytetrafluoroethylene tubes. Therefore, the premise for realizing abnormal detection of polytetrafluoroethylene tubes is to obtain the spectral curves corresponding to the different forms of polytetrafluoroethylene tubes to be detected.
[0021] In this embodiment, the spectral data of the polytetrafluoroethylene tubes of different forms to be detected are the basic data for realizing abnormality detection. The spectral data of the polytetrafluoroethylene tubes of different forms are collected using a Fourier transform infrared spectrometer. The spectral data here is a spectral curve, and the spectral curves corresponding to the polytetrafluoroethylene tubes of different forms to be detected are obtained. The polytetrafluoroethylene tubes of different forms can be original plastic samples, products prepared into plastic film types, and polytetrafluoroethylene tubular products. The horizontal coordinate of the spectral curve is the wavelength value, and the vertical coordinate is the absorbance, which is the wavelength amplitude value. In addition, in order to improve the accuracy of the spectral curve, data preprocessing is performed on each spectral curve, specifically, the spectral curves of the three plastic products are denoised using tensor decomposition to obtain each spectral curve after denoising. The implementation process of tensor decomposition denoising is a prior art, which is not within the scope of protection of the present invention and will not be elaborated in detail here.
[0022] S2, dividing each spectral curve into a preset number of sub-spectral curves, taking the sub-spectral curves as the first intervals in the spectral curves, and determining the initial matching degree of the spectral curves corresponding to each first interval according to the absorbance of each data point in each first interval of each spectral curve, wherein the steps include: S21, dividing each spectral curve into a preset number of sub-spectral curves, and using the sub-spectral curves as the first interval in the spectral curve.
[0023] In this embodiment, the wavelength ranges of the spectrum curves of polytetrafluoroethylene tubes of different forms are the same, but the amplitude and law of change of the spectrum curves are different. In order to facilitate the subsequent accurate analysis of the abnormality of each data point of the spectrum curve, each spectrum curve is divided into a preset number of sub-spectral curves, and the sub-spectral curves are used as the first interval. The number of first intervals in each spectrum curve is at least 2. Each spectrum curve will correspond to multiple first intervals. The preset number of sub-spectral curves here can be determined by the implementer according to the actual data characteristics of each spectrum curve, and is not specifically limited.
[0024] S22, determining the initial matching degree of the target spectral curve corresponding to each first interval according to the absorbance of each data point in each first interval in each spectral curve.
[0025] According to the absorbance of each data point in each first interval of any two spectral curves, the DTW algorithm is used to match any two spectral curves to obtain the initial matching degrees of multiple spectral curves corresponding to each first interval, and the maximum value is selected from the initial matching degrees of multiple spectral curves corresponding to each first interval, and the initial matching degree of the spectral curve corresponding to the maximum value is used as the initial matching degree of the target spectral curve.
[0026] It should be noted that the number of data points in the first interval of each spectral curve is the same, but the change amplitude and change law of the data points in the first interval of different spectral curves are different. Therefore, after obtaining the data information of each first interval in each spectral curve, based on the change degree of the data points in each first interval in each spectral curve, the first intervals between any two spectral curves are initially matched, so as to subsequently screen out abnormal data points.
[0027] In this embodiment, there are data fluctuations in the data points within the first interval of each spectral curve, and the degree of data variation is relatively large. In order to improve the accuracy of anomaly detection, the DTW (Dynamic Time Warping) algorithm is used to perform initial matching on each first interval between any two spectral curves in each spectral curve, and obtain the initial matching degree of the spectral curve between each spectral curve and other spectral curves other than itself. For ease of description, this embodiment will take any two spectral curves in each spectral curve as an example. Any two spectral curves may be the first spectral curve and the second spectral curve. When the first spectral curve is the data to be processed, the second spectral curve is the comparison data. When the second spectral curve is the data to be processed, the first spectral curve is the comparison data. When the first spectral curve and the second spectral curve are matched, the initial matching degree of the spectral curves of the first spectral curve and the second spectral curve is the same. The initial matching degree of the spectral curves corresponding to each first interval in the two spectral curves is calculated, and the calculation formula may be: in, is the initial matching degree of the spectral curves corresponding to the j-th first interval in the first spectral curve and the second spectral curve, for The minimum value of is the shortest path in the distance matrix, that is, the maximum similarity between any two spectral curves. N is the number of data points in the jth first interval of the first spectral curve and the second spectral curve. The number of data points in the jth first interval of the first spectral curve is equal to the number of data points in the jth first interval of the second spectral curve. k is the serial number of the data point in the jth first interval of the first spectral curve and the second spectral curve. is the kth data point distance between the first spectral curve and the second spectral curve in the distance matrix generated by the DTW algorithm.
[0028] In the calculation formula of the initial matching degree of the spectral curve, due to the different lengths of different paths, there will be more "point pairs" in longer paths, and more distances will be accumulated for calculation. In order to improve the accuracy of the initial matching degree of the spectral curve, the total distance is divided by the number of data points N in the first interval, that is, the denominator N of the ratio can be used to compensate for regular paths of different lengths. The calculation formula of the initial matching degree of the spectral curve is prior art and is not within the scope of protection of the present invention, and will not be elaborated here.
[0029] It should be noted that when the degree of matching of data points in a pair of first intervals of any two spectral curves is large, it means that the degree of similarity of change of data points of the spectral curves corresponding to the first intervals is large; when the degree of matching of data points in a pair of first intervals of any two spectral curves is small, it means that the degree of similarity of change of data points of the spectral curves corresponding to the first intervals is small.
[0030] So far, this embodiment has obtained multiple initial matching degrees of spectral curves corresponding to each first interval in each spectral curve. When the first interval corresponding to the maximum initial matching degree of the spectral curve has an abnormality, it means that the data to be processed corresponding to the maximum initial matching degree of the spectral curve has an abnormality, so the maximum initial matching degree of the spectral curve corresponding to the first interval is selected as the target initial matching degree of the spectral curve. It is worth noting that each spectral curve can be matched with other spectral curves other than itself, and each first interval can correspond to multiple different initial matching degrees of spectral curves. The number of multiple different initial matching degrees of spectral curves corresponding to each first interval is equal to the number of all spectral curves minus one.
[0031] S3, determining each second interval in each first interval according to the slope of each data point in each first interval, and determining the data difference value corresponding to each second interval according to the principal component direction value of each second interval, the vector modulus value and the vector direction of each data point.
[0032] It should be noted that the data change intervals of the spectral curves of the same material are the same, but the absorption degree of light by polytetrafluoroethylene tubes of different forms is different, that is, the peak values (absorbance) in each spectral curve corresponding to polytetrafluoroethylene tubes of different forms are different. Therefore, it is necessary to scale the absorbance of data points with the same change trend but large peak value differences according to the change degree of data points in each first interval of each spectral curve, so as to improve the accuracy of the matching degree of the target spectral curve. First, determine the data difference value corresponding to each second interval, and the steps include: S31, determining each second interval in each first interval according to the slope of each data point in each first interval.
[0033] According to the slope of each data point in each first interval, the change trend of the slope of the data points in each first interval is determined, and the change trend is decreasing and increasing. The spectral curve segment corresponding to the continuous decrease or continuous increase is used as the second interval in the first interval.
[0034] In this embodiment, after the DTW algorithm is used to calculate the initial matching degree of the spectral curves corresponding to any two forms of polytetrafluoroethylene tubes, there will be a phenomenon of low matching degree caused by the same change trend but different data point peak values. For example, the change trend of the sub-spectral curves of a pair of first intervals in the spectral curves corresponding to any two forms of polytetrafluoroethylene tubes is an increasing trend, but the data point peak value of one sub-spectral curve in the first interval is 80, and the data point peak value of the other sub-spectral curve in the first interval is 10, and the matching degree of the first interval will be relatively low at this time. In order to improve the accuracy of the matching degree of the target spectral curve and facilitate the subsequent calculation of the data difference value corresponding to each second interval, the slope of each data point in each first interval is calculated to obtain the change trend of the slope of the data point in each first interval. The change trend of the slope of the data point can include an increasing trend and a decreasing trend. The spectral curve segment corresponding to the continuous decrease or continuous increase is used as the second interval in the first interval to obtain each second interval in each spectral curve.
[0035] S32, determining the data difference value corresponding to each second interval according to the principal component direction value of each second interval, the vector modulus value and the vector direction of each data point.
[0036] It should be noted that the data difference expressed on a two-dimensional plane refers to the difference in the change of the horizontal coordinate and the vertical coordinate of the data point between different spectral curves, the horizontal coordinate is the wavelength value, and the vertical coordinate is the absorbance. In order to facilitate the analysis of the data characteristics of the spectral curve segment corresponding to the second interval of the same change trend in different spectral curves, based on the horizontal coordinate and the vertical coordinate of each data point in each second interval of each spectral curve, the data difference value corresponding to each second interval is calculated, and the steps include: S321, obtaining a first spectral curve and a second spectral curve in each spectral curve, calculating an absolute value of a difference between the principal component direction values of each second interval between the two spectral curves according to the principal component direction values of each second interval in the first spectral curve and the second spectral curve, and using the absolute value of the difference as a first difference index for each second interval in the two spectral curves.
[0037] In this embodiment, for the convenience of subsequent description, two spectral curves are randomly selected from each spectral curve, and the two spectral curves may be a first spectral curve and a second spectral curve. The first spectral curve is different from the second spectral curve, that is, the shape of the polytetrafluoroethylene tube corresponding to the first spectral curve is different from the shape of the polytetrafluoroethylene tube corresponding to the second spectral curve. Since the vector direction of each data point in each second interval in each spectral curve is continuously changing, the PCA (Principal Component Analysis, principal component analysis technology) principal component analysis algorithm is used to analyze each second interval in the first spectral curve and the second spectral curve based on the vector direction of each data point in each second interval to obtain the principal component direction value of each second interval. The PCA principal component analysis algorithm is a prior art, and its implementation process will not be described in detail at this time.
[0038] After obtaining the principal component direction value of each second interval, the principal component direction value of each second interval in the first spectral curve and the second spectral curve is compared and analyzed from the perspective of the principal component direction to obtain the degree of data difference of each second interval in the first spectral curve and the second spectral curve. Specifically, the absolute value of the difference of the principal component direction value of each second interval between the first spectral curve and the second spectral curve is calculated, and the absolute value of the difference is used as the first difference index of each second interval in the two spectral curves.
[0039] It should be noted that the first difference index of a second interval in the first spectral curve is equal to the first difference index of the second interval in the second spectral curve corresponding to the second interval in the first spectral curve. There is a one-to-one correspondence between the first spectral curve and the second spectral curve. The larger the first difference index of the second interval, the greater the data difference between the two spectral curve segments corresponding to the second interval.
[0040] S322, adding the vector modulus value of each data point in each second interval of the first spectral curve and the vector modulus value of each data point in each second interval of the second spectral curve, and using the added value as the denominator of the ratio. When the vector modulus value of each data point in each second interval of the first spectral curve is used as the numerator of the ratio, the ratio is used as the first difference degree of each data point in each second interval of the first spectral curve. When the vector modulus value of each data point in each second interval of the second spectral curve is used as the numerator of the ratio, the ratio is used as the first difference degree of each data point in each second interval of the second spectral curve.
[0041] In this embodiment, each data point in the first spectral curve is in one-to-one correspondence with each data point in the second spectral curve. The two-dimensional data points in the spectral curve can be represented as a plane vector. The modulus of the plane vector can be obtained by calculating the horizontal and vertical coordinates of the data points. The calculation formula can be: ,in, is the two-dimensional data point in the spectral curve The vector modulus of is a binary function right The partial guide, is a binary function of the spectral curve, is a binary function right The process of calculating the vector modulus of a data point is prior art and will not be elaborated on in detail here.
[0042] S323, adding the vector direction of each data point in each second interval of the first spectral curve and the vector direction of each data point in each second interval of the second spectral curve, and using the added value as the denominator of the ratio. When the vector direction of each data point in each second interval of the first spectral curve is used as the numerator of the ratio, the ratio is used as the second difference degree of each data point in each second interval of the first spectral curve; when the vector direction of each data point in each second interval of the second spectral curve is used as the numerator of the ratio, the ratio is used as the second difference degree of each data point in each second interval of the second spectral curve.
[0043] In this embodiment, the direction of the plane vector can also be calculated by the horizontal and vertical coordinates of the data point, and the calculation formula can be , For data points The vector direction of is a binary function right The partial guide, is a binary function right The partial guide, For The inverse tangent function operation is performed. The process of calculating the vector direction of the data point is prior art and will not be elaborated here.
[0044] S324, calculating the cumulative value of the sum of the first difference degree and the second difference degree of each data point in each second interval of the first spectral curve and the second spectral curve, taking the cumulative value as the second difference index of each second interval, adding the first difference index and the second difference index, and taking the value after the addition processing after negative correlation mapping as the data difference value of each second interval.
[0045] Based on steps S321 to S324, the data difference values corresponding to each second interval in the first spectral curve and the second spectral curve can be obtained. The calculation process of the data difference values corresponding to each second interval in the first spectral curve is similar to that of the data difference values corresponding to each second interval in the second spectral curve. Taking the first spectral curve as an example, the data difference values corresponding to each second interval in the first spectral curve are calculated, and the calculation formula can be: in, is the data difference value corresponding to the jth second interval in the first spectrum curve, is the first spectral curve, is the second spectral curve, j is the serial number of the second interval in the spectral curve, is the principal component direction value of the jth second interval in the first spectral curve, is the principal component direction value of the jth second interval in the second spectral curve, is the first difference index of the j-th second interval in the first spectral curve, is the natural constant e The exponential function is: n is the number of data points in the jth second interval of the first spectrum curve, i is the sequence number of the data point in the jth second interval of the first spectrum curve, is the vector modulus of the ith data point in the jth second interval of the first spectral curve, is the vector modulus of the ith data point in the jth second interval of the second spectral curve, is the first difference degree of the i-th data point in the j-th second interval in the first spectral curve, is the vector direction of the ith data point in the jth second interval of the first spectral curve, is the vector direction of the ith data point in the jth second interval of the second spectral curve, is the second difference degree of the i-th data point in the j-th second interval in the first spectral curve, is the second difference index of the j-th second interval in the first spectral curve.
[0046] In the above data difference value calculation formula, It can represent the difference degree of the j-th pair of spectral curve segments corresponding to the first spectral curve and the second spectral curve in the principal component direction. The greater the difference degree, the greater the difference in the change of the data points of the two spectral curve segments. and It can represent the degree of difference in vector modulus and vector direction of the i-th data point in the j-th pair of spectral curve segments corresponding to the first spectral curve and the second spectral curve. The greater the difference between the vector moduli of the data points, the greater the difference in the ordinates of the data points; the greater the difference between the vector directions of the data points, the greater the difference in the slopes of the data points.
[0047] It should be noted that when analyzing the difference between the two sets of data corresponding to the two spectral curves, the original values of the two sets of data are relatively large. In order to facilitate the comparison of the data change trends of the two sets of data, the two-dimensional data points are converted into two-dimensional plane vectors, which can better represent the change differences between the data points of different spectral curves and improve the accuracy of the data difference value corresponding to the second interval. If the data difference value of a second interval is large, it means that the difference in the data change trend between the to-be-processed data and the comparison data corresponding to the second interval is large, the data similarity is small, and the possibility of abnormality in the to-be-processed data corresponding to the second interval is relatively large.
[0048] S4, determining the data abnormality of each first interval according to the initial matching degree of the target spectral curve corresponding to each first interval and the data difference value corresponding to each second interval, and determining the scaling weight of each data point according to the data abnormality degree of each first interval and the absorbance of each data point thereof, wherein the steps include: S41, determining the degree of data abnormality of each first interval according to the initial matching degree of the target spectrum curve corresponding to each first interval and the data difference value corresponding to each second interval.
[0049] It should be noted that in order to improve the calculation efficiency of the data anomaly degree and facilitate the comparison of pairwise spectral curves, the maximum data difference value in each first interval will be used to characterize the data difference degree in the first interval, and the maximum data difference value will be used as the optimal data difference value corresponding to the first interval. By analyzing the initial matching degree and the optimal data difference value of the target spectral curve corresponding to each first interval in the pairwise spectral curves, the data anomaly degree of each first interval in each spectral curve is determined. Taking the first spectral curve and the second spectral curve as examples, the second data anomaly degree of each first interval in the first spectral curve and the second spectral curve is calculated. The specific steps include: S411, negative correlation mapping is performed on the initial matching degree of the target spectrum curve corresponding to each first interval in the first spectrum curve and the second spectrum curve, and the initial matching degree of the target spectrum curve after the negative correlation mapping is used as the first data abnormality degree of each first interval.
[0050] It should be noted that each spectral curve has its corresponding initial matching degree of the target spectral curve. The negative correlation mapping of the initial matching degree of the target spectral curve is to reasonably describe the relationship between the initial matching degree of the target spectral curve and the abnormal degree of the first data, that is, the greater the initial matching degree of the target spectral curve, the smaller the abnormal degree of the first data.
[0051] S412, screening out the maximum data difference value in each first interval in the first spectral curve and the maximum data difference value in each first interval in the second spectral curve, calculating the cumulative value of the data difference values corresponding to each second interval in each first interval of each spectral curve, taking the cumulative value as the denominator of the ratio, when the maximum data difference value corresponding to each first interval in the first spectral curve is taken as the numerator of the ratio, taking the ratio as the second data abnormality degree of each first interval in the first spectral curve, when the maximum data difference value corresponding to each first interval in the second spectral curve is taken as the numerator of the ratio, taking the ratio as the second data abnormality degree of each first interval in the second spectral curve.
[0052] S413, calculating the product of the first data abnormality degree and the second data abnormality degree of each first interval, and taking the product as the data abnormality degree of each first interval.
[0053] In this embodiment, the calculation formula for the data abnormality degree in the first interval of the first spectrum curve may be: in, is the data abnormality degree of the jth first interval in the first spectrum curve, is the first spectral curve, j is the serial number of the first interval in the first spectral curve, e is a natural constant, is the initial matching degree of the target spectral curve corresponding to the j-th first interval in the first spectral curve, is the first data abnormality degree of the jth first interval in the first spectrum curve, The data difference value corresponding to each second interval in the jth first interval in the first spectrum curve, is the maximum data difference value corresponding to the j-th first interval in the first spectral curve, r is the serial number of each spectral curve, 3 is the number of spectral curves, and the number of spectral curves is set to 3 in this embodiment. is the data difference value corresponding to each second interval in the jth first interval in the rth spectral curve, is the second data abnormality degree of the j-th first interval in the first spectrum curve.
[0054] In the calculation formula of data anomaly degree, the initial matching degree of the target spectrum curve The smaller the value, the greater the degree of data difference, so an exponential function is used to change the monotonicity of the function; the spectral curve with the largest data difference is more likely to be abnormal, so when comparing the first interval of each pair of two spectral curves, the maximum data difference value in the first interval is used. To characterize the degree of data abnormality in the first interval; The cumulative sum of the data difference values corresponding to each second interval in each first interval of the three spectral curves is characterized. Since this embodiment performs abnormality detection on three different forms of polytetrafluoroethylene tube products, the data difference values corresponding to each second interval are also three groups, so the upper limit of the number of spectral curves r is 3.
[0055] It should be noted that the degree of data anomaly in each first interval is helpful for subsequently determining the scaling weight of each data point. Analysis from two perspectives can effectively improve the reference value of the degree of data anomaly in the first interval, thereby improving the accuracy of polytetrafluoroethylene tube anomaly detection.
[0056] S42, determining a scaling weight for each data point according to the degree of data abnormality in each first interval and the absorbance of each data point.
[0057] It should be noted that the spectral curve with a larger degree of data anomaly has larger changes in curve amplitude and trend. Therefore, the absorbance of each data point can be scaled based on the degree of data anomaly. The greater the degree of data anomaly, the smaller the degree of matching of the data points in the first interval, and the greater the scaling weight when performing the scaling process; the smaller the degree of data anomaly, the greater the degree of matching of the data points in the first interval, and the smaller the scaling weight when performing the scaling process.
[0058] In this embodiment, the absorbance of each data point is scaled based on the degree of data abnormality in each first interval, so as to reduce the matching difference between the spectral curves corresponding to the polytetrafluoroethylene tubes of different forms. Taking the first spectral curve and the second spectral curve as an example, specifically: S421, calculating the difference in absorbance of each data point in each first interval between the first spectral curve and the second spectral curve, and determining the data abnormality degree after negative correlation mapping corresponding to the first interval where each data point in the first spectral curve and the second spectral curve is located.
[0059] S422, calculating the product of the absorbance difference of each data point in each first interval and the data abnormality degree after negative correlation mapping corresponding to the first interval where each data point in the first spectral curve is located, and using the product as the scaling weight of each data point in each first interval in the first spectral curve.
[0060] The calculation formula for the scaling weight of each data point in each first interval of the first spectrum curve may be: in, is the scaling weight of each data point in the jth first interval of the first spectral curve, is the first spectral curve, is the serial number of each first interval in the first spectrum curve, is the absorbance of each data point in the jth first interval of the first spectral curve, is the absorbance of each data point in the jth first interval of the second spectral curve, is the second spectral curve, is the data abnormality degree of the jth first interval in the first spectrum curve, The base is the natural constant e, is the exponential function of the exponent, that is, the degree of data abnormality after negative correlation mapping, For Perform normalization.
[0061] In the calculation formula of the scaling weight of the data point, It can characterize the amplitude difference between two spectral curves. The degree of abnormality of the data points in the first interval can be characterized. The greater the amplitude difference and the smaller the abnormality, the greater the scaling weight required for the data point. By calculating the scaling weights between the two spectral curves, the absorbance of each data point in each spectral curve is scaled to reduce the difference between data points with the same change trend, so as to obtain accurate data change relationships in the subsequent process.
[0062] S423, calculating the product of the absorbance difference of each data point in each first interval and the data anomaly degree after negative correlation mapping corresponding to the first interval where each data point in the second spectral curve is located, and using the product as the scaling weight of each data point in each first interval in the second spectral curve.
[0063] S5, correcting each spectral curve according to the scaling weight and absorbance of each data point in each spectral curve to obtain each corrected spectral curve, and determining the matching degree of the target spectral curve corresponding to each first interval according to the absorbance of each data point in each first interval in each corrected spectral curve.
[0064] In this embodiment, taking the first spectral curve as an example, based on the scaling weight of each data point in the first spectral curve, the absorbance of each data point can be corrected to obtain the corrected absorbance of each data point in the first spectral curve, and the calculation formula can be: in, is the corrected absorbance of each data point in the jth first interval of the first spectral curve, is the first spectral curve, is the serial number of each first interval in the first spectrum curve, is the absorbance of each data point in the jth first interval of the first spectral curve, is the absorbance of each data point in the jth first interval of the second spectral curve, is the second spectral curve, is the scaling weight of each data point in the j-th first interval in the first spectral curve.
[0065] Scaling weights in the calculation formula for corrected absorbance is the weight of the absorbance difference of the data points in the two spectral curves, which helps to obtain a more accurate corrected absorbance. It should be noted that, for the convenience of description, when performing data calculation in this embodiment, the first spectral curve is used as the data to be processed and the second spectral curve is used as the comparison data. is the scaling weight of each data point in the jth first interval in the first spectral curve, so here the absorbance of each data point in the first spectral curve is corrected.
[0066] After obtaining the corrected absorbance of each data point in each spectral curve, the absorbance of each data point in each spectral curve is updated based on the corrected absorbance of each data point, that is, the absorbance of each data point in each spectral curve is updated to the corrected absorbance, and each corrected spectral curve can be obtained. Furthermore, based on the absorbance of each data point in each first interval in each corrected spectral curve, with reference to the realization process of the initial matching degree of the target spectral curve in step S22, a more accurate and higher spectral curve matching degree corresponding to each first interval can be obtained, and each first interval can correspond to multiple spectral curve matching degrees at this time. In order to improve the calculation efficiency, it is determined that each first interval can correspond to the maximum value of multiple spectral curve matching degrees, and the spectral curve matching degree corresponding to the maximum value is used as the target spectral curve matching degree of the first interval.
[0067] S6, determining the abnormality of each data point according to the slope value and absorbance of each data point in each spectral curve, and judging whether there is abnormality in different forms of polytetrafluoroethylene tubes according to the matching degree of the target spectral curve corresponding to each first interval and the abnormality of each data point, the steps include: S61, determining the abnormality degree of each data point according to the slope value and absorbance of each data point in each spectral curve.
[0068] In the spectral curves of polytetrafluoroethylene tubes of different forms, if a certain spectral curve has a data point that is obviously different from other spectral curves, it is determined that the data point is greatly affected by the quality problem of the polytetrafluoroethylene tube. The obvious difference here means that compared with the data points at the same wavelength position of other spectral curves, the absorbance of the obviously different data point will undergo a large data change. Therefore, in order to improve the accuracy of polytetrafluoroethylene tube abnormality detection, based on the slope value and absorbance of each data point in each spectral curve, the abnormality of each data point is calculated to facilitate the subsequent judgment of whether there is an abnormality in polytetrafluoroethylene tubes of different forms. The specific steps include: In order to facilitate the determination of the data value change within the neighborhood range of the data point, it is necessary to manually determine the neighborhood data points of each data point in each spectral curve. The neighborhood data points here refer to the data points adjacent to the data points, and the distance between the neighborhood data points and the data points can be 10 data points. Then, the difference between the absorbance of each data point in the first spectral curve and the absorbance of its neighborhood data points is calculated. When the product of the absorbance difference corresponding to each data point in the first spectral curve and the slope value is used as the numerator of the ratio, the product of the absorbance difference corresponding to each data point in the second spectral curve and the slope value is used as the denominator of the ratio, and the ratio is used as the abnormality of each data point in the first spectral curve; when the product of the absorbance difference corresponding to each data point in the second spectral curve and the slope value is used as the numerator of the ratio, the product of the absorbance difference corresponding to each data point in the first spectral curve and the slope value is used as the denominator of the ratio, and the ratio is used as the abnormality of each data point in the second spectral curve.
[0069] In this embodiment, taking the first spectrum curve as an example, the abnormality degree of each data point in the first spectrum curve is calculated, and the calculation formula thereof may be: in, is the abnormality degree of the i-th data point in the first spectral curve, i is the serial number of each data point in the spectral curve, is the first spectral curve, is the slope value of the i-th data point in the first spectral curve, is the absorbance of the ith data point in the first spectral curve, is the absorbance of the i+tth data point in the first spectral curve, the i+tth data point is the neighborhood data point of the i-th data point, is the slope value of the i-th data point in the second spectral curve, is the second spectral curve, is the absorbance of the ith data point in the second spectral curve, is the absorbance of the i+tth data point in the second spectral curve.
[0070] In the calculation formula of abnormality degree, and Can represent the neighborhood range of the data point The degree of change in the absorbance of the data point of the spectral curve within t can be set by the implementer to 10. In order to obtain obvious data abnormal points, the degree of abnormality at the data point position can be characterized by comparing the slope values of the data points in the two spectral curves. If the i-th data point in the first spectral curve is abnormal, there is a large difference in the slope change between the i-th data point in the first spectral curve and the i-th data point in the second spectral curve, and the neighborhood range is The absorbance of the internal data point will also change greatly, so the use of slope value and absorbance can effectively improve the accuracy of the abnormality value of the data point. If there is a curve change between the first spectral curve and the second spectral curve, the slope value and absorbance at the data point position where the curve changes will also change, that is, the ratio Reduced to distinguish data points with data changes at the same position.
[0071] It should be noted that when judging whether a certain spectral curve is abnormal, the data feature information of the spectral curve needs to be placed at the molecular position of the ratio for calculation, which helps to obtain the degree of abnormality of each data point in each spectral curve. Compare the data points in spectral curves of different forms. Determining the degree of abnormality of the data point helps to obtain data points with a large degree of abnormality, but it cannot filter out data points with the same data change trend but a large degree of data abnormality. Therefore, when judging whether the polytetrafluoroethylene tube is abnormal in the subsequent determination, two judgment indicators, namely the target spectral curve matching degree and the degree of abnormality, are used to realize abnormal judgment, which helps to improve the completeness of the abnormal judgment of the polytetrafluoroethylene tube.
[0072] S62, judging whether there is any abnormality in the polytetrafluoroethylene tubes of different shapes according to the matching degree of the target spectrum curve corresponding to each first interval and the abnormality degree of each data point.
[0073] In this embodiment, the matching degree of the target spectral curve corresponding to each first interval in each spectral curve and the abnormality degree of each data point are used to reflect whether the spectral curve corresponding to the polytetrafluoroethylene tube of different forms has abnormalities. If there is an abnormality, the abnormality degree of the data point is large or the matching degree of the target spectral curve corresponding to the first interval is small, and the specific contents include: If the matching degree of the target spectral curve corresponding to any first interval is not greater than the preset matching degree threshold, it is determined that there is an abnormality in the polytetrafluoroethylene tubes of different forms to be detected, and the polytetrafluoroethylene tube of the spectral curve corresponding to the first interval that is not greater than the preset matching degree threshold is taken as an abnormal polytetrafluoroethylene tube; if the abnormality degree of any data point is greater than the preset abnormality threshold, it is determined that there is an abnormality in the polytetrafluoroethylene tubes of different forms to be detected, and the polytetrafluoroethylene tube of the spectral curve corresponding to the data point greater than the preset abnormality threshold is taken as an abnormal polytetrafluoroethylene tube; if the matching degree of the target spectral curve corresponding to any first interval is greater than the preset matching degree threshold and the abnormality degree of any data point is not greater than the preset abnormality threshold, it is determined that there is no abnormality in the polytetrafluoroethylene tubes of different forms to be detected.
[0074] It should be noted that the preset matching degree threshold can be set to 0.87, and the preset abnormality degree threshold can be set to 2.4. The set thresholds are all empirical thresholds, and implementers can set them according to different real-time situations. In order to improve the accuracy of abnormality detection, when the abnormality of any data point is greater than the preset abnormality degree threshold, the data point is marked, and then the data point is compared and analyzed with the data points in other spectral curves to verify whether the data point here is abnormal, which helps to improve the accuracy of the abnormal detection results of the polytetrafluoroethylene tube. If there are abnormalities in the polytetrafluoroethylene tubes of different forms to be detected, the abnormal polytetrafluoroethylene tubes can be selected, which can effectively improve the reliability of the quality detection of abnormal polytetrafluoroethylene tubes.
[0075] The present invention provides a method for detecting abnormalities in polytetrafluoroethylene tubes for cyanide sampling. The method analyzes the abnormality degree and matching degree of each data point in different spectral curves according to the data change characteristics of spectral curves corresponding to polytetrafluoroethylene tubes of different forms, so as to judge whether there are abnormalities in polytetrafluoroethylene tubes of different forms, thereby effectively improving the accuracy and efficiency of polytetrafluoroethylene tube abnormality detection.
[0076] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling, characterized in that: The following steps are involved: Obtaining various spectral curves corresponding to polytetrafluoroethylene tubes of different forms to be detected; Divide each spectral curve into a preset number of sub-spectral curves, and use the sub-spectral curves as the first intervals in the spectral curves, and determine the initial matching degree of the target spectral curve corresponding to each first interval according to the absorbance of each data point in each first interval in each spectral curve; Determine each second interval in each first interval according to the slope of each data point in each first interval, and determine the data difference value corresponding to each second interval according to the principal component direction value of each second interval, the vector modulus value and the vector direction of each data point; Determine the data abnormality of each first interval according to the initial matching degree of the target spectral curve corresponding to each first interval and the data difference value corresponding to each second interval, and determine the scaling weight of each data point according to the data abnormality of each first interval and the absorbance of each data point; Correcting each spectral curve according to the scaling weight and absorbance of each data point in each spectral curve to obtain each corrected spectral curve, and determining the matching degree of the target spectral curve corresponding to each first interval according to the absorbance of each data point in each first interval of each corrected spectral curve; According to the slope value and absorbance of each data point in each spectral curve, the abnormality degree of each data point is determined, and according to the matching degree of the target spectral curve corresponding to each first interval and the abnormality degree of each data point, it is judged whether there is abnormality in different forms of polytetrafluoroethylene tubes.
2. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 1, characterized in that: Determining the initial matching degree of the target spectral curve corresponding to each first interval according to the absorbance of each data point in each first interval in each spectral curve includes: According to the absorbance of each data point in each first interval of any two spectral curves, the DTW algorithm is used to match any two spectral curves to obtain the initial matching degrees of multiple spectral curves corresponding to each first interval, and the maximum value is selected from the initial matching degrees of multiple spectral curves corresponding to each first interval, and the initial matching degree of the spectral curve corresponding to the maximum value is used as the initial matching degree of the target spectral curve.
3. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 1, characterized in that: Determining each second interval in each first interval according to the slope of each data point in each first interval includes: According to the slope of each data point in each first interval, the change trend of the slope of the data points in each first interval is determined, and the change trend is decreasing and increasing. The spectral curve segment corresponding to the continuous decrease or continuous increase is used as the second interval in the first interval.
4. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 1, characterized in that: Determining the data difference value corresponding to each second interval according to the principal component direction value of each second interval, the vector modulus value and the vector direction of each data point, including: Obtaining a first spectral curve and a second spectral curve from each spectral curve, calculating an absolute value of a difference between the principal component direction values of each second interval between the two spectral curves according to the principal component direction values of each second interval in the first spectral curve and the second spectral curve, and using the absolute value of the difference as a first difference index for each second interval in the two spectral curves, wherein the first spectral curve and the second spectral curve are any one of the spectral curves, and the first spectral curve is different from the second spectral curve; Adding the vector modulus value of each data point in each second interval of the first spectral curve and the vector modulus value of each data point in each second interval of the second spectral curve, taking the added value as the denominator of a ratio, and when taking the vector modulus value of each data point in each second interval of the first spectral curve as the numerator of the ratio, taking the ratio as the first difference degree of each data point in each second interval of the first spectral curve, and when taking the vector modulus value of each data point in each second interval of the second spectral curve as the numerator of the ratio, taking the ratio as the first difference degree of each data point in each second interval of the second spectral curve; Performing an addition process on the vector direction of each data point in each second interval of the first spectral curve and the vector direction of each data point in each second interval of the second spectral curve, taking the added value as the denominator of a ratio, and taking the ratio as the second difference degree of each data point in each second interval of the first spectral curve when the vector direction of each data point in each second interval of the first spectral curve is taken as the numerator of the ratio, and taking the ratio as the second difference degree of each data point in each second interval of the second spectral curve when the vector direction of each data point in each second interval of the second spectral curve is taken as the numerator of the ratio; Calculate the cumulative value of the sum of the first difference degree and the second difference degree of each data point in each second interval of the first spectral curve and the second spectral curve, use the cumulative value as the second difference index of each second interval, add the first difference index and the second difference index, and use the value after the addition processing after negative correlation mapping as the data difference value of each second interval.
5. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 4, characterized in that: Determining the data abnormality degree of each first interval according to the initial matching degree of the target spectrum curve corresponding to each first interval and the data difference value corresponding to each second interval includes: Performing negative correlation mapping on the initial matching degree of the target spectral curve corresponding to each first interval in the first spectral curve and the second spectral curve, and using the initial matching degree of the target spectral curve after the negative correlation mapping as the first data abnormality degree of each first interval; Screening out the maximum data difference value in each first interval of the first spectral curve and the maximum data difference value in each first interval of the second spectral curve, calculating the cumulative value of the data difference values corresponding to each second interval in each first interval of each spectral curve, taking the cumulative value as the denominator of the ratio, and when taking the maximum data difference value corresponding to each first interval in the first spectral curve as the numerator of the ratio, taking the ratio as the second data abnormality degree of each first interval in the first spectral curve, and when taking the maximum data difference value corresponding to each first interval in the second spectral curve as the numerator of the ratio, taking the ratio as the second data abnormality degree of each first interval in the second spectral curve; The product of the first data abnormality level and the second data abnormality level of each first interval is calculated, and the product is used as the data abnormality level of each first interval.
6. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 5, characterized in that: According to the data abnormality degree of each first interval and the absorbance of each data point, the scaling weight of each data point is determined, including: Calculate the difference in absorbance of each data point in each first interval between the first spectral curve and the second spectral curve, and determine the degree of data anomaly after negative correlation mapping corresponding to the first interval where each data point in the first spectral curve and the second spectral curve is located; calculate the product of the difference in absorbance of each data point in each first interval and the degree of data anomaly after negative correlation mapping corresponding to the first interval where each data point in the first spectral curve is located, and use the product as the scaling weight of each data point in each first interval in the first spectral curve; calculate the difference in absorbance of each data point in each first interval and the product of the degree of data anomaly after negative correlation mapping corresponding to the first interval where each data point in the second spectral curve is located, and use the product as the scaling weight of each data point in each first interval in the second spectral curve.
7. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 6, characterized in that: According to the scaling weight and absorbance of each data point in each spectral curve, each spectral curve is corrected to obtain each corrected spectral curve, including: According to the scaling weight and absorbance of each data point in the first spectral curve and the absorbance of each data point in the second spectral curve, the corrected absorbance corresponding to each data point in the first spectral curve is determined, and the calculation formula is: in, is the corrected absorbance of each data point in the jth first interval of the first spectral curve, is the first spectral curve, is the serial number of each first interval in the first spectrum curve, is the absorbance of each data point in the jth first interval of the first spectral curve, is the absorbance of each data point in the jth first interval of the second spectral curve, is the second spectral curve, is the scaling weight of each data point in the jth first interval in the first spectral curve; The absorbance of each data point in the first spectral curve is updated to the corrected absorbance to obtain each corrected spectral curve.
8. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 1, characterized in that: According to the slope value and absorbance of each data point in each spectral curve, the abnormality degree of each data point is determined, including: Determine the neighboring data points of each data point in each spectral curve, calculate the difference between the absorbance of each data point in the first spectral curve and the absorbance of its neighboring data points, and calculate the difference between the absorbance of each data point in the second spectral curve and the absorbance of its neighboring data points; When the product of the absorbance difference corresponding to each data point in the first spectral curve and the slope value is used as the numerator of the ratio, the product of the absorbance difference corresponding to each data point in the second spectral curve and the slope value is used as the denominator of the ratio, and the ratio is used as the abnormality degree of each data point in the first spectral curve; when the product of the absorbance difference corresponding to each data point in the second spectral curve and the slope value is used as the numerator of the ratio, the product of the absorbance difference corresponding to each data point in the first spectral curve and the slope value is used as the denominator of the ratio, and the ratio is used as the abnormality degree of each data point in the second spectral curve.
9. The method for detecting abnormality of a polytetrafluoroethylene tube for cyanide sampling according to claim 1, characterized in that: According to the matching degree of the target spectrum curve corresponding to each first interval and the abnormality degree of each data point, it is judged whether the polytetrafluoroethylene tubes of different forms have abnormalities, including: If the matching degree of the target spectral curve corresponding to any first interval is not greater than the preset matching degree threshold, it is determined that the polytetrafluoroethylene tubes of different forms to be detected are abnormal, and the polytetrafluoroethylene tubes with the spectral curve corresponding to the first interval that is not greater than the preset matching degree threshold are regarded as abnormal polytetrafluoroethylene tubes; If the abnormality of any data point is greater than a preset abnormality threshold, it is determined that the polytetrafluoroethylene tubes of different forms to be detected are abnormal, and the polytetrafluoroethylene tubes of the spectrum curve corresponding to the data points greater than the preset abnormality threshold are regarded as abnormal polytetrafluoroethylene tubes; If the matching degree of the target spectrum curve corresponding to any first interval is greater than the preset matching degree threshold and the abnormality degree of any data point is not greater than the preset abnormality degree threshold, it is determined that there is no abnormality in the different forms of polytetrafluoroethylene tubes to be detected.
Citation Information
Patent Citations
Flow injection colorimetry cyanogen measuring instrument for measuring cyanide content
CN101441178A
Method for quantitative analysis of content of components in polytetrafluoroethylene blend material
CN106908469A
Method for measuring concentration of trace sulfur dioxide in air
CN117030654A
Automobile part coating color difference abnormity detection system based on spectral data
CN117349683A
Ammonia escape in-situ measurement method and system based on laser spectrum technology
CN118518627A
Cited By
Rapid determination method for rare earth metal in alloy
CN120293875A