Method and apparatus for locating defects
By calculating the tree structure similarity and differences between defective products and qualified products, the problem of inability to effectively locate defective products in the existing technology is solved, and fast and accurate defect positioning is achieved.
Patent Information
- Application Number
- CN201910967953.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-12
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2039-10-12
AI Technical Summary
The prior art cannot effectively locate defective products in the production process, resulting in high time cost for defect positioning and inability to accurately locate specific problems.
By obtaining the tree structures of defective products and multiple qualified products, calculate the similarity and select the tree structure of qualified products with high similarity, further calculate the differences, and locate the defects of defective products based on the differences.
It realizes fast and accurate positioning of defective products, improving the efficiency and accuracy of defect positioning.
Smart Images

Figure CN110704449B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and more particularly to a method and apparatus for locating defects. Background Art
[0002] Analyzing and locating defects in defective products (i.e., substandard products) during the production process can significantly reduce the time and cost of defect location. Currently, the production process of defective products is typically flattened into a one-dimensional vector with a fixed dimension. Feature engineering and prediction are performed on the input vector to rank the features by importance. However, feature importance ranking cannot pinpoint the specific defect problem and therefore cannot solve the defect location problem. Summary of the Invention
[0003] The embodiments of the present application provide a method and apparatus for locating defects.
[0004] In a first aspect, an embodiment of the present application proposes a method for locating defects, including: obtaining a tree structure of a defective product and a tree structure of multiple qualified products, wherein the multiple qualified products have the same model as the defective product, and the tree structure is used to record the production process of the product; based on the tree structure of the defective product and the tree structure of the multiple qualified products, calculating the similarity between the defective product and the multiple qualified products; based on the calculated similarity, selecting at least one tree structure of a qualified product from the tree structures of the multiple qualified products; based on the tree structure of the defective product and the tree structure of at least one qualified product, calculating the difference between the defective product and at least one qualified product; and based on the calculated difference, locating the defect of the defective product.
[0005] In some embodiments, the tree structure includes multiple layers, each layer includes at least one node, each node stores one of the raw materials, intermediate products and final products in the production process of the product, and the edges between nodes in adjacent layers store parameters in the production process of the product.
[0006] In some embodiments, the root node of the tree structure stores the final product, the leaf nodes of the tree structure store the raw materials, and the intermediate nodes of the tree structure store the intermediate products. The node storing the final product or the intermediate product and the node storing the raw materials or the intermediate products used to produce the final product or the intermediate product are in a parent-child relationship, and the edge between the parent node and the child node stores the parameters of the production process of the raw materials or intermediate products stored by the child node to produce the final product or intermediate product stored by the parent node.
[0007] In some embodiments, based on the tree structure of the defective product and the tree structure of multiple qualified products, the similarity between the defective product and the multiple qualified products is calculated, including: calculating the edit distance between the tree structure of the defective product and the tree structure of multiple qualified products; based on the calculated edit distance, determining the similarity between the defective product and the multiple qualified products.
[0008] In some embodiments, the editing operation for calculating the edit distance includes at least one of the following: deleting a node, and if the deleted node is an intermediate node, connecting the child node of the deleted node to the parent node of the deleted node; inserting an intermediate node between the parent node and the child node; modifying the information stored in the node.
[0009] In some embodiments, based on the tree structure of the defective product and the tree structure of at least one qualified product, the difference between the defective product and the at least one qualified product is calculated, including: discretizing the continuous values stored in the tree structure of the defective product and the tree structure of at least one qualified product to obtain a fuzzy tree of the defective product and a fuzzy tree of at least one qualified product; calculating the edit distance between the fuzzy tree of the defective product and the fuzzy tree of at least one qualified product, and determining the change information from the fuzzy tree of the defective product to the fuzzy tree of at least one qualified product; and determining the difference between the defective product and the at least one qualified product based on the calculated change information.
[0010] In some embodiments, the algorithm to discretize continuous values is a K-means clustering algorithm.
[0011] In some embodiments, if multiple batches of the same raw material or intermediate product are used in the same production process, some batches are pruned and the usage information is merged into the remaining batches.
[0012] In some embodiments, locating defects of the defective product based on the calculated difference includes: calculating causes of the calculated difference to obtain defect causes and probabilities of the defective product.
[0013] In the second aspect, an embodiment of the present application proposes a device for locating defects, including: an acquisition unit, configured to acquire a tree structure of a defective product and a tree structure of multiple qualified products, wherein the multiple qualified products have the same model as the defective product, and the tree structure is used to record the production process of the product; a first calculation unit, configured to calculate the similarity between the defective product and the multiple qualified products based on the tree structure of the defective product and the tree structure of the multiple qualified products; a selection unit, configured to select the tree structure of at least one qualified product from the tree structures of the multiple qualified products based on the calculated similarity; a second calculation unit, configured to calculate the difference between the defective product and at least one qualified product based on the tree structure of the defective product and the tree structure of at least one qualified product; a positioning unit, configured to locate the defect of the defective product based on the calculated difference.
[0014] In some embodiments, the tree structure includes multiple layers, each layer includes at least one node, each node stores one of the raw materials, intermediate products and final products in the production process of the product, and the edges between nodes in adjacent layers store parameters in the production process of the product.
[0015] In some embodiments, the root node of the tree structure stores the final product, the leaf nodes of the tree structure store the raw materials, and the intermediate nodes of the tree structure store the intermediate products. The node storing the final product or the intermediate product and the node storing the raw materials or the intermediate products used to produce the final product or the intermediate product are in a parent-child relationship, and the edge between the parent node and the child node stores the parameters of the production process of the raw materials or intermediate products stored by the child node to produce the final product or intermediate product stored by the parent node.
[0016] In some embodiments, the first calculation unit is further configured to: calculate an edit distance between the tree structure of the defective product and the tree structures of the plurality of qualified products; and determine a similarity between the defective product and the plurality of qualified products based on the calculated edit distance.
[0017] In some embodiments, the editing operation for calculating the edit distance includes at least one of the following: deleting a node, and if the deleted node is an intermediate node, connecting the child node of the deleted node to the parent node of the deleted node; inserting an intermediate node between the parent node and the child node; modifying the information stored in the node.
[0018] In some embodiments, the second computing unit is further configured to: discretize the continuous values stored in the tree structure of the defective product and the tree structure of at least one qualified product to obtain a fuzzy tree of the defective product and a fuzzy tree of at least one qualified product; calculate the edit distance between the fuzzy tree of the defective product and the fuzzy tree of at least one qualified product, and determine the change information from the fuzzy tree of the defective product to the fuzzy tree of at least one qualified product; and determine the difference between the defective product and at least one qualified product based on the calculated change information.
[0019] In some embodiments, the algorithm to discretize continuous values is a K-means clustering algorithm.
[0020] In some embodiments, if multiple batches of the same raw material or intermediate product are used in the same production process, some batches are pruned and the usage information is merged into the remaining batches.
[0021] In some embodiments, the positioning unit is further configured to: calculate the causes of the calculated differences to obtain defect causes and probabilities of defective products.
[0022] In a third aspect, an embodiment of the present application provides an electronic device comprising: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation method in the first aspect.
[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0024] The method and apparatus for locating defects provided in embodiments of the present application first calculate the similarity between the defective product and multiple qualified products based on a tree structure obtained from the defective product and the tree structures of multiple qualified products. Then, based on the calculated similarity, the tree structure of at least one qualified product is selected from the multiple qualified product tree structures. Then, based on the tree structure of the defective product and the tree structure of at least one qualified product, the difference between the defective product and the at least one qualified product is calculated. Finally, based on the calculated difference, the defect of the defective product is located. Locating defects based on the product tree structure provides an effective defect location method. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0026] Figure 1 is an exemplary system architecture to which the present application may be applied;
[0027] Figure 2 is a flow chart of an embodiment of a method for locating defects according to the present application;
[0028] Figure 3 It is a schematic diagram of the tree structure of the product;
[0029] Figure 4 is a flow chart of another embodiment of a method for locating a defect according to the present application;
[0030] Figure 5 is a schematic structural diagram of an embodiment of a device for locating defects according to the present application;
[0031] Figure 6 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION
[0032] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.
[0033] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0034] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the method for locating a defect or the apparatus for locating a defect of the present application can be applied.
[0035] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102, and server 103. Network 102 is used to provide a medium for a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0036] A user can use a terminal device 101 to interact with a server 103 via a network 102 to receive or send messages, etc. The terminal device 101 can be either hardware or software. When the terminal device 101 is hardware, it can be any electronic device, including but not limited to smartphones, tablet computers, laptop computers, and desktop computers. When the terminal device 101 is software, it can be installed in any of the above electronic devices. It can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are given here.
[0037] The server 103 can provide various services. For example, the server 103 can analyze and process data such as the tree structure of defective products and the tree structures of multiple qualified products obtained from the terminal device 101, and generate processing results (such as defects of defective products).
[0038] It should be noted that the server 103 can be hardware or software. When the server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 103 is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0039] It should be noted that the method for locating defects provided in the embodiment of the present application is generally executed by the server 103 , and accordingly, the device for locating defects is generally set in the server 103 .
[0040] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0041] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a method for locating a defect according to the present application. The method for locating a defect comprises the following steps:
[0042] Step 201: Obtain a tree structure of defective products and a tree structure of multiple qualified products.
[0043] In this embodiment, the execution subject of the method for locating defects (eg Figure 1 The server 103 shown may obtain a tree structure of defective products and a tree structure of a plurality of qualified products.
[0044] Here, the plurality of qualified products and the defective products obtained by the execution entity are generally of the same model. For example, in the case where the products are metal products, the plurality of qualified products and the defective products obtained by the execution entity may have the same metal code.
[0045] Here, the execution subject can communicate with the terminal device (such as Figure 1 The terminal device 101 shown) or the tree structure of the product is obtained locally. For example, the user can use the terminal device to send the tree structure of the defective product and the tree structure of multiple qualified products to the above-mentioned execution entity. For another example, the user can use the terminal device to send the tree structure of the defective product to the above-mentioned execution entity, and then the above-mentioned execution entity can obtain the tree structure of multiple qualified products with the same model as the defective product from the tree structure of a large number of qualified products stored thereon. For another example, the user can use the terminal device to send the identifier of the defective product to the above-mentioned execution entity, and the above-mentioned execution entity can first obtain the tree structure of the defective product indicated by the identifier from the tree structure of a large number of defective products stored thereon, and then obtain the tree structure of multiple qualified products with the same model as the obtained defective product from the tree structure of a large number of qualified products stored thereon.
[0046] Here, the tree structure can be used to record the production process of a product. Generally, the tree structure can include multiple layers. Each layer can include at least one node. Each node can store one of the raw materials, intermediate products and final products in the production process of the product. The edges between the nodes of adjacent layers can store parameters in the production process of the product. In some embodiments, the root node of the tree structure can store the final product. The leaf nodes of the tree structure can store raw materials. The intermediate nodes of the tree structure can store intermediate products. The node storing the final product or intermediate product and the node storing the raw materials or intermediate products used to produce the final product or the intermediate product can be a parent-child relationship. The edge between the parent node and the child node can store parameters (such as fusion parameters) in the production process of the final product or intermediate product stored by the raw materials or intermediate products stored by the child node to produce the parent node.
[0047] For ease of understanding, Figure 3 A diagram showing the tree structure of products. Figure 3 As shown, the product tree structure consists of four layers. The fourth layer includes two leaf nodes, storing raw materials 1 and 2, respectively. The third layer includes one intermediate node and five leaf nodes. The intermediate node stores intermediate product 1. Intermediate product 1 is produced from raw materials 1 and 2. The leaf nodes store raw materials 3, 4, 5, 6, and 7, respectively. The edges between the node storing intermediate product 1 and the nodes storing raw material 1 and 2 store the fusion parameters during the production of intermediate product 1. The second layer includes two intermediate nodes, storing intermediate product 2 and intermediate product 3, respectively. Intermediate product 2 is produced from raw materials 3, 4, and 1. The edges between the node storing intermediate product 2 and the nodes storing raw material 3, the node storing raw material 4, and the node storing intermediate product 1 store the fusion parameters during the production of intermediate product 2. Intermediate product 3 is produced from raw materials 5, 6, and 7. The edges between the node storing intermediate product 3 and the nodes storing raw material 5, 6, and 7 store the fusion parameters during the production of intermediate product 3. The first layer includes a root node, which stores the final product. The final product is produced from intermediate product 2 and intermediate product 3. The edges between the node storing the final product and the nodes storing intermediate product 2 and intermediate product 3 store the fusion parameters in the production process of the final product.
[0048] Step 202 : Based on the tree structure of the defective product and the tree structures of the plurality of qualified products, calculate the similarity between the defective product and the plurality of qualified products.
[0049] In this embodiment, the execution entity may calculate the similarity between the defective product and the multiple qualified products based on the tree structure of the defective product and the tree structures of the multiple qualified products. Specifically, the execution entity may calculate the similarity between the tree structure of the defective product and the tree structure of each qualified product as the similarity between the defective product and the qualified product.
[0050] Step 203 : Based on the calculated similarity, select at least one tree structure of a qualified product from the tree structures of the plurality of qualified products.
[0051] In this embodiment, the execution entity may select at least one tree structure of a qualified product from the tree structures of a plurality of qualified products based on the calculated similarity.
[0052] Typically, the execution entity may select, from the tree structures of multiple qualified products, at least one qualified product tree structure that has a high degree of similarity to the defective product. For example, the execution entity may sort the tree structures of multiple qualified products by similarity and select a preset number of qualified product tree structures starting from the tree structures with the highest similarity. For another example, the execution entity may select, from the tree structures of multiple qualified products, a qualified product tree structure whose similarity exceeds a preset similarity threshold.
[0053] Step 204 : Calculate the difference between the defective product and the at least one qualified product based on the tree structure of the defective product and the tree structure of the at least one qualified product.
[0054] In this embodiment, the execution entity may calculate the difference between the defective product and the at least one qualified product based on the tree structure of the defective product and the tree structure of the at least one qualified product. Specifically, the execution entity may calculate the difference between the tree structure of the defective product and the tree structure of each selected qualified product as the difference between the defective product and the qualified product.
[0055] Step 205 : locating defects of the defective product based on the calculated differences.
[0056] In this embodiment, the execution entity may locate the defect of the defective product based on the calculated difference. For example, the execution entity may determine the cause of the difference between the defective product and each selected qualified product as the cause of the defect of the defective product.
[0057] The defect location method provided in an embodiment of the present application first calculates the similarity between the defective product and multiple qualified products based on a tree structure obtained from the defective product and the tree structures of multiple qualified products. Then, based on the calculated similarity, the tree structure of at least one qualified product is selected from the multiple qualified product tree structures. Then, based on the tree structure of the defective product and the tree structure of at least one qualified product, the difference between the defective product and the at least one qualified product is calculated. Finally, based on the calculated difference, the defect of the defective product is located. Locating defects based on the product tree structure provides an effective defect location method.
[0058] Further references Figure 4 , which shows a process 400 of another embodiment of a method for locating a defect according to the present application. The method for locating a defect comprises the following steps:
[0059] Step 401: Obtain a tree structure of defective products and a tree structure of multiple qualified products.
[0060] In this embodiment, the specific operation of step 401 has been Figure 2 In the embodiment shown, step 201 is described in detail and will not be repeated here.
[0061] Step 402 : Calculate the edit distance between the tree structure of the defective product and the tree structures of a plurality of qualified products.
[0062] In this embodiment, the execution entity may calculate the edit distance between the tree structure of the defective product and the tree structure of each qualified product.
[0063] In practice, the edit distance, also known as the Levenshtein distance, refers to the minimum number of edit operations required to transform two strings from one to the other. Permitted edit operations include replacing one character with another, inserting a character, and deleting a character. Generally speaking, the smaller the edit distance, the greater the similarity between the two strings. Here, the edit distance of two tree structures can be the minimum cost sequence for transforming one tree structure into another tree structure. Usually, for two tree structures, there are many different sequences that can transform one tree structure into another tree structure. Each edit operation is assigned a cost. The cost of an edit sequence is the sum of the costs of its edit operations. The edit distance of a tree structure is the edit sequence with the minimum cost.
[0064] Generally, the editing operations for calculating the edit distance between two tree structures may include but are not limited to at least one of the following:
[0065] 1. Delete the node, and if the deleted node is an intermediate node, connect the child nodes of the deleted node to the parent node of the deleted node;
[0066] 2. Insert an intermediate node between the parent node and the child node;
[0067] 3. Modify the information stored in the node.
[0068] Step 403 : Determine the similarity between the defective product and the plurality of qualified products based on the calculated edit distance.
[0069] In this embodiment, the execution entity may determine the similarity between the defective product and each qualified product based on the calculated edit distance. Generally, the smaller the edit distance, the higher the similarity between the defective product and the qualified product; conversely, the smaller the edit distance, the lower the similarity between the defective product and the qualified product.
[0070] Step 404 : selecting at least one qualified product tree structure from the tree structures of the plurality of qualified products based on the calculated similarity.
[0071] In this embodiment, the specific operation of step 404 has been Figure 2 In the embodiment shown, step 203 is described in detail and will not be repeated here.
[0072] Step 405 : discretize the continuous values stored in the tree structure of the defective product and the tree structure of at least one qualified product to obtain a fuzzy tree of the defective product and a fuzzy tree of at least one qualified product.
[0073] In this embodiment, the execution entity may discretize the continuous values stored in the tree structure of defective products and the tree structure of at least one qualified product, thereby obtaining a fuzzy tree of defective products and a fuzzy tree of at least one qualified product. The continuous values stored in the tree structure may be, for example, the amount of raw materials used. Discretizing the amount of raw materials into categorical values can avoid or reduce the situation where the same raw material is misidentified as different due to errors in actual measurement and weighing.
[0074] In some optional implementations of this embodiment, the algorithm for discretizing continuous values may be a K-means clustering algorithm.
[0075] In some optional implementations of this embodiment, if multiple batches of the same raw material or intermediate product are used in the same production process, some batches can be pruned and the usage information merged into the remaining batches. For example, in a production process, if one batch of intermediate product or raw material is used up and the next batch is used, pruning one batch and merging the usage information into the other batch can reduce the problems of excessive edit distance and weight parameter mismatch.
[0076] Step 406 , calculating the edit distance between the fuzzy tree of the defective product and the fuzzy tree of at least one qualified product, and determining the modification information from the fuzzy tree of the defective product to the fuzzy tree of at least one qualified product.
[0077] In this embodiment, the execution entity can calculate the edit distance between the fuzzy tree of the defective product and the fuzzy tree of each selected qualified product, and determine the change information between the fuzzy tree of the defective product and the fuzzy tree of the qualified product. Typically, during the process of converting one fuzzy tree to another, each edit operation records corresponding change information.
[0078] Step 407: Determine the difference between the defective product and at least one qualified product based on the calculated change information.
[0079] In this embodiment, the execution entity can determine the difference between the defective product and each qualified product selected based on the calculated change information. Generally, the change information from the fuzzy tree of the defective product to the fuzzy tree of each qualified product selected is the difference between the defective product and the qualified product.
[0080] Step 408 , statistically analyzing the causes of the calculated differences to obtain the defect causes and probabilities of defective products.
[0081] In this embodiment, the execution entity may count the calculated causes of the differences to obtain the defect factors and probabilities of the defective products. Typically, the calculated causes of the differences are the defect factors of the defective products. Furthermore, by counting the calculated causes of the differences, the probability of each defect factor can be determined. Subsequently, the execution entity may rank the defect factors based on their probabilities and output the ranked defect factors and their probabilities.
[0082] from Figure 4 It can be seen that Figure 2 Compared to the corresponding embodiment, process 400 of the defect location method in this embodiment emphasizes the steps of calculating similarity and difference. Therefore, the solution described in this embodiment can quickly determine the similarity between defective and qualified products by calculating the edit distance of a tree structure. Furthermore, discretizing the tree structure into a fuzzy tree and determining differences based on the edit distance of the fuzzy tree improves the accuracy of the determined differences, thereby enhancing the precision of defect location.
[0083] Further references Figure 5 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for locating defects. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0084] like Figure 5 As shown, the apparatus 500 for locating defects in this embodiment may include: an acquisition unit 501, a first calculation unit 502, a selection unit 503, a second calculation unit 504, and a positioning unit 505. The acquisition unit 501 is configured to acquire a tree structure of a defective product and a tree structure of multiple qualified products, wherein the multiple qualified products have the same model as the defective product, and the tree structure is used to record the production process of the products; the first calculation unit 502 is configured to calculate the similarity between the defective product and the multiple qualified products based on the tree structure of the defective product and the tree structure of the multiple qualified products; the selection unit 503 is configured to select the tree structure of at least one qualified product from the tree structures of the multiple qualified products based on the calculated similarity; the second calculation unit 504 is configured to calculate the difference between the defective product and the at least one qualified product based on the tree structure of the defective product and the tree structure of the at least one qualified product; and the positioning unit 505 is configured to locate the defect of the defective product based on the calculated difference.
[0085] In this embodiment, in the apparatus 500 for locating defects, the specific processing of the acquisition unit 501, the first calculation unit 502, the selection unit 503, the second calculation unit 504 and the positioning unit 505 and the technical effects thereof can be referred to respectively. Figure 2The relevant descriptions of steps 201-205 in the corresponding embodiment are not repeated here.
[0086] In some optional implementations of this embodiment, the tree structure includes multiple layers, each layer includes at least one node, each node stores one of the raw materials, intermediate products and final products in the production process of the product, and the edges between the nodes of adjacent layers store the parameters of the product production process.
[0087] In some optional implementations of this embodiment, the root node of the tree structure stores the final product, the leaf nodes of the tree structure store the raw materials, and the intermediate nodes of the tree structure store the intermediate products. The node storing the final product or the intermediate product and the node storing the raw materials or the intermediate products used to produce the final product or the intermediate product are in a parent-child relationship, and the edge between the parent node and the child node stores the parameters of the production process of the raw materials or intermediate products stored by the child node to produce the final product or intermediate product stored by the parent node.
[0088] In some optional implementations of this embodiment, the first calculation unit 502 is further configured to: calculate the edit distance between the tree structure of the defective product and the tree structures of multiple qualified products; and determine the similarity between the defective product and the multiple qualified products based on the calculated edit distance.
[0089] In some optional implementations of this embodiment, the editing operation for calculating the edit distance includes at least one of the following: deleting a node, and if the deleted node is an intermediate node, connecting the child node of the deleted node to the parent node of the deleted node; inserting an intermediate node between the parent node and the child node; modifying the information stored in the node.
[0090] In some optional implementations of this embodiment, the second computing unit 504 is further configured to: discretize the continuous values stored in the tree structure of the defective product and the tree structure of at least one qualified product to obtain a fuzzy tree of the defective product and a fuzzy tree of at least one qualified product; calculate the edit distance between the fuzzy tree of the defective product and the fuzzy tree of at least one qualified product, and determine the change information from the fuzzy tree of the defective product to the fuzzy tree of at least one qualified product; and determine the difference between the defective product and the at least one qualified product based on the calculated change information.
[0091] In some optional implementations of this embodiment, the algorithm for discretizing continuous values is a K-means clustering algorithm.
[0092] In some optional implementations of this embodiment, if multiple batches of the same raw material or intermediate product are used in the same production process, some batches are pruned and the usage information is merged into the remaining batches.
[0093] In some optional implementations of this embodiment, the positioning unit 505 is further configured to: collect statistics on the causes of the calculated differences to obtain the defect causes and probabilities of defective products.
[0094] Reference below Figure 6 , which shows an electronic device (eg Figure 1 A structural diagram of a computer system 600 of the server 103 shown. Figure 6 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0095] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the system 600 are also stored in the RAM 603. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0096] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, and the like; an output section 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN card or a modem. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 610 as needed, so that computer programs read therefrom can be installed into the storage section 608 as needed.
[0097] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the method of the present application are performed.
[0098] It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0099] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or electronic device. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0100] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0101] The units involved in the embodiments described in the present application can be implemented by software or by hardware. The described units can also be set in a processor. For example, they can be described as: a processor includes an acquisition unit, a first calculation unit, a selection unit, a second calculation unit and a positioning unit. Among them, the names of these units do not constitute a limitation of the unit itself in this case. For example, the acquisition unit can also be described as "a unit for obtaining a tree structure of defective products and a tree structure of multiple qualified products."
[0102] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or it may exist independently and not be assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device: obtains a tree structure of a defective product and a tree structure of multiple qualified products, wherein the multiple qualified products have the same model as the defective product, and the tree structure is used to record the production process of the product; based on the tree structure of the defective product and the tree structure of the multiple qualified products, calculates the similarity between the defective product and the multiple qualified products; based on the calculated similarity, selects the tree structure of at least one qualified product from the tree structures of the multiple qualified products; based on the tree structure of the defective product and the tree structure of at least one qualified product, calculates the difference between the defective product and at least one qualified product; based on the calculated difference, locates the defect of the defective product.
[0103] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for locating a defect, comprising: Obtain a tree structure of a defective product and a tree structure of multiple qualified products, wherein the multiple qualified products have the same model as the defective product, the tree structure is used to record the production process of the product, the tree structure includes multiple layers, each layer includes at least one node, each node stores one of the raw materials, intermediate products, and final products in the product production process, and the edges between nodes in adjacent layers store parameters of the product production process; Calculating similarities between the defective product and the plurality of qualified products based on the tree structure of the defective product and the tree structures of the plurality of qualified products; Selecting at least one qualified product tree structure from the plurality of qualified product tree structures based on the calculated similarity; Calculating a difference between the defective product and the at least one qualified product based on the tree structure of the defective product and the tree structure of the at least one qualified product; Based on the calculated difference, the defect of the defective product is located.
2. The method according to claim 1, wherein The root node of the tree structure stores the final product, the leaf nodes of the tree structure store the raw materials, and the intermediate nodes of the tree structure store the intermediate products. The node storing the final product or the intermediate product and the node storing the raw materials or the intermediate products used to produce the final product or the intermediate product are in a parent-child relationship, and the edge between the parent node and the child node stores the parameters of the production process of the raw materials or intermediate products stored by the child node to produce the final product or intermediate product stored by the parent node.
3. The method according to claim 2, wherein: The calculating the similarity between the defective product and the plurality of qualified products based on the tree structure of the defective product and the tree structure of the plurality of qualified products includes: Calculating an edit distance between the tree structure of the defective product and the tree structures of the plurality of qualified products; Based on the calculated edit distance, a similarity between the defective product and the plurality of qualified products is determined.
4. The method according to claim 3, wherein: The edit operations for computing the edit distance include at least one of the following: Delete the node, and if the deleted node is an intermediate node, connect the child nodes of the deleted node to the parent node of the deleted node; Insert an intermediate node between the parent node and the child node; Modify the information stored in a node.
5. The method according to claim 2, wherein: The calculating the difference between the defective product and the at least one qualified product based on the tree structure of the defective product and the tree structure of the at least one qualified product includes: discretizing the continuous values stored in the tree structure of the defective product and the tree structure of the at least one qualified product to obtain a fuzzy tree of the defective product and a fuzzy tree of the at least one qualified product; calculating an edit distance between the fuzzy tree of the defective product and the fuzzy tree of the at least one qualified product, and determining change information from the fuzzy tree of the defective product to the fuzzy tree of the at least one qualified product; Based on the calculated change information, a difference between the defective product and the at least one qualified product is determined.
6. The method according to claim 5, wherein: The algorithm for discretizing continuous values is the K-means clustering algorithm.
7. The method according to claim 5, wherein: If multiple batches of the same raw material or intermediate product are used in the same production process, prune some of the batches and merge the usage information into the remaining batches.
8. The method according to claim 5, wherein The step of locating the defect of the defective product based on the calculated difference includes: The causes of the calculated differences are statistically analyzed to obtain the defect causes and probabilities of the defective products.
9. A device for locating a defect, comprising: an acquisition unit configured to acquire a tree structure of a defective product and a tree structure of a plurality of qualified products, wherein the plurality of qualified products have the same model as the defective product, the tree structure being used to record a production process of the product, the tree structure comprising a plurality of layers, each layer comprising at least one node, each node storing one of raw materials, intermediate products, and final products in the production process of the product, and edges between nodes in adjacent layers storing parameters of the product production process; a first calculating unit configured to calculate a similarity between the defective product and the plurality of qualified products based on the tree structure of the defective product and the tree structure of the plurality of qualified products; a selection unit configured to select at least one tree structure of a qualified product from the tree structures of the plurality of qualified products based on the calculated similarity; a second calculating unit configured to calculate a difference between the defective product and the at least one qualified product based on the tree structure of the defective product and the tree structure of the at least one qualified product; The positioning unit is configured to locate a defect of the defective product based on the calculated difference.
10. The device according to claim 9, wherein The root node of the tree structure stores the final product, the leaf nodes of the tree structure store the raw materials, and the intermediate nodes of the tree structure store the intermediate products. The node storing the final product or the intermediate product and the node storing the raw materials or the intermediate products used to produce the final product or the intermediate product are in a parent-child relationship, and the edge between the parent node and the child node stores the parameters of the production process of the raw materials or intermediate products stored by the child node to produce the final product or intermediate product stored by the parent node.
11. The device according to claim 10, wherein The first computing unit is further configured to: Calculating an edit distance between the tree structure of the defective product and the tree structures of the plurality of qualified products; Based on the calculated edit distance, a similarity between the defective product and the plurality of qualified products is determined.
12. The device according to claim 11, wherein The edit operations for computing the edit distance include at least one of the following: Delete the node, and if the deleted node is an intermediate node, connect the child nodes of the deleted node to the parent node of the deleted node; Insert an intermediate node between the parent node and the child node; Modify the information stored in a node.
13. The device according to claim 10, wherein The second computing unit is further configured to: discretizing the continuous values stored in the tree structure of the defective product and the tree structure of the at least one qualified product to obtain a fuzzy tree of the defective product and a fuzzy tree of the at least one qualified product; calculating an edit distance between the fuzzy tree of the defective product and the fuzzy tree of the at least one qualified product, and determining change information from the fuzzy tree of the defective product to the fuzzy tree of the at least one qualified product; Based on the calculated change information, a difference between the defective product and the at least one qualified product is determined.
14. The device according to claim 13, wherein The algorithm for discretizing continuous values is the K-means clustering algorithm.
15. The device according to claim 13, wherein If multiple batches of the same raw material or intermediate product are used in the same production process, prune some of the batches and merge the usage information into the remaining batches.
16. The device according to claim 13, wherein The positioning unit is further configured to: The causes of the calculated differences are statistically analyzed to obtain the defect causes and probabilities of the defective products.
17. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
18. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Structural synthesizing method oriented to abstraction fault tree
CN108153842A
Chemical product quality prediction method and system based on a random forest
CN109523086A