A method, device and computing equipment for predicting workpiece surface quality

By establishing a Markov transition model based on sample images and combining mathematical statistical methods in the field of mechanical processing, the accuracy problem of workpiece surface quality prediction is solved and the prediction efficiency and accuracy are improved.

CN118247269BActive Publication Date: 2024-09-17XIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410658988.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-09-17
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

It is difficult to accurately predict the surface quality of workpieces with existing technology. Traditional methods rely on arbitrary opinions of designers and operators or inefficient empirical methods, resulting in inaccurate prediction results.

Method used

By obtaining the sample image of the workpiece, a group distribution model and a segment distribution model are established based on the first attribute data and the second attribute data, the state transition probability matrix is ​​calculated, the Markov transition model is determined, and the workpiece surface is predicted using mathematical statistical methods in the field of machining. quality.

Benefits of technology

It improves the efficiency and accuracy of workpiece surface quality prediction, simplifies the calculation process, reduces the calculation amount, and provides more accurate prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118247269B
    Figure CN118247269B
Patent Text Reader

Abstract

The present application provides a method, device and computing equipment for predicting the surface quality of a workpiece, the method comprising: obtaining a plurality of sample images corresponding to a workpiece to be predicted; grouping the plurality of sample images according to first attribute data of the sample images to obtain a corresponding group distribution model; for a group of sample images in the group distribution model, dividing each sample image in the group of sample images into a plurality of subdivision segments, and dividing the plurality of subdivision segments corresponding to the group of sample images into a plurality of states according to second attribute data of the sample images to obtain a segment distribution model corresponding to the group of sample images; calculating a state transition probability matrix corresponding to the group of sample images according to the segment distribution model; determining parameters of a Markov transition model corresponding to the group of sample images according to the state transition probability matrix to determine the surface quality of the workpiece to be predicted in a machining process corresponding to the group of sample images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of mechanical condition monitoring and material prediction, and in particular to a method, device and computing equipment for predicting the surface quality of a workpiece. Background Art

[0002] The surface quality of workpieces directly affects the appearance, performance and life of products. Therefore, it is necessary to predict and control the surface quality in advance to ensure that the product quality meets the standards. In the general processing process, the surface quality of workpieces is affected by multiple factors such as machine tool status, cutting parameters, spindle vibration, material properties and tool wear. Therefore, predicting the surface quality of processed workpieces and guiding industrial production is a hot spot and difficulty in advanced manufacturing technology. The electric spindle is one of the core components of CNC machine tools. Its vibration characteristics have a significant impact on the processing accuracy and processing quality of workpieces. Its dynamic response prediction and vibration response identification are of great significance to ensure the safe and stable operation and processing quality of CNC machine tools. Traditional quality prediction in the manufacturing industry relies on the arbitrary and discrete opinions of designers, operators and inspectors. These opinions are often inconsistent, resulting in inaccurate results. Another prediction method is the empirical method. The empirical method generally conducts a large number of process experiments under given machine tool processing conditions, such as the control variable method and the orthogonal test method, and then uses statistical analysis methods to obtain empirical models. The efficiency is low and the prediction results are not accurate enough. Summary of the invention

[0003] The present application provides a method for predicting workpiece surface quality, which is used to solve the problem that it is difficult to accurately predict workpiece surface quality in the prior art.

[0004] In a first aspect, the present invention provides a method for predicting the surface quality of a workpiece, the method comprising: acquiring a plurality of sample images corresponding to a workpiece to be predicted, wherein the workpiece to be predicted is a processed workpiece, and the plurality of sample images are obtained by segmenting a cross-sectional image of the workpiece to be predicted; grouping the plurality of sample images according to first attribute data of the sample images to obtain a corresponding group distribution model, wherein each group of sample images in the group distribution model corresponds to a processing process; for a group of sample images in the group distribution model, dividing each sample image in the group of sample images into a plurality of subdivisions, and dividing the plurality of subdivisions corresponding to the group of sample images into a plurality of states according to second attribute data of the sample images to obtain a segment distribution model corresponding to the group of sample images, wherein one segment distribution model corresponds to a processing cycle; calculating a state transition probability matrix corresponding to the group of sample images according to the segment distribution model; determining parameters of a Markov transition model corresponding to the group of sample images according to the state transition probability matrix to determine the surface quality of the workpiece to be predicted in the processing process corresponding to the group of sample images.

