Cable production quality detection and management method and system based on data analysis
By segmenting the cable cross-sectional images, establishing an insulation resistance detection allocation model, and using improved dung optimization algorithm and LSTM neural network, the problems of low automation and insufficient accuracy of traditional cable detection are solved, and efficient and accurate cable quality detection and prediction are achieved.
Patent Information
- Application Number
- CN202510309889.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional cable production quality inspection methods have low degree of automation, inaccurate testing results, non-destructive testing cannot be achieved, and cable quality cannot be predicted, which poses safety hazards.
By obtaining the cross-sectional image of the cable sample, the conductor and insulation layer areas are segmented using a clustering algorithm, an insulation resistance detection allocation model is established in combination with local discharge and voltage resistance detection, the model is solved using an improved dung optimization algorithm, and the LSTM neural network is trained for quality prediction.
It improves detection efficiency and accuracy, reduces detection time, provides accurate quality prediction reference, and reduces safety risks.
Smart Images

Figure CN120374508A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of quality inspection, and specifically to a method and system for quality inspection and management of cable production based on data analysis. Background Art
[0002] Chinese Patent CN117709799B discloses a sampling inspection system and method for the on-line quality of motor housings. The method specifically includes obtaining inspection samples, formulating inspection standards at the same time, and using stratified sampling to obtain motor housing samples; first, performing appearance inspection, dimension inspection, material inspection, and performance inspection on the motor housing samples to obtain motor housing sample data, evaluating the quality of the motor housing samples according to the motor housing sample data, setting inspection standards, and judging whether the motor housing samples are qualified through comparison to obtain inspection results; comprehensively evaluating the motor housing samples according to the inspection results and performing classification processing to obtain qualified products and unqualified products, thus completing the on-line quality inspection of the motor housing. However, this invention simply relies on traditional data processing methods to achieve quality inspection, with slow inspection speed and errors.
[0003] Traditional methods for quality inspection of cable production usually use manual inspection means. Often, due to the complicated inspection process and low automation level, the accuracy of inspection results cannot be guaranteed; at the same time, when inspecting the quality of cable production, traditional methods for quality inspection of cable production cannot guarantee non-destructive inspection, nor can they predict the quality of cables, which is likely to cause safety accidents. Summary of the Invention
[0004] In view of the problems in the related art, the present invention provides a method and system for quality inspection and management of cable production based on data analysis to overcome the above-mentioned technical problems existing in the related art.
[0005] To solve the above technical problems, the present invention is realized through the following technical solutions:
[0006] The present invention is a method for quality inspection and management of cable production based on data analysis, including the following steps:
[0007] S1. Obtain cable samples, obtain cable cross-section images, form an initial cable cross-section image set, segment and extract the conductor region and insulation layer region of the initial cable cross-section images in the initial cable cross-section image set, and then calculate the thickness of the insulation layer region;
[0008] S2. Perform partial discharge and withstand voltage tests on the cable samples to obtain the insulation resistance values of the cable samples, establish a minimum detection point allocation function according to the insulation resistance values of the cable samples, and set constraint conditions to obtain an insulation resistance detection allocation model;
[0009] S3. Solve the insulation resistance detection allocation model using the improved dung beetle optimization algorithm, and record the current optimal solution of the insulation resistance detection allocation model using the greedy strategy until the solution process ends to obtain the global optimal solution, and use the global optimal solution to solve for the insulation resistance detection result;
[0010] S4. Combine the insulation layer region thickness and the insulation resistance detection result to detect the production quality of the cable, and obtain the cable quality detection result; then train the LSTM neural network to obtain the LSTM neural network quality prediction model to realize the prediction of the cable production quality.
[0011] The invention obtains the cable cross-section image of the cable sample, according to the pixel point gradient, uses the clustering algorithm to merge the pixel points to obtain pixel blocks, then finds the contour of the insulation layer region, and segments and extracts the conductor region and the insulation layer region; this method effectively improves the calculation speed through clustering, reduces the complexity of subsequent processing, and cleverly selects the candidate points of the insulation layer, and obtains the contour through the iterative merging method, and the extracted contour is accurate; secondly, perform partial discharge and withstand voltage detection, calculate the insulation resistance value of the cable sample, and establish the least detection point allocation function and constraint conditions to obtain the insulation resistance detection allocation model; this model allocates each detection as a task, and shortens the detection time by reducing the number of allocations, and digitizes the abstract problem through modeling, which is convenient for subsequent optimization processing; then use the improved dung beetle optimization algorithm to solve the insulation resistance detection allocation model, this algorithm obtains the global optimal solution by simulating the behavioral characteristics of the dung beetle, greatly improves the efficiency of cable detection, compared with the traditional algorithm, uses chaotic mapping for random initialization, speeds up the algorithm convergence speed, adopts the triangular walking strategy to increase randomness, avoids falling into the local optimal solution, and the greedy strategy iteratively updates the optimal solution in real time, with strong feasibility; then combine the insulation layer region thickness and the insulation resistance detection result for judgment to realize the detection of the cable production quality, and finally establish the LSTM neural network quality prediction model to realize the early warning of the network quality, provide an accurate quality reference for the prediction result, and reduce the occurrence of safety problems.
[0012] Preferably, the S1 includes the following steps:
[0013] S11. Obtain the cable sample, intercept the cable cross-section image of the cable sample to obtain the initial cable cross-section image, form the initial cable cross-section image set, collect sample points on the initial cable cross-section image in the initial cable cross-section image set, the sample points are pixel points, and perform quantization processing to generate the initial cable cross-section image matrix;
[0014] S12. According to the initial cable cross-section image matrix, perform segmentation processing on the conductor region and the insulation layer region in the initial cable cross-section image set to obtain the segmented cable cross-section image set, and the specific steps are as follows:
[0015] S121. Uniformly select a number of seed pixel points on the initial cable cross-section image matrix. Taking the seed pixel points as the center, form a seed pixel point neighborhood with a size of α×α. Calculate the gradient values of all pixel points in the seed pixel point neighborhood to obtain the minimum pixel point gradient value. Move the seed pixel point to the pixel point where the minimum pixel point gradient value is located to obtain a new seed pixel point. Calculate the distances between the pixel points in the seed pixel point neighborhood and the new seed pixel point respectively, and perform clustering processing according to the distances. Regard the clustering center as the new seed pixel point until the clustering center no longer changes to obtain the final seed pixel points. Traverse the final seed pixel points, merge the adjacent seed pixel point neighborhoods to obtain pixel blocks, and convert the initial cable cross-section image matrix into a cable cross-section image pixel block matrix;
[0016] S122. Calculate the distances between the pixel blocks in the cable cross-section image pixel block matrix, and perform preliminary segmentation by merging the pixel blocks according to the distances to obtain the final pixel blocks. The specific steps are as follows:
[0017] S1221. After merging the pixel blocks with the smallest distance into a new pixel block, regard the closed area formed by connecting the new pixel block and the current merged pixel block head to tail as a loop. When the current merged pixel block and the new pixel block do not form a loop, at this time, merge the current pixel block into the new pixel block and continue to merge, otherwise execute S1222;
[0018] S1222. When the current merged pixel block and the new pixel block form a loop, judge whether the loop is a conductor area and an insulating layer area. If so, regard the area wrapped by the loop as the final pixel block, otherwise execute S1223;
[0019] S1223. When the loop is not a conductor area and an insulating layer area, save the area wrapped by the loop until all pixel blocks are traversed to obtain the final pixel blocks and complete the preliminary segmentation;
[0020] S123. Divide the initial cable cross-section image according to the final pixel blocks, and count the saturation, transparency and hue of the initial cable cross-section image. Set the saturation threshold, transparency threshold and hue threshold, segment the final pixel blocks in the initial cable cross-section image according to the saturation threshold, transparency threshold and hue threshold, and then perform binarization processing to obtain the conductor area and the insulating layer area, and generate a set of segmented cable cross-section images;
[0021] S13. Draw rays from the center of the conductor region in the set of cable cross-section images after segmentation towards the insulation layer region. Denote the intersection points of the rays and the insulation layer region as insulation layer candidate points to obtain a set of insulation layer candidate points. Connect the insulation layer candidate points in the set of insulation layer candidate points in sequence to obtain a number of insulation layer line segments. Calculate the gradients and coordinates of the insulation layer line segments, and merge the number of insulation layer line segments. The calculation formula is as follows:
[0022]
[0023] Among them, B1 and B2 represent the gradients of two insulation layer line segments, B represents the merged gradient, (x1, y1) and (x2, y2) represent the endpoint coordinates of the insulation layer line segments, C′ represents the left angle of the insulation layer line segment, C″ represents the right angle of the insulation layer line segment, l′ represents the lower quartile of the set of insulation layer candidate points, l″ represents the upper quartile of the set of insulation layer candidate points, δ represents the distance attenuation coefficient, and χ represents the angle attenuation coefficient;
[0024] Merge the insulation layer line segments pairwise in sequence until the final insulation layer line segment is obtained. Take the final insulation layer line segment with the largest gradient in the final insulation layer line segment as the insulation layer contour. According to the insulation layer contour, extract the conductor region and the insulation layer region in the set of cable cross-section images after segmentation to obtain a set of processed cable cross-section images;
[0025] S14. For the conductor region and the insulation layer region in the set of processed cable cross-section images, select the center of the insulation layer region and emit rays every ε degrees from the center of the insulation layer region, which respectively generate intersection points with the insulation layer region to obtain insulation layer intersection point pairs. The calculation formula for the thickness of the insulation layer region is as follows:
[0026]
[0027] Among them, l represents the thickness of the insulation layer region, and (x3, y3) and (x4, y4) represent the coordinates of the insulation layer intersection point pairs.
[0028] The present invention uses the pixel point gradients of the cable cross-section images of the cable samples, combines the pixel points using a clustering algorithm to obtain pixel blocks, effectively improves the calculation speed through clustering, reduces the complexity of subsequent processing, obtains the contour through an iterative merging method, segments and extracts the conductor region and the insulation layer region, and the extracted contour is accurate.
[0029] Preferably, the S2 includes the following steps:
[0030] S21. Select a number of test points on the cable sample, denoted as the test point set, and perform partial discharge and withstand voltage tests on the test points; divide the test point set into groups to obtain a number of test point groups, with each test point group containing a number of test points; select any test point group, denoted as the first test point group, apply a voltage at the first test point in the first test point group, measure the leakage current of the test points in other test point groups, and calculate the insulation resistance value. Sequentially measure the insulation resistance values of all test points in the first test point group, and then calculate the insulation resistance values of all test points in other test point groups to obtain the insulation resistance value of the cable sample;
[0031] S22. During the process of obtaining the insulation resistance value of the cable sample, set the number of detections for the test points in the i-th test point group as a i , the number of test points in the i-th test point group is The weight value corresponding to the i-th test point group is c i , the test symbol for the i-th test point group is b i , when the i-th test point group is selected for testing, b i = 1, otherwise b i = 0. Establish the following minimum detection point allocation function:
[0032]
[0033] where F represents the minimum detection point allocation function and m represents the number of test point groups;
[0034] Add the constraint conditions of the minimum detection point allocation function. Denote whether the j-th test point in the test point set is in the i-th test point group as When , it means that the j-th test point in the test point set is in the i-th test point group. When , it means that the j-th test point in the test point set is not in the i-th test point group. The minimum detection point allocation function satisfies the constraint conditions Combine the minimum detection point allocation function and the constraint conditions to obtain the insulation resistance detection allocation model.
[0035] This invention obtains the insulation resistance detection allocation model by performing partial discharge and withstand voltage tests, establishing the minimum detection point allocation function and constraint conditions, allocating each detection as a task, shortening the detection time by reducing the number of allocations, and digitizing the abstract problem through modeling for subsequent optimization processing.
[0036] Preferably, the S3 includes the following steps:
[0037] S31. Take the minimum detection point allocation function as the fitness function. Introduce the dung beetle optimization algorithm within the search space of the constraint conditions, and improve the dung beetle optimization algorithm by integrating chaotic mapping, triangular walking strategy, and greedy strategy to obtain an improved dung beetle optimization algorithm. Use the improved dung beetle optimization algorithm to solve the insulation resistance detection allocation model to obtain the global optimal solution. The specific steps are as follows:
[0038] S311. Assume that there is a dung beetle population in the search space. The position of each dung beetle individual in the dung beetle population represents a solution to the insulation resistance detection allocation model. Divide the dung beetle population into ball-rolling dung beetles, breeding dung beetles, foraging dung beetles, and stealing dung beetles, and introduce chaotic mapping to initialize the positions of the dung beetle population. During the ball-rolling process of the dung beetle population, set the current iteration number as e, and denote the position of the g-th dung beetle individual in the dung beetle population at the e-th iteration as Denote the position of the g-th dung beetle individual in the dung beetle population at the (e - 1)-th iteration as Denote the position of the worst dung beetle individual in the dung beetle population at the e-th iteration as Let h1 represent a random number between the interval (0, 1), h2 represent a natural coefficient of 1 or -1, and h3 represent a random number between the interval (0, 0.2). Then the position of the g-th dung beetle individual in the dung beetle population at the (e - 1)-th iteration The calculation formula is as follows:
[0039]
[0040] When encountering an obstacle during the ball-rolling process, the dung beetle population chooses to reselect the direction by dancing. Set the ball-rolling direction as γ, and update the position of the dung beetle individual The update formula is as follows:
[0041]
[0042] Calculate the fitness function value corresponding to the position of the dung beetle individual after each iteration, and use the greedy strategy to record the current optimal solution. When the fitness function value corresponding to the position of the current iteration dung beetle individual is less than the fitness function value corresponding to the position of the previous iteration dung beetle individual, obtain the current best fitness function value. The current best fitness function value corresponds to the current optimal solution of the insulation resistance detection allocation model, and update the position of the current iteration dung beetle individual;
[0043] S312. During the breeding process of the dung beetle population, set the current local best position as The upper and lower limits of the search space position are p1 and p2 respectively, the maximum number of iterations is E, and the convergence factor Then the calculation formulas for the upper and lower limits of the breeding dung beetle position are as follows:
[0044]
[0045] Among them, respectively represent the upper and lower limits of the positions of breeding dung beetles;
[0046] After the positions of the breeding dung beetles are determined, eggs are laid. According to the egg-laying positions of the breeding dung beetles and the upper and lower limits of the positions of the breeding dung beetles, the positions of the individual dung beetles are continuously updated; the foraging dung beetles after hatching eggs forage, and the positions of the individual dung beetles are updated using a triangular walking strategy. Set the walking direction of the foraging dung beetle as λ, the food spacing as k1, and the step size of the walking coefficient as k2, then the foraging coefficient The position of the individual dung beetle where h4 represents a random number between the interval (0, 1);
[0047] Select the current global best individual dung beetle position and the current global worst individual dung beetle position, and update the individual dung beetle position again according to the stealing dung beetle until the current iteration number reaches the maximum iteration number, stop the iteration, and obtain the final global best individual dung beetle position. The final global best individual dung beetle position is the global optimal solution;
[0048] S32. The global optimal solution corresponds to the optimal solution of the insulation resistance detection allocation model. When the insulation resistance detection allocation model obtains the optimal solution, the number of partial discharge and withstand voltage detections of the cable sample is the least, and the least number of detections is obtained. The partial discharge and withstand voltage detections are carried out according to the least number of detections to obtain the insulation resistance detection result.
[0049] The present invention uses an improved dung beetle optimization algorithm to solve the insulation resistance detection allocation model, obtains the global optimal solution, greatly improves the efficiency of cable detection. Compared with the traditional algorithm, it uses chaotic mapping for random initialization to accelerate the algorithm convergence speed, adopts a triangular walking strategy to increase randomness, avoids falling into the local optimal solution, and uses a greedy strategy to iteratively optimize the optimal solution in real time, with strong feasibility.
[0050] Preferably, the S4 includes the following steps:
[0051] S41. Combine the insulation layer region thickness and the insulation resistance detection result, calculate the average value of the insulation layer region thickness, set a thickness threshold, an insulation resistance threshold, and a number threshold. When the average value of the insulation layer region thickness is less than the thickness threshold, the cable production quality detection result is unqualified at this time, otherwise the cable production quality detection result is qualified; record the number of times when the insulation resistance value in the insulation resistance detection result is greater than the insulation resistance threshold. When the number is greater than the number threshold, the cable production quality detection result is unqualified at this time, otherwise the cable production quality detection result is qualified, complete the cable production quality detection, and obtain the cable quality detection result;
[0052] S42. During the process of partial discharge and withstand voltage detection on the cable sample, record the insulation resistance value, leakage current, and internal current as internal parameters, collect the temperature, humidity, and usage duration during the partial discharge and withstand voltage detection as external parameters, and combine the internal parameters and external parameters to obtain the cable production quality data set; obtain the cable samples of previous years, collect the internal parameters and external parameters of the cable samples of previous years, obtain the cable production quality sample set, train the LSTM (Long Short-Term Memory) neural network to obtain the LSTM neural network quality prediction model. The specific steps are as follows:
[0053] S421. Set the time series of the cable production quality sample set, divide the cable production quality sample set into sample groups according to the time series, and after standardization processing, divide the cable production quality sample set into a sample training set and a sample test set. The sample training set and the sample test set contain several sample groups; set the LSTM neural network with the minimum loss function as the optimization goal, input the sample training set into the LSTM neural network until the LSTM neural network converges to obtain the trained LSTM neural network;
[0054] S422. Then input the sample test set into the trained LSTM neural network, set the accuracy threshold. When the output result accuracy is greater than the accuracy threshold, obtain the LSTM neural network quality prediction model; otherwise, adjust the weights until the output result accuracy is greater than the accuracy threshold;
[0055] S43. Divide the cable production quality data set according to the time series, and after standardization processing, input it into the LSTM neural network quality prediction model to output the quality prediction result, realizing the prediction of cable production quality.
[0056] The invention realizes the cable production quality detection by combining the insulation layer area thickness and the insulation resistance detection result, and finally establishes the LSTM neural network quality prediction model to realize the early warning of the network quality. The prediction result provides an accurate quality reference and reduces the occurrence of safety problems.
[0057] The invention also discloses a system for the cable production quality detection and management method based on data analysis, which specifically includes: an insulation layer area thickness measurement module, a model establishment module, a model solution module, and a cable quality detection and prediction module;
[0058] The insulation layer area thickness measurement module is used to segment and extract the conductor area and the insulation layer area of the initial cable cross-sectional image and calculate the insulation layer area thickness;
[0059] The model establishment module is used to establish a model according to the minimum detection point allocation function and constraint conditions;
[0060] The model solving module is used to solve the optimal solution of the insulation resistance detection allocation model by using the improved dung beetle optimization algorithm;
[0061] The cable quality detection and prediction module is used to detect the production quality of cables and establish a neural network to predict the production quality of cables.
[0062] The present invention has the following beneficial effects:
[0063] 1. The invention combines the pixel points of the cable cross-section image by using the clustering algorithm to obtain pixel blocks, effectively improving the calculation speed through clustering, reducing the complexity of subsequent processing, obtaining the contour by the method of iterative merging, segmenting and extracting the conductor region and the insulation layer region, and the extracted contour is accurate.
[0064] 2. The invention establishes the minimum detection point allocation function and constraint conditions according to the partial discharge and withstand voltage detection to obtain the insulation resistance detection allocation model, allocates each detection as a task, shortens the detection time by reducing the allocation times, and digitizes the abstract problem through modeling, which is convenient for subsequent optimization processing.
[0065] 3. The invention solves the insulation resistance detection allocation model by using the improved dung beetle optimization algorithm to obtain the global optimal solution, greatly improving the efficiency of cable detection; compared with the traditional algorithm, it uses chaotic mapping for random initialization to accelerate the algorithm convergence speed, adopts the triangular walking strategy to increase randomness, avoids falling into the local optimal solution, and the greedy strategy iteratively optimizes the solution in real time, with strong feasibility.
[0066] 4. The invention realizes the cable production quality detection by judging the thickness of the insulation layer region and the insulation resistance detection result, and then establishes an LSTM neural network quality prediction model to realize the early warning of the network quality. The prediction result provides an accurate quality reference and reduces the occurrence of safety problems.
[0067] Of course, it is not necessary for any product implementing the present invention to achieve all the above-mentioned advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the invention, the drawings required for describing the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0069] Figure 1 It is a schematic flow chart of the cable production quality detection and management system provided by the present invention for cable production quality detection and management. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0070] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0071] In the description of the present invention, it should be understood that the terms "open hole", "upper", "lower", "top", "middle", "inner", etc. indicating the orientation or positional relationship are only for the convenience of describing the invention and simplifying the description, rather than indicating or implying that the components or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present invention.
[0072] Embodiment 1
[0073] Please refer to Figure 1 , the method for detecting and managing the quality of cable production based on data analysis of the present invention includes the following steps:
[0074] S1. Obtain a cable sample, obtain a cable cross-section image, form an initial cable cross-section image set, segment and extract the conductor region and the insulation layer region of the initial cable cross-section image in the initial cable cross-section image set, and then calculate the thickness of the insulation layer region.
[0075] The said S1 includes the following steps:
[0076] S11. Obtain a cable sample, intercept the cable cross-section image of the cable sample to obtain an initial cable cross-section image, form an initial cable cross-section image set, collect sample points on the initial cable cross-section image in the initial cable cross-section image set, the sample points are pixel points, and perform quantization processing to generate an initial cable cross-section image matrix.
[0077] S12. According to the initial cable cross-section image matrix, perform segmentation processing on the conductor region and the insulation layer region in the initial cable cross-section image set to obtain a segmented cable cross-section image set. The specific steps are as follows:
[0078] S121. Uniformly select a number of seed pixel points on the initial cable cross-section image matrix. Taking the seed pixel points as the center, form a seed pixel point neighborhood with a size of α×α. Calculate the gradient values of all pixel points in the seed pixel point neighborhood to obtain the minimum pixel point gradient value. Move the seed pixel point to the pixel point where the minimum pixel point gradient value is located to obtain a new seed pixel point. Calculate the distances between the pixel points in the seed pixel point neighborhood and the new seed pixel point respectively, and perform clustering processing according to the distances. Regard the clustering center as the new seed pixel point until the clustering center no longer changes, and obtain the final seed pixel points. Traverse the final seed pixel points, merge the pixel points in adjacent seed pixel point neighborhoods to obtain pixel blocks, and convert the initial cable cross-section image matrix into a cable cross-section image pixel block matrix;
[0079] S122. Calculate the distances between the pixel blocks in the cable cross-section image pixel block matrix, and perform preliminary segmentation by merging the pixel blocks according to the distances to obtain the final pixel blocks. The specific steps are as follows:
[0080] S1221. After merging the pixel blocks with the smallest distance to obtain a new pixel block, regard the closed area formed by connecting the new pixel block and the current merged pixel block head to tail as a loop. When the current merged pixel block and the new pixel block do not form a loop, at this time, merge the current pixel block into the new pixel block and continue to merge, otherwise execute S1222;
[0081] S1222. When the current merged pixel block and the new pixel block form a loop, judge whether the loop is a conductor area and an insulating layer area. If so, regard the area wrapped by the loop as the final pixel block, otherwise execute S1223;
[0082] S1223. When the loop is not a conductor area and an insulating layer area, save the area wrapped by the loop until all pixel blocks are traversed to obtain the final pixel blocks and complete the preliminary segmentation;
[0083] S123. Divide the initial cable cross-section image according to the final pixel blocks, and count the saturation, transparency and hue of the initial cable cross-section image. Set the saturation threshold, transparency threshold and hue threshold, divide the final pixel blocks in the initial cable cross-section image according to the saturation threshold, transparency threshold and hue threshold, and then perform binarization processing to obtain the conductor area and the insulating layer area, and generate a set of segmented cable cross-section images;
[0084] S13. Make a ray from the center of the conductor area in the set of segmented cable cross-section images to the insulating layer area. The intersection point of the ray and the insulating layer area is recorded as the insulating layer candidate point to obtain a set of insulating layer candidate points. Connect the insulating layer candidate points in the set of insulating layer candidate points in sequence to obtain a number of insulating layer line segments. Calculate the gradient and coordinates of the insulating layer line segments, and merge the number of insulating layer line segments. The calculation formula is as follows:
[0085]
[0086] Among them, B1 and B2 represent the gradients of two insulating layer line segments, B represents the combined gradient, (x1, y1) and (x2, y2) represent the endpoint coordinates of the insulating layer line segment, C′ represents the left angle of the insulating layer line segment, C″ represents the right angle of the insulating layer line segment, l′ represents the lower quartile of the insulating layer candidate point set, l″ represents the upper quartile of the insulating layer candidate point set, δ represents the distance attenuation coefficient, and χ represents the angle attenuation coefficient;
[0087] The insulating layer line segments are merged pairwise in sequence until the final insulating layer line segment is obtained. The final insulating layer line segment with the largest gradient in the final insulating layer line segment is used as the insulating layer contour. According to the insulating layer contour, the conductor region and the insulating layer region in the segmented cable cross-section image set are extracted to obtain the processed cable cross-section image set;
[0088] S14. For the conductor region and the insulating layer region in the processed cable cross-section image set, select the center of the insulating layer region, emit rays at intervals of ε degrees from the center of the insulating layer region, and generate intersection points with the insulating layer region respectively to obtain insulating layer intersection point pairs. The calculation formula for the thickness of the insulating layer region is as follows:
[0089]
[0090] Among them, l represents the thickness of the insulating layer region, and (x3, y3) and (x4, y4) represent the coordinates of the insulating layer intersection point pair;
[0091] S2. Perform partial discharge and withstand voltage tests on the cable sample to obtain the insulation resistance value of the cable sample. Establish a minimum detection point allocation function according to the insulation resistance value of the cable sample and set constraint conditions to obtain an insulation resistance detection allocation model;
[0092] The S2 includes the following steps:
[0093] S21. Select a number of test points on the cable sample, denoted as the test point set, and perform partial discharge and withstand voltage tests on the test points; divide the test point set into groups to obtain a number of test point groups, and each test point group contains a number of test points; select any test point group, denoted as the first test point group, apply voltage at the first test point in the first test point group, measure the leakage current of the test points in other test point groups, and calculate the insulation resistance value. Measure the insulation resistance values of all the test points in the first test point group in sequence, and then calculate the insulation resistance values of all the test points in other test point groups to obtain the insulation resistance value of the cable sample;
[0094] S22. During the process of obtaining the insulation resistance value of the cable sample, set the number of detections for the test points in the \(i\)-th test point group as \(a\). i , the number of test points in the \(i\)-th test point group is The weight corresponding to the \(i\)-th test point group is \(c\). i , the test flag for the \(i\)-th test point group is \(b\). i , when the \(i\)-th test point group is selected for testing, \(b\). i = 1, otherwise \(b\). i = 0, and establish the following minimum detection point allocation function:
[0095]
[0096] where \(F\) represents the minimum detection point allocation function, and \(m\) represents the number of test point groups;
[0097] Add the constraint conditions of the minimum detection point allocation function, and record whether the \(j\)-th test point in the test point set is in the \(i\)-th test point group as When , it means that the \(j\)-th test point in the test point set is in the \(i\)-th test point group. When , it means that the \(j\)-th test point in the test point set is not in the \(i\)-th test point group, and the minimum detection point allocation function satisfies the constraint conditions Combine the minimum detection point allocation function and the constraint conditions to obtain the insulation resistance detection allocation model;
[0098] S3. Use the improved dung beetle optimization algorithm to solve the insulation resistance detection allocation model, and use the greedy strategy to record the current optimal solution of the insulation resistance detection allocation model until the solution process ends to obtain the global optimal solution, and use the global optimal solution to solve the insulation resistance detection result;
[0099] The S3 includes the following steps:
[0100] S31. Take the minimum detection point allocation function as the fitness function. In the search space of the constraint conditions, introduce the dung beetle optimization algorithm, and improve the dung beetle optimization algorithm by integrating the chaotic mapping, triangular walking strategy and greedy strategy to obtain the improved dung beetle optimization algorithm. Use the improved dung beetle optimization algorithm to solve the insulation resistance detection allocation model to obtain the global optimal solution. The specific steps are as follows:
[0101] S311. Assume that there is a dung beetle population in the search space. The position of each dung beetle individual in the dung beetle population represents a solution of the insulation resistance detection allocation model. Divide the dung beetle population into rolling dung beetles, breeding dung beetles, foraging dung beetles and stealing dung beetles, and introduce the chaotic mapping to initialize the positions of the dung beetle population. During the rolling process of the dung beetle population, set the current iteration number as \(e\), and record the position of the \(g\)-th dung beetle individual in the dung beetle population at the \(e\)-th iteration as The position of the g-th dung beetle individual in the (e-1)-th iteration of the dung beetle population is denoted as The position of the worst dung beetle individual in the e-th iteration of the dung beetle population is denoted as Let h1 denote a random number in the interval (0, 1), h2 denote the natural coefficient of 1 or -1, and h3 denote a random number in the interval (0, 0.2). Then, the position of the g-th dung beetle individual in the (e-1)-th iteration of the dung beetle population The calculation formula is as follows:
[0102]
[0103] During the ball-rolling process, when encountering an obstacle, the dung beetle population chooses to reselect the direction by dancing. Set the ball-rolling direction as γ, and update the position of the dung beetle individual The calculation formula is as follows:
[0104]
[0105] Calculate the fitness function value corresponding to the position of the dung beetle individual after each iteration, and use the greedy strategy to record the current optimal solution. When the fitness function value corresponding to the position of the dung beetle individual in the current iteration is less than the fitness function value corresponding to the position of the dung beetle individual in the previous iteration, obtain the current best fitness function value. The current best fitness function value corresponds to the current optimal solution of the insulation resistance detection allocation model, and update the position of the dung beetle individual in the current iteration;
[0106] S312. During the reproduction process of the dung beetle population, set the current local best position as The upper and lower limits of the search space position are p1 and p2 respectively, the maximum number of iterations is E, and the convergence factor Then, the calculation formulas for the upper and lower limits of the position of the reproductive dung beetle are as follows:
[0107]
[0108] Among them, respectively represent the upper and lower limits of the position of the reproductive dung beetle;
[0109] After determining the position of the reproductive dung beetle, lay eggs. According to the egg-laying position of the reproductive dung beetle and the upper and lower limits of the position of the reproductive dung beetle, continue to update the position of the dung beetle individual; After hatching, the foraging dung beetle forages, and updates the position of the dung beetle individual using the triangular walking strategy. Set the walking direction of the foraging dung beetle as λ, the food spacing as k1, and the step size of the walking coefficient as k2. Then, the foraging coefficient The position of the dung beetle individual where h4 represents a random number in the interval (0, 1);
[0110] Select the current globally best dung beetle individual position and the current globally worst dung beetle individual position, and update the dung beetle individual position again according to the stealing dung beetle until the current iteration number reaches the maximum iteration number, then stop the iteration to obtain the final globally best dung beetle individual position, and the final globally best dung beetle individual position is the global optimal solution;
[0111] S32. The global optimal solution corresponds to the optimal solution of the insulation resistance detection allocation model. When the insulation resistance detection allocation model obtains the optimal solution, the number of partial discharge and withstand voltage detections of the cable sample is the least, and the least number of detections is obtained. Perform partial discharge and withstand voltage detections according to the least number of detections to obtain the insulation resistance detection result;
[0112] S4. Combine the insulation layer region thickness and the insulation resistance detection result to detect the cable production quality to obtain the cable quality detection result; then retrain the LSTM neural network to obtain the LSTM neural network quality prediction model to realize the cable production quality prediction;
[0113] The S4 includes the following steps:
[0114] S41. Combine the insulation layer region thickness and the insulation resistance detection result, calculate the average value of the insulation layer region thickness, set the thickness threshold, insulation resistance threshold and number threshold. When the average value of the insulation layer region thickness is less than the thickness threshold, the cable production quality detection result is unqualified at this time, otherwise the cable production quality detection result is qualified; record the number of times when the insulation resistance value in the insulation resistance detection result is greater than the insulation resistance threshold. When the number is greater than the number threshold, the cable production quality detection result is unqualified at this time, otherwise the cable production quality detection result is qualified, complete the cable production quality detection, and obtain the cable quality detection result;
[0115] S42. During the process of partial discharge and withstand voltage detection of the cable sample, record the insulation resistance value, leakage current, and internal current as internal parameters, collect the temperature, humidity, and usage duration during the partial discharge and withstand voltage detection as external parameters, and combine the internal parameters and external parameters to obtain the cable production quality data set; obtain the cable samples of previous years, collect the internal parameters and external parameters of the cable samples of previous years to obtain the cable production quality sample set, and train the LSTM neural network to obtain the LSTM neural network quality prediction model. The specific steps are as follows:
[0116] S421. Set the time series of the cable production quality sample set. Divide the cable production quality sample set into sample groups according to the time series. After standardization, divide the cable production quality sample set into a sample training set and a sample test set. The sample training set and the sample test set contain several sample groups. Set the LSTM neural network with the minimum loss function as the optimization goal. Input the sample training set into the LSTM neural network until the LSTM neural network converges to obtain a trained LSTM neural network.
[0117] S422. Then input the sample test set into the trained LSTM neural network. Set the accuracy threshold. When the output result accuracy is greater than the accuracy threshold, obtain the LSTM neural network quality prediction model. Otherwise, adjust the weights until the output result accuracy is greater than the accuracy threshold.
[0118] S43. Divide the cable production quality data set according to the time series, and then after standardization, input it into the LSTM neural network quality prediction model to output the quality prediction result, realizing cable production quality prediction.
[0119] Embodiment 2
[0120] The present invention also discloses a system for the cable production quality detection and management method based on data analysis, specifically including: an insulation layer area thickness measurement module, a model establishment module, a model solution module, and a cable quality detection and prediction module.
[0121] The insulation layer area thickness measurement module is used to segment and extract the conductor area and the insulation layer area of the initial cable cross-sectional image, and calculate the insulation layer area thickness.
[0122] The model establishment module is used to establish a model according to the minimum detection point allocation function and constraint conditions.
[0123] The model solution module is used to solve the optimal solution of the insulation resistance detection allocation model by using an improved dung beetle optimization algorithm.
[0124] The cable quality detection and prediction module is used to detect the cable production quality and establish a neural network to predict the cable production quality.
[0125] In the description of this specification, the descriptions referring to terms such as "one embodiment", "example", "specific example", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0126] The preferred embodiments of the invention disclosed above are only used to help illustrate the invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, according to the content of this specification, many modifications and variations can be made. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the invention, so that those skilled in the art can well understand and utilize the invention.
Claims
1. A method for cable production quality inspection and management based on data analysis, characterized in that It includes the following steps: S1. Obtain a cable sample, get a cable cross-section image, form an initial cable cross-section image set, segment and extract the conductor region and the insulation layer region of the initial cable cross-section image in the initial cable cross-section image set, and then calculate the thickness of the insulation layer region; S2. Conduct partial discharge and withstand voltage tests on the cable sample to obtain the insulation resistance value of the cable sample. Establish a minimum detection point allocation function based on the insulation resistance value of the cable sample, and set constraints to obtain an insulation resistance detection allocation model; S3. Use an optimization algorithm to solve the insulation resistance detection allocation model, and adopt a greedy strategy to record the current optimal solution of the insulation resistance detection allocation model until the solution process ends to obtain the global optimal solution. Use the global optimal solution to solve and obtain the insulation resistance detection result; S4. Combine the thickness of the insulation layer region and the insulation resistance detection result to detect the production quality of the cable and obtain a cable quality detection result; Then train the LSTM neural network to obtain an LSTM neural network quality prediction model to realize the prediction of the production quality of the cable.
2. The method for detecting and managing the quality of cable production based on data analysis according to claim 1, characterized in that, The S1 includes the following steps: S11. Obtain a cable sample, intercept the cable cross-section image of the cable sample to get an initial cable cross-section image, form an initial cable cross-section image set, and generate an initial cable cross-section image matrix; S12. According to the initial cable cross-section image matrix, perform segmentation processing on the conductor region and the insulation layer region in the initial cable cross-section image set to obtain a segmented cable cross-section image set; S13. Select the insulation layer candidate points of the segmented cable cross-section image set to obtain an insulation layer contour. According to the insulation layer contour, extract the conductor region and the insulation layer region in the segmented cable cross-section image set to obtain a processed cable cross-section image set; S14. Calculate the thickness of the insulation layer region according to the conductor region and the insulation layer region in the processed cable cross-section image set.
3. The method for cable production quality inspection and management based on data analysis according to claim 2, characterized in that The S12 includes the following steps: S121. Uniformly select a number of seed pixel points on the initial cable cross-section image matrix. Take the seed pixel points as the center to form a seed pixel point neighborhood, and then perform clustering processing. Merge the adjacent seed pixel point neighborhoods into pixel blocks, and convert the initial cable cross-section image matrix into a cable cross-section image pixel block matrix; S122. Calculate the distance between the pixel blocks in the cable cross-section image pixel block matrix, and perform preliminary segmentation by merging the pixel blocks according to the distance to obtain the final pixel blocks; S123. Divide the initial cable cross-section image according to the final pixel blocks, set a threshold, segment the initial cable cross-section image according to the threshold, and then perform binary processing to obtain the conductor region and the insulation layer region, and generate a segmented cable cross-section image set.
4. The method for detecting and managing the quality of cable production based on data analysis according to claim 3, wherein, The S2 includes the following steps: S21. Select a number of test points on the cable sample, conduct partial discharge and withstand voltage tests, divide the test points into groups to obtain a number of test point groups, apply voltage to the test points in the test point groups, and measure the leakage current of the test points in other test point groups to obtain the insulation resistance value of the cable sample; S22. During the process of obtaining the insulation resistance value of the cable sample, establish the minimum detection point allocation function and constraint conditions; combine the minimum detection point allocation function and constraint conditions to obtain the insulation resistance detection allocation model.
5. The method for cable production quality inspection and management based on data analysis according to claim 4, wherein, The said S3 includes the following steps: S31. Take the minimum detection point allocation function as the fitness function, and within the search space of the constraint conditions, use the improved dung beetle optimization algorithm to solve the insulation resistance detection allocation model to obtain the global optimal solution; S32. The global optimal solution corresponds to the optimal solution of the insulation resistance detection allocation model. Calculate the minimum number of detections, and perform partial discharge and withstand voltage detections according to the minimum number of detections to obtain the insulation resistance detection result.
6. The method for detecting and managing the quality of cable production based on data analysis according to claim 5, wherein The process of using the improved dung beetle optimization algorithm to solve the insulation resistance detection allocation model includes the following steps: It is assumed that there is a population of dung beetles in the search space. The position of each dung beetle individual in the dung beetle population represents a solution to the insulation resistance detection allocation model. A chaotic map is introduced to initialize the positions of the dung beetle population. During the process of the dung beetle population rolling the ball, it is assumed that the current iteration number is e, and the position of the g-th dung beetle individual in the dung beetle population at the e-th iteration is denoted as The position of the g-th dung beetle individual in the dung beetle population at the (e - 1)-th iteration is denoted as The position of the worst dung beetle individual in the dung beetle population at the e-th iteration is denoted as h1 represents a random number between the interval (0, 1), h2 represents a natural coefficient of 1 or -1, and h3 represents a random number between the interval (0, 0.2). Then the position of the g-th dung beetle individual in the dung beetle population at the (e - 1)-th iteration The calculation formula is as follows: When encountering an obstacle during the ball-rolling process, the dung beetle population chooses to reselect the direction by dancing. Set the ball-rolling direction as γ, and update the position of the individual dung beetle. The calculation formula is as follows: The update is carried out as follows: Calculate the fitness function value corresponding to the position of the dung beetle individual after each iteration, use the greedy strategy to record the current optimal solution. When the fitness function value corresponding to the position of the dung beetle individual in the current iteration is less than the fitness function value corresponding to the position of the dung beetle individual in the previous iteration, obtain the current best fitness function value. The current best fitness function value corresponds to the current optimal solution of the insulation resistance detection allocation model, and update the position of the dung beetle individual in the current iteration; During the reproduction process of the dung beetle population, set the current local best position as The upper and lower limits of the search space position are p1 and p2 respectively, and the maximum number of iterations is E. The convergence factor Then the calculation formulas for the upper and lower limits of the dung beetle reproduction position are as follows: Among them, and respectively represent the upper and lower limits of the positions of breeding dung beetles; After determining the position of the breeding dung beetle for egg-laying, the position of the dung beetle individual is continuously updated according to the egg-laying position of the breeding dung beetle and the upper and lower limits of the position of the breeding dung beetle; the foraging dung beetle after hatching eggs forages, and the position of the dung beetle individual is updated using the triangular walking strategy. Set the walking direction of the foraging dung beetle as λ, the food distance as k1, and the step size of the walking coefficient as k2, then the foraging coefficient μ = k1 2 + k2 2 - 2k1k2·cosλ, the position of the dung beetle individual where h4 represents a random number between the interval (0, 1); Select the current globally best dung beetle individual position and the current globally worst dung beetle individual position, and update the dung beetle individual position again according to the stealing dung beetle until the current iteration number reaches the maximum iteration number, stop the iteration, and obtain the final globally best dung beetle individual position. The final globally best dung beetle individual position is the global optimal solution.
7. The method for detecting and managing the quality of cable production based on data analysis according to claim 6, characterized in that, The said S4 includes the following steps: S41. Combine the insulation layer area thickness and the insulation resistance detection result to judge whether the cable production quality detection result is qualified, complete the cable production quality detection, and obtain the cable quality detection result; S42. During the process of partial discharge and withstand voltage detections on the cable sample, record the insulation resistance value, leakage current, and internal current as internal parameters, collect the temperature, humidity, and usage duration during the partial discharge and withstand voltage detections as external parameters, and combine the internal parameters and external parameters to obtain the cable production quality data set; Obtain the cable samples of previous years, collect the internal parameters and external parameters of the cable samples of previous years to obtain the cable production quality sample set, train the LSTM neural network to obtain the LSTM neural network quality prediction model; S43. Combine the cable production quality data set and the LSTM neural network quality prediction model to output the quality prediction result and realize the cable production quality prediction.
8. The method for detecting and managing the quality of cable production based on data analysis according to claim 7, characterized in that, The process of training the LSTM neural network to obtain the LSTM neural network quality prediction model includes the following steps: Set the time series of the cable production quality sample set. Divide the cable production quality sample set into sample groups according to the time series. After standardization, divide the cable production quality sample set into a sample training set and a sample test set. The sample training set and the sample test set contain several sample groups. Set the LSTM neural network with the minimum loss function as the optimization goal, input the sample training set into the LSTM neural network until the LSTM neural network converges, and obtain the trained LSTM neural network. Then input the sample test set into the trained LSTM neural network, set the accuracy threshold. When the output result accuracy is greater than the accuracy threshold, obtain the LSTM neural network quality prediction model. Otherwise, adjust the weights until the output result accuracy is greater than the accuracy threshold.
9. A system for implementing the method for quality inspection and management of cable production based on data analysis according to any one of claims 1-8, characterized in that, Specifically include: Insulation layer area thickness measurement module, model establishment module, model solution module, and cable quality detection and prediction module; The insulation layer area thickness measurement module is used to segment and extract the conductor area and the insulation layer area of the initial cable cross-section image, and calculate the thickness of the insulation layer area; The model establishment module is used to establish a model according to the minimum detection point allocation function and constraint conditions; The model solution module is used to solve the optimal solution of the insulation resistance detection allocation model using the improved dung beetle optimization algorithm; The cable quality detection and prediction module is used to detect the cable production quality and establish a neural network to predict the cable production quality.
Citation Information
Patent Citations
A sampling detection system and method for online quality of motor housing
CN117709799B