CN118132849A - Steel structure welding process quality management recommendation method based on big data processing - Google Patents

Steel structure welding process quality management recommendation method based on big data processing Download PDF

Info

Publication number
CN118132849A
CN118132849A CN202410334260.6A CN202410334260A CN118132849A CN 118132849 A CN118132849 A CN 118132849A CN 202410334260 A CN202410334260 A CN 202410334260A CN 118132849 A CN118132849 A CN 118132849A
Authority
CN
China
Prior art keywords
welding
user
value
clustering
defect detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410334260.6A
Other languages
Chinese (zh)
Inventor
宋金昱
杨建洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Mingpin Decoration Engineering Co ltd
Original Assignee
Qingdao Mingpin Decoration Engineering Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Mingpin Decoration Engineering Co ltd filed Critical Qingdao Mingpin Decoration Engineering Co ltd
Priority to CN202410334260.6A priority Critical patent/CN118132849A/en
Publication of CN118132849A publication Critical patent/CN118132849A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)

Abstract

The application discloses a steel structure welding process quality management recommendation method based on big data processing, which relates to the technical field of welding processes and comprises the following steps: marking the image data to generate a data set with labels; preprocessing the data set with the tag; extracting key features according to the preprocessed data set; performing cluster analysis on the characteristic data set to obtain different welding parameters and process modes under environmental conditions; establishing a welding model through transfer learning according to the pretreatment data set and the characteristic data set, and detecting welding defects; constructing a user portrait according to the historical behaviors and preferences of the user; establishing a recommendation model by combining the user portrait, the process mode and the welding defect detection result, and recommending the welding process; and optimizing a recommended result through a multi-arm slot machine strategy according to the identified process mode and the recommended welding process. Aiming at the problem that the welding process in the prior art lacks personalized recommendation, the application improves the individuation degree of the welding process.

Description

