Method, device, equipment and storage medium for controlling the lifting of a wire spool

Through polynomial regression fitting the center coordinates and radius of the welding wire disk, the wire disk bracket is automatically adjusted, which solves the problem of wire disks being discontinuous in horizontal submerged arc welding machines, and achieves the stability and efficient production of the welding process.

CN118371826BActive Publication Date: 2025-07-22HUBEI UNIV OF ARTS & SCI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410610118.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-07-22
Estimated Expiration
2044-05-16

AI Technical Summary

Technical Problem

In horizontal submerged arc welding machines, changes in the height of the welding wire plate lead to problems such as wire jamming during the wire output process, affecting the continuity and stability of welding. The existing technology relies on manual operation and low efficiency.

Method used

By obtaining the historical height and image data of the wire disk, fit the center coordinates and radius of the wire disk using a polynomial regression equation, and adjust the wire disk bracket in combination with the preset range to achieve automated lifting and lowering control.

Benefits of technology

Ensure the continuity and stability of wire strips, improve welding quality and production efficiency, and reduce manual operation difficulties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118371826B_ABST
    Figure CN118371826B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for controlling the lifting of a wire spool, relating to the technical field of horizontal submerged arc welding machines. The method includes: obtaining the historical height of the wire spool and the corresponding wire images at each height; determining the first center coordinates and the first circle radius corresponding to each image according to the wire images; performing polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radius at each height to obtain a target polynomial regression equation; obtaining the current height of the wire spool, inputting the current height of the wire spool as a parameter into the target polynomial regression equation to obtain the second center coordinates and the second circle radius; adjusting the wire spool bracket according to the second center coordinates, the second circle radius and the center coordinates and circle radius within a preset range to complete the control of the lifting of the wire spool. The present application precisely adjusts the position of the wire spool, ensuring the continuity and stability of wire feeding from the wire spool during the welding process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of horizontal submerged arc welding machines, and particularly to a method, device, equipment, and storage medium for controlling the lifting of a wire spool. Background Art

[0002] In traditional welding processes, a wire spool is a device for storing welding wire. In a horizontal submerged arc welding machine, the wire spool plays a crucial role, and the welding wire provided by it is gradually consumed during welding. The process of the welding wire from the spool to the welding torch is not a simple straight-line motion but presents a curved trajectory. The formation of this curved trajectory is caused by the change in the height of the wire spool. As the height of the wire spool changes, the shape of the curve also changes accordingly. Such changes in the curved trajectory may cause problems during the wire feeding process, such as wire jamming in the spool, etc.

[0003] Traditional wire spool placement is achieved manually. It is necessary to manually hold the wire spool above the horizontal submerged arc welding machine. When placing it manually, the wire spool is heavy, the operation is inconvenient, and the stability of the wire spool is not good. If the wire spool is at a lower position, manual handling is relatively easy, but once the wire spool rises, manual handling becomes very troublesome. The influence of this curved trajectory directly affects the normal wire feeding, thus affecting the smooth progress of the welding process, and ultimately affecting the continuity and quality of welding. Therefore, how to ensure the continuity and stability of wire feeding from the wire spool during the welding process has become an urgent problem to be solved.

[0004] The above content is only used to assist in understanding the technical solution of the present application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The purpose of the present application is to provide a method, device, equipment, and storage medium for controlling the lifting of a wire spool, aiming to solve the technical problem of how to ensure the continuity and stability of wire feeding from the wire spool during the welding process.

[0006] To achieve the above purpose, the present application proposes a method for controlling the lifting of a wire spool, the method comprising:

[0007] Obtain the historical wire spool height and the corresponding wire images at each height;

[0008] Determine the first center coordinates and the first circle radius corresponding to each image according to the wire images;

[0009] Perform polynomial regression equation fitting on the historical wire spool height and the corresponding first center coordinates and first circle radius at each height to obtain a polynomial regression equation of the center coordinates and the circle radius with respect to the wire spool height;

[0010] Obtain the current height of the wire spool, input the current height of the wire spool as a parameter into the polynomial regression equation to obtain the second center coordinates and the second radius of the circle;

[0011] Adjust the wire spool support according to the second center coordinates, the second radius of the circle, and the center coordinates and circle radii within a preset range to complete the control of the wire spool lifting.

[0012] In one embodiment, the step of determining the first center coordinates and the first radius of the circle corresponding to each image according to the wire images includes:

[0013] Draw a rectangular frame to mark the curve of the wire in the wire image;

[0014] Extract the rectangular frame part, perform threshold segmentation on the rectangular frame part to obtain the target area;

[0015] Obtain the shape and boundary of the curve according to the target area;

[0016] Extract the set of coordinate points of the curve according to the shape and boundary;

[0017] Perform circle fitting on the set of coordinate points by the least squares method to obtain the first center coordinates and the first radius of the circle.

[0018] In one embodiment, the step of obtaining the shape and boundary of the curve according to the target area includes:

[0019] Perform Gaussian filtering and Canny edge detection on the target area to extract the boundary information and structural information of the curve;

[0020] Identify and locate the shape and boundary of the curve according to the boundary information and the structural information.

[0021] In one embodiment, the step of performing circle fitting on the set of coordinate points by the least squares method to obtain the first center coordinates and the first radius of the circle includes:

[0022] Define an objective function of the center coordinates and the radius of the circle with respect to the set of coordinate points to quantify the difference between the set of coordinate points and the fitted circle;

[0023] Define the initial center coordinates and the initial radius of the circle of the objective function according to the distribution characteristics of the coordinate points in the set of coordinate points;

[0024] Adjust the initial center coordinates and the initial radius of the circle through an iterative algorithm to obtain the center coordinates and the radius of the circle when the objective function obtains the minimum value, and use the center coordinates and the radius of the circle as the first center coordinates and the first radius of the circle.

[0025] In one embodiment, the step of performing polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radii at each height to obtain a polynomial regression equation of the center coordinates and circle radii with respect to the height of the wire spool includes:

[0026] Define a polynomial function model of the center coordinates and circle radii with respect to the height of the wire spool;

[0027] Define a loss function according to the sum of squared residuals, where the residual is the difference between the actual values of the center coordinates and circle radii and the predicted values of the polynomial function model;

[0028] Take the derivative of the loss function to obtain the coefficients that minimize the loss function, and substitute the coefficients into the polynomial function model;

