A printing path self-adaptive adjustment method based on hypersphere clustering
By using hypersphere clustering and an improved horned lizard optimization algorithm, the problem of complex document printing path planning was solved, achieving efficient and accurate path optimization, meeting the hardware characteristics and task requirements of printing equipment, and improving printing quality and efficiency.
Patent Information
- Application Number
- CN202411911443.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing print path optimization methods struggle to handle complex document content, cannot dynamically adjust path planning, leading to extended printing times or wasted resources, and fail to effectively combine print device hardware characteristics for path optimization.
An adaptive adjustment method for printing paths based on hypersphere clustering is adopted. By performing feature analysis and priority identification on document regions, and combining the improved horned lizard optimization algorithm, a multi-objective optimization function is constructed to optimize the printing path to meet the hardware parameters and task requirements of the printing device.
It enables efficient and accurate path planning for complex documents, shortens printing time, reduces ink consumption, and improves print quality and device performance.
Smart Images

Figure CN119861886B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of printing, and in particular to a printing path adaptive adjustment method based on hypersphere clustering. BACKGROUND
[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, printing quality and ink consumption of printing equipment. In processing documents with mixed text, images and table regions, traditional path optimization methods are difficult to meet the diversified printing needs.
[0003] Currently, the planning of printing paths mainly relies on planning strategies based on linear paths or region block priority. Such methods usually assume that the document content is relatively simple and the structure is clear, which can meet the basic printing tasks to a certain extent. However, with the increase of complex document proportion in modern office environment, 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 region, resulting in prolonged printing time or resource waste. Secondly, traditional path planning methods do not adequately consider the hardware characteristics of printing equipment, such as print head moving speed, inkjet resolution and paper moving 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 algorithm and ant colony algorithm. However, genetic algorithm and ant colony algorithm still have limitations in practice. On the one hand, traditional optimization algorithms are prone to local optimization when dealing with multi-objective optimization, making it difficult to balance printing path length, ink consumption and printing quality. On the other hand, genetic algorithm and ant colony algorithm are insufficient in classifying and analyzing the characteristics of complex document content, resulting in a gap between the optimization results and actual printing needs.
[0005] In summary, the existing technology has significant shortcomings in path optimization of complex document content, multi-objective balancing and real-time adaptability, making it difficult to meet the needs of efficient and high-quality printing. The defects of existing technology directly limit the improvement of printing equipment performance, and 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
[0006] One object of the present application is to provide a printing path adaptive adjustment method based on hypersphere clustering. The present application provides an efficient and accurate path adaptive adjustment method for complex document printing.
[0007] According to the printing path adaptive adjustment method based on hypersphere clustering of the present application, the following steps are included:
[0008] S1. Obtain a digital file of a document to be printed, parse the content of the digital file, and extract characteristic data of text regions, image regions, and table regions in the digital file;
[0009] S2. Preprocess the extracted characteristic data to generate a set of multi-dimensional feature vectors of the characteristic data;
[0010] S3. Perform unsupervised classification on the set of multi-dimensional feature vectors based on a hyper-sphere clustering algorithm, and assign a priority identifier to each type of region;
[0011] S4. Construct a multi-objective optimization function based on hardware parameters of a printing device and requirements of a printing task;
[0012] S5. Based on the classification results and priority identifiers generated by the hyper-sphere clustering algorithm, perform optimization calculation on a printing path in the digital file under the constraint of the multi-objective optimization function based on an improved angle lizard optimization algorithm to generate an initial printing path scheme that meets the optimization objective;
[0013] S6. Perform final arrangement and verification of the initial printing path scheme to generate a final printing path scheme.
[0014] Optionally, the S1 specifically includes:
[0015] S11. Obtain a digital file of a document to be printed, including a formatted document or an unformatted image file, convert the digital file into structured data, and extract preliminary distribution information of text content, image content, and table content in the document;
[0016] S12. Extract characteristic data of text regions from the structured data, including text density, line spacing, character size, and character arrangement of the regions;
[0017] S13. Extract characteristics of image regions in the digital file to obtain pixel distribution, edge complexity, and region area characteristic data of the image regions;
[0018] S14. Identify and extract characteristic data of table regions from the structured data, including cell number, cell size, row-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] wherein, T i,j represents the characteristic data set of the i-th document region, C i represents the type of the i-th region, including text, image or table, the type being determined by a classification identifier, P i represents the center position of the i-th region, in the form of two-dimensional coordinates (x, y), S i represents the size of the i-th region, defined as the product of width and height, D i represents the pixel density of the i-th region, being the ratio of total number of pixels in the region to the area of the region.
[0022] Optionally, the S2 specifically comprises:
[0023] S21. Normalizing the characteristic data T i,j , mapping the characteristic data of each document region into a standardized range, and eliminating the dimensional difference of the characteristic data;
[0024] S22. Constructing a feature space using a characteristic mapping method on the normalized characteristic data, mapping the data of text regions, image regions and table regions into a unified multi-dimensional feature space, the dimension of the feature vector being defined as:
[0025] V i = {X′ i,1 , X′ i,2 , …, X′ i,n};
[0026] wherein, V i represents the feature vector of the i-th document region, n represents the total number of features, X′ i,n represents the n-th normalized characteristic value of the i-th document region;
[0027] S23. Dimension reduction processing on the feature vector, using a principal component analysis algorithm to screen characteristics with main contribution, the dimension-reduced feature vector being represented as V′ i ;
[0028] S24. Data organization on the dimension-reduced feature vector set, generating a multi-dimensional feature vector set V of characteristic data.
[0029] Optionally, the S3 specifically comprises:
[0030] S31. Initializing parameters of a hierarchical hypersphere clustering model based on the multi-dimensional feature vector set V, the parameters including the initial radius R0, the maximum radius R max and the number of clustering centers K1 of the first layer clustering, and the initial radius R′0 and the number of clustering centers K2 of the second layer clustering;
[0031] S32. Input the multi-dimensional feature vector set into the hypersphere clustering model in the first layer clustering, and preliminarily classify according to the distance criterion to generate the first layer clustering result:
[0032]
[0033] wherein d(V′ i ,C k ) represents the Euclidean distance between the multi-dimensional feature vector V′ i and the clustering center C k , P i,j and C k,j represent the feature values of the i th multi-dimensional feature vector and the k th clustering center in the j th dimension respectively;
[0034] According to the distance criterion, the multi-dimensional feature vector set V is divided into the text region category set V text , the image region category set V image and the table region category set V table ;
[0035] S33. In the second layer clustering, based on the first layer clustering result, each category set is classified in detail:
[0036] For the text region category set V text , according to the text density and character characteristics, it is divided into the dense text region set V dense-text and the sparse text region set V sparse-text ;
[0037] For the image region category set V image , according to the pixel distribution and edge complexity, it is divided into the high pixel density image region set V high-density and the low pixel density image region set V low-density ;
[0038] For the table region category set V table , according to the cell structure and complexity, it is divided into the simple table region set V simple-table and the complex table region set V complex-table ;
[0039] S34. According to the result of the classification in detail in S33, the clustering radius R′ k of each category is dynamically set, and the dynamic radius of the current clustering center is calculated according to the characteristic distribution within the category set:
[0040] R′ k = min(R max ,max(d(V″ i ,C k )));
[0041] wherein d(V i , C k ) represents the Euclidean distance between the feature vector V i and the cluster center C k , V i is the feature vector corresponding to the S33 refined classification;
[0042] S35. According to the first layer clustering result and the second layer clustering result, a priority identifier U k is assigned to each cluster, which is determined by the comprehensive calculation of the region characteristic data in the cluster:
[0043] U k = w1·S k + w2·D k ;
[0044] wherein S k represents the total area of all regions in the cluster, D k represents the average pixel density of all regions in the cluster, and w1 and w2 are weight coefficients for priority calculation.
[0045] Optionally, the S4 specifically comprises:
[0046] S41. Obtain the hardware parameters of the printing device, including the printing head moving speed v print , the printing head inkjet resolution r dpi , the ink single ejection amount q ink , and the 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, which are respectively represented by the weights w speed , w quality , and w ink ;
[0048] S43. In combination with the influence of the turning points on the time on the printing path, a printing path shortest optimization objective function for optimizing the printing speed is constructed:
[0049]
[0050] wherein f path represents the total time of the printing path, d(P i , P i+1 ) represents the Euclidean distance between the i-th printing point and the i+1-th printing point, which is used to measure the actual length of the printing path, and is adjusted in combination with the acceleration a and the time t i to reflect the dynamic speed change in the actual path of the printing head;
[0051] S44. In combination with the ejection frequency of the nozzle and the effective resolution of the print head, a minimum ink consumption objective function for reducing ink consumption is constructed:
[0052]
[0053] wherein f ink represents the total ink consumption during the printing process, A i represents the printing area of the i-th printing region, f nozzle is the ejection frequency of the nozzle, related to the resolution and moving speed of the print head, for reflecting the ink ejection 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 a print quality maximization objective function for balancing speed and accuracy is constructed:
[0055]
[0056] wherein f quality represents the comprehensive score of the printing quality, d error (P i ) is the positioning error of the i-th printing point, for quantifying the influence of path deviation on quality during the printing process, v print is the moving speed of the print head, and the negative feedback term k·v print is introduced to quantify the negative effect of high-speed motion on positioning accuracy, and k is the weight coefficient;
[0057] S46. A multi-objective optimization function is constructed:
[0058] f total =w speed ·f path +w ink ·f ink -w quality ·f quality ;
[0059] wherein f total is the multi-objective optimization function, which comprehensively weighs the printing path length, ink consumption and printing quality.
[0060] Optionally, the S5 specifically comprises:
[0061] S51. The solution space of the print path optimization problem is initialized using the classification results and priority identifiers, and a dynamic solution space constraint model is constructed, which comprises:
[0062] content constraints, according to the category division of the text region, image region and table region, the printing priority order between region categories is defined, and the node arrangement rule of the path scheme is limited;
[0063] Hardware constraints, which define the reachability range of path nodes in combination with hardware parameters of the printing device;
[0064] Time constraints, which define the timeliness target of path generation in combination with paper moving speed and time requirements of the printing task;
[0065] S52. Construct an improved angle lizard optimization algorithm, introduce a hierarchical population structure into the angle lizard optimization algorithm, and construct a first layer population G (1) and a second layer population G (2) in combination with the dynamic solution space constraint model in the angle lizard population initialization (1) Generate an initial path order in accordance with the printing area priority order in combination with the content constraints, so that high-priority areas are placed at the front of the path, and the second layer population G (2) Generate the arrangement order of local path nodes in combination with hardware constraints, so that the distance and connection mode between path nodes meet the motion ability of the printing device, and each layer population is initialized through random generation and priority correction, meeting the dynamic solution space constraint model while covering global and local optimization requirements;
[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] Where λ content is the weight coefficient of the content constraint, used to control the influence degree of the content constraint on the path scheme, K represents the total number of printing areas, g content is the penalty function of the content constraint in the path scheme, defined as:
[0069]
[0070] Where δ(x) is 1 when x<0, otherwise 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] where G (2) represents the arrangement order of local path nodes, used to optimize the connection mode of nodes within the printing area, w local is the weight coefficient of local path length, used to control the contribution degree of local path length in the fitness value, λ hardware is the weight coefficient of hardware constraint, used to control the influence degree of hardware constraint on the path scheme, g hardware is the penalty function of hardware constraint in the path scheme, defined as:
[0074]
[0075] where R max is the maximum reachable distance of the printhead, M is the number of nodes of the printing path in the path scheme, Q j and Q j+1 represent the position coordinates of the jth and j+1th nodes in the path scheme, respectively;
[0076] S54. In the multi-layer interactive optimization mechanism, the dynamic solution space constraint model further guides the path optimization:
[0077] Intra-layer optimization, dynamically adjust the whole solution during path updating process, if the path scheme violates the time constraint, introduce the time constraint correction factor g time :
[0078]
[0079] where, represents the individual solution of the tth generation in the current population, i.e. a specific printing path scheme, is the next generation individual solution generated after optimization algorithm updating, in the angle lizard optimization algorithm, the path scheme is gradually optimized to a better solution, β is the control parameter of exploration ability, used to adjust the global search intensity, R is the random disturbance factor, is the global optimal path scheme in the tth generation population, i.e. the path solution with the highest fitness in the current solution space, λ time is the weight coefficient of time constraint, g time is the time constraint correction factor, indicating whether the current path scheme meets the timeliness requirement:
[0080] g time = max(0, T actual -T max );
[0081] where T actual is the total expected completion time of the current path scheme, Tmax For the upper limit of time requirement of the printing task, if T actual ≤T max , then g time =0, indicating that the path scheme meets the time constraint, if T actual >T max , then g time >0, indicating that the path scheme exceeds the timeliness requirement;
[0082] Interlayer interaction, the global optimal path order of the first layer population is updated to the second layer population, while checking whether it meets the content constraint, the optimal local path of the second layer population is returned to the first layer population, while checking whether it meets the hardware and time constraint;
[0083] S55. Dynamically adjust the angle lizard optimization algorithm parameters 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 constraint:
[0084] When the path scheme frequently violates the content constraint or the hardware constraint, the optimization constraint weights λ content , λ hardware are increased to strengthen the constraint influence;
[0085] When the path scheme gradually approaches the timeliness requirement, the time constraint weight λ time is reduced to improve the optimization ability to other objectives;
[0086] S56. Output the optimized path scheme to generate an initial printing path scheme that meets the optimization objective.
[0087] Optionally, the S6 specifically comprises:
[0088] S61. Final arrangement of the initial printing path scheme:
[0089] The first layer global path scheme represents the printing area path order after global sorting optimization;
[0090] The second layer local path scheme represents the optimal arrangement order of node connection in the printing area;
[0091] The comprehensive path scheme G final is generated by merging the first layer global path scheme and the second layer local path scheme , and is used to represent the final printing path;
[0092] S62. The comprehensive path scheme G final Transforming into a printing path file, defining a node information set N1 for describing the coordinates, priority and characteristics of all nodes in the printing path:
[0093] N1={(x i ,y i ,U i ,T i )∣i=1,2,…,M};
[0094] Wherein, (x i ,y i ) is the two-dimensional coordinates of node i, U i is the node priority, T i is the characteristic identification of the node, indicating the category of text, image or table;
[0095] Defining a path connection relationship set E1 for describing the connection order and path distance between nodes, the path connection relationship is represented as:
[0096] E1={(i,j,d ij )∣d ij ≤R max ,i,j∈N1};
[0097] Wherein, (i,j) is the connection of 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 reachable range of the printing device;
[0098] S63. The node information set N1 and the path connection relationship set E1 in the path file are checked for reachability, so that each node in the path reaches the end of the printing path through the connection relationship of the path connection relationship set E1, and the checking rule is:
[0099] According to the path connection relationship set E1, a path graph G graph is generated, and it is judged whether the path graph G graph is 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 scheme is re-optimized
[0100] S64. The path connection relationship set E1 in the path file is checked for path conflict, so that the printing head does not repeat or conflict in path execution, and the checking rule is:
[0101]
[0102] If C ij =1, there is a conflict in the path, and the second layer local path scheme is adjusted by returning to the optimization algorithm module If C ij= 0, the path is conflict-free, and the next step is continued;
[0103] S65. The final verification passed integrated path scheme G final Converts into printing path commands and generates the final printing path scheme according to the hardware parameters of the printing device:
[0104] Print head movement instructions for controlling the print head to move along the printing path according to the node order;
[0105] Inkjet control instructions for adjusting the inkjet amount according to the characteristic identification T of the node i and the print area type;
[0106] Time synchronization instructions for synchronizing the printing timing between path nodes according to the paper movement speed and path execution time t i,j
[0107] The beneficial effects of the present application are:
[0108] (1) The present application introduces a hypersphere clustering algorithm, which analyzes the characteristics of the text area, image area and table area in the digitized file, and realizes intelligent classification and priority identification according to the content characteristics of the area. 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 fast path of 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 application uses an improved angle lizard optimization algorithm to construct a multi-objective optimization function combining the three optimization objectives of printing path minimization, ink consumption minimization and printing quality maximization, and optimizes the printing path under dynamic constraint conditions. Through the collaborative design of the multi-objective optimization function, the printing time is effectively shortened and the ink consumption is reduced under the premise of ensuring the printing quality.
[0110] (3) The present application introduces a hierarchical population structure in the angle lizard optimization algorithm, which divides the printing path optimization into 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 scheme with high priority areas at the front in combination with content constraints. The second layer population connects the local path nodes for optimization, 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 collaborative optimization of global path and local connection through bidirectional feedback of global and local optimization results, significantly improves the search efficiency and globality of the algorithm, avoids the problem of local optimum, and optimizes the printing path structure of complex documents. BRIEF DESCRIPTION OF DRAWINGS
[0111] The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and are meant to explain the present application and are not intended to limit the application. In the drawings:
[0112] Fig. 1 A flow chart of a printing path adaptive adjustment method based on hypersphere clustering proposed in the present application;
[0113] Fig. 2 A hierarchical population structure and optimization flow chart of an improved angle lizard optimization algorithm in a printing path adaptive adjustment method based on hypersphere clustering proposed in the present application. DETAILED DESCRIPTION
[0114] The present application will now be described in further detail with reference to the drawings. These drawings are simplified schematic diagrams which show the basic structure of the present application in a schematic manner, and thus only show the components relevant to the present application.
[0115] REFERENCE Figs. 1-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 regions, image regions and table regions in the digitized file;
[0117] S2. Preprocess the extracted characteristic data to generate a multi-dimensional feature vector set of the characteristic data;
[0118] S3. Perform unsupervised classification on the multi-dimensional feature vector set based on a hypersphere clustering algorithm, and assign a priority identifier to each type of region;
[0119] S4. Construct a multi-objective optimization function according to the hardware parameters of the printing device and the requirements of the printing task;
[0120] S5. Based on the improved angle lizard optimization algorithm, use the classification results and priority identifiers generated by the hypersphere clustering algorithm as initial input conditions, and perform optimization calculation on the printing path in the digitized file under the constraints of the multi-objective optimization function, to generate an initial printing path scheme that meets the optimization target;
[0121] S6. Perform final arrangement and verification of the path scheme on the initial printing path scheme to generate a final printing path scheme.
[0122] In this embodiment, S1 specifically comprises:
[0123] S11. Obtain a digitized file of a document to be printed, including a formatted document or an unformatted image file, convert the digitized file into structured data, and extract preliminary distribution information of text content, image content, and table content in the document;
[0124] S12. Extract characteristic data of text regions from the structured data, including text density, line spacing, character size, and character arrangement of the regions;
[0125] S13. Extract characteristics of image regions in the digitized file, including pixel distribution, edge complexity, and area characteristics of the image regions;
[0126] S14. Identify and extract characteristic data of table regions from the structured data, including cell number, cell size, row-column ratio, and table border characteristics of the table regions;
[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] wherein T i,j represents a characteristic data set of the i-th document region, C i represents the type of the i-th region, including text, image, or table, the type being determined by a classification identifier, P i represents the center position of the i-th region, represented in two-dimensional coordinates (x, y), S i represents the size of the i-th region, defined as the product of width and height, and D i represents the pixel density of the i-th region, being the ratio of total pixels to area of the region.
[0130] In this embodiment, S2 specifically includes:
[0131] S21. Normalize the characteristic data T i,j , map the characteristic data of each document region to a standardized range, and eliminate the dimensional differences of the characteristic data;
[0132] S22. Construct a feature space using a characteristic mapping method for the normalized characteristic data, map the data of text regions, image regions, and table regions 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] wherein, V i represents the feature vector of the i-th document region, n represents the total number of features, X′ i,n represents the n-th normalized feature value of the i-th document region;
[0135] S23. Dimension reduction is performed on the feature vector, and a principal component analysis algorithm is used to screen features with main contribution, and the dimension-reduced feature vector is represented as V′ i ;
[0136] S24. Data organization is performed on the dimension-reduced feature vector set to generate a multi-dimensional feature vector set V of feature data.
[0137] In the embodiment, S3 specifically includes:
[0138] S31. Parameters of the hierarchical hypersphere clustering model are initialized based on the multi-dimensional feature vector set V, and the parameters include the initial radius R0, the maximum radius R max and the number of cluster centers K1 of the first layer clustering, and the initial radius R′0 and the number of cluster centers K2 of the second layer clustering;
[0139] S32. The multi-dimensional feature vector set is input into the hypersphere clustering model in the first layer clustering, and preliminary classification is performed according to the distance criterion to generate the first layer clustering result:
[0140]
[0141] wherein, d(V′ i ,C k ) represents the Euclidean distance between the multi-dimensional feature vector V′ i and the cluster center C k , P i,j and C k,j represent the feature values of the i-th multi-dimensional feature vector and the k-th cluster center in the j-th dimension, respectively;
[0142] According to the distance criterion, the multi-dimensional feature vector set V is divided into a text region category set V text , an image region category set V image and a table region category set V table ;
[0143] S33. In the second layer clustering, each category set is classified in detail based on the first layer clustering result:
[0144] For the text region category set V text , it is divided into a dense text region set Vdense-text and sparse text region set V sparse-text ;
[0145] to image region category set V image , according to pixel distribution and edge complexity, is divided into high pixel density image region set V high-density and low pixel density image region set V low-density ;
[0146] to table region category set V table , according to cell structure and complexity, is divided into simple table region set V simple-table and complex table region set V complex-table ;
[0147] S34. According to the result of the refined classification in S33, dynamically set the clustering radius R' of each category k According to the distribution of characteristics within the category set, calculate the dynamic radius of the current clustering center:
[0148] R' k = min(R max , max(d(V" i , C k )));
[0149] Where d(V" i , C k ) represents the Euclidean distance between the feature vector V" i and the clustering center C k within the category k, and V" i is the feature vector corresponding to the refined classification in S33;
[0150] S35. According to the first layer clustering result and the second layer clustering result, assign a priority identifier U to each cluster k The priority identifier is determined by the comprehensive calculation of the region characteristic data within the cluster:
[0151] U k = w1·S k + w2·D k ;
[0152] Where S k represents the total area of all regions within the cluster, D k represents the average pixel density of all regions within the cluster, and w1 and w2 are weight coefficients for priority calculation.
[0153] In this embodiment, S4 specifically includes:
[0154] S41. Obtain the hardware parameters of the printing device, including the printing head moving speed v print, print head inkjet resolution r dpi , ink single ejection amount q ink , and paper moving speed v paper ;
[0155] S42. Obtain the print task requirements, including print speed priority, print quality priority and ink saving priority, respectively represented by weights w speed , w quality , w ink ;
[0156] S43. Construct a print path shortest optimization objective function for optimizing print speed by combining the influence of turning points on the print path on time:
[0157]
[0158] Wherein, f path represents the total time of the print path, d(P i , P i+1 ) represents the Euclidean distance between the i-th print point and the i+1-th print point, which is used to measure the actual length of the print path, combined with the acceleration a and the time t i adjustment, reflecting the dynamic speed change in the actual path of the print head;
[0159] S44. Construct an ink consumption minimization objective function for reducing ink consumption by combining the nozzle ejection frequency and the effective resolution of the print head:
[0160]
[0161] Wherein, f ink represents the total ink consumption during the printing process, A i represents the printing area of the i-th print area, f nozzle is the ejection frequency of the nozzle, which is related to the print head resolution and moving speed, and is used to reflect the ink ejection rate per unit time;
[0162] S45. Considering the influence of speed on positioning error, introduce the print head speed into the negative feedback mechanism, and construct a print quality maximization objective function for balancing speed and accuracy:
[0163]
[0164] Wherein, f quality represents the comprehensive score of print quality, d error (P i ) is the positioning error of the i-th print point, which is used to quantify the influence of path deviation on quality during the printing process, v print is the print head moving speed, and the negative feedback term k·v printTo quantify the negative impact of high-speed movement on positioning accuracy, k is the weight coefficient;
[0165] S46. Construct a multi-objective optimization function:
[0166] f total = w speed · f path + w ink · f ink - w quality · f quality ;
[0167] Where f total is a multi-objective optimization function that balances the length of the printing path, ink consumption, and printing quality.
[0168] In this embodiment, S5 specifically includes:
[0169] S51. Initialize the solution space of the printing path optimization problem using the classification results and priority identification, and construct a dynamic solution space constraint model, which includes:
[0170] Content constraints define the printing priority order between region categories based on the classification of text regions, image regions, and table regions, and limit the node arrangement rules of the path scheme;
[0171] Hardware constraints define the reachability range of path nodes in combination with the hardware parameters of the printing device;
[0172] Time constraints define the timeliness target of path generation in combination with the paper movement speed and time requirements of the printing task;
[0173] S52. Construct an improved Anguilla optimization algorithm, introduce a hierarchical population structure into the Anguilla optimization algorithm, and construct the first layer population G (1) and the second layer population G (2) in the Anguilla population initialization in combination with the dynamic solution space constraint model, the first layer population G (1) generates an initial path order that conforms to the printing region priority order in combination with the content constraints, so that high-priority regions are placed at the front of the path, and the second layer population G (2) generates the arrangement order of local path nodes in combination with the hardware constraints, so that the distance and connection method between path nodes conform to the movement ability of the printing device, each layer of population is initialized through random generation and priority correction, which meets the requirements of global and local optimization while satisfying the restrictions 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] where λ content is the weight coefficient of content constraint, used to control the influence degree of content constraint on path scheme, K represents the total number of printing areas, g content is the penalty function of content constraint in path scheme, defined as:
[0177]
[0178] where δ(x) is 1 when x<0, otherwise 0, U i+1 and U i are the priority identifiers of the i+1th and ith areas in 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] where G (2) represents the arrangement order of local path nodes, used to optimize the connection mode of nodes in printing area, w local is the weight coefficient of local path length, used to control the contribution degree of local path length in fitness value, λ hardware is the weight coefficient of hardware constraint, used to control the influence degree of hardware constraint on path scheme, g hardware is the penalty function of hardware constraint in path scheme, defined as:
[0182]
[0183] where R max is the maximum reachable distance of print head, M is the number of nodes in printing path in path scheme, Q j and Q j+1 represent the position coordinates of the jth and j+1th nodes in path scheme, respectively;
[0184] S54. In the multi-layer interactive optimization mechanism, the dynamic solution space constraint model further guides path optimization:
[0185] Intra-layer optimization involves dynamically adjusting individual solutions during path updates. If a path violates time constraints, a time constraint correction factor g is introduced. time :
[0186]
[0187] in, This represents a solution for an individual in the t-th generation of the current population, i.e., a specific printing path scheme. The next generation of individual solutions is generated through optimization algorithm updates. In the horned lizard optimization algorithm, the path scheme moves towards a better solution through successive optimizations. β is a control parameter for exploration ability, used to adjust the global search intensity, and R is a random perturbation factor. λ represents the globally optimal path solution in the t-th generation population, i.e., the path solution with the highest fitness in the current solution space. time g represents the weighting coefficient for time constraints. time This is a time constraint correction factor, indicating whether the current route plan meets the timeliness requirements:
[0188] g time =max(0,T) actual -T max );
[0189] Among them, T actual T represents the total estimated completion time of the current route. max The upper limit of the time requirement for the print job, if T actual ≤T max Then g time =0, indicating that the path solution meets the time constraint, if T actual >T max Then g time >0 indicates that the route plan exceeds the timeliness requirement;
[0190] Inter-layer interaction, the globally optimal path order of the first-layer population Update to the second-level population, while checking if it meets content constraints, and determine the optimal local path of the second-level population. The data is then sent back to the first-level population, while simultaneously checking whether it meets the hardware and time constraints.
[0191] S55. Dynamically adjust the parameters of the horned lizard optimization algorithm based on the feedback from 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 scheme frequently violates content constraints or hardware constraints, optimize the constraint weight λ. content , λ hardware Strengthen the influence of constraints;
[0193] When the path scheme gradually approaches the timeliness requirement, the time constraint weight λ is reduced time , and the optimization ability for other objectives is improved;
[0194] S56. Output the optimized path scheme to generate an initial printing path scheme that meets the optimization objective.
[0195] The embodiment divides the path planning into two levels of global path sorting and local node connection, and optimizes them respectively, reasonably solves the printing path complexity problem, dynamically adjusts the parameters and constraints, and enhances the adaptability of the optimization algorithm, avoiding falling into a local optimal solution.
[0196] At the same time, the hierarchical population structure is introduced to make the global optimization and local optimization work together, breaking through the limitations of traditional single-layer optimization. The multi-layer interaction mechanism is used to feedback and correct the optimization results of the global and local, greatly improving the globality and adaptability of the solution. The dynamic parameter adjustment mechanism realizes the adaptive adjustment of the exploration and development ability in the optimization process combined with the changes of the solution space.
[0197] In the embodiment, S6 specifically includes:
[0198] S61. Final arrangement of the initial printing path scheme:
[0199] The first layer global path scheme represents the printing area path order after global sorting optimization;
[0200] The second layer local path scheme represents the optimal arrangement order of node connection in the printing area;
[0201] The comprehensive path scheme G final is generated by merging the first layer global path scheme and the second layer local path scheme , and is used to represent the final printing path;
[0202] S62. Convert the comprehensive path scheme G final into a printing path file, and define a node information set N1 to describe the coordinates, priority and characteristics of all nodes in the printing path:
[0203] N1={(x i ,y i ,U i ,T i )∣i=1,2,…,M};
[0204] Where (x i ,y i ) is the two-dimensional coordinates of node i, U iT is the node priority, i T is the node property identifier, indicating the category of text, image or table;
[0205] Define a path connection relationship set E1 for describing the connection order and path distance between nodes, and the path connection relationship is represented as:
[0206] E1={(i,j,d ij )∣d ij ≤R max ,i,j∈N1};
[0207] Where (i,j) is the connection of node i to node j in the path, d ij is the Euclidean distance between nodes i and j, and R max is the maximum reachable range of the printing device;
[0208] S63. The node information set N1 and the path connection relationship set E1 in the path file are checked for reachability, so that each node in the path reaches the end of the printing path through the connection relationship of the path connection relationship set E1, and the checking rule is:
[0209] According to the path connection relationship set E1, a path graph G graph is generated, and it is judged whether the path graph G graph is 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 scheme is re-optimized
[0210] S64. The path connection relationship set E1 in the path file is checked for path conflict, so that the print head does not repeat or conflict in path execution, and the checking rule is:
[0211]
[0212] If C ij =1, there is a conflict in the path, and the second layer local path scheme is returned to the optimization algorithm module for adjustment If C ij =0, there is no conflict in the path, and the next step is continued.
[0213] S65. The final comprehensive path scheme G final that passes the final check is converted into a printing path command, and the final printing path scheme is generated according to the hardware parameters of the printing device:
[0214] Print head movement instruction, used to control the print head to move according to the node order;
[0215] Inkjet control instruction, according to the node property identifier T iand print area type adjusts ink ejection amount;
[0216] time synchronization instruction, according to paper moving speed and path execution time t i,j synchronize print timing between path nodes.
[0217] Embodiment 1:
[0218] Embodiment is applied in a large financial institution, the archives of a large financial institution need to print a detailed annual financial report, for the upcoming high-level meeting review, the financial report contains 80 pages, complex structure, including text description, color pictures and various tables, the first part of the report is the annual data analysis, contains a large number of text description; The second part is the financial trend chart, inserted high-resolution column chart and line chart; The third part is the financial detail table, covering hundreds of financial data accurate to decimal point. The printing requirement is high-quality output and the meeting time is urgent, which requires completing the printing task within 45 minutes.
[0219] 9:00, the system starts to obtain the digital file of the financial report and performs content analysis. After file parsing is completed, the system extracts the data characteristics of all text, picture and table regions. The results show that the report contains a total of 680 independent print regions, of which 480 (70.6%) are text regions, 136 (20%) are picture regions, and 64 (9.4%) are table regions. The system records the characteristic data of each region, including:
[0220] Page 2 is a dense text region with a character density of 120 characters per square centimeter;
[0221] Page 5 is a color column chart with a pixel density of 600 dpi;
[0222] Page 15 is a complex table with 12x10 cells, with a total area of 400 square centimeters and a cell spacing of 0.5 millimeters.
[0223] Through the hypersphere clustering algorithm, the system intelligently classifies the above regions into six categories: dense text, sparse text, high-resolution picture, low-resolution picture, complex table and simple table, and assigns a priority identifier to each category. In the embodiment, the color column chart on page 5 is assigned a priority of 3, and the complex table region on page 15 is assigned the highest priority of 1.
[0224] 10:00, the system constructs a multi-objective optimization function according to the priority and the hardware parameters of the printing device, including path minimization, ink consumption minimization and print quality maximization, then the printing path is optimized by improving the angle lizard optimization algorithm combined with the hierarchical population mechanism, the first layer optimizes the global path order, and the table area of priority 1 is printed first, followed by the text area of priority 2; the second layer optimizes the connection mode of the local path node, and the table is printed from the top left corner to the bottom right corner in sequence.
[0225] 10:30, the system generates an initial path scheme and verifies the path, and finds that the node connection of the table area of page 15 has repeated printing conflict, the system automatically returns to the optimization module, adjusts the local node arrangement order, and finally generates a conflict-free path scheme, the printing path file is as follows:
[0226] Node information set: a total of 680 nodes, including 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] 10:45, the printing task starts to execute.
[0229] The first page prints a large text area, the path planning is completed from top to bottom and left to right, the printing time is 32 seconds, and the ink consumption is 0.9 ml;
[0230] The fifth page prints a high-resolution color column chart, the print head adjusts the ink density to 600 dpi, the path adopts the pixel-by-pixel scanning mode, the time consumption is 54 seconds, and the ink consumption is 1.5 ml;
[0231] The 15th page prints a complex table, the path is printed row by row according to the cell order, and the path is optimized after each row is printed to avoid repeated actions, the total time consumption is 120 seconds, and the ink consumption is 2.8 ml.
[0232] During the printing process, the system monitors the path execution state in real time, finds that the low-resolution picture area of page 18 causes path error due to paper movement speed fluctuation, the system adjusts the print head movement speed to synchronize the paper speed in time, the error range is reduced from 1.2 mm to 0.3 mm, and the printing quality is ensured.
[0233] The printing task is completed at 11:30, the total time consumption is 42 minutes, the ink consumption is 86 ml, and the average printing quality score is 95 points. In order to verify the superiority of the method of the application, a comparison test is carried out with the traditional path planning method, and the results are as shown in the following table 1.
[0234] Table 1 Comparison of printing path optimization test data of the method of the application and the traditional method
[0235]
[0236] It can be seen from the embodiment that the method has significant advantages in the print path optimization of complex documents, not only reduces the printing time and ink consumption, but also greatly improves the printing quality, especially when dealing with complex table and high-resolution image areas. The intelligent classification and multi-objective optimization combined technical route provides reliable technical support for modern efficient and high-quality printing tasks.
[0237] The present application introduces a hypersphere clustering algorithm, which realizes intelligent classification and priority identification distribution according to the content characteristics of the region by analyzing the characteristics of the text area, image area and table area in the digitized file. 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 the mixed content document, it can prioritize the fast path of high-frequency text area, while ensuring the high-precision printing of image and table areas, significantly improving the flexibility and efficiency of print path planning.
[0238] The present application constructs a multi-objective optimization function by combining the shortest print path, the minimum ink consumption and the maximum printing quality through the improved angle lizard optimization algorithm, and optimizes the print path under dynamic constraint conditions. Through the collaborative design of the multi-objective optimization function, the printing time is effectively shortened and the ink consumption is reduced under the premise of ensuring the printing quality.
[0239] The present application introduces a hierarchical population structure in the angle lizard optimization algorithm, divides the print path optimization into global sorting optimization and local path connection optimization, the first layer population is responsible for the path sorting of the global area, and generates the path scheme of the high-priority area in the front combined with the content constraint, the second layer population connects the local path nodes for optimization, and combines the hardware and time constraints to ensure that the path connection method meets the performance requirements of the printing equipment. In addition, the dynamic interaction mechanism between populations realizes the collaborative optimization of global path and local connection through the bidirectional feedback of global and local optimization results, significantly improves the search efficiency and globality of the algorithm, avoids the local optimal problem, and optimizes the print path structure of complex documents.
[0240] The above is only the preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any skilled person in the art can make equivalent replacement or change according to the technical scheme and inventive concept of the present application within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for adaptive adjustment of printing path based on hypersphere clustering, characterized in that, The method comprises the following steps: S1. Obtain a digital file of a document to be printed, parse the content of the digital file, and extract characteristic data of text regions, image regions, and table regions in the digital file; S2. Preprocess the extracted characteristic data to generate a set of multi-dimensional feature vectors of the characteristic data; S3. Perform unsupervised classification on the set of multi-dimensional feature vectors based on a hypersphere clustering algorithm, and assign a priority identifier to each type of region; S4. Construct a multi-objective optimization function according to hardware parameters of a printing device and requirements of a printing task; S5. Based on the classification results and priority identifiers generated by the hypersphere clustering algorithm, perform optimization calculation on the printing path in the digital file under the constraint of the multi-objective optimization function to generate an initial printing path scheme that meets the optimization target; S6. Perform final arrangement and verification of the initial printing path scheme to generate a final printing path scheme; S6 specifically comprises: S61. Perform final arrangement of the initial printing path scheme: First tier global path solution represents the order of the print area paths after global sequencing optimization; Second tier partial path solution represents the optimal arrangement order of node connections within the printing area; Integrated pathing scheme G final , by merging a first layer global pathing scheme with a second layer local pathing scheme , for representing a final printing path; S62. The integrated path solution G final is converted into a print path file, defining a set of node information N1 describing the coordinates, priorities and properties of all nodes in the print path: N1 = {(x i ,y i ,U i ,T i ) | i = 1,2,...,M}; wherein (x i ,y i ) is the two-dimensional coordinate of node i, U i is the node priority, T i is the characteristic identifier of the node, indicating the category of text, image or table; Define a set of path connection relationships E1 for describing the connection order and path distance between nodes, and the path connection relationship is represented as: E1={(i,j,d ij )∣d ij ≤R max ,i,j∈N1}; where (i,j) is the connection between node i and node j in the path, d ij is the Euclidean distance between node i and node j, R max is the maximum reachable range of the printing device; S63. Perform reachability check on the set of node information N1 and the set of path connection relationships E1 in the path file, so that each node in the path reaches the end of the printing path through the connection relationship of the set of path connection relationships E1, and the check rule is: Generate a path graph G based on the path connection relationship set E1. graph Determine the path graph G graph Check if the path graph is connected. If it is, the path is reachable, and proceed to the next step; otherwise, re-optimize the second-level local path scheme. S64. Perform path conflict check on the set of path connection relationships E1 in the path file, so that the print head does not repeat or conflict during path execution, and the check rule is: If C ij = 1, there is a conflict in the path, and the second layer local path scheme is adjusted by returning to the optimization algorithm module If C ij = 0, there is no conflict in the path, and the next step is continued S65. The final check passed the integrated path solution G final converted into a print path command and a final print path solution is generated according to the hardware parameters of the printing device: Print head movement instructions for controlling the print head to move along the printing path according to the node order; Ink ejection control instructions, based on the characteristic identification T of the node i and the print area type adjust the amount of ink ejected; Time synchronization instructions, according to paper movement speed and path execution time t i,j Synchronize print timing between path nodes.
2. The method of claim 1, wherein, S1 specifically comprises: S11. Obtain a digital file of a document to be printed, including a formatted document or an unformatted image file, convert the digital file into structured data, and extract preliminary distribution information of text content, image content, and table content in the document; S12. Extract characteristic data of text regions from the structured data, including text density, line spacing, character size, and character arrangement of the regions; S13. Extract characteristics of image regions in the digital file to obtain pixel distribution, edge complexity, and area characteristic data of the image regions; S14. Identify and extract characteristic data of table regions from the structured data, including the number of cells, cell size, row-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}; wherein T i,j represents a set of characteristic data of the i-th document region, C i represents the type of the i-th region, including text, image or table, the type being determined by a classification identifier, P i represents the center position of the i-th region, in the form of two-dimensional coordinates (x, y), S i represents the size of the i-th region, defined as the product of width and height, D i represents the pixel density of the i-th region, being the ratio of the total number of pixels of the region to the area of the region.
3. The method of claim 1, wherein, S2 specifically comprises: S21. normalizing the characteristic data T i,j S21. normalizing the characteristic data T i,j S21. normalizing the characteristic data T i,j S21. normalizing the characteristic data T i,j S21. normalizing the characteristic data T i,j S21. normalizing the characteristic data T i,j S21. normalizing the characteristic data S22. Construct a feature space using a characteristic mapping method to map the data of the text regions, image regions, and table regions 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 }; wherein V i represents the feature vector of the i-th document region, n represents the total number of features, X' i,n represents the n-th normalized characteristic value of the i-th document region; S23. Dimensionality reduction is performed on the feature vectors, and a principal component analysis algorithm is used to screen features with major contributions, and the dimensionality-reduced feature vectors are represented as V' i ; S24. Organize the set of feature vectors after dimension reduction to generate a set of multi-dimensional feature vectors V of the characteristic data.
4. The method of claim 1, wherein, S3 specifically comprises: S31. Initialize parameters of the hierarchical hypersphere clustering model based on the set of multi-dimensional feature vectors V, including initial radius R0, maximum radius R max and number of cluster centers K1 of the first layer clustering, and initial radius R'0 and number of cluster centers K2 of the second layer clustering. S32. Initialize the first layer clustering model based on the set of multi-dimensional feature vectors V, including initial radius R0, maximum radius R max and number of cluster centers K1 of the first layer clustering, and initial radius R'0 and number of cluster centers K2 of the second layer clustering. S33. Initialize the second layer clustering model based on the set of multi-dimensional feature vectors V, including initial radius R'0 and S32. Input the multi-dimensional feature vector set into the hyper-sphere clustering model in the first layer clustering, and perform preliminary classification according to the distance criterion to generate the first layer clustering result: Wherein d(V′) i C k ) represents the multidimensional feature vector V′ i With cluster center C k Euclidean distance, P i,j and C k,j Let represent the i-th multidimensional feature vector and the j-th cluster center feature value, respectively; The multi-dimensional feature vector set V is divided into a set of text region categories V text , a set of image region categories V image , and a set of table region categories V table according to a distance criterion. S33. In the second layer clustering, refine the classification of each category set based on the first layer clustering result: The character region category set V text is divided into a dense character region set V dense-text and a sparse character region set V sparse-text according to character density and character features. The image region category set V image is divided into a high pixel density image region set V high-density and a low pixel density image region set V low-density according to pixel distribution and edge complexity. The table region category set V table is divided into a simple table region set V simple-table and a complex table region set V complex-table according to cell structure and complexity. S34. According to the results of the refined classification in S33, dynamically set the clustering radius R' for each category k , according to the distribution of characteristics within the category set, calculate the dynamic radius of the current clustering center: R' k = min(R max , max(d(V" i , C k ))) ; Wherein d(V″ i C k ) represents the feature vector V″ within category k. i With cluster center C k Euclidean distance, V″ i Refine the feature vector corresponding to the S33 classification; S35. Based on the results of the first-level clustering and the second-level clustering, assign a priority identifier U to each cluster. k The priority identifier is determined by comprehensive calculation of the regional characteristic data within the cluster: U k = w1 · S k + w2 · D k ; where S k represents the total area of all regions within the cluster, D k represents the average pixel density of all regions within the cluster, and w1 and w2 are weight coefficients for priority calculation.
5. The method of claim 1, wherein, The S4 specifically comprises: S41. Obtain the hardware parameters of the printing device, including the print head moving speed v print , the print head inkjet resolution r dpi , the ink single ejection amount q ink , and the paper moving speed v paper ; S42. Obtain print job requirements, including print speed priority, print quality priority, and ink saving priority, represented by weights w speed , w quality , w ink , respectively. S43. Construct a printing path minimization objective function for optimizing the printing speed by combining the influence of the turning points on the printing path on time: wherein f path represents the total time of the printing path, d(P i , P i+1 ) represents the Euclidean distance between the i-th printing point and the i+1-th printing point, used to measure the actual length of the printing path, combined with the acceleration a and the time t i adjustment, reflecting the dynamic speed changes in the actual path of the printhead; S44. Construct an ink consumption minimization objective function for reducing ink consumption by combining the nozzle ejection frequency and the effective resolution of the print head: wherein f ink represents the total ink consumption in the printing process, A i represents the printing area of the i-th printing area, f nozzle is the ejection frequency of the nozzle, which is related to the resolution and moving speed of the print head, and is used to reflect the ink ejection rate per unit time; S45. Introduce the print head speed into the negative feedback mechanism by considering the influence of the speed on the positioning error to construct a printing quality maximization objective function for balancing the speed and accuracy: wherein f quality represents a comprehensive score of print quality, d error (P i ) is the positioning error of the i-th print point, used to quantify the influence of path deviation on quality in the printing process, v print is the print head moving speed, and a negative feedback term k·v print is introduced to quantify the negative impact of high-speed motion on positioning accuracy, and k is a weight coefficient; S46. Construct a multi-objective optimization function: f total = w speed · f path + w ink · f ink - w quality · f quality ; where f total is a multi-objective optimization function that synthesizes the trade-off between print path length, ink consumption, and print quality.
6. The method of claim 5, wherein, The S5 specifically comprises: S51. Initialize the solution space of the printing path optimization problem by using the classification result and the priority identifier, and construct a dynamic solution space constraint model, wherein the dynamic solution space constraint model comprises: Content constraints, according to the category division of the text area, the image area and the table area, define the printing priority order between the area categories, and limit the node arrangement rule of the path scheme; Hardware constraints, combine the hardware parameters of the printing device to define the accessibility range of the path node; Time constraints, combine the paper moving speed and the time requirement of the printing task to define the timeliness objective of the path generation; S52. Constructing an improved angle lizard optimization algorithm, introducing a hierarchical population structure in the angle lizard optimization algorithm, and combining a dynamic solution space constraint model in the angle lizard population initialization to construct a first layer population G (1) and a second layer population G (2) , the first layer population G (1) combining content constraints to generate an initial path order that conforms to the print area priority order, so that high priority areas are placed first in the path, and the second layer population G (2) combining hardware constraints to generate a local path node arrangement order, so that the distance and connection mode between path nodes conform to the motion ability of the printing device, and each layer population is initialized through random generation and priority correction, meeting the dynamic solution space constraint model while covering global and local optimization requirements; S53. Construct fitness function, and modify fitness in combination with dynamic solution space constraint model, first layer fitness function Fitness (1) : where λ content is a weight coefficient of content constraint, used to control the influence degree of content constraint on the path plan, K represents the total number of print areas, g content is a penalty function of content constraint in the path plan, defined as: wherein, δ(x) is 1 when x < 0, otherwise 0, U i+1 and U i are the priority identifiers of the (i+1)th and ith regions in the path, respectively. Second layer fitness function (2) : Fitness (2) (G (2) )=w local ·f local +w ink ·f ink -w quality ·f quality -λ hardware ·g hardware ; wherein G (2) represents the arrangement order of the local path nodes, used to optimize the connection mode of the nodes in the printing area, w local is a weight coefficient of the local path length, used to control the contribution degree of the local path length in the fitness value, λ hardware is a weight coefficient of the hardware constraint, used to control the influence degree of the hardware constraint on the path scheme, g hardware is a penalty function of the hardware constraint in the path scheme, defined as: wherein R max is the maximum reachable distance of the print head, M is the number of nodes of the print path in the path plan, Q j and Q j+1 represent the position coordinates of the jth and j+1th nodes in the path plan, respectively. S54. In the multi-layer interactive optimization mechanism, the dynamic solution space constraint model further guides the path optimization: Intra-layer optimization, dynamic adjustment of the entire solution in the path update process, if the path scheme violates the time constraint, then introduce a time constraint correction factor g time : wherein, represents the individual solution of the tth generation in the current population, i.e. a specific printing path scheme, is the next generation individual solution generated by updating the optimization algorithm, in the angle lizard optimization algorithm, the path scheme is gradually optimized to a better solution, β is the control parameter of the exploration ability, which is used to adjust the global search strength, and R is the random disturbance factor, is the global optimal path scheme in the tth generation population, i.e. the highest fitness path solution in the current solution space, λ time is the weight coefficient of time constraint, g time is the time constraint correction factor, which indicates whether the current path scheme meets the timeliness requirement: g time = max(0, T actual - T max ); wherein T actual is the total estimated completion time of the current routing scheme, T max is the upper limit of the time requirement of the printing task, if T actual ≤ T max , then g time = 0, indicating that the routing scheme meets the time constraint, if T actual > T max , then g time > 0, indicating that the routing scheme exceeds the timeliness requirement; Inter-layer interaction, global optimal path sequence of the first layer population Update to the second layer population while checking for content constraints, optimal local path of the second layer population Back to the first layer population while checking for hardware and time constraints; S55. Dynamically adjust the angle lizard optimization algorithm parameters 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 constraint: Optimize constraint weight λ when path solution frequently violates content constraints or hardware constraints content , λ hardware , reinforce constraint impact; When the path scheme gradually approaches the timeliness requirement, the time constraint weight λ is reduced time , and the optimization ability for other targets is improved; S56. Output the optimized path scheme to generate an initial printing path scheme that meets the optimization objective.
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