Steel structure welding process quality management recommendation method based on big data processing
Technical Field
The application relates to the technical field of welding processes, in particular to a steel structure welding process quality management recommendation method based on big data processing.
Background
In recent years, the rise of new generation information technologies such as big data, internet of things, artificial intelligence and the like provides a new way for the quality management of intelligent welding processes. By collecting and analyzing various sensor data in the welding process and establishing a quality prediction and defect diagnosis model by using a machine learning algorithm, the welding quality can be monitored on line and intelligently controlled, and the welding quality and the production efficiency are effectively improved.
However, the welding process is complex, various factors such as materials, processes, equipment, environment and the like are involved, and the isomerism and the dynamic property of data bring difficulty to modeling analysis; the requirements of different welding tasks on technological parameters are greatly different, an effective technological knowledge base and an reasoning mechanism are lacked, and quick optimization of the process is difficult to realize. The existing method mainly focuses on general process planning, lacks personalized services facing specific user demands, and cannot fully exert the advantages of intelligent technology.
In the related art, for example, in CN115858940a, a steel structure welding process quality management recommendation method based on big data processing is provided, which relates to the technical field of steel structure welding process quality management recommendation. However, the scheme may not fully express the complexity and diversity of the welding process by generating the corresponding evaluation quality text through a single quality feature value. This may result in too simplistic an assessment of the welding process, failing to provide enough information to support personalized decisions by the staff or researchers.
Disclosure of Invention
1. Technical problem to be solved
Aiming at the problem that the welding process lacks personalized recommendation in the prior art, the application provides a steel structure welding process quality management recommendation method based on big data processing, and the individuation degree of the welding process is improved through feature selection, user portrait construction and the like.
2. Technical proposal
The aim of the application is achieved by the following technical scheme.
The embodiment of the specification provides a steel structure welding process quality management recommendation method based on big data processing, which comprises the following steps: acquiring image data and real-time data in a welding process, wherein the real-time data comprises welding current, welding voltage and welding speed; marking the image data, and marking the position and type of the welding defect; synchronizing the marked image data with corresponding real-time data to generate a data set with a label; preprocessing the labeled data set, wherein the preprocessing comprises image enhancement, and a preprocessed data set is generated; extracting key features according to the preprocessing data set, wherein the key features comprise material types, thicknesses and welding methods, and generating a feature data set; performing cluster analysis on the characteristic data set to obtain different welding parameters and process modes under environmental conditions; establishing a welding model through transfer learning according to the pretreatment data set and the characteristic data set, and detecting welding defects; constructing a user portrait according to the historical behaviors and preferences of the user; establishing a recommendation model by combining the user portrait, the process mode and the welding defect detection result, and recommending the welding process; and optimizing a recommended result through a multi-arm slot machine strategy according to the identified process mode and the recommended welding process.
Wherein, welding defect: the method refers to various incontinuous, incomplete or inconsistent quality requirements existing in the welding joint or the welding seam, which can reduce the service performance of the welding joint and possibly cause structural failure in serious cases. Common types of welding defects include cracks, lack of penetration, slag inclusions, porosity, flash, and the like. Defect location: refers to the spatial coordinates or regions of the weld defect in the weld image. The approximate location and extent of defects are typically marked by rectangular boxes, polygons, etc. Defect type: the method is characterized in that the detected welding defects are classified according to the characteristics of morphology, size, cause and the like. Definitions and designations of defect types in different standards may vary, but generally include common defects such as cracks, lack of penetration, slag inclusions, porosity, flash, and the like. In the application, the marking link is as follows: and observing and analyzing the acquired welding images frame by an experienced welding engineer or quality inspector to judge whether defects exist in the images. If a defect is identified, the approximate location of the defect is marked with a rectangular box and a corresponding type label is selected from a predefined list of defect types. The annotation result is typically stored in XML, JSON, etc. format. Data set construction: and matching the marked defect information with the original image data and welding real-time parameters (such as current, voltage and speed) acquired synchronously to construct a welding process data set with labels. Each sample in the data set contains three parts of contents of images, real-time parameters and defect labels, and can be used for subsequent machine learning model training and testing. Training a defect detection model: dividing the constructed labeled data set into a training set and a testing set according to a certain proportion. The defect detection model is trained by using a training set sample, and can adopt a target detection algorithm such as YOLO, SSD and the like, input a welding image and output the position coordinates and types of defects in the image. The model can automatically identify and locate welding defects in the image through loss function optimization. Defect detection model evaluation: and performing performance evaluation on the trained defect detection model by using a test set sample, calculating indexes such as accuracy, precision, recall rate and the like of the model in defect positioning and classification, and evaluating the defect detection capability of the model. On-line defect detection application: and deploying the trained defect detection model to a welding production site, and performing automatic defect detection on the welding image acquired in real time. The model infers the input image, and outputs the position and type information of the detected defects, so that automatic assessment of weld quality and defect early warning are realized.
Specifically, a welding model is established through transfer learning to detect welding defects, and a source domain model is selected: a deep learning model pre-trained on a large-scale generic dataset is selected as the source domain model, such as ResNet, VGG Net, etc., trained on an Image Net dataset. These models have learned rich image feature representations and can be used as the basis for weld defect detection models. Freezing source domain model bottom layer: and freezing parameters of a bottom convolution layer of the source domain model, and keeping the characteristic extraction capacity unchanged. Therefore, the number of training parameters can be reduced, the risk of overfitting is reduced, and the universal image features learned by the source domain model are utilized. Adding a task adaptation layer: and adding a plurality of new convolution layers and full connection layers at the top of the source domain model, and constructing an adaptation layer aiming at a welding defect detection task. These layers will learn the mapping of source domain features to weld defect features, adapting the model to the new task. Training task adaptation layer: training the task adaptation layer by using the preprocessed welding process data set, inputting a welding image in the training set, calculating the position and type of the output defect by forward propagation, evaluating the difference between the prediction result and the labeling value by a loss function, and updating the parameters of the adaptation layer by using a backward propagation algorithm to gradually fit the model to the welding defect detection task. Common loss functions include multitasking loss, focus loss, etc., which can balance defect localization and classification learning. Fine-tuning the source domain model: after the adaptation layer training reaches a certain degree, part of high-level parameters of the source domain model can be selectively thawed, and fine adjustment can be performed on the high-level parameters with a small learning rate. Therefore, the model can be better adapted to the distribution of welding defect data while the source domain characteristic representation is maintained, and the detection precision is improved. Model evaluation: in the training process, the verification set data are used for evaluating the performance of the model periodically, and the convergence condition of the model is monitored. And (3) selecting and storing model parameters with optimal performance by calculating indexes such as accuracy, precision, recall rate and the like of defect positioning and classification. Defect detection application: and deploying the trained welding defect detection model into a production environment for online detection. After preprocessing the acquired welding images, inputting the welding images into a model for forward reasoning, and outputting the position coordinates and types of each welding defect in the images. Judging whether the welding line is qualified or not according to a preset defect threshold value and a preset rule, and feeding back defect information to an operator or an automatic control system to realize real-time quality monitoring.
Specifically, a user portrait is constructed, and the dimension of the user characteristics is determined: and selecting key feature dimensions capable of describing user behaviors and preferences according to service characteristics of welding process quality management. Common feature dimensions include: user roles: such as welding engineers, quality inspectors, production administrators, etc., the concerns and decision preferences of the welding process may be different for different roles. User experience: considering the age of the user engaged in welding-related work, senior users and novice users may have differences in process selection and parameter settings. Welding process preference: and (5) counting historical technological parameter selection conditions of users under different materials, plate thicknesses, welding methods and the like, and describing technological preferences of the users. Defect attention degree: analyzing the attention frequency and the disposal mode of the user to different types of defects, and reflecting the importance degree and the standard of the user to the welding quality. Interaction behavior: and counting the frequency, duration, operation sequence and the like of using the welding process quality management system by a user, and mining the behavior mode and habit of the user. Collecting user behavior data: historical behavior data of the user is extracted and collected from the channels of logs, databases and the like of the welding process quality management system. Mainly comprises the following steps: basic information of the user: such as roles, departments, operational years, etc. And (3) process parameter selection record: including information about materials, process parameters, equipment, etc. selected by the user for different welding tasks. Defect feedback data: and marking, evaluating, feeding back comments and the like on the defects of the welding result by a user. Interaction behavior log: logging in, inquiring, modifying parameters, generating reports and the like of a user in the system. Data cleaning and pretreatment: and cleaning and preprocessing the collected user behavior data, removing noise data such as abnormal values, missing values and the like, and converting the data into a format suitable for analysis. And data filling, data transformation and other technologies can be adopted, so that the data quality is improved. Characteristic engineering: and extracting and selecting the characteristics of the preprocessed user behavior data. For different feature dimensions, suitable feature representation methods are designed, such as: the discrete characteristics of the user roles, experiences and the like can be expressed by adopting one-hot coding, serial number coding and the like. For welding process preference, the frequency of selecting different materials and process parameters by a user can be counted to generate a preference vector. For the defect attention degree, the proportion of different defect types can be calculated and marked by a user and treated, so that attention degree weights are generated. For interaction behavior, the operation sequence, the clicking times and the like of the user can be extracted, and behavior characteristics are constructed. User portrayal construction: the extracted user features are combined according to a predefined representation template to generate a structured user representation. Representations are typically represented in the form of dictionaries, vectors, graphs, etc., containing user characteristic values in various dimensions. Common characteristics and behavior patterns of user groups can be found out by adopting technologies such as user clustering, association rule mining and the like, and portrait contents are enriched.
Among them, the Multi-arm slot machine (Multi-Armed Bandit, MAB) strategy is a machine learning algorithm that makes decisions in an uncertain environment. The inspiration originates from the slot machine playing scenario, the player faces the slot machine with multiple arms (i.e., poles), each arm having a different profit probability distribution, and the player needs to find the arm with the greatest profit by trial and error. In the machine learning field, multi-arm slot machine strategies are often used to solve the online learning and decision making problems, optimizing the decision making process by balanced exploration (exploration) and utilization (exploitation), with the goal of maximizing overall revenue. In the present application, the candidate process acts as an arm: the identified process pattern and recommended welding process parameter combinations are considered as different arms in a multi-arm slot machine. Each process combination corresponds to a slot arm, and the expected benefit is a historical performance score for the process combination, such as a weld quality score, user acceptance, etc. Initializing the revenue estimation of the arm: for a newly identified process pattern or a first recommended process combination, since there is no historical performance data, its initial revenue estimate can be set to a higher default value, encouraging the algorithm to explore the new process combination in the initial stage. Arm selection strategy: and selecting one arm (namely the process combination) as a recommended result by the multi-arm slot machine algorithm according to the current income estimation of each process combination every time the welding process is required to be recommended. Common arm selection strategies include: epsilon-greedy strategy: one arm is randomly selected for exploration according to the probability epsilon, and the arm with the highest current profit estimation is selected for utilization according to the probability 1-epsilon. Upper Confidence Bound (UCB) policy: the arm with the highest sum of the current estimate of benefit and uncertainty is selected, encouraging exploration of the arms with fewer selections. Thompson sampling: sampling is carried out according to posterior distribution of each arm, and the arm with the largest sampling value is selected as a recommended result.
Specifically, by applying the multi-arm slot machine strategy to optimization of welding process recommendation, the recommended quality and user satisfaction can be further improved on the basis of process pattern recognition and initial recommendation. The algorithm dynamically adjusts the recommendation strategy by searching new process combinations and utilizing the historical optimal process in a balanced way, and adapts to the changing user requirements and task environments. Meanwhile, due to the online learning characteristic of the multi-arm slot machine strategy, the multi-arm slot machine strategy can efficiently process a large-scale technological parameter combination space, and real-time recommendation optimization is realized.
Further, image enhancement, comprising: dividing the labeled dataset into a plurality of partial windows; calculating a cumulative distribution function CDF of pixel gray values in each local window, mapping the CDF into a designated dynamic range, wherein the mapped gray value range is 0 to 255, and the mapping function is as follows:
Wherein i is an original gray value, CDF (i) is an accumulated distribution function value corresponding to the gray value i, CDF_min and CDF_max are respectively a minimum value and a maximum value of CDF in a local window, and round is a rounding function; the mapping result of the adjacent local windows is smoothly transited by adopting a bilinear interpolation method, the interpolation coefficient is calculated according to the overlapping rate of the local windows, and the calculation formula is as follows:
coefficient=1-overlap_ratio, where window_size is the size of a local window, stride is the step size between adjacent local windows, overlap_ratio is the overlap ratio of the local windows, and coefficient is the interpolation coefficient.
Wherein the cumulative distribution function (Cumulative Distribution Function, CDF) is a function describing the probability distribution of the random variable. For a random variable X, CDF is defined as F (X) =P (X.ltoreq.x), and the probability that the value of the variable X is less than or equal to X is indicated. In the field of image processing, the gray value of an image can be regarded as a random variable, the CDF of which describes the cumulative probability distribution of gray values. In the present application, the pixel gray value distribution within the local window is calculated: dividing the image into a plurality of local windows, and counting the gray value of the pixels in each window to obtain a probability distribution histogram of the gray value. Calculating CDF within the local window: and calculating the CDF value corresponding to each gray value according to the probability distribution histogram of the gray value. The method comprises the following specific steps: and normalizing the probability distribution histogram of the gray values to obtain the probability P (X=j) of each gray value. And accumulating the normalized histograms to obtain CDF values of each gray value. For example, CDF (0) =p (x=0), CDF (1) =p (x=0) +p (x=1), and so on. A CDF map corresponding to the gray values is obtained representing the cumulative probability for each gray value.
Specifically, by applying the CDF mapping with local self-adaption, the scheme can adaptively adjust the dynamic range of the pixel gray value according to the gray value distribution characteristics in the local window, and enhance the contrast and detail expressive force of the image. The CDF mapping can normalize the gray value distribution in the local window to a specified dynamic range, so that the gray value distribution in different windows is more consistent, and meanwhile, local contrast information is reserved. Compared with the global unified gray value mapping, the local self-adaptive CDF mapping can better adapt to the gray value distribution difference of different areas of the image, and a finer and natural enhancement effect is provided.
Wherein bilinear interpolation (Bilinear Interpolation) is a commonly used image interpolation algorithm for estimating the value of an unknown point between two known points. It calculates the value of the unknown point by linear interpolation in both directions, thus achieving smooth transition and scaling of the image. Bilinear interpolation considers four nearest neighbor pixel points around an unknown point, and calculates an interpolation result of the unknown point according to the gray value and the relative position of the nearest neighbor pixel points. Assuming that four pixel points Q 11、Q12、Q21 and Q 22 are known, their coordinates are (x 1,y1)、(x1,y2)、(x2,y1) and (x 2,y2), respectively, and the gray values are f (Q 11)、f(Q12)、f(Q21) and f (Q 22), respectively. The coordinates of the unknown point P are (x, y), and the interpolation result f (P) thereof can be calculated by: linear interpolation is performed in the x direction to obtain gray values of two points P 1 and P 2: Linear interpolation is carried out in the y direction, and a final gray value of the P point is obtained: /(I) In the present application, determination of the overlap region: the overlapping area between adjacent partial windows is calculated according to the size of the partial window (win SS dow_size) and the step size (stride) between the adjacent windows. The overlapping rate (overlap_ratio) represents the proportion of the overlapping region in the local window, and the calculation formula is as follows: /(I)Calculating interpolation coefficients: from the overlap ratio (overlap ratio), an interpolation coefficient (coefficient) of bilinear interpolation is calculated. The interpolation coefficient represents the weight occupied by the mapping result of the current window in the overlapping area, and the calculation formula is as follows: coefficient=1-overlap_ratio, the value range of the interpolation coefficient is [0,1], when the overlap ratio is 0, the current window completely covers the overlap area, and the interpolation coefficient is 1; when the overlap ratio approaches 1, it means that the current window almost completely overlaps with the adjacent window, and the interpolation coefficient approaches 0. Interpolation of overlapping areas: and for the overlapping area of each local window, smoothly transitioning the mapping result of the adjacent windows by using a bilinear interpolation method. The method comprises the following specific steps: coordinates (x, y) of the unknown pixel point P within the overlap region are determined. Four nearest neighbor pixel points Q 11、Q12、Q21 and Q 22 around the P point are found, which are located in the mapping results of the current window and the adjacent window, respectively. According to the bilinear interpolation formula, interpolation results f (P 1) and f (P 2) of the P point in the x direction and the y direction are calculated. F (P 1) and f (P 2) are multiplied by the corresponding interpolation coefficients coeffient respectively to obtain weighted values of the P point in the mapping results of the current window and the adjacent window. And adding the weighted values to obtain a final interpolation result of the P point, and taking the final interpolation result as a smooth transition value in the overlapping area. Repeating interpolation: and (3) repeatedly executing the step 3 on the overlapped area of each partial window until the overlapped areas of all windows are subjected to interpolation smoothing. By applying bilinear interpolation in the overlapping area of adjacent local windows, the scheme can realize smooth transition between local mapping results and eliminate discontinuity of window edges. The size of the overlapping area is considered in the calculation of the interpolation coefficient, so that the larger the overlapping rate is, the larger the weight occupied by the mapping result of the adjacent windows is, and the smooth transition is more natural. The bilinear interpolation method can conduct interpolation in two directions simultaneously, continuous smooth gray value transition is obtained, and visual quality of the enhanced image is improved. Compared with simple linear interpolation, bilinear interpolation can better maintain local detail and edge information, and reduce saw-tooth and distortion phenomena in the interpolation process.
Further, the image enhancement further includes: the contrast and entropy of the gray value of the pixel in each local window are calculated, and a contrast calculation formula is as follows: Wherein, max_gray and min_gray are the maximum value and the minimum value of the pixel gray value in the local window respectively; the entropy calculation formula is:
entopy= Σ (p×log2 (p)), where p is the probability of each gray value occurrence within the local window; adjusting the size and the overlapping rate of the local window according to the contrast and the entropy value; when the contrast is smaller than a preset contrast threshold value and the entropy value is smaller than a preset entropy value threshold value, the size of the local window is increased, and the overlapping rate is reduced; when the contrast is larger than a preset contrast threshold value and the entropy value is larger than a preset entropy value threshold value, the size of the local window is reduced, and the overlapping rate is increased; and combining the mapping results and interpolation results of all the local windows to obtain image data with enhanced contrast.
Specifically, the size and the overlapping rate of the local window are dynamically adjusted according to the judging result. When it is desired to increase the window size, the current window size may be multiplied by a factor greater than 1, such as 1.2 or 1.5. When the overlap rate needs to be reduced, the overlap rate of the current window may be multiplied by a factor less than 1, such as 0.8 or 0.5. When it is desired to reduce the window size, the current window size may be multiplied by a factor of less than 1, such as 0.8 or 0.5. When it is desired to increase the overlap ratio, the overlap ratio of the current window may be multiplied by a factor greater than 1, such as 1.2 or 1.5. Recalculating interpolation coefficients: and recalculating interpolation coefficients between adjacent windows according to the adjusted window sizes and the overlapping rate. The calculation formula of the interpolation coefficient is as follows: coeffient=1-overlap ratio, where,
Applying the adjusted window and interpolation coefficients: and carrying out self-adaptive histogram equalization on the local area by using the adjusted window size and the overlapping rate, and carrying out bilinear interpolation on the mapping result of the adjacent window by using the updated interpolation coefficient to obtain the enhancement result of smooth transition. The results of all local windows are combined: and splicing the mapping results and interpolation results of all the local windows together to obtain a final image with enhanced contrast. By dynamically adjusting the size and the overlapping rate of the local window, the scheme can adaptively select proper window and overlapping setting according to the contrast and information quantity characteristics of different areas of the image. The local contrast can be enhanced and noise caused by excessive enhancement can be reduced by using a larger window and a smaller overlapping rate in the area with low contrast and small information amount; the use of smaller windows and larger overlap rates in areas of high contrast and large information content can preserve more detailed information and improve enhanced accuracy. Meanwhile, by recalculating the interpolation coefficient, the continuity of smooth transition between adjacent windows is ensured. The self-adaptive window and overlap ratio adjustment strategy can improve the overall contrast of the image and simultaneously give consideration to the enhancement effects of different areas, thereby obtaining more natural and detail-rich enhancement results.
Further, performing cluster analysis on the feature data set includes: carrying out normalization processing on the feature data set by adopting a minimum-maximum normalization method, and scaling the value range of each feature in the feature data set to be within a range of 0 to 1 to obtain a normalized feature data set; dividing the normalized characteristic data set into a training set and a verification set, wherein the training set is used for characteristic selection, and the verification set is used for evaluating the clustering performance of the characteristic set; initializing a candidate feature subset as an empty set, initializing an optimal feature subset as a full set, and taking the normalized feature data set as an initial candidate feature subset; repeating the following steps until the size of the optimal feature subset reaches a preset feature quantity threshold k: adding each candidate feature in the candidate feature subsets into the current optimal feature subset to obtain a new feature subset; training a clustering model on the training set by adopting a new feature subset to obtain a clustering result; clustering is carried out on the verification set by adopting a clustering model obtained through training, and clustering performance is evaluated; selecting the features which are added and enable the clustering performance to be improved to the greatest extent, removing the features from the candidate feature subsets, and adding the optimal feature subsets to obtain a new optimal feature subset and a new candidate feature subset; if the clustering performance of the current candidate feature subset is better than that of the optimal feature subset, updating the current candidate feature subset into the optimal feature subset; and outputting an optimal feature subset, wherein the optimal feature subset comprises the first k features with the greatest influence on the clustering result.
Further, performing cluster analysis on the feature data set, further includes: calculating the kernel density estimation of the optimal feature subset, wherein the kernel density estimation adopts a Gaussian kernel function, and the bandwidth parameter of the kernel density estimation is determined by adopting a Silverman's rule of thumb method; selecting the data point with the highest density as a first clustering center according to the result of the kernel density estimation; calculating the distance between each data point in the optimal characteristic subset and the first clustering center, wherein the distance calculation formula is as follows: Wherein x is a feature vector of a data point, c is a feature vector of a cluster center, and Σ is a covariance matrix of a feature data set; according to the calculated distance, calculating the probability that each data point is selected as the next cluster center, wherein the probability calculation formula is as follows: /(I) Wherein d (x) is the distance of data point x from the selected cluster center; according to the calculated probability, adopting Roulette Wheel Selection method to randomly select a new data point as the next clustering center; repeating the steps until k cluster centers are selected.
Therein, silverman's rule of thumb is a commonly used method of core density estimation bandwidth selection.
Where h is the bandwidth, n is the number of data points, and σ is the standard deviation of the data. This formula assumes that the data obeys a gaussian distribution and has better performance in the sense of mean square error. The Silverman's rule of thumb can automatically adapt to the scale of data, provide a reasonable bandwidth initial value and reduce the calculation cost of bandwidth selection. In the present application, a gaussian kernel function is used in computing the kernel density estimate for the optimal feature subset. To determine the bandwidth parameters of the core density estimation, the Silverman's rule of thumb method is used. The standard deviation sigma of the optimal feature subset is calculated. The bandwidth h is calculated using the Silverman's rule of thumb formula from the number of data points n and standard deviation σ for the feature subset. And taking the calculated bandwidth h as a bandwidth parameter of the Gaussian kernel function, and performing kernel density estimation. The suitable bandwidth is automatically determined through Silverman's rule of thumb, so that the workload of manual parameter adjustment can be reduced, and the efficiency and the repeatability of nuclear density estimation are improved.
Of these, roulette Wheel Selection (roulette selection) is a common probability-based random selection method. The method treats the candidate objects as sectors of roulette, and the area of each sector is proportional to the selection probability of the object. When selecting, a point is randomly extracted from the wheel disc, and the corresponding object is selected in which sector. In the application, when a cluster center is selected, firstly, according to the result of kernel density estimation, a data point with highest density is selected as a first cluster center. Then, the distance of each data point from the selected cluster center is calculated, and the probability that the data point is selected as the next cluster center is calculated based on the distance. Using the Roulette Wheel Selection method, the next cluster center is randomly selected based on the probability distribution of the data points. The distance d (x) of each data point from the center of the selected cluster is calculated. From the distance d (x), a probability p (x) is calculated that each data point is selected as the next cluster center. The probability p (x) of the data points is normalized to construct a probability distribution for roulette. Generating a random number in the range of [0,1], and selecting the next cluster center according to the random number by a Roulette Wheel Selection method. Repeating the steps until k cluster centers are selected. Through Roulette Wheel Selection for selecting the clustering centers, the problem of local optimization possibly caused by a greedy strategy can be avoided. According to the distance distribution of the data points and the selected centers, the selection probability is dynamically adjusted, so that the data points with the longer distances have higher opportunities to be selected as new clustering centers, and the diversity and the global property of the clustering results are increased.
Specifically, silverman's rule of thumb is used for automatically determining bandwidth parameters of nuclear density estimation, so that estimation efficiency and repeatability are improved; roulette Wheel Selection is used for randomly selecting a clustering center according to probability distribution of data points, avoiding local optimum and improving diversity of clustering results. By applying the two methods in the scheme, parameters of kernel density estimation and cluster center selection can be adaptively adjusted, and the performance and robustness of a clustering algorithm are improved.
Further, performing cluster analysis on the feature data set, further includes: calculating the membership degree of each data point in the optimal characteristic subset belonging to each cluster center, wherein the membership degree calculation formula is as follows: Wherein c i is the ith clustering center, m is a coefficient, and the hardness degree of the clusters is controlled; updating the position of the clustering center according to the membership degree of the data points, wherein the formula for updating the position of the clustering center is as follows: /(I) Wherein u (x, c) is the membership degree of data point x to the clustering center c, x is the feature vector of the data point, and c is the feature vector of the clustering center; repeating the steps until the change of the clustering center is smaller than a preset threshold value or the maximum iteration number is reached.
Further, evaluating the clustering performance includes: the compactness and the separation of the clustering results are evaluated by adopting the following formula: Wherein a (i) is the average distance between data point i and other data points in the same class, and b (i) is the average distance between data point i and the nearest data point in other classes; the value range of s (i) is-1 to 1, and the larger the value of s (i) is, the better the compactness and the separation degree of the clustering result are; the overall performance of the clustering results was evaluated using the following formula: Wherein ss_b is the sum of squares of the dispersion between the categories, ss_w is the sum of squares of the dispersion inside the category, k is the number of categories of the cluster, and n is the total number of data points; the larger the CH value is, the larger the difference between the categories representing the clustering result is, the smaller the difference inside the category is, and the better the clustering performance is.
Wherein, the compactness measures the compactness between data points in the same category in the clustering result. The higher the compactness, the closer the data points in the same class are, the smaller the differences within the class.
The ideal clustering result should be such that the data points within the same class are highly similar, forming a compact cluster structure. The degree of separation measures the degree of distinction between different categories in the clustering result. The higher the degree of separation, the farther the distance between the different categories is, and the more pronounced the boundaries between the categories are. The ideal clustering result should be such that there is a clear distinction between the different categories, with a low degree of overlap or confusion with respect to each other. In the present application, for each data point i, the average distance a (i) between it and other data points in the same class is calculated. For each data point i, the average distance b (i) between it and the nearest data point in the other category is calculated. Using the formulaThe compactness and separability index of data point i are calculated. And (3) averaging the s (i) values of all the data points to obtain the average compactness and the separation degree of the whole clustering result. The value range of s (i) is [ -1,1], and the larger the value is, the better the compactness and the separation of the clustering result on the data point are. By calculating the average s (i) value for all data points, the compactness and separability performance of the clustering result as a whole can be evaluated.
The compactness and the separation degree of the clustering result are comprehensively considered in the overall performance, and the overall effect of the clustering algorithm is evaluated. A good clustering result should have a high degree of separation while maintaining a high degree of compactness. The overall performance index quantifies the quality of the clustering result by comparing the differences between the categories with the differences within the categories. The higher the overall performance, the more efficient the clustering algorithm can be to classify the data points into compact and well-separated categories. In the present application, the sum of squared deviations ss_b between categories is calculated. Ss_b measures the distance between the center point of different categories and the global center point, reflecting the difference between the categories. The sum of squared deviations ss_w inside the class is calculated. Ss_w measures the distance between a data point within the same class and the class center point, reflecting the differences within the class. Using the formulaThe Calinski-Harabasz index was calculated. Where k is the number of categories of the cluster and n is the total number of data points. The larger the CH value is, the larger the difference between the categories representing the clustering result is, the smaller the difference inside the category is, and the better the overall performance is. By comparing CH values under different clustering algorithms or different parameter settings, a clustering result with optimal performance can be selected.
Specifically, the compactness and the separation degree are used for evaluating the performance of the clustering result on the single data point level and measuring the compactness in the same category and the distinguishing degree between different categories; the overall performance uses Calinski-Harabasz index to evaluate the overall effect of the clustering result, and comprehensively considers the differences among the categories and the differences inside the categories. By calculating the indexes, the performance of the clustering algorithm can be quantitatively evaluated, the optimal clustering result is selected, and the clustering algorithm is optimized and improved. In practical application, the clustering performance can be evaluated by selecting proper evaluation indexes according to the characteristics and requirements of specific problems, and comprehensive analysis and judgment can be performed by combining a plurality of indexes.
Further, in combination with the user portrait, the process mode and the welding defect detection result, a recommendation model is established to recommend the welding process, including: constructing a ternary relation matrix R of a user-process mode-defect detection result, wherein an element R (u, i, j) in the matrix R represents a defect detection result j corresponding to welding operation of the user u in a process mode i, a value of R (u, i, j) is 1, an operation result of the user in the corresponding process mode is j, and a value of 0 represents unknown or non-occurrence; decomposing the constructed ternary relation matrix R to obtain a user hidden factor matrix P, a process mode hidden factor matrix Q and a defect detection result hidden factor matrix Y, wherein the decomposition formula is as follows: r is approximately equal to mu+B u+Bi+Bj+P×QT +Y, wherein R is m multiplied by n multiplied by l, m is the number of users, n is the number of process modes, and l is the number of classes of defect detection results; p is m x k dimension user hidden factor matrix, k is hidden factor dimension; q is an n x k dimension process mode hidden factor matrix; y is an l x k dimensional defect detection result hidden factor matrix; b u is an m-dimensional user bias term matrix, B i is an n-dimensional process mode bias term matrix, and B j is an l-dimensional defect detection result bias term matrix; μ is the global bias term.
Specifically, a user hidden factor matrix P, a process mode hidden factor matrix Q and a defect detection result hidden factor matrix Y are introduced into the formula, and represent the representation of the user, the process mode and the defect detection result in a hidden factor space respectively. The hidden factor represents mapping the user, process pattern and defect detection results into a low-dimensional latent semantic space, capturing the latent relationship and interactions between them. Through the hidden factor representation, hidden modes and commonalities among users, process modes and defect detection results can be mined, and similarity measurement and association analysis are facilitated. The user hidden factor matrix P and the user bias term matrix B u in the formula introduce personalized information of the user. The user hidden factor matrix P represents the location of each user in the hidden factor space, capturing the personal preferences and features of the user. The user bias term matrix B u represents the inherent bias of each user, characterizing individual differences of the users. Through personalized modeling, personalized process recommendation and defect prediction can be performed on the user according to the historical behaviors and personal characteristics of the user, and the recommendation accuracy and the user satisfaction are improved.
The process mode hidden factor matrix Q, the process mode bias term matrix B i, the defect detection result hidden factor matrix Y, and the defect detection result bias term matrix B j in the formula represent potential features and deviations of the process mode and the defect detection result, respectively. The process mode hidden factor matrix Q and the defect detection result hidden factor matrix Y map the process mode and the defect detection result into a hidden factor space, and capture the potential attribute and the interrelation of the process mode and the defect detection result. The process mode bias term matrix B i and the defect detection result bias term matrix B j characterize the inherent bias of the process mode and the defect detection result.
By performing representation learning on the process patterns and defect detection results, it is possible to find the correlation patterns between them, predict the types of defects that may occur in a given process pattern, and optimize the process parameters and improve the weld quality based on the historical defect detection results. The global bias term μ in the formula represents a global average or reference level for the entire dataset. The global bias term characterizes the general trend and general rule of the ternary relationship of the user-process mode-defect detection result. It provides a baseline reference that allows the model to better fit the data and provide reasonable default recommendations in the absence of personalized information.
The formula decomposes the ternary relation matrix R into the product of a user hidden factor matrix P, a process mode hidden factor matrix Q and a defect detection result hidden factor matrix Y, and adds a bias term matrix and a global bias term.
And mapping the high-dimensional ternary relation matrix into a low-dimensional hidden factor space through matrix decomposition, so as to realize low-rank approximation. The low-rank approximation can effectively filter noise, capture main modes and structures in data, and improve robustness and generalization capability of recommendation and prediction. The matrix decomposition in the formula can be optimally solved by a machine learning algorithm, such as an alternate least squares method (ALS), a gradient descent method and the like. By minimizing the reconstruction error or regularization loss function, an optimal user hidden factor matrix P, process mode hidden factor matrix Q and defect detection result hidden factor matrix Y can be learned, so that the model can be well fit with observed data, and unknown user-process mode-defect detection result combinations can be inferred and predicted.
In summary, the formula maps the user, process mode and defect detection results into the latent semantic space through matrix decomposition and hidden factor representation, and captures the latent relation and personalized features between the user, the process mode and the defect detection results. The representation learning and low-rank approximation can effectively mine patterns in data, improve the accuracy of recommendation and prediction, and support personalized process optimization and quality improvement. Meanwhile, the recommendation model can be continuously updated and perfected through model learning and optimization, new data and changing requirements are met, and continuous intelligent decision support is provided.
Further, a recommendation model is established by combining the user portrait, the process mode and the welding defect detection result, and welding process recommendation is performed, and the method further comprises the following steps: the decomposition formula is modified by the following formula: r (u, i, j) is approximately equal to mu+b u+bi+bj+pu T×qi+yj, wherein mu is a global bias term, b u is a bias term of a user u, b i is a bias term of a process mode i, b j is a bias term of a defect detection result j, p u is a hidden factor vector of the user u, q i is a hidden factor vector of the process mode i, and y j is a hidden factor vector of the defect detection result j; the stochastic gradient descent method is adopted to minimize the error square sum, the hidden factor matrix P, Q, Y and the bias term b u、bi、bj are optimized, and the objective function of the error square sum is as follows: where λ is the regularization parameter, |·| represents the Frobenius norm of the matrix,/> An L2 regularization term representing all user bias terms,L2 regularization term representing all process pattern bias terms,/>An L2 regularization term representing all defect detection result bias terms; and (3) carrying out optimization solution on the objective function by adopting an alternating least square method, alternately fixing part of parameters, optimizing other parameters, and carrying out iterative optimization until convergence to obtain an optimal hidden factor matrix P, Q, Y and an offset term b u、bi、bj.
Specifically, a global bias term μ, a user bias term b u, a process mode bias term b i, and a defect detection result bias term b j are introduced into the formula. The introduction of the bias term can capture the inherent deviation and individual difference of the user, the process mode and the defect detection result, and improve the expression capability and fitting capability of the recommendation model. The global bias term μ characterizes the overall mean or benchmark level of the entire dataset, the user bias term b u characterizes the user's personal preferences, the process mode bias term b i characterizes the inherent properties of the process mode, and the defect detection result bias term b j characterizes the inherent risks of different defect types. By introducing the bias items, the recommendation model can be better adapted to the individuation characteristics of different users, process modes and defect detection results, and the accuracy and individuation degree of recommendation are improved. Regularization term is introduced into objective functionL2 regularization is performed on the hidden factor matrix P, Q, Y and the bias term b u、bi、bj. The regularization term can prevent the model from being over fitted, and the generalization capability and the robustness of the model are improved. By restraining the size of the parameters, regularization can control the complexity of the model, avoid overfitting training data and improve the prediction performance of the model on unknown data. Lambda in the regularization term is a regularization parameter, and the strength of regularization is controlled. By adjusting the value of λ, the fitting error and model complexity can be balanced, and optimal model parameters can be found. The formula adopts a random gradient descent method to carry out optimization solution on the objective function. The random gradient descent method is an efficient optimization algorithm that progressively minimizes the objective function by iteratively updating parameters. In each iteration, one or a batch of training samples is randomly selected, the gradient is calculated, the parameters are updated, and the optimal solution is gradually approximated. The random gradient descent method has the advantages of high calculation efficiency, capability of processing large-scale data sets and certain robustness to noise data. By adjusting the learning rate and the iteration number, the speed and accuracy of the optimization can be controlled. And the formula adopts an alternate least square method to carry out optimization solution on the objective function. The alternate least square method is a commonly used matrix decomposition optimization algorithm, and the optimal solution is solved in an iterative way by alternately fixing part of parameters and optimizing other parameters. In each iteration, other parameters are fixed, the objective function is converted into a linear least square problem, and the optimal value of the current parameter is solved. And repeating iteration until convergence, and obtaining an optimal hidden factor matrix and an optimal bias term. The advantage of the alternating least squares method is that it is simple to calculate, easy to implement, and in practice shows good convergence and stability. By introducing bias terms and a hidden factor matrix, the recommendation model can provide more interpretable results. The bias term characterizes the inherent properties of the user, process mode and defect detection results, and the hidden factor matrix captures the potential relationships and interactions between them. By analyzing the bias term and the hidden factor matrix, the reasons behind the recommended result and the influence factors can be obtained, and beneficial insights and guides are provided for process optimization and quality improvement. Meanwhile, the recommendation model has good expandability, and can be easily incorporated into new users, process modes and defect detection results, so that the recommendation model is suitable for continuously changing service demands and data environments.
Further, a recommendation model is established by combining the user portrait, the process mode and the welding defect detection result, and welding process recommendation is performed, and the method further comprises the following steps: and predicting the probability distribution of the defect detection result of the given user in the given process mode by utilizing the optimal hidden factor matrix P, Q, Y and the bias term b u、bi、bj obtained by training, wherein a prediction formula is as follows: r (u,i,j)=μ+bu+bi+bj+pu T×qi+yj, wherein r (u,i,j) represents a predicted value of the defect detection result j of user u in process mode i; μ is the global bias term; b u is a bias term corresponding to a user u, b i is a bias term corresponding to a process mode i, and b j is a bias term corresponding to a defect detection result j; p u is a hidden factor vector corresponding to a user u, q i is a hidden factor vector corresponding to a process mode i, and y j is a hidden factor vector corresponding to a defect detection result j; according to the predicted probability distribution of the defect detection result, calculating the potential preference of the user u to the process mode i, wherein the preference value calculation formula is as follows:
Reference (u, i) =vj×r (u,i,j)×vj, where v j is a utility value of the defect detection result j, which can be flexibly set according to service requirements; and for a given user, according to the ranking of the potential preference values of different process modes, obtaining a process mode preference ranking result of the corresponding user, and recommending a process mode combination with the highest potential preference value for the user.
Specifically, the formula r (u,i,j)=μ+bu+bi+bj+pu T×qi+yj predicts the probability distribution of the defect detection result j of the given user u in the process mode i by using the hidden factor matrix and the bias term. By combining the hidden factor representation of the user, the process mode and the defect detection result and the corresponding bias items, the interaction influence and personalized characteristics between the hidden factor representation and the bias items can be captured, and the accuracy of defect detection result prediction is improved. The predicted probability distribution of defect detection results can provide important references for process optimization and quality control, help identify high risk process mode combinations, and take precautions and improvements. The formula reference (u, i) = Σjxr (u,i,j)×vj calculates the potential Preference value of user u for process pattern i from the predicted defect detection result probability distribution. By considering utility values v_j of different defect detection results, the weight and priority of preference calculation can be flexibly adjusted according to service requirements and quality requirements. For example, serious defects may be assigned a higher negative utility value to avoid recommending process patterns that may lead to significant quality problems. The calculation of the potential preference value of the user integrates the prediction probability and the utility value of the defect detection result, provides a method for quantitatively evaluating the applicability and the quality of the process mode, and provides a basis for personalized process recommendation. And sequencing the different process modes according to the calculated potential preference values of the users to obtain a process mode preference sequencing result of the users. By recommending the process mode combination with the highest potential preference value, personalized process selection and optimization suggestions can be provided for users, and welding quality and efficiency are improved. The process mode recommendation considers the historical performance of the user, the characteristics of the process mode and the feedback of the defect detection result, provides a data-driven intelligent decision support, and helps the user to quickly find the optimal process parameters and operation schemes.
3. Advantageous effects
Compared with the prior art, the application has the advantages that:
(1) By acquiring multi-source heterogeneous data in a welding process and marking, preprocessing and extracting features, a high-quality tagged welding data set is constructed, rich data support is provided for intelligent welding process analysis, and the problems of insufficient data and poor quality in the traditional method are overcome;
(2) The image enhancement method with the adaptive window, the contrast and the entropy index can dynamically adjust the processing parameters according to the image content, so that the quality of welding image data is effectively improved, the accuracy of subsequent defect identification is improved, and the robustness of the system is improved;
(3) The method combining feature selection and fuzzy C-means clustering is used for clustering welding processes, and the optimal process modes in different environments can be found in a self-adaptive mode through optimizing feature subsets and clustering centers, so that a data driving basis is provided for process optimization, and subjectivity and limitation of traditional empirical process selection are overcome;
(4) Constructing a multi-dimensional user portrait, comprehensively describing user characteristics, providing accurate user understanding for personalized process recommendation, and overcoming the problem of insufficient user demand grasp in the traditional method;
(5) The user-process-defect ternary relation recommendation model is constructed, regularization term control model complexity is introduced, implicit association among users, processes and defects can be mined, accurate personalized process parameter recommendation is realized, diversified user requirements are met, user satisfaction is improved, and the defects that recommendation thought is single and individuation is impossible in a traditional method are overcome;
(6) The recommendation result is dynamically adjusted by using the multi-arm slot machine strategy, and the recommendation strategy is optimized online, so that the recommendation accuracy is ensured, meanwhile, the novelty and explorability of the recommendation are improved, the interest change of the user is actively adapted, the sustainability and the user viscosity of the system are enhanced, and the limitation of the traditional static recommendation is overcome.
Drawings
The present specification will be further described by way of exemplary embodiments, which will be described in detail by way of the accompanying drawings. The embodiments are not limiting, in which like numerals represent like structures, wherein:
FIG. 1 is an exemplary flow chart of a steel structure welding process quality management recommendation method based on big data processing according to some embodiments of the present description;
FIG. 2 is an exemplary flow chart of image enhancement shown in accordance with some embodiments of the present description;
FIG. 3 is an exemplary flow chart for acquiring k cluster centers according to some embodiments of the present description;
FIG. 4 is an exemplary flow chart for updating a cluster center, shown in accordance with some embodiments of the present description.
Detailed Description
The method and system provided in the embodiments of the present specification are described in detail below with reference to the accompanying drawings.
Fig. 1 is an exemplary flowchart of a steel structure welding process quality management recommendation method based on big data processing according to some embodiments of the present disclosure, data acquisition and preprocessing, in which parameter data such as welding current, voltage, speed, etc. are acquired in real time through various sensors during welding, and image data of a welding surface are synchronously acquired. And cleaning, denoising and normalizing the acquired original data to obtain standardized welding process parameter data and image data.
FIG. 2 is an exemplary flow chart of image enhancement, image data annotation and enhancement, data annotation, according to some embodiments of the present description: the acquired welding image data is manually marked by a professional welding process expert by using a data marking tool (such as Label Me, label Img and the like). The expert marks different types of welding defects (such as welding cracks, welding slag inclusions, welding air holes and the like) and positions thereof according to the defect characteristics in the welding image. Synchronizing the marked image data with corresponding welding process parameter data (such as welding current, voltage, speed and the like) to construct a tagged welding process data set. Data partitioning and window calculation: the labeled welding process dataset is divided into a plurality of partial windows, and the window size can be set according to factors such as image resolution, defect size and the like. A Cumulative Distribution Function (CDF) is calculated for the pixel gray values within each local window, i.e. the cumulative probability of each gray value occurring is calculated. The minimum value (cdf_min) and the maximum value (cdf_max) of CDF within each partial window are recorded for subsequent gray value mapping. Gray value mapping: the pixel gray values within each local window are mapped to a specified dynamic range (e.g., 0 to 255). The formula is used:
And (5) gray value mapping is performed. Where i is an original gray value, CDF (i) is a cumulative distribution function value corresponding to the gray value i, cdf_min and cdf_max are respectively a minimum value and a maximum value of CDF in a local window, and round is a rounding function. The contrast of the image can be enhanced through gray value mapping, so that the defect area is more obvious. Window smooth transition: in order to avoid abrupt change of the mapping results between adjacent local windows, a bilinear interpolation method is adopted to carry out smooth transition on the mapping results of the adjacent windows. Calculating the overlap ratio between adjacent partial windows, using the formula: /(I) Where window_size is the size of a local window and stride is the step size between adjacent local windows. Calculating an interpolation coefficient according to the overlapping rate, and using the formula: coeffient=1-overlap ratio. And carrying out weighted average on the mapping results of the adjacent local windows, wherein the weight is an interpolation coefficient, and obtaining the gray value after smooth transition. Adaptive window adjustment: in order to further improve the image enhancement effect, the window size and the overlap ratio are adaptively adjusted according to the contrast and entropy values in the local window. The contrast of the pixel gray values within each local window is calculated using the formula: /(I)Where max_gray and min_gray are the maximum and minimum values, respectively, of the pixel gray values within the local window. Calculating entropy of pixel gray values in each local window using the formula: entopy= Σ (p×log2 (p)), where p is the probability of each gray value occurrence within the local window. Setting a contrast threshold and an entropy threshold, and increasing the size of a local window and reducing the overlapping rate when the contrast is smaller than the threshold and the entropy is smaller than the threshold; when the contrast is larger than the threshold value and the entropy is larger than the threshold value, the size of the local window is reduced, and the overlapping rate is increased. By adaptively adjusting the window size and the overlapping rate, image enhancement can be performed in a targeted manner according to local features of the image. Results combination: and combining the gray value mapping results and interpolation results of all the local windows to obtain the complete image data with enhanced contrast. Re-synchronizing the enhanced image data with the original welding process parameter data to obtain a preprocessed welding process data set.
Feature extraction and selection, and process feature extraction: and extracting process characteristics related to the welding process from the preprocessed welding process data set, wherein the process characteristics comprise welding material type, plate thickness, welding method and the like. The type of welding material may be represented by Encoding a material number or name or by One-Hot Encoding (One Encoding). The thickness of the plate can be directly represented by numerical values, or can be subjected to barrel division (Binning) or discretization according to the thickness range. The welding method may be represented by encoding or single-heat encoding the different methods. Visual characteristic extraction: and performing visual feature extraction on the preprocessed welding image data, wherein the visual feature extraction comprises features such as image textures, shapes, colors and the like. Texture features can be extracted by using a gray level co-occurrence matrix (GLCM), a Local Binary Pattern (LBP) and other methods to obtain feature vectors reflecting the distribution and variation of the image texture. The shape features can be obtained by using methods such as edge detection, contour extraction and the like, and geometric features such as weld joint shapes, defect shapes and the like are extracted. The color characteristics can be obtained by calculating a color histogram, a color moment, and the like of the image, and reflect the color distribution and variation of the image. Feature selection: and (3) adopting feature selection methods such as a filtering method, a wrapping method and the like to evaluate the influence of each feature on welding quality and screen out an optimal feature subset. The filtering type feature selection method, such as a variance threshold method, a correlation coefficient method and the like, selects the features with the most differentiation and correlation according to the statistical characteristics of the features, such as variance, correlation and the like. The wrapped feature selection method, such as a recursive feature elimination method (RFE), model-based feature importance assessment and the like, evaluates the importance of features by constructing a prediction model, and selects a feature subset with the greatest contribution to the model performance. Through feature selection, a refined welding process feature data set is obtained, redundancy and irrelevant features are reduced, and the efficiency and accuracy of subsequent analysis and modeling are improved. Data normalization: and carrying out normalization processing on the refined characteristic data set by adopting a minimum-maximum normalization method, and scaling the value range of each characteristic to be within the interval of 0 to 1. For each feature, its minimum and maximum values in the dataset are calculated, then the formula is used: And normalizing the characteristic value. The normalization processing can eliminate dimension differences among the features, so that the value ranges among different features are similar, and subsequent cluster analysis and model training are facilitated. Data set partitioning: dividing the normalized feature data set into a training set and a verification set, wherein the training set is used for feature selection, and the verification set is used for evaluating the clustering performance of the feature set. The data set may be divided into two parts in a random division manner according to a certain proportion (such as 70% training set and 30% verification set). The distribution of the training set and the verification set is ensured to be similar as possible, and the deviation of the data set division is avoided. Feature subset search: initializing a candidate feature subset as an empty set, initializing an optimal feature subset as a full set, and taking the normalized feature data set as an initial candidate feature subset. Repeating the following steps until the size of the optimal feature subset reaches a preset feature quantity threshold k: and adding each candidate feature in the candidate feature subsets into the current optimal feature subset to obtain a new feature subset. For each new feature subset, a cluster analysis is performed on the training set, such as using a K-means clustering algorithm, to evaluate cluster performance, such as profile factor (Silhouette Coefficient), calinski-Harabasz index, and so on. And selecting the feature subset with the optimal clustering performance as a new optimal feature subset. And removing the features which are added into the optimal feature subset from the candidate feature subset, and updating the candidate feature subset. Through the iterative process, different feature combinations are searched and evaluated step by step, and the feature subset with optimal clustering performance is found.
FIG. 3 is an exemplary flow chart for acquiring k cluster centers, cluster model training, according to some embodiments of the present description: the new feature subset is adopted on the training set to train a clustering model, and common clustering algorithms comprise K-means, gaussian Mixture Models (GMM), hierarchical clustering and the like. Taking K-means as an example, setting the target class number K of clusters, randomly initializing K cluster centers, and iterating the following steps until convergence: for each sample in the training set, the distances between the sample and k cluster centers are calculated, and the sample is assigned to the category to which the closest cluster center belongs. For each category, the mean value of all samples in the category is recalculated, and the mean value is updated to be a new cluster center. And after the iterative process is finished, clustering results on the training set are obtained, and each sample is allocated to a corresponding category. Clustering performance evaluation: clustering is carried out on the verification set by adopting a clustering model obtained through training, and each sample in the verification set is distributed to the category which belongs to the nearest clustering center. The clustering performance is evaluated, and common indexes comprise contour coefficients (Silhouette Coefficient), calinski-Harabasz indexes, davies-Bouldin indexes and the like. Taking the profile factor as an example, for each sample in the validation set, the following two distances are calculated: a: average distance of a sample from other samples in the same class. b: average distance of sample from the nearest other class. Calculating the profile coefficient of the sample: The value range of the contour coefficient is [ -1,1], and the larger the value is, the better the clustering effect is. And calculating the average value of the contour coefficients of all the samples on the verification set, and taking the average value as an evaluation index of clustering performance. Feature selection iteration: and selecting the features which are added and enable the clustering performance to be improved to the greatest extent, removing the features from the candidate feature subsets, and adding the optimal feature subsets to obtain a new optimal feature subset and a new candidate feature subset. The method comprises the following specific steps: and adding each feature in the candidate feature subsets into the current optimal feature subset in turn to form a new feature subset. The clustering model is trained on the training set using the new feature subset, the clustering performance is evaluated on the verification set, and a performance improvement value (such as improvement of the contour coefficient) is calculated. The features with the greatest improvement in performance are selected, removed from the candidate feature subsets, and added to the optimal feature subset. The updated optimal feature subset contains features that most contribute to the clustering performance, and the updated candidate feature subset eliminates the selected features. Feature subset update: and if the clustering performance of the current candidate feature subset is better than that of the optimal feature subset, updating the current candidate feature subset into the optimal feature subset. The method comprises the following specific steps: the clustering model is trained on the training set using the current candidate feature subset, and clustering performance is evaluated on the verification set. If the clustering performance (such as profile coefficients) of the current candidate feature subset is higher than the optimal feature subset, the current candidate feature subset is updated to the optimal feature subset. Through the step, the optimal feature subset can be dynamically updated in the process of feature selection, so that the selected feature combination can achieve an optimal clustering effect. Outputting an optimal feature subset: and outputting an optimal feature subset, wherein the optimal feature subset comprises the first k features with the greatest influence on the clustering result. The size of the optimal feature subset is determined by a preset feature quantity threshold k, and k can be set according to actual requirements and data sizes. The influence of the features in the optimal feature subset on the clustering result is the greatest, different clustering categories can be effectively distinguished, and the accuracy and the interpretability of clustering are improved.
FIG. 4 is an exemplary flow chart for updating cluster centers, process cluster analysis, kernel density estimation, according to some embodiments of the present description: and (4) carrying out kernel density estimation on the optimal feature subset, and adopting a Gaussian kernel function. The gaussian kernel function has the expression: where x is the distance of the data point from the center of the kernel. The bandwidth parameter of the nuclear density estimation is determined by adopting a Silverman's rule of thumb method, and the calculation formula of the bandwidth parameter h is as follows: /(I) Where σ is the standard deviation of the feature dataset and n is the number of data points. For each data point in the optimal feature subset, calculate its distance from other data points, calculate a kernel density estimate using a gaussian kernel function. The calculation formula of the nuclear density estimation value is as follows: Where x is the target data point, x i is the other data points, h is the bandwidth parameter, and K is the gaussian kernel function. Selecting a first cluster center: and selecting the data point with the highest density as a first clustering center according to the result of the kernel density estimation. The highest density data point corresponds to the point with the highest estimated nuclear density value, which means that the local density of the point in the feature space is the highest, and is suitable as the initial center of clustering. Calculating the distance between the data point and the clustering center: the distance of each data point in the optimal feature subset from the first cluster center is calculated using the mahalanobis distance (Mahalanobis distance). The calculation formula of the mahalanobis distance is as follows:
Where x is the eigenvector of the data point, c is the eigenvector of the cluster center, Σ is the covariance matrix of the eigenvalue dataset. The covariance matrix sigma reflects the correlation and scale difference between the features, and the correlation between the features can be considered by using the mahalanobis distance, so that the clustering accuracy is improved. Calculating the probability that the data point is selected as the next cluster center: based on the calculated distances, a probability is calculated that each data point is selected as the next cluster center. The probability calculation formula is: /(I) Distance from the center of the selected cluster for data point x. The probability that the data point with larger distance is selected as the next cluster center is higher, so that the cluster centers are distributed more uniformly, and the whole feature space is covered. Selecting the next cluster center: according to the calculated probability, a Roulette Wheel Selection method is adopted to randomly select a new data point as the next clustering center. The Roulette Wheel Selection method randomly selects data points according to the probability size, the greater the probability the more likely a data point is selected. The method comprises the following specific steps: and calculating the sum of the selection probabilities of all the data points, generating a random number between 0 and 1, comparing the random number with the accumulation probability, and selecting the first data point with the accumulation probability larger than or equal to the random number as the next clustering center. Iteratively selecting a clustering center: repeating until k cluster centers are selected. After each new cluster center is selected, the distance between the data point and the cluster center and the selection probability are updated until the required number of cluster centers are obtained. Calculating the membership degree of the data points: and calculating the membership degree of each data point in the optimal characteristic subset belonging to each cluster center, and adopting a membership degree calculation formula of Fuzzy C-means clustering (Fuzzy C-means Clustering). The membership calculation formula is: /(I)Wherein c_i is the ith clustering center, m is a coefficient, and the degree of softness of the clusters is controlled. The membership reflects the degree of attribution of the data points to each clustering center, and the higher the membership, the higher the similarity between the data points and the clustering centers. Updating the position of the clustering center: and updating the position of the clustering center according to the membership degree of the data points, and adopting a center updating formula of fuzzy C-means clustering. The formula for updating the position of the cluster center is as follows: wherein u (x, c) is the membership degree of data point x to cluster center c, x is the feature vector of data point, and c is the feature vector of cluster center. The position of the clustering center is updated in a weighted average mode, so that the clustering center is closer to a data point with high membership, and the clustering accuracy is improved. Iterative optimization clustering result: repeating until the change of the cluster center is smaller than a preset threshold value or the maximum iteration number is reached. And after updating the clustering center each time, recalculating the membership degree of the data points, updating the position of the clustering center according to the membership degree, and iteratively optimizing the clustering result. When the change of the clustering center is smaller or the maximum iteration number is reached, the clustering result is considered to be converged, and the iteration process is stopped.
Evaluating clustering performance, comprising: the compactness and the separation degree of the clustering result are evaluated: and evaluating the compactness and the separation degree of the clustering result by adopting a contour coefficient (Silhouette Coefficient). For each data point i, the following two distances are calculated: an average distance between a (i) data point i and other data points in the same category. b (i) average distance between data point i and the nearest other class of data points. The profile coefficient s (i) for data point i is calculated using the following formula: The value range of the profile coefficient s (i) is [ -1,1]: when s (i) is close to 1, the data point i is close to other data points in the same class, and is far from other data points in other classes, and the compactness and the separation of the clustering result are good. When s (i) approaches 0, it means that the data point i is quite distant from the data points of the same class and other classes, and the compactness and the separation of the clustering result are general. When s (i) approaches-1, it means that the data point i is closer to the data points of other categories, and further from the data points of the same category, and the compactness and the separation of the clustering result are poor. And calculating the average value of the contour coefficients of all the data points as an index of compactness and separation of the whole clustering result. Evaluating the overall performance of the clustering result: the overall performance of the clustering results was evaluated using the Calinski-Harabasz index (Calinski-Harabasz Index). The calculation formula of Calinski-Harabasz index is: /(I) Where ss_b is the sum of squares of the dispersion between the categories, ss_w is the sum of squares of the dispersion within the category, k is the number of categories of the cluster, and n is the total number of data points. Calculation step of ss_b: the center point of each class (i.e., the mean vector of all data points within the class) is calculated. The square of the distance of each class center point from the entire dataset center point is calculated and multiplied by the number of data points for that class. And summing the square products of the distances of all the categories to obtain SS_b. Calculation step of ss_w: for each category, the square of the distance of each data point within the category from the center point of the category is calculated. The squares of the distances within each category are summed to obtain ss_w for that category. The ss_w of all classes is summed to obtain the total ss_w. The larger the value of Calinski-Harabasz index, the larger the difference between the categories representing the clustering result, the smaller the intra-category difference, and the better the clustering performance.
And (3) intelligent defect detection, namely under the condition of less labeling data, using a transfer learning technology to quickly construct a defect detection model under the current process parameters by referring to welding defect detection models under other materials and process conditions. And inputting the preprocessed welding image into a model for online defect recognition, judging the quality of the welding surface, and providing real-time quality feedback. User portrait construction, collecting historical process parameter selection records of welding engineers, mining preference rules of the welding engineers on factors such as materials, thickness, welding methods and the like, and summarizing individual requirements of the engineers. Meanwhile, attention degree and quality standards of the engineers on different defect types are analyzed, and a multi-dimensional user characteristic portrait is constructed.
Building a process recommendation model, and building a ternary relation matrix R: and constructing a ternary relation matrix R of the user-process mode-defect detection result according to the user portrait, the process mode and the welding defect detection result. The dimension of the matrix R is m multiplied by n multiplied by l, wherein m is the number of users, n is the number of process modes, and l is the number of defect detection result categories. The element R (u, i, j) in the matrix R represents the defect detection result j corresponding to the welding operation of the user u in the process mode i. When the operation result of the user u in the process mode i is a defect detection result j, the value of r (u, i, j) is 1; otherwise, r (u, i, j) takes a value of 0, indicating that no knowledge or occurrence has occurred. Matrix decomposition: and decomposing the constructed ternary relation matrix R to obtain a user hidden factor matrix P, a process mode hidden factor matrix Q and a defect detection result hidden factor matrix Y. The decomposition formula is: r is approximately equal to mu+B u+Bi+Bj+P×QT +Y, wherein R is an m multiplied by n multiplied by l dimensional ternary relation matrix, m multiplied by n multiplied by l is a global bias term, B u is an m dimensional user bias term matrix, B i is an n dimensional process mode bias term matrix, and B j is an l dimensional defect detection result bias term matrix. P is m x k dimension user hidden factor matrix, k is hidden factor dimension, and potential characteristics of the user are represented; q is an n x k dimension process mode hidden factor matrix, which represents potential characteristics of the process mode; y is an l x k dimensional hidden factor matrix of the defect detection result, and represents potential characteristics of the defect detection result. Loss function and optimization: defining a loss function, measuring error and regularization term of matrix decomposition,Wherein L is a loss function,As an error term of matrix decomposition, λ (|p|| 2+||Q||2+||Y||2) is a regularized term for preventing overfitting. The hidden factor matrices P, Q and Y are solved using an optimization algorithm, such as random gradient descent (SGD) or Alternating Least Squares (ALS), to minimize the loss function. The welding process is recommended: and carrying out welding process recommendation on the new user and process mode by utilizing the hidden factor matrixes P, Q and Y obtained by training. For new user u new and process pattern i new, its value r (u new,inew,jnew) on defect detection result j new is predicted: And recommending optimal welding process parameter combinations according to the predicted values, so that the defect detection result of the welding operation in the process mode is optimal. A threshold may be set and process modes with predicted values above the threshold are used as recommended candidates for reference and selection by the user. Model evaluation and optimization: the data set is divided into a training set and a testing set by using methods such as cross-validation or leave-one-out method, and the performance of the recommended model is evaluated. And calculating evaluation indexes such as Root Mean Square Error (RMSE), mean Absolute Error (MAE), accuracy and the like, and measuring the accuracy and reliability of the recommended result. And according to the evaluation result, adjusting the hyper-parameters of the model, such as hidden factor dimension k, regularization coefficient lambda and the like, and optimizing the recommendation performance. And continuously iterating and optimizing until a satisfactory recommended effect is achieved.
And correcting a decomposition formula: correcting the original decomposition formula to obtain a new decomposition formula: r (u, i, j) ≡μ+b u+bi+bj+pu T×qi+yj, where μ is a global bias term, b u is a bias term of user u, b i is a bias term of process pattern i, and b j is a bias term of defect detection result j. p u is the hidden factor vector of user u, q i is the hidden factor vector of process pattern i, and y j is the hidden factor vector of defect detection result j. Objective function and regularization: an objective function is defined for the sum of squares of errors for optimizing the hidden factor matrix P, Q, Y and the bias term b u、bi、bj: Wherein/> The difference between the predicted value and the true value is measured as the sum of squares term of the errors. /(I)Is a regularization term used to prevent overfitting. Lambda is a regularization parameter that controls the strength of the regularization term. The |· | represents the Frobenius norm of the matrix. /(I)L2 regularization term representing all user bias terms,/>L2 regularization term representing all process pattern bias terms,/>An L2 regularization term representing all defect detection result bias terms. Random gradient descent method optimization: and optimizing and solving the objective function by adopting a random gradient descent method (SGD). Randomly selecting a training sample (u, i, j) and calculating an error between the predicted value and the true value: calculating the gradient of each parameter according to the error value: /> Updating each parameter according to the gradient value: /(I) Wherein eta is the learning rate and controls the step length of parameter updating. Repeating the steps until convergence or maximum iteration times are reached. Alternate least squares optimization: and (5) adopting an alternate least squares method (ALS) to perform optimization solution on the objective function. Fixing other parameters, and optimizing a user hidden factor matrix P: p' = (Q T×Q+λ×I)-1×(R1-u-Bu-Bi-Bj -Y), other parameters are fixed, and the process mode hidden factor matrix Q is optimized: q= (P T×P+λ×I)-1×(R2-u-Bu-Bi-Bj -Y). Fixing other parameters, and optimizing a hidden factor matrix Y of a defect detection result: /(I)Fixing other parameters, optimizing the user bias term b u: fixing other parameters, optimizing the process mode bias term b i: Fixing other parameters, and optimizing a defect detection result bias term b j: Wherein I is an identity matrix, R 1、R2、R3 is a slice of the matrix R in different dimensions, P u、Qi、Yj is a row vector of the matrix P, Q, Y, and n u、ni、nj is the number of occurrences of the user u, the process pattern I, and the defect detection result j, respectively. Repeating the steps, and alternately optimizing each parameter until convergence or the maximum iteration number is reached. Model training and recommendation: and optimizing an objective function by using a training data set through a random gradient descent method or an alternating least square method to obtain an optimal hidden factor matrix P, Q, Y and a bias term b u、bi、bj. For new user u new and process pattern i new, its value on defect detection result j new is predicted: /(I) And recommending optimal welding process parameter combinations according to the size of the predicted value.
Predicting probability distribution of defect detection results: and predicting the probability distribution of the defect detection result of the given user in the given process mode by using the optimal hidden factor matrix P, Q, Y and the bias term b u、bi、bj obtained through training. The predictive formula is:Wherein r (u,i,j) represents the predicted value of the defect detection result j of the user u in the process mode i. Mu is a global bias term, b u is a bias term corresponding to a user u, b i is a bias term corresponding to a process mode i, and b j is a bias term corresponding to a defect detection result j. p u is the hidden factor vector corresponding to the user u, q i is the hidden factor vector corresponding to the process pattern i, and y j is the hidden factor vector corresponding to the defect detection result j. For a given user u and process pattern i, calculating predicted values r (u,i,j) of all possible defect detection results j to obtain probability distribution of the defect detection results of the user in the process pattern. Calculating potential preferences of the user for the process mode: and calculating the potential preference of the user u to the process mode i according to the predicted probability distribution of the defect detection result. The preference value calculation formula is: reference (u, i) = Σjxr (u,i,j)×vj, where v j is the utility value of the defect detection result j, which can be flexibly set according to the service requirement. The utility value v_j may be determined according to factors such as the severity of the defect detection result, the influence on the welding quality, and the like. For example, different utility values may be set for different types of defect detection results, such as a defect-free utility value of 1, a slight defect utility value of 0.8, a severe defect utility value of 0.2, etc. The potential Preference value reference (u, i) of the process pattern i by the user u is calculated, i.e. the predicted probability distribution of the defect detection result is weighted and summed with the corresponding utility value. Generating a process mode recommendation result: for a given user u, its potential Preference value reference (u, i) for all process modes is calculated. And sequencing the process modes according to the potential preference values to obtain a process mode preference sequencing result of the corresponding user. The combination of process modes with the highest potential preference value, i.e. the process mode of the first few bits in the ranking result, is recommended to the user. The number of recommended process modes may be set according to business needs, such as recommending the first three process modes with the highest potential preference values. User u 1, process pattern i 1、i2、i3, defect detection results j 1 (no defect), j 2 (slight defect), j 3 (severe defect), corresponding utility values v j1=1、vj2=0.8、vj3 =0.2, respectively. Predicting probability distribution of defect detection results of a user u 1 under different process modes by using a hidden factor matrix and bias terms obtained through training: Calculating potential preference values :Preference(u1,i1)=0.7+0.2×0.8+0.1×0.2=0.88,Preference(u1,i2)=0.5+0.3×0.8+0.2×0.2=0.78,Preference(u1,i3)=0.6+0.3×0.8+0.1×0.2=0.86. for user u 1 for different process modes ranks the process modes according to the potential preference values: i 1>i3>i2, recommending the process mode combination with the highest potential preference value, i.e. i 1 and i 3, to the user u 1.
And dynamically recommending and optimizing, wherein each process mode is regarded as a slot machine arm, and the user's acceptance feedback of the recommended process is regarded as the reward of the slot machine. The utilization and exploration of recommendations are balanced using an Epsilon-Greedy algorithm: utilization (Exploitation): and selecting the process mode with the highest current rewarding estimated value by the probability 1-epsilon for recommendation. Exploration (Exploration): the process patterns are randomly selected with probability epsilon to make recommendations to find potential good quality process combinations. The exploration probability epsilon is dynamically adjusted, a higher exploration probability is set in an initial stage, the exploration probability is gradually reduced along with the increase of the recommended times, and the utilization and exploration are balanced. Prize estimation and update: for each process pattern i, its prize estimate Q (i) and the number of times N (i) selected are maintained. Initially, the estimated prize value Q (i) for all process modes is set to 0, and the selected number N (i) is set to 0. When the process pattern i is recommended to the user and a feedback prize r is obtained, updating its prize estimation value and the number of selected times: N (i) '=n (i) +1, and the prize r may be set according to the user's acceptance of the recommendation process, for example, a prize of 1 for accepting recommendation and a prize of 0 for not accepting recommendation. The prize estimates Q (i) and the selected times N (i) for all process modes are initialized. An initial search probability epsilon is set, e.g., epsilon=0.2. For each recommendation request: and selecting the process mode with the highest current rewarding estimated value by the probability 1-epsilon for recommendation (utilization). The process mode is randomly selected with probability epsilon for recommendation (exploration). And obtaining feedback rewards r of the user for the recommended process. The prize estimate value Q (i) and the number of selections N (i) for the selected process mode are updated. The search probability epsilon is dynamically adjusted, for example, the value of epsilon is reduced at regular intervals of recommendation requests. With process patterns i1, i2, i3, initial prize estimate Q (i 1)=Q(i2)=Q(i3) =0, selected times N (i 1)=N(i2)=N(i3) =0. Initial exploration probability epsilon=0.2 is set. First recommendation: the process pattern i2 is randomly selected for recommendation (exploration). The user accepted the recommendation and obtains a prize r=1. Updating the prize estimation value and the selected number of times of i 2: q (i 2)=1,N(i2) =1. Second recommendation: and selecting the process mode i2 with the highest current reward estimation value with the probability of 0.8 for recommendation (utilization). The user does not accept the recommendation and gets the prize r=0. Updating the prize estimation value and the selected number of times of i 2: q (i 2)=0.5,N(i2) =2. Third recommendation: the process pattern i 3 is randomly selected with a probability of 0.2 for recommendation (exploration). The user accepted the recommendation and obtains a prize r=1. Updating the prize estimation value and the selected number of times of i 3: q (i 3)=1,N(i3) =1.
And when a new welding task arrives, extracting key process parameters according to the task requirements, inputting the key process parameters into a trained recommendation model, and generating a series of candidate process parameter combinations. And then, combining the feature portraits of the current user, predicting the suitability of each candidate process and the potential defect risk, and selecting the process parameter combination with the highest user preference and the lowest defect risk to form a final recommended result. And feeding back and updating the defects, applying the recommended technological parameters to actual welding production, and evaluating the welding surface quality through a defect detection model. If the quality defect is found, the association between the recommended process and the defect is recorded and fed back to the process recommendation model. And continuously training and optimizing the recommendation model by using the feedback data, and continuously improving the accuracy and effectiveness of process recommendation. Meanwhile, a new process defect sample is supplemented to the training data set, a defect detection model is updated, and iterative updating of the whole system is achieved.