[0029] Use the historical height of the wire spool and the corresponding first center coordinates and first circle radii at each height as a data set to train the polynomial function model, and adjust the coefficients of the polynomial function model to obtain a polynomial regression equation of the center coordinates and circle radii with respect to the height of the wire spool.

[0030] In one embodiment, the step of adjusting the wire spool support according to the second center coordinates, the second circle radius, and the center coordinates and circle radii within a preset range to complete the control of the lifting of the wire spool includes:

[0031] Judge whether the second center coordinates and the second circle radius are within the preset range;

[0032] If not, adjust the wire spool support;

[0033] If so, keep the wire spool support stationary.

[0034] In addition, to achieve the above object, the present application also proposes a device for controlling the lifting of a wire spool, and the device includes:

[0035] A data acquisition module: used to acquire the historical height of the wire spool and the corresponding wire images at each height;

[0036] An image processing module: used to determine the first center coordinates and first circle radii corresponding to each image according to the wire images;

[0037] A model establishment module: used to perform polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radii at each height to obtain a polynomial regression equation of the center coordinates and circle radii with respect to the height of the wire spool;

[0038] Data prediction module: configured to obtain the current height of the wire spool, use the current height of the wire spool as a parameter to input into the polynomial regression equation, and obtain the second center coordinates and the second radius of the circle;

[0039] Lifting control module: configured to adjust the wire spool bracket according to the second center coordinates, the second radius of the circle, and the center coordinates and the radius of the circle within a preset range, and complete the lifting control of the wire spool.

[0040] In addition, to achieve the above object, the present application further provides a device for controlling the lifting of a wire spool, the device including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the method for controlling the lifting of a wire spool as described above.

[0041] In addition, to achieve the above object, the present application further provides a storage medium, the storage medium being a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the method for controlling the lifting of a wire spool as described above are implemented.

[0042] In addition, to achieve the above object, the present application further provides a computer program product, the computer program product including a computer program, and when the computer program is executed by a processor, the steps of the method for controlling the lifting of a wire spool as described above are implemented.

[0043] One or more technical solutions proposed by the present application have at least the following technical effects:

[0044] This application obtains the historical height of the wire spool and the corresponding wire images at each height; determines the first center coordinates and the first circle radius corresponding to each image according to the wire images; performs polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radius at each height to obtain a target polynomial regression equation; obtains the current height of the wire spool, inputs the current height of the wire spool as a parameter into the target polynomial regression equation to obtain the second center coordinates and the second circle radius; adjusts the wire spool support according to the second center coordinates, the second circle radius, and the center coordinates and circle radius within a preset range, and completes the control of the wire spool lifting. This application obtains the center coordinates and circle radius of the wire curve through image processing, and performs polynomial regression fitting on the center coordinates and circle radius. Since polynomial regression fitting can accurately fit the complex non-linear relationship between data, the established target polynomial regression equation can obtain the predicted values of the accurate center coordinates and circle radius at a certain height. Compare the predicted values with the preset range, and adjust the wire spool support according to the comparison results, thereby realizing the precise adjustment of the position of the wire spool, ensuring the best state of the wire shape, ensuring the continuity and stability of the wire feeding from the wire spool during the welding process, and further ensuring the welding quality, which can significantly improve the production efficiency and product quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with this application, and are used together with the specification to explain the principles of this application.

[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0047] Figure 1 It is a schematic flowchart provided by Embodiment 1 of the method for controlling the lifting of the wire spool in this application;

[0048] Figure 2 It is a data diagram of the center coordinates and circle radius within a preset range provided by Embodiment 1 of the method for controlling the lifting of the wire spool in this application;

[0049] Figure 3 It is a schematic flowchart provided by Embodiment 2 of the method for controlling the lifting of the wire spool in this application;

[0050] Figure 4 It is a schematic diagram of extracting a set of coordinate points provided by Embodiment 2 of the method for controlling the lifting of the wire spool in this application;

[0051] Figure 5Schematic diagram of the least squares fitting circle for the second embodiment of the method for controlling the lifting of the wire spool in this application;

[0052] Figure 6 Flow chart for the third embodiment of the method for controlling the lifting of the wire spool in this application;

[0053] Figure 7 Schematic diagram of the module structure of the device for controlling the lifting of the wire spool in the embodiment of this application;

[0054] Figure 8 Schematic diagram of the overall structure of the device for controlling the lifting of the wire spool in the embodiment of this application;

[0055] Figure 9 Schematic diagram of the camera collecting the wire curve of the device for controlling the lifting of the wire spool in the embodiment of this application;

[0056] Figure 10 Schematic diagram of the movement structure of the wire spool of the device for controlling the lifting of the wire spool in the embodiment of this application;

[0057] Figure 11 Schematic diagram of the device structure of the hardware operating environment involved in the method for controlling the lifting of the wire spool in the embodiment of this application.

[0058] Explanation of the reference numerals in the drawings: 1. Flux hopper; 2. Wire spool support; 3. Module support; 4. Wire spool; 5. Welding wire; 6. First linear reciprocating module; 7. Camera; 8. Second linear reciprocating module; 9. Third linear reciprocating module; 10. Fourth linear reciprocating module; 11. Upper roller support; 12. Lower roller support; 13. Pipeline; 14. Welding head; 15. Flux recovery device; 16. Flux delivery pipe; 17. Ball screw; 18. Motor; 19. Upper roller; 20. Lower roller.

[0059] The realization of the purpose, functional features and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners

[0060] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.

[0061] For a better understanding of the technical solutions of this application, the following will be described in detail in combination with the drawings in the specification and the specific implementation manners.

[0062] In traditional welding processes, a wire spool is a device used to store welding wire. In a horizontal submerged arc welding machine, the wire spool plays a crucial role, and the welding wire it supplies is gradually consumed during welding. The process of the welding wire from the spool to the welding torch is not a simple linear motion but rather presents a curved trajectory. The formation of this curved trajectory is caused by changes in the height of the wire spool. As the height of the wire spool changes, the shape of the curve also changes accordingly. Such changes in the curved trajectory may cause problems during wire feeding, such as wire jamming in the spool, etc.