[0005] In the above scheme, the first attribute data and the second attribute data based on the sample image can be used to obtain the group distribution model and the segment distribution model based on the sample image corresponding to the workpiece to be predicted, so that the parameters of the Markov prediction model can be determined based on the segment distribution model to predict the surface quality of the workpiece. Among them, by combining the Markov prediction model with the field of mechanical processing and using mathematical statistics to predict the surface quality of the workpiece, the efficiency of the surface quality prediction is improved.

[0006] As an optional method, the first attribute data includes the mean value of the microhardness value, and the method of grouping the multiple sample images according to the first attribute data of the sample images to obtain the corresponding group distribution model includes: obtaining the mean value of the microhardness value corresponding to each sample image; grouping the multiple sample images according to the size of the means corresponding to the multiple sample images, and obtaining the group distribution model, wherein the number of groups in the group distribution model is less than or equal to the number of the multiple sample images. In the above scheme, the microhardness value is suitable for intuitively reflecting the hardness difference of the microstructure inside the metal material, and the sample images are grouped by statistical methods, so that the sample images with similar material characteristics are conveniently grouped into one group, which can simplify the calculation process, reduce the amount of calculation, and make the prediction result more accurate.

[0007] As an optional method, the second attribute data includes the state ratio of black pixels, and each sample image in the group of sample images is divided into multiple subdivisions, and the multiple subdivisions corresponding to the group of sample images are divided into multiple states according to the second attribute data of the sample images, so as to obtain the segment distribution model corresponding to the group of sample images, including: dividing each sample image in the group of sample images into multiple rows and columns, wherein the part where a row and a column intersect and overlap is a subdivision; calculating the state ratio of black pixels in each subdivision, and calculating the mean of the state ratio of all the subdivisions and the standard deviation of the state ratio; dividing the multiple subdivisions into multiple sub-intervals according to the state ratios corresponding to the multiple subdivisions, wherein each sub-interval represents a state, and the width of each sub-interval is determined according to the mean of the state ratio and the standard deviation of the state ratio. In the above scheme, further establishing a segment distribution model on the basis of the group distribution model is conducive to establishing a Markov transition model and more accurately predicting the surface quality of the workpiece.

[0008] As an optional method, the state ratio of black pixels in each subdivision segment is the ratio of the area occupied by black pixels in the subdivision segment to the area of ​​the subdivision segment. In the above scheme, a specific calculation method for the state ratio of black pixels is given, which is conducive to establishing a Markov transition model and more accurately predicting the surface quality of the workpiece.

[0009] As an optional manner, calculating the state transition probability matrix corresponding to the group of sample images according to the segment distribution model includes: calculating the state transition probability matrix according to a first rule, wherein the first rule is that under the state transition probability matrix, each state can only be changed to an adjacent state or its own state:

[0010]

[0011] In the formula, , , , represents the state transition probability matrix; Indicates status +1 to The transition probability of The diagonal elements of the state transition probability matrix represent the state The state of reoccurrence occurs under the premise of occurrence The probability of; N represents a natural number; For status is the number of state observations of the starting condition; is the state in the segment distribution model The number of discrete occurrences; is the state in the segment distribution model The number of subdivisions contained in the jth occurrence, is the total number of subdivisions included in a single sample image. In the above scheme, a method for calculating the state transition probability matrix when the number of states is greater than 2 is given. The state transition probability matrix is ​​improved by the first rule, making the process of calculating the Markov transition model simpler and improving the prediction efficiency of the workpiece surface quality.

[0012] As an optional method, the acquisition of multiple sample images corresponding to the workpiece to be predicted includes: acquiring a cross-sectional image of the workpiece to be predicted; and performing equal-proportion segmentation on the cross-sectional image to obtain the multiple sample images. In the above scheme, the same cross-sectional image is continuously segmented in equal proportion to obtain multiple sample images, each sample image is of the same size, and a reasonable segmentation method is conducive to establishing a group distribution model.

