A method and system for quickly determining the optimal labeling position in the cutting link
By performing gridding on the board material and optimizing the Hamiltonian path, the optimal labeling position was determined, solving the problem of label damage during the panel furniture cutting process and improving label integrity and equipment automation efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-03-20
AI Technical Summary
In the panel furniture cutting process, existing technology cannot accurately determine the labeling position of the workpiece, which makes the label easy to be damaged during processing, affecting the integrity of the label and the identification of subsequent processes.
By meshing the slab material to be cut, rectangular blocks in non-processed areas are extracted using AND operations as candidate labeling locations. The shortest distance and Hamiltonian path are calculated to determine the optimal labeling location. Ant colony algorithm or genetic algorithm is used to optimize the labeling order to ensure that the labels are not damaged by processing actions.
It improves label integrity and equipment automation efficiency, is suitable for rapid labeling under complex layouts, and significantly improves labeling accuracy and efficiency.
Smart Images

Figure CN120793348B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of furniture processing, and in particular to a method and system for quickly determining an optimal labeling position in a cutting step. BACKGROUND
[0002] In the process of processing plate furniture, the purpose of the cutting step is to disassemble a plate into small pieces, which can be used as basic workpieces for making furniture, and each workpiece will have different sizes of holes, grooves, and milling and other broken surface processing actions. Before the cutting step, an automatic labeling machine is used to attach a label to each workpiece, which indicates the work order number, layout number, and size information of the workpiece, making it easy to check whether the actual size and standard size of each workpiece are consistent after processing is completed; at the same time, the label also has a two-dimensional code, which will be read by a laser scanner in the subsequent sorting step to obtain processing information from the total control system; the final installation step can also facilitate the installer to correspond the workpiece number with the position number on the drawing; therefore, it is particularly important to ensure the integrity of the labels of each workpiece in the cutting step.
[0003] To ensure the integrity of the labels of each workpiece in the cutting step, how to find the labeling position of each workpiece in the plate to be cut to avoid the labels being damaged by the processing actions in the cutting step is a problem that needs to be solved urgently.
[0004] At present, an invention patent application with the publication number CN105549536A discloses a method and system for controlling large plate nesting, in which a corresponding configuration file is generated according to the data information of the plate to be processed; the configuration information of the configuration file is read and analyzed, the plate layout information is generated and optimized according to the configuration information, and a labeling file and a processing file are generated; the labeling is started in the feeding area according to the labeling file; here, the labeling specifically refers to attaching the label to the plate to be processed.
[0005] The above method directly generates a labeling file according to the configuration information of the configuration file, and attaches the label to the plate to be processed according to the labeling file, and does not involve the finding of the labeling position, which cannot guarantee the integrity of the labels of each workpiece in the cutting step. SUMMARY
[0006] To solve the technical problem of being unable to accurately obtain the labeling position of each workpiece in the plate to be cut, the present application provides a method and system for quickly determining an optimal labeling position in a cutting step, which can determine the optimal labeling position of each workpiece in the plate to be cut to avoid the labels being damaged by the processing actions in the cutting step.
[0007] In a first aspect, the application provides an avoidance method for quickly determining an optimal labeling position in a cutting link, the avoidance method comprising: obtaining labeling candidate positions of each workpiece in a to-be-cut plate, including: dividing the workpiece into a plurality of grid points, marking grid points in a processing region as 0, and marking grid points in a non-processing region as 1; performing an AND operation on an arbitrary row of grid points and grid points in an adjacent lower row, and performing an AND operation again on the AND operation result and the adjacent lower row, until there is no adjacent lower row, determining a plurality of rectangular regions according to the arbitrary row of grid points and a plurality of AND operation results; taking a rectangular region that meets a preset condition as a labeling candidate position; calculating the shortest distance from an arbitrary labeling candidate position in an arbitrary workpiece to each labeling candidate position in other workpieces, and selecting a labeling candidate position with the minimum average shortest distance as the optimal labeling position of the workpiece.
[0008] By performing grid processing on the processing regions of a plurality of workpieces in a to-be-cut plate, and performing an AND operation between grid points row by row to extract a rectangular block of the non-processing region in the workpiece adaptively, the rectangular block that can cover a label is taken as a labeling candidate position of the workpiece; since the to-be-cut plate includes at least one workpiece, the optimal labeling position of each workpiece in the to-be-cut plate is selected based on the minimum average distance, effectively avoiding the label from being damaged by the processing action in the cutting link; further, the shortest Hamilton path of the optimal labeling position of each workpiece is obtained, and each workpiece is labeled along the shortest Hamilton path, significantly improving the labeling accuracy and the automation efficiency of the equipment, and being suitable for fast labeling optimization under complex layout.
[0009] Preferably, the dividing of the workpiece into a plurality of grid points comprises: obtaining extension lines of each side length of an arbitrary processing region, and the plurality of grid points correspond to rectangular regions enclosed by the extension lines.
[0010] The grid is divided by the extension lines of the side length of the processing region; the grid points are adaptively divided according to the distribution of the processing region, the number of grids is related to the distribution of the processing region, unnecessary grid points are reduced, and the boundaries of the grids coincide with the boundaries of the processing region, ensuring that a processing region can fall completely into a grid point.
[0011] Preferably, the determining of a plurality of rectangular regions according to the arbitrary row of grid points and a plurality of AND operation results comprises: merging adjacent non-processing regions in the arbitrary row of grid points or the arbitrary AND operation result to obtain a rectangular region corresponding to the arbitrary row of grid points or the arbitrary AND operation result.
[0012] The AND operation result can represent the merging result of the non-processing region in the vertical direction, and adjacent non-processing regions are merged on the basis of the AND operation result, realizing the merging of the non-processing region in the horizontal direction, and ensuring that a continuous rectangular region in the workpiece can be found.
[0013] Preferably, the preset condition is that the short side of the rectangle is greater than or equal to the short side of the label, and the long side of the rectangle is greater than or equal to the long side of the label.
[0014] The preset condition is used to filter out the rectangles that are not suitable for labeling, thereby improving the stability and practicability of the candidate labeling points.
[0015] Preferably, the workpieces The optimal labeling position is:
[0016] ; is any workpiece in the workpiece to be cut, is the first labeling candidate position in the workpiece , is the first labeling candidate position in the workpiece , is and the Euclidean distance, is the set of all labeling candidate positions in the workpiece , is the set of all labeling candidate positions in the workpiece ; The output of the minimum value of the Euclidean distance, The output of the minimum value of the Euclidean distance is the labeling candidate position corresponding to the minimum value.
[0017] The optimal point is selected based on the average of the shortest distances between the candidate labeling points and the labeling points of other workpieces, so that the optimal labeling positions of the workpieces are most compact in spatial distribution.
[0018] Preferably, and the Euclidean distance is the Euclidean distance between the center point coordinates of the labeling candidate position and the center point coordinates of the labeling candidate position .
[0019] Preferably, after obtaining the optimal labeling positions of the workpieces, the avoidance method further comprises: obtaining the shortest Hamilton path of the optimal labeling positions of the workpieces, and labeling the workpieces along the shortest Hamilton path.
[0020] The shortest Hamilton path is used for labeling sequence planning, and the Hamilton path can ensure that the optimal labeling positions of the workpieces are passed once, and the shortest Hamilton path can ensure the optimal labeling efficiency.
[0021] Preferably, the method for obtaining the shortest Hamilton path comprises: in response to the number of optimal labeling positions being greater than the preset number, solving the shortest Hamilton path by using an ant colony algorithm or a genetic algorithm; otherwise, solving the shortest Hamilton path by using a dynamic programming algorithm or a branch and bound algorithm.
[0022] Preferably, the processing area comprises a minimum circumscribed rectangle of a hole, a slot and a milling.
[0023] The second aspect of the present application further provides an avoidance system for quickly determining optimal labeling positions in a cutting link, comprising a processor and a memory, wherein the memory stores computer program instructions which, when executed by the processor, implement the avoidance method for quickly determining optimal labeling positions in a cutting link according to the first aspect of the present application.
[0024] The technical solution of the present application has the following beneficial technical effects:
[0025] By performing grid processing on the processing areas of the plurality of workpieces in the cutting plate, and performing the exclusive OR operation between the grid points row by row to extract the rectangular blocks of the non-processing areas in the workpieces adaptively, the rectangular blocks capable of covering labels are taken as the labeling candidate positions of the workpieces; since the cutting plate to be cut includes at least one workpiece, the optimal labeling positions of the workpieces in the cutting plate to be cut are selected based on the minimum average distance, so that the labels are effectively prevented from being damaged by the processing actions in the cutting link; further, the shortest Hamilton path of the optimal labeling positions of the workpieces is obtained, and the workpieces are labeled along the shortest Hamilton path, so that the labeling accuracy and the equipment automation efficiency are significantly improved, and the fast labeling optimization under complex layout is applicable. BRIEF DESCRIPTION OF DRAWINGS
[0026] Figure 1 FIG. 1 is a flowchart of an avoidance method for quickly determining optimal labeling positions in a cutting link according to an embodiment of the present application.
[0027] Figure 2 FIG. 2 is a schematic diagram of a processing area of a workpiece according to an embodiment of the present application.
[0028] Figure 3 FIG. 3 is a schematic diagram of a plurality of grid points of a workpiece according to an embodiment of the present application.
[0029] Figure 4 FIG. 4 is a schematic diagram of rectangular areas corresponding to the exclusive OR operation results of the first and second rows according to an embodiment of the present application.
[0030] Figure 5 FIG. 5 is a schematic diagram of rectangular areas corresponding to the exclusive OR operation results of the first, second and third rows according to an embodiment of the present application.
[0031] Figure 6is a schematic diagram of a rectangular region corresponding to a first row according to an embodiment of the present application.
[0032] Figure 7 is a schematic diagram of labeling a plate to be cut according to an embodiment of the present application.
[0033] Figure 8 is a structural block diagram of an avoidance system for quickly determining an optimal labeling position in a cutting link according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0035] According to a first aspect of the present application, the present application provides an avoidance method for quickly determining an optimal labeling position in a cutting link. Figure 1 is a flowchart of an avoidance method for quickly determining an optimal labeling position in a cutting link according to an embodiment of the present application. As shown in Figure 1 , the avoidance method for quickly determining an optimal labeling position in a cutting link includes steps S101 to S102, which will be described in detail below.
[0036] S101, obtaining labeling candidate positions of each workpiece in a plate to be cut.
[0037] In an embodiment, the plate to be cut is a plate containing layout information of a plurality of workpieces, and the layout information includes a position of each workpiece in the plate; the sizes and processing regions of different workpieces are different; and the processing region includes a minimum circumscribed rectangle of a hole, a slot and milling.
[0038] Exemplarily, please refer to Figure 2 , a schematic diagram of a processing region of a workpiece according to an embodiment of the present application, Figure 2 , a workpiece surface includes a slot and two holes, the center of the hole is taken as a rectangular center point, the diameter of the hole is taken as the length and width of the rectangle, and a minimum circumscribed rectangle of the hole is obtained; since the slot itself is a rectangle, the region occupied by the slot is taken as a minimum circumscribed rectangle of the slot, and thus all processing regions in the workpiece are obtained.
[0039] The label candidate position of any workpiece needs to avoid the machining area in the workpiece. Specifically, the label candidate position of each workpiece in the to-be-cut plate is obtained by: dividing the workpiece into a plurality of grid points, marking the grid points of the machining area as 0, and marking the grid points of the non-machining area as 1; performing AND operation on the grid points of any row and the grid points of the adjacent lower row, and performing AND operation again on the AND operation result and the adjacent lower row, until there is no adjacent lower row, determining a plurality of rectangular regions according to the grid points of the any row and the plurality of AND operation results; and taking the rectangular region satisfying the preset condition as the label candidate position.
[0040] The dividing the workpiece into a plurality of grid points comprises: obtaining the extension lines of the side lengths of any machining area, and the plurality of grid points correspond to the rectangular regions enclosed by the extension lines.
[0041] Exemplarily, referring to Figure 3 , the schematic diagram of the plurality of grid points of the workpiece according to the embodiment of the present application; one machining area corresponds to four extension lines, and the extension lines are all horizontal or vertical straight lines. The extension lines of each machining area can divide the workpiece into a plurality of rectangular regions with different sizes. Each rectangular region is regarded as a grid point to realize the adaptive division of the workpiece. The grid points containing the machining area are taken as the machining area grid points, and the grid points are marked as 0. The grid points not containing the machining area are taken as the non-machining area grid points, and the grid points are marked as 1 to obtain the grid point matrix, Figure 3 The corresponding grid point matrix is: ; the size is 5 rows and 7 columns, that is, the workpiece is divided into 35 grid points. As can be seen from the grid point matrix, the grid point in the 2nd row and the 2nd column is a machining area, and the grid point in the 1st row and the 1st column does not have a machining area. If the label is attached to the position of the grid point corresponding to the 1st row and the 1st column, the machining action in the cutting link will not be affected, that is, the label will not be damaged by the machining action in the cutting link.
[0042] It should be noted that the size of each grid point is related to the distribution of the machining area. Therefore, after obtaining the grid points, the positions and sizes of the grid points need to be recorded to facilitate the subsequent determination of the label candidate position in the workpiece.
[0043] In one embodiment, after obtaining the grid point matrix, AND operation is performed on the grid points of any row and the grid points of the adjacent lower row, AND operation is performed again on the AND operation result and the adjacent lower row, until there is no adjacent lower row, a plurality of AND operation results corresponding to the grid points of the row are obtained, and a rectangular region corresponding to the grid points of the row is determined according to the grid points of the row and the plurality of AND operation results. Then, a plurality of rectangular regions corresponding to each row of grid points in the workpiece are obtained.
[0044] For example, taking the first row as an example, the process of obtaining the rectangular area corresponding to the grid points in the first row is described in detail. After marking each grid point with 0s and 1s, the grid points in the first row are... The second row of grid points is Perform a bitwise AND operation on the first and second rows to obtain the result. At this point, the first "1" in the calculation result corresponds to the grid point in the first row and first column. And the grid points in the 2nd row and 1st column The union region corresponds to the grid point in the 1st row and 3rd column of the result, where the third "1" in the result is located. And the grid points in the 2nd row and 3rd column The union region is then calculated, and so on; the non-processed regions adjacent to the result (i.e., the region corresponding to the value 1) are merged to obtain the rectangular region corresponding to the result, and the AND operation results of the first and second rows are then calculated. By merging adjacent "1" regions (i.e., non-processing areas), a total of 3 rectangular regions can be obtained. Please refer to [link / reference]. Figure 4 This is a schematic diagram of the rectangular regions corresponding to the AND operation results of the first and second rows according to embodiments of this application. Further, the grid points in the third row are... ; AND the result of the first and second rows Perform the AND operation again with the grid points in the third row to obtain the AND results of the first, second, and third rows. Please see Figure 5 This is a schematic diagram of the rectangular regions corresponding to the AND operation results of the first, second, and third rows according to embodiments of this application. It should be noted that the grid points in the first row themselves... Similarly, as the result of the AND operation, merging adjacent non-processed regions yields the following: Figure 6 The diagram shown is a schematic diagram of the rectangular area corresponding to the first row according to an embodiment of this application.
[0045] In this way, the AND operation result is repeatedly performed with the adjacent row below until there are no adjacent rows below. Then, the first row itself and the rectangular area corresponding to each AND operation result are taken as the rectangular area corresponding to the grid point of the first row.
[0046] In one embodiment, each row of grid points in the workpiece is traversed to obtain all rectangular regions in the workpiece. All rectangular regions in the workpiece are then filtered, and rectangular regions and grid points with an area greater than that of the label are selected as candidate labeling locations. Specifically, selecting rectangular regions that meet preset conditions as candidate labeling locations includes: the preset conditions being that the shorter side of the rectangle is greater than or equal to the shorter side of the label, and the longer side of the rectangle is greater than or equal to the longer side of the label.
[0047] Understandably, grid points are also rectangles, and each grid point can be regarded as a rectangular area of the smallest unit. If a grid point meets the preset conditions, it can be directly used as a candidate position for labeling.
[0048] In this way, a candidate labeling position is obtained in the workpiece. This candidate labeling position can avoid the processing area in the workpiece and prevent the label from being damaged by the processing action in the cutting process.
[0049] S102, calculate the shortest distance from any labeling candidate position in any workpiece to each labeling candidate position in other workpieces, and select the labeling candidate position with the smallest mean of the shortest distance as the optimal labeling position of the workpiece.
[0050] In one embodiment, in step S101, the candidate labeling positions for each workpiece in the sheet material to be cut have been obtained, and the optimal labeling position for each workpiece is determined based on the distance relationship between the candidate labeling positions for each workpiece.
[0051] Please see Figure 7 This is a schematic diagram of labeling a sheet material to be cut according to an embodiment of this application. The sheet material to be cut is placed horizontally, and a labeling device is used for labeling. The labeling device includes a gantry and a printer. The gantry moves along a first direction, and the printer moves along a second direction perpendicular to the first direction. In order to minimize the number of stops the printer makes along the gantry's movement direction, the print head's movement range should be as small as possible, and the number of stops should be as few as possible. The optimal labeling positions of each workpiece should be spatially most compact. Therefore, for any candidate labeling position in any workpiece, the shortest distance from the candidate labeling position to each candidate labeling position in other workpieces is calculated, and the candidate labeling position with the smallest mean of the shortest distance is selected as the optimal labeling position of the workpiece.
[0052] Specifically, the workpiece Optimal labeling position for:
[0053] ;
[0054] in, For the workpiece in the sheet material to be cut Any workpiece other than For workpiece The Middle One labeling candidate position For workpiece The Middle One labeling candidate position for and Euclidean distance, For workpiece The set of all candidate labeling positions in the set. for the workpiece a set of all labeling candidate positions in the workpiece; the output of which is the minimum value of the Euclidean distance, the output of which is the labeling candidate position corresponding to the minimum value of the Euclidean distance.
[0055] wherein, and the Euclidean distance of the labeling candidate position the center point coordinate of the labeling candidate position the center point coordinate of the labeling candidate position.
[0056] Thus, the optimal labeling position of each workpiece is selected from the labeling candidate positions of each workpiece, so that the optimal labeling positions of each workpiece are most compact in spatial distribution.
[0057] In one embodiment, after obtaining the optimal labeling position of each workpiece, the avoidance method further comprises: obtaining the shortest Hamilton path of the optimal labeling position of each workpiece, and labeling each workpiece along the shortest Hamilton path.
[0058] wherein, the Hamilton path refers to a path that passes through all vertices exactly once and only once in an undirected graph; the optimal labeling position of each workpiece is taken as a vertex in the undirected graph, and the path that passes through all vertices exactly once and only once is at least one, the shortest Hamilton path is obtained as the labeling path, and then the gantry and the printer are controlled to label each workpiece along the shortest Hamilton path, so as to quickly complete the labeling operation of each workpiece in the to-be-cut plate, avoid the label being damaged by the machining action in the cutting process, and improve the efficiency of the labeling operation.
[0059] wherein, the method for obtaining the shortest Hamilton path comprises: in response to the number of optimal labeling positions being greater than a preset number, using an ant colony algorithm or a genetic algorithm to solve the shortest Hamilton path; otherwise, using a dynamic programming algorithm or a branch and bound algorithm to solve the shortest Hamilton path. The preset number is 20.
[0060] Understandably, the dynamic programming algorithm or the branch and bound algorithm is suitable for small-scale problems and can accurately calculate the shortest Hamilton path; when the number of optimal labeling positions is greater than the preset number, it is a large-scale problem at this time, and the calculation amount is large, so the dynamic programming algorithm or the branch and bound algorithm suitable for small-scale problems is no longer applicable, and a heuristic algorithm such as the ant colony algorithm or the genetic algorithm suitable for large-scale problems is needed to solve the shortest Hamilton path; to ensure that the shortest Hamilton path can be quickly obtained. The dynamic programming algorithm, the branch and bound algorithm, the ant colony algorithm and the genetic algorithm are known to those skilled in the art, and will not be described here.
[0061] According to a second aspect of the present application, the present application also provides an avoidance system for quickly determining the optimal labeling position in the cutting link. Figure 8 is a structural block diagram of an avoidance system for quickly determining the optimal labeling position in the cutting link according to an embodiment of the present application. As shown in Figure 8 the system 50 includes a processor and a memory, and the memory stores computer program instructions which, when executed by the processor, implement the avoidance method for quickly determining the optimal labeling position in the cutting link according to the first aspect of the present application. The system also includes a communication bus and a communication interface and other components well known to those skilled in the art, the settings and functions of which are known in the art, and thus will not be described here.
[0062] It should be noted that, for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of protection of the present application.
Claims
1. A method for quickly determining the optimal labeling position during the material cutting process, characterized in that, The avoidance method includes: Obtaining candidate labeling positions for each workpiece in the sheet material to be cut includes: dividing the workpiece into multiple grid points, marking the grid points in the processing area as 0, and marking the grid points in the non-processing area as 1; performing a bitwise AND operation between any row of grid points and the grid points in the adjacent row below, and performing a bitwise AND operation again between the result of the bitwise AND operation and the adjacent row below, until there are no adjacent rows below; determining multiple rectangular regions based on the arbitrary row of grid points and the multiple bitwise AND operation results; and selecting the rectangular regions that meet the preset conditions as candidate labeling positions. Calculate the shortest distance from any labeling candidate position in any workpiece to each labeling candidate position in other workpieces, and select the labeling candidate position with the smallest mean of the shortest distance as the optimal labeling position for the workpiece. The step of dividing the workpiece into multiple grid points includes: obtaining the extension lines of each side length of an arbitrary processing area, wherein the multiple grid points correspond to the rectangular areas enclosed by each extension line; determining multiple rectangular areas based on the arbitrary row grid points and multiple AND operation results includes: merging adjacent non-processing areas in the arbitrary row grid points or the arbitrary AND operation results to obtain the rectangular areas corresponding to the arbitrary row grid or the arbitrary AND operation results. workpiece Optimal labeling position for: ; For the workpiece in the sheet material to be cut Any workpiece other than For workpiece The Middle One labeling candidate position For workpiece The Middle One labeling candidate position for and Euclidean distance, For workpiece The set of all candidate labeling positions in the set. For workpiece The set of all candidate labeling positions; The output is the minimum value of the Euclidean distance. The output is the candidate labeling position corresponding to the minimum Euclidean distance, where, and The Euclidean distance is the candidate position for labeling. Center point coordinates and labeling candidate positions The Euclidean distance between the coordinates of the center points.
2. The method for quickly determining the optimal labeling position in the material cutting process according to claim 1, characterized in that, The preset conditions are that the shorter side of the rectangle is greater than or equal to the shorter side of the label, and the longer side of the rectangle is greater than or equal to the longer side of the label.
3. The method for quickly determining the optimal labeling position in the material cutting process according to any one of claims 1 to 2, characterized in that, After obtaining the optimal labeling position for each workpiece, the avoidance method further includes: obtaining the shortest Hamiltonian path for the optimal labeling position of each workpiece, and labeling each workpiece along the shortest Hamiltonian path.
4. The method for quickly determining the optimal labeling position in the material cutting process according to claim 3, characterized in that, Methods for obtaining the shortest Hamiltonian path include: if the number of optimal labeling positions is greater than a preset number, using ant colony algorithm or genetic algorithm to solve for the shortest Hamiltonian path; otherwise, using dynamic programming algorithm or branch and bound algorithm to solve for the shortest Hamiltonian path.
5. The method for quickly determining the optimal labeling position in the material cutting process according to claim 1, characterized in that, The machining area includes holes, slots, and the minimum bounding rectangle of the milling process.
6. A collision avoidance system for quickly determining the optimal labeling position during the material cutting process, characterized in that, It includes a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement an avoidance method for quickly determining the optimal labeling position in the material cutting process according to any one of claims 1 to 5.
Citation Information
Patent Citations
Nesting control method and system
CN105549536A
Intelligent label printing optimization system, method and device based on image recognition
CN120029570A
Hot working path determination method and apparatus, and device and storage medium
WO2024244107A1