[0063] The main solution in the embodiments of this application is as follows: Through image processing, the center coordinates and radius of the wire curve are obtained, and polynomial regression fitting is performed on the center coordinates and radius. Since polynomial regression fitting can accurately fit complex non-linear relationships between data, the established target polynomial regression equation can obtain predicted values of accurate center coordinates and radius at a certain height. The predicted values are compared with a preset range, and the wire spool support is adjusted according to the comparison results, thereby achieving precise adjustment of the position of the wire spool, ensuring the optimal state of the wire shape, and avoiding the impact of the wire feeding process of the wire spool on the welding quality.

[0064] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a wire spool lifting device, a welding system, etc. that can implement the above functions. Hereinafter, the welding system will be used as an example to illustrate this embodiment and the following embodiments.

[0065] Based on this, the embodiments of this application provide a method for controlling the lifting of a wire spool. Refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the method for controlling the lifting of the wire spool in this application.

[0066] In this embodiment, the method for controlling the lifting of the wire spool includes steps S10 to S50:

[0067] Step S10, obtaining the historical height of the wire spool and the corresponding wire images at each height;

[0068] It should be noted that in this embodiment, an industrial camera is used to collect pictures, the height of the wire spool is detected by a laser sensor installed on the base of the lifting platform, and the wire image refers to the image of the wire curve between the wire spool and the welding machine.

[0069] It can be understood that obtaining multiple heights of the wire spool and the corresponding wire images at each height is to obtain a data set for training the subsequent polynomial regression equation, making the prediction results of the polynomial regression equation more accurate.

[0070] Step S20: Determine the first center coordinates and the first circle radius corresponding to each image based on the wire image.

[0071] It should be noted that the center coordinates refer to the coordinates of the center of the fitting circle obtained after circular fitting of the wire curve, the circle radius refers to the radius of the fitting circle, and the first center coordinates and the first circle radius are obtained based on historical wire images.

[0072] It can be understood that by performing image recognition and curve processing on the wire curve in the wire image, a fitting circle can be obtained, and then the center coordinates and the circle radius can be obtained, so as to subsequently establish a polynomial regression equation of the center coordinates with respect to the height of the wire spool and a polynomial regression equation of the circle radius with respect to the height of the wire spool.

[0073] Step S30: Fit a polynomial regression equation to the historical wire spool height and the corresponding first center coordinates and first circle radius at each height to obtain the target polynomial regression equation.

[0074] It should be noted that polynomial regression is a form of regression analysis that models the relationship between the independent variable x and the dependent variable y as an nth-order polynomial. Compared with linear regression that can only represent a linear relationship, polynomial regression can more accurately fit the complex non-linear relationship between data.

[0075] Principle of the polynomial regression equation: When fitting a polynomial regression model, first select an appropriate polynomial order. Then, the optimal coefficients need to be found so that this polynomial can best fit the data points. Assume that an nth-order polynomial model is selected, and its form is:

[0076] y = a0 + a1x + a2x 2 + … + a n x n + ∈

[0077] where y is the dependent variable, x is the independent variable, a0, a1, …, a n are the coefficients to be determined, n is the order of the polynomial, and ∈ is the error term. The goal is to find the optimal coefficients a0, a1, …, a n , so that the polynomial can best fit the data points. To achieve this goal, the least squares method is usually used, which determines the optimal coefficients by minimizing the sum of the squared residuals.

[0078] The residual is the difference between the observed value y i of each data point and the model predicted value . The goal is to minimize the sum of the squares of the residuals of all data points. Define the loss function as the sum of the squared residuals, that is:

[0079]

[0080] Among them, m is the number of data points. Then, by taking the derivative of the loss function and setting the derivative equal to zero, the coefficients that minimize the loss function are found. This may require using numerical optimization algorithms to solve because, for most cases, there is no closed-form solution. Finally, by finding the optimal coefficients, the fitted polynomial regression equation can be obtained, which can be used to predict y corresponding to the new x or analyze the influence of the independent variable x on the dependent variable y.

[0081] It can be understood that in practical applications, choosing the appropriate polynomial order is crucial because too low an order may lead to underfitting (the model is too simple to capture all the relevant relationships in the data), while too high an order may lead to overfitting (the model is too complex, capturing too much noise and having poor generalization ability). In this embodiment, through multiple experiments, it is determined that the relationship between the center coordinates and the radius with respect to the height can be described by a second-order polynomial equation. The solution of polynomial regression is usually carried out by minimizing the sum of the squares of the error terms, which can be achieved by various numerical methods, such as the gradient descent method or the normal equation method.

[0082] Step S40: Obtain the current height of the wire spool, and input the current height of the wire spool as a parameter into the target polynomial regression equation to obtain the second center coordinates and the second circle radius;

[0083] It should be noted that the target polynomial regression equation is an exact mathematical model, including the polynomial regression equation of the center coordinates with respect to the height of the wire spool and the polynomial regression equation of the circle radius with respect to the height of the wire spool, which is used to predict the center coordinates and the radius at different heights. Input the height value in the current welding process into the second-order polynomial equation to calculate the expected center coordinates and the radius. The second center coordinates and the second circle radius are the predicted data obtained when inputting the current height of the wire spool into the target polynomial regression equation.

[0084] It can be understood that by using the target polynomial regression equation to predict the center coordinates and the circle radius, when a height value h is given, the corresponding center coordinates (a, b) and the radius r can be calculated. This step realizes the prediction of unknown data and provides a basis for the next parameter range judgment.

[0085] Step S50: Adjust the wire spool bracket according to the second center coordinates, the second circle radius, and the center coordinates and the circle radius within the preset range to complete the control of the lifting of the wire spool.

[0086] It should be noted that the center coordinates and the circle radius within the preset range are the data ranges of the normal wire feeding of the wire spool obtained through manual measurement and collection of several groups of center coordinates and circle radii as a data set and verified through experiments. Refer to Figure 2 ,Figure 2 It is a data graph of the center coordinates and the radius of a circle within the preset range of this embodiment. Through multiple groups of experiments, it is verified that the value ranges of the center coordinates (a, b) and the radius of the circle corresponding to the non-jamming of the wire spool are: 400 ≥ a ≥ 320 ∩ 1200 ≥ b ≥ 1000 ∩ 1300 ≥ r ≥ 980;