[0013] As an optional method, the cross-sectional image of the workpiece to be predicted is obtained, including: controlling an electron microscope to collect the cross-sectional image corresponding to the workpiece cross section along the machining feed direction of the workpiece to be predicted. In the above scheme, the position and direction of the cross-sectional image are specified, so that the collected sample image can contain more effective information, so that the established Markov transition model can more accurately predict the surface quality of the workpiece.

[0014] In a second aspect, the present invention also provides a workpiece surface quality prediction device, comprising: an acquisition module, used to acquire multiple sample images corresponding to a workpiece to be predicted, wherein the workpiece to be predicted is a processed workpiece, and the multiple sample images are obtained by segmenting the cross-sectional image of the workpiece to be predicted; a grouping module, used to group the multiple sample images according to the first attribute data of the sample images, and obtain a corresponding group distribution model, wherein each group of sample images in the group distribution model corresponds to a processing process; a segmentation module, used to divide each sample image in a group of sample images in the group distribution model into a plurality of sub-segments, and divide the plurality of sub-segments corresponding to the group of sample images into a plurality of states according to the second attribute data of the sample images, and obtain a segment distribution model corresponding to the group of sample images; a calculation module, used to calculate the state transition probability matrix corresponding to the group of sample images according to the segment distribution model; a Markov transition model determination module, used to determine the parameters of the Markov transition model corresponding to the group of sample images according to the state transition probability matrix, so as to determine the surface quality of the workpiece to be predicted in the processing process corresponding to the group of sample images.

[0015] In a third aspect, an embodiment of the present application provides a computing device, comprising: a processor, a memory and a bus, wherein the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method steps of the first aspect.

[0016] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the method steps of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic diagram of a process flow of a workpiece surface quality prediction method provided in an embodiment of the present application is shown;

[0019] Figure 2 A schematic diagram showing 2×8 subdivision segments of a sample image in some embodiments of the present application is shown;

[0020] Figure 3A schematic diagram showing the states of 2×8 subdivided segments of a sample image in some embodiments of the present application is shown;

[0021] Figure 4 A schematic structural diagram of a workpiece surface quality prediction device provided by the present application is shown;

[0022] Figure 5 A schematic diagram of the structure of a computing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0024] In the description of the embodiments of the present application, the term "and / or" is merely a term used to describe the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone.

[0025] Please refer to Figure 1 , Figure 1 A schematic flow chart of a workpiece surface quality prediction method provided in an embodiment of the present application is shown, and the method comprises:

[0026] S10: Acquire a plurality of sample images corresponding to the workpiece to be predicted, wherein the workpiece to be predicted is a processed workpiece, and the plurality of sample images are obtained by segmenting a cross-sectional image of the workpiece to be predicted.

[0027] The workpiece to be predicted refers to a workpiece that has been processed by a CNC machine tool, wherein the workpiece to be predicted may be a metal material. It is understandable that the degree of processing of the workpiece to be predicted may be fine processing or rough processing, and the embodiments of the present application do not specifically limit this.

[0028] The multiple sample images corresponding to the workpiece to be predicted are obtained by segmenting the workpiece from the same cross section at the same time, which can be an enlarged cross-sectional image of the workpiece, so as to reflect the microscopic properties of the cross section of the workpiece. The segmentation can be continuous and proportional segmentation along the same direction, or segmentation of random size along different directions.

[0029] In some embodiments, the cross-sectional image of the workpiece may be segmented into ten sample images.

[0030] In addition, the multiple sample images of the workpiece to be predicted can be data extracted from on-site photography, or data in a directly accessible state, such as sample images received from an external device, read from the cloud or stored locally in advance, etc.

[0031] S20: Grouping a plurality of sample images according to first attribute data of the sample images to obtain a corresponding group distribution model, wherein each group of sample images in the group distribution model corresponds to a processing process.

[0032] The first attribute data is a performance indicator that measures the characteristics of the local microscopic region of the material. For example, the first attribute data may include grayscale value, microhardness value, yield strength, impact toughness, etc. In statistics, the group distribution model is used to describe the probability distribution of individuals in a data set belonging to different groups or categories. Therefore, sample images with similar first attribute data can be divided into the same group. In some embodiments, ten sample images are divided into three groups according to the first attribute data, namely Group 1, Group 2, and Group 3.

[0033] Taking the first attribute data characterizing the material properties of the sample images as an example, after the sample images are grouped according to the first attribute data, sample images with similar material properties are grouped into the same group, and the resulting different groups characterize the changes in the material properties of the workpiece.

