Variable code printing method and system for bar codes
By establishing control constraint domains and particle swarms in variable coding printing technology, and mutating optimization is carried out, the problem of inaccurate variable coding adjustment in the existing technology is solved, and efficient and optimized variable coding printing effect is achieved.
Patent Information
- Application Number
- CN202411185721.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-03
AI Technical Summary
The existing variable code printing technology lacks precise control strategies, which leads to inaccurate variable code adjustments during the printing process, and the inability to quickly and effectively find the best printing parameters, affecting the quality and printing efficiency of barcodes.
By receiving the variable code printing task, a variable code printing control constraint domain is established, a control particle group that meets the predetermined particle capacity constraints is obtained, a particle fitness and variation constraint function is constructed, and a variation optimization is searched, based on the variable code printing equipment and optimization results are searched Change code printing.
High-quality variable code printing is realized to ensure that the printed materials meet actual needs and quality requirements, optimize printing parameters and equipment status, and improve printing efficiency and quality.
Smart Images

Figure CN119058261A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of variable code printing, and in particular to a variable code printing method and system for barcodes. Background Art
[0002] Variable data printing technology is a technology that can generate, modify and print barcodes in real time according to different needs. It allows users to dynamically change the content of the barcode based on databases, sequence generation or other data sources.
[0003] At present, although the existing variable code printing technology has met the basic printing needs to a certain extent, there are still some significant technical problems. The control and application of printing equipment also lack flexibility, making it difficult to adapt to the printing needs of barcodes of different types and specifications, which limits its application scope and popularity.
[0004] In summary, the prior art lacks an accurate variable code printing control strategy, resulting in inaccurate variable code adjustment during the printing process, and is unable to quickly and effectively find the optimal printing parameters, further affecting the quality and printing efficiency of the barcode. Summary of the invention
[0005] The purpose of this application is to provide a barcode variable code printing method and system to solve the problem that the existing technology lacks an accurate variable code printing control strategy, resulting in inaccurate variable code adjustment during the printing process and inability to quickly and effectively find the optimal printing parameters, further affecting the quality and printing efficiency of the barcode.
[0006] In view of the above problems, the present application provides a barcode variable code printing method and system.
[0007] In a first aspect, the present application provides a variable code printing method for a barcode, the method being implemented by a variable code printing system for a barcode, wherein the method comprises: receiving a variable code printing task, wherein the variable code printing task comprises a barcode to be printed; performing variable code printing control constraint analysis on the barcode to be printed according to the variable code printing control variable optimization breadth, and establishing a variable code printing control constraint domain; performing variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain, and obtaining a first variable code printing control particle group that satisfies a predetermined particle capacity constraint; constructing a variable code printing particle fitness combing function; establishing a variable code printing control particle mutation constraint function; performing mutation optimization on the first variable code printing control particle group according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function, and obtaining a variable code printing control optimization result that satisfies the particle mutation optimization rule; performing variable code printing on the barcode to be printed based on a variable code printing device and in combination with the variable code printing control optimization result.
[0008] In a second aspect, the present application further provides a barcode variable code printing system for executing a barcode variable code printing method as described in the first aspect, wherein the system comprises: a task receiving module, the task receiving module is used to receive a variable code printing task, wherein the variable code printing task includes a barcode to be printed; a control constraint domain establishment module, the control constraint domain establishment module is used to perform variable code printing control constraint analysis on the barcode to be printed according to the optimal breadth of variable code printing control variables, and establish a variable code printing control constraint domain; a control particle swarm acquisition module, the control particle swarm acquisition module is used to perform variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain, and obtain a first variable code printing that meets a predetermined particle capacity constraint. A brush control particle group; a fitness function construction module, the fitness function construction module is used to construct a variable code printing particle fitness combing function; a constraint function construction module, the constraint function construction module is used to establish a variable code printing control particle mutation constraint function; an optimization result acquisition module, the optimization result acquisition module is used to perform mutation optimization on the first variable code printing control particle group according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function, to obtain a variable code printing control optimization result that meets the particle mutation optimization rules; a variable code printing module, the variable code printing module is used to perform variable code printing on the bar code to be printed based on the variable code printing equipment and in combination with the variable code printing control optimization result.
[0009] One or more technical solutions provided in this application have at least the following technical effects or advantages: By receiving a variable code printing task, wherein the variable code printing task includes a barcode to be printed; performing variable code printing control constraint analysis on the barcode to be printed according to the variable code printing control variable optimization breadth, and establishing a variable code printing control constraint domain; performing variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain, and obtaining a first variable code printing control particle group that meets a predetermined particle capacity constraint; constructing a variable code printing particle fitness combing function; establishing a variable code printing control particle variation constraint function; and determining a variable code printing control particle variation constraint function according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle variation constraint function. The function performs mutation optimization on the first variable code printing control particle group to obtain a variable code printing control optimization result that meets the particle mutation optimization rule; based on the variable code printing equipment, the barcode to be printed is variable code printed in combination with the variable code printing control optimization result, which effectively solves the problem that the prior art lacks an accurate variable code printing control strategy, resulting in inaccurate variable code adjustment during the printing process, and is unable to quickly and effectively find the optimal printing parameters, further affecting the quality and printing efficiency of the barcode, achieving high-quality variable code printing, ensuring that the printed products meet actual needs and quality requirements, optimizing printing parameters and equipment status, and improving printing efficiency and quality.
[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented according to the contents of the specification, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are specifically cited below. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0012] Figure 1 The present invention is a schematic diagram of a process of a barcode variable code printing method.
[0013] Figure 2 This is a schematic diagram of the structure of a barcode variable code printing system of the present application.
[0014] Description of reference numerals: Task receiving module 11, control constraint domain establishing module 12, control particle swarm acquiring module 13, fitness function constructing module 14, constraint function constructing module 15, optimization result acquiring module 16, variable code printing module 17. DETAILED DESCRIPTION
[0015] The present application provides a variable code printing method and system for a barcode, which solves the problem in the prior art that the variable code adjustment during the printing process is inaccurate due to the lack of an accurate variable code printing control strategy, and the inability to quickly and effectively find the optimal printing parameters, which further affects the quality and printing efficiency of the barcode. The application achieves high-quality variable code printing, ensures that the printed products meet actual needs and quality requirements, optimizes printing parameters and equipment status, and improves printing efficiency and quality.
[0016] Below, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments of the present application. It should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings, rather than all of them.
[0017] Embodiment 1 Please see attached Figure 1 The present application provides a barcode variable code printing method, wherein the method is applied to a barcode variable code printing system, and the method specifically comprises the following steps: S1: receiving a variable code printing task, wherein the variable code printing task includes a barcode to be printed.
[0018] Specifically, receiving variable code printing tasks refers to receiving a task in the printing industry that requires printing products with different barcodes. These barcodes are usually unique and are used to identify products, track inventory, prevent counterfeiting or other purposes. Variable code means that the barcode of each product is different, which requires the printing process to be able to generate and print a large number of unique barcodes.
[0019] S2: performing variable code printing control constraint analysis on the barcode to be printed according to the variable code printing control variable optimization breadth, and establishing a variable code printing control constraint domain.
[0020] Specifically, the optimization breadth of variable code printing control variables refers to the scope of comprehensive consideration and optimization of various factors affecting printing quality during variable code printing. These factors include, but are not limited to, printing material properties, such as paper ink absorption, ink drying, color stability, etc. Printing equipment parameters, such as printing speed, printing pressure, ink supply, etc. Barcode design parameters, such as barcode type, size, color, contrast, etc. Environmental conditions, such as temperature, humidity, air cleanliness, etc. Among the variable code printing control variables, identify the key variables that have a direct impact on printing quality. For example, for barcode printing, the readability of the barcode, that is, the scanning success rate, is a key indicator, which is affected by multiple factors such as barcode design parameters, printing equipment parameters and environmental conditions. According to the key control variables, establish corresponding constraints. These constraints are equality constraints, such as the barcode design must meet certain standards or inequality constraints. For example, the printing speed must not be lower than a certain threshold. Based on the constraints, determine the value range of each key control variable, that is, the constraint range. This range takes into account various situations that may occur in the actual printing process, such as equipment accuracy, material performance fluctuations, etc. The constraints of each key control variable are integrated to form a complete variable code printing control constraint domain. This constraint domain should be able to cover all factors that may affect the printing quality and have sufficient flexibility and scalability to adapt to different printing needs.
[0021] S3: performing variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain, and obtaining a first variable code printing control particle group that meets a predetermined particle capacity constraint.
[0022] Specifically, each particle represents a set of possible printing control parameters, including but not limited to printing speed, printing pressure, ink concentration, etc. According to the specific printing equipment and process requirements, the dimension of the particle, that is, the number of parameters to be optimized, is determined. According to the predetermined particle capacity constraint, the size of the particle group, that is, the number of particles contained, is determined. The position of each particle is randomly initialized to ensure that they fall within the variable code printing control constraint domain. For example, for the printing speed, its initial value should be between [50, 100]. The speed of the particle can be randomly initialized.
[0023] S4: construct the fitness combing function of variable-code printing particles; Furthermore, the fitness combing function of the variable code printing particle is: ; Among them, Y represents the fitness of variable code printing particles, ρ represents the particle fitness combing factor, ρ is greater than 1, W1, W2, W3, W4, W5 represent the particle fitness combing weight conditions, W1, W2, W3, W4, W5 are all positive numbers, and the sum of W1, W2, W3, W4, W5 is 1, X represents the predicted variable code printing clarity coefficient, s represents the predicted variable code printing readability coefficient, j represents the predicted variable code printing accuracy coefficient, K represents the predicted variable code printing contrast coefficient, and C represents the predicted variable code printing efficiency coefficient.
[0024] Specifically, Y represents the fitness of variable code printing particles, that is, the comprehensive evaluation of printing quality under this set of control parameters. ρ is the particle fitness combing factor, which is used to adjust the sensitivity or importance of fitness; W1, W2, W3, W4, and W5 are particle fitness combing weight conditions, representing the weights of clarity, readability, accuracy, contrast, and efficiency, respectively, all of which are positive numbers and their sum is 1. X is the predicted variable code printing clarity coefficient, which can be obtained through simulation and represents the clarity level of printing. s is the predicted variable code printing readability coefficient, which represents the probability or success rate of the barcode being correctly read by the scanning device. j is the predicted variable code printing accuracy coefficient, which represents the accuracy of the barcode encoding or the accuracy of the printing position. K is the predicted variable code printing contrast coefficient, which represents the contrast between the barcode and its background, and has an important influence on the scanning success rate. C is the predicted variable code printing efficiency coefficient, including efficiency indicators such as printing speed and consumables usage.
[0025] S5: Establishing the variable code printing control particle variation constraint function; Furthermore, the variable code printing control particle variation constraint function is: ; in, Characterizes the number of particle mutations corresponding to the i-th variable code printing control particle, i is a positive integer, Characterizing the adaptability of the variable code printing particle corresponding to the i-th variable code printing control particle, Characterizes the lower limit of the current variable code printing particle fitness, Characterizes the upper limit of the current variable code printing particle fitness, Characterizes the upper limit of the number of particle mutations, Characterizes the lower limit of particle mutation number, It means round down.
[0026] Specifically, Characterizes the number of particle mutations corresponding to the i-th variable code printing control particle, i is a positive integer, Characterizing the adaptability of the variable code printing particle corresponding to the i-th variable code printing control particle, Characterizes the lower limit of the current variable code printing particle fitness, Characterizes the upper limit of the current variable code printing particle fitness, Characterizes the upper limit of the number of particle mutations, Characterizes the lower limit of particle mutation number, It means rounding down. The purpose of this function is to dynamically adjust the number of mutations according to the fitness value of the particle. The number of mutations can be dynamically adjusted according to the fitness of the particle, so as to more effectively explore the solution space and improve the convergence speed and solution quality of the algorithm.
[0027] S6: performing mutation optimization on the first variable code printing control particle group according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function to obtain a variable code printing control optimization result that meets the particle mutation optimization rule.
[0028] Specifically, according to the variable code printing control constraint domain, the first variable code printing control particle swarm is randomly initialized. Ensure that the parameter value of each particle is within the constraint domain. Use the variable code printing particle fitness combing function to calculate the fitness value of each particle. Determine the lower limit and upper limit of the fitness in the current particle swarm. According to the variable code printing control particle mutation constraint function, calculate the number of mutations of each particle. For each particle, mutate its parameter value according to the calculated number of mutations. The mutation method can be random perturbation, local search or other heuristic methods. Ensure that the mutated particle parameter value is still within the variable code printing control constraint domain. Replace the corresponding particles in the original particle swarm with the mutated particles. Recalculate the fitness value of the new particle swarm. Perform multiple iterations until a termination condition is met, such as reaching the maximum number of iterations, the fitness value is no longer significantly improved, etc. In each iteration, record the global optimal solution, that is, the particle with the highest fitness. After the iteration, the global optimal solution is the variable code printing control optimization result that meets the particle mutation optimization rule. This result contains a set of optimal printing control parameters, which can be used to guide the actual variable code printing process.
[0029] S7: Based on the variable code printing device, the variable code printing control optimization result is combined to perform variable code printing on the barcode to be printed.
[0030] Specifically, start the variable code printing equipment, and perform necessary preheating and calibration work to ensure that the equipment is in the best working condition. Check whether the equipment's consumables, such as ink, printing plates, etc., are sufficient, and replace or replenish insufficient consumables. Load the obtained variable code printing control optimization results, that is, the optimal printing control parameters, into the control system of the variable code printing equipment. Ensure that these parameters are correctly set to the corresponding parameter items of the equipment, such as printing speed, printing pressure, ink concentration, etc. Perform necessary preprocessing on the barcode data, such as format conversion, encoding conversion, etc. According to actual needs, design the barcode style, size, position and other parameters. Send the designed barcode data to the variable code printing equipment. The equipment automatically adjusts the printing parameters according to the loaded optimization results and the optimal printing control parameters, and starts variable code printing.
[0031] Furthermore, step S2 of the present application also includes: Collect variable printing control variable indicators of the variable printing device to obtain a first variable printing control variable set; perform down-coupling correction based on the first variable printing control variable set to obtain a second variable printing control variable set; perform variable printing control importance evaluation based on the second variable printing control variable set to obtain a variable printing control importance evaluation result set; arrange the second variable printing control variable set in descending order based on the variable printing control importance evaluation result set to obtain a third variable printing control variable set; perform optimization screening on the third variable printing control variable set based on the variable printing control variable optimization breadth to obtain a fourth variable printing control variable set, wherein the variable printing control variable optimization breadth includes a variable printing control variable optimization dimension threshold; perform variable constraint information collection on the variable printing device based on the fourth variable printing control variable set to generate the variable printing control constraint domain.
[0032] Specifically, sensors, meters or other measuring devices are used to collect multiple control variable indicators of variable printing equipment in real time, such as printing speed, ink concentration, printing pressure, temperature, etc. The collected data are sorted into a first variable printing control variable set, which contains all control variables that may affect printing quality. Since there may be a coupling relationship between control variables, that is, the change of one variable may affect the performance of other variables. Therefore, a decoupling correction is required to eliminate or reduce this influence. A more independent and representative second variable printing control variable set is obtained by using a decoupling method. Including principal component analysis, independent component analysis, etc. Using statistical analysis, machine learning and other methods, the importance of each variable in the second variable printing control variable set is evaluated. The results of the importance evaluation can be expressed in numerical values or levels, reflecting the degree of influence of each variable on printing quality. The evaluation results are sorted into a variable printing control importance evaluation result set. According to the variable printing control importance evaluation result set, the variables in the second variable printing control variable set are arranged in descending order. The arranged third variable printing control variable set is arranged from high to low according to the degree of influence of the variables on printing quality, which is convenient for subsequent optimization screening. According to the optimization breadth of the variable printing control variables, including the optimization dimension threshold, the third variable printing control variable set is optimized and screened. The optimization breadth determines the number of variables that need to be considered in the optimization process. If the optimization dimension threshold is small, only the most important variables are considered; if the threshold is large, more variables are considered. Through optimization algorithms such as genetic algorithms and particle swarm optimization algorithms, optimization is performed within the selected variable range to find the optimal variable combination, that is, the fourth variable printing control variable set. Based on the fourth variable printing control variable set, constraint information is collected for each variable of the variable printing device. This constraint information includes the value range, accuracy requirements, safety restrictions, etc. of the variables. With this information, a variable printing control constraint domain can be generated to provide clear restriction conditions for subsequent printing control. The collected variable constraint information is organized into a variable printing control constraint domain, which clarifies the value range, restriction conditions, etc. of each variable in the control process.
[0033] Furthermore, the present application also includes: According to the first variable-coding printing control variable set, pairwise coupling identification is performed to obtain a plurality of variable coupling coefficients; based on the plurality of variable coupling coefficients, the first variable-coding printing control variable set is classified in combination with a predetermined variable coupling coefficient to obtain a first variable-coding printing control variable cluster that is less than the predetermined variable coupling coefficient, and a second variable-coding printing control variable cluster that is greater than / equal to the predetermined variable coupling coefficient; according to the second variable-coding printing control variable cluster, variable fusion is performed to obtain a first corrected variable-coding printing control variable cluster; the first variable-coding printing control variable cluster and the first corrected variable-coding printing control variable cluster are added to the second variable-coding printing control variable set.
[0034] Specifically, statistical methods such as correlation analysis, covariance analysis, etc. or machine learning techniques such as neural networks, decision trees, etc. are used to identify the coupling between each variable in the first variable printing control variable set. The coupling coefficients between the variables are calculated, and these coefficients reflect the degree of mutual dependence or correlation between the variables. A predetermined variable coupling coefficient is set as a threshold by a person skilled in the art. It can be determined based on historical data or statistical tests. The variables in the first variable printing control variable set are classified according to the coupling coefficients between them. Variables less than the predetermined coupling coefficient are classified into the first variable printing control variable cluster, and variables greater than or equal to the predetermined coupling coefficient are classified into the second variable printing control variable cluster. For the variables in the second variable printing control variable cluster, since the coupling between them is high, it can be considered to be fused. The fusion method can be to calculate the weighted average of these variables, principal component analysis dimensionality reduction, or feature extraction using a machine learning algorithm. The fused variable set forms the first corrected variable printing control variable cluster. The first variable printing control variable cluster and the first corrected variable printing control variable cluster are merged to obtain an updated second variable printing control variable set. This updated set includes the variables with lower coupling in the original variables and the variables with higher coupling after fusion processing.
[0035] Furthermore, step S6 of the present application also includes: According to the variable printing particle fitness combing function, the fitness analysis of the first variable printing control particle group is performed to obtain the first variable printing particle fitness distribution; according to the first variable printing particle fitness distribution, the variable printing fitness maximization screening is performed on the first variable printing control particle group to determine the current variable printing control optimization result; according to the variable printing control particle mutation constraint function and the first variable printing particle fitness distribution, the first round of particle mutation quantity distribution corresponding to the first variable printing control particle group is calculated; based on the first round of particle mutation quantity distribution and the variable printing control constraint domain, the first variable printing control particle group is mutated to obtain a second variable printing control particle group; based on the second variable printing control particle group, according to the variable printing control constraint domain, the variable printing particle fitness combing function and the variable printing control particle mutation constraint function, the current variable printing control optimization result is iteratively optimized to obtain the variable printing control optimization result that meets the particle mutation optimization rule; wherein, the particle mutation optimization rule includes a particle mutation optimization round number threshold.
[0036] Specifically, the first variable printing control particle swarm is initialized, and each particle represents a potential variable printing control solution, with a position, i.e., the value of the control variable, and a speed. The size of the particle swarm, i.e., the number of particles and initial parameters, such as learning factor, inertia weight, etc., is determined. The fitness of each particle in the first variable printing control particle swarm is evaluated according to the variable printing particle fitness combing function, and its fitness value is calculated. The first variable printing particle fitness distribution is obtained, which helps to understand the performance distribution of the particle swarm in the search space. According to the first variable printing particle fitness distribution, the particles or particle swarms with the highest fitness are screened out, and these particles represent the best results of the current variable printing control optimization. The variable printing control particle mutation constraint function and the first variable printing particle fitness distribution are used to calculate the number of mutations required for each particle or particle subset in the first round. Based on the first round particle mutation number distribution and the variable printing control constraint domain, i.e., the value range of the control variable, the first variable printing control particle swarm is mutated. The mutation operation can be a random change in the position of the particle, or a more refined adjustment based on a certain strategy, such as Gaussian mutation, Cauchy mutation, etc. The mutated particle group forms the second variable code printing control particle group. Based on the second variable code printing control particle group, the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function are used to continue iterative optimization. In each iteration, the speed and position of the particle are updated, and its fitness value is re-evaluated. Repeat the iterative process until the particle mutation optimization round number threshold or other termination conditions in the particle mutation optimization rule are met, such as slow fitness improvement, reaching the maximum number of iterations, etc. When the termination condition is met, the final variable code printing control optimization result is output. This result is the control variable combination with the best fitness value found in the entire search space.
[0037] Furthermore, step S7 of the present application also includes: Obtain real-time variable code printing control data corresponding to the barcode to be printed; perform deviation depth evaluation on the real-time variable code printing control data based on the variable code printing control optimization result to obtain a variable code printing control deviation index; determine whether the variable code printing control deviation index is greater than / equal to a predetermined variable code printing control deviation index; if the variable code printing control deviation index is greater than / equal to the predetermined variable code printing control deviation index, generate a variable code printing warning signal.
[0038] Specifically, the real-time variable code printing control data corresponding to the barcode to be printed is obtained using sensors, measuring devices or directly from the control system of the variable code printing device. These data include key control parameters such as printing speed, printing pressure, ink concentration, temperature, etc. The obtained variable code printing control optimization result is used as a reference standard to evaluate the deviation depth of the real-time variable code printing control data. The difference between the real-time data and the target value or optimal value in the optimization result is compared. The deviation depth is quantified by calculating the deviation value, that is, the difference or deviation rate between the real-time data and the optimal value, that is, the percentage of the deviation value to the optimal value or a certain reference value. The calculated deviation value or deviation rate is integrated into a variable code printing control deviation index, which reflects the degree of deviation between the current printing condition and the ideal state. A predetermined variable code printing control deviation index is set by a technician in this field as a trigger condition for early warning. This threshold can be determined based on production requirements, quality standards or historical data. The variable code printing control deviation index calculated in real time is compared with a predetermined threshold. If the variable code printing control deviation index is greater than or equal to the predetermined variable code printing control deviation index, it means that the current printing condition has deviated from the ideal state and may affect the printing quality. In this case, a variable code printing early warning signal is generated. This signal can be sent in a variety of ways, such as an audible alarm, screen display, email or text message notification, etc. The early warning signal contains enough information so that operators can quickly identify the problem and take appropriate corrective actions.
[0039] In summary, the variable barcode printing method provided by the present application has the following technical effects: By receiving a variable code printing task, wherein the variable code printing task includes a barcode to be printed; performing variable code printing control constraint analysis on the barcode to be printed according to the variable code printing control variable optimization breadth, and establishing a variable code printing control constraint domain; performing variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain, and obtaining a first variable code printing control particle group that meets a predetermined particle capacity constraint; constructing a variable code printing particle fitness combing function; establishing a variable code printing control particle variation constraint function; and determining a variable code printing control particle variation constraint function according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle variation constraint function. The function performs mutation optimization on the first variable code printing control particle group to obtain a variable code printing control optimization result that meets the particle mutation optimization rule; based on the variable code printing equipment, the barcode to be printed is variable code printed in combination with the variable code printing control optimization result, which effectively solves the problem that the prior art lacks an accurate variable code printing control strategy, resulting in inaccurate variable code adjustment during the printing process, and is unable to quickly and effectively find the optimal printing parameters, further affecting the quality and printing efficiency of the barcode, achieving high-quality variable code printing, ensuring that the printed products meet actual needs and quality requirements, optimizing printing parameters and equipment status, and improving printing efficiency and quality.
[0040] Embodiment 2 Based on the same inventive concept as the barcode variable code printing method in the aforementioned embodiment, the present application also provides a barcode variable code printing system, please refer to the attached Figure 2 , the system comprising: The task receiving module 11 is used to receive a variable code printing task, wherein the variable code printing task includes a barcode to be printed.
[0041] The control constraint domain establishing module 12 is used to perform variable code printing control constraint analysis on the barcode to be printed according to the variable code printing control variable optimization breadth, and establish the variable code printing control constraint domain.
[0042] The control particle group acquisition module 13 is used to make a variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain, and obtain a first variable code printing control particle group that meets a predetermined particle capacity constraint.
[0043] The fitness function building module 14 is used to build a fitness combing function for variable-code printing particles. The fitness combing function for variable-code printing particles is: ; Among them, Y represents the fitness of variable code printing particles, ρ represents the particle fitness combing factor, ρ is greater than 1, W1, W2, W3, W4, W5 represent the particle fitness combing weight conditions, W1, W2, W3, W4, W5 are all positive numbers, and the sum of W1, W2, W3, W4, W5 is 1, X represents the predicted variable code printing clarity coefficient, s represents the predicted variable code printing readability coefficient, j represents the predicted variable code printing accuracy coefficient, K represents the predicted variable code printing contrast coefficient, and C represents the predicted variable code printing efficiency coefficient.
[0044] The constraint function building module 15 is used to establish a variable code printing control particle variation constraint function, and the variable code printing control particle variation constraint function is: ; in, Characterizes the number of particle mutations corresponding to the i-th variable code printing control particle, i is a positive integer, Characterizing the adaptability of the variable code printing particle corresponding to the i-th variable code printing control particle, Characterizes the lower limit of the current variable code printing particle fitness, Characterizes the upper limit of the current variable code printing particle fitness, Characterizes the upper limit of the number of particle mutations, Characterizes the lower limit of particle mutation number, It means round down.
[0045] The optimization result acquisition module 16 is used to perform mutation optimization on the first variable code printing control particle group according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function to obtain the variable code printing control optimization result that meets the particle mutation optimization rules.
[0046] The variable code printing module 17 is used to perform variable code printing on the barcode to be printed based on the variable code printing device and in combination with the variable code printing control optimization result.
[0047] Furthermore, the control constraint domain establishing module 12 in the system is also used for: Collect variable printing control variable indicators of the variable printing device to obtain a first variable printing control variable set; perform down-coupling correction based on the first variable printing control variable set to obtain a second variable printing control variable set; perform variable printing control importance evaluation based on the second variable printing control variable set to obtain a variable printing control importance evaluation result set; arrange the second variable printing control variable set in descending order based on the variable printing control importance evaluation result set to obtain a third variable printing control variable set; perform optimization screening on the third variable printing control variable set based on the variable printing control variable optimization breadth to obtain a fourth variable printing control variable set, wherein the variable printing control variable optimization breadth includes a variable printing control variable optimization dimension threshold; perform variable constraint information collection on the variable printing device based on the fourth variable printing control variable set to generate the variable printing control constraint domain.
[0048] Furthermore, the control constraint domain establishing module 12 in the system is also used for: According to the first variable-coding printing control variable set, pairwise coupling identification is performed to obtain a plurality of variable coupling coefficients; based on the plurality of variable coupling coefficients, the first variable-coding printing control variable set is classified in combination with a predetermined variable coupling coefficient to obtain a first variable-coding printing control variable cluster that is less than the predetermined variable coupling coefficient, and a second variable-coding printing control variable cluster that is greater than / equal to the predetermined variable coupling coefficient; according to the second variable-coding printing control variable cluster, variable fusion is performed to obtain a first corrected variable-coding printing control variable cluster; the first variable-coding printing control variable cluster and the first corrected variable-coding printing control variable cluster are added to the second variable-coding printing control variable set.
[0049] Furthermore, the optimization result acquisition module 16 in the system is also used for: According to the variable printing particle fitness combing function, the fitness analysis of the first variable printing control particle group is performed to obtain the first variable printing particle fitness distribution; according to the first variable printing particle fitness distribution, the variable printing fitness maximization screening is performed on the first variable printing control particle group to determine the current variable printing control optimization result; according to the variable printing control particle mutation constraint function and the first variable printing particle fitness distribution, the first round of particle mutation quantity distribution corresponding to the first variable printing control particle group is calculated; based on the first round of particle mutation quantity distribution and the variable printing control constraint domain, the first variable printing control particle group is mutated to obtain a second variable printing control particle group; based on the second variable printing control particle group, according to the variable printing control constraint domain, the variable printing particle fitness combing function and the variable printing control particle mutation constraint function, the current variable printing control optimization result is iteratively optimized to obtain the variable printing control optimization result that meets the particle mutation optimization rule; wherein, the particle mutation optimization rule includes a particle mutation optimization round number threshold.
[0050] Furthermore, the variable code printing module 17 in the system is also used for: Obtain real-time variable code printing control data corresponding to the barcode to be printed; perform deviation depth evaluation on the real-time variable code printing control data based on the variable code printing control optimization result to obtain a variable code printing control deviation index; determine whether the variable code printing control deviation index is greater than / equal to a predetermined variable code printing control deviation index; if the variable code printing control deviation index is greater than / equal to the predetermined variable code printing control deviation index, generate a variable code printing warning signal.
[0051] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. Figure 1 The variable code printing method and specific examples of a barcode in the first embodiment are also applicable to the variable code printing system of a barcode in the present embodiment. Through the detailed description of the variable code printing method of a barcode, those skilled in the art can clearly know the variable code printing system of a barcode in the present embodiment, so for the sake of brevity of the specification, it will not be described in detail here. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0052] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0053] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.
Claims
1. A barcode variable code printing method, It is characterized in that The method comprises: Receiving a variable code printing task, wherein the variable code printing task includes a barcode to be printed; According to the optimization breadth of variable code printing control variables, the variable code printing control constraint analysis is performed on the barcode to be printed, and a variable code printing control constraint domain is established; Performing variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain to obtain a first variable code printing control particle group that meets a predetermined particle capacity constraint; Construct the fitness combing function of variable-code printing particles; Establish the particle variation constraint function for variable code printing control; According to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function, the first variable code printing control particle group is mutated and optimized to obtain a variable code printing control optimization result that meets the particle mutation optimization rule; Based on the variable code printing equipment, the variable code printing control optimization result is combined to perform variable code printing on the barcode to be printed.
2. A barcode variable code printing method as claimed in claim 1, It is characterized in that According to the optimization breadth of variable code printing control variables, the variable code printing control constraint analysis is performed on the barcode to be printed, and a variable code printing control constraint domain is established, including: Collecting variable indexes of variable printing control variables of the variable printing device to obtain a first variable printing control variable set; Performing down-coupling correction according to the first variable-code printing control variable set to obtain a second variable-code printing control variable set; Performing variable code printing control importance evaluation according to the second variable code printing control variable set to obtain a variable code printing control importance evaluation result set; Arrange the second variable code printing control variable set in descending order according to the variable code printing control importance evaluation result set to obtain a third variable code printing control variable set; The third variable-coding printing control variable set is optimized and screened according to the variable-coding printing control variable optimization breadth to obtain a fourth variable-coding printing control variable set, wherein the variable-coding printing control variable optimization breadth includes a variable-coding printing control variable optimization dimension threshold; The variable constraint information of the variable printing device is collected based on the fourth variable printing control variable set to generate the variable printing control constraint domain.
3. A barcode variable code printing method as claimed in claim 2, It is characterized in that Performing decoupling correction according to the first variable code printing control variable set to obtain a second variable code printing control variable set includes: Performing pairwise coupling identification according to the first variable code printing control variable set to obtain a plurality of variable coupling coefficients; Based on the plurality of variable coupling coefficients, the first variable printing control variable set is classified in combination with a predetermined variable coupling coefficient to obtain a first variable printing control variable cluster that is less than the predetermined variable coupling coefficient and a second variable printing control variable cluster that is greater than / equal to the predetermined variable coupling coefficient; Perform variable fusion according to the second variable-coding printing control variable cluster to obtain a first corrected variable-coding printing control variable cluster; The first variable coding printing control variable cluster and the first corrected variable coding printing control variable cluster are added to the second variable coding printing control variable set.
4. A barcode variable code printing method as claimed in claim 1, It is characterized in that The fitness combing function of the variable code printing particle is: ; Among them, Y represents the fitness of variable code printing particles, ρ represents the fitness combing factor of particles, ρ is greater than 1, W 1 , W 2 , W 3 , W 4 , W 5 Characterize the particle fitness combing weight condition, W 1 , W 2 , W 3 , W 4 , W 5 are all positive, and W 1 , W 2 , W 3 , W 4 , W 5 The sum of is 1, X represents the predicted variable code printing clarity coefficient, s represents the predicted variable code printing readability coefficient, j represents the predicted variable code printing accuracy coefficient, K represents the predicted variable code printing contrast coefficient, and C represents the predicted variable code printing efficiency coefficient.
5. A barcode variable code printing method as claimed in claim 1, It is characterized in that The variable code printing control particle variation constraint function is: ; in, Characterizes the number of particle mutations corresponding to the i-th variable code printing control particle, i is a positive integer, Characterizing the adaptability of the variable code printing particle corresponding to the i-th variable code printing control particle, Characterizes the lower limit of the current variable code printing particle fitness, Characterizes the upper limit of the current variable code printing particle fitness, Characterizes the upper limit of the number of particle mutations, Characterizes the lower limit of particle mutation number, It means round down.
6. A barcode variable code printing method as claimed in claim 1, It is characterized in that According to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function, the first variable code printing control particle group is mutated and optimized to obtain a variable code printing control optimization result that meets the particle mutation optimization rule, including: Performing fitness analysis on the first variable code printing control particle group according to the variable code printing particle fitness combing function to obtain a first variable code printing particle fitness distribution; According to the first variable code printing particle fitness distribution, the first variable code printing control particle group is screened for maximum variable code printing fitness, and a current variable code printing control optimization result is determined; Calculating the first round of particle mutation quantity distribution corresponding to the first variable code printing control particle group according to the variable code printing control particle mutation constraint function and the first variable code printing particle fitness distribution; Based on the first round of particle mutation quantity distribution and the variable code printing control constraint domain, mutating the first variable code printing control particle group to obtain a second variable code printing control particle group; Based on the second variable code printing control particle group, the current variable code printing control optimization result is iteratively optimized according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function to obtain the variable code printing control optimization result that meets the particle mutation optimization rule; The particle mutation optimization rule includes a particle mutation optimization round number threshold.
7. A barcode variable code printing method as claimed in claim 1, It is characterized in that Based on the variable code printing device, the variable code printing is performed on the barcode to be printed in combination with the variable code printing control optimization result, including: Obtaining real-time code-changing printing control data corresponding to the barcode to be printed; Based on the variable code printing control optimization result, the real-time variable code printing control data is evaluated for deviation depth to obtain a variable code printing control deviation index; Determining whether the variable code printing control deviation index is greater than / equal to a predetermined variable code printing control deviation index; If the variable code printing control deviation index is greater than / equal to the predetermined variable code printing control deviation index, a variable code printing early warning signal is generated.
8. A barcode variable code printing system, It is characterized in that For implementing the steps of the method according to any one of claims 1 to 7, the system comprises: A task receiving module, the task receiving module is used to receive a variable code printing task, wherein the variable code printing task includes a barcode to be printed; A control constraint domain establishment module, the control constraint domain establishment module is used to perform variable code printing control constraint analysis on the barcode to be printed according to the variable code printing control variable optimization breadth, and establish a variable code printing control constraint domain; A control particle group acquisition module, the control particle group acquisition module is used to make a variable code printing control decision on the barcode to be printed according to the variable code printing control constraint domain, and obtain a first variable code printing control particle group that meets a predetermined particle capacity constraint; A fitness function building module, wherein the fitness function building module is used to build a fitness combing function for variable code printing particles; A constraint function building module, wherein the constraint function building module is used to establish a variable code printing control particle variation constraint function; An optimization result acquisition module, the optimization result acquisition module is used to perform mutation optimization on the first variable code printing control particle group according to the variable code printing control constraint domain, the variable code printing particle fitness combing function and the variable code printing control particle mutation constraint function, to obtain a variable code printing control optimization result that meets the particle mutation optimization rule; The variable code printing module is used to perform variable code printing on the barcode to be printed based on the variable code printing device and in combination with the variable code printing control optimization result.
Citation Information
Cited By
Package monitoring system based on intelligent factory
CN121032480A
A packaging monitoring system based on a smart factory
CN121032480B
