Embodiments of the present invention disclose a defect prediction method and apparatus, which relate to the data processing field, and implement accurate and quick locating of a defect in a faulty product. A specific solution is as follows: selecting a training attribute set from a pre-stored product fault record according to a target attribute, and combining the target attribute and the training attribute set into a training set, where the target attribute is a defect attribute of a historical faulty product; generating a classifier set according to the training set, where the classifier set includes at least two tree classifiers; and predicting a defect of a faulty product by using the classifier set as a prediction model. The present invention is used in a process of predicting a defect of a faulty product.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A defect prediction method, comprising: selecting a training attribute set from a pre-stored product fault record according to a target attribute, and combining the target attribute and the training attribute set into a training set, wherein the target attribute is a defect attribute of a historical faulty product; generating a classifier set according to the training set, wherein the classifier set comprises at least two tree classifiers; and predicting a defect of a faulty product by using the classifier set as a prediction model. 2. The defect prediction method according to claim 1, wherein: the training set comprises M training units, and each training unit comprises one target attribute and one training attribute set; and generating a classifier set according to the training set comprises: selecting a first training subset from the training set, generating, according to a preset policy, a first tree classifier corresponding to the first training subset, selecting a second training subset from the training set, generating, according to the preset policy, a second tree classifier corresponding to the second training subset, selecting an Nth training subset from the training set, wherein the Nth training subset comprises M′ training units, and M′ is less than or equal to M, generating, according to the preset policy, an Nth tree classifier corresponding to the Nth training subset, wherein N is an integer greater than or equal to 2, and combining N tree classifiers to generate the classifier set. 3. The defect prediction method according to claim 1, further comprising: acquiring an error rate of generated K−1 tree classifiers when a (K−1)th tree classifier is generated; and acquiring an error rate of generated K tree classifiers when a Kth tree classifier is generated, so that when a difference between the error rate of the K tree classifiers and the error rate of the K−1 tree classifiers is less than a preset threshold, the K tree classifiers are combined to generate the classifier set, wherein K is an integer less than or equal to N. 4. The defect prediction method according to claim 3, wherein acquiring an error rate of generated K tree classifiers when a Kth tree classifier is generated comprises: selecting a first type tree classifier from the classifier set according to a first training unit; generating a first prediction label of the first training unit according to the first type tree classifier; selecting a second type tree classifier from the classifier set according to a second training unit; generating a second prediction label of the second training unit according to the second type tree classifier; selecting an Mth type tree classifier from the classifier set according to an Mth training unit, wherein the Mth type tree classifier is a classifier set that does not use the Mth training unit to generate a tree classifier, and M is the number of training units comprised in the training set; generating an Mth prediction label of the Mth training unit according to the Mth type tree classifier; and acquiring the error rate of the generated K tree classifiers according to M prediction labels. 5. The defect prediction method according to claim 4, wherein generating an Mth prediction label of the Mth training unit according to the Mth type tree classifier comprises: generating the Mth prediction label according to C OOB  ( M , x M ) = arg   max y  ∑ C j ∈ C M OOB  h  ( ɛ j )  I  ( C j  ( x M ) = y ) , wherein COOB(M, xM) is the Mth prediction label of the Mth training unit, Cj is a jth tree classifier, CMOOB is the Mth type tree classifier, h(εj) is a weight of the jth tree classifier, Cj(xM) is a target attribute that is obtained according to the jth tree classifier and a training attribute set comprised in the Mth training unit, yεY, and Y is a classification label set. 6. The defect prediction method according to claim 5, wherein acquiring the error rate of the generated K tree classifiers according to M prediction labels comprises: acquiring the error rate of the generated K tree classifiers according to E  ( T ) = 1 M  ∑ r = 1 M  I  ( C OOB  ( r , x r ) = y r ) , wherein E(T) is the error rate of the generated K tree classifiers, M is the number of training units in the training set, COOB(r xr) is an rth prediction label of an rth training unit, and yr is a target attribute of the rth training unit. 7. The defect prediction method according to claim 2, wherein after generating, according to the preset policy, an Nth tree classifier corresponding to the Nth training subset, the method further comprises: selecting an N′th training subset from the training set, wherein an intersection set of the N′th training subset and the Nth training subset is empty, and the N′th training subset comprises at least one training unit; acquiring a false prediction rate of the Nth tree classifier according to the N′th training subset; and acquiring a weight of the Nth tree classifier according to the false prediction rate of the Nth tree classifier. 8. The defect prediction method according to claim 7, wherein predicting a defect of a faulty product by using the classifier set as a prediction model comprises: collecting statistics about attribute information of the faulty product; predicting the defect of the faulty product by using the classifier set as a prediction model and according to the attribute information, so as to obtain a classification label set; and acquiring a trust value of each classification label in the classification label set according to the classifier set and a weight of each tree classifier in the classifier set. 9. The defect prediction method according to claim 2, wherein the preset policy comprises a decision tree algorithm. 10. A defect prediction apparatus, comprising: a processing unit, configured to select a training attribute set from a pre-stored product fault record according to a target attribute, and combine the target attribute and the training attribute set into a training set, wherein the target attribute is a defect attribute of a historical faulty product; a generating unit, configured to generate a classifier set according to the training set that is obtained by the processing unit, wherein the classifier set comprises at least two tree classifiers; and a predicting unit, configured to predict a defect of a faulty product by using the classifier set, which is generated by the generating unit, as a prediction model. 11. The defect prediction apparatus according to claim 10, wherein: the training set comprises M training units, and each training unit comprises one target attribute and one training attribute set; and the generating unit comprises: a selecting module, configured to select a first training subset from the training set that is obtained by the processing unit, a generating module, configured to generate, according to a preset policy, a first tree classifier corresponding to the first training subset that is selected by the selecting module, wherein: the selecting module is further configured to select a second training subset from the training set that is obtained by the processing unit, the generating module is further configured to generate, according to the preset policy, a second tree classifier corresponding to the second training subset that is selected by the selecting module, the selecting module is further configured to select an Nth training subset from the training set that is obtained by the processing unit, wherein the Nth training subset comprises M′ training units, and M′ is less than or equal to M, and the generating module is further configured to generate, according to the preset policy, an Nth tree classifier corresponding to the Nth training subset that is selected by the selecting module, wherein N is an integer greater than or equal to 2; and a combining module, configured to combine N tree classifiers generated by the generating module to generate the classifier set. 12. The defect prediction apparatus according to claim 10, wherein the generating unit further comprises: a first acquiring module, configured to acquire an error rate of generated K−1 tree classifiers when a (K−1)th tree classifier is generated; and a second acquiring module, configured to acquire an error rate of generated K tree classifiers when a Kth tree classifier is generated, so that when a difference between the error rate of the K tree classifiers and the error rate of the K−1 tree classifiers is less than a preset threshold, the K tree classifiers are combined to generate the classifier set, wherein K is an integer less than or equal to N. 13. The defect prediction apparatus according to claim 12, wherein the second acquiring module comprises: a selecting submodule, configured to select a first type tree classifier from the classifier set according to a first training unit; a generating submodule, configured to generate a first prediction label of the first training unit according to the first type tree classifier that is selected by the selecting submodule, wherein: the selecting submodule is further configured to select a second type tree classifier from the classifier set according to a second training unit, the generating submodule is further configured to generate a second prediction label of the second training unit according to the second type tree classifier that is selected by the selecting submodule, the selecting submodule is further configured to select an Mth type tree classifier from the classifier set according to an Mth training unit, wherein the Mth type tree classifier is a classifier set that does not use the Mth training unit to generate a tree classifier, and M is the number of training units comprised in the training set, and the generating submodule is further configured to generate an Mth prediction label of the Mth training unit according to the Mth type tree classifier that is selected by the selecting submodule; and an acquiring submodule, configured to acquire the error rate of the generated K tree classifiers according to M prediction labels that are generated by the generating submodule. 14. The defect prediction apparatus according to claim 13, wherein the generating submodule is configured to: Mth generate the prediction label according to C OOB  ( M , x M ) = arg   max y  ∑ C j ∈ C M OOB  h  ( ɛ j )  I  ( C j  ( x M ) = y ) , wherein COOB(M, xM) is the Mth prediction label of the Mth training unit, Cj is a jth tree classifier, CMOOB is the Mth type tree classifier, h(εj) is a weight of the jth tree classifier, Cj(xM) is a target attribute that is obtained according to the jth tree classifier and a training attribute set comprised in the Mth training unit, yεY, and Y is a classification label set. 15. The defect prediction apparatus according to claim 14, wherein the acquiring submodule is configured to: acquire, according to E  ( T ) = 1 M  ∑ r = 1 M  I  ( C OOB  ( r , x r ) = y r ) , the error rate of the K tree classifiers generated by the generating submodule, wherein E(T) is the error rate of the generated K tree classifiers, M is the number of training units in the training set, COOB(r, xr) is an rth prediction label of an rth training unit, and yr is a target attribute of the rth training unit. 16. The defect prediction apparatus according to claim 11, further comprising: a selecting unit, configured to select an N′th training subset from the training set after the generating module generates, according to the preset policy, an Nth tree classifier corresponding to the Nth training subset, wherein an intersection set of the N′th training subset and the Nth training subset is empty, and the N′th training subset comprises at least one training unit; a first acquiring unit, configured to acquire a false prediction rate of the Nth tree classifier according to the N′th training subset that is selected by the selecting unit; and a second acquiring unit, configured to acquire a weight of the Nth tree classifier according to the false prediction rate of the Nth tree classifier that is acquired by the first acquiring unit. 17. The defect prediction apparatus according to claim 16, wherein the predicting unit comprises: a statistics collecting module, configured to collect statistics about attribute information of the faulty product; a predicting module, configured to predict the defect of the faulty product by using the classifier set as a prediction model and according to the attribute information about which the statistics collecting module collects statistics, so as to obtain a classification label set; and a third acquiring module, configured to acquire a trust value of each classification label in the classification label set according to the classifier set and a weight of each tree classifier in the classifier set. 18. The defect prediction apparatus according to claim 11, wherein the preset policy comprises a decision tree algorithm.