CN-122021997-A - Automatic typesetting method and device for cutting machine based on heuristic nesting algorithm
Abstract
The application discloses a cutting machine automatic typesetting method and system based on a heuristic nesting algorithm, and relates to the technical field of automatic typesetting. The method comprises the steps of extracting geometric interlocking features of parts by deep learning to generate a feature description matrix, calculating feature matching degree among the parts to construct a feature complementarity degree matrix, carrying out topological mapping on a panel space based on complementarity degree, screening candidate positions, constructing a dynamic evaluation function by combining distance and interlocking coefficients, detecting local closed risks by time sequence analysis and dynamically adjusting search weights, and carrying out iteration by utilizing Monte Carlo tree search to output a typesetting scheme and a process instruction with an occlusion mark. The application solves the problem that the typesetting of the special-shaped parts is easy to be in local optimum by deeply analyzing the geometric characteristics and preferentially guiding the formation of the occlusion structure, and obviously improves the material utilization rate and typesetting efficiency.
Inventors
- CHEN LUGUANG
- He Longgui
Assignees
- 宁波从冠智能科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251222
Claims (10)
- 1. The automatic typesetting method of the cutting machine based on the heuristic nesting algorithm is characterized by comprising the following steps of: S1, establishing a geometric feature extraction network based on deep learning, and detecting the depth, opening direction and curvature extreme points of an input C-shaped, U-shaped or L-shaped part to generate a feature description matrix containing geometric interlocking feature vectors; S2, the feature description matrix is used as input, the feature matching degree between any two parts is calculated, and a feature complementarity matrix describing potential combination capacity between the parts is generated by combining the opening direction matching degree and the concave-convex coupling degree; S3, performing topology mapping on the residual space of the current plate based on the characteristic complementarity matrix, screening out a space region matched with the high-complementarity part by utilizing a boundary propagation algorithm, and generating a candidate position list with topology constraint; S4, constructing a dynamic evaluation function according to each position in the candidate position list and combining the distance factors and the shape interlocking coefficients, and calculating and outputting a candidate position evaluation data set containing scores of the current states of all candidate points; s5, carrying out time sequence trend analysis on the candidate position evaluation data set, detecting local closed topology risk through a back propagation mechanism, dynamically adjusting weight factors in an evaluation function, and generating an optimized search strategy parameter set; s6, loading the search strategy parameter set into a strategy network of a Monte Carlo tree search framework, performing iterative search in a reinforcement learning environment, and outputting a typesetting action sequence with the highest engagement priority; s7, analyzing the typesetting action sequence, outputting a final typesetting scheme meeting a preset material utilization rate threshold, and generating a process instruction file with an occlusion identifier.
- 2. The method according to claim 1, wherein the specific process of generating the feature complementarity matrix comprises: S21, extracting an opening direction unit vector of a part i from a feature description matrix Projection direction vector with part j Calculating cosine similarity Wherein, the method comprises the steps of, It is normalized, the modulus is 1, only the direction is indicated, A unit vector representing the direction of the protrusion, The cosine similarity of the directions of the part i and the part j is represented, and the value range is [ -1,1]; S22, extracting maximum curvature of concave part of part i from feature description matrix And maximum curvature of convex portion of part j Calculating a curvature coupling factor; s23, integrating the calculation results and utilizing a formula Generating matrix elements, constructing a feature complementarity matrix, Representing the maximum curvature value on the contour line of the concave region of the part i, Representing the maximum curvature value on the contour line of the convex region of part j, wherein Is a preset curvature tolerance parameter. A predetermined constant is set to be a constant value, Representing the degree of feature complementarity between parts i and j.
- 3. The method according to claim 2, wherein the specific process of generating the candidate location list in step S3 includes: S31, reading part pairs with complementarity degree larger than a preset threshold value in the characteristic complementarity degree matrix; s32, discretizing the current plate into a grid map, and starting from a free boundary grid corresponding to the part with high complementarity, directionally propagating along the concave direction, wherein the propagation distance d and the part opening width w meet d=lambdaw; s33, recording nodes meeting space constraint in the propagation path, and generating a candidate position list with topology constraint and containing an adjacency relation.
- 4. A method according to claim 3, wherein the specific process of generating the candidate location evaluation dataset in step S4 comprises: s41, traversing each position k in the candidate position list; S42, calculating the distance Dk from the position k to the boundary of the plate, and calculating the shape interlocking coefficient according to the feature complementarity of adjacent parts around the position k ; Take the value 0, 1; s43, utilizing a formula Calculating the comprehensive scores of the current candidate positions, and obtaining F values of all the positions and corresponding state components thereof And combining and outputting the candidate position evaluation data set. Representing the dynamic decay factor, Weights complementary to the control features; Representing the weight for controlling the side placement; Representing the weights controlling the local interlocks.
- 5. The method according to claim 4, wherein the specific process of generating the search policy parameter set in step S5 includes: s51, establishing a historical decision queue, and continuously inputting grading changes in candidate position evaluation data sets; S52, when the score variance of the continuous M iterations in the candidate position evaluation data set is detected to be smaller than And when the average complementarity is lower than the threshold value theta, judging that the geometric attraction trap is entered, M is an integer for judging whether the algorithm is trapped in stagnation, When the average score of the history is lower than the threshold value, the typesetting quality is considered to be poor; S53, updating the weight according to the judgment result Wherein The weight is raised to the original value And outputting the updated search strategy parameter set.
- 6. The method according to claim 5, wherein the specific process of generating the typesetting action sequence in step S6 includes: S61, receiving a search strategy parameter set as a state input, and predicting the priority probability of each node in the expansion stage of the Monte Carlo tree; s62, calculating a reward function based on weight configuration in a parameter set in a simulation stage ; For the current utilization rate of the board material, Is a utilization weight coefficient; s63, when the tree search reaches a preset depth L or a time threshold, extracting a node sequence on the optimal path to generate a typesetting action sequence.
- 7. The method according to claim 6, wherein the processing of the typesetting action sequence in step S7 includes: s71, performing topology restoration on the typesetting action sequence, and identifying all parts forming an engagement structure in the sequence; s72, distributing a unique identification code for each engagement structure, and marking the machining precision requirement; s73, finally outputting a process instruction file containing geometric coordinates and an occlusion mark.
- 8. A guillotine automatic typesetting system based on a heuristic nesting algorithm for performing the method of any one of claims 1 to 8, comprising: The feature description matrix generation module is used for establishing a geometric feature extraction network based on deep learning, detecting the concave depth, the opening direction and the curvature extreme points of the input C-shaped, U-shaped or L-shaped parts, and generating a feature description matrix containing geometric interlocking feature vectors; the feature complementarity matrix generation module is used for taking the feature description matrix as input, calculating the feature matching degree between any two parts, and generating a feature complementarity matrix for describing potential combination capacity between the parts by combining the opening direction matching degree and the concave-convex coupling degree; The candidate position list generation module is used for carrying out topological mapping on the residual space of the current plate based on the characteristic complementarity matrix, screening out a space region matched with the high complementarity part by utilizing a boundary propagation algorithm, and generating a candidate position list with topological constraint; the candidate position evaluation data set generation module is used for constructing a dynamic evaluation function according to each position in the candidate position list and combining the distance factors and the shape interlocking coefficients, and calculating and outputting candidate position evaluation data sets containing the scores of the current states of all candidate points; The search strategy parameter set generation module is used for carrying out time sequence trend analysis on the candidate position evaluation data set, detecting local closed topology risk through a back propagation mechanism, dynamically adjusting weight factors in an evaluation function and generating an optimized search strategy parameter set; The typesetting action sequence generation module is used for loading the search strategy parameter set into a strategy network of a Monte Carlo tree search framework, executing iterative search in a reinforcement learning environment and outputting a typesetting action sequence with the highest engagement priority; and the process instruction output module is used for analyzing the typesetting action sequence, outputting a final typesetting scheme meeting a preset material utilization rate threshold value and generating a process instruction file with an occlusion identifier.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the steps in the heuristic nested algorithm-based automatic layout method of a clipper as set forth in any one of claims 1-7.
- 10. A readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor for performing the steps of the automatic typesetting method for a guillotine based on heuristic nesting algorithm as defined in any one of claims 1-7.
Description
Automatic typesetting method and device for cutting machine based on heuristic nesting algorithm Technical Field The application relates to the technical field of automatic typesetting, in particular to an automatic typesetting method and system for a cutting machine based on a heuristic nesting algorithm. Background In the technical field of existing cutting machines, when automatic typesetting is performed on C-shaped, U-shaped or L-shaped special-shaped parts with deep concave features, the prior art mainly depends on a heuristic algorithm based on a left lower corner filling strategy. Such algorithms tend to place two parts back-to-back in a partially compact rectangular block structure when dealing with a large number of profiled parts. Although this approach achieves efficient use of space in a small area, its essentially greedy strategy results in premature segmentation of the typesetting space, forming a closed area that cannot be inserted by other parts, thereby significantly reducing overall material utilization. More importantly, when the algorithm encounters a part combination with a strong interlocking feature, the algorithm is extremely easy to sink into a geometric gravity trap, namely the algorithm is bound by a local optimal solution, and the algorithm is difficult to jump out of a current typesetting mode to explore a better global layout. The topological sealing problem is caused by the fact that the traditional method only focuses on the position compactness and ignores the geometric interlocking characteristics among parts, so that potential meshing opportunities of concave and convex structures cannot be actively identified and utilized in the typesetting process, and finally waste of residual space of the plate and reduction of typesetting efficiency are caused. Therefore, a typesetting mechanism capable of deeply analyzing geometric features of parts and preferentially guiding formation of an engagement structure is needed in the prior art so as to break through the limitation of a pure stacking strategy. In view of the above, there is a need in the art for improvements. Disclosure of Invention The present application aims to solve at least one of the technical problems in the related art to some extent. Therefore, an object of the present application is to provide a method, an apparatus, an electronic device, and a readable storage medium for automatic typesetting of a cutting machine based on a heuristic nesting algorithm, which improve the security of a target path. One aspect of the present application provides a method for automatic typesetting by a cutter based on heuristic nesting algorithm, The method comprises the following steps: S1, establishing a geometric feature extraction network based on deep learning, and detecting the depth, opening direction and curvature extreme points of an input C-shaped, U-shaped or L-shaped part to generate a feature description matrix containing geometric interlocking feature vectors; S2, the feature description matrix is used as input, the feature matching degree between any two parts is calculated, and a feature complementarity matrix describing potential combination capacity between the parts is generated by combining the opening direction matching degree and the concave-convex coupling degree; S3, performing topology mapping on the residual space of the current plate based on the characteristic complementarity matrix, screening out a space region matched with the high-complementarity part by utilizing a boundary propagation algorithm, and generating a candidate position list with topology constraint; S4, constructing a dynamic evaluation function according to each position in the candidate position list and combining the distance factors and the shape interlocking coefficients, and calculating and outputting a candidate position evaluation data set containing scores of the current states of all candidate points; s5, carrying out time sequence trend analysis on the candidate position evaluation data set, detecting local closed topology risk through a back propagation mechanism, dynamically adjusting weight factors in an evaluation function, and generating an optimized search strategy parameter set; s6, loading the search strategy parameter set into a strategy network of a Monte Carlo tree search framework, performing iterative search in a reinforcement learning environment, and outputting a typesetting action sequence with the highest engagement priority; s7, analyzing the typesetting action sequence, outputting a final typesetting scheme meeting a preset material utilization rate threshold, and generating a process instruction file with an occlusion identifier. Preferably, the specific process of generating the feature complementarity matrix includes: S21, extracting an opening direction unit vector of a part i from a feature description matrix Projection direction vector with part jCalculating cosine similarityWherein, the method compris