[0087] The hardware used in this embodiment includes a vision detection structure, a motion control structure, a submerged arc welding machine module, a machine table main body, etc. The vision detection structure is arranged on the horizontal submerged arc welding machine, used for the recognition of the wire curve and the extraction of coordinate points, and obtaining the coordinate points on the curve; it consists of an industrial camera, a lens, and an image acquisition card. The working mode of the station camera is a real-time video stream, and the image data is transmitted to the vision host in real time through a gigabit network cable. The motion control structure is controlled by a programmable logic controller (PLC, Programmable Logic Controller), and consists of a linear reciprocating module, a module bracket, a motion control card, a motor driver, a host, and a wire spool bracket; the wire spool bracket is used to place the wire spool; the linear reciprocating module consists of a motor, a ball screw, and a linear guide rail, used to lift and lower the wire spool bracket; the module bracket is used to place the linear reciprocating module. The submerged arc welding machine module consists of a flux hopper, a flux delivery pipe, a flux recovery device, a welding head, four linear reciprocating modules, a double-frequency motor reducer, four rubber-coated roller drives, and four rollers; the flux hopper is used to store the flux; the flux delivery pipe is used to deliver the flux;; the flux recovery device is used to hold the unused flux; the welding head is used for welding, and a wire delivery device is installed above it; the four linear reciprocating modules are used to control the welding head to weld at different positions; the double-frequency motor reducer is used to control the rubber-coated roller drive; the rubber-coated roller drive is used to control the rotation of the four rollers; the four rollers are used to press the pipeline and drive the rotation of the pipeline. The machine table main body consists of a computer main unit, precise control by a PLC touch screen, and a handheld control box.

[0088] It can be understood that through the recognition of the wire curve by the vision detection structure, the coordinate points of the curve on the image coordinate system are obtained after image processing, and the center coordinates and the radius of the circle of the curve are obtained through polynomial regression processing. When the center coordinates and the radius of the circle are outside the preset range, information is sent to the motion control structure, and the motion control structure controls the motion control card, controls the driver, and controls the motor to rotate, so that the ball screw rotates, and then the wire spool bracket rises or falls. When the center coordinates and the radius of the circle are within the preset range, the wire spool bracket is kept stationary.

[0089] This embodiment provides a method for controlling the lifting of a wire spool. By obtaining the historical height of the wire spool and the corresponding wire images at each height; determining the first center coordinates and the first circle radius corresponding to each image according to the wire images; performing polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radius at each height to obtain a target polynomial regression equation; obtaining the current height of the wire spool, inputting the current height of the wire spool as a parameter into the target polynomial regression equation to obtain the second center coordinates and the second circle radius; adjusting the wire spool support according to the second center coordinates, the second circle radius, and the center coordinates and circle radius within a preset range to complete the control of the lifting of the wire spool. Through image processing, this application obtains the center coordinates and the circle radius of the wire curve, and performs polynomial regression fitting on the center coordinates and the circle radius. Since polynomial regression fitting can accurately fit the complex non-linear relationship between data, the established target polynomial regression equation can obtain the predicted values of the accurate center coordinates and circle radius at a certain height. Comparing the predicted values with the preset range, and adjusting the wire spool support according to the comparison result, thereby achieving precise adjustment of the position of the wire spool, ensuring the best state of the wire shape, ensuring the continuity and stability of the wire feeding from the wire spool during the welding process, and further ensuring the welding quality, which can significantly improve the production efficiency and product quality.

[0090] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 3 , Figure 3 which is a schematic flowchart of the second embodiment of the method for controlling the lifting of the wire spool in the present application. The step S20 of the method for controlling the lifting of the wire spool includes steps S21 to S25:

[0091] Step S21, draw a rectangular frame to identify the curve of the wire in the wire image;

[0092] It should be noted that in this embodiment, a rectangular frame is drawn for the wire curve, and the rectangular frame just includes the wire curve, and the rectangular frame can narrow the range of the wire image to be analyzed.

[0093] It can be understood that identifying and highlighting the curve in the image is convenient for further analysis.

[0094] Step S22, extract the rectangular frame part, and perform threshold segmentation on the rectangular frame part to obtain a target area;

[0095] It should be noted that threshold segmentation is an image processing technique used to divide an image into different regions or objects. In threshold segmentation, we set a threshold, and then based on the gray values of the pixels, the pixels in the image are divided into two categories: pixels below the threshold and pixels above the threshold. In this way, the image is divided into two parts, forming a binary image. Threshold segmentation is used for simple image segmentation tasks, such as segmenting text and background in document image processing, or segmenting target regions in medical images, etc. The selection of the threshold is crucial for the segmentation effect and generally needs to be adjusted according to the specific application scenario and image characteristics. Common threshold segmentation methods include global thresholding, adaptive thresholding, and histogram-based thresholding. Global thresholding is the simplest method and is suitable for cases where the overall gray distribution of the image is relatively uniform. Adaptive thresholding can dynamically adjust according to the local gray characteristics of the image and is suitable for images with uneven illumination or poor contrast. Histogram-based thresholding adaptively selects the threshold based on the histogram information of the image and is suitable for images with irregular gray distributions or bimodal characteristics.

[0096] It can be understood that the image is segmented into target regions of interest and background regions, focusing on specific and important parts of the image for curve analysis and processing.

[0097] Step S23, obtaining the shape and boundary of the curve according to the target region;

[0098] It should be noted that Gaussian filtering and Canny edge detection are performed on the target region to extract the boundary information and structural information of the curve; according to the boundary information and the structural information, the shape and boundary of the curve are identified and located.

[0099] Gaussian filtering is an image processing technique used to smooth images, remove noise, and enhance image quality. Gaussian filtering is based on the Gaussian function to perform weighted averaging on the pixels in the image, thus blurring the image and reducing the impact of noise. In Gaussian filtering, the value of each pixel is determined by the weighted average of its surrounding neighboring pixels, and the weights are determined by the Gaussian function. The Gaussian function is a bell-shaped curve with the center point being the pixel itself, and the weights become smaller as the distance from the pixel increases. In this way, pixels farther away from the current pixel have less influence on it, thus achieving a smoothing effect. Gaussian filtering is used to remove high-frequency noise in images, such as Gaussian noise, salt-and-pepper noise, etc. By adjusting the parameters of the Gaussian filter (such as the convolution kernel size and standard deviation), different degrees of smoothing effects can be achieved. A smaller convolution kernel and standard deviation can retain more image details but may not completely remove the noise; while a larger convolution kernel and standard deviation can smooth the image more thoroughly but may blur the details. Gaussian filtering has a wide range of applications in the field of image processing, such as image denoising, preprocessing before edge detection, image enhancement, and feature extraction, etc.

