Material detection method and device, electronic equipment and storage medium
By determining the contribution degree of measurement points in material detection and calculating the Mahjong distance, the problem of wide and time-consuming material detection standards is solved, efficient and accurate material abnormality recognition is achieved, and the generation of bad materials is reduced.
Patent Information
- Application Number
- CN202510575608.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-25
AI Technical Summary
The material detection standards in the prior art are too broad, resulting in abnormal materials not being tested in time, and the inspection process takes a long time and it is difficult to control production in a timely manner.
By determining several measurement points of the material, calculating the contribution of the measurement points, using the Marxist distance to detect material abnormalities, and optimizing local data in combination with machine learning models to improve detection accuracy and efficiency.
It realizes efficient and accurate material detection, can timely identify abnormal materials, and reduce the generation of bad material products.
Smart Images

Figure CN120368897A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of CNC (Computerized Numerical Control) machining, and particularly to a method, device, electronic device and storage medium for material detection. Background Art
[0002] In the field of CNC (Computerized Numerical Control) machining, it is very necessary to detect the produced materials. By detecting whether the materials are compliant or abnormal, it can be determined whether the currently set parameters are normal.
[0003] In the prior art, the determination of abnormal materials is generally carried out by sampling the produced materials and judging whether the materials meet the detection standards based on the measured point information at each point. However, these detection standards are formulated by staff based on actual experience, and it is very easy to have the problem that the formulated detection standards are too broad and the accuracy is relatively low, which may lead to abnormal materials not being detected, resulting in abnormal materials continuing to flow downstream. At the same time, the entire detection process needs to rely on the coordination and cooperation of staff in different links to complete, which takes a long time as a whole, thus making it difficult to timely identify the reasons for material abnormalities and difficult to control production in a timely manner. Summary of the Invention
[0004] The present invention provides a method, device, electronic device and storage medium for material detection, which can improve the efficiency and accuracy of material detection, and can timely determine the abnormal materials, thereby effectively reducing the generation of defective material products.
[0005] In a first aspect, the present invention provides a method for material detection, including:
[0006] Determine a plurality of first measurement points of a first material, where the plurality of first measurement points are each measurement point at a preset position selected from the surface of the first material;
[0007] Determine the contribution degree of the first measurement point of the first material, where the contribution degree of the first measurement point is determined according to the difference degree between the point feature of the first measurement point and the reference point feature; the reference point feature is determined based on the average value of the point features of a plurality of second measurement points, and the plurality of second measurement points are selected from the plurality of first measurement points and the distance difference between the second measurement point and the first measurement point is less than a reference distance; wherein, the contribution degree is used to reflect the deviation degree of the first measurement point relative to all measurement points on the first material;
[0008] Determine the Mahalanobis distance of the first material based on the contribution degrees of each of the first measurement points;
[0009] Detect the first material according to the Mahalanobis distance of the first material.
[0010] In a second aspect, the present invention further provides a material detection device, including:
[0011] A measurement point determination module, configured to determine a plurality of first measurement points of a first material, where the plurality of first measurement points are each measurement point at a preset position selected from the surface of the first material;
[0012] A contribution degree determination module, configured to determine the contribution degrees of the first measurement points of the first material, where the contribution degrees of the first measurement points are determined according to the difference degree between the point features of the first measurement points and the reference point features; the reference point features are determined based on the average value of the point features of a plurality of second measurement points, and the plurality of second measurement points are selected from the plurality of first measurement points and the distance difference between the second measurement points and the first measurement points is less than a reference distance; wherein, the contribution degrees are used to reflect the deviation degree of the first measurement points relative to all the measurement points on the first material;
[0013] A Mahalanobis distance determination module, configured to determine the Mahalanobis distance of the first material based on the contribution degrees of each of the first measurement points;
[0014] A material detection module, configured to detect the first material according to the Mahalanobis distance of the first material.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0016] One or more processors;
[0017] A storage device, configured to store one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the material detection method provided in any embodiment of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a storage medium including computer-executable instructions, where the computer-executable instructions are used to execute the material detection method provided in any embodiment of the present invention when executed by a computer processor.
[0020] In the technical solution of the embodiment of the present invention, by determining a plurality of first measurement points of the first material, and then determining the contribution degree of the first measurement point, the contribution degree can reflect the deviation degree of the first measurement point relative to all the measurement points on the first material; the contribution degree of the first measurement point is determined according to a plurality of second measurement points, specifically, it is determined according to the difference degree between the point characteristics of the first measurement point and the reference point characteristics; wherein, the reference point characteristics are determined based on the average value of the point characteristics of the plurality of second measurement points; this solution considers the characteristic data of other points around each first measurement point, determines the deviation degree of each first measurement point relative to all the measurement points on the first material, so as to optimize the local data in the process of calculating the Mahalanobis distance of the first material. Then, based on the contribution degree of each first measurement point, the Mahalanobis distance of the first material is determined, so that the calculated Mahalanobis distance is more accurate; furthermore, the first material can be detected more accurately according to the Mahalanobis distance of the first material, greatly improving the detection efficiency and accuracy, and being able to timely determine the abnormal materials, thereby reducing the generation of defective material products.
[0021] The above-mentioned invention content is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the following specifically illustrates the specific embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Combined with the drawings and referring to the following specific embodiments, the above and other features, advantages and aspects of the embodiments of the present invention will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the original elements and elements are not necessarily drawn to scale.
[0023] Figure 1 It is a schematic flowchart of a material detection method provided by an embodiment of the present invention;
[0024] Figure 2 It is a schematic flowchart of another material detection method provided by an embodiment of the present invention;
[0025] Figure 3 It is a result drawing of the Mahalanobis distance of a plurality of materials provided by an embodiment of the present invention;
[0026] Figure 4 It is a schematic diagram of the analysis result corresponding to a material with an abnormality provided by an embodiment of the present invention;
[0027] Figure 5 It is a process flowchart of a material detection method for implementing the embodiment of the present disclosure provided by an embodiment of the present invention;
[0028] Figure 6 The structural schematic diagram of a material detection device provided by an embodiment of the present invention;
[0029] Figure 7 The structural schematic diagram of an electronic device for implementing a material detection method provided by an embodiment of the present invention. Detailed implementation manners
[0030] The embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not used to limit the protection scope of the present invention.
[0031] It should be understood that the steps recorded in the method embodiments of the present invention can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this regard.
[0032] The term "including" and its variants used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependent relationships.
[0034] It should be noted that the modifications of "one", "multiple" and "several" mentioned in the present invention are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0036] Figure 1The flowchart shows a material detection method provided by an embodiment of the present invention. This embodiment is applicable to detecting materials during the CNC machining stage to determine whether there are abnormal materials. This method can be executed by a material detection device, which can be implemented in the form of software and / or hardware and is generally integrated into any electronic device with network communication capabilities. The electronic device can be a mobile terminal, a PC, or a server, etc. As Figure 1 shown, the material detection method of the embodiment of the present invention may include the following processes:
[0037] S110. Determine a plurality of first measurement points of the first material. The plurality of first measurement points are each measurement point at a preset position selected from the surface of the first material.
[0038] Among them, the first material is the material product to be detected. The material product is specifically obtained through operations such as cutting by a CNC machining device. The first material can be obtained by sampling multiple material products. The first measurement points are each measurement point at a preset position selected from the surface of the first material. The preset position can preferably be a key position on the first material, such as the vertex of the material product, the midpoint of the boundary line of the material product, etc., or a position that can reflect the special characteristics of the material product can be used as the preset position.
[0039] Optionally, determining a plurality of first measurement points of the first material may include: contacting the first material with a measurement device to detect the shape of the first material and obtain a plurality of measurement points; determining a plurality of first measurement points from the plurality of measurement points based on the key positions on the surface of the first material. Among them, a probe is configured on the measurement device.
[0040] Further, to detect the shape of the first material, the measurement device can approach the first material, and the probe on the measurement device can contact the surface of the first material to detect the shape of the first material. Exemplarily, the measurement device can approach the first material, and the probe configured on the measurement device can contact the surface of the first material, thereby being able to detect the shape of the first material, determine a plurality of measurement points on the first material, and then a plurality of first measurement points can be determined from the plurality of measurement points based on the key positions on the surface of the first material.
[0041] It should be noted that in the process of selecting each measurement point, the determined several first measurement points should at least cover the relevant points at the key positions of the first material. The key positions of the material product are determined based on the form of the material product. For the same material product, the first measurement points respectively determined for each material to be detected are all at the corresponding same positions. For different material products, the several first measurement points determined for each material to be detected have no correlation relationship and can also be completely different.
[0042] For example, for a certain material product A, after analyzing and considering various factors of this material product, if it is determined that there are 108 important and irreplaceable key points for this material product A, such key points may be the vertices of the material product, the midpoints on the edges, etc., then when detecting this material product A, these 108 key points can be directly used as the 108 first measurement points selected and determined; or, it can also be based on these 108 key points and then select some other points to jointly serve as the several first measurement points selected and determined, such as determining 115 first measurement points, etc.
[0043] S120. Determine the contribution degree of the first measurement points of the first material. The contribution degree of the first measurement points is determined according to the difference degree between the point characteristics of the first measurement points and the reference point characteristics; the reference point characteristics are determined based on the average value of the point characteristics of multiple second measurement points, and the multiple second measurement points are selected from several first measurement points and the distance difference between the second measurement points and the first measurement points is less than the reference distance; among them, the contribution degree is used to reflect the deviation degree of the first measurement points relative to all measurement points on the first material.
[0044] Among them, there is a positive correlation between the deviation degree of the first measurement points relative to all measurement points on the first material and the contribution degree of the first measurement points to calculating the Mahalanobis distance of the first material. The greater the deviation degree of the first measurement points relative to all measurement points on the first material, the greater the contribution degree of the first measurement points to calculating the Mahalanobis distance of the first material, that is, the more important the first measurement points are for calculating the Mahalanobis distance of the first material. Correspondingly, the smaller the deviation degree of the first measurement points relative to all measurement points on the first material, the smaller the contribution degree of the first measurement points to calculating the Mahalanobis distance of the first material, that is, the less important the first measurement points are for calculating the Mahalanobis distance of the first material.
[0045] Among them, the point feature of the first measurement point refers to the feature information associated with the first measurement point. For example, such point features can include the operating parameter information of the CNC equipment, such as cutting speed, cutting depth, cutting frequency, material feed rate, etc.; it can also include the CNC equipment attribute information, such as tool model, tool usage duration, tool wear degree, etc.; it can also include other associated information, such as the material product material used, workshop temperature, manual operation parameters, etc. As long as the information that can be associated with the first measurement point can be used as the point feature corresponding to the first measurement point, and these can be set differently based on actual needs, and will not be detailedly limited in this embodiment. At the same time, there is also an association relationship among these point features.
[0046] In this embodiment, when determining the contribution degree of the first measurement point of the first material, the data around each measurement point in the first material is considered, that is, the point features of multiple second measurement points are considered, so that the local data can be optimized in the process of calculating the Mahalanobis distance of the first material, especially applicable to scenarios with non-uniform distribution and more noise. Among them, the second measurement point is selected from several first measurement points, and the distance difference between the second measurement point and the first measurement point is less than the reference distance, and this reference distance can be set differently based on actual needs. That is to say, the second measurement point is essentially a point within the local neighborhood of the first measurement point.
[0047] Specifically, the contribution degree of the first measurement point is determined according to the difference degree between the point feature of the first measurement point and the reference point feature; and the reference point feature among them is determined based on the average value of the point features of multiple second measurement points. The determination of the difference degree can be obtained by subtracting the point feature of the first measurement point from the reference point feature. Using the same principle, the contribution degrees corresponding to other first measurement points can be calculated.
[0048] S130. Determine the Mahalanobis distance of the first material based on the contribution degrees of each first measurement point.
[0049] Among them, the Mahalanobis Distance is a statistic for measuring the distance between a point and a distribution. With the help of the Mahalanobis distance, the influence of the dimension between different dimensions can be eliminated and the correlation between features can also be considered.
[0050] Specifically, since the Mahalanobis distance can not only consider the differences of each first measurement point in different dimensions, but also consider the mutual relationship between different measurement points. After determining the contribution degree of each first measurement point in the process of calculating the Mahalanobis distance, it is equivalent to being able to determine which first measurement points can give greater contributions and play a key role; which first measurement points have relatively small contribution degrees and play a relatively small role, etc. And these contribution degrees are the influence degrees brought to the calculation of the Mahalanobis distance. By analogy, corresponding mathematical operations can be performed based on the contribution degrees of each first measurement point to determine the Mahalanobis distance of the first material.
[0051] S140. Detect the first material according to the Mahalanobis distance of the first material.
[0052] Specifically, since the Mahalanobis distance is determined based on the contribution degrees of each first measurement point on the first material, comprehensively considering the interaction effects between various characteristic variables, it can reflect the deviation degree of each first measurement point relative to all measurement points on the first material. If there are some first measurement points that deviate too far from all measurement points on the first material, then these deviated first measurement points will directly cause the calculated Mahalanobis distance of the first material to be abnormal. For example, the calculated Mahalanobis distance value is too large, resulting in a situation that is significantly inconsistent with the actual situation. Then, the first material can be detected according to the Mahalanobis distance of the first material to determine whether there is an abnormal situation in the first material, and further, the measurement points that deviate from the normal situation of the first material can be identified, thus indicating potential abnormal problems.
[0053] Optionally, the first material can be detected by comparing the Mahalanobis distance of the first material with the Mahalanobis distances of other materials. For example, if the Mahalanobis distance of the first material is significantly higher than the Mahalanobis distances of other materials, it can be considered that the first material is abnormal; if the difference between the Mahalanobis distance of the first material and the Mahalanobis distances of other materials is not large, it can be considered that the first material is normal. Optionally, the first material can also be detected by comparing the Mahalanobis distance of the first material with a preset standard threshold.
[0054] In the technical solution of the embodiment of the present invention, by determining a plurality of first measurement points of the first material, and then determining the contribution degree of the first measurement points, the contribution degree can reflect the deviation degree of the first measurement points relative to all the measurement points on the first material; the contribution degree of the first measurement points is determined according to a plurality of second measurement points, specifically, it is determined according to the difference degree between the point features of the first measurement points and the reference point features; wherein, the reference point features are determined based on the average value of the point features of the plurality of second measurement points; this solution considers the feature data of other points around each first measurement point, determines the deviation degree of each first measurement point relative to all the measurement points on the first material, so as to optimize the local data in the process of calculating the Mahalanobis distance of the first material. Then, based on the contribution degree of each first measurement point, the Mahalanobis distance of the first material is determined, so that the calculated Mahalanobis distance is more accurate; furthermore, the first material can be detected more accurately according to the Mahalanobis distance of the first material, greatly improving the detection efficiency and accuracy, and being able to determine the abnormal material in time, thereby reducing the generation of defective material products.
[0055] Figure 2 FIG. is a schematic flow chart of another material detection method provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of detecting the first material according to the Mahalanobis distance of the first material in the technical solution of the foregoing embodiment. This embodiment can be combined with various optional solutions in one or more of the foregoing embodiments. As Figure 2 shown, the material detection method of the embodiment of the present invention may include the following process:
[0056] S210. Determine a plurality of first measurement points of the first material, and the plurality of first measurement points are each measurement point at a preset position selected from the surface of the first material.
[0057] S220. Determine the contribution degree of the first measurement points of the first material. The contribution degree of the first measurement points is determined according to the difference degree between the point features of the first measurement points and the reference point features; the reference point features are determined based on the average value of the point features of a plurality of second measurement points, and the plurality of second measurement points are selected from the plurality of first measurement points and the distance difference between the second measurement points and the first measurement points is less than the reference distance; wherein, the contribution degree is used to reflect the deviation degree of the first measurement points relative to all the measurement points on the first material.
[0058] As an optional but non-limiting implementation manner, determining the contribution degree of the first measurement points of the first material may include the following steps A1-A3:
[0059] Step A1: Determine the weight information of the first measurement point; the weight information is used to reflect the importance of the point characteristics of the first measurement point in the process of calculating the Mahalanobis distance of the first material.
[0060] Specifically, the weight information can be used to reflect the importance of the point characteristics of the first measurement point in the process of calculating the Mahalanobis distance of the first material. Different point characteristics have different degrees of influence on the calculation of the Mahalanobis distance. Then, the weight information that can be adapted to the first measurement point can be determined based on the point characteristics of the first measurement point, so that the influence degree of some measurement points will not be overly amplified or weakened, and at the same time, the scale differences in different dimensions can also be considered. Optionally, the weight information of the first measurement point can be determined based on the importance of the point characteristics of the first measurement point among all point characteristics; or the weight information of the first measurement point can be determined based on the position information of the first measurement point.
[0061] For example, taking the point characteristic as "the cutting frequency of the tool" as an example, such a characteristic is relatively important in the CNC machining process, so the first measurement point corresponding to such a point characteristic can be given a relatively high weight. Another example is that a point characteristic like "workshop temperature", although it also has an impact, is not particularly important, so the first measurement point corresponding to such a point characteristic can be given a relatively low weight.
[0062] Step A2: Determine the first deviation between the point characteristics of the first measurement point and the reference point characteristics.
[0063] Among them, the first deviation is used to reflect the degree of difference between the point characteristics of the first measurement point and the reference point characteristics.
[0064] As an optional but non-limiting implementation manner, determining the first deviation between the point characteristics of the first measurement point and the reference point characteristics includes: determining a point set from several first measurement points according to the first measurement point and the reference distance, and the point set contains multiple second measurement points; determining a local feature mean based on the point characteristics corresponding to the second measurement points, and the local feature mean is used to reflect the point characteristic mean among the multiple second measurement points; determining the first deviation based on the point characteristic value of the first measurement point and the local feature mean.
[0065] Specifically, to determine a point set from a number of first measurement points according to the first measurement point and the reference distance, it can be by taking the first measurement point as the center of a circle, radiating the reference distance in all directions around, and determining the point set based on the measurement points included within the formed range. The point set contains multiple second measurement points. To determine a point set from a number of first measurement points according to the first measurement point and the reference distance, it can also be based on the distance difference between other measurement points on the first material and the first measurement point, and the reference distance to determine the point set, so that the distance difference corresponding to each second measurement point in the point set is less than the reference distance.
[0066] After determining the point set, the characteristic mean value can be determined based on the point characteristics corresponding to multiple second measurement points and used as the local characteristic mean value. Then, by subtracting the point characteristic value of the first measurement point from the local characteristic mean value, the first deviation can be determined.
[0067] Step A3: Determine the contribution degree of the first measurement point of the first material based on the weight information of the first measurement point and the first deviation.
[0068] Specifically, after determining the weight information of the first measurement point and the first deviation, corresponding mathematical operation processing can be performed on the weight information and the first deviation to determine the contribution degree of the first measurement point of the first material. For example, the weight information and the first deviation can be multiplied to determine the contribution degree of this first measurement point.
[0069] As an optional but non-limiting implementation manner, determining the weight information of the first measurement point includes: determining the position information of the first measurement point on the first material; based on the position information and a preset weight distribution relationship, determining the weight information of the first measurement point; the weight distribution relationship includes the importance ranking of the measurement points at each position on the first material.
[0070] Among them, the position information is the coordinate information of the first measurement point on the first material, and with the position information, the spatial position of the first measurement point on the first material can be accurately described. The weight distribution relationship includes the importance ranking of the measurement points at each position on the first material. The weight distribution relationship can be preset based on the statistical situation of the measurement points at each position in historical material products.
[0071] Specifically, after determining the first measurement point, the position information of the first measurement point on the first material can be determined, and then based on the position information and the preset weight distribution relationship, the corresponding weight is assigned to the point corresponding to the position information, and the weight information of the first measurement point can be determined.
[0072] As an optional but non-limiting implementation, determining the weight information of the first measurement point further includes: determining the weight information corresponding to the first measurement point through a machine learning model.
[0073] Among them, the machine learning model can be a LightGBM model. This machine learning model can learn the importance of various features. For example, it can obtain the importance score of each feature based on gain or based on the number of splits. That is, it can determine which features are important and which features are less important.
[0074] Specifically, the point features corresponding to the first measurement point can be input into the machine learning model, and the machine learning model can output the weight information corresponding to the first measurement point.
[0075] S230. Determine the Mahalanobis distance of the first material based on the contribution degrees of the respective first measurement points.
[0076] Optionally, in this embodiment, the following formula can be used to determine the Mahalanobis distance of the first material:
[0077]
[0078] Among them, d i is the i-th first material; D M (d i ) is the Mahalanobis distance corresponding to the i-th first material; w j is the weight information of the j-th first measurement point on this first material; d i,j is the point feature corresponding to the j-th first measurement point on the i-th first material; μ j * is the reference point feature corresponding to the j-th first measurement point; σ j 2 is the variance in the local covariance matrix corresponding to the j-th first measurement point; λ is a regularization parameter used to prevent the denominator from being too small and causing numerical instability; k is the total number of first measurement points on this first material. That is to say, there are a total of k first measurement points on the current i-th first material.
[0079] Correspondingly, in the above formula is the contribution degree corresponding to the first measurement point, that is:
[0080]
[0081] Among them, j is the j-th first measurement point on the material; C j is the contribution degree corresponding to the j-th first measurement point; w jis the weight information corresponding to the j-th first measurement point; for the meanings of other parameters, please refer to the above description and will not be elaborated here.
[0082] S240. Determine the detection result of the first material according to the relationship between the Mahalanobis distance of the first material and the anomaly threshold; the anomaly threshold is determined based on the distribution of the Mahalanobis distances between the first material and multiple second materials; the Mahalanobis distances between the multiple second materials and the first material conform to the chi-square distribution.
[0083] Among them, the second material and the first material are the same type of material product, that is to say, the second material is other material products belonging to the same detection batch as the first material, and there can be multiple such second materials.
[0084] Specifically, in the foregoing solution of this embodiment, the Mahalanobis distance of the first material can be determined. By the same principle, the Mahalanobis distances of other second materials can also be determined, and the distribution of the Mahalanobis distances between the multiple second materials and the first material conforms to the chi-square distribution. Then, the anomaly threshold can be determined based on the distribution of the Mahalanobis distances between the first material and the multiple second materials.
[0085] Optionally, in this embodiment, the square of the Mahalanobis distance follows the chi-square distribution with degrees of freedom k:
[0086]
[0087] where D M is the Mahalanobis distance and k is the number of feature dimensions.
[0088] Next, look up the corresponding chi-square distribution critical value according to the degrees of freedom k and the significance level α, and use this critical value as the anomaly threshold; in this embodiment, the significance level α can be selected to be 0.05.
[0089] Furthermore, the detection result of the first material can be determined according to the relationship between the Mahalanobis distance of the first material and the anomaly threshold. For example, the square of the Mahalanobis distance of a certain first material can be compared with the anomaly threshold to determine the detection result of the first material.
[0090] It should be noted that when detecting the first material in the solution of this embodiment, it is determined based on the distribution of the Mahalanobis distances of multiple materials. In this way, it is possible not to rely on the actual experience of the staff in the traditional method to judge whether the material product is qualified. It only needs to determine the Mahalanobis distances of each material in this detection batch to accurately judge whether there are abnormal materials. At the same time, such detection accuracy and detection efficiency can also be greatly improved.
[0091] S250. When the squared Mahalanobis distance of the first material is not greater than the anomaly threshold, the first material has no anomaly.
[0092] Specifically, when the squared Mahalanobis distance of the first material is not greater than the anomaly threshold, it indicates that the difference between the first material and other second materials is not significant, and it can be considered that the first material has no anomaly.
[0093] S260. When the squared Mahalanobis distance of the first material is greater than the anomaly threshold, the first material has an anomaly.
[0094] Specifically, when the squared Mahalanobis distance of the first material is greater than the anomaly threshold, it indicates that there is a large gap between the first material and other second materials, and then it can be considered that the first material has an anomaly. Then, the machine of the CNC equipment can be locked, and the information that the first material has an anomaly can be pushed, for example, it can be pushed in the form of an email or a WeCom message.
[0095] As an optional but non-limiting implementation manner, when the first material has an anomaly, the material detection method further includes: determining multiple third measurement points of the first material and the contribution degree corresponding to each third measurement point based on the Mahalanobis distance of the first material; determining the anomaly cause of the first material based on the contribution degrees corresponding to the multiple third measurement points.
[0096] When the first material has an anomaly, the relevant cause leading to the anomaly of the first material can be traced, and adjustment operations can be performed based on the corresponding cause. Specifically, the material detection method in this embodiment determines multiple third measurement points corresponding to the anomalous first material and the contribution degree corresponding to each third measurement point based on the Mahalanobis distance of the first material. Among them, the third measurement point refers to the measurement point involved in calculating the Mahalanobis distance of the first material, and the contribution degree corresponding to the third measurement point is the importance degree of the third measurement point for calculating the Mahalanobis distance of the first material. After determining the contribution degrees corresponding to the multiple third measurement points, the contribution degrees of these points can be analyzed to determine which important points lead to the anomaly of the first material, and thus the anomaly cause of the first material can be determined. In this embodiment, the relevant determination method and principle of the contribution degree corresponding to the third measurement point are the same as those for calculating the contribution degree of the first measurement point in the above text, and will not be elaborated here in detail.
[0097] As an optional but non-limiting implementation, determining the abnormal cause of the first material based on the contribution degrees corresponding to multiple third measurement points includes: sorting the contribution degrees corresponding to multiple third measurement points by size to determine the order of contribution degrees; determining a preset number of fourth measurement points ranked at the top from multiple third measurement points based on the order of contribution degrees; and determining the abnormal cause of the first material based on the point characteristics of the fourth measurement points.
[0098] Specifically, after determining multiple third measurement points and the contribution degrees corresponding to each third measurement point, the contribution degrees corresponding to multiple third measurement points can be sorted by size to determine the order of contribution degrees. Then, a preset number of fourth measurement points ranked at the top are determined from multiple third measurement points based on the order of contribution degrees; among them, the preset number can be set according to actual needs. For example, the preset number can be set to 3, so the top 3 third measurement points ranked at the top in the order of contribution degrees are determined, and the 3 determined measurement points are used as the fourth measurement points. Furthermore, the abnormal cause of the first material can be determined based on the point characteristics of the fourth measurement points. For example, if it is determined that the abnormal cause of the first material is "the cutting frequency of the tool", then the problem investigation of the CNC machining equipment can be realized and targeted treatment and solution can be carried out in a timely manner.
[0099] Optionally, determining the abnormal cause of the first material based on the contribution degrees corresponding to multiple third measurement points further includes: determining multiple fifth measurement points based on the size relationship between the contribution degrees corresponding to multiple third measurement points and the contribution degree threshold; and determining the abnormal cause of the first material based on the point characteristics of the fifth measurement points.
[0100] Specifically, a contribution degree threshold can also be set, and the contribution degrees corresponding to multiple third measurement points are compared with the contribution degree threshold. Those exceeding the contribution degree threshold can be screened out to determine multiple fifth measurement points; furthermore, the abnormal cause of the first material is determined based on the point characteristics of the fifth measurement points.
[0101] Exemplarily, Figure 3 FIG. is a result plotting diagram of the Mahalanobis distance of multiple materials provided by an embodiment of the present invention. It can be seen that Figure 3 It is in the form of a line chart. The abscissa in the line chart is the production time of each material, the ordinate is the Mahalanobis distance result value corresponding to each material, and the red line is the calculated abnormal threshold. The materials exceeding this red line are the materials with abnormalities. Figure 4 FIG. is a schematic diagram of the analysis result corresponding to a material with an abnormality provided by an embodiment of the present invention. Figure 4In the first column is the material SN code, which records the codes of those first materials that exceed the abnormal threshold. The second column is the calculated Mahalanobis distance value corresponding to the first material. The third column is the most important fourth measurement point (i.e., the TOP1 point) affecting the abnormality of the material. The fourth column is the contribution degree corresponding to the TOP1 point. The fifth column is the second most important fourth measurement point (i.e., the TOP2 point) affecting the abnormality of the material. The sixth column is the contribution degree corresponding to the TOP2 point. By Figure 4 it can be analyzed that the TOP1 point is the point that most affects the abnormality of the material, and the TOP2 point is the point that ranks second and can affect the abnormality of the material. And so on, the positions that cause the material abnormality and the order of the degree of influence between the positions can be determined, and then the cause of the material abnormality can be determined by analysis.
[0102] The technical solution of the embodiment of the present invention determines several first measurement points of the first material, and then determines the contribution degree of the first measurement point. The contribution degree can reflect the deviation degree of the first measurement point relative to all measurement points on the first material; the contribution degree of the first measurement point is determined according to multiple second measurement points. Specifically, it is determined according to the difference degree between the point characteristics of the first measurement point and the reference point characteristics; among them, the reference point characteristics are determined based on the average value of the point characteristics of multiple second measurement points; this solution considers the characteristic data of other points around each first measurement point and determines the deviation degree of each first measurement point relative to all measurement points on the first material, so as to optimize the local data in the process of calculating the Mahalanobis distance of the first material. Then, according to the size relationship between the Mahalanobis distance of the first material and the abnormal threshold, the detection result of the first material is determined; the abnormal threshold is determined based on the distribution of the Mahalanobis distances between the first material and multiple second materials; the Mahalanobis distances between multiple second materials and the first material conform to the chi-square distribution; when the square of the Mahalanobis distance of the first material is not greater than the abnormal threshold, the first material has no abnormality; when the square of the Mahalanobis distance of the first material is greater than the abnormal threshold, the first material has an abnormality. The Mahalanobis distance of the first material is determined based on the contribution degree of each first measurement point, so that the calculated Mahalanobis distance is more accurate; furthermore, the first material can be detected more accurately according to the Mahalanobis distance of the first material, and the cause of the material abnormality can be reversely checked and adjusted in time, without relying too much on manual processing, greatly improving the detection efficiency and accuracy, and being able to determine the abnormal materials in time, thereby reducing the production of defective material products.
[0103] Figure 5 The process flow chart of a method for implementing the material detection method of the embodiments of the present disclosure provided by the embodiments of the present invention. As Figure 5 shown, the process flow of this example may specifically include:
[0104] IPQC (In-Process Quality Control, quality control during the manufacturing process) will obtain the data of the first-piece material products and the related randomly inspected material products on a daily basis, and then upload this related data to the QMS system (Quality Management System). The Ma interface or calculation module in the QMS system will calculate and analyze the data, and display the calculation results and the analyzed abnormal reasons in the QMS system.
[0105] When displaying in the QMS system, 5 machines will be selected for real-time alarm, and the data of the remaining machines will only be displayed. If the corresponding material products of the 5 selected machines are all normal, it means the machines are operating normally; if there are abnormalities in the corresponding material products, the corresponding machines will be controlled to stop immediately, and notifications will be sent to relevant personnel through the quality control module (QC). For example, relevant persons in charge such as QE, engineering, production, and production technology can be notified.
[0106] Then, QE or engineering personnel will analyze the reasons for the abnormalities and determine the corresponding improvement measures. The production technology personnel will adjust the machines according to the improvement measures; at the same time, QC will also record the relevant bad information.
[0107] The technical solution of this embodiment provides a monitoring method that does not rely on traditional point specifications and control lines, realizes real-time calculation after measurement, does not rely too much on manual processing, greatly improves the detection efficiency and accuracy, and can timely determine the abnormal materials. When a suspected problem product is found, the machine will be locked, and emails or messages will be promptly pushed to the persons in charge of engineering, production, production technology, etc., to immediately investigate on-site problems such as the machine, parameter equipment, and raw materials on the spot, so as to conduct on-site investigation and confirmation on the spot, prevent the continuous production of problem products, and reduce waste. Even if the abnormal material meets the control specification range, abnormal problems can be discovered in advance, reducing the generation of defective products.
[0108] Figure 6 The following is a schematic structural diagram of a material detection device provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of detecting materials in the CNC numerical control machining stage. The material detection device can be implemented in the form of software and / or hardware, and is generally integrated on any electronic device with network communication functions. The electronic device can be a mobile terminal, a PC, or a server, etc. As Figure 6 shown, the material detection device of the embodiment of the present invention may include: a measurement point determination module 610, a contribution degree determination module 620, a Mahalanobis distance determination module 630, and a material detection module 640. Among them:
[0109] The measurement point determination module 610 is configured to determine a plurality of first measurement points of the first material, and the plurality of first measurement points are each measurement point at a preset position selected from the surface of the first material;
[0110] The contribution degree determination module 620 is configured to determine the contribution degree of the first measurement point of the first material, and the contribution degree of the first measurement point is determined according to the difference degree between the point feature of the first measurement point and the reference point feature; the reference point feature is determined based on the average value of the point features of a plurality of second measurement points, and the plurality of second measurement points are selected from the plurality of first measurement points and the distance difference between the second measurement point and the first measurement point is less than the reference distance; wherein, the contribution degree is used to reflect the deviation degree of the first measurement point relative to all measurement points on the first material;
[0111] The Mahalanobis distance determination module 630 is configured to determine the Mahalanobis distance of the first material based on the contribution degree of each of the first measurement points;
[0112] The material detection module 640 is configured to detect the first material according to the Mahalanobis distance of the first material.
[0113] The technical solution provided by the present invention determines a plurality of first measurement points of the first material through the measurement point determination module, and then determines the contribution degree of the first measurement point through the contribution degree determination module. The contribution degree can reflect the deviation degree of the first measurement point relative to all measurement points on the first material; the contribution degree of the first measurement point is determined according to a plurality of second measurement points, specifically, the difference degree between the point feature of the first measurement point and the reference point feature is determined; wherein, the reference point feature is determined based on the average value of the point features of a plurality of second measurement points; this solution considers the feature data of other points around each first measurement point, determines the deviation degree of each first measurement point relative to all measurement points on the first material, so as to optimize the local data in the process of calculating the Mahalanobis distance of the first material. Then, the Mahalanobis distance determination module determines the Mahalanobis distance of the first material based on the contribution degree of each first measurement point, so that the calculated Mahalanobis distance is more accurate; furthermore, the material detection module can detect the first material more accurately according to the Mahalanobis distance of the first material, greatly improving the detection efficiency and accuracy, and can timely determine the materials with abnormalities, thereby reducing the generation of defective material products.
[0114] As an optional but non-limiting implementation manner, the contribution degree determination module 620 includes a weight information determination unit, a first deviation determination unit, and a contribution degree determination unit. Wherein:
[0115] A weight information determination unit for determining the weight information of the first measurement point; the weight information is used to reflect the importance degree of the point characteristics of the first measurement point in the process of calculating the Mahalanobis distance of the first material;
[0116] A first deviation determination unit for determining a first deviation between the point characteristics of the first measurement point and the reference point characteristics;
[0117] A contribution degree determination unit for determining the contribution degree of the first measurement point of the first material based on the weight information and the first deviation.
[0118] As an optional but non-limiting implementation manner, the first deviation determination unit includes a point set determination subunit, a local feature mean determination subunit, and a first deviation determination subunit. Wherein:
[0119] The point set determination subunit is configured to determine a point set from several first measurement points according to the first measurement point and the reference distance, and the point set includes multiple second measurement points;
[0120] The local feature mean determination subunit is configured to determine a local feature mean based on the point characteristics corresponding to the second measurement points, and the local feature mean is used to reflect the point feature mean between multiple second measurement points;
[0121] The first deviation determination subunit is configured to determine the first deviation based on the point characteristic value of the first measurement point and the local feature mean.
[0122] As an optional but non-limiting implementation manner, the weight information determination unit includes a position information determination subunit and a weight information determination subunit. Wherein:
[0123] The position information determination subunit is configured to determine the position information of the first measurement point on the first material;
[0124] The weight information determination subunit is configured to determine the weight information of the first measurement point based on the position information and a preset weight distribution relationship; the weight distribution relationship includes the importance degree ranking among the measurement points at each position on the first material.
[0125] As an optional but non-limiting implementation, the material detection module 640 is specifically configured to: determine the detection result of the first material according to the magnitude relationship between the Mahalanobis distance of the first material and the anomaly threshold; the anomaly threshold is determined based on the distribution of the Mahalanobis distances between the first material and multiple second materials; the Mahalanobis distances between the multiple second materials and the first material conform to a chi-square distribution; when the square of the Mahalanobis distance of the first material is not greater than the anomaly threshold, the first material has no anomaly; when the square of the Mahalanobis distance of the first material is greater than the anomaly threshold, the first material has an anomaly.
[0126] As an optional but non-limiting implementation, when the first material has an anomaly, the material detection device further includes a third measurement point determination module and an anomaly cause determination module. Among them:
[0127] The third measurement point determination module is configured to determine multiple third measurement points of the first material and the contribution degree corresponding to each third measurement point based on the Mahalanobis distance of the first material;
[0128] The anomaly cause determination module is configured to determine the anomaly cause of the first material based on the contribution degrees corresponding to the multiple third measurement points.
[0129] As an optional but non-limiting implementation, the anomaly cause determination module includes a contribution degree ranking unit, a fourth measurement point determination unit, and an anomaly cause determination unit. Among them:
[0130] The contribution degree ranking unit is configured to rank the contribution degrees corresponding to the multiple third measurement points to determine the order of contribution degree magnitudes;
[0131] The fourth measurement point determination unit is configured to determine a preset number of top-ranked fourth measurement points from the multiple third measurement points based on the order of contribution degree magnitudes;
[0132] The anomaly cause determination unit is configured to determine the anomaly cause of the first material based on the point characteristics of the four measurement points.
[0133] The material detection device provided by the embodiments of the present invention can be used to execute a material detection method, and has corresponding functional modules and beneficial effects for executing the material detection method.
[0134] It should be noted that the various units and modules included in the above device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present invention.
[0135] Figure 7 The following is a schematic structural diagram of an electronic device for implementing a material detection method provided by an embodiment of the present invention. Refer to Figure 7 , which shows a schematic structural diagram of an electronic device 710 suitable for implementing an embodiment of the present invention. The terminal device in the embodiment of the present invention may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.
[0136] As Figure 7 shown, the electronic device 710 includes at least one processor 711, and a memory communicatively connected to at least one processor 711, such as a read-only memory (ROM) 712, a random access memory (RAM) 713, etc. Among them, the memory stores a computer program executable by at least one processor. The processor 711 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 712 or the computer program loaded from the storage unit 718 into the random access memory (RAM) 713. In the (RAM) 713, various programs and data required for the operation of the electronic device 710 can also be stored. The processor 711, the (ROM) 712, and the (RAM) 713 are connected to each other through a bus 714. The input / output (I / O) interface 715 is also connected to the bus 714.
[0137] Multiple components in the electronic device 710 are connected to the I / O interface 715, including: an input unit 716, such as a keyboard, a mouse, etc.; an output unit 717, such as various types of displays, speakers, etc.; a storage unit 718, such as a magnetic disk, an optical disc, etc.; and a communication unit 719, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 719 allows the electronic device 710 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0138] The processor 711 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 711 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 711 executes the material detection method provided in any embodiment of the present invention.
[0139] In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the material detection method shown in the flowchart. When the computer program is executed by a processing device, the above-mentioned functions defined in the material detection method of the embodiment of the present invention are executed.
[0140] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0141] The electronic device provided by the embodiment of the present invention and the material detection method provided by the above embodiment belong to the same inventive concept. Technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0142] The embodiment of the present invention provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the material detection method provided by the above embodiment is implemented.
[0143] It should be noted that the above-mentioned computer-readable medium of the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can 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 the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0144] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0145] Computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed 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 server. 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 it may be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).
[0146] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0147] The units described in the embodiments of the present invention may be implemented in software or in hardware. Among them, the name of the unit does not constitute a limitation to the unit itself in some cases.
[0148] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, by way of non-limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and so on.
[0149] In the context of the present invention, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 foregoing.
[0150] The above description is only a preferred embodiment of the present invention and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present invention.
[0151] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although a number of specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Certain features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0152] Although the subject matter has been described in language specific to structural features and / or methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A material detection method, characterized in that, The method includes: Determine a plurality of first measurement points of the first material, where the plurality of first measurement points are each measurement point at a preset position selected from the surface of the first material; Determine the contribution degree of the first measurement point of the first material, where the contribution degree of the first measurement point is determined according to the difference degree between the point feature of the first measurement point and the reference point feature; the reference point feature is determined based on the average value of the point features of a plurality of second measurement points, and the plurality of second measurement points are selected from the plurality of first measurement points and the distance difference between the second measurement point and the first measurement point is less than the reference distance; wherein, the contribution degree is used to reflect the deviation degree of the first measurement point relative to all measurement points on the first material; Determine the Mahalanobis distance of the first material based on the contribution degrees of the respective first measurement points; Detect the first material according to the Mahalanobis distance of the first material.
2. The method according to claim 1, wherein The determining the contribution degree of the first measurement point of the first material includes: Determine the weight information of the first measurement point; the weight information is used to reflect the importance degree of the point feature of the first measurement point in the process of calculating the Mahalanobis distance of the first material; Determine the first deviation between the point feature of the first measurement point and the reference point feature; Based on the weight information and the first deviation, determine the contribution degree of the first measurement point of the first material.
3. The method according to claim 2, characterized in that, The determining the first deviation between the point feature of the first measurement point and the reference point feature includes: Determine a point set from the plurality of first measurement points according to the first measurement point and the reference distance, and the point set includes a plurality of second measurement points; Determine the local feature average value based on the point features corresponding to the second measurement points, and the local feature average value is used to reflect the average value of the point features between the plurality of second measurement points; Based on the point feature value of the first measurement point and the local feature average value, determine the first deviation.
4. The method according to claim 2, wherein The determining the weight information of the first measurement point includes: Determine the position information of the first measurement point on the first material; Based on the position information and a preset weight distribution relationship, determine the weight information of the first measurement point; the weight distribution relationship includes the importance degree ranking between the measurement points at each position on the first material.
5. The method according to claim 1, characterized in that, The detecting the first material according to the Mahalanobis distance of the first material includes: Determine the detection result of the first material according to the magnitude relationship between the Mahalanobis distance of the first material and the abnormal threshold; the abnormal threshold is determined based on the distribution of the Mahalanobis distances between the first material and a plurality of second materials; the Mahalanobis distances between the plurality of second materials and the first material conform to the chi-square distribution; When the square of the Mahalanobis distance of the first material is not greater than the abnormal threshold, the first material has no abnormality; When the square of the Mahalanobis distance of the first material is greater than the abnormal threshold, the first material has an abnormality.
6. The method according to claim 5, characterized in that When the first material has an abnormality, the method further includes: Determine a plurality of third measurement points of the first material and the contribution degree corresponding to each third measurement point based on the Mahalanobis distance of the first material; Determine the abnormal cause of the first material based on the contribution degrees corresponding to the plurality of third measurement points.
7. The method according to claim 6, wherein The determining the abnormal cause of the first material based on the contribution degrees corresponding to the plurality of third measurement points includes: Sort the contribution degrees corresponding to the plurality of third measurement points in terms of magnitude to determine the order of contribution degree magnitudes; Determine a preset number of fourth measurement points with top rankings from the plurality of third measurement points based on the order of contribution degree magnitudes; Determine the abnormal cause of the first material based on the point characteristics of the four measurement points.
8. A material detection device, characterized in that, The device includes: A measurement point determination module, configured to determine a plurality of first measurement points of a first material, where the plurality of first measurement points are each measurement point at a preset position selected from the surface of the first material; A contribution degree determination module, configured to determine the contribution degree of the first measurement point of the first material, where the contribution degree of the first measurement point is determined according to the difference degree between the point characteristics of the first measurement point and the reference point characteristics; the reference point characteristics are determined based on the mean value of the point characteristics of a plurality of second measurement points, and the plurality of second measurement points are selected from the plurality of first measurement points and the distance difference between the second measurement point and the first measurement point is less than a reference distance; wherein, the contribution degree is used to reflect the deviation degree of the first measurement point relative to all measurement points on the first material; A Mahalanobis distance determination module, configured to determine the Mahalanobis distance of the first material based on the contribution degrees of each of the first measurement points; A material detection module, configured to detect the first material according to the Mahalanobis distance of the first material.
9. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the material detection method according to any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the material detection method according to any one of claims 1-7 when executed by a computer processor.