High-speed detection method and system for welding wire surface based on multi-virtual image synchronous acquisition
Patent Information
- Application Number
- CN202611149826.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]为了解决现有技术的焊丝多视角图像处理数据量大、并行线程执行路径差异明显、核函数依赖感知不足及数据预取调度效率较低的问题,本发明提供一种基于多虚像同步采集的焊丝表面高速检测方法及系统
[0017] This invention reconstructs multi-view images of welding wire acquired by a three-mirror system into a two-dimensional surface unfolded map using a cylindrical unfolded inverse mapping lookup table. It also clarifies the dependencies between kernel functions such as image reconstruction, filtering, feature extraction, and defect detection by combining a directed acyclic execution graph. By dividing the unfolded image into blocks and updating the probabilistic execution path confidence matrix based on block image features and execution path feedback, it achieves prediction of subsequent execution paths in different regions. The spatial proximity threshold is adjusted based on the defect distribution heatmap of the previous frame, marking thread bundles with similar paths and spatial proximity as homogeneous thread bundle groups to share data prefetching states and path prediction results. A predictive execution prefetch address queue is generated using the execution graph and confidence matrix, pre-preparing data blocks, parameter blocks, or lookup table fragments required for high-probability paths during kernel function connection, thereby reducing data access waiting time and improving the processing efficiency of welding wire surface defect detection.
Smart Images

