Printing path self-adaptive adjustment method based on hypersphere clustering
Through intelligent classification based on hyperspheric clustering and improved horned lizard optimization algorithm, the printing paths of complex documents are dynamically adjusted, and the problem of insufficient path optimization in the existing technology is solved, achieving efficient, low-consumption and high-quality printing effects.
Patent Information
- Application Number
- CN202411911443.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The prior art has significant shortcomings in path optimization, multi-objective balance and real-time adaptability of complex document content, and it is difficult to meet the needs of efficient and high-quality printing.
Adaptive adjustment method of printing paths based on hyperspheric clustering is adopted. By performing characteristic analysis and intelligent classification of text, images and table areas in digitized files, combined with improved horned lizard optimization algorithm and multi-objective optimization function, the printing path is dynamically adjusted to optimize path length, ink consumption and print quality.
Significantly improves the flexibility and efficiency of printing path planning, shortens printing time, reduces ink consumption, and improves print quality, especially when dealing with complex tables and high-resolution image areas.
Smart Images

Figure CN119861886A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of printing technology, and in particular to a printing path adaptive adjustment method based on hypersphere clustering. Background Art
[0002] With the continuous development of printing technology, intelligent printing path optimization methods have gradually become one of the key directions for improving the performance of printing systems. Printing path optimization directly affects the efficiency, print quality and ink consumption of printing equipment. When processing documents with mixed text, images and table areas, traditional path optimization methods are difficult to meet diverse printing needs.
[0003] At present, printing path planning mainly relies on planning strategies based on linear paths or area block priority. Such methods usually assume that the document content is relatively simple and has a clear structure, which can meet basic printing tasks to a certain extent. However, with the increasing proportion of complex documents in modern office environments, traditional methods have exposed significant defects in path planning. For documents with mixed content, it is difficult to dynamically adjust the path planning according to the content characteristics of the document area, resulting in extended printing time or waste of resources. Secondly, traditional path planning methods do not take into account the hardware characteristics of the printing equipment, such as the print head movement speed, inkjet resolution and paper movement speed parameters, and fail to effectively combine hardware capabilities to optimize the path.
[0004] In recent years, some intelligent optimization algorithms have begun to be applied in the field of printing path optimization, such as genetic algorithms and ant colony algorithms. However, genetic algorithms and ant colony algorithms still have limitations in practice. On the one hand, traditional optimization algorithms are prone to fall into local optimality when dealing with multi-objective optimization, and it is difficult to take into account the printing path length, ink consumption and print quality; on the other hand, genetic algorithms and ant colony algorithms are insufficient in classification and feature analysis of complex document content, resulting in a gap between optimization results and actual printing needs.
[0005] To sum up, the existing technology has significant deficiencies in path optimization, multi-objective balance and real-time adaptability of complex document content, and it is difficult to meet the needs of efficient and high-quality printing. The defects of the existing technology directly limit the improvement of the performance of printing equipment. There is an urgent need for an intelligent printing path adjustment method that can integrate document content characteristics, hardware parameters and multi-objective optimization to overcome the above problems. Summary of the invention
[0006] One object of the present invention is to propose a printing path adaptive adjustment method based on hypersphere clustering. The present invention provides an efficient and accurate path adaptive adjustment method for complex document printing.
[0007] A printing path adaptive adjustment method based on hypersphere clustering according to an embodiment of the present invention comprises the following steps:
[0008] S1. Obtain a digitized file of a document to be printed, parse the content of the digitized file, and extract characteristic data of text areas, image areas, and table areas in the digitized file;
[0009] S2. Preprocessing the extracted characteristic data to generate a multi-dimensional feature vector set of the characteristic data;
[0010] S3. Perform unsupervised classification on the multidimensional feature vector set based on the hypersphere clustering algorithm, and assign priority identification to the regions of each category;
[0011] S4. Construct a multi-objective optimization function according to the hardware parameters of the printing device and the printing task requirements;
[0012] S5. Based on the improved horned lizard optimization algorithm, the classification results and priority identification generated by the hypersphere clustering algorithm are used as initial input conditions, and the printing path in the digital file is optimized and calculated under the constraints of the multi-objective optimization function to generate an initial printing path solution that meets the optimization goal;
[0013] S6. Final arrangement and verification of the initial printing path plan to generate a final printing path plan.
[0014] Optionally, the S1 specifically includes:
[0015] S11. Obtaining a digitized file of a document to be printed, including a formatted document or an unformatted image file, converting the digitized file into structured data, and extracting preliminary distribution information of text content, image content, and table content in the document;
[0016] S12. Extracting characteristic data of the text area from the structured data, including text density, line spacing, character size, and character arrangement of the area;
[0017] S13. Extract characteristics of the image area in the digitized file to obtain pixel distribution, edge complexity and area characteristic data of the image area;
[0018] S14. Identify and extract characteristic data of the table area from the structured data, including the number of cells, cell size, row and column ratio, and table border characteristics of the table;
[0019] S15. Generate a characteristic data matrix based on the characteristic data extracted in steps S12 to S14:
[0020] T i,j ={C i ,P i ,S i ,D i};
[0021] Among them, T i,j represents the characteristic data set of the i-th document region, C i Indicates the type of the ith region, including text, image, or table. The type is determined by the classification identifier. i represents the center position of the ith region, expressed in the form of two-dimensional coordinates (x, y), S i Indicates the size of the ith region, defined as the product of width and height, D i It represents the pixel density of the ith region, which is the ratio of the total number of pixels in the region to the area of the region.
[0022] Optionally, the S2 specifically includes:
[0023] S21. Characteristic data T i,j Perform normalization processing to map the characteristic data of each document area into a standardized range to eliminate the dimensional differences of the characteristic data;
[0024] S22. Use the feature mapping method to construct the feature space of the normalized feature data, map the data of the text area, image area and table area to a unified multi-dimensional feature space, and the dimension of the feature vector is defined as:
[0025] V i ={X′ i,1 ,X′ i,2 ,…,X′ i,n};
[0026] Among them, V i represents the feature vector of the i-th document region, n represents the total number of features, X′ i,n represents the nth normalized feature value of the i-th document region;
[0027] S23. Perform dimensionality reduction on the feature vector and use the principal component analysis algorithm to select the features with the main contribution. The feature vector after dimensionality reduction is represented as V′ i ;
[0028] S24. Organize the feature vector set after dimensionality reduction to generate a multi-dimensional feature vector set V of characteristic data.
[0029] Optionally, the S3 specifically includes:
[0030] S31. Initialize the parameters of the hierarchical hypersphere clustering model based on the multidimensional feature vector set V, the parameters including the initial radius R0 of the first layer of clustering, the maximum radius R max and the number of cluster centers K1, as well as the initial radius R′0 of the second layer of clustering and the number of cluster centers K2;
[0031] S32. In the first layer of clustering, the multidimensional feature vector set is input into the hypersphere clustering model, and preliminary classification is performed according to the distance criterion to generate the first layer of clustering results:
[0032]
[0033] Where, d(V′ i ,C k ) represents the multidimensional feature vector V′ i With cluster center C k The Euclidean distance, P i,j and C k,j Respectively represent the eigenvalue of the i-th multidimensional eigenvector and the k-th cluster center in the j-th dimension;
[0034] According to the distance criterion, the multidimensional feature vector set V is divided into the text area category set V text , image region category set V image and table area class set V table ;
[0035] S33. In the second layer of clustering, each category set is refined based on the first layer of clustering results:
[0036] For the text area category set V text , divided into dense text area set V according to text density and character characteristics dense-text and the sparse text region set V sparse-text ;
[0037] For the image region category set V image , divided into a set of high pixel density image regions V according to pixel distribution and edge complexity high-density and the low pixel density image region set V low-density ;
[0038] For table area class set V table , divided into a simple table area set V according to the cell structure and complexity simple-table and complex table area set V complex-table ;
[0039] S34. According to the results of the refined classification in S33, dynamically set the clustering radius R' of each category k , according to the characteristic distribution within the category set, calculate the dynamic radius of the current cluster center:
[0040] R′ k =min(R max ,max(d(V″ i ,C k )));
[0041] Where, d(V′ i ,C k ) represents the feature vector V″ within category k i With cluster center C k The Euclidean distance, V″ i The feature vector corresponding to the S33 refinement classification;
[0042] S35. According to the first layer clustering results and the second layer clustering results, assign a priority identifier U to each cluster k , the priority identification is determined by comprehensive calculation of the regional characteristic data within the cluster:
[0043] U k =w1·S k +w2·D k ;
[0044] Among them, S k represents the total area of all regions in the cluster, D k It represents the average pixel density of all regions in the cluster, and w1 and w2 are the weight coefficients for priority calculation.
[0045] Optionally, the S4 specifically includes:
[0046] S41. Get the hardware parameters of the printing device, including the print head moving speed v print , Print head inkjet resolution dpi , ink single ejection volume q ink and paper moving speed v paper ;
[0047] S42. Obtain the printing task requirements, including the printing speed priority, the printing quality priority and the ink saving priority, respectively with weights w speed 、w quality 、w ink express;
[0048] S43. Combined with the influence of the turning point on the printing path on the time, a printing path shortesting objective function for optimizing the printing speed is constructed:
[0049]
[0050] Among them, f path Represents the total time of the printing path, d(P i ,P i+1 ) represents the Euclidean distance from the i-th printing point to the i+1-th printing point, which is used to measure the actual length of the printing path, combined with the acceleration a and time t i Adjustment to reflect dynamic speed changes in the actual path of the print head;
[0051] S44. Combining the nozzle ejection frequency and the effective resolution of the print head, an ink consumption minimization objective function for reducing ink consumption is constructed:
[0052]
[0053] Among them, f ink Indicates the total ink consumption during printing, A i represents the printing area of the ith printing area, f nozzle The jetting frequency of the nozzle is related to the print head resolution and movement speed, and is used to reflect the ink jetting rate per unit time;
[0054] S45. Considering the influence of speed on positioning error, the print head speed is introduced into the negative feedback mechanism, and the print quality maximization objective function for balancing speed and accuracy is constructed:
[0055]
[0056] Among them, f quality Indicates the overall score of print quality, d error (P i ) is the positioning error of the i-th printing point, which is used to quantify the impact of path deviation on the quality during printing. print The negative feedback term k·v is introduced as the print head moving speed print To quantify the negative impact of high-speed motion on positioning accuracy, k is the weight coefficient;
[0057] S46. Construct multi-objective optimization function:
[0058] f total =w speed ·f path +w ink ·f ink -w quality ·f quality ;
[0059] Among them, f total It is a multi-objective optimization function that comprehensively considers the trade-offs among printing path length, ink consumption, and printing quality.
[0060] Optionally, the S5 specifically includes:
[0061] S51. Initialize the solution space of the printing path optimization problem using the classification results and the priority identification, and construct a dynamic solution space constraint model, wherein the dynamic solution space constraint model includes:
[0062] Content constraints: Based on the classification of text area, image area and table area, the printing priority between area categories is defined, and the node arrangement rules of the path scheme are restricted;
[0063] Hardware constraints, which define the reachability range of path nodes in combination with the hardware parameters of the printing device;
[0064] Time constraints, combining the paper movement speed and the time requirements of the printing task, define the timeliness target of path generation;
[0065] S52. Construct an improved horned lizard optimization algorithm, introduce a hierarchical population structure into the horned lizard optimization algorithm, and construct the first-layer population G in the horned lizard population initialization by combining the dynamic solution space constraint model (1) and the second-layer population G (2) , the first-level population G (1) Combined with the content constraints, an initial path sorting that meets the priority of the printing area is generated, so that the high-priority area is at the front of the path. The second-level population G (2) Combined with hardware constraints, the arrangement order of local path nodes is generated so that the distance and connection method between path nodes are consistent with the motion capability of the printing device. Each layer of population is initialized by random generation and priority correction, which covers global and local optimization requirements while meeting the limitations of the dynamic solution space constraint model.
[0066] S53. Construct a fitness function and modify the fitness in combination with the dynamic solution space constraint model. The first layer fitness function Fitness (1) :
[0067]
[0068] Among them, λ content is the weight coefficient of the content constraint, which is used to control the influence of the content constraint on the path plan. K represents the total number of printing areas, and g content is the penalty function for content constraints in the path scheme, defined as:
[0069]
[0070] Among them, δ(x) is 1 when x<0, otherwise it is 0, U i+1 and U i are the priority identifiers of the i+1th and ith areas in the path respectively;
[0071] The second layer fitness function Fitness (2) :
[0072] Fitness (2) (G (2) )=w local ·f local +w ink ·f ink -w quality ·f quality -λhardware ·g hardware ;
[0073] Among them, G (2) Indicates the arrangement order of local path nodes, which is used to optimize the connection mode of nodes in the printing area. local is the weight coefficient of the local path length, which is used to control the contribution of the local path length to the fitness value, λ hardware is the weight coefficient of the hardware constraint, which is used to control the influence of the hardware constraint on the path plan. hardware is the penalty function of the hardware constraint in the path plan, defined as:
[0074]
[0075] Among them, R max is the maximum reachable distance of the print head, M is the number of nodes in the printing path in the path plan, and Q j and Q j+1 Respectively represent the position coordinates of the jth and j+1th nodes in the path plan;
[0076] S54. In the multi-layer interactive optimization mechanism, the dynamic solution space constraint model further guides the path optimization:
[0077] In-layer optimization, the individual solution is dynamically adjusted during the path update process. If the path plan violates the time constraint, the time constraint correction factor g is introduced time :
[0078]
[0079] in, represents an individual solution of the tth generation in the current population, that is, a specific printing path solution, It is the next generation of individual solutions generated by the optimization algorithm. In the horned lizard optimization algorithm, the path plan moves closer to the better solution through generation-by-generation optimization. β is the control parameter of the exploration ability, which is used to adjust the global search intensity. R is the random perturbation factor. is the global optimal path solution in the t-th generation population, that is, the path solution with the highest fitness in the current solution space, λ time is the weight coefficient of the time constraint, g time is the time constraint correction factor, indicating whether the current path plan meets the timeliness requirement:
[0080] g time =max(0,T actual -T max );
[0081] Among them, T actual is the total estimated completion time of the current path plan, Tmax is the upper limit of the time requirement for the printing task, if T actual ≤T max , then g time =0, indicating that the path plan meets the time constraint. If T actual >T max , then g time >0, indicating that the path plan exceeds the timeliness requirement;
[0082] Inter-layer interaction, the global optimal path order of the first layer population Update to the second-level population and check whether it meets the content constraints. The optimal local path of the second-level population Pass it back to the first-level population and check whether it meets the hardware and time constraints;
[0083] S55. Dynamically adjust the parameters of the horned lizard optimization algorithm according to the feedback of the fitness function and the dynamic solution space constraint model, so that the optimization process converges within the solution space constraints:
[0084] When the path plan frequently violates content constraints or hardware constraints, optimize the constraint weight λ content , hardware , strengthen the influence of constraints;
[0085] When the path plan gradually approaches the timeliness requirement, reduce the time constraint weight λ time , improve the optimization capabilities for other goals;
[0086] S56. Output the optimized path plan and generate an initial printing path plan that meets the optimization target.
[0087] Optionally, the S6 specifically includes:
[0088] S61. Final arrangement of the initial printing path plan:
[0089] First-layer global path scheme Indicates the printing area path sequence after global sorting optimization;
[0090] Second layer local path scheme Indicates the optimal arrangement order of node connections within the printing area;
[0091] Comprehensive Path Solution G final , by using the first-layer global path scheme With the second layer local path scheme Merge and generate to represent the final printing path;
[0092] S62. The integrated path plan G finalConverted into a print path file, defining a node information set N1, which is used to describe the coordinates, priorities, and characteristics of all nodes in the print path:
[0093] N1={(x i ,y i ,U i ,T i )|i=1,2,…,M};
[0094] Among them, (x i ,y i ) is the two-dimensional coordinate of node i, U i is the node priority, T i It is the characteristic identifier of the node, indicating the category of text, image or table;
[0095] Define the path connection relationship set E1 to describe the connection order and path distance between nodes. The path connection relationship is expressed as:
[0096] E1={(i,j,d ij )|d ij ≤R max ,i,j∈N1};
[0097] Among them, (i, j) is the connection from node i to node j in the path, d ij is the Euclidean distance between node i and node j, R max is the maximum reach of the printing device;
[0098] S63. Perform a reachability check on the node information set N1 and the path connection relationship set E1 in the path file, so that each node in the path reaches the end point of the printing path through the connection relationship of the path connection relationship set E1. The check rule is:
[0099] Generate a path graph G based on the path connection relationship set E1 graph , where the node is E1, the edge is E1, and the judgment path graph G graph Is it a connected graph? If the path graph is a connected graph, the path is reachable and the next step is continued; otherwise, the second-layer local path plan is re-optimized
[0100] S64. Perform path conflict check on the path connection relationship set E1 in the path file to prevent duplication or conflict in the path execution of the print head. The check rule is:
[0101]
[0102] If C ij =1, there is a conflict in the path, and the optimization algorithm module is returned to adjust the second-layer local path plan. If C ij =0, there is no conflict in the path, and proceed to the next step;
[0103] S65. The final verified comprehensive path plan G final Convert it into a print path command and generate the final print path plan based on the hardware parameters of the printing device:
[0104] Print head movement instructions, used to control the print head to follow the node sequence (x i ,y i ) to move the printing path;
[0105] Inkjet control instructions, according to the characteristics of the node T i and print area type to adjust the inkjet amount;
[0106] Time synchronization instruction, execution time t according to paper moving speed and path i,j Synchronize the printing timing between path nodes.
[0107] The beneficial effects of the present invention are:
[0108] (1) The present invention introduces a hypersphere clustering algorithm, which performs characteristic analysis on text areas, image areas, and table areas in digital files, and implements intelligent classification and priority identification assignment based on the content characteristics of the areas. Compared with the traditional classification method based on fixed rules, the hypersphere clustering algorithm can process complex data with nonlinear distribution, ensure more accurate classification results, and provide a reliable data basis for subsequent path planning. In mixed content documents, it can prioritize the planning of fast paths for high-frequency text areas, while ensuring high-precision printing of image and table areas, significantly improving the flexibility and efficiency of printing path planning.
[0109] (2) The present invention constructs a multi-objective optimization function by improving the horned lizard optimization algorithm, combining the three optimization goals of minimizing the printing path, minimizing the ink consumption and maximizing the printing quality, and optimizes the printing path under dynamic constraints. Through the collaborative design of the multi-objective optimization function, the printing time is effectively shortened and the ink consumption is reduced while ensuring the printing quality.
[0110] (3) The present invention introduces a hierarchical population structure into the horned lizard optimization algorithm, and divides the printing path optimization into two parts: global sorting optimization and local path connection optimization. The first-layer population is responsible for the path sorting of the global area, and generates a path solution with a high priority area in front in combination with content constraints. The second-layer population performs connection optimization on local path nodes, and ensures that the path connection method meets the performance requirements of the printing device in combination with hardware and time constraints. In addition, the dynamic interaction mechanism between populations realizes the coordinated optimization of the global path and the local connection through the two-way feedback of the global and local optimization results, which significantly improves the search efficiency of the algorithm and the globality of the solution, avoids the local optimal problem, and optimizes the printing path structure of complex documents. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0112] Figure 1 A flowchart of a printing path adaptive adjustment method based on hypersphere clustering proposed by the present invention;
[0113] Figure 2 This is a hierarchical population structure and optimization flow chart of an improved horned lizard optimization algorithm in a printing path adaptive adjustment method based on hypersphere clustering proposed in the present invention. DETAILED DESCRIPTION
[0114] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0115] refer to Figure 1-Figure 2 , a printing path adaptive adjustment method based on hypersphere clustering, comprising the following steps:
[0116] S1. Obtain a digitized file of a document to be printed, parse the content of the digitized file, and extract characteristic data of text areas, image areas, and table areas in the digitized file;
[0117] S2. Preprocessing the extracted characteristic data to generate a multi-dimensional feature vector set of the characteristic data;
[0118] S3. Perform unsupervised classification on the multidimensional feature vector set based on the hypersphere clustering algorithm, and assign priority identification to the regions of each category;
[0119] S4. Construct a multi-objective optimization function according to the hardware parameters of the printing device and the printing task requirements;
[0120] S5. Based on the improved horned lizard optimization algorithm, the classification results and priority identification generated by the hypersphere clustering algorithm are used as initial input conditions, and the printing path in the digital file is optimized and calculated under the constraints of the multi-objective optimization function to generate an initial printing path solution that meets the optimization goal;
[0121] S6. Final arrangement and verification of the initial printing path plan to generate a final printing path plan.
[0122] In this implementation, S1 specifically includes:
[0123] S11. Obtaining a digitized file of a document to be printed, including a formatted document or an unformatted image file, converting the digitized file into structured data, and extracting preliminary distribution information of text content, image content, and table content in the document;
[0124] S12. Extracting characteristic data of the text area from the structured data, including text density, line spacing, character size, and character arrangement of the area;
[0125] S13. Extract characteristics of the image area in the digitized file to obtain pixel distribution, edge complexity and area characteristic data of the image area;
[0126] S14. Identify and extract characteristic data of the table area from the structured data, including the number of cells, cell size, row and column ratio, and table border characteristics of the table;
[0127] S15. Generate a characteristic data matrix based on the characteristic data extracted in steps S12 to S14:
[0128] T i,j ={C i ,P i ,S i ,D i};
[0129] Among them, T i,j represents the characteristic data set of the i-th document region, C i Indicates the type of the ith region, including text, image, or table. The type is determined by the classification identifier. i represents the center position of the ith region, expressed in the form of two-dimensional coordinates (x, y), S i Indicates the size of the ith region, defined as the product of width and height, D i It represents the pixel density of the ith region, which is the ratio of the total number of pixels in the region to the area of the region.
[0130] In this implementation, S2 specifically includes:
[0131] S21. Characteristic data T i,j Perform normalization processing to map the characteristic data of each document area into a standardized range to eliminate the dimensional differences of the characteristic data;
[0132] S22. Use the feature mapping method to construct the feature space of the normalized feature data, map the data of the text area, image area and table area to a unified multi-dimensional feature space, and the dimension of the feature vector is defined as:
[0133] V i ={X′ i,1 ,X′ i,2 ,…,X′ i,n};
[0134] Among them, V i represents the feature vector of the i-th document region, n represents the total number of features, X′ i,n represents the nth normalized feature value of the i-th document region;
[0135] S23. Perform dimensionality reduction on the feature vector and use the principal component analysis algorithm to select the features with the main contribution. The feature vector after dimensionality reduction is represented as V′ i ;
[0136] S24. Organize the feature vector set after dimensionality reduction to generate a multi-dimensional feature vector set V of characteristic data.
[0137] In this implementation, S3 specifically includes:
[0138] S31. Initialize the parameters of the hierarchical hypersphere clustering model based on the multidimensional feature vector set V, including the initial radius R0 of the first layer of clustering, the maximum radius R max and the number of cluster centers K1, as well as the initial radius R′0 of the second layer of clustering and the number of cluster centers K2;
[0139] S32. In the first layer of clustering, the multidimensional feature vector set is input into the hypersphere clustering model, and preliminary classification is performed according to the distance criterion to generate the first layer of clustering results:
[0140]
[0141] Where, d(V′ i ,C k ) represents the multidimensional feature vector V′ i With cluster center C k The Euclidean distance, P i,j and C k,j Respectively represent the eigenvalue of the i-th multidimensional eigenvector and the k-th cluster center in the j-th dimension;
[0142] According to the distance criterion, the multidimensional feature vector set V is divided into the text area category set V text , image region category set V image and table area class set V table ;
[0143] S33. In the second layer of clustering, each category set is refined based on the first layer of clustering results:
[0144] For the text area category set V text , divided into dense text area set V according to text density and character characteristics dense-text and the sparse text region set V sparse-text ;
[0145] For the image region category set V image , divided into a set of high pixel density image regions V according to pixel distribution and edge complexity high-density and the low pixel density image region set V low-density ;
[0146] For table area class set V table , divided into a simple table area set V according to the cell structure and complexity simple-table and complex table area set V complex-table ;
[0147] S34. According to the results of the refined classification in S33, dynamically set the clustering radius R' of each category k , according to the characteristic distribution within the category set, calculate the dynamic radius of the current cluster center:
[0148] R′ k =min(R max ,max(d(V″ i ,C k )));
[0149] Where, d(V′ i ,C k ) represents the feature vector V″ within category k i With cluster center C k The Euclidean distance, V″ i The feature vector corresponding to the S33 refinement classification;
[0150] S35. According to the first layer clustering results and the second layer clustering results, assign a priority identifier U to each cluster k , the priority identification is determined by comprehensive calculation of the regional characteristic data within the cluster:
[0151] U k =w1·S k +w2·Dk ;
[0152] Among them, S k represents the total area of all regions in the cluster, D k It represents the average pixel density of all regions in the cluster, and w1 and w2 are the weight coefficients for priority calculation.
[0153] In this implementation, S4 specifically includes:
[0154] S41. Get the hardware parameters of the printing device, including the print head moving speed v print , Print head inkjet resolution dpi , ink single ejection volume q ink and paper moving speed v paper ;
[0155] S42. Obtain the printing task requirements, including the printing speed priority, the printing quality priority and the ink saving priority, respectively with weights w speed 、w quality 、w ink express;
[0156] S43. Combined with the influence of the turning point on the printing path on the time, a printing path shortesting objective function for optimizing the printing speed is constructed:
[0157]
[0158] Among them, f path Represents the total time of the printing path, d(P i ,P i+1 ) represents the Euclidean distance from the i-th printing point to the i+1-th printing point, which is used to measure the actual length of the printing path, combined with the acceleration a and time t i Adjustment to reflect dynamic speed changes in the actual path of the print head;
[0159] S44. Combining the nozzle ejection frequency and the effective resolution of the print head, an ink consumption minimization objective function for reducing ink consumption is constructed:
[0160]
[0161] Among them, f ink Indicates the total ink consumption during printing, A i represents the printing area of the ith printing area, f nozzle The jetting frequency of the nozzle is related to the print head resolution and movement speed, and is used to reflect the ink jetting rate per unit time;
[0162] S45. Considering the influence of speed on positioning error, the print head speed is introduced into the negative feedback mechanism, and the print quality maximization objective function for balancing speed and accuracy is constructed:
[0163]
[0164] Among them, f quality Indicates the overall score of print quality, d error (P i ) is the positioning error of the i-th printing point, which is used to quantify the impact of path deviation on the quality during printing. print The negative feedback term k·v is introduced as the print head moving speed print To quantify the negative impact of high-speed motion on positioning accuracy, k is the weight coefficient;
[0165] S46. Construct multi-objective optimization function:
[0166] f total =w speed ·f path +w ink ·f ink -w quality ·f quality ;
[0167] Among them, f total It is a multi-objective optimization function that comprehensively considers the trade-offs among printing path length, ink consumption, and printing quality.
[0168] In this implementation, S5 specifically includes:
[0169] S51. Initialize the solution space of the printing path optimization problem using the classification results and the priority identification, and construct a dynamic solution space constraint model. The dynamic solution space constraint model includes:
[0170] Content constraints: Based on the classification of text area, image area and table area, the printing priority between area categories is defined, and the node arrangement rules of the path scheme are restricted;
[0171] Hardware constraints, which define the reachability range of path nodes in combination with the hardware parameters of the printing device;
[0172] Time constraints, combining the paper movement speed and the time requirements of the printing task, define the timeliness target of path generation;
[0173] S52. Construct an improved horned lizard optimization algorithm, introduce a hierarchical population structure into the horned lizard optimization algorithm, and construct the first-layer population G in the horned lizard population initialization by combining the dynamic solution space constraint model (1) and the second-layer population G (2) , the first-level population G (1)Combined with the content constraints, an initial path sorting that meets the priority of the printing area is generated, so that the high-priority area is at the front of the path. The second-level population G (2) Combined with hardware constraints, the arrangement order of local path nodes is generated so that the distance and connection method between path nodes are consistent with the motion capability of the printing device. Each layer of population is initialized by random generation and priority correction, which covers global and local optimization requirements while meeting the limitations of the dynamic solution space constraint model.
[0174] S53. Construct a fitness function and modify the fitness in combination with the dynamic solution space constraint model. The first layer fitness function Fitness (1) :
[0175]
[0176] Among them, λ content is the weight coefficient of the content constraint, which is used to control the influence of the content constraint on the path plan. K represents the total number of printing areas, and g content is the penalty function for content constraints in the path scheme, defined as:
[0177]
[0178] Among them, δ(x) is 1 when x<0, otherwise it is 0, U i+1 and U i are the priority identifiers of the i+1th and ith areas in the path respectively;
[0179] The second layer fitness function Fitness (2) :
[0180] Fitness (2) (G (2) )=w local ·f local +w ink ·f ink -w quality ·f quality -λ hardware ·g hardware ;
[0181] Among them, G (2) Indicates the arrangement order of local path nodes, which is used to optimize the connection mode of nodes in the printing area. local is the weight coefficient of the local path length, which is used to control the contribution of the local path length to the fitness value, λ hardware is the weight coefficient of the hardware constraint, which is used to control the influence of the hardware constraint on the path plan. hardware is the penalty function of the hardware constraint in the path plan, defined as:
[0182]
[0183] Among them, R max is the maximum reachable distance of the print head, M is the number of nodes in the printing path in the path plan, and Q j and Q j+1 Respectively represent the position coordinates of the jth and j+1th nodes in the path plan;
[0184] S54. In the multi-layer interactive optimization mechanism, the dynamic solution space constraint model further guides the path optimization:
[0185] In-layer optimization, the individual solution is dynamically adjusted during the path update process. If the path plan violates the time constraint, the time constraint correction factor g is introduced time :
[0186]
[0187] in, represents an individual solution of the tth generation in the current population, that is, a specific printing path solution, It is the next generation of individual solutions generated by the optimization algorithm. In the horned lizard optimization algorithm, the path plan moves closer to the better solution through generation-by-generation optimization. β is the control parameter of the exploration ability, which is used to adjust the global search intensity. R is the random perturbation factor. is the global optimal path solution in the t-th generation population, that is, the path solution with the highest fitness in the current solution space, λ time is the weight coefficient of the time constraint, g time is the time constraint correction factor, indicating whether the current path plan meets the timeliness requirement:
[0188] g time =max(0,T actual -T max );
[0189] Among them, T actual is the total estimated completion time of the current path plan, T max is the upper limit of the time requirement for the printing task, if T actual ≤T max , then g time =0, indicating that the path plan meets the time constraint. If T actual >T max , then g time >0, indicating that the path plan exceeds the timeliness requirement;
[0190] Inter-layer interaction, the global optimal path order of the first layer population Update to the second-level population and check whether it meets the content constraints. The optimal local path of the second-level population Pass it back to the first-level population and check whether it meets the hardware and time constraints;
[0191] S55. Dynamically adjust the parameters of the horned lizard optimization algorithm according to the feedback of the fitness function and the dynamic solution space constraint model, so that the optimization process converges within the solution space constraints:
[0192] When the path plan frequently violates content constraints or hardware constraints, optimize the constraint weight λ content , hardware , strengthen the influence of constraints;
[0193] When the path plan gradually approaches the timeliness requirement, reduce the time constraint weight λ time , improve the optimization capabilities for other goals;
[0194] S56. Output the optimized path plan and generate an initial printing path plan that meets the optimization target.
[0195] This implementation method divides path planning into two levels: global path sorting and local node connection, and optimizes them separately, which reasonably solves the problem of printing path complexity, dynamically adjusts parameters and constraints, enhances the adaptability of the optimization algorithm, and avoids falling into the local optimal solution.
[0196] At the same time, the introduction of a hierarchical population structure enables global optimization and local optimization to work together, breaking through the limitations of single-layer optimization of traditional algorithms. Using a multi-layer interaction mechanism, the global and local optimization results are fed back and corrected, greatly improving the globality and adaptability of the solution. The dynamic parameter adjustment mechanism combines the changes in the solution space to achieve adaptive adjustment of the exploration and development capabilities during the optimization process.
[0197] In this implementation, S6 specifically includes:
[0198] S61. Final arrangement of the initial printing path plan:
[0199] First-layer global path scheme Indicates the printing area path sequence after global sorting optimization;
[0200] Second layer local path scheme Indicates the optimal arrangement order of node connections within the printing area;
[0201] Comprehensive Path Solution G final , by using the first-layer global path scheme With the second layer local path scheme Merge and generate to represent the final printing path;
[0202] S62. The integrated path plan G finalConverted into a print path file, defining a node information set N1, which is used to describe the coordinates, priorities, and characteristics of all nodes in the print path:
[0203] N1={(x i ,y i ,U i ,T i )|i=1,2,…,M};
[0204] Among them, (x i ,y i ) is the two-dimensional coordinate of node i, U i is the node priority, T i It is the characteristic identifier of the node, indicating the category of text, image or table;
[0205] Define the path connection relationship set E1 to describe the connection order and path distance between nodes. The path connection relationship is expressed as:
[0206] E1={(i,j,d ij )|d ij ≤R max ,i,j∈N1};
[0207] Among them, (i, j) is the connection from node i to node j in the path, d ij is the Euclidean distance between node i and node j, R max is the maximum reach of the printing device;
[0208] S63. Perform a reachability check on the node information set N1 and the path connection relationship set E1 in the path file, so that each node in the path reaches the end point of the printing path through the connection relationship of the path connection relationship set E1. The check rule is:
[0209] Generate a path graph G based on the path connection relationship set E1 graph , where the node is E1, the edge is E1, and the judgment path graph G graph Is it a connected graph? If the path graph is a connected graph, the path is reachable and the next step is continued; otherwise, the second-layer local path plan is re-optimized
[0210] S64. Perform path conflict check on the path connection relationship set E1 in the path file to prevent duplication or conflict in the path execution of the print head. The check rule is:
[0211]
[0212] If C ij =1, there is a conflict in the path, and the optimization algorithm module is returned to adjust the second-layer local path plan. If C ij =0, there is no conflict in the path, and proceed to the next step;
[0213] S65. The final verified comprehensive path plan G final Convert it into a print path command and generate the final print path plan based on the hardware parameters of the printing device:
[0214] Print head movement instructions, used to control the print head to follow the node sequence (x i ,y i ) to move the printing path;
[0215] Inkjet control instructions, according to the characteristics of the node T i and print area type to adjust the inkjet amount;
[0216] Time synchronization instruction, execution time t according to paper moving speed and path i,j Synchronize the printing timing between path nodes.
[0217] Embodiment 1:
[0218] The implementation example is applied in a large financial institution. The archives of a large financial institution needs to print a detailed annual financial report for review at an upcoming high-level meeting. The financial report contains 80 pages in total, with a complex content structure, including text descriptions, color pictures and multiple tables. The first part of the report is an annual data analysis, which contains a large paragraph of text description; the second part is a financial trend chart, with high-resolution bar charts and line charts inserted; the third part is a financial detail table, covering hundreds of financial data accurate to decimal points. The printing requirement is high-quality output and the meeting time is tight, requiring the printing task to be completed within 45 minutes.
[0219] At 9:00, the system began to obtain the digital file of the financial report and perform content analysis. After the file analysis was completed, the system extracted the data characteristics of all text, image and table areas. The results showed that the report had a total of 680 independent printing areas, of which 480 (70.6%) were text areas, 136 (20%) were image areas, and 64 (9.4%) were table areas. The system recorded the characteristic data of each area, including:
[0220] Page 2 is a dense text area with a text density of 120 characters per square centimeter;
[0221] Page 5 is a color bar graph with a pixel density of 600dpi;
[0222] Page 15 is a complex table with 12x10 cells, a total area of 400 square centimeters, and a cell spacing of 0.5 mm.
[0223] Through the hypersphere clustering algorithm, the system intelligently classifies the above areas into six categories: dense text, sparse text, high-resolution images, low-resolution images, complex tables, and simple tables, and assigns a priority mark to each category. In the embodiment, the color bar chart on page 5 is assigned a priority of 3, and the complex table area on page 15 is assigned the highest priority of 1.
[0224] At 10:00, the system constructed a multi-objective optimization function based on the priority and hardware parameters of the printing device, including path shortesting, ink consumption minimization and print quality maximization. Subsequently, the printing path was optimized by improving the horned lizard optimization algorithm combined with the hierarchical population mechanism. The first layer optimized the global path order, giving priority to printing the table area with priority 1, followed by the text area with priority 2; the second layer optimized the connection method of the local path nodes, and the sequential printing method from the upper left corner to the lower right corner in the table.
[0225] At 10:30, the system generated an initial path plan and verified the path. During the verification process, it was found that there was a conflict in repeated printing of the node connections in the table area on page 15. The system automatically returned to the optimization module, adjusted the order of local nodes, and finally generated a conflict-free path plan. The printed path file is as follows:
[0226] Node information collection: 680 nodes in total, including the two-dimensional coordinates, priority and category of each area;
[0227] Path connection relationship set: the average path length between nodes is 12 mm, and the total path length is 162 meters;
[0228] At 10:45, the printing task started.
[0229] The first page prints a large text area. The path planning is completed from top to bottom and from left to right. The printing time takes 32 seconds and the ink consumption is 0.9ml.
[0230] Page 5 prints a high-resolution color bar chart. The print head adjusts the inkjet density to 600 dpi and the path uses a pixel-by-pixel scanning method. It takes 54 seconds and consumes 1.5 ml of ink.
[0231] Page 15 prints a complex table. The path is printed row by row in the order of cells. The path is optimized after each row is printed to avoid repeated actions. The total time is 120 seconds and the ink consumption is 2.8 ml.
[0232] During the printing process, the system monitored the path execution status in real time and found that the low-resolution image area on page 18 had a path error due to fluctuations in the paper movement speed. The system immediately adjusted the print head movement speed to synchronize with the paper speed, reducing the error range from 1.2 mm to 0.3 mm, ensuring print quality.
[0233] The printing task was completed at 11:30, taking a total of 42 minutes, consuming 86 ml of ink, and the average printing quality score was 95 points. In order to verify the superiority of the method of the present invention, a comparative test was conducted with the traditional path planning method. The results are shown in Table 1:
[0234] Table 1 Comparison of test data of printing path optimization of the method of the present invention and the traditional method
[0235]
[0236] It can be seen from this example that the method of the present invention has significant advantages in optimizing the printing path of complex documents, which not only reduces printing time and ink consumption, but also greatly improves printing quality, especially when processing complex tables and high-resolution image areas. Its technical route of combining intelligent classification with multi-objective optimization provides reliable technical support for modern efficient and high-quality printing tasks.
[0237] The present invention introduces a hypersphere clustering algorithm, which performs characteristic analysis on text areas, image areas and table areas in digital files, and realizes intelligent classification and priority identification allocation according to the content characteristics of the areas. Compared with the traditional classification method based on fixed rules, the hypersphere clustering algorithm can process complex data with nonlinear distribution, ensure more accurate classification results, and provide a reliable data basis for subsequent path planning. In mixed content documents, it can give priority to planning fast paths for high-frequency text areas, while ensuring high-precision printing of image and table areas, significantly improving the flexibility and efficiency of printing path planning.
[0238] The present invention uses an improved horned lizard optimization algorithm, combines the three major optimization goals of shortening the printing path, minimizing ink consumption and maximizing printing quality to construct a multi-objective optimization function, and optimizes the printing path under dynamic constraints. Through the collaborative design of the multi-objective optimization function, the printing time is effectively shortened and the ink consumption is reduced while ensuring the printing quality.
[0239] The present invention introduces a hierarchical population structure into the horned lizard optimization algorithm, and divides the printing path optimization into two parts: global sorting optimization and local path connection optimization. The first-layer population is responsible for the path sorting of the global area, and generates a path plan with a high priority area in front in combination with content constraints. The second-layer population performs connection optimization on local path nodes, and ensures that the path connection method meets the performance requirements of the printing device in combination with hardware and time constraints. In addition, the dynamic interaction mechanism between populations realizes the coordinated optimization of the global path and the local connection through the two-way feedback of the global and local optimization results, which significantly improves the search efficiency of the algorithm and the globality of the solution, avoids the local optimal problem, and optimizes the printing path structure of complex documents.
[0240] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A printing path adaptive adjustment method based on hypersphere clustering, characterized in that: The steps include: S1. Obtain a digitized file of a document to be printed, parse the content of the digitized file, and extract characteristic data of text areas, image areas, and table areas in the digitized file; S2. Preprocessing the extracted characteristic data to generate a multi-dimensional feature vector set of the characteristic data; S3. Perform unsupervised classification on the multidimensional feature vector set based on the hypersphere clustering algorithm, and assign priority identification to the regions of each category; S4. Construct a multi-objective optimization function according to the hardware parameters of the printing device and the printing task requirements; S5. Based on the improved horned lizard optimization algorithm, the classification results and priority identification generated by the hypersphere clustering algorithm are used as initial input conditions, and the printing path in the digital file is optimized and calculated under the constraints of the multi-objective optimization function to generate an initial printing path solution that meets the optimization goal; S6. Final arrangement and verification of the initial printing path plan to generate a final printing path plan.
2. The method for adaptively adjusting a printing path based on hypersphere clustering according to claim 1, characterized in that: The S1 specifically includes: S11. Obtaining a digitized file of a document to be printed, including a formatted document or an unformatted image file, converting the digitized file into structured data, and extracting preliminary distribution information of text content, image content, and table content in the document; S12. Extracting characteristic data of the text area from the structured data, including text density, line spacing, character size, and character arrangement of the area; S13. Extract characteristics of the image area in the digitized file to obtain pixel distribution, edge complexity and area characteristic data of the image area; S14. Identify and extract characteristic data of the table area from the structured data, including the number of cells, cell size, row and column ratio, and table border characteristics of the table; S15. Generate a characteristic data matrix based on the characteristic data extracted in steps S12 to S14: T i,j ={C i ,P i ,S i ,D i }; Among them, T i,j represents the characteristic data set of the i-th document region, C i Indicates the type of the ith region, including text, image, or table. The type is determined by the classification identifier. i represents the center position of the ith region, expressed in the form of two-dimensional coordinates (x, y), S i Indicates the size of the ith region, defined as the product of width and height, D i It represents the pixel density of the ith region, which is the ratio of the total number of pixels in the region to the area of the region.
3. The method for adaptively adjusting a printing path based on hypersphere clustering according to claim 1, characterized in that: The S2 specifically includes: S21. Characteristic data T i,j Perform normalization processing to map the characteristic data of each document area into a standardized range to eliminate the dimensional differences of the characteristic data; S22. Use the feature mapping method to construct the feature space of the normalized feature data, map the data of the text area, image area and table area to a unified multi-dimensional feature space, and the dimension of the feature vector is defined as: V i ={X i ′ ,1 ,X i ′ ,2 ,…,X i ′ ,n }; Among them, V i represents the feature vector of the i-th document region, n represents the total number of features, X i ′ ,n represents the nth normalized feature value of the i-th document region; S23. Perform dimension reduction on the feature vector and use the principal component analysis algorithm to select the features with the main contribution. The feature vector after dimension reduction is represented as V i ′ ; S24. Organize the feature vector set after dimensionality reduction to generate a multi-dimensional feature vector set V of characteristic data.
4. The method for adaptively adjusting a printing path based on hypersphere clustering according to claim 1, characterized in that: The S3 specifically includes: S31. Initialize the parameters of the hierarchical hypersphere clustering model based on the multidimensional feature vector set V, the parameters including the initial radius R0 of the first layer of clustering, the maximum radius R max And the number of cluster centers K1, and the initial radius R of the second layer clustering ′ 0 and the number of cluster centers K2; S32. In the first layer of clustering, the multidimensional feature vector set is input into the hypersphere clustering model, and preliminary classification is performed according to the distance criterion to generate the first layer of clustering results: Among them, d(V i ′ ,C k ) represents the multidimensional feature vector V i ′ With cluster center C k The Euclidean distance, P i,j and C k,j Respectively represent the eigenvalue of the i-th multidimensional eigenvector and the k-th cluster center in the j-th dimension; According to the distance criterion, the multidimensional feature vector set V is divided into the text area category set V text , image region category set V image and table area class set V table ; S33. In the second layer of clustering, each category set is refined based on the first layer of clustering results: For the text area category set V text , divided into dense text area set V according to text density and character characteristics dense-text and the sparse text region set V sparse-text ; For the image region category set V image , divided into a set of high pixel density image regions V according to pixel distribution and edge complexity high-density and the low pixel density image region set V low-density ; For table area class set V table , divided into a simple table area set V according to the cell structure and complexity simple-table and complex table area set V complex-table ; S34. According to the results of the refined classification in S33, dynamically set the clustering radius R of each category ′ k , according to the characteristic distribution within the category set, calculate the dynamic radius of the current cluster center: R ′ k =min(R max ,max(d(V i ″,C k ))); Among them, d(V i ′ ,C k ) represents the feature vector V within category k i ″ and cluster center C k The Euclidean distance, V i ″ is the feature vector corresponding to the S33 refinement classification; S35. According to the first layer clustering results and the second layer clustering results, assign a priority identifier U to each cluster k , the priority identification is determined by comprehensive calculation of the regional characteristic data within the cluster: U k =w1·S k +w2·D k ; Among them, S k represents the total area of all regions in the cluster, D k It represents the average pixel density of all regions in the cluster, and w1 and w2 are the weight coefficients for priority calculation.
5. The method for adaptively adjusting a printing path based on hypersphere clustering according to claim 1, characterized in that: The S4 specifically includes: S41. Get the hardware parameters of the printing device, including the print head moving speed v print , Print head inkjet resolution dpi , ink single ejection volume q ink and paper moving speed v paper ; S42. Obtain the printing task requirements, including the printing speed priority, the printing quality priority and the ink saving priority, respectively with weights w speed 、w quality 、w ink express; S43. Combined with the influence of the turning point on the printing path on the time, a printing path shortesting objective function for optimizing the printing speed is constructed: Among them, f path Represents the total time of the printing path, d(P i ,P i+1 ) represents the Euclidean distance from the i-th printing point to the i+1-th printing point, which is used to measure the actual length of the printing path, combined with the acceleration a and time t i Adjustment to reflect dynamic speed changes in the actual path of the print head; S44. Combining the nozzle ejection frequency and the effective resolution of the print head, an ink consumption minimization objective function for reducing ink consumption is constructed: Among them, f ink Indicates the total ink consumption during printing, A i represents the printing area of the ith printing area, f nozzle The jetting frequency of the nozzle is related to the print head resolution and movement speed, and is used to reflect the ink jetting rate per unit time; S45. Considering the influence of speed on positioning error, the print head speed is introduced into the negative feedback mechanism, and the print quality maximization objective function for balancing speed and accuracy is constructed: Among them, f quality Indicates the overall score of print quality, d error (P i ) is the positioning error of the i-th printing point, which is used to quantify the impact of path deviation on the quality during printing. print The negative feedback term k·v is introduced as the print head moving speed print To quantify the negative impact of high-speed motion on positioning accuracy, k is the weight coefficient; S46. Construct multi-objective optimization function: f total =w speed ·f path +w ink ·f ink -w quality ·f quality ; Among them, f total It is a multi-objective optimization function that comprehensively considers the trade-offs among printing path length, ink consumption, and printing quality.
6. The method for adaptively adjusting a printing path based on hypersphere clustering according to claim 1, characterized in that: The S5 specifically includes: S51. Initialize the solution space of the printing path optimization problem using the classification results and the priority identification, and construct a dynamic solution space constraint model, wherein the dynamic solution space constraint model includes: Content constraints: Based on the classification of text area, image area and table area, the printing priority between area categories is defined, and the node arrangement rules of the path scheme are restricted; Hardware constraints, which define the reachability range of path nodes in combination with the hardware parameters of the printing device; Time constraints, combining the paper movement speed and the time requirements of the printing task, define the timeliness target of path generation; S52. Construct an improved horned lizard optimization algorithm, introduce a hierarchical population structure into the horned lizard optimization algorithm, and construct the first-layer population G in the horned lizard population initialization by combining the dynamic solution space constraint model (1) and the second-layer population G (2) , the first-level population G (1) Combined with the content constraints, an initial path sorting that meets the priority of the printing area is generated, so that the high-priority area is at the front of the path. The second-level population G (2) Combined with hardware constraints, the arrangement order of local path nodes is generated so that the distance and connection method between path nodes are consistent with the motion capability of the printing device. Each layer of population is initialized by random generation and priority correction, which covers global and local optimization requirements while meeting the limitations of the dynamic solution space constraint model. S53. Construct a fitness function and modify the fitness in combination with the dynamic solution space constraint model. The first layer fitness function Fitness (1) : Among them, λ content is the weight coefficient of the content constraint, which is used to control the influence of the content constraint on the path plan. K represents the total number of printing areas, and g content is the penalty function for content constraints in the path scheme, defined as: Among them, δ(x) is 1 when x<0, otherwise it is 0, U i+1 and U i are the priority identifiers of the i+1th and ith areas in the path respectively; The second layer fitness function Fitness (2) : Fitness (2) (G (2) )=w local ·f local +w ink ·f ink -w quality ·f quality -λ hardware · g hardware ; Among them, G (2) Indicates the arrangement order of local path nodes, which is used to optimize the connection mode of nodes in the printing area. local is the weight coefficient of the local path length, which is used to control the contribution of the local path length to the fitness value, λ hardware is the weight coefficient of the hardware constraint, which is used to control the influence of the hardware constraint on the path plan. hardware is the penalty function of the hardware constraint in the path plan, defined as: Among them, R max is the maximum reachable distance of the print head, M is the number of nodes in the printing path in the path plan, and Q j and Q j+1 Respectively represent the position coordinates of the jth and j+1th nodes in the path plan; S54. In the multi-layer interactive optimization mechanism, the dynamic solution space constraint model further guides the path optimization: In-layer optimization, the individual solution is dynamically adjusted during the path update process. If the path plan violates the time constraint, the time constraint correction factor g is introduced time : in, represents an individual solution of the tth generation in the current population, that is, a specific printing path solution, It is the next generation of individual solutions generated by the optimization algorithm. In the horned lizard optimization algorithm, the path plan moves closer to the better solution through generation-by-generation optimization. β is the control parameter of the exploration ability, which is used to adjust the global search intensity. R is the random perturbation factor. is the global optimal path solution in the t-th generation population, that is, the path solution with the highest fitness in the current solution space, λ time is the weight coefficient of the time constraint, g time is the time constraint correction factor, indicating whether the current path plan meets the timeliness requirement: g time =max(0,T actual -T max ); Among them, T actual is the total estimated completion time of the current path plan, T max is the upper limit of the time requirement for the printing task. If T actual ≤T max , then g time =0, indicating that the path plan meets the time constraint. If T actual >T max , then g time >0, indicating that the path plan exceeds the timeliness requirement; Inter-layer interaction, the global optimal path order of the first layer population Update to the second-level population and check whether it meets the content constraints. The optimal local path of the second-level population Pass it back to the first-level population and check whether it meets the hardware and time constraints; S55. Dynamically adjust the parameters of the horned lizard optimization algorithm according to the feedback of the fitness function and the dynamic solution space constraint model, so that the optimization process converges within the solution space constraints: When the path plan frequently violates content constraints or hardware constraints, optimize the constraint weight λ content , hardware , strengthen the influence of constraints; When the path plan gradually approaches the timeliness requirement, reduce the time constraint weight λ time , improve the optimization capabilities for other goals; S56. Output the optimized path plan and generate an initial printing path plan that meets the optimization target.
7. The method for adaptively adjusting a printing path based on hypersphere clustering according to claim 1, characterized in that: The S6 specifically includes: S61. Final arrangement of the initial printing path plan: First-layer global path scheme Indicates the printing area path sequence after global sorting optimization; Second layer local path scheme Indicates the optimal arrangement order of node connections within the printing area; Comprehensive Path Solution G final , by using the first-layer global path scheme With the second layer local path scheme Merge and generate to represent the final printing path; S62. The integrated path plan G final Converted into a print path file, defining a node information set N1, which is used to describe the coordinates, priorities, and characteristics of all nodes in the print path: N1={(x i ,y i ,U i ,T i )∣i=1,2,…,M}; Among them, (x i ,y i ) is the two-dimensional coordinate of node i, U i is the node priority, T i It is the characteristic identifier of the node, indicating the category of text, image or table; Define the path connection relationship set E1 to describe the connection order and path distance between nodes. The path connection relationship is expressed as: E1={(i,j,d ij )∣d ij ≤R max ,i,j∈N1}; Among them, (i, j) is the connection from node i to node j in the path, d ij is the Euclidean distance between node i and node j, R max is the maximum reach of the printing device; S63. Perform a reachability check on the node information set N1 and the path connection relationship set E1 in the path file, so that each node in the path reaches the end point of the printing path through the connection relationship of the path connection relationship set E1. The check rule is: Generate a path graph G based on the path connection relationship set E1 graph , where the node is E1, the edge is E1, and the judgment path graph G graph Is it a connected graph? If the path graph is a connected graph, the path is reachable and the next step is continued; otherwise, the second-layer local path plan is re-optimized S64. Perform path conflict check on the path connection relationship set E1 in the path file to prevent duplication or conflict in the path execution of the print head. The check rule is: If C ij =1, there is a conflict in the path, and the optimization algorithm module is returned to adjust the second-layer local path plan. If C ij =0, there is no conflict in the path, and proceed to the next step; S65. The final verified comprehensive path plan G final Convert it into a print path command and generate the final print path plan based on the hardware parameters of the printing device: Print head movement instructions are used to control the print head to move in the order of nodes (x i ,y i ) to move the printing path; Inkjet control instructions, according to the characteristics of the node T i and print area type to adjust the inkjet amount; Time synchronization instruction, execution time t according to paper moving speed and path i,j Synchronize the printing timing between path nodes.
Citation Information
Patent Citations
Batch sequential design method based on selection strategy
CN118153417A
Flexible continuum robot motion control method based on improved angle and exendinium optimization algorithm
CN119141550A
Image formation device, image formation device control method, and program
JP2014156047A
Document analysis for region classification
US10013488B1
Method and system for aggregating print jobs
US20090033978A1