Circuit board defect identification Transform network distributed reasoning method based on IEC61499 standard

By designing an adaptive distributed reasoning method under the IEC61499 standard, the computing requirements of the Transformer network are distributed to multiple nodes, which solves the problems of insufficient computing resources and insufficient adaptive capabilities in circuit board defect identification, and achieves fast and accurate circuit detection. Board defect identification improves industrial production efficiency.

CN118657177AActive Publication Date: 2024-09-17KUNMING UNIV OF SCI & TECH
View PDF 18 Cites 0 Cited by

Patent Information

Application Number
CN202411106027.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-09-17
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

In the distributed industrial process measurement and control system of the IEC61499 standard, directly applying the Transformer network to identify circuit board defects has problems of insufficient computing resources and insufficient adaptive capabilities, making it difficult to effectively identify complex circuit board defects.

Method used

By designing an adaptive distributed reasoning method based on the Transformer network under the IEC61499 standard, the computing requirements of the Transformer network are distributed to multiple nodes, and the distributed architecture and adaptive mechanism are used to dynamically adjust the distributed strategy to realize circuit board defect identification. Specific steps include loading the Transformer network model on the host and edge nodes, setting split anchor points, splitting the model, distributing data, preprocessing and calculation on the edge nodes, summarizing and updating weight parameters.

Benefits of technology

It significantly reduces the inference time of the Transformer network model in the industrial environment, improves the speed of circuit board defect identification, improves industrial production efficiency, and optimizes the utilization of computing resources without reducing identification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657177A
    Figure CN118657177A
Patent Text Reader

Abstract

The invention relates to the field of industrial internet, and provides a circuit board defect identification Transform network distributed reasoning method based on the IEC61499 standard. According to the method, a multi-head attention mechanism in a Transform network is used as a key element of splitting, and splitting anchor points are set among different attention heads. And the split points of the model are calculated by analyzing the weights of the edge nodes, so that cooperative calculation is realized in a distributed environment. Compared with a traditional method that a single machine executes multi-head attention calculation, the method has the advantages that through self-adaptive model splitting and distributed cooperation, the reasoning time needed by a Transform network model in an industrial environment is remarkably shortened, the circuit board defect recognition speed is increased on the premise that the recognition precision is not reduced, and the circuit board defect recognition efficiency is improved. And the obvious positive influence is generated on the improvement of the industrial production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial Internet technology, and in particular to a Transformer network distributed reasoning method for circuit board defect recognition based on the IEC61499 standard. Background Art

[0002] The IEC61499 standard provides a model and design method for distributed industrial process measurement and control systems. The standard supports the reuse and distribution of modular software components, making the system more flexible and scalable. The standard supports the reuse and distribution of modular software components, making the system more flexible and scalable.

[0003] In recent years, deep learning technology, especially Transformer network, has attracted much attention due to its powerful feature extraction and ability to process sequence data. Transformer network was originally applied in the field of natural language processing, and has now been successfully extended to many fields such as image recognition and time series analysis.

[0004] In the task of circuit board defect recognition, the Transformer network can effectively capture the global dependencies in the image and focus on the associations between different parts of the image through the self-attention mechanism, which is particularly useful for identifying complex circuit board defects. However, there are certain challenges in directly applying the Transformer network to the distributed system of the IEC61499 standard. First, the Transformer network usually requires large computing resources, which may conflict with the limited resources of distributed edge devices. Secondly, due to the diversity of circuit board designs and defect types, the network needs to have a certain degree of adaptability to adapt to different application scenarios.

[0005] Therefore, a distributed reasoning method for transformer network based on IEC61499 standard for circuit board defect recognition is proposed. Taking advantage of the distributed architecture, the computing requirements of the transformer network are dispersed to multiple nodes, thereby optimizing the utilization of resources. At the same time, the distributed strategy is dynamically adjusted by introducing an adaptive mechanism. Summary of the invention

[0006] In order to effectively identify circuit board defects, a Transformer network distributed reasoning method for circuit board defect recognition based on IEC61499 standard is proposed. This method is based on the idea of ​​segmented mapping of the overall design of the IEC61499 standard, and designs an adaptive distributed reasoning method for circuit board defect recognition Transformer network that complies with the standard.

[0007] The specific steps of the method are as follows:

[0008] Step 1: Load the Transformer network model on the host node and each edge node, and set split anchor points between each attention head;

[0009] Step 2. During the first run, the host assigns and saves the initial weight of each edge device to 1. The host loads the weight value of each edge device, calculates the cutting point of the Transformer multi-head attention according to the weight value, and calculates the cutting coordinates according to the coordinate calculation formula. After determining the cutting coordinates of the model of each edge node, the cutting point coordinates are sent to each edge node. The edge node verifies the transmitted coordinates and cuts the model according to the coordinates.