Figure CN122928823A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of testing, and in particular relates to a high-speed testing method and system for the surface of welding wire based on synchronous acquisition of multiple virtual images. Background Technology
[0002] As a crucial consumable in modern industrial welding, the surface quality of welding wire directly impacts the strength of welded joints and the safety of engineering structures. Welding wire surfaces may contain defects such as scratches, pits, cracks, and corrosion. To achieve circumferential coverage inspection of cylindrical welding wire surfaces, visual inspection equipment typically employs a three-mirror imaging system. This system acquires surface images of the welding wire from multiple perspectives within the same imaging frame and converts these multi-view images into a two-dimensional surface unfolded map through cylindrical unfolding and image reconstruction methods for subsequent defect extraction and identification. However, in high-speed industrial production lines, the drawing and winding speeds of welding wire are rapid, requiring the inspection system to continuously process high-frame-rate, high-resolution image data. Traditional serial processing methods or ordinary image processing workflows often suffer from lengthy image reconstruction and defect determination times when dealing with large data throughputs, making it difficult to fully meet the real-time requirements of online inspection.
[0003] To improve the processing efficiency of welding wire surface inspection, a heterogeneous parallel computing platform based on streaming multiprocessors can be used to accelerate image reconstruction, filtering, feature extraction, and defect determination. However, due to differences in texture, reflectivity, and potential defect distribution across different regions of the welding wire surface, parallel threads corresponding to different image blocks may enter different computational paths when executing the detection algorithm. This leads to inconsistencies in data access patterns and execution paths, affecting cache utilization and parallel scheduling efficiency. Existing parallel scheduling methods typically lack collaborative optimization by incorporating detection task dependencies, image block content features, and the similarity of execution paths between threads, making it difficult to prepare the necessary data blocks, parameter blocks, or lookup table fragments for subsequent high-probability execution paths in a timely manner. Therefore, how to perform predictive data prefetching and scheduling optimization by combining image content features and kernel function execution dependencies in high-speed welding wire three-mirror inspection scenarios to reduce data access waiting time and improve overall detection throughput efficiency has become a technical problem that needs to be solved. Summary of the Invention
[0004] To address the problems of large data volume, significant differences in parallel thread execution paths, insufficient kernel function dependency awareness, and low data prefetching and scheduling efficiency in existing welding wire multi-view image processing technologies, this invention provides a high-speed welding wire surface detection method and system based on synchronous acquisition of multiple virtual images.
[0005] In a first aspect, the present invention provides a high-speed detection method for the surface of welding wire based on synchronous acquisition of multiple virtual images, comprising the following steps: Using a pre-set cylindrical unfolding inverse mapping lookup table, the original multi-view images of the welding wire synchronously acquired by the three-mirror system are reconstructed into two-dimensional unfolded images of the welding wire surface; a directed acyclic execution graph corresponding to imaging detection is constructed to define the dependencies and execution order of each kernel function from image reconstruction to defect determination; The two-dimensional welding wire surface unfolded image is divided into multiple rectangular blocks, and a two-dimensional probabilistic execution path confidence matrix is initialized based on the image feature attributes of each block. When scheduling the kernel function to the streaming multiprocessor, a path event encoding string is generated based on the initial branch path identifier recorded inside the kernel function, and a cyclic redundancy check operation is performed on the path event encoding string to obtain the path feature check summary value. A mapping relationship is established with the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix. The spatial proximity threshold is adjusted according to the defect distribution heatmap of the previous frame image, and thread bundles with the same check value and satisfying the threshold are associated as homogeneous thread bundle groups. Based on the directed acyclic execution graph and the confidence matrix, a predictive execution prefetch address queue is generated. When the preceding kernel function completes its calculation, the data block, parameter block, or lookup table fragment required for the high-probability execution path of the subsequent kernel function is prepared in advance according to the prefetch address queue, and the subsequent kernel function is calculated to obtain the surface defect detection result of the welding wire.
[0006] Furthermore, the step of reconstructing the multi-view original images of the welding wire synchronously acquired by the three-mirror system into a two-dimensional unfolded image of the welding wire surface using a preset cylindrical unfolding inverse mapping lookup table includes: Receive a multi-view two-dimensional image matrix acquired by the same image sensor within the same exposure frame, wherein the multi-view two-dimensional image matrix contains multiple virtual image regions formed by three mirrors distributed circumferentially at 120°. Based on the unfolded perimeter parameter, axial scan length parameter, and calibrated pixel scaling factor corresponding to the number of pixels per unit physical length of the welding wire under test, the global pixel dimension boundary of the unfolded image of the two-dimensional welding wire surface is calculated, and a zero-state global image matrix matching the boundary is created. Read the cylindrical unfolding inverse mapping lookup table containing the mapping relationship from the unfolded space point to the three projection planes, and load the lookup table into memory as a global reference array; The system iterates through the coordinate positions to be filled in the zero-state global image matrix, retrieves the corresponding original image acquisition coordinates by querying the lookup table, and extracts the corresponding original pixel values for filling, thus completing the merging and reconstruction of the original images from multiple perspectives.
[0007] Furthermore, the construction of the directed acyclic execution graph corresponding to imaging detection defines the dependencies and execution order of each kernel function from image reconstruction to defect determination, including: Read the pre-registered kernel function description table in the detection process and extract the function identifier, entry call information, input buffer identifier, output buffer identifier, data access type and execution dimension parameters of each kernel function; Based on the input buffer identifier and the output buffer identifier, determine whether there is a data transfer relationship between the preceding kernel function and the following kernel function; Generate directed connections with data flow indicators between kernel functions that have data transfer relationships, and integrate all kernel function nodes and directed connections to generate an execution dependency adjacency matrix that represents data dependencies and execution order. After confirming that the execution dependency adjacency matrix is acyclic, the directed acyclic execution graph is formed.
[0008] Further, the step of dividing the two-dimensional welding wire surface unfolded image into multiple rectangular blocks and initializing the two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block includes: According to the preset fixed length step and width step, the two-dimensional welding wire surface unfolded image is meshed and cut, and the edge pixel areas that are less than the preset step are filled to obtain multiple independent rectangular blocks. An initial all-zero two-dimensional confidence matrix is created, with the total number of the rectangular blocks as the first dimension and the path check index space obtained by truncating and mapping the cyclic redundancy check value as the second dimension, as the initial storage area for the two-dimensional probabilistic execution path confidence matrix; Calculate the grayscale feature variance of pixels within each rectangular block, process the grayscale feature variance through normalization and path probability mapping, and write the processed value as the initial weight into the candidate check value index position corresponding to the rectangular block in the initial all-zero two-dimensional confidence matrix to complete the initialization of the confidence matrix.
[0009] Further, when scheduling the kernel function to the streaming multiprocessor, a path event encoding string is generated based on the initial branch path identifier recorded inside the kernel function, and a cyclic redundancy check operation is performed on the path event encoding string to obtain a path feature check digest value. A mapping relationship is then established using the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix, including: During the initial execution cycle of the thread bundle, a path event encoding string is generated using the initial branch path identifier recorded inside the kernel function; Cyclic redundancy check (CR) operation and truncation mapping are performed on the path event encoded string to extract a fixed-length path feature check summary value as the CR value. The two-dimensional coordinates of the rectangular block corresponding to the thread bundle are converted into a one-dimensional block index by a preset coordinate mapping relationship. The cyclic redundancy check value is used as the addressing index to query the current two-dimensional confidence matrix, obtain the current weight value of the corresponding path, and determine the feedback value based on the actual branch path execution result. The current weight value is weighted and updated with the feedback value, overwriting the original value in the confidence matrix.
[0010] Further, the step of adjusting the spatial proximity threshold based on the defect distribution heatmap of the previous frame image, and associating thread bundles with the same check value and satisfying the threshold into a homogeneous thread bundle group, includes: The percentage of defect pixels exceeding the preset alarm density is calculated in the defect distribution heatmap of the previous frame image. Based on the percentage of defective pixels, the required spatial proximity distance threshold for the current frame is calculated using a preset benchmark mapping function; Traverse all thread bundles in the current streaming multiprocessor that are in the ready state, and compare the geometric center distance of the rectangular blocks corresponding to the thread bundles with the same cyclic redundancy check value. When the distance between the geometric centers is less than the spatial proximity distance threshold, the scheduling control layer marks these spatially adjacent thread bundles with similar execution paths as homogeneous thread bundle groups, enabling them to share data prefetching states and path prediction results for collaborative concurrent scheduling.
[0011] On the other hand, the present invention also provides a high-speed inspection system for the surface of welding wire based on synchronous acquisition of multiple virtual images, comprising the following modules: The module is used to reconstruct the original multi-view images of the welding wire synchronously acquired by the three-mirror system into a two-dimensional unfolded image of the welding wire surface using a pre-set cylindrical unfolding inverse mapping lookup table; and to construct a directed acyclic execution graph corresponding to imaging detection, defining the dependencies and execution order of each kernel function from image reconstruction to defect determination. The calculation module is used to divide the unfolded image of the two-dimensional welding wire surface into multiple rectangular blocks, and initialize a two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block; when scheduling the kernel function to the streaming multiprocessor, it generates a path event encoding string based on the initial branch path identifier recorded inside the kernel function, performs cyclic redundancy check operation on the path event encoding string to obtain the path feature check summary value, and establishes a mapping relationship with the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix; adjusts the spatial proximity threshold according to the defect distribution heatmap of the previous frame image, and associates thread bundles with the same check value and satisfying the threshold into a homogeneous thread bundle group; The detection module is used to generate a predictive execution prefetch address queue based on the directed acyclic execution graph and the confidence matrix; when the preceding kernel function completes the calculation, it prepares the data block, parameter block or lookup table fragment required for the high-probability execution path of the subsequent kernel function according to the prefetch address queue, and executes the subsequent kernel function calculation to obtain the detection result of surface defects of the welding wire.
[0012] Preferably, the step of reconstructing the multi-view original images of the welding wire synchronously acquired by the three-mirror system into a two-dimensional unfolded image of the welding wire surface using a preset cylindrical unfolding inverse mapping lookup table includes: Receive a multi-view two-dimensional image matrix acquired by the same image sensor within the same exposure frame, wherein the multi-view two-dimensional image matrix contains multiple virtual image regions formed by three mirrors distributed circumferentially at 120°. Based on the unfolded perimeter parameter, axial scan length parameter, and calibrated pixel scaling factor corresponding to the number of pixels per unit physical length of the welding wire under test, the global pixel dimension boundary of the unfolded image of the two-dimensional welding wire surface is calculated, and a zero-state global image matrix matching the boundary is created. Read the cylindrical unfolding inverse mapping lookup table containing the mapping relationship from the unfolded space point to the three projection planes, and load the lookup table into memory as a global reference array; The system iterates through the coordinate positions to be filled in the zero-state global image matrix, retrieves the corresponding original image acquisition coordinates by querying the lookup table, and extracts the corresponding original pixel values for filling, thus completing the merging and reconstruction of the original images from multiple perspectives.
[0013] Preferably, the construction of the directed acyclic execution graph corresponding to imaging detection defines the dependencies and execution order of each kernel function from image reconstruction to defect determination, including: Read the pre-registered kernel function description table in the detection process and extract the function identifier, entry call information, input buffer identifier, output buffer identifier, data access type and execution dimension parameters of each kernel function; Based on the input buffer identifier and the output buffer identifier, determine whether there is a data transfer relationship between the preceding kernel function and the following kernel function; Generate directed connections with data flow indicators between kernel functions that have data transfer relationships, and integrate all kernel function nodes and directed connections to generate an execution dependency adjacency matrix that represents data dependencies and execution order. After confirming that the execution dependency adjacency matrix is acyclic, the directed acyclic execution graph is formed.
[0014] Preferably, the step of dividing the two-dimensional welding wire surface unfolded image into multiple rectangular blocks and initializing the two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block includes: According to the preset fixed length step and width step, the two-dimensional welding wire surface unfolded image is meshed and cut, and the edge pixel areas that are less than the preset step are filled to obtain multiple independent rectangular blocks. An initial all-zero two-dimensional confidence matrix is created, with the total number of the rectangular blocks as the first dimension and the path check index space obtained by truncating and mapping the cyclic redundancy check value as the second dimension, as the initial storage area for the two-dimensional probabilistic execution path confidence matrix; Calculate the grayscale feature variance of pixels within each rectangular block, process the grayscale feature variance through normalization and path probability mapping, and write the processed value as the initial weight into the candidate check value index position corresponding to the rectangular block in the initial all-zero two-dimensional confidence matrix to complete the initialization of the confidence matrix.
[0015] Preferably, when scheduling the kernel function to the streaming multiprocessor, a path event encoding string is generated based on the initial branch path identifier recorded inside the kernel function, and a cyclic redundancy check operation is performed on the path event encoding string to obtain a path feature check digest value. A mapping relationship is then established using the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix, including: During the initial execution cycle of the thread bundle, a path event encoding string is generated using the initial branch path identifier recorded inside the kernel function; Cyclic redundancy check (CR) operation and truncation mapping are performed on the path event encoded string to extract a fixed-length path feature check summary value as the CR value. The two-dimensional coordinates of the rectangular block corresponding to the thread bundle are converted into a one-dimensional block index by a preset coordinate mapping relationship. The cyclic redundancy check value is used as the addressing index to query the current two-dimensional confidence matrix, obtain the current weight value of the corresponding path, and determine the feedback value based on the actual branch path execution result. The current weight value is weighted and updated with the feedback value, overwriting the original value in the confidence matrix.
[0016] Preferably, the step of adjusting the spatial proximity threshold based on the defect distribution heatmap of the previous frame image, and associating thread bundles with the same check value and satisfying the threshold into a homogeneous thread bundle group, includes: The percentage of defect pixels exceeding the preset alarm density is calculated in the defect distribution heatmap of the previous frame image. Based on the percentage of defective pixels, the required spatial proximity distance threshold for the current frame is calculated using a preset benchmark mapping function; Traverse all thread bundles in the current streaming multiprocessor that are in the ready state, and compare the geometric center distance of the rectangular blocks corresponding to the thread bundles with the same cyclic redundancy check value. When the distance between the geometric centers is less than the spatial proximity distance threshold, the scheduling control layer marks these spatially adjacent thread bundles with similar execution paths as homogeneous thread bundle groups, enabling them to share data prefetching states and path prediction results for collaborative concurrent scheduling.
[0017] This invention reconstructs multi-view images of welding wire acquired by a three-mirror system into a two-dimensional surface unfolded map using a cylindrical unfolded inverse mapping lookup table. It also clarifies the dependencies between kernel functions such as image reconstruction, filtering, feature extraction, and defect detection by combining a directed acyclic execution graph. By dividing the unfolded image into blocks and updating the probabilistic execution path confidence matrix based on block image features and execution path feedback, it achieves prediction of subsequent execution paths in different regions. The spatial proximity threshold is adjusted based on the defect distribution heatmap of the previous frame, marking thread bundles with similar paths and spatial proximity as homogeneous thread bundle groups to share data prefetching states and path prediction results. A predictive execution prefetch address queue is generated using the execution graph and confidence matrix, pre-preparing data blocks, parameter blocks, or lookup table fragments required for high-probability paths during kernel function connection, thereby reducing data access waiting time and improving the processing efficiency of welding wire surface defect detection. Attached Figure Description
[0018] Figure 1 This is a flowchart of a high-speed detection method for the surface of welding wire based on synchronous acquisition of multiple virtual images; Figure 2 A schematic diagram of the confidence matrix weight update sequence for a two-dimensional probabilistic execution path. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0020] This invention proposes a high-speed detection method for the surface of welding wire based on synchronous acquisition of multiple virtual images, such as... Figure 1 As shown, it includes the following steps: S1. Using a pre-set cylindrical unfolding inverse mapping lookup table, the original multi-view images of the welding wire synchronously acquired by the three-mirror system are reconstructed into two-dimensional unfolded images of the welding wire surface; a directed acyclic execution graph corresponding to imaging detection is constructed to define the dependencies and execution order of each kernel function from image reconstruction to defect determination.
[0021] The remapping function is invoked to map the original multi-view image of the distorted annular welding wire formed by the three-mirror system based on three plane mirrors arranged at 120° intervals along the circumference of the welding wire and within the same exposure frame of the same high-speed industrial camera, pixel by pixel according to the cylindrical unfolding inverse mapping lookup table pre-calculated offline and stored in the global storage area of the device. The pixel values of the corresponding virtual image area are extracted by bilinear interpolation and stitched together to form a non-overlapping two-dimensional unfolded image of the welding wire surface.
[0022] A directed acyclic execution graph corresponding to the imaging detection process is constructed. Device-side kernel function nodes, from image reconstruction and image filtering to feature extraction and defect detection, are sequentially established using graph node creation functions. Directed connections between predecessor and successor nodes are specified through node dependency addition functions, thus clarifying the execution order and data dependencies of each kernel function in the graphics processor's computational flow.
[0023] In one embodiment, the process of reconstructing the multi-view original images of the welding wire synchronously acquired by the three-mirror system into a two-dimensional unfolded image of the welding wire surface using a preset cylindrical unfolding inverse mapping lookup table includes: Receive a multi-view two-dimensional image matrix acquired by the same image sensor within the same exposure frame, wherein the multi-view two-dimensional image matrix contains multiple virtual image regions formed by three mirrors distributed circumferentially at 120°. Based on the unfolded perimeter parameter, axial scan length parameter, and calibrated pixel scaling factor corresponding to the number of pixels per unit physical length of the welding wire under test, the global pixel dimension boundary of the unfolded image of the two-dimensional welding wire surface is calculated, and a zero-state global image matrix matching the boundary is created. Read the cylindrical unfolding inverse mapping lookup table containing the mapping relationship from the unfolded space point to the three projection planes, and load the lookup table into memory as a global reference array; The system iterates through the coordinate positions to be filled in the zero-state global image matrix, retrieves the corresponding original image acquisition coordinates by querying the lookup table, and extracts the corresponding original pixel values for filling, thus completing the merging and reconstruction of the original images from multiple perspectives.
[0024] A high-speed industrial camera synchronously receives an 8-bit grayscale multi-view 2D image matrix formed by a three-mirror system within the same imaging frame at a frame rate of 200fps, with a single frame resolution set to 1024×1024 pixels. Based on the actual physical diameter of the welding wire under test, for example 1.2mm, the unfolded perimeter parameter is calculated to be 3.77mm. Combined with an axial scan length parameter of 10mm and a calibration pixel scaling factor of 100 pixels / mm, the global pixel dimension boundary of the 2D welding wire surface unfolded image is calculated to be 377×1000 pixels. An unsigned integer 2D array of size 377×1000 is allocated in the GPU's video memory as a zero-state global image matrix, and the initial values of all elements are set to 0.
[0025] A binary cylindrical unfolding inverse mapping lookup table, pre-generated using a standard calibrated cylinder, is read. This lookup table contains 377 × 1000 mapping entries, each encoding the view area number and sub-pixel-level coordinates of the corresponding virtual image region in the original acquired image, mapped from the unfolded image coordinates. For example, the first view area has coordinates x = 452.3 and y = 890.6. During the reconstruction phase, a GPU multi-threaded mesh traversal is initiated, iterating through each spatial coordinate point of the zero-state matrix. By querying this lookup table and using bilinear interpolation, the original pixel values are extracted from the two-dimensional image memory block of the corresponding virtual image region. These original pixel values are then written to the corresponding coordinate positions in the zero-state global image matrix, achieving multi-view original image merging and reconstruction.
[0026] In one embodiment, the construction of the directed acyclic execution graph corresponding to imaging detection defines the dependencies and execution order of each kernel function from image reconstruction to defect determination, including: Read the pre-registered kernel function description table in the detection process and extract the function identifier, entry call information, input buffer identifier, output buffer identifier, data access type and execution dimension parameters of each kernel function; Based on the input buffer identifier and the output buffer identifier, determine whether there is a data transfer relationship between the preceding kernel function and the following kernel function; Generate directed connections with data flow indicators between kernel functions that have data transfer relationships, and integrate all kernel function nodes and directed connections to generate an execution dependency adjacency matrix that represents data dependencies and execution order. After confirming that the execution dependency adjacency matrix is acyclic, the directed acyclic execution graph is formed.
[0027] During system initialization, the host computer calls the kernel function registration interface according to the preset detection process, sequentially writing kernel functions such as image reconstruction, Gaussian filtering denoising, feature extraction, and defect detection into the kernel function description table. Each time a kernel function is registered, the system records the function identifier, entry call information, input buffer identifier, output buffer identifier, data access type, and execution dimension parameters. The input buffer identifier and output buffer identifier are generated synchronously when the system allocates the video memory buffer and are bound to the corresponding kernel function's call parameters; the execution dimension parameters include thread grid dimension and thread block dimension.
[0028] After kernel function registration is complete, the system reads the kernel function description table and identifies the data input / output relationship based on the input buffer identifier and output buffer identifier of each kernel function. For example, the output buffer identifier of the current kernel function is... The input buffer identifier of the subsequent kernel function is the same. When a data dependency is determined between the two, if the output buffer of the preceding kernel function is the same as the input buffer of the following kernel function, or if a pre-defined data transfer relationship exists between them, a directed connection edge representing the data flow dependency is established in the system logic graph.
[0029] Kernel function entities containing the execution dimensions Grid and Block parameters are used as graph nodes, and all directed edges are integrated using an N×N binary two-dimensional adjacency matrix, where N is the total number of kernel functions, and a matrix element of 1 indicates a data flow dependency between two corresponding kernel functions. During graph generation, if a candidate edge is detected to form a loop, the actual data dependency is not directly deleted; instead, a process configuration error message is returned or an adjustment to the kernel function registration order is requested. After confirming that the dependencies are acyclic, the graph is topologically sorted to generate a directed acyclic execution graph, which serves as the basis for the scheduler to control the streaming emission and parallel execution order of kernel functions.
[0030] S2, the two-dimensional welding wire surface unfolded image is divided into multiple rectangular blocks, and a two-dimensional probabilistic execution path confidence matrix is initialized based on the image feature attributes of each block; when scheduling the kernel function to the streaming multiprocessor, a path event encoding string is generated based on the initial branch path identifier recorded inside the kernel function, and a cyclic redundancy check operation is performed on the path event encoding string to obtain the path feature check summary value, and a mapping relationship is established with the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix; the spatial proximity threshold is adjusted according to the defect distribution heatmap of the previous frame image, and thread bundles with the same check value and satisfying the threshold are associated as homogeneous thread bundle groups.
[0031] Based on the thread mesh partitioning mechanism of the unified computing device architecture, the unfolded image of the two-dimensional welding wire surface is divided into multiple rectangular blocks in a 32×32 pixel dimension. The gray-level co-occurrence matrix contrast features and Sobel gradient magnitude of each block are extracted as image feature attributes. The logistic regression classifier algorithm is used to predict the probability distribution of different execution paths corresponding to each block. Based on this, a two-dimensional probabilistic execution path confidence matrix is initialized in the video memory.
[0032] When the scheduler allocates a kernel function to a streaming multiprocessor, it obtains the path event code based on the initial branch path identifier recorded inside the kernel function, forms the path event code string of the initial execution path of the thread bundle, and calls a 32-bit cyclic redundancy check algorithm to generate a check digest value to characterize the initial execution path.
[0033] The two-dimensional logical coordinates of the rectangular block being processed by the current thread are converted into a one-dimensional block index. The one-dimensional block index is used as the row index and the path feature verification digest value is used as the column index to query and update the two-dimensional probabilistic execution path confidence matrix. The defect distribution heatmap of the previous frame image after Gaussian kernel smoothing filtering is extracted, the defect pixel ratio is counted, and the baseline Euclidean distance is reduced and corrected according to the defect pixel ratio to obtain the spatial proximity threshold of the current frame.
[0034] Traverse the active thread bundle state records, calculate the Euclidean distance between the center coordinates of the image blocks where different thread bundles are located, and mark multiple thread bundles with equal verification digest values and Euclidean distances less than the spatial proximity threshold as homogeneous thread bundle groups in the scheduling control layer, so that they can share data prefetch state and path prediction results.
[0035] In one embodiment, dividing the unfolded image of the two-dimensional welding wire surface into multiple rectangular blocks and initializing the two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block includes: According to the preset fixed length step and width step, the two-dimensional welding wire surface unfolded image is meshed and cut, and the edge pixel areas that are less than the preset step are filled to obtain multiple independent rectangular blocks. An initial all-zero two-dimensional confidence matrix is created, with the total number of the rectangular blocks as the first dimension and the path check index space obtained by truncating and mapping the cyclic redundancy check value as the second dimension, as the initial storage area for the two-dimensional probabilistic execution path confidence matrix; Calculate the grayscale feature variance of pixels within each rectangular block, process the grayscale feature variance through normalization and path probability mapping, and write the processed value as the initial weight into the candidate check value index position corresponding to the rectangular block in the initial all-zero two-dimensional confidence matrix to complete the initialization of the confidence matrix.
[0036] The length and width steps of the rectangular blocks are preset to 32×32 pixels, and the two-dimensional welding wire surface image is meshed based on this. Since the original width of 377 and height of 1000 are not divisible by 32, a zero-value boundary padding strategy is automatically adopted to pad and expand the original image outward, expanding the effective pixel dimensions of the original image to 384 and 1024 respectively, thereby generating 384 independent rectangular blocks of size 32×32 in 12 columns × 32 rows. A contiguous 32-bit floating-point data space is allocated in memory, and a matrix structure is created with the total number of blocks (384) as the first dimension and the 8-bit path check index space size (256) obtained by truncating the 32-bit cyclic redundancy check value as the second dimension, forming an initial storage area of size 384×256. The initial value of all 98304 elements inside the matrix is set to 0.0f.
[0037] During the confidence matrix parameter initialization phase, a parallel thread is started to independently extract data from 1024 pixels within each of the 384 independent rectangular blocks and calculate the average gray level. The gray level feature variance, which represents the complexity of local texture changes on the welding wire surface, is calculated. For example, if the variance of a certain block is 125.6, the gray level feature variance of each rectangular block is normalized, for example, by normalizing it according to the maximum value of the gray level feature variance of each block in the current frame, to obtain a texture complexity value in the range of 0 to 1.
[0038] The texture complexity value, gray-level co-occurrence matrix contrast feature, and Sobel gradient magnitude are input into a pre-trained logistic regression classifier, which outputs the probability values of the rectangular block corresponding to multiple candidate execution path categories. The logistic regression classifier is a multi-class logistic regression model; its inputs are the gray-level feature variance, gray-level co-occurrence matrix contrast feature, and Sobel gradient magnitude of the rectangular block, and its output is the probability value of each candidate execution path category corresponding to the rectangular block. During the training phase, historical detection frames or offline calibration samples are collected, the aforementioned image features of each rectangular block are extracted, and the execution path category actually hit by the corresponding kernel function is used as the label. The cross-entropy loss function is used to train and obtain the classifier parameters.
[0039] Based on the preset correspondence between candidate execution path categories and path verification indices, the probability values of each candidate execution path are written into the candidate verification value index position corresponding to the rectangular block in the two-dimensional confidence matrix. For example, for the block with a one-dimensional index of 15, if the logistic regression classifier outputs probability values of 0.15, 0.72, and 0.13 for path indices 32, 128, and 211, respectively, then these probability values are written into Matrix
[15]
[32] , Matrix
[15]
[128] , and Matrix
[15]
[211] , respectively. This completes the initialization of the path confidence matrix with spatial awareness and path difference expression capabilities.
[0040] In one embodiment, when scheduling the kernel function to the streaming multiprocessor, a path event encoding string is generated based on the initial branch path identifier recorded inside the kernel function, and a cyclic redundancy check operation is performed on the path event encoding string to obtain a path feature check digest value. A mapping relationship is then established using the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix, including: During the initial execution cycle of the thread bundle, a path event encoding string is generated using the initial branch path identifier recorded inside the kernel function; Cyclic redundancy check (CR) operation and truncation mapping are performed on the path event encoded string to extract a fixed-length path feature check summary value as the CR value. The two-dimensional coordinates of the rectangular block corresponding to the thread bundle are converted into a one-dimensional block index by a preset coordinate mapping relationship. The cyclic redundancy check value is used as the addressing index to query the current two-dimensional confidence matrix, obtain the current weight value of the corresponding path, and determine the feedback value based on the actual branch path execution result. The current weight value is weighted and updated with the feedback value, overwriting the original value in the confidence matrix.
[0041] When the underlying scheduler allocates a specific kernel function block to the streaming multiprocessor (SM) for execution, for each thread bundle (Warp) consisting of 32 parallel threads, during the initial execution phase after the thread bundle starts, the kernel function records lightweight path event codes based on the actual branch paths entered. Specifically, path numbers are set at preset key branches within the kernel function. When the thread bundle enters the corresponding processing branch, the corresponding path number is written into the path event buffer and concatenated in execution order to form a path event code string. To compress the bit width and reduce matrix storage overhead, a cyclic redundancy check (CRC) algorithm is used to calculate the path event code string, and the calculation result is modulo 256 or truncated to the lower 8 bits to obtain a fixed-length path feature check digest value ranging from 0 to 255, for example, a check digest value of 128.
[0042] The preset row-first space expansion mapping formula, 1D block index = Y × total number of columns + X, is retrieved. The 2D space coordinates of the rectangular block actually processed by the current thread bundle, for example, located in column 5 and row 10, i.e. (5,10), are quickly converted into the 1D block index value 125, with the total number of columns globally set to 12. Using this 1D block index 125 as the row offset and the calculated cyclic redundancy check value 128 as the column offset, an addressing instruction is issued in the memory bus to read the current 2D confidence matrix Matrix
[125]
[128] , and obtain the weight value of the corresponding execution path in the current cycle, for example, 0.72.
[0043] After the current branch path is recorded, the kernel function determines the actual execution result based on the path numbers recorded by each valid thread within the same thread bundle (Warp). If the path numbers of all valid threads within the thread bundle are consistent, and the actual generated path feature verification summary value is consistent with the predicted path index, then the prediction is considered successful, and the feedback value is set to 1; if there are at least two different path numbers within the thread bundle, or the actual path feature verification summary value is inconsistent with the predicted path index, then control flow divergence or prediction failure is considered, and the feedback value is set to 0. Subsequently, the weight values at the corresponding positions in the confidence matrix are updated using an exponential moving average method. The update formula is: new weight value = (1-α) × current weight value + α × feedback value, where α is a preset update coefficient, ranging from 0 to 1, for example, α = 0.1. After the update is completed, the new weight value is written back to the corresponding block index and path verification index position in the confidence matrix, for example, written back to the
[125]
[128] position of the confidence matrix, thereby completing the closed-loop update of the execution path state. The two-dimensional probabilistic execution path confidence matrix weight update sequence is as follows: Figure 2 As shown.
[0044] In one embodiment, adjusting the spatial proximity threshold based on the defect distribution heatmap of the previous frame image, and associating thread bundles with the same check value and satisfying the threshold into a homogeneous thread bundle group, includes: The percentage of defect pixels exceeding the preset alarm density is calculated in the defect distribution heatmap of the previous frame image. Based on the percentage of defective pixels, the required spatial proximity distance threshold for the current frame is calculated using a preset benchmark mapping function; Traverse all thread bundles in the current streaming multiprocessor that are in the ready state, and compare the geometric center distance of the rectangular blocks corresponding to the thread bundles with the same cyclic redundancy check value. When the distance between the geometric centers is less than the spatial proximity distance threshold, the scheduling control layer marks these spatially adjacent thread bundles with similar execution paths as homogeneous thread bundle groups, enabling them to share data prefetching states and path prediction results for collaborative concurrent scheduling.
[0045] During continuous online inspection stream processing, before entering a new frame scheduling, the normalized defect distribution heatmap output after the previous frame image processing is scanned, with each pixel intensity ranging from 0 to 1. The absolute number of dangerous pixels in the heatmap with intensity values greater than a preset alarm density threshold of 0.75 is counted in parallel, and this number is divided by the total number of pixels in the entire unfolded image, i.e., 384 × 1024, to obtain the percentage of defect pixels representing the defect density. For example, statistical analysis shows a percentage of 5%, or 0.05.
[0046] The preset baseline mapping function formula is invoked: Spatial proximity distance threshold = Basic proximity span × (1 - Defect percentage × Adjustment sensitivity factor). In terms of parameter settings, the basic proximity span is specified as 64 pixels, corresponding to the width of two consecutive rectangular blocks, and the adjustment sensitivity factor constant is set to 5.0. After incorporating a 5% defect percentage parameter, the calculated spatial proximity distance threshold required for the current frame during execution is 48 pixels. This ensures that when large-area surface defects on the welding wire appear in the image, the binding radius can be reduced to mitigate the risk of buffer jitter caused by complex instruction flows.
[0047] After entering the SM task scheduling preparation period, the task allocator begins polling and traversing all thread bundles waiting to be dispatched in the current streaming multiprocessor's internal task ready queue. It identifies, for example, thread bundle A, responsible for processing the rectangular block centered at coordinates (48, 80), and thread bundle B, responsible for processing the rectangular block centered at coordinates (80, 112). Both generated identical cyclic redundancy check values in the previous step, for example, both being 128. The Euclidean distance between the two geometric center points of these two blocks is calculated to be 45.25 pixels. When it is determined that this geometric center distance of 45.25 is less than the previously generated spatial proximity distance threshold of 48, the tasks corresponding to thread bundles A and B are marked as homogeneous thread bundle groups at the scheduling control layer. These homogeneous thread bundle groups share the corresponding data prefetch state and path prediction results to reduce redundant prefetching and scheduling waits.
[0048] S3. Based on the directed acyclic execution graph and the confidence matrix, a predictive execution prefetch address queue is generated. When the preceding kernel function completes its calculation, the data block, parameter block, or lookup table fragment required for the high-probability execution path of the subsequent kernel function is prepared in advance according to the prefetch address queue, and the subsequent kernel function is calculated to obtain the surface defect detection result of the welding wire.
[0049] The system reads the generated directed acyclic execution graph and, in conjunction with candidate paths with a confidence level higher than 0.8 in the two-dimensional probabilistic execution path confidence matrix, determines the successor kernel function and its high-probability execution path. The path data access description table is pre-established during system initialization. Based on the kernel function identifier, path verification index, block coordinate index, input buffer identifier, and lookup table storage layout, it records the base address, offset, and data length of the input data block, parameter block, or lookup table fragment required for different execution paths. During online detection, the system queries the path data access description table based on the successor kernel function identifier and the high-probability execution path, generates the corresponding prefetch request, and writes it to the circular buffer in a first-in-first-out order, forming a predictive execution prefetch address queue.
[0050] After the preceding kernel function triggers its completion event, the circular buffer is queried to retrieve the prefetch request. Then, through asynchronous memory copying or cache-friendly data organization, the data blocks, parameter blocks, or lookup table fragments required by the high-probability path of the subsequent kernel function are pre-prepared in the device's contiguous video memory buffer accessible to the subsequent kernel function. After the subsequent kernel function starts, the corresponding thread block loads locally reused data into its own shared memory region as needed, and this execution overlaps with subsequent computation processes.
[0051] Subsequently, connected component analysis is performed on the binarized candidate defect images obtained in the defect determination stage. Interconnected foreground pixel regions are marked, and isolated regions with areas smaller than a preset noise threshold are filtered out. For each retained candidate connected component, its contour area, aspect ratio of the circumscribed rectangle, shape eccentricity, boundary roundness, and grayscale contrast are calculated. The system compares these feature parameters with the pore feature range and scratch feature range in a preset standard feature library. When a candidate connected component is nearly circular and its area, roundness, and grayscale contrast meet the pore determination criteria, it is determined to be a pore defect. When a candidate connected component is elongated and its aspect ratio, eccentricity, and extension direction meet the scratch determination criteria, it is determined to be a scratch defect. Finally, the defect category, location coordinates, contour area, and confidence level are output as the detection results.
[0052] This invention also proposes a high-speed surface inspection system for welding wire based on synchronous acquisition of multiple virtual images, comprising the following modules: The module is used to reconstruct the original multi-view images of the welding wire synchronously acquired by the three-mirror system into a two-dimensional unfolded image of the welding wire surface using a pre-set cylindrical unfolding inverse mapping lookup table; and to construct a directed acyclic execution graph corresponding to imaging detection, defining the dependencies and execution order of each kernel function from image reconstruction to defect determination. The calculation module is used to divide the unfolded image of the two-dimensional welding wire surface into multiple rectangular blocks, and initialize a two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block; when scheduling the kernel function to the streaming multiprocessor, it generates a path event encoding string based on the initial branch path identifier recorded inside the kernel function, performs cyclic redundancy check operation on the path event encoding string to obtain the path feature check summary value, and establishes a mapping relationship with the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix; adjusts the spatial proximity threshold according to the defect distribution heatmap of the previous frame image, and associates thread bundles with the same check value and satisfying the threshold into a homogeneous thread bundle group; The detection module is used to generate a predictive execution prefetch address queue based on the directed acyclic execution graph and the confidence matrix; when the preceding kernel function completes the calculation, it prepares the data block, parameter block or lookup table fragment required for the high-probability execution path of the subsequent kernel function according to the prefetch address queue, and executes the subsequent kernel function calculation to obtain the detection result of surface defects of the welding wire.
[0053] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A high-speed detection method for the surface of welding wire based on synchronous acquisition of multiple virtual images, characterized in that, Includes the following steps: Using a pre-set cylindrical unfolding inverse mapping lookup table, the original multi-view images of the welding wire synchronously acquired by the three-mirror system are reconstructed into two-dimensional unfolded images of the welding wire surface. Construct a directed acyclic execution graph corresponding to imaging detection, and define the dependencies and execution order of each kernel function from image reconstruction to defect determination; The two-dimensional welding wire surface unfolded image is divided into multiple rectangular blocks, and a two-dimensional probabilistic execution path confidence matrix is initialized based on the image feature attributes of each block. When scheduling the kernel function to the streaming multiprocessor, a path event encoding string is generated based on the initial branch path identifier recorded inside the kernel function, and a cyclic redundancy check operation is performed on the path event encoding string to obtain the path feature check summary value. The confidence matrix is updated by establishing a mapping relationship with the two-dimensional coordinates of the corresponding rectangular block as an index. Based on the defect distribution heatmap of the previous frame image, adjust the spatial proximity threshold, and associate thread bundles with the same check value and satisfy the threshold into a homogeneous thread bundle group. Based on the directed acyclic execution graph and the confidence matrix, a predictive execution prefetch address queue is generated. When the preceding kernel function completes its calculation, the data block, parameter block, or lookup table fragment required for the high-probability execution path of the subsequent kernel function is prepared in advance according to the prefetch address queue, and the subsequent kernel function is calculated to obtain the surface defect detection result of the welding wire.
2. The method according to claim 1, characterized in that, The process of reconstructing the multi-view original images of the welding wire synchronously acquired by the three-mirror system into a two-dimensional unfolded image of the welding wire surface using a pre-set cylindrical unfolding inverse mapping lookup table includes: Receive a multi-view two-dimensional image matrix acquired by the same image sensor within the same exposure frame, wherein the multi-view two-dimensional image matrix contains multiple virtual image regions formed by three mirrors distributed circumferentially at 120°. Based on the unfolded perimeter parameter, axial scan length parameter, and calibrated pixel scaling factor corresponding to the number of pixels per unit physical length of the welding wire under test, the global pixel dimension boundary of the unfolded image of the two-dimensional welding wire surface is calculated, and a zero-state global image matrix matching the boundary is created. Read the cylindrical unfolding inverse mapping lookup table containing the mapping relationship from the unfolded space point to the three projection planes, and load the lookup table into memory as a global reference array; The system iterates through the coordinate positions to be filled in the zero-state global image matrix, retrieves the corresponding original image acquisition coordinates by querying the lookup table, and extracts the corresponding original pixel values for filling, thus completing the merging and reconstruction of the original images from multiple perspectives.
3. The method according to claim 1, characterized in that, The constructed directed acyclic execution graph corresponding to imaging detection defines the dependencies and execution order of each kernel function from image reconstruction to defect determination, including: Read the pre-registered kernel function description table in the detection process and extract the function identifier, entry call information, input buffer identifier, output buffer identifier, data access type and execution dimension parameters of each kernel function; Based on the input buffer identifier and the output buffer identifier, determine whether there is a data transfer relationship between the preceding kernel function and the following kernel function; Generate directed connections with data flow indicators between kernel functions that have data transfer relationships, and integrate all kernel function nodes and directed connections to generate an execution dependency adjacency matrix that represents data dependencies and execution order. After confirming that the execution dependency adjacency matrix is acyclic, the directed acyclic execution graph is formed.
4. The method according to claim 2 or 3, characterized in that, The step of dividing the unfolded image of the two-dimensional welding wire surface into multiple rectangular blocks and initializing the two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block includes: According to the preset fixed length step and width step, the two-dimensional welding wire surface unfolded image is meshed and cut, and the edge pixel areas that are less than the preset step are filled to obtain multiple independent rectangular blocks. An initial all-zero two-dimensional confidence matrix is created, with the total number of the rectangular blocks as the first dimension and the path check index space obtained by truncating and mapping the cyclic redundancy check value as the second dimension, as the initial storage area for the two-dimensional probabilistic execution path confidence matrix; Calculate the grayscale feature variance of pixels within each rectangular block, process the grayscale feature variance through normalization and path probability mapping, and write the processed value as the initial weight into the candidate check value index position corresponding to the rectangular block in the initial all-zero two-dimensional confidence matrix to complete the initialization of the confidence matrix.
5. The method according to claim 1, characterized in that, When scheduling the kernel function to the streaming multiprocessor, a path event encoding string is generated based on the initial branch path identifier recorded inside the kernel function. A cyclic redundancy check (CRC) operation is performed on the path event encoding string to obtain a path feature check digest value. A mapping relationship is established using the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix, including: During the initial execution cycle of the thread bundle, a path event encoding string is generated using the initial branch path identifier recorded inside the kernel function; Cyclic redundancy check (CR) operation and truncation mapping are performed on the path event encoded string to extract a fixed-length path feature check summary value as the CR value. The two-dimensional coordinates of the rectangular block corresponding to the thread bundle are converted into a one-dimensional block index by a preset coordinate mapping relationship. The cyclic redundancy check value is used as the addressing index to query the current two-dimensional confidence matrix, obtain the current weight value of the corresponding path, and determine the feedback value based on the actual branch path execution result. The current weight value is weighted and updated with the feedback value, overwriting the original value in the confidence matrix.
6. The method according to claim 1, characterized in that, The step of adjusting the spatial proximity threshold based on the defect distribution heatmap of the previous frame image, and associating thread bundles with the same check value and satisfying the threshold into a homogeneous thread bundle group, includes: The percentage of defect pixels exceeding the preset alarm density is calculated in the defect distribution heatmap of the previous frame image. Based on the percentage of defective pixels, the required spatial proximity distance threshold for the current frame is calculated using a preset benchmark mapping function; Traverse all thread bundles in the current streaming multiprocessor that are in the ready state, and compare the geometric center distance of the rectangular blocks corresponding to the thread bundles with the same cyclic redundancy check value. When the distance between the geometric centers is less than the spatial proximity distance threshold, the scheduling control layer marks these spatially adjacent thread bundles with similar execution paths as homogeneous thread bundle groups, enabling them to share data prefetching states and path prediction results for collaborative concurrent scheduling.
7. A high-speed inspection system for the surface of welding wire based on synchronous acquisition of multiple virtual images, characterized in that, Includes the following modules: The module is used to reconstruct the original multi-view images of the welding wire synchronously acquired by the three-mirror system into two-dimensional unfolded images of the welding wire surface using a pre-set cylindrical unfolded inverse mapping lookup table. Construct a directed acyclic execution graph corresponding to imaging detection, and define the dependencies and execution order of each kernel function from image reconstruction to defect determination; The calculation module is used to divide the unfolded image of the two-dimensional welding wire surface into multiple rectangular blocks, and initialize a two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block; when scheduling the kernel function to the streaming multiprocessor, it generates a path event encoding string based on the initial branch path identifier recorded inside the kernel function, performs cyclic redundancy check operation on the path event encoding string to obtain the path feature check summary value, and establishes a mapping relationship with the two-dimensional coordinates of the corresponding rectangular block as an index to update the confidence matrix; Based on the defect distribution heatmap of the previous frame image, adjust the spatial proximity threshold, and associate thread bundles with the same check value and satisfy the threshold into a homogeneous thread bundle group. The detection module is used to generate a predictive execution prefetch address queue based on the directed acyclic execution graph and the confidence matrix; when the preceding kernel function completes the calculation, it prepares the data block, parameter block or lookup table fragment required for the high-probability execution path of the subsequent kernel function according to the prefetch address queue, and executes the subsequent kernel function calculation to obtain the detection result of surface defects of the welding wire.
8. The system according to claim 7, characterized in that, The process of reconstructing the multi-view original images of the welding wire synchronously acquired by the three-mirror system into a two-dimensional unfolded image of the welding wire surface using a pre-set cylindrical unfolding inverse mapping lookup table includes: Receive a multi-view two-dimensional image matrix acquired by the same image sensor within the same exposure frame, wherein the multi-view two-dimensional image matrix contains multiple virtual image regions formed by three mirrors distributed circumferentially at 120°. Based on the unfolded perimeter parameter, axial scan length parameter, and calibrated pixel scaling factor corresponding to the number of pixels per unit physical length of the welding wire under test, the global pixel dimension boundary of the unfolded image of the two-dimensional welding wire surface is calculated, and a zero-state global image matrix matching the boundary is created. Read the cylindrical unfolding inverse mapping lookup table containing the mapping relationship from the unfolded space point to the three projection planes, and load the lookup table into memory as a global reference array; The system iterates through the coordinate positions to be filled in the zero-state global image matrix, retrieves the corresponding original image acquisition coordinates by querying the lookup table, and extracts the corresponding original pixel values for filling, thus completing the merging and reconstruction of the original images from multiple perspectives.
9. The system according to claim 7, characterized in that, The constructed directed acyclic execution graph corresponding to imaging detection defines the dependencies and execution order of each kernel function from image reconstruction to defect determination, including: Read the pre-registered kernel function description table in the detection process and extract the function identifier, entry call information, input buffer identifier, output buffer identifier, data access type and execution dimension parameters of each kernel function; Based on the input buffer identifier and the output buffer identifier, determine whether there is a data transfer relationship between the preceding kernel function and the following kernel function; Generate directed connections with data flow indicators between kernel functions that have data transfer relationships, and integrate all kernel function nodes and directed connections to generate an execution dependency adjacency matrix that represents data dependencies and execution order. After confirming that the execution dependency adjacency matrix is acyclic, the directed acyclic execution graph is formed.
10. The system according to claim 7, characterized in that, The step of dividing the unfolded image of the two-dimensional welding wire surface into multiple rectangular blocks and initializing the two-dimensional probabilistic execution path confidence matrix based on the image feature attributes of each block includes: According to the preset fixed length step and width step, the two-dimensional welding wire surface unfolded image is meshed and cut, and the edge pixel areas that are less than the preset step are filled to obtain multiple independent rectangular blocks. An initial all-zero two-dimensional confidence matrix is created, with the total number of the rectangular blocks as the first dimension and the path check index space obtained by truncating and mapping the cyclic redundancy check value as the second dimension, as the initial storage area for the two-dimensional probabilistic execution path confidence matrix; Calculate the grayscale feature variance of pixels within each rectangular block, process the grayscale feature variance through normalization and path probability mapping, and write the processed value as the initial weight into the candidate check value index position corresponding to the rectangular block in the initial all-zero two-dimensional confidence matrix to complete the initialization of the confidence matrix.