[0034] A machining process includes multiple machining cycles. A machining process refers to a type of process that makes the machined workpiece have similar material properties after machining. A single machining cycle represents a certain distance along the workpiece feed direction, such as 0.2mm, 0.5mm, etc. After the sample images with similar material properties are grouped into the same group according to the first attribute data, the same group can represent a machining process.

[0035] S30: For a group of sample images in the group distribution model, each sample image in the group of sample images is divided into multiple sub-segments, and the multiple sub-segments corresponding to the group of sample images are divided into multiple states according to the second attribute data of the sample images to obtain a segment distribution model corresponding to the group of sample images, wherein one segment distribution model corresponds to one processing cycle.

[0036] In order to conduct a more refined analysis of the group distribution model, a single sample image in the group distribution model is divided into multiple subdivisions. The number of subdivisions is flexibly selected according to the cutting parameters. The faster the cutting speed, the more subdivisions there are, and vice versa.

[0037] The second attribute data is a performance indicator that measures the local microscopic regional characteristics of the material. For example, the second attribute data may include black pixels, microhardness values, yield strength, impact toughness, etc., which reflects the state of each subdivided segment related to the change of material properties. According to the second attribute data, multiple subdivided segments are divided into multiple states. The number of states depends on the material property level that can be processed by the workpiece. One state represents one material property level. In statistics, the segment distribution model is a segmentation model or a segmentation model. This model divides the data set into different segments according to certain rules or algorithms. The data in each segment has similar statistical characteristics or behavioral characteristics. A sample image can establish a segment distribution model.

[0038] Taking the embodiment of dividing the sample images into three groups as an example, a sample image in Group 1 is selected, and the selected sample image is subdivided in the horizontal and vertical directions, into 2 subdivision segments in the horizontal direction and 8 subdivision segments in the vertical direction, totaling 2×8 subdivision segments, such as Figure 2 As shown, Figure 2 A schematic diagram of 2×8 subdivisions of a sample image in some embodiments of the present application is shown. The ratio of black pixels in each subdivision is calculated, and the ratio is defined as the state ratio of black pixels. One subdivision corresponds to a state ratio of a black pixel. Then, the average value of the state ratios of all black pixels is calculated. Based on the average value, the subdivisions with a state ratio of black pixels lower than the average value are divided into state I, and those with a state ratio higher than the average value are divided into state II. After the division is completed, all 2×8 subdivisions are divided into two states, as shown in FIG. Figure 3 As shown, Figure 3 A schematic diagram showing the states of 2×8 subdivided segments of a sample image in some embodiments of the present application is shown.

[0039] S40: Calculate the state transition probability matrix corresponding to the group of sample images according to the segment distribution model.

[0040] The state transition probability matrix, also known as the transition probability matrix, Markov matrix or transfer matrix, is a matrix that describes the probability of transitioning from one state to another in a Markov chain or Markov process. This matrix contains the transition probabilities between all possible states in the system. For a Markov chain with n states, its state transition probability matrix is ​​an n×n matrix, where the first The element in the row and column j represents the state The probability of transitioning to state j. Through the state transition probability matrix, the state of the system at a certain point in the future can be predicted. For each current state, the probability of the system transitioning to other states can be calculated, and then the possible state distribution in the future can be obtained.

[0041] S50: Determine the parameters of the Markov transition model corresponding to the group of sample images according to the state transfer probability matrix, so as to determine the surface quality of the workpiece to be predicted in the machining process corresponding to the group of sample images.

[0042] The Markov transition model, also known as the Markov chain, is a statistical model based on the Markov process. It describes the law of state transition of a system in a series of discrete time steps and has the "Markov property". This property means that, given the current state, the conditional probability distribution of the future state depends only on the current state and is conditionally independent of the past state. In short, the state transition probability of the system is only related to the current state and has nothing to do with the past state. The Markov transition model identified by the state transition probability matrix can be used to predict the surface quality of the workpiece and can also simulate the random vibration of the spindle. It should be noted that the surface quality described in this application uniformly refers to the mechanical properties of the surface layer.