[0100] Canny edge detection is a classic image processing algorithm used to detect edges in images. The main steps of the Canny edge detection algorithm include: 1) Gaussian Blur, first, perform Gaussian filtering on the image to reduce noise and smooth the image. 2) Compute Gradient, use operators such as Sobel to calculate the gradient magnitude and direction of the image in order to find the edges in the image. 3) Non-maximum Suppression, perform non-maximum suppression in the gradient direction to suppress non-edge pixels, so that only pixels with the maximum gradient magnitude are retained, thus refining the edges. 4) Double Thresholding, according to the set high threshold and low threshold, perform binary processing on the image to divide the pixels into strong edges, intermediate edges, and weak edges. 5) Edge Tracking by Hysteresis, connect the edges according to the strong edge pixels and adjacent intermediate edge pixels, and eliminate the weaker edges. Through the above steps, the Canny edge detection algorithm can accurately detect the edges in the image and has the following advantages: it has resistance to noise, reducing the interference of noise on edge detection through Gaussian filtering; it can accurately locate and refine the edges in the image, avoiding the appearance of rough or excessive detected edges; through double threshold detection and edge connection, the sensitivity and accuracy of the algorithm can be flexibly adjusted.

[0101] It is understandable that Gaussian filtering reduces image noise and smooths the image while trying to keep the edges clear; using Canny edge detection to accurately find the edge information in the image while reducing the interference of noise, providing clear structural information for image analysis and processing.

[0102] Step S24, according to the shape and boundary, extract the set of coordinate points of the curve;

[0103] It should be noted that please refer to Figure 4 , Figure 4 which is the schematic diagram of extracting the set of coordinate points provided in this embodiment. According to the shape and boundary of the curve, the following methods can be used to extract the set of coordinate points of the curve: 1) Pixel tracking algorithm, starting from the edge pixels, perform pixel tracking on the curve, continuously extending and connecting adjacent pixels until the complete curve is obtained. Common pixel tracking algorithms include algorithms based on the shortest path, algorithms based on curvature, etc. 2) Curve fitting algorithm, use curve fitting methods (such as least squares fitting, Bezier curve fitting, etc.) to fit the edge pixels to obtain the parametric equation of the curve and indirectly obtain the coordinate points on the curve. 3) Morphological operations, apply morphological operations (such as erosion, dilation, skeletonization, etc.) to the detected boundary to extract the skeleton of the curve, and then deduce the coordinate points of the curve through the set of skeleton points.

[0104] It is understandable that according to the above method, the set of coordinate points of the curve can be obtained, and this set of coordinate points can be used for further tasks such as curve analysis, feature extraction, or image reconstruction.

[0105] Step S25, perform circle fitting on the set of coordinate points by the least squares method to obtain the first center coordinate and the first circle radius.

[0106] It should be noted that please refer to Figure 5 , Figure 5 which is the partial schematic diagram of fitting a circle by the least squares method provided in this embodiment. Fitting a circle by the least squares method is a mathematical method used to estimate the parameters of a circle through a given set of data points, so that the sum of the squared residuals between these data points and the fitted circle is minimized. The process of fitting a circle by the least squares method involves projecting the given set of data points into an appropriate parameter space and finding the optimal circle parameters by minimizing the sum of the squared residuals. This usually involves iterative optimization algorithms to find the optimal circle parameters. By fitting a circle by the least squares method, the center position and radius of the set of data points can be accurately estimated, thus achieving accurate fitting of the curve.

[0107] The following is the principle of fitting a circle by the least squares method:

[0108] The equation of fitting a circle by the least squares method is based on the standard equation form of a circle. The standard equation of a circle is as follows:

[0109] (x - a) 2 +(y - b) 2 =r 2

[0110] where (a, b) are the coordinates of the center of the circle and r is the radius of the circle. The goal of fitting a circle is to find the optimal circle through a given set of data points such that the sum of the squared residuals between the data points and the circle is minimized. Therefore, it is necessary to find the center (a, b) and radius r that best fit the set of data points. Suppose there are n data points (x i , y i ). The equation of the circle can be rearranged as:

[0111] x 2 - 2ax + a 2 + y 2 - 2by + b 2 - r 2 =0

[0112] Substituting each data point (x i , y i ) into the above equation, the following system of equations is obtained:

[0113]

[0114] After expanding and rearranging these equations, a system of linear equations can be obtained:

[0115]

[0116] Then, the least squares method can be used to solve the above system of linear equations to obtain the optimal center (a, b) and radius r, thus obtaining the optimal circle equation.

[0117] It can be understood that an objective function of the center coordinates and the circle radius with respect to the set of coordinate points is defined to quantify the difference between the set of coordinate points and the fitted circle; according to the distribution characteristics of the coordinate points in the set of coordinate points, the initial center coordinates and the initial circle radius of the objective function are defined; the initial center coordinates and the initial circle radius are adjusted through an iterative algorithm to obtain the center coordinates and the circle radius when the objective function reaches the minimum value, and the center coordinates and the circle radius are used as the first center coordinates and the first circle radius.

[0118] To initiate the optimization process, an initial parameter guess is required, that is, the starting center coordinates (x c0 , y c0) and the initial circle radius r0. These parameters can be estimated by analyzing the distribution characteristics of the data points. For example, the mean of the data points can be selected as the initial center coordinates, and the maximum distance from the data points to the center can be selected as the initial radius. Providing a reasonable initial guess helps to ensure the stability and convergence speed of the optimization algorithm.

