A method, system, medium of constructing a weld quality diagnostic model
By collaborating between central equipment and enterprise equipment to build a welding quality diagnostic model, and using a loss function to balance sample imbalance and data coverage differences, the model solves the problems of generalization and data silos, achieving high-accuracy welding quality diagnosis.
Patent Information
- Application Number
- CN202211332928.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-10-28
AI Technical Summary
Existing welding quality diagnostic models have poor generalization ability and cannot achieve true welding quality diagnosis in engineering applications. Furthermore, the problem of data silos among enterprises makes data sharing difficult, affecting the accuracy and efficiency of the models.
A welding quality diagnostic model is built by collaborating between central equipment and equipment from multiple enterprises. Welding sharing information is used to determine the first and second parameters to construct a loss function. Each enterprise's equipment builds its own model based on local data and the loss function, ensuring data privacy while improving model accuracy.
While ensuring data privacy, the accuracy of the welding quality diagnostic model has reached the level of the model trained on the full dataset, breaking down data silos and improving the model's performance and efficiency.
Smart Images

Figure CN115599653B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of welding analysis, and in particular to a technique for constructing a welding quality diagnostic model. Background Technology
[0002] Resistance welding is a fully automated manufacturing process that joins metal materials using heat generated by current and resistance. It is widely used in automobile production, and welding quality directly impacts vehicle reliability and safety. To ensure overall vehicle quality, welding quality assessment is typically required during production. Traditional welding quality inspection methods are destructive and non-destructive. Destructive testing usually measures weld diameter and tensile shear strength, both of which require destructive methods to obtain relatively accurate results, such as disassembling the entire vehicle body. Non-destructive testing primarily uses ultrasonic and X-ray inspections, requiring specialized hardware. Both methods face challenges of high cost and low efficiency in quality measurement. Furthermore, the industry is exploring AI applications for welding quality diagnosis, achieving good accuracy through experiments and simulations. However, in engineering applications, limitations in real-world data acquisition and small sample sizes result in poor generalization of welding quality diagnostic models, preventing them from fully realizing true welding quality diagnosis. Summary of the Invention
[0003] One objective of this application is to provide a method, system, or medium for constructing a welding quality diagnostic model.
[0004] According to one aspect of this application, a method for constructing a welding quality diagnostic model is provided. This method is applied to a welding quality diagnostic system, which includes a central device and one or more enterprise devices. The method includes:
[0005] The central equipment determines a first parameter and a second parameter based on welding sharing information, and constructs a loss function using the first parameter and the second parameter, and sends the loss function to the one or more enterprise equipment;
[0006] Each of the one or more enterprise equipment determines a corresponding welding quality diagnostic model based on the loss function and the welding sample data corresponding to that enterprise equipment.
[0007] According to one aspect of this application, a welding quality diagnostic system is provided, including a central device, one or more enterprise devices, a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method for constructing a welding quality diagnostic model as described above.
[0008] According to one aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method described above.
[0009] According to one aspect of this application, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the steps of the method described above.
[0010] Compared with existing technologies, this application constructs a welding quality diagnosis system. A central device in this system determines first and second parameters based on shared welding information. A loss function is constructed using these first and second parameters and sent to one or more enterprise devices within the system. Each enterprise device determines its corresponding welding quality diagnosis model based on the loss function and its corresponding welding sample data. This application connects various enterprise devices through the central device, allowing each device to participate in the construction of the welding quality diagnosis model based on its locally stored welding data. This results in a welding quality diagnosis model with accuracy comparable to models trained on full data, while eliminating the need for enterprise devices to share confidential welding sample data. This approach protects the privacy of welding data across enterprise devices while breaking down data silos and collectively improving the performance of the welding quality diagnosis model. Attached Figure Description
[0011] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0012] Figure 1 This diagram illustrates a system topology according to one embodiment of the present application;
[0013] Figure 2 This diagram illustrates a method for constructing a welding quality diagnostic model according to an embodiment of the present application.
[0014] Figure 3 Exemplary systems that can be used to implement the various embodiments described in this application are shown.
[0015] The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation
[0016] The present application will now be described in further detail with reference to the accompanying drawings.
[0017] In a typical configuration of this application, the terminal, the device of the service network, and the trusted party all include one or more processors (e.g., a central processing unit (CPU)), input / output interfaces, network interfaces, and memory.
[0018] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory. Memory is an example of computer-readable media.
[0019] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PCM), programmable random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0020] The devices referred to in this application include, but are not limited to, user equipment, network equipment, or devices composed of user equipment and network equipment integrated through a network. The user equipment includes, but is not limited to, any mobile electronic product capable of human-computer interaction (e.g., via a touchpad), such as smartphones and tablets. These mobile electronic products can use any operating system, such as Android or iOS. The network equipment includes an electronic device capable of automatically performing numerical calculations and information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), and embedded devices. The network equipment includes, but is not limited to, computers, network hosts, single network servers, multiple network server clusters, or clouds composed of multiple servers. Here, a cloud consists of a large number of computers or network servers based on cloud computing, where cloud computing is a type of distributed computing, consisting of a virtual supercomputer composed of a group of loosely coupled computer clusters. The network includes, but is not limited to, the Internet, wide area network, metropolitan area network, local area network, VPN network, wireless ad hoc network, etc. Preferably, the device can also be a program running on the user equipment, network device, or a device formed by integrating user equipment and network device, network device, touch terminal, or network device and touch terminal through a network.
[0021] Of course, those skilled in the art should understand that the above-described devices are merely examples, and other existing or future devices that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0022] In the description of this application, "multiple" means two or more, unless otherwise expressly and specifically defined.
[0023] Figure 1A system topology diagram for constructing a welding quality diagnostic model according to an embodiment of this application is shown. The system topology diagram includes a central device and multiple enterprise devices. These enterprise devices belong to different enterprises or institutions with welding quality diagnostic needs. These enterprises or institutions often have the same or similar welding operations, and the welding data they generate often have the same type of welding characteristic data. For example, they can all extract welding characteristic data such as local peak values, local valley values, and peak times from welding dynamic resistance information. Each enterprise device can process all its welding sample data locally to obtain corresponding welding sharing information that can be shared externally, and then upload this welding sharing information to the central device. The central device can be managed by any of the aforementioned enterprises or institutions, or by an independent third-party enterprise or institution. The central device constructs a corresponding loss function based on the welding sharing information uploaded by each enterprise device and returns the loss function to each enterprise device. Each enterprise device then constructs a welding quality diagnostic model based on this loss function. This central device connects the equipment of various enterprises, allowing each enterprise's equipment to participate in the construction of the welding quality diagnostic model based on its locally stored welding data. This results in a welding quality diagnostic model with an accuracy comparable to the model trained on the full dataset. Furthermore, the enterprise equipment does not need to share confidential welding sample data with external parties. This approach ensures the privacy of welding data from each enterprise's equipment while breaking down data silos and collectively improving the performance of the welding quality diagnostic model.
[0024] refer to Figure 1 The system shown, Figure 2 This diagram illustrates a method for constructing a welding quality diagnostic model according to an embodiment of this application. The method is applied to a welding quality diagnostic system, which includes a central device and one or more enterprise devices. The method includes steps S11 and S12. In step S11, the central device determines a first parameter and a second parameter based on welding sharing information, constructs a loss function using the first parameter and the second parameter, and sends the loss function to the one or more enterprise devices. In step S12, each of the one or more enterprise devices determines a corresponding welding quality diagnostic model based on the loss function and the welding sample data corresponding to that enterprise device.
[0025] In step S11, the central equipment determines the first parameter and the second parameter based on the welding sharing information, constructs a loss function using the first parameter and the second parameter, and sends the loss function to the one or more enterprise equipment.
[0026] In some embodiments, to make the predicted values generated by the welding quality diagnostic model closer to the true values, a loss function is used to measure the degree of difference between the model's predicted values and the true values. The model can then update its parameters through backpropagation based on this difference to reduce the loss between the true and predicted values. However, welding quality diagnostic scenarios suffer from an imbalance of positive and negative samples; furthermore, the welding sample data used by different companies covers different working conditions (e.g., these welding sample data may come from a few working conditions (e.g., multiple welding sample data all come from the welding position on the edge of a car door, with basically the same working conditions, only slight differences in location), or cover all working conditions), and the difficulty of distinguishing samples varies, making it difficult for general loss functions to adapt to welding quality diagnostic scenarios. Therefore, this solution introduces a first parameter and a second parameter to construct a loss function to solve the above problems. The loss function is constructed as follows:
[0027]
[0028] Wherein, α is the first parameter, β is the second parameter, and y is the sample label information of the welding sample data (e.g., positive samples y=1, negative samples y=0). This represents the predicted value corresponding to the welding sample data. The first parameter is used to balance the uneven proportion of positive and negative samples in the welding sample data. The second parameter is used to adjust the difficulty level of the welding sample data, reducing the loss of easily classified samples, so that the model training focuses more on difficult and misclassified samples.
[0029] In some embodiments, the central device determines the first and second parameters based on welding sharing information by: each of the one or more enterprise devices sending its corresponding welding sharing information to the central device, the welding sharing information including the positive and negative sample ratio information of the welding sample data corresponding to the enterprise device and the validation set accuracy information corresponding to the welding sample data; the central device determining the first and second parameters based on the welding sharing information sent by each of the one or more enterprise devices. For example, to ensure optimal training results, the first and second parameters need to be determined in conjunction with the actual welding business situation. The central device collects the welding sharing information sent by all enterprise devices participating in the construction of the welding quality diagnostic model and determines the corresponding first and second parameters based on this. The welding sharing information is determined by each enterprise device through processing its local welding sample data, and each enterprise device only sends the processed welding sharing information to the central device, achieving information sharing while ensuring that the original welding data is not leaked.
[0030] In some embodiments, the central device determines the first parameter and the second parameter based on the welding sharing information sent by each of the one or more enterprise devices, including: the central device determines the first parameter based on the positive and negative sample ratio information of the welding sample data corresponding to each of the one or more enterprise devices; and the central device determines the second parameter based on the validation set accuracy information corresponding to the welding sample data corresponding to each of the one or more enterprise devices.
[0031] In some embodiments, the positive and negative sample ratio information of the welding sample data sent by each enterprise device includes the number of negative samples corresponding to the enterprise's welding sample data and the total amount of welding sample data, or the total amount of welding sample data and the ratio of the number of negative samples to the total amount of welding sample data, or other information that can be used to determine the proportion of positive and negative samples in the welding sample data of the enterprise device. The central device can determine the ratio of the total amount of negative samples corresponding to the welding sample data used for model training of all enterprise devices to the total amount of all welding sample data based on the positive and negative sample ratio information of the welding sample data corresponding to each enterprise device, and use this ratio information as the first parameter. If the number of negative samples in the welding sample data is much smaller than the number of positive samples, the first parameter is often small. Referring to the aforementioned loss function FL, the contribution of positive sample loss can be reduced and the contribution of negative sample loss can be increased through the first parameter, so that the trained model pays more attention to the smaller number of negative samples. Conversely, if the number of positive samples in the welding sample data is much smaller than the number of negative samples, the first parameter is often large, and the corresponding contribution of positive sample loss is also high, so that the trained model pays more attention to the smaller number of positive samples. This first parameter can be used to balance the imbalance between positive and negative classes in the welding sample data, thereby improving the diagnostic performance of the constructed welding quality diagnostic model for fewer sample classes.
[0032] In some embodiments, the method further includes step S13 (not shown), in which each of the one or more enterprise devices is trained using a logistic regression algorithm based on the welding sample data corresponding to that enterprise device to determine the validation set accuracy information corresponding to the welding sample data.
[0033] In some embodiments, each enterprise's equipment trains a logistic regression model locally using corresponding welding sample data and determines the corresponding validation set accuracy information (Val_acc). This validation set accuracy information is then sent to the central equipment. The central equipment averages the validation set accuracy information sent by each enterprise's equipment to determine the average value; then, based on this average value, a second parameter β>0 is determined. Referring to the aforementioned loss function FL, for positive samples, if the sample is easy to classify, its predicted value... Approaching its true value of 1, accordingly, If the value approaches 0, the calculated loss function value will also be very small; if the sample classification is difficult and prone to misclassification, its predicted value will be low. Often smaller, correspondingly, The value approaches 1, thus increasing the weight of inaccurately classified samples in the loss function. The judgment is similar for negative samples; if a sample is easily classified, its predicted value... Approaching its true value of 0, correspondingly, If the value approaches 0, the calculated loss function value will also be very small; if the sample classification is difficult and prone to misclassification, its predicted value will be low. Often larger It approaches 1. This reduces the influence of simple samples in the welding sample data, allowing the model training to focus more on difficult and misclassified samples.
[0034] In some embodiments, the method further includes step S14 (not shown), whereby each of the one or more enterprise devices determines the welding sample data corresponding to that enterprise device. In some embodiments, the welding sample data includes welding feature data and corresponding sample label information. In some embodiments, the data in the welding sample data are integrated in the form of a wide table of welding sample data as shown in Table 1 below. Each row of data in the table corresponds to a data sample in the welding sample data, and each data sample includes multiple types of welding feature data and corresponding sample labels. The wide table structure formed by each enterprise device is consistent. The welding feature data includes dynamic resistance feature data and process information data. The dynamic resistance feature data includes, but is not limited to, the local peak value (WeldMax), local valley value (WeldMin), peak time (WeldMnPo), valley to peak time (WeldMxPo), rise rate (WeldUpSlope), end value (WeldEndValue), and fall rate (WeldDownSlope) corresponding to the dynamic resistance information obtained during the welding process. The process information data includes, but is not limited to, the cumulative number of welding points since the last mold repair (WearCount), the current mold repair number of the welding torch (DressCount), and the current program number (ProgNo).
[0035] Table 1 Welding Sample Data (Wide Table)
[0036]
[0037] In some embodiments, step S14 includes: step S141 (not shown), where each of the one or more enterprise devices acquires the original welding data in the welding production process corresponding to that enterprise device; step S142 (not shown), where each of the one or more enterprise devices determines the welding sample data corresponding to that enterprise device based on the original welding data corresponding to that enterprise device.
[0038] In some embodiments, each enterprise's equipment can collect data on core parameters of resistance welding quality, such as sound, resistance, displacement, and pressure, to obtain raw welding data during the welding production process of the corresponding enterprise or institution. In some embodiments, considering the convenience and cost of data collection during actual welding production, the enterprise's equipment can primarily collect dynamic resistance information and weld point process information during real-time welding, using this information as raw welding data. The weld point process information includes, but is not limited to, mold repair information, electrode cap replacement information, weld point sequence number, and welding procedure number. The enterprise's equipment extracts corresponding welding feature data from the acquired raw welding data as welding sample data corresponding to that enterprise's equipment.
[0039] In some embodiments, step S142 includes: each of the one or more enterprise devices performing data preprocessing on the original welding data corresponding to the enterprise device to obtain corresponding target welding data; and each of the one or more enterprise devices determining welding sample data corresponding to the enterprise device based on the target welding data corresponding to the enterprise device.
[0040] In some embodiments, the raw welding data collected by various enterprise equipment may contain quality issues such as burrs, drift, missing data, and outliers. To avoid the impact of these issues on the accuracy of the trained welding quality diagnostic model, the enterprise equipment can first perform data preprocessing on the raw welding data to correct the corresponding data and obtain the corresponding target welding data. Then, based on the target welding data, corresponding features are extracted as welding sample data corresponding to the enterprise equipment. In some embodiments, the data preprocessing includes, but is not limited to, filtering the raw welding data (e.g., dynamic resistance information) to remove noise or spurious components from the signal, improve the signal-to-noise ratio, smooth the resistance curve, suppress interference signals, and share frequency components; or, using outlier detection, interpolation, and other methods to correct abnormal values and missing values in the raw welding data. In some embodiments, for the dynamic resistance information in the target welding data, the enterprise equipment can extract features such as local peaks, local valleys, peak times, valley-to-peak times, rise rates, endpoint values, and fall rates based on the morphological characteristics and physical meaning of the dynamic resistance curve corresponding to the dynamic resistance information as the corresponding welding sample data. The enterprise equipment can also extract process information data such as the cumulative number of welding points since the last mold repair, the current number of mold repairs by the welding gun, and the current program number from the welding point process information as corresponding welding sample data.
[0041] In step S12, each of the one or more enterprise devices determines a corresponding welding quality diagnostic model based on the loss function and the welding sample data corresponding to that enterprise device. For example, after constructing the corresponding loss function, each enterprise device can determine the first-order gradient information and second-order gradient information of the welding sample data relative to the loss function. Combining the target splitting rule fed back by the central device, the welding sample data is divided to construct the corresponding welding quality diagnostic model.
[0042] In some embodiments, step S12 includes: step S121 (not shown), where each of the one or more enterprise devices determines the first-order gradient information and second-order gradient information corresponding to the welding sample data based on the loss function and the welding sample data corresponding to the enterprise device, and sends the first-order gradient information and the second-order gradient information to the central device; step S122 (not shown), where the central device determines the target splitting rule for constructing the tree model corresponding to the welding quality diagnostic model based on the first-order gradient information and the second-order gradient information sent by each of the one or more enterprise devices, and sends the target splitting rule to each of the one or more enterprise devices; step S123 (not shown), where each of the one or more enterprise devices constructs the corresponding tree model in the welding quality diagnostic model corresponding to the enterprise device based on the target splitting rule, determines the weight information corresponding to the tree model, and updates the tree model according to the weight information; step S124 (not shown), where steps S121-S123 are repeated until a termination condition is met, and the enterprise device determines the corresponding welding quality diagnostic model.
[0043] In some embodiments, the first-order gradient information includes the first-order gradient corresponding to the welding sample data, and the second-order gradient information includes the second-order gradient corresponding to the welding sample data. The first-order gradient... Second gradient Where l is the loss function, y i Here, represents the sample label information corresponding to the i-th data sample in the welding sample data, and t represents the current training round number. This is the predicted value corresponding to the i-th data sample of the tree model obtained in the (t-1)-th round of training. The first-order gradient information and the second-order gradient information respectively include the first-order gradient and the second-order gradient corresponding to each data sample in the welding sample data.
[0044] In some embodiments, the tree models constructed by each enterprise's equipment based on the target splitting rule can fit the welding sample data corresponding to that enterprise's equipment well and can also make good predictions for unknown data. In some embodiments, the central equipment can often determine one or more splitting rules, and the tree models constructed based on these splitting rules can correctly classify the welding sample data. The central equipment can use the first-order gradient information and the second-order gradient information sent by each enterprise's equipment to select the most suitable splitting rule as the target splitting rule.
[0045] In some embodiments, the central device determines the target splitting rule for constructing the tree model corresponding to the welding quality diagnostic model based on the first-order gradient information and the second-order gradient information sent by each of the one or more enterprise devices. This includes: the central device determining one or more splitting rules for constructing the tree model corresponding to the welding quality diagnostic model; the central device determining the information gain corresponding to each of the one or more splitting rules based on the first-order gradient information and the second-order gradient information sent by each of the one or more enterprise devices; and the central device determining the target splitting rule from the one or more splitting rules according to the information gain corresponding to each splitting rule.
[0046] In some embodiments, the central device can utilize a decision tree algorithm to determine one or more splitting rules for the tree model corresponding to the welding quality diagnostic model, and then calculate the information gain corresponding to each splitting rule based on the first-order gradient information and the second-order gradient information sent by each enterprise device. The information gain is calculated as follows:
[0047]
[0048] Among them, G L The first gradient g of the welding sample data contained in the left node after the tree model is split according to the splitting rule is given. i The sum of G R The first gradient g of the welding sample data contained in the right node after the tree model is split according to the splitting rule is given. i The sum of H L The second gradient h is the welding sample data contained in the left node of the tree model after the split, corresponding to the splitting rule. i The sum of H R The second gradient h is the welding sample data contained in the right node of the tree model after the split corresponding to this splitting rule. i The sum of λ and γ, where λ is the L2 norm of the weight vector of the leaf nodes in the tree model, and γ is the coefficient for the number of leaf nodes in the tree model. λ and γ are penalty terms controlling the complexity of the welding quality diagnostic model.
[0049] In some embodiments, the central device may select the splitting rule with the highest information gain as the target splitting rule and send it to each enterprise device. The target splitting rule includes one or more welding features for segmentation (e.g., local peaks, local valleys, peak times, cumulative welding points since the last mold repair, current welding torch repair number, etc.), and the splitting value corresponding to the welding feature. Each enterprise device can partition its welding sample data based on the target splitting rule to construct a new tree model. The enterprise device determines the weight information corresponding to the newly constructed tree model. For example, the enterprise device can determine the majority of welding sample data contained in each leaf node of the tree model, and determine the weight corresponding to each leaf node based on the majority of welding sample data contained in each leaf node. The weight information corresponding to the tree model includes the weight corresponding to each leaf node in the tree model. The weight corresponding to the leaf node is:
[0050]
[0051] Where λ is the L2 norm of the leaf node weight vector in the tree model, and G j H is the sum of the first-order gradients corresponding to the welding sample data contained in the j-th leaf node of the tree model. j Let be the sum of the second-order gradients corresponding to the welding sample data contained in the j-th leaf node in the tree model, where j = 1, 2, ..., n.
[0052] In some embodiments, the enterprise equipment can update the tree model based on its calculated weight information and use the updated tree model as the tree model obtained in this round of training. The central equipment and each enterprise equipment can repeat the above steps until the corresponding termination conditions are met. After the above training is completed, each enterprise equipment can determine the final welding quality diagnostic model based on the tree model obtained in each round of training.
[0053] During the model training process described above, the welding sample data corresponding to each enterprise's equipment is always stored locally. Each enterprise's equipment only needs to transmit gradient information and other data to the central equipment. Based solely on the gradient information, other equipment cannot reverse-engineer the welding sample data corresponding to that enterprise's equipment. Thus, while ensuring the privatization of welding sample data, the model building process can be shared among multiple enterprises, thereby improving the quality of model building.
[0054] In some embodiments, step S12 further includes step S125 (not shown), wherein the central device determines quantile information and sends the quantile information to each of the one or more enterprise devices, wherein the quantile information matches the welding sample data corresponding to each enterprise device; each of the one or more enterprise devices determines the first-order gradient information and second-order gradient information corresponding to the welding sample data according to the loss function and the welding sample data corresponding to the enterprise device, including: each of the one or more enterprise devices determines multiple bin sets according to the quantile information and the welding sample data corresponding to the enterprise device; the one or more enterprise devices determine the corresponding first-order gradient information and second-order gradient information according to the loss function and the multiple bin sets, wherein the first-order gradient information includes multiple cumulative first-order gradients, the multiple cumulative first-order gradients match the multiple bin sets, and the second-order gradient information includes multiple cumulative second-order gradients, the multiple cumulative second-order gradients match the multiple bin sets.
[0055] In some embodiments, to further prevent information leakage, each enterprise device can provide as little relevant data information as possible to the central device, for example, avoiding the provision of full feature data of welding samples. To minimize the amount of data provided by each enterprise device, the central device can determine corresponding quantile information using a certain algorithm. This quantile information includes multiple quantile points, each corresponding to a specific type of welding feature data. Based on the quantile information provided by the central device, each enterprise device can bin its local welding sample data corresponding to various types of welding feature data, determining multiple bin sets. Each bin set corresponds one-to-one with the multiple quantile points. Each enterprise device can determine the cumulative first-order gradient and cumulative second-order gradient corresponding to each bin set, and provide these gradients as the corresponding first-order and second-order gradient information to the central device. This significantly reduces the amount of data provided compared to the first-order and second-order gradients provided for each welding sample data in the aforementioned scheme, effectively preventing information leakage. The cumulative first-order gradient... With cumulative second gradient The calculation is as follows:
[0056]
[0057]
[0058] Here, i and j refer to the j-th quantile corresponding to the i-th type of welding feature data. and These are the first-order and second-order gradients of different features corresponding to each data sample in the welding sample data. This is the set of indices for the data samples in the bin set corresponding to the j-th quantile point of the i-th type of welding feature data in the welding sample data.
[0059] In some embodiments, the central device can use the aforementioned accumulated first-order gradient and accumulated second-order gradient to calculate information gain, thereby determining the corresponding target splitting rule. Correspondingly, the enterprise device can also construct a tree model based on this target splitting rule. The method for determining the target splitting rule and the method for constructing the tree model are the same as or similar to the aforementioned methods for determining the target splitting rule and constructing the tree model, and therefore will not be repeated hereafter, but are incorporated herein by reference.
[0060] In some embodiments, the quantile information is determined as follows: For a certain quantile point corresponding to a certain type of welding feature data, the central device can record the value of the quantile point as Q = (maximum value + minimum value) / 2, where the maximum value and minimum value are the maximum and minimum values corresponding to that type of welding feature data, respectively. When starting to determine the quantile information, the central device can initialize the maximum value and the minimum value. Based on the maximum value and the minimum value, the central device determines the quantile point value Q and then sends the determined quantile point value Q to the one or more enterprise devices. Based on the quantile point value Q, each enterprise device determines the quantity information n of welding feature data in the corresponding category of welding feature data in the welding sample data corresponding to that enterprise device that is less than the quantile point value Q, and returns the quantity information n to the central device. Based on the quantity information n returned by each enterprise device, the central device determines the corresponding total quantity information Σn, and updates the quantile point value Q based on the total quantity information. If the total amount of information is greater than the quantile threshold, the aforementioned maximum value is updated to Q; otherwise, the aforementioned minimum value is updated to Q, and the quantile value Q is updated accordingly. The quantile threshold is the total sample size / number of quantiles corresponding to all enterprise equipment. The central equipment then repeats the above steps based on the updated quantile value Q until the determined total amount of information is equal to the quantile threshold, and the quantile value Q at this point is taken as the final quantile value for that type of welding feature data.
[0061] In some embodiments, sending the first-order gradient information and the second-order gradient information to the central device includes: each of the one or more enterprise devices encrypting the first-order gradient information and the second-order gradient information, and then sending the encrypted first-order gradient information and the second-order gradient information to the central device. For example, to further protect the data privacy of each enterprise device and ensure data transmission security, each enterprise device may encrypt the first-order gradient information and the second-order gradient information (e.g., homomorphic encryption) before sending them to the central device, and then send the encrypted content to the central device. The central device decrypts the encrypted content before determining the subsequent target splitting rules.
[0062] In some embodiments, the termination condition includes at least one of the following: the information gain corresponding to the currently determined tree model is less than 0; the currently determined tree model reaches a preset depth; or there exists a leaf node in the currently determined tree model whose weight is less than a preset weight threshold. For example, to balance training loss and model structural complexity, training can be terminated when the determined information gain is less than 0. Alternatively, a preset model depth or weight threshold can be used to avoid over-division of the tree model, which could lead to overfitting.
[0063] Figure 3 Exemplary systems that can be used to implement the various embodiments described in this application are shown;
[0064] like Figure 3 As shown in some embodiments, system 300 can function as any of the devices described in each of the embodiments. In some embodiments, system 300 may include one or more computer-readable media having instructions (e.g., system memory or NVM / storage device 320) and one or more processors (e.g., one or more processors 305) coupled to the one or more computer-readable media and configured to execute the instructions to implement the module and thus perform the actions described in this application.
[0065] In one embodiment, the system control module 310 may include any suitable interface controller to provide any suitable interface to at least one of the processors 305 and / or any suitable device or component communicating with the system control module 310.
[0066] The system control module 310 may include a memory controller module 330 to provide an interface to the system memory 315. The memory controller module 330 may be a hardware module, a software module, and / or a firmware module.
[0067] System memory 315 can be used, for example, to load and store data and / or instructions for system 300. In one embodiment, system memory 315 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, system memory 315 may include double data rate type quad synchronous dynamic random access memory (DDR4 SDRAM).
[0068] In one embodiment, the system control module 310 may include one or more input / output (I / O) controllers to provide interfaces to the NVM / storage device 320 and (one or more) communication interfaces 325.
[0069] For example, NVM / storage device 320 may be used to store data and / or instructions. NVM / storage device 320 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0070] NVM / storage device 320 may include storage resources that are physically part of a device on which system 300 is mounted, or that can be accessed by the device without necessarily being part of it. For example, NVM / storage device 320 may be accessed via a network through one or more communication interfaces 325.
[0071] One or more communication interfaces 325 may provide the system 300 with an interface to communicate over one or more networks and / or with any other suitable device. The system 300 may wirelessly communicate with one or more components of a wireless network in accordance with any of one or more wireless network standards and / or protocols.
[0072] In one embodiment, at least one of the processors 305 may be logically packaged with one or more controllers of the system control module 310 (e.g., memory controller module 330). In one embodiment, at least one of the processors 305 may be logically packaged with one or more controllers of the system control module 310 to form a system-in-package (SiP). In one embodiment, at least one of the processors 305 may be integrated with the logic of one or more controllers of the system control module 310 on the same die. In one embodiment, at least one of the processors 305 may be integrated with the logic of one or more controllers of the system control module 310 on the same die to form a system-on-a-chip (SoC).
[0073] In various embodiments, system 300 may be, but is not limited to, a server, workstation, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, system 300 may have more or fewer components and / or different architectures. For example, in some embodiments, system 300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0074] In addition to the methods and devices described in the above embodiments, this application also provides a computer-readable storage medium storing computer code that, when executed, performs the method described in any of the preceding embodiments.
[0075] This application also provides a computer program product that, when executed by a computer device, performs the method described in any of the preceding claims.
[0076] This application also provides a computer device, the computer device comprising:
[0077] One or more processors;
[0078] Memory, used to store one or more computer programs;
[0079] When the one or more computer programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described in any of the preceding methods.
[0080] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, magnetic or optical drives, floppy disks, and similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.
[0081] Furthermore, a portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0082] Communication media include media through which communication signals containing, for example, computer-readable instructions, data structures, program modules, or other data are transmitted from one system to another. Communication media can include guided transmission media (such as cables and wires (e.g., optical fibers, coaxial cables, etc.)) and wireless (unguided transmission) media capable of propagating energy waves, such as sound, electromagnetic, RF, microwave, and infrared. Computer-readable instructions, data structures, program modules, or other data can be embodied as modulated data signals in, for example, wireless media (such as carrier waves or similar mechanisms embodied as part of spread spectrum technology). The term "modulated data signal" refers to a signal whose one or more characteristics are altered or set in a manner that encodes information in the signal. Modulation can be analog, digital, or a hybrid modulation technique.
[0083] By way of example and not limitation, computer-readable storage media may include volatile and non-volatile, removable and non-removable media implemented by any method or technique for storing information such as computer-readable instructions, data structures, program modules or other data. For example, computer-readable storage media include, but are not limited to, volatile memories such as random access memory (RAM, DRAM, SRAM); and non-volatile memories such as flash memory, various read-only memories (ROM, PROM, EPROM, EEPROM), magnetic and ferromagnetic / ferroelectric memories (MRAM, FeRAM); and magnetic and optical storage devices (hard disks, magnetic tapes, CDs, DVDs); or other media now known or hereafter developed capable of storing computer-readable information / data for use by a computer system.
[0084] Herein, one embodiment of this application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the apparatus is triggered to run a method and / or technical solution based on the foregoing embodiments of this application.
[0085] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.
Claims
1. A method for constructing a welding quality diagnostic model, the method being applied to a welding quality diagnostic system, the welding quality diagnostic system comprising a central device and one or more enterprise devices, wherein, The method includes: The central equipment determines a first parameter and a second parameter based on welding sharing information, and constructs a loss function using the first parameter and the second parameter, and sends the loss function to the one or more enterprise equipment; The determination of a corresponding welding quality diagnostic model for each of the one or more enterprise equipment based on the loss function and the welding sample data corresponding to that enterprise equipment includes: b1. Each of the one or more enterprise devices determines the first-order gradient information and the second-order gradient information corresponding to the welding sample data based on the loss function and the welding sample data corresponding to the enterprise device, and sends the first-order gradient information and the second-order gradient information to the central device. b2 The central device determines the target splitting rule for constructing the tree model corresponding to the welding quality diagnosis model based on the first-order gradient information and the second-order gradient information sent by each of the one or more enterprise devices, and sends the target splitting rule to each of the one or more enterprise devices; b3. For each of the one or more enterprise equipment, based on the target splitting rule, construct the corresponding tree model in the welding quality diagnosis model of the enterprise equipment, determine the weight information corresponding to the tree model, and update the tree model according to the weight information. Repeat steps b1-b3 until the termination condition is met, and the enterprise equipment determines the corresponding welding quality diagnostic model.
2. The method according to claim 1, wherein, The central equipment determines the first and second parameters based on welding sharing information, including: Each of the one or more enterprise devices sends welding sharing information corresponding to that enterprise device to the central device. The welding sharing information includes the positive and negative sample ratio information of the welding sample data corresponding to that enterprise device and the validation set accuracy information corresponding to the welding sample data. The central equipment determines the first parameter and the second parameter based on the welding sharing information sent by each of the one or more enterprise equipment.
3. The method according to claim 2, wherein, The method further includes: Each of the one or more enterprise devices is trained using a logistic regression algorithm based on the welding sample data corresponding to that enterprise device, to determine the validation set accuracy information corresponding to that welding sample data.
4. The method according to claim 1, wherein, Based on the first-order gradient information and the second-order gradient information sent by each of the one or more enterprise devices, the central device determines the target splitting rules for constructing the tree model corresponding to the welding quality diagnostic model, including: The central device determines one or more splitting rules for constructing the tree model corresponding to the welding quality diagnostic model; The central device determines the information gain corresponding to each splitting rule in the one or more splitting rules based on the first-order gradient information and the second-order gradient information sent by each of the one or more enterprise devices. The central device determines the target splitting rule from one or more splitting rules based on the information gain corresponding to each splitting rule.
5. The method according to claim 1 or 4, wherein, The determination of the corresponding welding quality diagnostic model for each of the one or more enterprise equipment based on the loss function and the welding sample data corresponding to that enterprise equipment further includes: The central device determines the grading information and sends the grading information to each of the one or more enterprise devices, wherein the grading information is matched with the welding sample data corresponding to each enterprise device; The determination of the first-order gradient information and second-order gradient information corresponding to the welding sample data for each of the one or more enterprise devices, based on the loss function and the welding sample data corresponding to that enterprise device, includes: Each of the one or more enterprise equipment determines multiple sub-box sets based on the grading information and the welding sample data corresponding to that enterprise equipment; The one or more enterprise devices determine corresponding first-order gradient information and second-order gradient information based on the loss function and the multiple bin sets. The first-order gradient information includes multiple cumulative first-order gradients, which are matched with the multiple bin sets. The second-order gradient information includes multiple cumulative second-order gradients, which are matched with the multiple bin sets.
6. The method according to claim 1, wherein, Sending the first-order gradient information and the second-order gradient information to the central device includes: Each of the one or more enterprise devices encrypts the first-order gradient information and the second-order gradient information, and sends the encrypted first-order gradient information and second-order gradient information to the central device.
7. The method according to claim 1, wherein, The termination condition includes at least one of the following: The information gain corresponding to the currently determined tree model is less than 0; The currently determined tree model has reached the preset depth; In the currently determined tree model, there are leaf nodes whose weights are less than a preset weight threshold.
8. A welding quality diagnostic system, comprising a central device, one or more enterprise devices, a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Target detection method based on transverse federated learning framework
CN114925848A