[0043] By using the state transition probability matrix and the initial state of the workpiece, the probability distribution of the future state of the workpiece can be calculated to achieve the purpose of predicting the surface quality of the workpiece.

[0044] In the above scheme, the Markov prediction model is combined with the field of mechanical processing. By proposing an improved state transition probability matrix, a mathematical statistical method is used to predict the surface quality of the workpiece. It has the advantages of simplicity, rapidity, accurate prediction, short-term dependence and high sensitivity, which improves the efficiency of surface quality prediction and provides a new idea for the realization of information processing prediction system.

[0045] In some embodiments, the first attribute data includes a mean value of the microhardness value, and the step S20 of grouping the plurality of sample images according to the first attribute data of the sample images to obtain a corresponding group distribution model includes:

[0046] S201: Obtain the mean value of the microhardness value corresponding to each sample image.

[0047] S202: Grouping the multiple sample images according to the sizes of the means respectively corresponding to the multiple sample images, and obtaining a group distribution model, wherein the number of groups in the group distribution model is less than or equal to the number of the multiple sample images.

[0048] In step S201, microhardness is a kind of indentation hardness, which is used to reflect the ability of the object to be tested to resist the indentation of another hard object. The measuring instrument is a microhardness tester, which is a special microscope equipped with a load-adding device and an eyepiece micrometer. During the measurement process, the material to be tested is made into a reflective polishing sheet sample and placed on the stage of the microhardness tester. Subsequently, the four-sided pyramid-shaped diamond indenter is pressurized by the load-adding device so that the diamond indenter is pressed into the surface of the sample, thereby generating a pit. Finally, the length of the diagonal of the pit is measured by a microscope and an eyepiece micrometer, and the microhardness value of the measured material can be calculated based on the applied load and the diagonal length of the pit.

[0049] In step S202, the microhardness distribution of each sample image has a different mean and variance. From a statistical point of view, there is significance in these data. After a significance test is performed on these data, all sample images can be statistically divided into multiple groups according to certain standards, and each group can be represented by a new mean and variance. The new mean and variance can be calculated by the mean and variance of all sample images in the group to characterize the mean variance of the group. When the above grouping method is implemented, it can be understood that all sample images are arranged according to the mean size of the microhardness value, and those with similar sizes are grouped together. When the method of grouping only by the mean is not applicable, the variance can also be used to assist the grouping.

[0050] If the number of groups of the group distribution model is equal to the number of multiple sample images, then one sample image corresponds to one group. If the number of groups of the group distribution model is less than the number of multiple sample images, then sample images with similar means are divided into the same group according to the predetermined number of groups; for example, the number of sample images is 10, the predetermined number of groups is 2, and the means are arranged in ascending order, then one grouping method may be to group the sample images corresponding to the five smallest means into one group, and the sample images corresponding to the five largest means into another group. It can be understood that after the means are arranged in ascending order, if the difference between the sixth mean and the seventh mean is greater than the difference between the sixth mean and the fifth mean, that is, the sixth mean is closer to the fifth mean, then the grouping method may also be to group the sample images corresponding to the first six means into one group, and the sample images corresponding to the last four means into another group. The specific grouping method is not limited to the two in the above examples, and the grouping method is flexible, but the purpose of grouping is to group the sample images with similar means into the same group.

[0051] In the above scheme, a statistical method is used to group sample images, so that sample images with similar material properties are grouped together, which can simplify the calculation process, reduce the amount of calculation, and make the prediction results more accurate.

[0052] In some embodiments, the second attribute data includes a state ratio of black pixels. In step S30, each sample image in the group of sample images is divided into a plurality of subdivided segments, and the plurality of subdivided segments corresponding to the group of sample images are divided into a plurality of states according to the second attribute data of the sample images, to obtain a segment distribution model corresponding to the group of sample images, including:

[0053] S301: Divide each sample image in the group of sample images into multiple rows and columns, wherein a portion where a row and a column intersect and overlap is a subdivision segment.

[0054] Each sample image is divided into m rows and n columns of subdivision segments, a total of m×n subdivision segments, keeping the sequence of subdivision segments unchanged.

[0055] S302: Calculate the state ratio of black pixels in each subdivided segment, and calculate the mean value of the state ratios of all subdivided segments and the standard deviation of the state ratios.