Claims (10)

1. A steel structure welding process quality management recommendation method based on big data processing comprises the following steps:
acquiring image data and real-time data in a welding process, wherein the real-time data comprises welding current, welding voltage and welding speed;
Marking the image data, and marking the position and type of the welding defect; synchronizing the marked image data with corresponding real-time data to generate a data set with a label;
Preprocessing the labeled data set, wherein the preprocessing comprises image enhancement, and a preprocessed data set is generated;
extracting key features according to the preprocessing data set, wherein the key features comprise material types, thicknesses and welding methods, and generating a feature data set;
Performing cluster analysis on the characteristic data set to obtain different welding parameters and process modes under environmental conditions;
Establishing a welding model through transfer learning according to the pretreatment data set and the characteristic data set, and detecting welding defects;
Constructing a user portrait according to the historical behaviors and preferences of the user;
establishing a recommendation model by combining the user portrait, the process mode and the welding defect detection result, and recommending the welding process;
and optimizing a recommended result through a multi-arm slot machine strategy according to the identified process mode and the recommended welding process.
2. The steel structure welding process quality management recommendation method based on big data processing according to claim 1, wherein the method comprises the following steps:
image enhancement, comprising:
Dividing the labeled dataset into a plurality of partial windows;
calculating a cumulative distribution function CDF of pixel gray values in each local window, mapping the CDF into a designated dynamic range, wherein the mapped gray value range is 0 to 255, and the mapping function is as follows:
Wherein i is an original gray value, CDF (i) is an accumulated distribution function value corresponding to the gray value i, CDF_min and CDF_max are respectively a minimum value and a maximum value of CDF in a local window, and round is a rounding function;
The mapping result of the adjacent local windows is smoothly transited by adopting a bilinear interpolation method, the interpolation coefficient is calculated according to the overlapping rate of the local windows, and the calculation formula is as follows:
coefficient=1-overlap_ratio
Wherein window_size is the size of a local window, stride is the step size between adjacent local windows, overlap_ratio is the overlap ratio of the local windows, and coeffient is the interpolation coefficient.
3. The steel structure welding process quality management recommendation method based on big data processing according to claim 2, wherein the method is characterized by comprising the following steps of:
Image enhancement, further comprising:
the contrast and entropy of the gray value of the pixel in each local window are calculated, and a contrast calculation formula is as follows:
wherein, max_gray and min_gray are the maximum value and the minimum value of the pixel gray value in the local window respectively;
The entropy calculation formula is:
entropy=-∑(p×log2(p))
wherein p is the probability of each gray value in the local window;
Adjusting the size and the overlapping rate of the local window according to the contrast and the entropy value;
When the contrast is smaller than a preset contrast threshold value and the entropy value is smaller than a preset entropy value threshold value, the size of the local window is increased, and the overlapping rate is reduced; when the contrast is larger than a preset contrast threshold value and the entropy value is larger than a preset entropy value threshold value, the size of the local window is reduced, and the overlapping rate is increased;
and combining the mapping results and interpolation results of all the local windows to obtain image data with enhanced contrast.
4. The steel structure welding process quality management recommendation method based on big data processing according to claim 3, wherein the method comprises the following steps:
Performing cluster analysis on the feature data set, including:
Carrying out normalization processing on the feature data set by adopting a minimum-maximum normalization method, and scaling the value range of each feature in the feature data set to be within a range of 0 to 1 to obtain a normalized feature data set;
Dividing the normalized characteristic data set into a training set and a verification set, wherein the training set is used for characteristic selection, and the verification set is used for evaluating the clustering performance of the characteristic set;
Initializing a candidate feature subset as an empty set, initializing an optimal feature subset as a full set, and taking the normalized feature data set as an initial candidate feature subset;
Repeating the following steps until the size of the optimal feature subset reaches a preset feature quantity threshold k:
adding each candidate feature in the candidate feature subsets into the current optimal feature subset to obtain a new feature subset;
training a clustering model on the training set by adopting a new feature subset to obtain a clustering result;
clustering is carried out on the verification set by adopting a clustering model obtained through training, and clustering performance is evaluated;
Selecting the features which are added and enable the clustering performance to be improved to the greatest extent, removing the features from the candidate feature subsets, and adding the optimal feature subsets to obtain a new optimal feature subset and a new candidate feature subset;
if the clustering performance of the current candidate feature subset is better than that of the optimal feature subset, updating the current candidate feature subset into the optimal feature subset;
And outputting an optimal feature subset, wherein the optimal feature subset comprises the first k features with the greatest influence on the clustering result.
5. The steel structure welding process quality management recommendation method based on big data processing according to claim 4, wherein the method comprises the following steps:
performing cluster analysis on the feature data set, further comprising:
Calculating the kernel density estimation of the optimal feature subset, wherein the kernel density estimation adopts a Gaussian kernel function, and the bandwidth parameter of the kernel density estimation is determined by adopting a Silverman's rule of thumb method;
selecting the data point with the highest density as a first clustering center according to the result of the kernel density estimation;
Calculating the distance between each data point in the optimal characteristic subset and the first clustering center, wherein the distance calculation formula is as follows:
Wherein x is a feature vector of a data point, c is a feature vector of a cluster center, and Σ is a covariance matrix of a feature data set;
According to the calculated distance, calculating the probability that each data point is selected as the next cluster center, wherein the probability calculation formula is as follows:
wherein d (x) is the distance of data point x from the selected cluster center;
according to the calculated probability, adopting Roulette Wheel Selection method to randomly select a new data point as the next clustering center;
repeating the steps until k cluster centers are selected.
6. The steel structure welding process quality management recommendation method based on big data processing according to claim 5, wherein the method comprises the following steps:
performing cluster analysis on the feature data set, further comprising:
calculating the membership degree of each data point in the optimal characteristic subset belonging to each cluster center, wherein the membership degree calculation formula is as follows:
Wherein c i is the ith clustering center, m is a coefficient, and the hardness degree of the clusters is controlled;
Updating the position of the clustering center according to the membership degree of the data points, wherein the formula for updating the position of the clustering center is as follows:
Wherein u (x, c) is the membership degree of data point x to the clustering center c, x is the feature vector of the data point, and c is the feature vector of the clustering center;
repeating the steps until the change of the clustering center is smaller than a preset threshold value or the maximum iteration number is reached.
7. The steel structure welding process quality management recommendation method based on big data processing according to claim 6, wherein the method comprises the following steps:
Evaluating clustering performance, comprising:
The compactness and the separation of the clustering results are evaluated by adopting the following formula:
Wherein a (i) is the average distance between data point i and other data points in the same class, and b (i) is the average distance between data point i and the nearest data point in other classes; the value range of s (i) is-1 to 1, and the larger the value of s (i) is, the better the compactness and the separation degree of the clustering result are;
the overall performance of the clustering results was evaluated using the following formula:
Wherein ss_b is the sum of squares of the dispersion between the categories, ss_w is the sum of squares of the dispersion inside the category, k is the number of categories of the cluster, and n is the total number of data points; the larger the CH value is, the larger the difference between the categories representing the clustering result is, the smaller the difference inside the category is, and the better the clustering performance is.
8. The steel structure welding process quality management recommendation method based on big data processing according to any one of claims 1 to 7, wherein:
establishing a recommendation model by combining the user portrait, the process mode and the welding defect detection result, and recommending the welding process, wherein the method comprises the following steps of:
constructing a ternary relation matrix R of a user-process mode-defect detection result, wherein an element R (u, i, j) in the matrix R represents a defect detection result j corresponding to welding operation of the user u in a process mode i, a value of R (u, i, j) is1, an operation result of the user in the corresponding process mode is j, and a value of 0 represents unknown or non-occurrence;
decomposing the constructed ternary relation matrix R to obtain a user hidden factor matrix P, a process mode hidden factor matrix Q and a defect detection result hidden factor matrix Y, wherein the decomposition formula is as follows:
R≈μ+Bu+Bi+Bj+P×QT+Y
Wherein R is m×n×lm×n×l three-dimensional relation matrix, m is the number of users, n is the number of process modes, and l is the number of defect detection result categories; p is m x k dimension user hidden factor matrix, k is hidden factor dimension; q is an n x k dimension process mode hidden factor matrix; y is an l x k dimensional defect detection result hidden factor matrix; b u is an m-dimensional user bias term matrix, B i is an n-dimensional process mode bias term matrix, and B j is an l-dimensional defect detection result bias term matrix; μ is the global bias term.
9. The steel structure welding process quality management recommendation method based on big data processing according to claim 8, wherein the method comprises the following steps:
establishing a recommendation model by combining the user portrait, the process mode and the welding defect detection result, and recommending the welding process, and further comprising:
the decomposition formula is modified by the following formula:
r(u,i,j)≈μ+bu+bi+bj+pu T×qi+yj
Wherein μ is a global bias term, b u is a bias term of user u, b i is a bias term of process mode i, b j is a bias term of defect detection result j, p u is a hidden factor vector of user u, q i is a hidden factor vector of process mode i, and y j is a hidden factor vector of defect detection result j;
The stochastic gradient descent method is adopted to minimize the error square sum, the hidden factor matrix P, Q, Y and the bias term b u、bi、bj are optimized, and the objective function of the error square sum is as follows:
wherein lambda is a regularization parameter, |·| represents the Frobenius norm of the matrix, L2 regularization term representing all user bias terms,/>L2 regularization term representing all process pattern bias terms,/>An L2 regularization term representing all defect detection result bias terms;
And (3) carrying out optimization solution on the objective function by adopting an alternating least square method, alternately fixing part of parameters, optimizing other parameters, and carrying out iterative optimization until convergence to obtain an optimal hidden factor matrix P, Q, Y and an offset term b u、bi、bj.
10. The steel structure welding process quality management recommendation method based on big data processing according to claim 9, wherein the method comprises the following steps:
establishing a recommendation model by combining the user portrait, the process mode and the welding defect detection result, and recommending the welding process, and further comprising:
And predicting the probability distribution of the defect detection result of the given user in the given process mode by utilizing the optimal hidden factor matrix P, Q, Y and the bias term b u、bi、bj obtained by training, wherein a prediction formula is as follows:
r(u,i,j)=μ+bu+bi+bj+pu T×qi+yj
Wherein r (u,i,j) represents the predicted value of the defect detection result j of the user u in the process mode i; μ is the global bias term; b u is a bias term corresponding to a user u, b i is a bias term corresponding to a process mode i, and b j is a bias term corresponding to a defect detection result j; p u is a hidden factor vector corresponding to a user u, q i is a hidden factor vector corresponding to a process mode i, and y j is a hidden factor vector corresponding to a defect detection result j;
According to the predicted probability distribution of the defect detection result, calculating the potential preference of the user u to the process mode i, wherein the preference value calculation formula is as follows:
Preference(u,i)=∑j×r(u,i,j)×vj
Wherein v j is the utility value of the defect detection result j, and can be flexibly set according to the service requirement;
And for a given user, according to the ranking of the potential preference values of different process modes, obtaining a process mode preference ranking result of the corresponding user, and recommending a process mode combination with the highest potential preference value for the user.
CN202410334260.6A 2024-03-22 2024-03-22 Steel structure welding process quality management recommendation method based on big data processing Pending CN118132849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410334260.6A CN118132849A (en) 2024-03-22 2024-03-22 Steel structure welding process quality management recommendation method based on big data processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410334260.6A CN118132849A (en) 2024-03-22 2024-03-22 Steel structure welding process quality management recommendation method based on big data processing