[0010] Step 3, after the edge node in Step 2 completes the segmentation operation of the model, the computer data is distributed to each edge node, and the input data of the edge node is preprocessed before data transmission;

[0011] Step 4: The edge node calculates the output of the attention head and its gradient value based on the received input data, and transmits these calculation results back to the host. Subsequently, the host node is responsible for summarizing the calculation results of all edge nodes, and updates and integrates the weight parameters of each edge node accordingly.

[0012] Preferably, the coordinate calculation formula in Step 2 is:

[0013]

[0014] in is the end point of the cutting interval of the i-th edge device model, is the starting point of the cutting interval, is the number of bulls in the bull attention, is the weight of the i-th edge device, 0.2 is the tolerance coefficient of the weight, and m is the total number of edge devices.

[0015] The tolerance factor introduced in this formula is intended to mitigate the impact of computational differences between different devices within the IEC61499 standard framework on the overall computational efficiency, so as to optimize computational performance.

[0016] Preferably, the data preprocessing formula in Step 3 is:

[0017]

[0018] in is the mean of the eigenvalues ​​in the input matrix and 0.01 is the characteristic deviation value.

[0019] This formula calculates the distance between the feature and the feature mean to replace the original feature value. The relative distance between features is more robust than the original numerical features when representing data, especially in the face of environmental changes and disturbances.

[0020] Preferably, the calculation formula of the weight update parameter of Step 4 is:

[0021]

[0022] in, represents the weight of the i-th edge device, is the gradient information value returned by edge device i, 0.1 is the gradient balancing coefficient, It is the time difference between the time when the data is sent and the time when the calculation result is received.

[0023] Preferably, the Step 3 also includes a data distribution method, and the data distribution method is specifically:

[0024] The host uses a broadcast mechanism when distributing data to edge nodes to ensure synchronous reception of input data. After receiving the data, each edge node will first perform a data integrity check. If data is missing, the missing part will be filled with a value of 0.1, and then the calculation process will continue;

[0025] Preferably, the Step 4 also includes a data receiving method, and the data receiving method is specifically:

[0026] For the calculation results of the edge devices, the host sets up a data transfer pool with a size of m, where m represents the number of edge nodes. When each edge device transmits the calculation results back to the host, these results will first be stored in the data transfer pool. Once the data transfer pool is full, the host will read and clear the data in it, then perform a data integrity check, fill the missing feature values ​​with 0, and finally integrate the data.

[0027] Beneficial effects;

[0028] The present invention uses the multi-head attention mechanism in the Transformer network as the key element of splitting, and sets split anchor points between different attention heads. The split point of the model is calculated by analyzing the weights of the edge nodes, thereby realizing collaborative computing in a distributed environment. Compared with the traditional method of performing multi-head attention calculations on a single machine, this method significantly reduces the inference time required to apply the Transformer network model in an industrial environment through adaptive model splitting and distributed collaboration, improves the speed of circuit board defect recognition without reducing recognition accuracy, and has a significant positive impact on improving the efficiency of industrial production. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is the overall flow chart of the present invention;

[0030] Figure 2 It is a schematic diagram of anchor point setting of the present invention;

[0031] Figure 3 It is a schematic diagram of the edge-cloud collaboration strategy of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] Example:

[0034] like Figure 1-Figure 3 As shown, the present invention discloses a circuit board defect recognition method based on the IEC61499 standard

[0035] Transformer network distributed reasoning method, Figure 1 It is a flow chart of the present invention, and its specific steps are as follows:

[0036] Step 1: Load the Transformer network model on the host node and each edge node, such as Figure 2 As shown, split anchors are set between attention heads.

[0037] Step 2: During the first run, the host will assign an initial weight to each edge device and save it with a value of 1. The host loads the weight values ​​of each edge device and calculates the cutting point of the Transformer multi-head attention based on the weight values. After determining the cutting coordinates of the model of each edge node, the cutting point coordinates are sent to each edge node. The edge node verifies the transmitted coordinates and cuts the model according to the coordinates.

[0038] The coordinate calculation formula is:

[0039]

[0040] in is the end point of the cutting interval of the i-th edge device model, is the starting point of the cutting interval, is the number of bulls in the bull attention, is the weight of the i-th edge device, 0.2 is the tolerance coefficient of the weight, and m is the total number of edge devices.

[0041] The tolerance factor introduced in this formula is intended to mitigate the impact of computational differences between different devices within the IEC61499 standard framework on the overall computational efficiency, so as to optimize computational performance.

[0042] Step 3. After the edge nodes complete the segmentation operation of the model, considering the need for high-speed computing, the edge nodes only perform data integrity verification when receiving data transmitted through the network, but do not perform strict verification of numerical accuracy. Therefore, before data transmission, appropriate preprocessing must be performed on the input data of the edge nodes to ensure that these nodes can adapt to and accommodate numerical errors caused by interference during network propagation.