[0119] During the optimization process, iterative algorithms (such as gradient descent, Newton's method, genetic algorithms, etc.) are used to adjust the parameters of the center coordinates and radius to minimize the objective function. In each iteration, the algorithm updates the parameters according to the gradient of the objective function (or other criteria of the optimization algorithm) until the convergence condition is reached (for example, the change in the objective function is less than a certain threshold, or the number of iterations reaches a preset maximum value). Through this process, the parameter combination that minimizes the objective function is found, that is, the optimal center coordinates and radius.

[0120] The objective function is a mathematical expression used to quantify the difference between the data point set and the fitted circle. This function usually takes the form of the least squares method and calculates the sum of the squares of the perpendicular distances from the data points to the fitted circle. Specifically, for each data point (x i , y i ), the objective function F can be defined as:

[0121]

[0122] where (x i , y i ) are the center coordinates, r is the radius of the circle, and n is the number of data points. The purpose of the objective function is to find a circle such that the total distance from all data points to the circle is minimized.

[0123] In this embodiment, by drawing a rectangular frame to identify the curve of the welding wire in the welding wire image, extracting the rectangular frame part, performing threshold segmentation on the rectangular frame part to obtain the target area, performing Gaussian filtering and Canny edge detection on the target area to extract the boundary information and structural information of the curve, identifying and locating the shape and boundary of the curve according to the boundary information and structural information, extracting the set of coordinate points of the curve according to the shape and boundary, defining an objective function of the center coordinate and the circle radius with respect to the set of coordinate points to quantify the difference between the set of coordinate points and the fitted circle, defining the initial center coordinate and the initial circle radius of the objective function according to the distribution characteristics of the coordinate points in the set of coordinate points, adjusting the initial center coordinate and the initial circle radius through an iterative algorithm to obtain the center coordinate and the circle radius when the objective function reaches the minimum value, and taking the center coordinate and the circle radius as the first center coordinate and the first circle radius. This embodiment identifies and highlights the curve in the image, divides the image into the target area of interest and the background area, focuses on the specific and important parts in the image for the analysis and processing of the curve. Through Gaussian filtering and Canny edge detection, the interference of noise on edge detection is reduced, the edges in the image can be accurately located and refined, and the appearance of rough or excessive detected edges is avoided, providing clear structural information for image analysis and processing. Through the least squares circle fitting, the central position and radius of the set of data points can be accurately estimated, so as to accurately fit the curve and obtain the accurate center coordinate and circle radius.

[0124] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar content as that in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 6 , Figure 6 which is a schematic flowchart of the third embodiment of the method for controlling the lifting of the welding wire reel in the present application. The steps S30 of the method for controlling the lifting of the welding wire reel include steps S31 to S34:

[0125] Step S31, defining a polynomial function model of the center coordinate and the circle radius with respect to the height of the welding wire reel;

[0126] It should be noted that a polynomial function is just a formula, and a model is a combination of these formulas. Define a polynomial function and, according to the solved coefficients, define a polynomial function model. This model can calculate and output the corresponding center coordinate (a, b) and radius r according to the input value (for example, height h). The form of the polynomial function model can be expressed as:

[0127]

[0128]

[0129]

[0130] Among them, p i , q i , s i are polynomial coefficients, n i is the corresponding exponent, and m, l, and t are the orders of the abscissa, ordinate, and radius polynomials respectively.

[0131] It can be understood that bringing the data set into the model is to train the model. Training and adjusting the model is to calculate the difference between the training result and the actual data, making this difference smaller and smaller, and continuously iterating the training difference to find the optimal coefficients.

[0132] To determine these coefficients, the following steps are usually required: 1) Collect data, which requires a set of known input values h and the corresponding center coordinates (a, b) and radius r. 2) Select the model order. According to the complexity of the data, select appropriate polynomial orders m, n, and t. The order is obtained through experimental verification. First, the first order was verified, and then the second order was verified. The learning curve of the second-order polynomial model was shown, and its performance under different training set sizes was analyzed. The learning curve shows that good performance was achieved on the validation set, and there was no obvious overfitting or underfitting. Higher-order polynomial models may overfit the data, making the model more difficult to interpret and understand, while the second-order polynomial model finds a balance between expressiveness and interpretability. 3) Fit the model. Use the regression analysis method to fit the data, which usually involves minimizing the difference between the actual observed values and the model predicted values. In statistics, this is called the least squares method, that is, finding the coefficients pi, qi, si to minimize the sum of the squared residuals of all data points. 4) Solve for the coefficients. Solve the above minimization problem through algebraic methods to obtain the estimated values of the coefficients. 5) Model verification. Use a part of the data (usually a subset of the data set) as the test set to verify the prediction performance of the model. 6) Parameter estimation: If there are unknown parameters p and n in the model, these parameters can be estimated through the residuals in the fitting process, which usually involves statistical analysis of the residuals, such as calculating the standard deviation of the residuals, or using more complex statistical models to estimate the distribution of the parameters. In actual operation, these steps may need to be iterated to optimize the accuracy and generalization ability of the model.

[0133] Step S32, define the loss function according to the sum of squared residuals. The residual is the difference between the actual values of the center coordinates and the circle radius and the predicted values of the polynomial function model;

[0134] It should be noted that the loss function is used to measure the difference or error between the model predicted values and the actual observed values, and can help the optimization algorithm adjust the model parameters to make the prediction results of the model more accurate.

[0135] It is understandable that in regression problems, the commonly used loss function is the Residual Sum of Squares (RSS), also known as the Mean Squared Error (MSE). The general steps to define the loss function according to the residual sum of squares are as follows: 1) First, define the model prediction value, which can be a linear regression model, a neural network model, or any other prediction model. 2) Then, prepare the sample data, including the true observed values and the corresponding model prediction values. 3) Calculate the residual of each sample. 4) Square each residual, and then take the average of the sum of the squared residuals of all samples to obtain the value of the loss function. 5) The optimization algorithm usually tries to minimize the loss function by adjusting the model parameters to make the model prediction closer to the true observed values. Selecting an appropriate loss function helps ensure that the model has good generalization ability and prediction performance.

[0136] Step S33: Take the derivative of the loss function to obtain the coefficient that makes the loss function reach the minimum value, and substitute the coefficient into the polynomial function model.

[0137] It should be noted that when taking the derivative of the loss function, optimization algorithms such as gradient descent can be used to find the coefficient that makes the loss function reach the minimum value. The specific steps are as follows: 1) Calculate the partial derivatives of the loss function with respect to each coefficient. 2) According to the calculated partial derivatives, update the coefficient values to gradually reduce the loss function. 3) Repeat step 2 until a satisfactory convergence condition is reached.

[0138] Step S34: Use the historical wire spool height and the corresponding first center coordinates and first circle radii at each height as a data set, and train the polynomial function model through the data set. Adjust the coefficients of the polynomial function model to obtain the target polynomial regression equation.

[0139] It should be noted that steps S31 - S33 are the process of calculating the coefficients of the polynomial function model based on a set of data (i.e., the wire spool height, the corresponding first center coordinates and first circle radii at a certain wire spool height). At this time, the accuracy of the obtained polynomial function model is not high.

