CN110704449A - Method and apparatus for locating defects - Google Patents

Method and apparatus for locating defects Download PDF

Info

Publication number
CN110704449A
CN110704449A CN201910967953.8A CN201910967953A CN110704449A CN 110704449 A CN110704449 A CN 110704449A CN 201910967953 A CN201910967953 A CN 201910967953A CN 110704449 A CN110704449 A CN 110704449A
Authority
CN
China
Prior art keywords
product
tree structure
qualified
node
tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910967953.8A
Other languages
Chinese (zh)
Inventor
许铭
解鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910967953.8A priority Critical patent/CN110704449A/en
Publication of CN110704449A publication Critical patent/CN110704449A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06395Quality analysis or management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Probability & Statistics with Applications (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Game Theory and Decision Science (AREA)
  • Fuzzy Systems (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • General Factory Administration (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application discloses a method and a device for positioning defects. One embodiment of the method comprises: acquiring a tree structure of a defective product and tree structures of a plurality of qualified products, wherein the types of the plurality of qualified products are the same as the types of the defective product, and the tree structures are used for recording the production process of the products; calculating the similarity between the defective product and the qualified products based on the tree structure of the defective product and the tree structures of the qualified products; selecting a tree structure of at least one qualified product from the tree structures of the plurality of qualified products 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 differences, the defects of the defective product are located. The embodiment relates to the field of cloud computing, and provides an effective defect positioning mode.

Description

Method and apparatus for locating defects
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method and a device for positioning defects.
Background
The defect products in the production process, namely unqualified products, are analyzed and the defects are positioned, so that a large amount of time cost for positioning the defects can be saved. At present, the production process of a defective product is generally leveled into a one-dimensional vector, and the dimension is fixed. And performing feature engineering on the input vector and predicting to obtain feature importance degree sequencing. However, the feature importance ranking cannot be used to locate the defect problem, and therefore the defect location problem cannot be solved.
Disclosure of Invention
The embodiment of the application provides a method and a device for positioning defects.
In a first aspect, an embodiment of the present application provides a method for locating a defect, including: acquiring a tree structure of a defective product and tree structures of a plurality of qualified products, wherein the types of the plurality of qualified products are the same as the types of the defective product, and the tree structures are used for recording the production process of the products; calculating the similarity between the defective product and the qualified products based on the tree structure of the defective product and the tree structures of the qualified products; selecting a tree structure of at least one qualified product from the tree structures of the plurality of qualified products 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 differences, the defects of the defective product are located.
In some embodiments, the tree structure includes a plurality of levels, each level including at least one node, each node storing one of a raw material, an intermediate product, and a final product in the production of the product, edges between nodes of adjacent levels storing parameters in the production of the product.
In some embodiments, a root node of the tree structure stores an end product, a leaf node of the tree structure stores a raw material, an intermediate node of the tree structure stores an intermediate product, the node storing the end product or intermediate product is in a parent-child relationship with the node storing the raw material or intermediate product used to produce the end product or intermediate product, and an edge between the parent node and the child node stores a parameter in the production process for producing the end product or intermediate product stored by the child node from the raw material or intermediate product stored by the child node.
In some embodiments, calculating the similarity of the defective product to the plurality of qualified products based on the tree structure of the defective product and the tree structures of the plurality of qualified products comprises: calculating the edit distance between the tree structure of the defective product and the tree structures of a plurality of qualified products; based on the calculated edit distance, the similarity of the defective product and a plurality of qualified products is determined.
In some embodiments, the editing operation to calculate the edit distance includes at least one of: deleting a node, and if the deleted node is an intermediate node, connecting a child node of the deleted node to a parent node of the deleted node; inserting an intermediate node between the father node and the child node; the information stored in the node is modified.
In some embodiments, 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 comprises: discretizing 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 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 the at least one qualified product; based on the calculated alteration information, a difference of the defective product and at least one qualified product is determined.
In some embodiments, the algorithm to discretize the continuous values is a K-means clustering algorithm.
In some embodiments, if multiple batches of the same raw material or intermediate product are used in the same production run, portions are pruned in batches, and the amount information is incorporated into the remaining batches.
In some embodiments, locating the defect of the defective product based on the calculated difference comprises: and counting the calculated difference causes to obtain the defect cause and probability of the defective product.
In a second aspect, an embodiment of the present application provides an apparatus for locating a defect, including: 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 are of the same model as the defective product, and the tree structure is used for recording a production process of the product; a first calculation unit configured to calculate similarities of 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; a selecting unit configured to select a tree structure of at least one qualified product from among tree structures of a plurality of qualified products based on the calculated similarity; a second calculation 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; a positioning unit configured to position a defect of the defective product based on the calculated difference.
In some embodiments, the tree structure includes a plurality of levels, each level including at least one node, each node storing one of a raw material, an intermediate product, and a final product in the production of the product, edges between nodes of adjacent levels storing parameters in the production of the product.
In some embodiments, a root node of the tree structure stores an end product, a leaf node of the tree structure stores a raw material, an intermediate node of the tree structure stores an intermediate product, the node storing the end product or intermediate product is in a parent-child relationship with the node storing the raw material or intermediate product used to produce the end product or intermediate product, and an edge between the parent node and the child node stores a parameter in the production process for producing the end product or intermediate product stored by the child node from the raw material or intermediate product stored by the child node.
In some embodiments, the first computing unit is further configured to: calculating the edit distance between the tree structure of the defective product and the tree structures of a plurality of qualified products; based on the calculated edit distance, the similarity of the defective product and a plurality of qualified products is determined.
In some embodiments, the editing operation to calculate the edit distance includes at least one of: deleting a node, and if the deleted node is an intermediate node, connecting a child node of the deleted node to a parent node of the deleted node; inserting an intermediate node between the father node and the child node; the information stored in the node is modified.
In some embodiments, the second computing unit is further configured to: discretizing 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 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 the at least one qualified product; based on the calculated alteration information, a difference of the defective product and at least one qualified product is determined.
In some embodiments, the algorithm to discretize the continuous values is a K-means clustering algorithm.
In some embodiments, if multiple batches of the same raw material or intermediate product are used in the same production run, portions are pruned in batches, and the amount information is incorporated into the remaining batches.
In some embodiments, the positioning unit is further configured to: and counting the calculated difference causes to obtain the defect cause and probability of the defective product.
In a third aspect, an embodiment of the present application provides an electronic device, including: 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 are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
According to the method and the device for positioning the defects, firstly, the similarity between the defective products and the qualified products is calculated based on the obtained tree structure of the defective products and the tree structures of the qualified products; then selecting a tree structure of at least one qualified product from the tree structures of the qualified products based on the calculated similarity; then 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; and finally, positioning the defects of the defective products based on the calculated differences. Based on the tree structure location defect of the product, an effective defect location mode is provided.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture to which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for locating defects according to the present application;
FIG. 3 is a schematic diagram of a tree structure of a product;
FIG. 4 is a flow chart of yet another embodiment of a method for locating defects according to the present application;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for locating defects according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing an electronic device according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the method for locating defects or the apparatus for locating defects of the present application may be applied.
As shown in fig. 1, a system architecture 100 may include a terminal device 101, a network 102, and a server 103. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal device 101 to interact with server 103 over network 102 to receive or send messages and the like. The terminal apparatus 101 may be hardware or software. When the terminal apparatus 101 is hardware, it may be various electronic apparatuses. Including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatus 101 is software, it can be installed in the above-described electronic apparatus. It may be implemented as multiple pieces of software or software modules, or as a single piece of software or software module. And is not particularly limited herein.
The server 103 may provide various services. For example, the server 103 may perform processing such as analysis on data such as the tree structure of a defective product and the tree structures of a plurality of qualified products acquired from the terminal apparatus 101, and generate a processing result (e.g., a defect of the defective product).
The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 103 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for locating the defect provided by the embodiment of the present application is generally performed by the server 103, and accordingly, the apparatus for locating the defect is generally disposed in the server 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method for locating defects according to the present application is shown. The method for locating defects comprises the following steps:
step 201, a tree structure of a defective product and tree structures of a plurality of qualified products are obtained.
In the present embodiment, an execution subject (e.g., the server 103 shown in fig. 1) of the method for locating a defect may acquire a tree structure of a defective product and a tree structure of a plurality of qualified products.
Here, the plurality of good products acquired by the execution main body are the same as the normal model of the defective product. For example, in the case where the product is a metal product, a plurality of qualified products and defective products acquired by the execution main body may have the same metal-code.
Here, the execution agent may obtain the tree structure of the product from a terminal device (for example, the terminal device 101 shown in fig. 1) communicatively connected thereto or locally. For example, the user may transmit the tree structure of the defective product and the tree structures of the plurality of qualified products to the execution main body using the terminal device. For another example, the user may transmit the tree structure of the defective product to the execution main body using the terminal device, and then the execution main body may acquire the tree structures of a plurality of qualified products of the same model as the defective product from the tree structures of a large number of qualified products stored thereon. For another example, the user may send the identifier of the defective product to the execution main body using the terminal device, and the execution main body may first obtain the tree structure of the defective product indicated by the identifier from the tree structures of the large number of defective products stored thereon, and then obtain a plurality of tree structures of qualified products having the same model as the obtained defective product from the tree structures of the large number of qualified products stored thereon.
Here, the tree structure may be used to record the production process of the product. In a general case, the tree structure may include a plurality of layers. Each layer may include at least one node. Each node may store one of raw materials, intermediate products, and end products in the production process of the product. Edges between nodes of adjacent layers may store parameters in the production process of the product. In some embodiments, the root node of the tree structure may store the end product. Leaf nodes of the tree structure may store raw materials. Intermediate nodes of the tree structure may store intermediate products. A node that stores an end product or an intermediate product may be in a parent-child relationship with a node that stores raw materials or intermediate products used to produce the end product or the intermediate product. An edge between a parent node and a child node may store a parameter (e.g., a fusion parameter) in the production process that produces a final product or intermediate stored by the parent node from a raw material or intermediate stored by the child node.
For ease of understanding, fig. 3 shows a schematic diagram of a tree structure of a product. As shown in fig. 3, the tree structure of the product includes 4 layers. The fourth level includes two leaf nodes storing raw material 1 and raw material 2, respectively. The third level includes one middle node and five leaf nodes. The intermediate node stores intermediate product 1. Intermediate 1 is produced from starting material 1 and starting material 2. The leaf nodes store raw material 3, raw material 4, raw material 5, raw material 6 and raw material 7, respectively. The edge between the node storing intermediate product 1 and the node storing raw material 2 stores the fusion parameter in the production process of intermediate product 1. The second layer includes two intermediate nodes storing intermediate product 2 and intermediate product 3, respectively. Intermediate 2 is produced from starting material 3, starting material 4 and intermediate 1. The edges between the node storing intermediate product 2 and the node storing raw material 3, the node storing raw material 4 and the node storing intermediate product 1 store the fusion parameters in the production process of intermediate product 2. Intermediate product 3 is produced from raw material 5, raw material 6 and raw material 7. The edges between the node storing the intermediate product 3 and the node storing the raw material 5, the node storing the raw material 6 and the node storing the raw material 7 store the fusion parameters in the production process of the intermediate product 3. The first level includes a root node that stores the end 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.
Step 202, calculating the similarity between the defective product and the qualified products based on the tree structure of the defective product and the tree structures of the qualified products.
In this embodiment, the execution subject may calculate the similarity 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. Specifically, the execution subject may calculate a similarity between the tree structure of the defective product and the tree structure of each of the qualified products as a similarity between the defective product and the qualified product.
Step 203, selecting a tree structure of at least one qualified product from the tree structures of the qualified products based on the calculated similarity.
In this embodiment, the execution subject may select the tree structure of at least one qualified product from the tree structures of the plurality of qualified products based on the calculated similarity.
In general, the execution subject may select a tree structure of at least one qualified product having a higher similarity to the defective product from among tree structures of a plurality of qualified products. For example, the execution body may sort the tree structures of the qualified products according to the similarity, and select the tree structures of a preset number of qualified products from the side with the high similarity. For another example, the execution subject may select a tree structure of a qualified product with a similarity greater than a preset similarity threshold from the tree structures of a plurality of qualified products.
And step 204, 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.
In this embodiment, the execution body 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 subject may calculate a difference between the tree structure of the defective product and the tree structure of each selected qualified product as a difference between the defective product and the qualified product.
Step 205, based on the calculated difference, the defect of the defective product is located.
In this embodiment, the execution body may locate the defect of the defective product based on the calculated difference. For example, the execution body may determine a cause of a difference between the defective product and each of the picked-up good products as a defect cause of the defective product.
According to the method for positioning the defects, firstly, similarity between the defective products and the qualified products is calculated based on the obtained tree structure of the defective products and the tree structures of the qualified products; then selecting a tree structure of at least one qualified product from the tree structures of the qualified products based on the calculated similarity; then 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; and finally, positioning the defects of the defective products based on the calculated differences. Based on the tree structure location defect of the product, an effective defect location mode is provided.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for locating defects according to the present application is shown. The method for locating defects comprises the following steps:
step 401, a tree structure of a defective product and a tree structure of a plurality of qualified products are obtained.
In this embodiment, the specific operation of step 401 has been described in detail in step 201 in the embodiment shown in fig. 2, and is not described herein again.
Step 402, calculating the edit distance between the tree structure of the defective product and the tree structures of the qualified products.
In this embodiment, the execution subject may calculate an edit distance between the tree structure of the defective product and the tree structure of each of the qualified products.
In practice, the edit distance, also called Levenshtein distance, refers to the minimum number of edit operations required to change from one character string to another. Permitted editing operations include replacing one character with another, inserting one character, and deleting one character. Generally, the smaller the edit distance, the greater the similarity of two character strings. Here, the edit distance of two tree structures may be the minimum cost sequence to convert one tree structure to the other. In general, for two tree structures, there are many different sequences that can convert one tree structure to another. Each editing operation is assigned a cost. The cost of an edit sequence is the sum of its edit operation costs. While the edit distance of the tree structure is the least costly edit sequence.
In general, the editing operations that calculate the edit distance of two tree structures may include, but are not limited to, at least one of:
1. deleting a node, and if the deleted node is an intermediate node, connecting a child node of the deleted node to a parent node of the deleted node;
2. inserting an intermediate node between the father node and the child node;
3. the information stored in the node is modified.
In step 403, the similarity between the defective product and the plurality of qualified products is determined based on the calculated edit distance.
In this embodiment, the execution body may determine the similarity between the defective product and each of the non-defective products based on the calculated edit distance. Generally, the smaller the edit distance, the higher the similarity of the defective product to the qualified product; conversely, the less the defective product has a lower similarity to the acceptable product.
Step 404, selecting a tree structure of at least one qualified product from the tree structures of the plurality of qualified products based on the calculated similarity.
In this embodiment, the specific operation of step 404 has been described in detail in step 203 in the embodiment shown in fig. 2, and is not described herein again.
Step 405, 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.
In this embodiment, the execution subject may discretize the continuous values stored in the tree structure of the defective product and the tree structure of the at least one qualified product, thereby obtaining the fuzzy tree of the defective product and the fuzzy tree of the at least one qualified product. The continuous value stored in the tree structure may be, for example, the amount of the raw material used, or the like. The usage amount of the raw material is dispersed into the category value, so that the condition that the same raw material is considered as different raw materials due to the error existing in the actual measurement weighing can be avoided or reduced.
In some optional implementations of the present embodiment, the algorithm to discretize the continuous value may be a K-means (K-means) clustering algorithm.
In some alternative implementations of this embodiment, if multiple batches of the same raw material or intermediate product are used in the same production run, portions are pruned in batches and the usage information is incorporated into the remaining batches. For example, in a single production process, when a batch of intermediate products or raw materials is used up and a next batch is used, one batch is pruned and the usage information is merged into another batch, thereby reducing the problems of excessive editing distance and unmatched weight parameters.
And 406, calculating the edit distance between the fuzzy tree of the defective product and the fuzzy tree of the at least one qualified product, and determining the change information from the fuzzy tree of the defective product to the fuzzy tree of the at least one qualified product.
In this embodiment, the execution subject may calculate the edit distance between the fuzzy tree of the defective product and the fuzzy tree of each selected qualified product, and determine the modification information from the fuzzy tree of the defective product to the fuzzy tree of the qualified product. In general, in the process of converting one fuzzy tree into another fuzzy tree, every time an editing operation is performed, corresponding modification information is recorded.
Step 407, determining a difference between the defective product and at least one qualified product based on the calculated modification information.
In this embodiment, the execution body may determine the difference between the defective product and each of the selected good products based on the calculated modification information. Generally, the change information of the fuzzy tree of the defective product to the fuzzy tree of each selected qualified product is the difference between the defective product and the qualified product
And step 408, counting the calculated causes of the differences to obtain the defect causes and the probability of the defective products.
In this embodiment, the execution agent may count the calculated cause of the difference to obtain defect factors and probabilities of defective products. Generally, the cause of the calculated difference is a defect factor of the defective product. And, by counting the number of causes of the calculated difference, the probability of each defect factor can be determined. Then, the execution agent may sort the defect factors based on the probabilities, and output the sorted defect factors and the probabilities thereof.
As can be seen from fig. 4, compared to the embodiment corresponding to fig. 2, the flow 400 of the method for locating defects in the present embodiment highlights the steps of calculating the similarity and the difference. Therefore, the scheme described in the embodiment can quickly determine the similarity between the defective product and the qualified product by calculating the edit distance of the tree structure. Meanwhile, the tree structure is discretized into the fuzzy tree, and the difference is determined based on the edit distance of the fuzzy tree, so that the accuracy of the determined difference is improved, and the accuracy of defect positioning is further improved.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present application provides an embodiment of an apparatus for locating defects, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for locating a defect of the present 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 acquiring unit 501 is 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 are the same as the defective product in model, and the tree structure is used for recording a production process of the product; a first calculating unit 502 configured to calculate similarities of 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; a selecting unit 503 configured to select a tree structure of at least one qualified product from the tree structures of the plurality of qualified products based on the calculated similarity; a second calculating unit 504 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; a positioning unit 505 configured to position the defect of the defective product based on the calculated difference.
In the present embodiment, in the apparatus 500 for locating defects: the specific processing of the obtaining unit 501, the first calculating unit 502, the selecting unit 503, the second calculating unit 504 and the positioning unit 505 and the technical effects thereof can be referred to the related description of step 201 and step 205 in the corresponding embodiment of fig. 2, and are not described herein again.
In some optional implementations of this embodiment, the tree structure includes a plurality of layers, each layer including at least one node, each node storing one of a raw material, an intermediate product, and a final product in a production process of the product, and edges between nodes of adjacent layers storing parameters in the production process of the product.
In some optional implementations of this embodiment, a root node of the tree structure stores a final product, leaf nodes of the tree structure store raw materials, an intermediate node of the tree structure stores an intermediate product, a node storing the final product or the intermediate product and a node storing the raw material or the intermediate product used to produce the final product or the intermediate product are in a parent-child relationship, and an edge between the parent node and the child node stores a parameter in a production process of producing the final product or the intermediate product stored by the parent node from the raw material or the intermediate product stored by the child node.
In some optional implementations of the present embodiment, the first computing unit 502 is further configured to: calculating the edit distance between the tree structure of the defective product and the tree structures of a plurality of qualified products; based on the calculated edit distance, the similarity of the defective product and a plurality of qualified products is determined.
In some optional implementations of the embodiment, the editing operation of calculating the editing distance includes at least one of: deleting a node, and if the deleted node is an intermediate node, connecting a child node of the deleted node to a parent node of the deleted node; inserting an intermediate node between the father node and the child node; the information stored in the node is modified.
In some optional implementations of this embodiment, the second computing unit 504 is further configured to: discretizing 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 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 the at least one qualified product; based on the calculated alteration information, a difference of the defective product and at least one qualified product is determined.
In some optional implementations of the present embodiment, the algorithm to discretize the continuous values is a K-means clustering algorithm.
In some alternative implementations of this embodiment, if multiple batches of the same raw material or intermediate product are used in the same production run, portions are pruned in batches and the usage information is incorporated into the remaining batches.
In some optional implementations of this embodiment, the positioning unit 505 is further configured to: and counting the calculated difference causes to obtain the defect cause and probability of the defective product.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing an electronic device (e.g., server 103 shown in FIG. 1) of an embodiment of the present application is shown. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that 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 section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. 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 bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 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, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium described herein can 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 electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or electronic device. In the case of a remote computer, the remote computer may 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a first calculation unit, a selection unit, a second calculation unit, and a positioning unit. Where the names of these units do not constitute a limitation of the unit itself in this case, for example, the acquisition unit may also be described as "a unit acquiring a tree structure of a defective product and a tree structure of a plurality of qualified products".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a tree structure of a defective product and tree structures of a plurality of qualified products, wherein the types of the plurality of qualified products are the same as the types of the defective product, and the tree structures are used for recording the production process of the products; calculating the similarity between the defective product and the qualified products based on the tree structure of the defective product and the tree structures of the qualified products; selecting a tree structure of at least one qualified product from the tree structures of the plurality of qualified products 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 differences, the defects of the defective product are located.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (20)

1. A method for locating defects, comprising:
acquiring a tree structure of a defective product and a tree structure of a plurality of qualified products, wherein the types of the qualified products are the same as the types of the defective product, and the tree structure is used for recording the production process of the product;
calculating the similarity of the defective product and the qualified products based on the tree structure of the defective product and the tree structures of the qualified products;
selecting a tree structure of at least one qualified product from the tree structures of the plurality of qualified products based on the calculated similarity;
calculating a difference of 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 differences, a defect of the defective product is located.
2. The method of claim 1, wherein the tree structure comprises a plurality of layers, each layer comprising at least one node, each node storing one of a raw material, an intermediate product, and a final product in the production of the product, edges between nodes of adjacent layers storing parameters in the production of the product.
3. The method of claim 2, wherein a root node of the tree structure stores an end product, leaf nodes of the tree structure store raw materials, intermediate nodes of the tree structure store intermediate products, the nodes storing the end product or intermediate product are in a parent-child relationship with the nodes storing the raw materials or intermediate products used to produce the end product or intermediate product, and edges between parent and child nodes store parameters during production of the end product or intermediate product stored by the child node producing the parent node from the raw materials or intermediate products stored by the child node.
4. The method of claim 3, wherein said calculating a similarity of the defective product to the plurality of qualified products based on the tree structure of the defective product and the tree structures of the plurality of qualified products comprises:
calculating edit distances between the tree structure of the defective product and the tree structures of the qualified products;
determining a similarity of the defective product and the plurality of qualified products based on the calculated edit distance.
5. The method of claim 4, wherein the editing operation that calculates the edit distance comprises at least one of:
deleting a node, and if the deleted node is an intermediate node, connecting a child node of the deleted node to a parent node of the deleted node;
inserting an intermediate node between the father node and the child node;
the information stored in the node is modified.
6. The method of claim 3, wherein said calculating the difference of 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 comprises:
discretizing 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 the edit distance between the fuzzy tree of the defective product and the fuzzy tree of the at least one qualified product, and determining the change information from the fuzzy tree of the defective product to the fuzzy tree of the at least one qualified product;
determining a difference between the defective product and the at least one qualified product based on the calculated alteration information.
7. The method of claim 6, wherein the algorithm that discretizes continuous values is a K-means clustering algorithm.
8. The method of claim 6, wherein if multiple batches of the same raw material or intermediate product are used in the same production run, parts are pruned in batches and the dosage information is incorporated into the remaining batches.
9. The method of claim 6, wherein said locating a defect of the defective product based on the calculated difference comprises:
and counting the calculated difference causes to obtain the defect cause and the probability of the defect product.
10. An apparatus for locating defects, 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 are of the same model as the defective product, and the tree structure is used for recording a production process of a product;
a first calculation unit configured to calculate similarities of 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;
a selecting unit configured to select a tree structure of at least one qualified product from the tree structures of the plurality of qualified products based on the calculated similarity;
a second calculation unit configured to calculate a difference of 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;
a positioning unit configured to position a defect of the defective product based on the calculated difference.
11. The apparatus of claim 10, wherein the tree structure comprises a plurality of layers, each layer comprising at least one node, each node storing one of a raw material, an intermediate product, and an end product in a production process of a product, edges between nodes of adjacent layers storing parameters in the production process of the product.
12. The apparatus of claim 11, wherein a root node of the tree structure stores an end product, leaf nodes of the tree structure store raw materials, intermediate nodes of the tree structure store intermediate products, the nodes storing the end product or intermediate product are in a parent-child relationship with the nodes storing the raw materials or intermediate products used to produce the end product or intermediate product, and edges between parent and child nodes store parameters during production of the end product or intermediate product stored by the child node producing the parent node from the raw materials or intermediate products stored by the child node.
13. The apparatus of claim 12, wherein the first computing unit is further configured to:
calculating edit distances between the tree structure of the defective product and the tree structures of the qualified products;
determining a similarity of the defective product and the plurality of qualified products based on the calculated edit distance.
14. The apparatus of claim 13, wherein the editing operation to calculate an edit distance comprises at least one of:
deleting a node, and if the deleted node is an intermediate node, connecting a child node of the deleted node to a parent node of the deleted node;
inserting an intermediate node between the father node and the child node;
the information stored in the node is modified.
15. The apparatus of claim 12, wherein the second computing unit is further configured to:
discretizing 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 the edit distance between the fuzzy tree of the defective product and the fuzzy tree of the at least one qualified product, and determining the change information from the fuzzy tree of the defective product to the fuzzy tree of the at least one qualified product;
determining a difference between the defective product and the at least one qualified product based on the calculated alteration information.
16. The apparatus of claim 15, wherein the algorithm to discretize the continuous values is a K-means clustering algorithm.
17. The apparatus of claim 15, wherein if multiple batches of the same raw material or intermediate product are used in the same production run, parts are pruned in batches and the usage information is incorporated into the remaining batches.
18. The apparatus of claim 15, wherein the positioning unit is further configured to:
and counting the calculated difference causes to obtain the defect cause and the probability of the defect product.
19. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
20. A computer-readable medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN201910967953.8A 2019-10-12 2019-10-12 Method and apparatus for locating defects Pending CN110704449A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910967953.8A CN110704449A (en) 2019-10-12 2019-10-12 Method and apparatus for locating defects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910967953.8A CN110704449A (en) 2019-10-12 2019-10-12 Method and apparatus for locating defects

Publications (1)

Publication Number Publication Date
CN110704449A true CN110704449A (en) 2020-01-17

Family

ID=69198530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910967953.8A Pending CN110704449A (en) 2019-10-12 2019-10-12 Method and apparatus for locating defects

Country Status (1)

Country Link
CN (1) CN110704449A (en)

Similar Documents

Publication Publication Date Title
US20120016701A1 (en) Intelligent timesheet assistance
CN109634941B (en) Medical data processing method and device, electronic equipment and storage medium
CN111126045A (en) Text error correction method and device
CN113326247B (en) Cloud data migration method and device and electronic equipment
CN113220907B (en) Construction method and device of business knowledge graph, medium and electronic equipment
CN111427974A (en) Data quality evaluation management method and device
CN113448869B (en) Method and device for generating test case, electronic equipment and computer readable medium
CN110879776A (en) Test case generation method and device
WO2023134188A1 (en) Index determination method and apparatus, and electronic device and computer-readable medium
CN110688111A (en) Configuration method, device, server and storage medium of business process
US20220405095A1 (en) Method, device, and program product for managing object in software development project
CN110490132B (en) Data processing method and device
CN113448821B (en) Method and device for identifying engineering defects
CN115345600B (en) RPA flow generation method and device
CN109597819B (en) Method and apparatus for updating a database
CN115328992B (en) Event analysis method, device, medium and electronic equipment
CN114710397B (en) Service link fault root cause positioning method and device, electronic equipment and medium
CN112966971B (en) Project workload assessment method and device
CN110704449A (en) Method and apparatus for locating defects
CN111967806B (en) User risk updating method and device based on periodic retrace and electronic equipment
CN114881521A (en) Service evaluation method, device, electronic equipment and storage medium
CN114706856A (en) Fault processing method and device, electronic equipment and computer readable storage medium
CN112801688A (en) Method and device for positioning reason of estimation failure
CN112132722A (en) Method and device for determining abnormal trend of number of government affair hotlines, electronic equipment and medium
CN111767290A (en) Method and apparatus for updating a user representation

Legal Events

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