[0043] The data processing formula is:

[0044]

[0045] in is the mean of the eigenvalues ​​in the input matrix and 0.01 is the characteristic deviation value.

[0046] This formula calculates the distance between the feature and the feature mean to replace the original feature value. The relative distance between features is more robust than the original numerical features when representing data, especially in the face of environmental changes and disturbances.

[0047] like Figure 3 As shown in the figure, the data distribution method is as follows: the host uses a broadcast mechanism when distributing data to edge nodes to ensure synchronous reception of input data. After receiving the data, each edge node will first perform a data integrity check; if data is missing, the missing part will be filled with a value of 0.1, and then the calculation process will continue.

[0048] Step 4: The edge node calculates the output of the attention head and its gradient value based on the received input data, and transmits these calculation results back to the host. Subsequently, the host node is responsible for summarizing the calculation results of all edge nodes, and based on this, updates and integrates the weight parameters of each edge node.

[0049] like Figure 3 As shown in Figure 1, the data receiving method is as follows: for the calculation results of the edge device, the host sets a data transfer pool with a size of m, where m represents the number of edge nodes. When each edge device transmits the calculation results back to the host, these results will first be stored in the data transfer pool. Once the data transfer pool is full, the host will read and clear the data in it, then perform data integrity verification, fill the missing feature values ​​with 0, and finally integrate the data.

[0050] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A Transformer network distributed reasoning method for circuit board defect recognition based on the IEC61499 standard, characterized by: The specific steps of the method are as follows: Step 1: Load the Transformer network model on the host node and each edge node, and set split anchor points between each attention head; Step 2. During the first run, the host assigns and saves the initial weight of each edge device to 1. The host loads the weight value of each edge device, calculates the cutting point of the Transformer multi-head attention according to the weight value, and calculates the cutting coordinates according to the coordinate calculation formula. After determining the cutting coordinates of the model of each edge node, the cutting point coordinates are sent to each edge node. The edge node verifies the transmitted coordinates and cuts the model according to the coordinates. Step 3, after the edge node in Step 2 completes the segmentation operation of the model, the computer data is distributed to each edge node, and the input data of the edge node is preprocessed before data transmission; Step 4: The edge node calculates the output of the attention head and its gradient value based on the received input data, and transmits these calculation results back to the host. Subsequently, the host node is responsible for summarizing the calculation results of all edge nodes, and updates and integrates the weight parameters of each edge node accordingly.

2. According to claim 1, the Transformer network distributed reasoning method for circuit board defect recognition based on the IEC61499 standard is characterized in that: The coordinate calculation formula in Step 2 is: ; in is the end point of the cutting interval of the i-th edge device model, is the starting point of the cutting interval, is the number of bulls in the bull attention, is the weight of the i-th edge device, 0.2 is the tolerance coefficient of the weight, and m is the total number of edge devices.

3. The Transformer network distributed reasoning method for circuit board defect recognition based on the IEC61499 standard according to claim 1 is characterized in that: The data preprocessing formula in Step 3 is: ; in is the mean of the eigenvalues ​​in the input matrix and 0.01 is the characteristic deviation value.

4. The Transformer network distributed reasoning method for circuit board defect recognition based on the IEC61499 standard according to claim 1 is characterized in that: The calculation formula of the weight update parameter of Step 4 is: ; in, represents the weight of the i-th edge device, is the gradient information value returned by edge device i, 0.1 is the gradient balancing coefficient, It is the time difference between the time when the data is sent and the time when the calculation result is received.

5. The Transformer network distributed reasoning method for circuit board defect recognition based on the IEC61499 standard according to claim 1 is characterized in that: The Step 3 also includes a data distribution method, which is specifically: The host uses a broadcast mechanism when distributing data to edge nodes to ensure that input data is received synchronously. After receiving the data, each edge node will first perform a data integrity check. If data is missing, the value 0.1 will be used to fill the missing part, and then the calculation process will continue.

6. The Transformer network distributed reasoning method for circuit board defect recognition based on the IEC61499 standard according to claim 5 is characterized in that: The Step 4 also includes a data receiving method, which is specifically: For the calculation results of the edge devices, the host sets up a data transfer pool with a size of m, where m represents the number of edge nodes. When each edge device transmits the calculation results back to the host, the results will first be stored in the data transfer pool. Once the data transfer pool is full, the host will read and clear the data in it, then perform a data integrity check, fill the missing feature values ​​with 0, and finally integrate the data.

Citation Information

Patent Citations

  • Optical inspection system

    CA2296143A1

  • Code defect detection method

    CN114064487A

  • Transform-based key feature enhanced gastric cancer image recognition method

    CN114119585A

  • Circuit board surface defect detection method and device, electronic equipment and storage medium

    CN115239712A

  • Defect identification method and device based on similarity, electronic equipment and storage medium

    CN116091419A