[0140] It is understandable that step S34 is a process of repeating steps S31 - S33 to calculate multiple coefficients based on multiple sets of data in the data set. In this embodiment, the final coefficient is the result of taking the average of multiple coefficients. By training the polynomial function model through the data set, the obtained target polynomial regression equation has more accurate predictions.

[0141] In this embodiment, a polynomial function model of the center coordinates and the radius of a circle with respect to the height of the wire spool is defined, and a loss function is defined according to the sum of squared residuals. The residual is the difference between the actual values of the center coordinates and the radius of the circle and the predicted values of the polynomial function model. By taking the derivative of the loss function, the coefficients that minimize the loss function are obtained, and the coefficients are substituted into the polynomial function model. Using the historical wire spool height and the corresponding first center coordinates and first radii of the circle at each height as a data set, the polynomial function model is trained through the data set, and the coefficients of the polynomial function model are adjusted to obtain the target polynomial regression equation. In this embodiment, the loss function is used to measure the difference or error between the model predicted values and the actual observed values, which can help the optimization algorithm adjust the model parameters to make the prediction results of the model more accurate; by adjusting the model parameters through the optimization algorithm, the model prediction is closer to the true observed values, which helps to ensure that the model has good generalization ability and prediction performance; by calculating the coefficients of multiple polynomial function models with multiple groups of data in the data set and then taking the average value as the final coefficient, the accuracy of the prediction results of the target polynomial regression equation is improved.

[0142] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the method for controlling the lifting of the wire spool in the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.

[0143] The present application also provides a device for controlling the lifting of the wire spool. Please refer to Figure 7 , the device for controlling the lifting of the wire spool includes:

[0144] Data acquisition module 10: used to acquire the historical wire spool height and the corresponding wire images at each height;

[0145] Image processing module 20: used to determine the first center coordinates and the first radii of the circle corresponding to each image according to the wire images;

[0146] Model establishment module 30: used to perform polynomial regression equation fitting on the historical wire spool height and the corresponding first center coordinates and first radii of the circle at each height to obtain a polynomial regression equation of the center coordinates and the radius of the circle with respect to the wire spool height;

[0147] Data prediction module 40: used to acquire the current wire spool height, input the current wire spool height as a parameter into the polynomial regression equation to obtain the second center coordinates and the second radii of the circle;

[0148] Lifting control module 50: used to adjust the wire spool support according to the second center coordinates, the second radii of the circle and the center coordinates and the radii of the circle within a preset range to complete the control of the lifting of the wire spool.

[0149] Please refer toFigure 8 , Figure 8 is the overall structural schematic diagram of this device. Please refer to Figure 9 , Figure 9 is the schematic diagram of the camera collecting the wire curve of this device. Please refer to Figure 10 , Figure 10 is the schematic diagram of the movement structure of the wire spool of this device. This device consists of a visual detection structure, a wire spool lifting structure, a submerged arc welding machine structure, and a machine table main body. The camera 7 is installed on the submerged arc welding machine. The second linear reciprocating module 8 is installed on the left side of the submerged arc welding machine to control the up and down movement of the entire welding system. The upper roller bracket 11 is installed on the second linear reciprocating module. The fourth linear reciprocating module 10 is installed on the upper roller bracket 11. The third linear reciprocating module 9 is installed on the fourth linear module 10. The first linear reciprocating module 6 is installed on the third linear reciprocating module. The welding machine funnel 1 is connected to the welding head 14 through the welding machine conveying device 16, and both are installed on the first linear reciprocating module. The upper roller 19 is installed on the upper roller bracket 11, and the lower roller 20 is installed on the lower roller bracket. The upper roller 19 and the lower roller 20 cooperate to clamp the pipe 13 and control its drive. The ball screw 17 and the motor 18 are installed on the module bracket 3. The wire spool bracket 2 is installed on the motor 18. The wire 5 is installed on the wire spool 4, and the wire spool is installed on the wire spool bracket 2. The PLC control module of the submerged arc welding machine controls the four linear reciprocating modules to control the movement of the welding head. The flux funnel 1 transports the flux to the welding head through the flux conveying pipe 16 to ensure submerged arc welding. The drive of the rollers is installed in the upper roller bracket 11 and the lower roller bracket 12 to ensure that the rollers clamp and drive the pipe, and complete the all-position submerged arc welding of the pipe together with the welding head. When the wire spool 4 supplies the wire 5 to the welding head, a curve will be formed in the middle. The computer controls the motion control card, the motion control card controls the driver, the driver controls the motor 18 to rotate, drives the ball screw 17 to rotate, and then controls the movement of the wire spool. After moving a certain distance, the height is substituted into the parametric equation of the center coordinates and the circle radius with respect to the height to obtain the center coordinates and the circle radius, and compared with the parameter range. If it is not within the parameter range, the host sends a movement signal to the motion control card, the motion control card controls the motor driver, and then controls the motor 18 to rotate, drives the ball screw 17 to rotate, and then realizes the movement of the wire spool bracket 2. If it is not within the parameter range, the host sends a stop signal to the motion control card, the motion control card controls the motor driver, and then controls the motor 18 to stop rotating, and the ball screw 17 stops rotating, and then realizes the stop movement of the wire spool bracket 2.

[0150] The device for controlling the lifting of the wire spool provided by the present application adopts the method for controlling the lifting of the wire spool in the above embodiment, and can solve the technical problem of controlling the lifting of the wire spool. Compared with the prior art, the beneficial effects of the device for controlling the lifting of the wire spool provided by the present application are the same as those of the method for controlling the lifting of the wire spool provided by the above embodiment, and the other technical features in the device for controlling the lifting of the wire spool are the same as the features disclosed in the method of the above embodiment, and will not be elaborated herein.

[0151] The present application provides a device for controlling the lifting of a wire spool. The device for controlling the lifting of the wire spool includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for controlling the lifting of the wire spool in the first embodiment above.

[0152] Reference is made below to Figure 11 , which shows a schematic structural diagram of a device for controlling the lifting of a wire spool suitable for implementing the embodiments of the present application. The device for controlling the lifting of the wire spool in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 11 The device for controlling the lifting of the wire spool shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.

[0153] As Figure 11As shown, the device for controlling the lifting of the wire spool may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the device for controlling the lifting of the wire spool are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the device for controlling the lifting of the wire spool to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a device for controlling the lifting of the wire spool having various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be alternatively implemented or had.

[0154] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.