[0056] In some embodiments, the m×n subdivisions correspond to m×n state ratios, and the mean value of all state ratios is r and the standard deviation is c.

[0057] S303: Divide the multiple sub-segments into multiple sub-intervals according to the state ratios respectively corresponding to the multiple sub-segments, wherein each sub-interval represents a state, and the width of each sub-interval is determined according to the mean value of the state ratio and the standard deviation of the state ratio.

[0058] In step S303, the 3C criterion can be used to divide the multiple subdivision segments into multiple subintervals. The 3C criterion is an empirical rule in statistics that is used to describe the degree to which data points in a normal distribution deviate from the mean. In a normal distribution, approximately 68.27% of the data fall within one standard deviation (c) of the mean, 95.45% of the data fall within two standard deviations of the mean, and 99.73% of the data fall within three standard deviations of the mean. The 3C criterion is often used to determine whether a data point is an outlier, and data points that are more than three standard deviations are usually considered abnormal.

[0059] In some embodiments, the number of states is selected as N, and the state ratios of the m×n subdivisions are summarized into N sub-intervals according to the 3c criterion, and the width of each sub-interval is (r-3c, r+3c) / N, so the m×n subdivisions are summarized into N states.

[0060] In the above scheme, a segment distribution model is further established on the basis of the group distribution model, which is conducive to establishing a Markov transition model and more accurately predicting the surface quality of the workpiece.

[0061] In some embodiments, the state ratio of the black pixels in each subdivided segment is the ratio of the area occupied by the black pixels in the subdivided segment to the area of ​​the subdivided segment.

[0062] If the state ratio of black pixels is recorded as r, then

[0063]

[0064] In the above scheme, a specific calculation method for the state ratio of black pixels is given, which is conducive to establishing a Markov transition model and more accurately predicting the surface quality of workpieces.

[0065] In some embodiments, step S40 includes: calculating a state transition probability matrix according to a first rule, where the first rule is that under the state transition probability matrix, each state can only change to an adjacent state or its own state:

[0066] .

[0067] In the formula,

[0068] .

[0069] .

[0070] .

[0071] represents the state transition probability matrix; Indicates status +1 to The transition probability of is the diagonal element of the state transition probability matrix, representing the state The state of reoccurrence occurs under the premise of occurrence The probability of; N represents a natural number; For status is the number of state observations of the starting condition; For the state in the segment distribution model The number of discrete occurrences; For the state in the segment distribution model The number of subdivisions contained in the jth occurrence, The total number of subdivisions to include for a single sample image.

[0072] In some embodiments, according to Figure 3 The state diagram in the state diagram calculates the state transition probability matrix, specifically:

[0073] .

[0074] .

[0075] In the formula, is the diagonal element of the state transition probability matrix, representing the state The state of reoccurrence occurs under the premise of occurrence probability; For status is the number of state observations of the starting condition; For the state in the segment distribution model The number of discrete occurrences; For the state in the segment distribution model The number of subdivisions included in the jth occurrence.

[0076] Depend on Figure 3 It can be seen that the number of subdivisions contained in the first appearance of state I is 2, the number of subdivisions contained in the second appearance is 3, the number of subdivisions contained in the third appearance is 1, and the number of subdivisions contained in the fourth appearance is 4. The total number of discrete appearances is 4, so it can be obtained: =2, =3, =1, =4, where =1, then

[0077] .

[0078] .

[0079] Similarly, the above data of state II can be calculated as , . So far, the state transition probability matrix with state number 2 is obtained as:

[0080] .

[0081] In the above scheme, a method for calculating the state transfer probability matrix when the number of states is greater than 2 is given. The state transfer probability matrix is ​​improved by the first rule, making the process of calculating the Markov transition model simpler and improving the prediction efficiency of the workpiece surface quality.

[0082] In some embodiments, obtaining a plurality of sample images corresponding to the workpiece to be predicted in step S10 includes:

[0083] S101: Acquire a cross-sectional image of the workpiece to be predicted.

[0084] S102: Segment the cross-sectional image in equal proportions to obtain a plurality of sample images.

[0085] In the above scheme, the same cross-sectional image is continuously divided into equal proportions to obtain multiple sample images, each sample image has the same size, and a reasonable division method is conducive to establishing a group distribution model.

[0086] In some embodiments, obtaining a cross-sectional image of the workpiece to be predicted in step S10 includes: controlling an electron microscope to collect a cross-sectional image corresponding to a cross section of the workpiece to be predicted along a machining feed direction.

[0087] Use an electron microscope to collect a magnified image of the workpiece cross section. The electron microscope can be a Leica digital microscope, a metallographic microscope, a high-power microscope, etc. The magnification can be 400 times or 600 times. In CNC machine tools, the feed direction refers to the direction in which the tool or workpiece moves along a certain coordinate axis (such as X, Y, Z axis) during the machining process.

[0088] In the above scheme, the position and direction of the cross-sectional image are specified, so that the collected sample image can contain more effective information, and the established Markov transition model can more accurately predict the surface quality of the workpiece.

[0089] like Figure 4 FIG. 1 is a schematic diagram of a workpiece surface quality prediction device provided by the present application, comprising:

[0090] The acquisition module 200 is used to acquire a plurality of sample images corresponding to the workpiece to be predicted, wherein the workpiece to be predicted is a processed workpiece, and the plurality of sample images are obtained by segmenting a cross-sectional image of the workpiece to be predicted.

[0091] The grouping module 210 is used to group the multiple sample images according to the first attribute data of the sample images to obtain a corresponding group distribution model, wherein each group of sample images in the group distribution model corresponds to a processing process.

[0092] The segmentation module 220 is used to divide each sample image in a group of sample images in the group distribution model into multiple sub-segments, and divide the multiple sub-segments corresponding to the group of sample images into multiple states according to the second attribute data of the sample images, so as to obtain the segment distribution model corresponding to the group of sample images.

[0093] The calculation module 230 is used to calculate the state transition probability matrix corresponding to the group of sample images according to the segment distribution model.

[0094] The Markov transition model determination module 240 is used to determine the parameters of the Markov transition model corresponding to the group of sample images according to the state transition probability matrix, so as to determine the surface quality of the workpiece to be predicted in the processing process corresponding to the group of sample images.

[0095] Figure 5 A schematic diagram of the computing device structure provided in the embodiment of the present application, such as Figure 5As shown, the computing device includes a processor 501, a memory 502 and a bus 503; wherein the processor 501 and the memory 502 communicate with each other through the bus 503. The processor 501 is used to call the program instructions in the memory 502 to execute the methods provided by the above-mentioned method embodiments.

[0096] The processor 501 may be an integrated circuit chip with signal processing capabilities. The processor 501 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It may implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0097] The memory 502 may include, but is not limited to, random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0098] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.

[0099] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the methods provided by the above-mentioned method embodiments.

[0100] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for predicting workpiece surface quality, It is characterized in that The method comprises: Acquire a plurality of sample images corresponding to the workpiece to be predicted, wherein the workpiece to be predicted is a processed workpiece, and the plurality of sample images are obtained by segmenting a cross-sectional image of the workpiece to be predicted; Grouping the plurality of sample images according to the first attribute data of the sample images to obtain a corresponding group distribution model, wherein each group of sample images in the group distribution model corresponds to a processing process; For a group of sample images in the group distribution model, each sample image in the group of sample images is divided into a plurality of subdivided segments, and the plurality of subdivided segments corresponding to the group of sample images are divided into a plurality of states according to the second attribute data of the sample images, so as to obtain a segment distribution model corresponding to the group of sample images, wherein one segment distribution model corresponds to one processing cycle; Calculate the state transition probability matrix corresponding to the group of sample images according to the segment distribution model; Determining parameters of a Markov transition model corresponding to the group of sample images according to the state transition probability matrix to determine the surface quality of the workpiece to be predicted in the machining process corresponding to the group of sample images; The step of calculating the state transition probability matrix corresponding to the group of sample images according to the segment distribution model includes: The state transition probability matrix is ​​calculated according to the first rule and the segment distribution model. The first rule is that under the state transition probability matrix, each state can only change to an adjacent state or its own state. The state transition probability matrix is ​​expressed by the following formula: In the formula, represents the state transition probability matrix; Represents the transition probability from state i+1 to i; are the diagonal elements of the state transition probability matrix, representing the probability of state i occurring again under the premise that state i occurs; N represents a natural number; is the number of state observations with state i as the starting condition; is the number of discrete occurrences of state i in the segment distribution model; is the number of subdivision segments contained in the jth occurrence of state i in the segment distribution model; The total number of subdivisions to include for a single sample image.

2. The method according to claim 1, It is characterized in that The first attribute data includes a mean value of the microhardness value, and the plurality of sample images are grouped according to the first attribute data of the sample images to obtain a corresponding group distribution model, including: Obtain the mean value of the microhardness value corresponding to each sample image; The multiple sample images are grouped according to the sizes of the means respectively corresponding to the multiple sample images, and the group distribution model is obtained, and the number of groups in the group distribution model is less than or equal to the number of the multiple sample images.

3. The method according to claim 1, It is characterized in that The second attribute data includes a state ratio of black pixels, and the step of dividing each sample image in the group of sample images into a plurality of subdivision segments, and dividing the plurality of subdivision segments corresponding to the group of sample images into a plurality of states according to the second attribute data of the sample images, to obtain a segment distribution model corresponding to the group of sample images, includes: Divide each sample image in the group of sample images into multiple rows and columns, wherein a portion where a row and a column intersect and overlap is a subdivision segment; Calculating a state ratio of black pixels in each subdivided segment, and calculating a mean value of the state ratios of all the subdivided segments and a standard deviation of the state ratios; The multiple sub-segments are divided into multiple sub-intervals according to the state ratios respectively corresponding to the multiple sub-segments, wherein each sub-interval represents a state, and the width of each sub-interval is determined according to the mean value of the state ratio and the standard deviation of the state ratio.

4. The method according to claim 3, It is characterized in that The state ratio of the black pixels in each subdivision segment is the ratio of the area occupied by the black pixels in the subdivision segment to the area of ​​the subdivision segment.

5. The method according to any one of claims 1 to 4, It is characterized in that The step of acquiring a plurality of sample images corresponding to the workpiece to be predicted includes: Acquiring a cross-sectional image of the workpiece to be predicted; The cross-sectional image is divided into equal proportions to obtain the plurality of sample images.

6. The method according to claim 5, It is characterized in that The step of acquiring the cross-sectional image of the workpiece to be predicted comprises: The electron microscope is controlled to collect the cross-sectional image corresponding to the cross-sectional area of ​​the workpiece to be predicted along the machining feed direction.

7. A workpiece surface quality prediction device, It is characterized in that include: An acquisition module, used for acquiring a plurality of sample images corresponding to a workpiece to be predicted, wherein the workpiece to be predicted is a processed workpiece, and the plurality of sample images are obtained by segmenting a cross-sectional image of the workpiece to be predicted; A grouping module, used for grouping the plurality of sample images according to the first attribute data of the sample images to obtain a corresponding group distribution model, wherein each group of sample images in the group distribution model corresponds to a processing process; a segmentation module, for a group of sample images in the group distribution model, dividing each sample image in the group of sample images into a plurality of subdivision segments, and dividing the plurality of subdivision segments corresponding to the group of sample images into a plurality of states according to the second attribute data of the sample images, so as to obtain a segment distribution model corresponding to the group of sample images; A calculation module, used for calculating the state transition probability matrix corresponding to the group of sample images according to the segment distribution model; A Markov transition model determination module is used to determine the parameters of the Markov transition model corresponding to the group of sample images according to the state transition probability matrix, so as to determine the surface quality of the workpiece to be predicted in the processing process corresponding to the group of sample images; The calculation module is specifically used to calculate the state transition probability matrix according to the first rule and the segment distribution model. The first rule is that under the state transition probability matrix, each state can only change to an adjacent state or its own state. The state transition probability matrix is ​​expressed by the following formula: In the formula, represents the state transition probability matrix; Represents the transition probability from state i+1 to i; are the diagonal elements of the state transition probability matrix, representing the probability of state i occurring again under the premise that state i occurs; N represents a natural number; is the number of state observations with state i as the starting condition; is the number of discrete occurrences of state i in the segment distribution model; is the number of subdivision segments contained in the jth occurrence of state i in the segment distribution model; The total number of subdivisions to include for a single sample image.

8. A computing device, include: A processor, a memory and a bus, wherein the processor and the memory communicate with each other via the bus; the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the method according to any one of claims 1 to 6.