White vehicle body welding task allocation method based on improved K-means algorithm
Through the improved K-means algorithm, using Tukey rules and density-distance weight iteration strategy, the unreasonable task allocation of multi-robot collaborative operations in body-white welding is solved, the welding efficiency and stability are improved, and the clustering accuracy and regional coordination are achieved.
Patent Information
- Application Number
- CN202510530455.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
In body white welding, the unreasonable task allocation of multiple robots collaborative operations makes it difficult to solve the problem of inefficiency.
The improved K-means algorithm is used to preprocess the solder joint data set through Tukey rules, calculate the weight density and global dispersion density, and dynamically select the dispersed and dense data points as the initial clustering center. Combined with the density-distance weight iteration strategy, the distribution of the clustering center is optimized, and the reasonable allocation of multi-robot collaborative welding tasks is achieved.
It improves the allocation efficiency and stability of welding tasks, overcomes the problems of initial center sensitivity and outlier interference in traditional methods, and achieves higher clustering accuracy and coordinated collision avoidance of working areas, which is suitable for complex welding scenarios.
Smart Images

Figure CN120450316A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of automobile body-in-white welding, and particularly relates to a body-in-white welding task allocation method based on an improved K-means algorithm. Background Art
[0002] The body-in-white (BIW) refers to the body of a vehicle after welding but before painting. BIW welding primarily involves various welding methods, including resistance spot welding, MIG / MAG arc welding, welding, and stud welding. With the rapid development of artificial intelligence and robotics, many automakers are adopting robots for BIW welding operations to improve welding quality and efficiency. Currently, BIW welding suffers from inefficient performance due to irrational task allocation for large welds or multiple robots working collaboratively in high-load welding stations, a problem that is difficult to address in actual production. Summary of the Invention
[0003] In order to solve the above technical problems existing in the prior art, the present invention provides a body-in-white welding task allocation method based on an improved K-means algorithm for improving production efficiency of multi-machine collaborative welding of body-in-white in complex welding scenarios.
[0004] To solve the above technical problems, the present invention adopts the following technical solution: a method for allocating body-in-white welding tasks based on an improved K-means algorithm, comprising the following steps:
[0005] S1. Tukey rule is used to preprocess the weld point dataset in the weldment;
[0006] S2, calculate the weight density to quantify the local density and global dispersion density of each data point;
[0007] S3. Iteratively select dispersed and dense data points through weights to dynamically complete the selection of initial clusters; initialize the cluster midpoints centers of the weld point dataset D to an empty set, and iteratively select K cluster centers, where K is the number of welding robots in the welding workstation;
[0008] S4. Starting from the centers data set with K cluster centers obtained in step S3, the k-means algorithm is executed to obtain the clustering results of the weld point data in the weldment, and the welding task allocation of the weldment is completed.
[0009] Furthermore, the specific process of step S1 is:
[0010] The solder joint dataset is D, the dimension is m, the scale factor is r, and the empirical value of r is 1.5. Calculate the first and third quantiles of the dataset on the jth dimension. for:
[0011]
[0012] In formula (1), round() is the rounding function, and n represents the number of data in dataset D;
[0013] Calculate the upper bound B lower and the lower bound B upper as:
[0014]
[0015] Calculate the core set S core and the non-core set S noncore as:
[0016]
[0017] Furthermore, the specific process of step S2 is:
[0018] Calculate the average Euclidean distance of all data point pairs in S core and the bandwidth parameter σ as:
[0019]
[0020] In formula (5), n core =|S core |,
[0021] For each local density x i ∈S core , the local density ρ(x i ) is:
[0022]
[0023] Calculate the maximum distance of the core subset as:
[0024]
[0025] Initialize the global dispersion of each data point as:
[0026]
[0027] The density-dispersion weight ω(x i ) is:
[0028] ω(x i ) = ρ(x i ) × δ(x i ) (9).
[0029] Furthermore, the specific process of step S3 is:
[0030] In the k (0 < k ≤ K) iteration process, select the current point with the largest weight as the data center as:
[0031]
[0032] Add c k to centers, and mark ω(c k ) = -∞ to avoid repeated selection; update the global dispersion δ(x i )(k < K), for each data point x i ∈ S core \centers, calculate its minimum distance to the selected centers centers:
[0033] δ(x i ) = min(δ(x i ), ||x i - c k ||) (11)
[0034] And recalculate the density-dispersion weight:
[0035] ω(x i ) = ρ(x i ) × δ(x i ) (12)
[0036] Adopt the strategy of incrementing the center points one by one to obtain the centers data set with K clustering center points.
[0037] Adopting the above technical solution, compared with the prior art, the present invention has the following beneficial effects:
[0038] In a limited working space, by taking the number of welding robots as the preset clustering number k, the algorithm characteristics are naturally adapted to the task partitioning requirements of a multi-robot system. Aiming at the problems of initial center sensitivity and outlier interference existing in the traditional K-means algorithm, on the basis of inheriting the K-means++ probabilistic initial center selection mechanism, a density weight and dynamic distance initialization clustering center selection is innovatively introduced. This improved solution can not only ensure the reachability of the welding points within the working area of each robot, but also achieve collaborative collision avoidance between working areas by optimizing the clustering centroid distribution, effectively overcoming the local optimal dilemma caused by random initialization, and providing a more stable multi-robot collaborative operation solution for complex welding scenarios such as white body.
[0039] The core innovation of this invention lies in its integration of outlier filtering, density-distance dynamic weighting, and iterative point selection. Tukey's rule is used to eliminate edge noise and focus on the core data subset. An innovative composite weight function combining "local density and dynamic global dispersion" is designed. While retaining information about high-density areas, it forces subsequent centers to diffuse toward low-density edges by updating the minimum distance constraint of selected centers in real time. A dynamic iterative point selection strategy is employed, with weight distribution adjusted immediately after each selection. This overcomes the traditional tendency to prioritize initial centers based on either "high density" or "pure distance," achieving an adaptive balance between density and dispersion. This effectively improves the local optimality problem inherent in K-means and K-means++ methods, which can be caused by initial center aggregation. This method boasts higher clustering accuracy and improved stability, enabling efficient allocation of body-in-white welding tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0041] The embodiments of the present invention are described in further detail below with reference to the accompanying drawings and examples.
[0042] like Figure 1 As shown, the present invention provides a method for allocating body-in-white welding tasks based on an improved K-means algorithm, comprising the following steps:
[0043] S1. Tukey rule is used to preprocess the weld point dataset in the weldment;
[0044] S2, calculate the weight density to quantify the local density and global dispersion density of each data point;
[0045] S3. Iteratively select dispersed and dense data points through weights to dynamically complete the selection of initial clusters; initialize the cluster midpoints centers of the weld point dataset D to an empty set, and iteratively select K cluster centers, where K is the number of welding robots in the welding workstation;
[0046] S4. Starting from the centers data set with K cluster centers obtained in step S3, the k-means algorithm is executed to obtain the clustering results of the weld point data in the weldment, and the welding task allocation of the weldment is completed.
[0047] Furthermore, the specific process of step S1 is:
[0048] The solder joint dataset is D, the dimension is m, the scale factor is r, and the empirical value of r is 1.5. Calculate the first and third quantiles of the dataset on the jth dimension. for:
[0049]
[0050] In formula (1), round() is the rounding function, and n represents the number of data in the D data set;
[0051] Calculate the upper bound B lower and lower bound B upper for:
[0052]
[0053] Computational core set S core and non-core set S noncore for:
[0054]
[0055] Furthermore, the specific process of step S2 is:
[0056] Calculate S core The bandwidth parameter σ of the average Euclidean distance of all data point pairs in is:
[0057]
[0058] In formula (5), n core =|S core |,
[0059] For each point the local density x i ∈S core , local density ρ(x i )for:
[0060]
[0061] The maximum distance of the core subset is calculated as:
[0062]
[0063] Initialize the global dispersion of each data point as:
[0064]
[0065] Density-dispersion weight ω(x i )for:
[0066] ω(x i )=ρ(x i )×δ(x i ) (9).
[0067] Furthermore, the specific process of step S3 is as follows:
[0068] In the k-th (0 < k ≤ K) iteration, the data center selected by choosing the current point with the largest weight is:
[0069]
[0070] Add c k to centers, and mark ω(c k ) = -∞ to avoid repeated selection; update the global dispersion δ(x i ) (k < K). For each data point x i ∈S core \centers, calculate its minimum distance to the selected centers centers:
[0071] δ(x i ) = min(δ(x i ), ||x i - c k ||) (11)
[0072] And recalculate the density-dispersion weight:
[0073] ω(x i ) = ρ(x i ) × δ(x i ) (12)
[0074] Adopt the strategy of incrementing the center points one by one to obtain the centers data set with K clustering center points.
[0075] The above embodiments illustrate the basic principles and features of the present invention. However, the above only illustrates the preferred embodiments of the present invention and is not limited by the described embodiments. Those of ordinary skill in the art, inspired by this patent and without departing from the spirit and scope protected by the claims of the present invention, can also make many forms of deformation and improvement, which all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be subject to the appended claims.
Claims
1. A method for allocating body-in-white welding tasks based on an improved K-means algorithm, characterized by: It includes the following steps: S1. Preprocess the solder joint data set in the welded part by using the Tukey rule; S2. Calculate the weighted density to quantify the local density and global dispersion density of each data point; S3. Dynamically complete the selection of the initial clustering by iteratively selecting dispersed and dense data points; initialize the set of clustering centers centers of the solder joint data set D to be an empty set, and iteratively select K clustering centers, where K is the number of welding robots in the welding workstation; S4. Starting from the centers data set with K clustering centers obtained in step S3, execute the k-means algorithm to obtain the clustering result of the solder joint data in the welded part and complete the welding task assignment of the welded part.
2. The method for allocating body-in-white welding tasks based on an improved K-means algorithm according to claim 1, characterized in that: The specific process of step S1 is as follows: The solder joint dataset is D, the dimension is m, the scale factor is r, and the empirical value of r is 1.
5. Calculate the first and third quantiles of the dataset on the jth dimension. for: In formula (1), round() is the rounding function, and n represents the number of data in the D data set; Calculate the upper bound B lower and lower bound B upper for: Computational core set S core and non-core set S noncore for:
3. The method for allocating body-in-white welding tasks based on an improved K-means algorithm according to claim 2, characterized in that: The specific process of step S2 is as follows: Calculate S core The bandwidth parameter σ of the average Euclidean distance of all data point pairs in is: In formula (5) For each point the local density x i ∈S core , local density ρ(x i )for: Calculate the maximum distance of the core subset as: Initialize the global dispersion of each data point as: Density-dispersion weight ω(x i )for: ω(x i )=ρ(x i )×δ(x i ) (9).
4. The method for allocating body-in-white welding tasks based on an improved K-means algorithm according to claim 3 is characterized by: The specific process of step S3 is as follows: In the kth (0 < k ≤ K) iteration process, select the current point with the largest weight as the data center as: Add c k to centers, and mark ω(c k ) = -∞ to avoid repeated selection; update the global dispersion δ(x i )(k < K), for each data point x i ∈ S core \centers, calculate its minimum distance to the selected centers centers: d(x i )=min(δ(x i ),||x i -c k ||) (11) And recalculate the density-dispersion weight: ω(x i )=ρ(x i )×δ(x i ) (12) Adopt the strategy of incrementing the center point one by one to obtain the centers data set with K clustering centers.