Publications (1)

Publication Number Publication Date
CN118132849A true CN118132849A (en) 2024-06-04

Family

ID=91237464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410334260.6A Pending CN118132849A (en) 2024-03-22 2024-03-22 Steel structure welding process quality management recommendation method based on big data processing

Country Status (1)

Country Link
CN (1) CN118132849A (en)

Similar Documents

Publication Publication Date Title
CN109117883B (en) SAR image sea ice classification method and system based on long-time memory network
Huang A hybrid particle swarm optimization approach for clustering and classification of datasets
CN106407464A (en) KNN-based improved missing data filling algorithm
CN110968618B (en) Method for mining quantitative association rule of welding parameters and application
CN112529683A (en) Method and system for evaluating credit risk of customer based on CS-PNN
CN115471739A (en) Cross-domain remote sensing scene classification and retrieval method based on self-supervision contrast learning
CN113837266B (en) Software defect prediction method based on feature extraction and Stacking ensemble learning
CN116029604B (en) Cage-raised meat duck breeding environment regulation and control method based on health comfort level
CN117076691A (en) Commodity resource knowledge graph algorithm model oriented to intelligent communities
CN111221915B (en) Online learning resource quality analysis method based on CWK-means
CN115201394B (en) Multi-component transformer oil chromatography online monitoring method and related device
CN116933947A (en) Landslide susceptibility prediction method based on soft voting integrated classifier
CN118132849A (en) Steel structure welding process quality management recommendation method based on big data processing
CN116383747A (en) Anomaly detection method for generating countermeasure network based on multi-time scale depth convolution
CN116304941A (en) Ocean data quality control method and device based on multi-model combination
US20230367995A1 (en) System and method for an adjustable neural network
CN114266337A (en) Intelligent tobacco leaf grading model based on residual error network and grading method using model
CN112347162A (en) Multivariate time sequence data rule mining method based on online learning
CN115100322B (en) Line element self-adaptive simplification method and device for supervised learning supported multi-reduction algorithm cooperation
Zakeri et al. Automation and Computational Intelligence for Road Maintenance and Management: Advances and Applications
Arsirii et al. Heuristic models and methods for application of the kohonen neural network in the intellectual system of medical-sociological monitoring
CN115169617B (en) Mold maintenance prediction model training method, mold maintenance prediction method and system
CN118093969B (en) Expressway asset data visualization method and system based on digital twinning
CN118037137B (en) Method for determining product quality accident number based on convolutional neural network
CN118012977B (en) AI and GIS fusion-based two-dimensional multi-mode data processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination