A gantry CNC machining quality real-time prediction method and system

CN122883765APending Publication Date: 2026-10-09DONGGUAN TUOWANG PRECISION MACHINERY EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611143504.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-09

AI Technical Summary

Benefits of technology

[0021]本发明的有益效果:通过按照统一刀位索引组织加工指令记录与运行状态记录,并利用合格历史加工记录形成分加工段、分统一刀位索引的负载基准中心字段、负载离散字段、跟随误差基准中心字段和跟随误差离散字段,实现了不同产生时序和不同采样粒度的加工数据在同一结构化索引空间中的对应,使当前运行状态数据能够按照实际加工位置调用历史合格基准,从而减少仅按照时间戳进行数据对应所造成的位置错配。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122883765A_ABST
    Figure CN122883765A_ABST
Patent Text Reader

Abstract

The application discloses a gantry CNC machining quality real-time prediction method and system, relates to the technical field of industrial data processing, and comprises the following steps: organizing machining program data and running state data according to a unified tool position index, forming a process data table and a historical qualified segmented reference data table, calibrating the time sequence offset of the process data table and the historical qualified segmented reference data table, generating associated state data records, executing segmented incremental recursion and reliability correction on the associated state data records, and outputting machining quality prediction data records. According to the application, the machining quality prediction can be updated in real time along with the machining program execution progress, and can be traced back to corresponding machining segments, tool position locations, running state data and historical reference data through unified tool position index construction, historical qualified segmented reference calculation, local index offset calibration, associated state data record generation, segmented quality state recursion and prediction reliability correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial data processing technology, specifically to a method and system for real-time prediction of gantry CNC machining quality. Background Technology

[0002] With the digital development of gantry CNC machining equipment, the CNC system continuously generates machining instruction data, program execution time data, spindle load data, and feed axis following error data during the execution of the machining program. These data are generated by the program interpretation module, spindle drive module, and servo feedback module, and are characterized by different data formats, sampling periods, recording granularities, and arrival orders. Existing computer data processing technologies typically use industrial computers or data servers to collect, cache, convert fields, and store this heterogeneous data in a database. Data retrieval and numerical calculations are then performed based on timestamps, record numbers, or machining program segment numbers to obtain information on state changes during the machining process.

[0003] However, machining instruction data is generated according to the execution order of program instructions, while spindle load data and feed axis following error data are generated according to the sampling period of their respective sampling channels. There is a lack of a unified index structure between different data streams that can simultaneously represent the program execution position and the sampling position of the running status. When using timestamps to directly associate data, it is easily affected by CNC system program pre-reading, communication buffering, data transmission delays, sampling period fluctuations, and changes in the execution duration of machining instructions, causing index misalignment between the running status records written to the process data table and the corresponding machining instructions. Using fixed record sequence numbers for association makes it difficult to handle issues such as inconsistent data quantities from different sampling channels, missing local samples, and different data lengths between adjacent machining segments. Furthermore, existing computer processing methods typically perform threshold comparisons on individual sample values ​​or perform offline statistics on the entire batch of data after machining is completed. They fail to perform partial segment calibration of the current process data and historical qualified data based on the machining program execution position, and also struggle to continuously store load change events, following error change events, and their sequential dependencies in structured data records. Therefore, when performing real-time recursive calculations, the results are prone to fluctuations due to incomplete input data, unstable index correspondence, or interruption of continuous event relationships. Furthermore, the output data usually lacks a reliability field to characterize the current data completeness, index correspondence, and data dependency continuity, which is not conducive to the computer system's stable generation, storage, retrieval, and continuous updating of processing quality prediction data. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is that the existing gantry CNC machining quality prediction method has the following problems: the machining program data and the running status data index are inconsistent; the current machining data and the historical qualified benchmark data have local timing misalignment; the dependency relationship between load change and feed axis following error change is difficult to continuously extrapolate; and how to output machining quality prediction results with data credibility description during the execution of the machining program.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for real-time prediction of gantry CNC machining quality, comprising organizing machining program data and running status data according to a unified tool position index to form a process data table and a historical qualified segment benchmark data table.

[0007] The time offset between the calibration process data table and the historical qualified segment benchmark data table is used to generate associated status data records.

[0008] Perform segmented incremental recursion and confidence correction on the associated status data records, and output the processing quality prediction data records.

[0009] As a preferred embodiment of the real-time prediction method for gantry CNC machining quality described in this invention, the step of organizing machining program data and running status data according to a unified tool position index includes: parsing interpolation instructions, spindle status instructions, and tool change instructions in the current machining program, generating machining instruction records respectively, and writing instruction sequence number, tool identifier, interpolation type, instruction start time, instruction end time, and cumulative tool position length into each machining instruction record. Spindle load data and feed axis following error data are acquired, and running status records are generated respectively, writing sampling time, sampling channel, and sampling value into each running status record. Based on the instruction start time, instruction end time, and cumulative tool position length, the sampling time of each running status record is converted into the corresponding tool position, and the tool position is compiled into a unified tool position index according to the machining instruction execution order. Using the unified tool position index as the main index, the machining instruction records and running status records are written into the same process data table, so that each unified tool position index is associated with the corresponding instruction sequence number, tool identifier, interpolation type, spindle load value, and feed axis following error value.

[0010] As a preferred embodiment of the real-time prediction method for gantry CNC machining quality described in this invention, the formation of the process data table and the historical qualified segment reference data table includes: reading historical machining records corresponding to the current machining program; each historical machining record includes a historical process data table, quality measurement items after machining, quality measurement deviation, and quality tolerance fields. Historical machining records whose quality measurement deviation is within the range defined by the corresponding quality tolerance field are marked as qualified historical machining records, and the historical process data tables in each qualified historical machining record are indexed and aligned according to a unified tool position index. Based on the tool identifier, interpolation type, and the tool position continuity relationship between adjacent machining instruction records, the unified tool position index is divided into machining segment indexes. For each unified tool position index under each machining segment index, the spindle load values ​​in the qualified historical machining records are sorted to generate a load reference center field and a load discrete field. The following error values ​​of each feed axis are sorted to generate a following error reference center field and a following error discrete field. Based on the correspondence between the machining segment index and the quality measurement items in the qualified historical machining records, a quality item index is generated. The offset directions of historical spindle load values ​​relative to the load reference center field and historical feed axis following error values ​​relative to the following error reference center field are associated with the offset directions of the corresponding quality measurement deviations to generate load influence direction fields and following error influence direction fields. The quality calibration records corresponding to the current machining program are read. These records include at least critically qualified historical machining records where the quality measurement deviation is close to the corresponding quality tolerance boundary and out-of-tolerance historical machining records where the quality measurement deviation exceeds the corresponding quality tolerance range. For each quality item index, the historical quality state corresponding to each quality calibration record is calculated according to the same association state generation and segmented incremental recursion rules as the current machining. Based on the historical quality state and the corresponding actual quality measurement deviation, quality mapping coefficients and quality mapping biases are fitted to form a quality mapping parameter table. Using the machining segment index and the unified tool position index as a joint index, the load reference center field, load discrete field, following error reference center field, following error discrete field, quality item index, quality tolerance field, load influence direction field, and following error influence direction field are associated and stored to form a historical qualified segmented reference data table.

[0011] As a preferred embodiment of the real-time prediction method for gantry CNC machining quality described in this invention, the temporal offset between the calibration process data table and the historical qualified segment reference data table includes: determining the instruction boundary between adjacent machining instruction records as the index calibration position; reading the spindle load values ​​and each feed axis following error values ​​on both sides of the index calibration position from the process data table and the historical qualified segment reference data table, respectively; generating index offset candidates within the machining segment index defined by adjacent index calibration positions; for each index offset candidate, calculating the cumulative load difference between the spindle load value and the load reference center field in the process data table, and calculating the cumulative following difference between the following error values ​​of each feed axis and the corresponding following error reference center field; determining the index offset candidate with the smallest sum of the cumulative load difference and the cumulative following difference as the index calibration amount for the corresponding index calibration position; updating the unified tool position index in the process data table according to the index calibration amount of adjacent index calibration positions, so that the running status record in the process data table corresponds to the reference field in the historical qualified segment reference data table according to the machining instruction execution position.

[0012] As a preferred embodiment of the real-time prediction method for gantry CNC machining quality described in this invention, the generation of associated state data records includes: for each calibrated unified tool position index, calculating the difference between the spindle load value and the corresponding load reference center field, and using the load discrete field to perform a scale transformation on the difference to generate a load deviation field. The difference between the following error value of each feed axis and the corresponding following error reference center field is calculated, and the difference is used to perform a scale transformation on the difference to generate a following deviation field for each feed axis. According to the arrangement order of the unified tool position indices, the field increment of the load deviation field and each following deviation field relative to the previous unified tool position index is calculated. Based on the sign of the field increment and the number of consecutive occurrences of the same sign, a load increment direction field, a following increment direction field corresponding to each feed axis, a load direction continuous count field, and a following direction continuous count field corresponding to each feed axis are generated. The unified tool position index for which the sign of the load increment direction field has been transformed is written into the load change event record, and the unified tool position index for which the sign of the following increment direction field has been transformed is written into the following change event record. Following the unified tool position index sequence, each load change event record is associated with its adjacent following change event record. The index interval between associated event records is calculated, and a data dependency direction field is generated based on the sequence of associated event records. Based on the load influence direction field and the following error influence direction field, quality influence direction markers are written to the load deviation field and the following deviation field, respectively. The load deviation field, following deviation field, load increment direction field, following increment direction field, direction continuity count field, index interval, data dependency direction field, quality influence direction marker, machining segment index, and quality item index are written to the associated status data record.

[0013] As a preferred embodiment of the real-time prediction method for gantry CNC machining quality described in this invention, the step of performing segmented incremental recursion and reliability correction on the associated state data records includes: for each quality item index, calling records with the same quality item index from the associated state data records, and establishing a data recursion order according to the machining segment index and the unified tool position index. For the current unified tool position index, matching the load deviation field with the corresponding load influence direction field to generate a load quality increment. Matching each following deviation field with the corresponding following error influence direction field to generate a following quality increment. When the data dependency direction field indicates that the load change event record precedes the following change event record, the load quality increment is written to the preceding dependency field of the corresponding following quality increment according to the index interval. When the data dependency direction field indicates that the following change event record precedes the load change event record, the following quality increment is written to the preceding dependency field of the corresponding load quality increment according to the index interval. According to the data recursion order, the load quality increment and following quality increment with the same quality influence direction mark are written to the current quality state field, and the current quality state field is continuously updated according to the direction continuous count field. When the quality influence direction marker changes, the current quality status field before the change is written to the previous quality status record, and the subsequent quality status record is established with the changed load quality increment and the following quality increment. When adjacent machining segment indices correspond to the same quality item index, the current quality status field at the end of the previous machining segment index is written to the initial quality status field of the subsequent machining segment index. When adjacent machining segment indices correspond to different quality item indices, corresponding quality status fields are established respectively. The quality status fields corresponding to each quality item index are continuously updated according to the machining segment index and the unified tool position index, and the quality mapping coefficient and quality mapping bias of the corresponding quality item index in the quality mapping parameter table are called to convert the current quality status field into the current quality deviation prediction value consistent with the unit of the corresponding quality measurement item, forming a quality deviation prediction data sequence of each quality measurement item changing with the progress of the machining program execution.

[0014] As a preferred embodiment of the real-time prediction method for gantry CNC machining quality described in this invention, the output machining quality prediction data record includes: generating a data integrity field based on the number of unified tool position indices written into the running status record in the process data table and the total number of unified tool position indices corresponding to the current machining segment index; generating an index consistency field based on the position of the sum of the cumulative load difference and the cumulative follow-up difference after index calibration in the sorting result of the cumulative corresponding amount of qualified historical machining records; generating a dependency continuity field based on the number of consecutive associated state data records with the same data dependency direction field and the total number of associated state data records in the corresponding machining segment index; converting the data integrity field, index consistency field, and dependency continuity field to the same numerical range, and writing the minimum value of the three fields into the prediction confidence field; reading the current quality deviation prediction value and quality deviation change direction corresponding to each quality item index from the quality deviation prediction data sequence, and calling the corresponding quality tolerance field in the historical qualified segment benchmark data table; writing the quality item index, the current quality deviation prediction value, the quality deviation change direction, the prediction confidence field, and the quality tolerance field into the machining quality prediction data record and outputting it.

[0015] As a preferred embodiment of the real-time prediction system for gantry CNC machining quality described in this invention, it includes a tool position index table creation module, a status record association module, and a segmented incremental prediction module.

[0016] The tool position index table building module is used to organize machining program data and running status data according to a unified tool position index, forming a process data table and a historical qualified segment benchmark data table.

[0017] The status record association module is used to calibrate the time offset between the process data table and the historical qualified segment benchmark data table, and generate associated status data records.

[0018] The segmented incremental prediction module is used to perform segmented incremental recursion and confidence correction on the associated state data records, and output the processing quality prediction data records.

[0019] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a method for real-time prediction of gantry CNC machining quality.

[0020] A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the steps of a method for real-time prediction of gantry CNC machining quality.

[0021] The beneficial effects of this invention are as follows: By organizing machining instruction records and running status records according to a unified tool position index, and using qualified historical machining records to form a load reference center field, a load discrete field, a follow-up error reference center field, and a follow-up error discrete field for each machining segment and unified tool position index, the correspondence between machining data with different generation times and different sampling granularities is realized in the same structured index space. This allows the current running status data to call historical qualified references according to the actual machining position, thereby reducing the position mismatch caused by data correspondence based solely on timestamps.

[0022] By generating index offset candidates at the boundaries of machining instructions, the index calibration amount is determined by completing the cumulative load difference and follow-up difference of scale-uniformity. Furthermore, it forms markers for change events, index intervals, data dependency directions, and quality influence directions, realizing local position calibration between current process data and historical segmented reference data. This enables the spindle load change and the follow-up error change of each feed axis to establish a traceable sequential dependency relationship according to the execution position of the machining program, thereby providing continuous and clearly sourced associated status data records for quality status recursion.

[0023] By recursively deriving the load quality increment, follow-up quality increment, and preceding dependency increment according to the processing segment index and unified tool position index, a quality deviation prediction data sequence for each quality item as the processing progress changes is formed. The minimum value among data completeness, index matching degree, and dependency continuity is written into the prediction confidence field, realizing the synchronous output of prediction values ​​and data basis reliability. This ensures that data missingness, index misalignment, or dependency interruption cannot be compensated by other higher fields, thereby improving the interpretability, traceability, and data processing stability of real-time prediction results. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 The above is an overall flowchart of a method for real-time prediction of gantry CNC machining quality provided in Embodiment 1 of the present invention. Detailed Implementation

[0026] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0027] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for real-time prediction of gantry CNC machining quality is provided, comprising:

[0028] S1. Organize machining program data and running status data according to a unified tool position index to form a process data table and a historical qualified segment benchmark data table.

[0029] Organizing machining program data and runtime status data using a unified tool position index includes parsing interpolation commands, spindle status commands, and tool change commands in the current machining program, generating machining command records, and writing the command sequence number, tool identifier, interpolation type, command start time, command end time, and cumulative tool position length into each machining command record. Spindle load data and feed axis following error data are acquired, and runtime status records are generated, writing the sampling time, sampling channel, and sampling value into each runtime status record. Based on the command start time, command end time, and cumulative tool position length, the sampling time of each runtime status record is converted into the corresponding tool position, and the tool positions are compiled into a unified tool position index according to the machining command execution order. Using the unified tool position index as the primary index, the machining command records and runtime status records are written into the same process data table, so that each unified tool position index is associated with the corresponding command sequence number, tool identifier, interpolation type, spindle load value, and feed axis following error value.

[0030] Furthermore, in this embodiment, the machining program is executed by an industrial computer located on the side of the gantry CNC machine or a data processing server that is communicatively connected to the gantry CNC machine. The current machining program data originates from the program file to be executed and the program execution buffer in the CNC system, while the running status data originates from the open data interface of the CNC system or the equipment data acquisition interface. Both the machining program data and the running status data are input into the processor as computer-readable data records, without directly changing the spindle speed, feed rate, or servo control parameters. The machining instruction record adopts a structured record format containing field names, field types, and field values. The instruction sequence number uses an incrementing integer, the tool identifier uses the tool number in the CNC program, the interpolation type at least distinguishes between linear interpolation, circular interpolation, and rapid positioning, and the cumulative tool path length uses millimeters as a uniform unit of length.

[0031] Furthermore, when analyzing the machining program, interpolation commands are used as the basic command units for forming tool positions, and spindle status commands and tool change commands appearing between adjacent interpolation commands are associated with the first subsequent interpolation command. The start and end times of commands are obtained from the program execution status timestamps of the CNC system. When the CNC system does not directly provide the end time of a command, the start time of the next machining command is used as the end time of the current machining command. Spindle load data is preferably expressed as a percentage of the spindle's rated load, and the following error data of each feed axis is uniformly converted to micrometers. The sampling interval for the running status data can be selected from 5 milliseconds to 20 milliseconds. This range is derived from the update cycle of the gantry CNC equipment's status interface, which can retain changes in spindle load and feed axis following error within the machining segment without excessively increasing the data processing volume.

[0032] Furthermore, considering that the running status record is generated according to the sampling time and the machining instruction record is generated according to the execution order of the machining program, and that the two cannot be directly correlated by record sequence number, this embodiment converts the sampling time into a cumulative tool position based on the relative position of the sampling time within the execution time interval of the corresponding machining instruction, and further quantifies it into a unified tool position index. The corresponding conversion process is expressed as follows:

[0033]

[0034]

[0035] in, Indicates the first The tool position corresponding to each running status record is derived from the relative position at the sampling time within the current machining command execution time interval, and the unit is millimeters. Indicates the first The cumulative tool path length corresponding to the starting position of each machining instruction is derived from the machining program parsing results and is expressed in millimeters. Indicates the first The cumulative tool path length corresponding to the end position of each machining instruction is derived from the machining program parsing results and is in millimeters. Indicates the first The sampling time of each running status record comes from the timestamp of the CNC system or data acquisition interface. Indicates the first The start time of each processing instruction is derived from the program execution status record. Indicates the first The end time of a processing instruction is derived from the program execution status record or the start time of the next processing instruction. This represents the time protection amount to prevent the instruction execution time from being zero. In this embodiment, it is set to 1 millisecond. The setting is derived from the minimum time resolution that the status interface can distinguish. This setting can avoid division by zero and retain short-term processing instruction records. This represents a truncation function that restricts the input value to the range of 0 to 1. It is used to handle boundary data where the sampling timestamp is slightly earlier than the start time of the instruction or slightly later than the end time of the instruction. This represents the tool position length step corresponding to the unified tool position index. In this embodiment, it is set to 0.01 mm to 0.10 mm. The specific value is not less than the device position feedback resolution and not greater than the contour discrete length allowed by the machining program. The setting is derived from the device position feedback accuracy and the machining program interpolation accuracy. This setting can take into account both the tool position correspondence accuracy and the data scale of the process data table. Indicates the first The unified tool position index corresponding to each running status record is a non-negative integer. Indicates the first The unified tool position index corresponding to the starting position of each machining instruction is generated by accumulating the previous machining instructions. This function rounds down to the nearest integer. When the input value is between two integers, it takes the more recent tool position index in the machining instruction execution sequence.

[0036] The above calculations yielded This serves as the common master index for both the running status record and the processing instruction record. When the sampling time exceeds the current processing instruction time interval but the excess does not exceed one sampling period, it is written to the corresponding boundary index through a truncation function. When the excess exceeds one sampling period, the corresponding running status record is marked as a record to be verified and is not included in the real-time calculation of the current process data table.

[0037] Furthermore, when multiple running status records are associated with the same unified tool position index, the spindle load value is the median of the sampled value corresponding to that index, and the following error value of each feed axis is the median of the sampled value of the corresponding sampling channel. When the number of missing indices between two adjacent valid unified tool position indices does not exceed three, linear interpolation is performed based on the valid values ​​before and after. When the number of missing indices exceeds three, it is retained as a null value and a data missing marker is written. The boundary of the three indices is derived from the continuous sample loss tolerance range when the running status interface experiences brief communication jitter. This setting can reduce the impact of a small number of missing samples on subsequent incremental calculations, while avoiding unreliable filling of long data gaps.

[0038] Furthermore, the process data table is implemented using relational data tables, columnar data tables, or in-memory structured data tables. Each row in the process data table uses a unified tool position index as the primary key and includes at least the machining program identifier, instruction number, tool identifier, interpolation type, machining segment assignment marker, spindle load value, follow-up error values ​​for each feed axis, sampling completion marker, and data update time. Different sampling channels are uniformly mapped to the spindle load channel, X-axis follow-up error channel, Y-axis follow-up error channel, and Z-axis follow-up error channel using a pre-established channel mapping table. When the gantry CNC equipment has additional feed axes, corresponding channels are added according to the same field rules, without changing the data organization method of the unified tool position index.

[0039] The process data table and historical qualified segment benchmark data table are generated by reading historical machining records corresponding to the current machining program. Each historical machining record includes a historical process data table, quality measurement items after machining, quality measurement deviation, and quality tolerance fields. Historical machining records whose quality measurement deviation is within the range of the corresponding quality tolerance field are marked as qualified historical machining records, and the historical process data tables in each qualified historical machining record are indexed and aligned according to the unified tool position index. Based on the tool identifier, interpolation type, and tool position continuity relationship between adjacent machining instruction records, the unified tool position index is divided into machining segment indexes. For each unified tool position index under each machining segment index, the spindle load values ​​in the qualified historical machining records are sorted to generate a load benchmark center field and a load discrete field. The follower error values ​​of each feed axis are sorted to generate a follower error benchmark center field and a follower error discrete field. Based on the correspondence between the machining segment index and the quality measurement items in the qualified historical machining records, a quality item index is generated. The offset directions of historical spindle load values ​​relative to the load reference center field and historical feed axis following error values ​​relative to the following error reference center field are respectively associated with the offset direction of the corresponding quality measurement deviation to generate load influence direction fields and following error influence direction fields. Using the machining segment index and unified tool position index as a joint index, the load reference center field, load discrete field, following error reference center field, following error discrete field, quality item index, quality tolerance field, load influence direction field, and following error influence direction field are associated and stored to form a historical qualified segment reference data table.

[0040] Furthermore, historical machining records are mapped to the current machining program through machining program identifier, part model, process identifier, and machining program version number. Quality measurement items are derived from dimensional inspection records, geometric tolerance inspection records, or surface quality inspection records after machining. Quality measurement deviation represents the signed difference between the measured value and the corresponding design target value. The quality tolerance field indicates the lower and upper limits of allowable deviation for that quality measurement item. Only historical machining records where all specified quality measurement items are within their respective quality tolerance ranges are marked as qualified historical machining records. Ideally, at least 10 qualified historical machining records should be retained as a baseline sample for each machining program version. A provisional baseline is allowed if there are fewer than 10 but no fewer than 5 records, while the upper limit of subsequent prediction confidence is limited to 0.70. No formal historical qualified segmented baseline data table is generated if there are fewer than 5 records. The sample size boundary is derived from the minimum sample size requirements of ordinal statistics and directional consistency statistics, which can prevent a small number of historical records from forming unstable baselines.

[0041] Furthermore, the machining segment index is used to represent a continuous, unified tool position index where the tool identifier, interpolation type, and tool position continuity remain consistent. A new machining segment index is created when the tool identifier changes, the interpolation type changes, or the cumulative tool position length difference between adjacent machining instruction records exceeds two unified tool position index steps. The two unified tool position index steps serve as the continuity boundary, derived from the single-point interval allowed for interpolation in the process data table and the machining instruction boundary identification requirements. This setting avoids merging tool changes, interpolation mode transitions, or obviously discontinuous machining positions into the same statistical baseline. The machining segment index increments according to the machining program execution order and, together with the unified tool position index, forms a joint index of historical baseline data.

[0042] Furthermore, considering that spindle load and feed axis following error may still have instantaneous impact values ​​in a small number of qualified historical machining records, directly using the arithmetic mean could easily cause the reference center to be pulled by individual data. Therefore, this embodiment uses the median to form the reference center after sorting, and uses the scale-corrected median absolute deviation to form a discrete field. For any spindle load or feed axis following error data type, the calculation process is expressed as follows:

[0043]

[0044]

[0045] in, Indicates the processing segment index Internal Unified Tool Position Index Corresponding data type The baseline center field is derived from the sorted median of the sampled values ​​corresponding to the qualified historical processing records. Indicates the processing segment index Internal Unified Tool Position Index Corresponding data type The discrete field is used to represent the stable fluctuation scale of qualified historical data around the benchmark center. This indicates the index of machining segments divided according to tool identification, interpolation type, and tool position continuity. This indicates the unified tool position index within the current machining segment index. Indicates the data type involved in the benchmark calculation. When When indicates the spindle load, Time indicates the first The following error of each feed axis. This indicates the number of the qualified historical processing record. Indicates the index in the processing section The following is a set of qualified historical processing records with valid data. Indicates the first Each qualified historical processing record is indexed in the processing segment. and unified tool position index Data types below The sampled values. This represents the median calculation. When the number of valid samples is even, the average of the two middle values ​​after sorting is taken. The scaling correction constant, representing the absolute deviation of the median, is used to make the discrete field form a robust fluctuating scale capable of scaling transformation. Represents data type The minimum discrete protection level is set as follows: the protection level corresponding to the spindle load is set to 0.5% of the rated load, and the protection level corresponding to the feed axis following error is set to twice the resolution of the device position feedback. The setting is based on the effective resolution of the sampled data. This setting can avoid the discrete field being zero, which would cause subsequent scale conversion failure.

[0046] and Write the data to the load reference center field, load discrete field, follow-up error reference center field, and follow-up error discrete field respectively. If the number of valid qualified historical samples for a certain unified tool position index is less than 5, use the valid samples within the range of 5 unified tool position indices before and after that machining segment index for calculation. If it is still less than 5, mark the corresponding reference field as unavailable.

[0047] Furthermore, both the load influence direction field and the follow-up error influence direction field are three-valued fields with values ​​of negative, zero, or positive. For each qualified historical machining record, the offset direction of the spindle load value or feed axis follow-up error value relative to the corresponding reference center field is first determined, and then the offset direction of the corresponding quality measurement deviation relative to the design target value is determined. If the two directions are the same, it is recorded as a positive correlation; if the directions are opposite, it is recorded as a negative correlation; if the absolute value of either offset does not exceed 0.1 times the corresponding discrete field, it is recorded as a zero correlation. For the same machining segment index, unified tool position index, and quality item index, if the proportion of a certain correlation direction in the valid qualified historical machining records reaches 0.6 or more, that direction is written into the corresponding influence direction field. If it is less than 0.6, it is written as a zero correlation. The 0.6 boundary is derived from the majority consistency requirement, which can avoid a few random samples determining the influence direction.

[0048] Furthermore, the quality item index is generated by matching the machining feature identifiers in the machining process document with the quality measurement item identifiers in the quality inspection record. When the same hole, groove, plane, or contour uses the same feature number in both the process document and the inspection record, the quality item index is formed using that feature number. If no identical number exists, a correspondence is established based on the program comments corresponding to the machining segment, the tool's operating area, and the design coordinate range of the inspection item, and this is saved as an item mapping record by the data processing system. Each joint index record in the historical qualified segment benchmark data table stores the data source quantity, update time, and validity status of its benchmark field, enabling subsequent index calibration, deviation generation, and reliability calculation to trace back to specific structured historical data.

[0049] Furthermore, quality calibration records are not included in the calculation of the load reference center field, load discrete field, follow-up error reference center field, and follow-up error discrete field to avoid critical or out-of-tolerance states changing the qualified historical reference. Quality calibration records include critically qualified historical processing records where the quality measurement deviation is close to the corresponding quality tolerance boundary, and out-of-tolerance historical processing records where the quality measurement deviation exceeds the corresponding quality tolerance range. For each quality item index, the same association state generation and piecewise incremental recursion rules as the current processing are used to calculate the historical quality state of each quality calibration record at the corresponding detection position. Using the actual quality measurement deviation as the calibration target, a quality mapping relationship is fitted to obtain the quality mapping coefficient and quality mapping bias. Quality mapping parameters are stored in the quality mapping parameter table according to the quality item index; when the calibration sample is insufficient or the verification error does not meet the preset requirements, only the dimensionless quality state and the direction of quality deviation change are output, without outputting the predicted quality deviation value with actual measurement units.

[0050] It should be noted that this step does not simply store machining program data and equipment sampling data side-by-side according to timestamps. Instead, it transforms both types of data into a unified tool position index that reflects the actual execution position of the machining program, and further utilizes qualified historical machining records to establish a robust benchmark data structure segmented and segmented by tool position. This data organization method overcomes the integration barrier caused by the inconsistency between the granularity of program instructions and the granularity of runtime sampling, ensuring that subsequent calibration and recursive processing have repeatable data boundaries. Moreover, the overall processing manifests as index generation, table structure construction, and benchmark data calculation for industrial process data, reflecting the attributes of computer data processing technology.

[0051] S2. The time offset between the calibration process data table and the historical qualified segment benchmark data table generates associated status data records.

[0052] The timing offset between the calibration process data table and the historical qualified segment reference data table includes: determining the instruction boundary between adjacent machining instruction records as the index calibration position; reading the spindle load values ​​and each feed axis following error values ​​on both sides of the index calibration position from the process data table and the historical qualified segment reference data table, respectively; generating index offset candidates within the machining segment index defined by adjacent index calibration positions; for each index offset candidate, calculating the cumulative load difference between the spindle load value in the process data table and the load reference center field, and calculating the cumulative following difference between each feed axis following error value and the corresponding following error reference center field; determining the index offset candidate with the smallest sum of load difference and following difference as the index calibration amount for the corresponding index calibration position; updating the unified tool position index in the process data table based on the index calibration amounts of adjacent index calibration positions, so that the running status records in the process data table correspond to the reference fields in the historical qualified segment reference data table according to the machining instruction execution position.

[0053] Furthermore, the index calibration location includes at least the tool identifier change location, the interpolation type change location, and the instruction boundary of adjacent machining instruction records. For each index calibration location, 10 to 50 valid unified tool position indices are read forward and backward to form a calibration window. The specific window length is 10% of the number of valid indices in that machining segment, and is limited to between 10 and 50. This range is derived from the requirement to cover the load and tracking error changes on both sides of the instruction boundary, while avoiding the calibration window spanning multiple machining segments, thus balancing the ability to identify local changes and the amount of real-time calculation. When the data missing ratio within the window exceeds 20%, the index calibration amount is not determined independently at that location; instead, the calibration results of adjacent valid index calibration locations are called.

[0054] Furthermore, within each machining segment index, integer index offset candidates are generated centered on the current unified tool position index. The candidate range is preferably between -20 and +20 unified tool position indices. When the maximum allowable delay of the running status interface exceeds the execution time corresponding to 20 unified tool position indices, it can be expanded to between -100 and +100 unified tool position indices, but must not exceed the start and end positions of the current machining segment index. The candidate range is derived from the upper limit of local misalignment that may be caused by CNC system communication delays, sampling buffers, and program pre-reading. This setting can cover foreseeable timing offsets while avoiding incorrect mapping of similar load changes in different machining segments.

[0055] Furthermore, considering that the spindle load and feed axis following error have different dimensions and numerical ranges, directly adding them would cause the data type with the larger value to dominate the index calibration result. This embodiment uses corresponding discrete fields for scaling, and then calculates the cumulative load difference and the cumulative following error. The calculation process is expressed as follows:

[0056]

[0057]

[0058]

[0059] in, Indicates the processing segment index In index offset candidate The cumulative load difference is a dimensionless value. Indicates the processing segment index In index offset candidate The cumulative difference of the following is the cumulative result after the dimensions of each feed axis are unified. This indicates the unified tool position index after offset in the process data table. The corresponding spindle load value. This indicates the unified tool position index after offset in the process data table. The corresponding number Each feed axis following error value. This indicates that the load baseline center field in the historical qualified segment baseline data table originates from the baseline calculation results in S1. This indicates that the load discrete field in the historical qualified segment baseline data table is derived from the baseline calculation result in S1 and is not less than the minimum load discrete protection amount. Indicates the first The following error reference center field for each feed axis is derived from the reference calculation results in S1. Indicates the first The discrete field of the following error corresponding to each feed axis, and not less than the position feedback protection amount of the corresponding feed axis. Indicates the processing segment index The set of unified tool position indices for the valid calibration window corresponding to the current index calibration position. Indicates the number of feed axes involved in the calculation, and is an integer greater than or equal to 1. Indicates the feed axis number. Indicates the index offset candidate, which is an integer within the candidate range. Indicates the processing segment index The set consisting of all valid index offset candidates. This represents the index calibration amount that minimizes the sum of the load difference accumulation and the follow difference accumulation.

[0060] If a candidate index offset results in less than 80% of the valid corresponding data within the calibration window, that candidate is excluded. If two or more candidate index offsets have the same minimum cumulative value, the candidate with the smaller absolute value is preferred. If the absolute values ​​are still the same, the candidate that was selected earlier in the processing program execution direction is chosen. Write the index calibration value field to the corresponding index calibration position.

[0061] Furthermore, when adjacent index calibration positions have different index calibration values, a linear transition is performed between the two index calibration positions according to the unified tool position index order, and the transition result is rounded down before updating the unified tool position index in the process data table. When the difference between adjacent index calibration values ​​exceeds 10 unified tool position indices, the intermediate area is divided into no fewer than 3 equal-length sub-intervals, ensuring that the index update value change in each sub-interval does not exceed 5 unified tool position indices. This boundary is designed to avoid a one-time index jump causing the continuous running status records to be reversed or duplicated. This setting maintains the monotonicity of the updated unified tool position index and the execution order of the machining program.

[0062] Furthermore, after updating the unified tool position index, the running status records with duplicate indexes are sorted by sampling time, and the median of the same sampling channel is calculated for each record. Linear interpolation is performed on regions with no more than three index gaps; if there are more than three gaps, a missing marker is retained. The process data table simultaneously retains the unified tool position index before calibration, the unified tool position index after calibration, the index calibration position, the index calibration amount, the cumulative load difference, and the cumulative follow-up difference, enabling subsequent processing to trace each index update based on data fields, without relying on unexplainable manual adjustments.

[0063] The generation of associated status data records includes: for each calibrated unified tool position index, calculating the difference between the spindle load value and the corresponding load reference center field, and using the load discrete field to scale the difference to generate a load deviation field. The difference between the following error value of each feed axis and the corresponding following error reference center field is calculated, and the difference is scaled using the corresponding following error discrete field to generate a following deviation field for each feed axis. Following the order of the unified tool position indices, the field increments of the load deviation field and each following deviation field relative to the previous unified tool position index are calculated. Based on the sign of the field increment and the number of consecutive occurrences of the same sign, a load increment direction field, a following increment direction field for each feed axis, a load direction continuity count field, and a following direction continuity count field for each feed axis are generated. The unified tool position indexes whose load increment direction field has undergone sign transformation are written to the load change event record, and the unified tool position indexes whose following increment direction field has undergone sign transformation are written to the following change event record. Following the unified tool position index sequence, each load change event record is associated with its adjacent following change event record. The index interval between associated event records is calculated, and a data dependency direction field is generated based on the sequence of associated event records. Based on the load influence direction field and the following error influence direction field, quality influence direction markers are written to the load deviation field and the following deviation field, respectively. The load deviation field, following deviation field, load increment direction field, following increment direction field, direction continuity count field, index interval, data dependency direction field, quality influence direction marker, machining segment index, and quality item index are written to the associated status data record.

[0064] Furthermore, both the load deviation field and the follow-up deviation field represent the dimensionless deviation of the current operating status data from the qualified historical benchmark center. The positive or negative sign indicates the direction of deviation, and the absolute value represents the multiple of the deviation relative to the historical qualified discrete scale. Considering the inconsistency in numerical ranges and units across different data channels, the corresponding discrete fields are used for scale conversion, and field increments are generated during the same calculation process, expressed as:

[0065]

[0066]

[0067]

[0068] in, Indicates a unified tool position index The corresponding load deviation field is a dimensionless value. Indicates a unified tool position index The corresponding number The feed axis following deviation field is a dimensionless value. Indicates the unified tool position index after calibration. The corresponding spindle load value. Indicates the unified tool position index after calibration. The corresponding number Each feed axis following error value. This indicates the increment of the load deviation field relative to the previous unified tool position index. Indicates the first The increment of the feed axis follow-off deviation field relative to the previous unified tool position index. This indicates the previous valid unified tool position index that is adjacent to the current unified tool position index and located ahead of the machining program execution direction. When the corresponding reference field is unavailable, the current sampled value is missing, or the previous unified tool position index does not exist, the increment of the corresponding field is not calculated, and the direction field is written to zero. When the absolute value of the load deviation field and the follow deviation field exceeds 8, it is truncated to 8, and the original value abnormality mark is retained. The value of 8 is to avoid unbounded amplification in subsequent recursive processing due to communication anomalies or sensor anomalies.

[0069] Furthermore, both the load increment direction field and the following increment direction field use three numerical signs: negative, zero, or positive. A positive sign is written when the field increment is greater than 0.1, a negative sign when it is less than -0.1, and a zero sign when it is between -0.1 and +0.1. 0.1 is the dimensionless increment boundary, determined by the statistical lower limit of the absolute value of the normalized field increment in qualified historical machining records, and limited to the range of 0.05 to 0.15. This setting suppresses minor sampling jitter within the reference fluctuation scale. The direction persistence count field starts from 1, incrementing when adjacent valid unified tool position indices have the same direction numerical sign, and rewriting 1 when they do not. When there are more than 5 consecutive zero-direction unified tool position indices, the persistence count is restarted for subsequent new non-zero directions.

[0070] Furthermore, to avoid false change events caused by sign jitter on a single unified tool position index, this embodiment, after a numerical sign conversion in the incremental direction, only writes the initial conversion position into the load change event record or the following change event record if a new non-zero numerical sign appears consecutively for at least two unified tool position indices. Each load change event record is compared with its two most recent following change event records, and the one with the smaller index interval is selected to establish a correlation. When the index intervals are the same, the earlier event in the machining program execution sequence is selected. The index interval of the correlated events is limited to 1 to 30 unified tool position indices. This range is derived from the short-term propagation range of spindle load changes and feed axis response changes within the same machining segment. Data dependencies are not established when the interval exceeds 30 unified tool position indices.

[0071] Furthermore, the data dependency direction field indicates the order in which load change event records and following change event records are written. When the unified tool position index of the load change event record is smaller, the load is written before the following. When the unified tool position index of the following change event record is smaller, the following is written before the load. When both are at the same unified tool position index, the writing is synchronized. The quality influence direction marker is generated by the numerical sign of the current deviation field and the corresponding influence direction field in the historical qualified segment baseline data table: when the two directions match, a positive quality influence is written; when the directions are opposite, a negative quality influence is written; and when either direction is zero, a zero-direction quality influence is written. This marker indicates the deviation of the current operating state from the calculated relationship of the corresponding quality measurement deviation direction, and does not represent the true quality conclusion that has not been measured.

[0072] Furthermore, the associated status data record uses the machining segment index, unified tool position index, quality item index, and sampling channel as combined positioning fields. In addition to the fields specified in the claims, it also stores the current record validity flag, the baseline validity flag, the event association flag, and the data update time. When one unified tool position index corresponds to multiple quality item indices, associated status data records are generated separately according to the quality item indices. When there is no correspondence between quality items, it does not participate in quality status recursion, but retains the load deviation field and the follow-up deviation field for process data traceability. The associated status data record formed in this way serves as the data input for S3 and does not invoke undefined external scoring or black-box prediction models.

[0073] It should be noted that this step places local temporal calibration and change event correlation within the same structured data processing chain. It not only compares the current sampled value with historical baseline values ​​but also maintains the sequential relationship between load changes and follow-up error changes on a unified tool position index. This process overcomes the technical obstacles of not being able to directly calibrate data of different dimensions and the disruption of event sequence caused by local misalignment. It ensures that subsequent recursion uses data records that have undergone positional correspondence, scale unification, and dependency labeling, rather than relying solely on isolated anomaly results formed by single-point thresholds.

[0074] S3. Perform piecewise incremental recursion and confidence correction on the associated status data records, and output the processing quality prediction data records.

[0075] The process of performing segmented incremental recursion and reliability correction on associated status data records includes: for each quality item index, retrieving records with the same quality item index from the associated status data records, and establishing a data recursion order according to the machining segment index and the unified tool position index. For the current unified tool position index, matching the load deviation field with the corresponding load influence direction field to generate a load quality increment. Matching each following deviation field with the corresponding following error influence direction field to generate a following quality increment. When the data dependency direction field indicates that the load change event record precedes the following change event record, the load quality increment is written to the preceding dependency field of the corresponding following quality increment according to the index interval. When the data dependency direction field indicates that the following change event record precedes the load change event record, the following quality increment is written to the preceding dependency field of the corresponding load quality increment according to the index interval. According to the data recursion order, the load quality increment and following quality increment with the same quality influence direction marker are written to the current quality status field, and the current quality status field is continuously updated according to the direction persistence count field. When the quality influence direction marker changes, the current quality status field before the change is written to the previous quality status record, and the subsequent quality status record is established with the changed load quality increment and the following quality increment. When adjacent machining segment indices correspond to the same quality item index, the current quality status field at the end of the previous machining segment index is written to the initial quality status field of the subsequent machining segment index. When adjacent machining segment indices correspond to different quality item indices, corresponding quality status fields are established respectively. The quality status fields corresponding to each quality item index are continuously updated according to the machining segment index and the unified tool position index, and the quality mapping coefficient and quality mapping bias of the corresponding quality item index in the quality mapping parameter table are called to convert the current quality status field into the current quality deviation prediction value consistent with the unit of the corresponding quality measurement item, forming a quality deviation prediction data sequence of each quality measurement item changing with the progress of the machining program execution.

[0076] Furthermore, the data recursion order is first grouped according to the quality item index, then arranged according to the processing program execution order of the processing segment index, and within the same processing segment index, arranged in ascending order according to the unified tool position index. The initial quality status field of each quality item index is set to 0, indicating that no positive or negative quality deviation is preset before the deviation data of the current processing process is obtained. The load deviation field, following deviation field, quality influence direction mark, direction persistence count field, and predecessor dependency field of the current record are all derived from the associated status data records generated by S2, and undefined intermediate quantities are not read from external models or manual scoring.

[0077] Furthermore, the load quality increment represents the signed increment of the load deviation field after directional matching with the load influence direction field. The follower quality increment represents the signed increment of the corresponding feed axis follower deviation field after directional matching with the follower error influence direction field. During directional matching, the positive influence direction is recorded as 1, the zero direction as 0, and the negative influence direction as -1. Considering that a single sampling point deviation should not have the same recursive effect as a continuous same-direction deviation, and that the preceding dependency increment should decay with increasing index interval, the current quality status field is updated according to the following formula:

[0078]

[0079]

[0080]

[0081]

[0082] in, Indicates quality item index In a unified tool position index The load quality increment is the direction matching result between the load deviation field and the load influence direction field. Indicates quality item index In a unified tool position index Next The follow-up quality increment of each feed axis. This indicates the numeric direction corresponding to the load impact direction field, with a value of -1, 0, or 1. Indicates the first The numerical direction corresponding to the direction field of the feed axis following error influence is negative 1, 0 or 1. Indicates quality item index In a unified tool position index The current quality status field below represents the dimensionless quality deviation status relative to the quality tolerance field. This field represents the current quality status of the same quality item index under the previous valid unified tool position index. The recursive coefficient corresponding to the direction of continuous counting is determined by the following formula.

[0083]

[0084] Its value ranges from 0.2 to 1, and remains at 1 after the continuous count reaches 5. The value of 5 is derived from suppressing short-term symbol jitter and preserving continuously changing engineering boundaries. This setting allows the continuous same-direction deviation to gradually increase its recursive effect on the current quality status field. This field represents the direction continuity count corresponding to the current unified tool position index, and is an integer greater than or equal to 1. This indicates the load quality increment or follow-up quality increment written to the preceding dependent field of the current record according to the data dependency direction field. It is 0 if there is no preceding dependency. The index interval decay coefficient representing the preorder dependency increment is determined by the following formula.

[0085]

[0086] Its value ranges from 0 to 1. This indicates the index interval between currently associated event records, with a value ranging from 1 to 30. The corresponding decay coefficient is not applied if no valid associated events exist. This indicates the number of feed axes participating in the current quality project recursion. This represents the normalized quantity used to constrain the scale of the spindle load mass increment, the mass increment of each feed axis, and a preceding dependency increment. It can prevent changes in the number of feed axes from causing an unbounded increase in the recursive magnitude. This indicates a cutoff function that limits the current quality status field to a range of -1.5 to +1.5. The 1.5 times quality tolerance is derived from the requirement that real-time prediction results must both represent a state close to the tolerance boundary and retain a certain range for displaying out-of-tolerance trends. Indicates quality item index In a unified tool position index The current quality deviation is shown below, and the unit is the same as the corresponding quality measurement item. Indicates quality item index The corresponding quality tolerance scale. When the absolute values ​​of the upper and lower limits of the quality tolerance are the same, the corresponding absolute value is used. When the upper and lower limits of the quality tolerance are not asymmetrical, the absolute value of the quality tolerance in the corresponding direction is used according to the current quality state direction.

[0087] In the formula results Write the current quality status field. Write the quality deviation prediction data sequence. When the input deviation field is missing, keep the previous current quality status field unchanged. When the number of valid input channels for the same unified tool position index is less than half of all specified channels, mark the current record as low integrity and reduce the data integrity field in subsequent confidence calculations.

[0088] Furthermore, the current data dependency direction field indicates that when a load change event record precedes a following change event record, the corresponding load quality increment and its unified tool position index are written to the preceding dependency field of the following quality increment. The preceding dependency field only participates in the current quality status update when the index interval is between 1 and 30, and its recursive effect is reduced according to the index interval decay coefficient. The index interval for synchronous events is recorded as 0, and they are not repeatedly written to the preceding dependency field to avoid the same change being calculated twice.

[0089] Furthermore, a quality status segmentation is completed when the quality influence direction marker changes from positive to negative, from negative to positive, or from a non-zero direction to a zero direction for at least five consecutive unified tool position indices. The current quality status field, machining segment index, start and end unified tool position indices, and quality item index corresponding to the last unified tool position index before the conversion are jointly written into the preceding quality status record. The first effective load quality increment and subsequent quality increments after the conversion are used to establish the following quality status record. The zero-direction persistence boundary of the five unified tool position indices is consistent with the upper limit of the direction persistence count, which avoids frequent segmentation of quality status records for short-lived zero-direction data.

[0090] Furthermore, when adjacent processing segment indices correspond to the same quality item index, the original value of the current quality status field at the end of the previous processing segment index is written into the initial quality status field of the subsequent processing segment index, and the direction persistence count field of the subsequent processing segment is reset to 1 to maintain the continuity of quality deviation without inheriting the local persistence count of the previous processing segment. When adjacent processing segment indices correspond to different quality item indices, each quality item index continues to be recursively calculated from its existing end state. When the corresponding quality item has not yet appeared, its initial quality status field is set to 0. When the processing program restarts, the processing program version number changes, or the workpiece identifier changes, the quality deviation prediction data sequence corresponding to this processing is re-established.

[0091] Furthermore, the quality deviation prediction data sequence includes at least a quality item index, a machining segment index, a unified tool position index, a current quality status field, a current quality deviation, a quality influence direction marker, a quality status segment identifier, and a data update time. The current quality deviation prediction value represents a real-time prediction calculated based on the obtained process data and does not replace the actual quality measurement result after machining. After machining is completed and the actual measurement result is obtained, the current historical process data table, quality measurement items, quality measurement deviation, and quality tolerance field are saved as new historical machining records. Only when the actual quality measurement deviation is within the quality tolerance range is the corresponding historical machining record allowed to participate in the benchmark update as a qualified historical machining record in subsequent processing. After machining is completed and the actual quality measurement result is obtained, the current quality deviation prediction value at the time of machining completion is compared with the corresponding actual quality measurement deviation, and the absolute error, maximum absolute error, and out-of-tolerance identification results are recorded. The comparison results are used for subsequent quality mapping parameter updates. Before obtaining the actual measurement result, the current quality deviation prediction value does not replace the quality inspection conclusion after machining is completed.

[0092] The output machining quality prediction data record includes: generating a data integrity field based on the number of unified tool position indices written into the running status record in the process data table and the total number of unified tool position indices corresponding to the current machining segment index; generating an index consistency field based on the position of the sum of the cumulative load difference and the cumulative follow-up difference after index calibration in the sorting result of the cumulative values ​​corresponding to the qualified historical machining records; generating a dependency continuity field based on the number of consecutive associated status data records with the same data dependency direction field and the total number of associated status data records in the corresponding machining segment index; converting the data integrity field, index consistency field, and dependency continuity field to the same numerical range, and writing the minimum value of the three fields into the prediction confidence field; reading the current quality deviation prediction value and quality deviation change direction corresponding to each quality item index from the quality deviation prediction data sequence, and calling the corresponding quality tolerance field from the historical qualified segment benchmark data table; and writing the quality item index, current quality deviation prediction value, quality deviation change direction, prediction confidence field, and quality tolerance field into the machining quality prediction data record and outputting it.

[0093] Furthermore, the data completeness field, index matching field, and dependency continuity field are all converted to a value range of 0 to 1. Considering that prediction confidence should not be compensated for by a higher value in one field by a significantly weaker one, this embodiment uses the minimum value among the three fields as the prediction confidence, ensuring that any deficiency in data loss, index misalignment, or discontinuous dependencies is reflected in the output record. The calculation process is expressed as follows:

[0094]

[0095]

[0096]

[0097]

[0098] in, Indicates the index of the current processing segment. The data integrity field has a value range of 0 to 1. This indicates the number of uniform tool position indices that have been written with valid running status records in the current machining segment index. This indicates the total number of unified tool position indices corresponding to the current machining segment index, which is derived from the machining program data and the unified tool position index step size. This field represents the index matching degree of the current processing segment index. The value ranges from 0 to 1. The larger the value, the closer the cumulative difference after calibration is to the side with the smaller cumulative difference in the sorting of qualified historical processing records. This indicates the position of the sum of the current load difference and the following load difference in the ascending sorted results, with the minimum cumulative value corresponding to position 1. This indicates the number of qualified historical processing records that are included in the current cumulative ranking. This field represents the dependency continuity of the current processing segment index, with a value range of 0 to 1. This indicates the number of related status data records that have the same data dependency direction field and appear consecutively. When multiple consecutive intervals exist, the number of records corresponding to the consecutive intervals containing the current unified tool position index is taken. This indicates the total number of associated status data records in the current processing segment index. This field represents the prediction confidence level of the current processing segment index, with a value range of 0 to 1. This represents the minimum value operation, used to write the lowest value among the three confidence base fields into the prediction confidence field.

[0099] When the number of qualified historical processing records is less than 2, the index matching field is set to 0.5. When the current processing segment index has not yet formed a valid associated event record, the dependency continuity field is set to 0. When the total number of unified tool position indexes is 0, the data integrity field is set to 0. The above processing can avoid generating invalid values ​​when the sample size is insufficient or the denominator is zero.

[0100] Furthermore, the prediction confidence field is only used to indicate the reliability of the data basis of the current processing quality prediction data record, and is not used to replace the current quality deviation. When the prediction confidence field is below 0.40, the output record retains the current quality deviation and is simultaneously written to a low confidence state. When the prediction confidence field is between 0.4 and 0.7, it is written to a moderate confidence state. When the prediction confidence field is not lower than 0.7, it is written to a high confidence state. The above boundaries are the engineering display boundaries in this embodiment, derived from the need to divide the 0 to 1 interval into three intervals: insufficient data basis, referable, and relatively complete data basis, and are not used as thresholds for determining whether the actual quality is qualified or not.

[0101] Furthermore, the current quality deviation is read from the quality deviation prediction data sequence, corresponding to the current unified tool position index. The direction of quality deviation change is determined by comparing the current predicted quality deviation value with the predicted quality deviation values ​​prior to the previous five valid unified tool position indices. A positive direction is written when the difference is greater than 0.02 times the corresponding quality tolerance scale, a negative direction is written when the difference is less than -0.02 times, and a stable direction is written otherwise. The boundary between the five unified tool position indices and the 0.02 times quality tolerance scale is established to avoid frequent direction changes caused by single-point recursive changes. This setting ensures that the output direction of quality deviation change reflects the quality deviation change within a continuous machining process.

[0102] Furthermore, the machining quality prediction data record adopts structured data record output. Each record includes at least the machining program identifier, workpiece identifier, quality item index, current machining segment index, current unified tool position index, current quality deviation, quality deviation change direction, prediction confidence field, quality tolerance field, and data update time. When the current quality deviation reaches or exceeds the corresponding directional quality tolerance, an out-of-bounds warning is added to the display interface or data interface. However, the out-of-bounds warning does not change the machining quality prediction data record fields defined in the claims, nor does it directly write machining control instructions to the CNC system.

[0103] Furthermore, the data processing system updates the machining quality prediction data record every 1 to 10 valid unified tool position indices, with a preferred update step size of 5 unified tool position indices. The update step size is determined by the balance between the process data table update speed and the real-time display refresh load, thus balancing the real-time nature of the prediction data with the computer processing resource consumption. Each update is completed through database query, index sorting, numerical calculation, and structured record writing. The output results are displayed on the human-machine interface, stored in the quality traceability database, or retrieved by the upper-level manufacturing execution system. The core of this output process is the real-time organization, calibration, recursion, and reliability calculation of the gantry CNC machining process data, without requiring direct control of the machine tool actuators as a necessary condition.

[0104] It should be noted that this step does not simply assign a quality pass or fail label based on a single deviation value. Instead, it continuously generates a sequence of quality deviation prediction data for each quality item along the machining segment index and the unified tool position index, and uses the lowest value among data completeness, index matching, and dependency continuity to constrain prediction reliability. This method outputs the predicted values ​​and their data basis simultaneously, overcoming technical problems such as missing local data, incorrect index correspondence, or dependencies being masked by other higher-level fields. It also creates a machining quality prediction data record that can be directly stored, retrieved, sorted, and continuously updated by a computer.

[0105] Example 2, an embodiment of the present invention, provides a real-time prediction system for gantry CNC machining quality, including a tool position index table creation module, a status record association module, and a segmented incremental prediction module.

[0106] The tool position index table creation module is used to organize machining program data and running status data according to a unified tool position index, forming a process data table and a historical qualified segment benchmark data table.

[0107] The status record association module is used to generate associated status data records by acknowledging the time offset between the calibration process data table and the historical qualified segment benchmark data table.

[0108] The segmented incremental prediction module is used to perform segmented incremental recursion and confidence correction on the associated status data records, and output the processing quality prediction data records.

Claims

1. A method for real-time prediction of gantry CNC machining quality, characterized in that, include: Organize machining program data and running status data according to a unified tool position index to form a process data table and a historical qualified segment benchmark data table; The time offset between the calibration process data table and the historical qualified segment benchmark data table is used to generate associated status data records; Perform segmented incremental recursion and confidence correction on the associated status data records, and output the processing quality prediction data records.

2. The real-time prediction method for gantry CNC machining quality as described in claim 1, characterized in that: The process of organizing machining program data and running status data according to a unified tool position index includes... The interpolation command, spindle status command, and tool change command in the current machining program are parsed, and machining command records are generated respectively. The command number, tool identifier, interpolation type, command start time, command end time, and cumulative tool length are written into each machining command record. Acquire spindle load data and follow-up error data for each feed axis, generate operation status records respectively, and write the sampling time, sampling channel and sampling value into each operation status record; Based on the instruction start time, instruction end time, and cumulative tool position length, the sampling time of each running state record is converted into the corresponding tool position, and the tool positions are compiled into a unified tool position index according to the execution order of the machining instructions; Using a unified tool position index as the main index, machining instruction records and running status records are written into the same process data table, so that each unified tool position index is associated with the corresponding instruction number, tool identifier, interpolation type, spindle load value and each feed axis following error value.

3. The real-time prediction method for gantry CNC machining quality as described in claim 2, characterized in that: The formation process data table and the historical qualified segmentation benchmark data table include, Read the historical processing records corresponding to the current processing program. Each historical processing record includes a historical process data table, quality measurement items after processing, quality measurement deviation, and quality tolerance fields. Historical machining records whose quality measurement deviation is within the range of the corresponding quality tolerance field are marked as qualified historical machining records, and the historical process data tables in each qualified historical machining record are indexed and aligned according to the unified tool position index. Based on the tool identifier, interpolation type, and the tool position continuity relationship between adjacent machining instruction records, the unified tool position index is divided into machining segment indexes; For each unified tool position index under each machining segment index, the spindle load values ​​in the qualified historical machining records are sorted to generate a load reference center field and a load discrete field; the follow-up error values ​​of each feed axis are sorted to generate a follow-up error reference center field and a follow-up error discrete field. Based on the correspondence between the processing segment index and the quality measurement items in the qualified historical processing records, a quality item index is generated; The offset direction of the historical spindle load value relative to the load reference center field and the offset direction of the historical feed axis follower error value relative to the follower error reference center field are respectively associated with the offset direction of the corresponding quality measurement deviation to generate the load influence direction field and the follower error influence direction field. Read the quality calibration record corresponding to the current machining program. The quality calibration record includes at least the critically qualified historical machining record where the quality measurement deviation is close to the corresponding quality tolerance boundary and the out-of-tolerance historical machining record where the quality measurement deviation exceeds the corresponding quality tolerance range. For each quality item index, the historical quality status corresponding to each quality calibration record is calculated according to the same associated status generation and segmented incremental recursion rules as the current processing. The quality mapping coefficient and quality mapping bias are fitted based on the historical quality status and the corresponding actual quality measurement deviation to form a quality mapping parameter table. Using the machining segment index and the unified tool position index as a joint index, the load reference center field, load discrete field, following error reference center field, following error discrete field, quality item index, quality tolerance field, load influence direction field and following error influence direction field are associated and stored to form a historical qualified segment reference data table.

4. The real-time prediction method for gantry CNC machining quality as described in claim 3, characterized in that: The time-series offset between the calibration process data table and the historical qualified segment benchmark data table includes, The instruction boundary between adjacent machining instruction records is determined as the index calibration position. The spindle load values ​​and the following error values ​​of each feed axis are read from the process data table and the historical qualified segment reference data table, respectively. Within the machining segment index defined by the adjacent index calibration position, generate index offset candidates. For each index offset candidate, calculate the cumulative load difference between the spindle load value and the load reference center field in the process data table, and calculate the cumulative follower difference between the follower error value of each feed axis and the corresponding follower error reference center field. The index offset candidate with the smallest sum of load difference accumulation and follow difference accumulation is determined as the index calibration amount for the corresponding index calibration position; The unified tool position index in the process data table is updated based on the index calibration amount of adjacent index calibration positions, so that the running status record in the process data table corresponds to the reference field in the historical qualified segment reference data table according to the execution position of the machining instruction.

5. The real-time prediction method for gantry CNC machining quality as described in claim 4, characterized in that: The generated associated status data records include, For each calibrated unified tool position index, calculate the difference between the spindle load value and the corresponding load reference center field, and use the load discrete field to perform scale transformation on the difference to generate the load deviation field; Calculate the difference between the following error value of each feed axis and the corresponding following error reference center field, and use the corresponding following error discrete field to perform scale transformation on the difference to generate the following deviation field of each feed axis; According to the arrangement order of the unified tool position index, calculate the field increment of the load deviation field and each follower deviation field relative to the previous unified tool position index. Based on the numerical sign of the field increment and the number of consecutive occurrences of the same numerical sign, generate the load increment direction field, the follower increment direction field corresponding to each feed axis, the load direction continuous count field, and the follower direction continuous count field corresponding to each feed axis. Write the unified tool position index where the numerical sign of the load increment direction field is converted to a new value to the load change event record, and write the unified tool position index where the numerical sign of the follow-up increment direction field is converted to a new value to the follow-up change event record. Following the order of the unified tool position index, each load change event record is associated with the adjacent following change event record, the index interval between associated event records is calculated, and a data dependency direction field is generated according to the order of associated event records. Based on the load influence direction field and the follower error influence direction field, write quality influence direction markers into the load deviation field and the follower deviation field respectively; Write the load deviation field, follow deviation field, load increment direction field, follow increment direction field, direction persistence count field, index interval, data dependency direction field, quality impact direction marker, processing segment index, and quality item index to the associated status data record.

6. The real-time prediction method for gantry CNC machining quality as described in claim 5, characterized in that: The step of performing segmented incremental recursion and confidence correction on the associated state data records includes, For each quality item index, retrieve records with the same quality item index from the associated status data records, and establish a data recursion order according to the machining segment index and the unified tool position index; For the current unified tool position index, the load deviation field is matched with the corresponding load influence direction field to generate the load quality increment; each follower deviation field is matched with the corresponding follower error influence direction field to generate the follower quality increment. When the data dependency direction field indicates that the load change event record precedes the following change event record, the load quality increment is written to the preceding dependency field of the corresponding following quality increment according to the index interval. When the data dependency direction field indicates that the follow change event record precedes the load change event record, the follow quality increment is written to the preceding dependency field of the corresponding load quality increment according to the index interval. According to the data recursion order, the load quality increment and the following quality increment with the same quality influence direction mark are written into the current quality status field, and the current quality status field is continuously updated according to the direction continuous count field. When the quality influence direction mark changes, the current quality status field before the change is written into the front-end quality status record, and the back-end quality status record is established with the changed load quality increment and the following quality increment. When adjacent processing segment indices correspond to the same quality item index, the current quality status field at the end of the previous processing segment index is written into the initial quality status field of the next processing segment index. When adjacent processing segment indexes correspond to different quality item indexes, corresponding quality status fields are created for each. The quality status field corresponding to each quality item index is continuously updated according to the machining section index and the unified tool position index. The quality mapping coefficient and quality mapping bias of the corresponding quality item index in the quality mapping parameter table are called to convert the current quality status field into the current quality deviation prediction value with the same unit as the corresponding quality measurement item, forming a quality deviation prediction data sequence of each quality measurement item as the machining program execution progress changes.

7. The real-time prediction method for gantry CNC machining quality as described in claim 6, characterized in that: The output processing quality prediction data record includes, A data integrity field is generated based on the number of unified tool position indexes written to the running status record in the process data table and the total number of unified tool position indexes corresponding to the current processing segment index. Based on the position of the sum of the cumulative load difference and the cumulative follow-up difference in the sorting results of the corresponding cumulative amounts of qualified historical processing records, an index matching field is generated. A dependency continuity field is generated based on the number of consecutive associated state data records with the same data dependency direction field and the total number of associated state data records in the corresponding processing segment index. Transform the data integrity field, index matching field, and dependency continuity field to the same numerical range, and write the minimum value of the three fields into the prediction confidence field; Read the current predicted quality deviation value and the direction of quality deviation change corresponding to each quality item index from the quality deviation prediction data sequence, and call the corresponding quality tolerance field from the historical qualified segment benchmark data table; Write the quality item index, current predicted quality deviation value, direction of quality deviation change, prediction confidence field, and quality tolerance field into the processing quality prediction data record and output it.

8. A real-time prediction system for gantry CNC machining quality, employing the real-time prediction method for gantry CNC machining quality as described in any one of claims 1 to 7, characterized in that: This includes a tool position index table creation module, a status record association module, and a segmented incremental prediction module; The tool position index table building module is used to organize machining program data and running status data according to a unified tool position index, forming a process data table and a historical qualified segment benchmark data table. The status record association module is used to calibrate the time offset between the process data table and the historical qualified segment benchmark data table, and generate associated status data records. The segmented incremental prediction module is used to perform segmented incremental recursion and confidence correction on the associated state data records, and output the processing quality prediction data records.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the real-time prediction method for gantry CNC machining quality as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the real-time prediction method for gantry CNC machining quality as described in any one of claims 1 to 7.