[0155] The device for controlling the lifting of the wire spool provided in the present application adopts the method for controlling the lifting of the wire spool in the above-mentioned embodiment, and can solve the technical problem of controlling the lifting of the wire spool. Compared with the prior art, the beneficial effects of the device for controlling the lifting of the wire spool provided in the present application are the same as those of the method for controlling the lifting of the wire spool provided in the above-mentioned embodiment, and other technical features in the device for controlling the lifting of the wire spool are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.

[0156] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0157] As described above, the above are only specific embodiments of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

[0158] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the method for controlling the lifting of the wire spool in the above embodiments.

[0159] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0160] The above computer-readable storage medium can be included in the device for controlling the lifting of the wire spool; it can also exist separately without being assembled into the device for controlling the lifting of the wire spool.

[0161] The above computer-readable storage medium carries one or more programs, which, when executed by a device for controlling the lifting of a wire spool, cause the device for controlling the lifting of the wire spool to: obtain the historical height of the wire spool and the corresponding wire images at each height; determine the first center coordinates and the first circle radius corresponding to each image according to the wire images; perform polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radius at each height to obtain a target polynomial regression equation; obtain the current height of the wire spool, input the current height of the wire spool as a parameter into the target polynomial regression equation to obtain the second center coordinates and the second circle radius; and adjust the wire spool support according to the second center coordinates, the second circle radius, and the center coordinates and circle radius within a preset range to complete the control of the lifting of the wire spool.

[0162] Computer program code for performing the operations of the present application may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by connecting through an Internet service provider via the Internet).

[0163] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0164] The modules involved in the embodiments of the present application can be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0165] The readable storage medium provided by the present application is a computer-readable storage medium, and the computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the method for controlling the lifting of the wire spool, which can solve the technical problem of controlling the lifting of the wire spool. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the method for controlling the lifting of the wire spool provided by the above embodiments, and will not be elaborated here.

[0166] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method for controlling the lifting of the wire spool as described above are implemented.

[0167] The computer program product provided by the present application can solve the technical problem of controlling the lifting of the wire spool. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the method for controlling the lifting of the wire spool provided by the above embodiments, and will not be elaborated here.

[0168] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the technical concept of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.

Claims

1. A method for controlling the lifting of a wire spool, characterized in that, The method includes: Obtaining the historical height of the wire spool and the corresponding wire images at each height; Determining the first center coordinates and the first circle radius corresponding to each image according to the wire images; Performing polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radius at each height to obtain a target polynomial regression equation; Obtaining the current height of the wire spool, and inputting the current height of the wire spool as a parameter into the target polynomial regression equation to obtain second center coordinates and a second circle radius; Adjusting the wire spool bracket according to the second center coordinates, the second circle radius, and the center coordinates and circle radius within a preset range to complete the control of the lifting of the wire spool.

2. The method according to claim 1, wherein The step of determining the first center coordinates and the first circle radius corresponding to each image according to the wire images includes: Drawing a rectangular frame to mark the curve of the wire in the wire image; Extracting the rectangular frame part, performing threshold segmentation on the rectangular frame part to obtain a target area; Obtaining the shape and boundary of the curve according to the target area; Extracting the coordinate point set of the curve according to the shape and boundary; Performing circle fitting on the coordinate point set by the least squares method to obtain the first center coordinates and the first circle radius.

3. The method according to claim 2, wherein The step of obtaining the shape and boundary of the curve according to the target area includes: Performing Gaussian filtering and Canny edge detection on the target area to extract the boundary information and structural information of the curve; Identifying and positioning the shape and boundary of the curve according to the boundary information and the structural information.

4. The method according to claim 2, wherein The step of performing circle fitting on the coordinate point set by the least squares method to obtain the first center coordinates and the first circle radius includes: Defining an objective function of the center coordinates and the circle radius with respect to the coordinate point set to quantify the difference between the coordinate point set and the fitted circle; Defining the initial center coordinates and the initial circle radius of the objective function according to the distribution characteristics of the coordinate points in the coordinate point set; Adjusting the initial center coordinates and the initial circle radius through an iterative algorithm to obtain the center coordinates and the circle radius when the objective function obtains the minimum value, and taking the center coordinates and the circle radius as the first center coordinates and the first circle radius.

5. The method according to claim 1, wherein The step of performing polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radius at each height to obtain a target polynomial regression equation includes: Defining a polynomial function model of the center coordinates and the circle radius with respect to the height of the wire spool; Defining a loss function according to the sum of squared residuals, where the residual is the difference between the actual values of the center coordinates and the circle radius and the predicted values of the polynomial function model; Taking the derivative of the loss function to obtain the coefficients that make the loss function reach the minimum value, and substituting the coefficients into the polynomial function model; Taking the historical height of the wire spool and the corresponding first center coordinates and first circle radius at each height as a data set, training the polynomial function model through the data set, and adjusting the coefficients of the polynomial function model to obtain a target polynomial regression equation.

6. The method according to claim 1, wherein The steps of adjusting the wire spool support according to the second center coordinate, the second circle radius, and the center coordinates and circle radii within a preset range to complete the lifting control of the wire spool include: Determine whether the second center coordinate and the second circle radius are within the preset range; If not, adjust the wire spool support; If so, keep the wire spool support stationary.

7. A device for controlling the lifting of a wire spool, characterized in that, The device includes: A data acquisition module: used to acquire the historical height of the wire spool and the corresponding wire images at each height; An image processing module: used to determine the first center coordinate and the first circle radius corresponding to each image according to the wire images; A model establishment module: used to perform polynomial regression equation fitting on the historical height of the wire spool and the corresponding first center coordinates and first circle radii at each height to obtain a target polynomial regression equation; A data prediction module: used to acquire the current height of the wire spool, and input the current height of the wire spool as a parameter into the target polynomial regression equation to obtain the second center coordinate and the second circle radius; A lifting control module: used to adjust the wire spool support according to the second center coordinate, the second circle radius, and the center coordinates and circle radii within a preset range to complete the lifting control of the wire spool.

8. An apparatus for controlling the lifting of a wire spool, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the method for controlling the lifting of the wire spool according to any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the method for controlling the lifting of the wire spool according to any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method for controlling the lifting of the wire spool according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Pipeline submerged-arc welding wire increasing device and wire-increasingwelding technology

    CN108672904A

  • Method and device for improving quality of welding seam

    CN110899973A