Label printing management method, system and equipment and storage medium

By generating directed acyclic diagrams and real-time monitoring of printer status, the confusion of label printing tasks is solved, efficient and reliable label printing management is achieved, and production continuity and product quality are ensured.

CN120447844APending Publication Date: 2025-08-08CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510531736.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, label printing management lacks systematicity, resulting in disorderly label printing tasks, difficult to track and solve problems in a timely manner, and cannot ensure production continuity and product quality traceability.

Method used

By generating directed acyclic graphs, we can clarify the dependencies and execution order of label services, execute services in parallel, monitor printer status in real time, use the LSTM model to predict printer status and issue early warnings.

Benefits of technology

It significantly shortens the label printing processing time, improves production continuity and reliability, ensures product quality traceability, reduces downtime caused by failures, and improves overall efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120447844A_ABST
    Figure CN120447844A_ABST
Patent Text Reader

Abstract

The invention relates to the field of printing management, and discloses a label printing management method, system and device and a storage medium, the method comprises the steps that a label printing task is acquired, the label printing task comprises a plurality of labels to be printed, and each label carries corresponding task information; generating a directed acyclic graph of each label according to a dependency relationship of each label between the task information and various preset services; performing topology analysis on each directed acyclic graph, and determining an execution sequence of each service of each label; and executing the services of the labels in parallel according to the execution sequence, and if any label is monitored to execute the printing service and the current printer meets the preset printing state, printing the labels. According to the method, the services of the labels are executed in parallel, so that the service execution sequence errors of the labels are avoided, the overall processing time is remarkably shortened, and the service states of the labels are conveniently monitored; meanwhile, the current printer is detected, potential faults can be found in time, and the response speed and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of printing management, and in particular to a label printing management method, system, device and storage medium. Background Art

[0002] Label printers are widely used in warehouse management, logistics tracking, asset management, retail pricing, industrial manufacturing and other fields. For example, in the automotive manufacturing field, the printing and management of vehicle labels are required to ensure product quality traceability and supply chain management.

[0003] In the related art, in the label printing management process, due to the lack of systematic management of label printing tasks, label printing tasks are in a chaotic and disordered state. During the execution of label printing tasks, it is difficult to effectively track label printing tasks. Once a problem occurs, it cannot be quickly located and solved in time, which is not conducive to timely and accurate processing of label printing tasks. Summary of the Invention

[0004] The embodiments of the present application provide a label printing management method, system, device and storage medium to solve the technical problem in the related art that batch label printing tasks cannot be effectively supervised during the label printing management process.

[0005] An embodiment of the present application provides a label printing management method, which includes: obtaining a label printing task, where the label printing task includes multiple labels to be printed, and each label carries corresponding task information; generating a directed acyclic graph of each label based on the dependency relationship between the task information of each label and various preset services, wherein the preset services include the order in which each service of each type of label is executed during the printing process, and the category of the label is determined by the task information; performing a topological analysis on each directed acyclic graph to determine the execution order of each service of each label; executing each service of each label in parallel according to the execution order, and printing the label if it is monitored that any label executes the printing service and the current printer meets the preset printing status.

[0006] In one embodiment of the present application, a directed acyclic graph of each label is generated based on the dependency relationship between the task information of each label and the preset various services, including: presetting the label printing task as data preparation, label generation, hardware status detection, software status detection, label printing and task recording to obtain the preset various services; determining the task type corresponding to the task information in each label, determining the service dependency relationship between the preset various services according to the task type of the label, and generating a directed acyclic graph of the service topology for each label based on the service dependency relationship.

[0007] In one embodiment of the present application, a directed acyclic graph of each label with respect to the service topology is generated based on the service dependency relationship, including: performing traversal detection on the service dependency relationship; if there is a circular dependency in the service dependency relationship, generating a correction factor for the dependency relationship, correcting the current service dependency relationship in response to the correction factor, and obtaining a new service dependency relationship to determine a directed acyclic graph of each label with respect to the service topology; if there is no circular dependency in the service dependency relationship, generating a directed acyclic graph of each label with respect to the service topology based on the service dependency relationship.

[0008] In one embodiment of the present application, a topological analysis is performed on a directed acyclic graph to determine the execution order of each service for each label, including: performing a topological analysis on the directed acyclic graph to calculate the first in-degree value of each service; taking the service corresponding to the first in-degree value of zero as the starting service; along the topological flow direction of the starting service, deleting the in-degree nodes corresponding to the current service and the edge lengths corresponding to the in-degree nodes one by one, and recalculating the second in-degree value of any current service in the directed acyclic graph; if the second in-degree value corresponding to any current service is zero, it is determined that any current service has only one execution order; if the second in-degree value corresponding to any current service is not zero, it is determined that any current service has multiple execution orders; or, if there are multiple second in-degree values that are the same, and the in-degree direction source is If the nodes correspond to the same service, the execution order of multiple services at the current moment is the same, and any one service is selected as the optimal node at the current moment; if there are multiple second in-degree values with different values, and the in-degree direction comes from the node corresponding to the same service, the service with the smallest second in-degree value is selected as the optimal node at the current moment; delete the in-degree node corresponding to the optimal node at the current moment and the edge length corresponding to the in-degree node, and recalculate the third in-degree value in the directed acyclic graph; delete through at least one iteration, and if the third in-degree value at the current moment is zero, the service corresponding to the optimal node at the current moment is selected as the next execution order; repeatedly iterate and calculate the in-degree value of the next service in turn until the execution order of each service for each label is determined.

[0009] In one embodiment of the present application, if any tag is monitored to execute a printing service and the current printer meets the preset printing status, it includes: obtaining historical status data, the historical status data includes the hardware status, software status and environment status at each historical moment; constructing a long short-term memory network, training the long short-term memory network based on the historical status data, and determining a state prediction model; using the state prediction model to predict the printer status at the current moment and determine various types of status data; comparing the various types of status data with preset thresholds, and determining the printing status of the printer at the current moment based on the comparison results.

[0010] In one embodiment of the present application, before obtaining historical status data, it includes: preprocessing the collected historical status data, the preprocessing including at least one of cleaning, filling missing values, normalization and feature extraction; wherein the hardware status includes printer temperature, paper sensor status, carbon ribbon sensor status, printer power status, print task queue length and print speed; the software status includes error code and log information; the environmental status includes ambient temperature, humidity temperature and equipment service life.

[0011] In one embodiment of the present application, the various types of status data are compared with preset thresholds, and the printing status of the printer at the current moment is determined based on the comparison results, including: if the temperature status data in the various types of status data exceeds the preset temperature threshold, a high temperature warning is issued; if the number of errors in the various types of status data exceeds the preset error number threshold, a fault warning is issued; if the remaining paper amount in the various types of status data is less than the preset remaining paper amount threshold, a paper supply warning is issued; if the remaining carbon ribbon amount in the various types of status data is less than the preset remaining carbon ribbon amount threshold, a carbon ribbon supply warning is issued; if the power status in the various types of status data is less than the preset power status threshold, a power abnormality warning is issued; if the print task queue length in the various types of status data exceeds the preset print task queue length threshold, a queue abnormality warning is issued; if the print speed in the various types of status data exceeds the preset print speed threshold, a print speed abnormality warning is issued; if the error code in the various types of status data is the same as the preset error code, an error warning is issued; if the log information in the various types of status data is the same as the preset log information, a log abnormality warning is issued; if none of the above situations occurs in the comparison result, it is determined that the printing status of the printer at the current moment meets the preset printing status.

[0012] An embodiment of the present application also provides a label printing management system, which includes: a task acquisition module for acquiring label printing tasks, where the label printing tasks include multiple labels to be printed, and each label carries corresponding task information; an acyclic graph determination module for generating a directed acyclic graph for each label based on the dependency relationship between the task information of each label and the preset types of services, where the preset types of services include the order in which each type of label is executed during the printing process, and the category of the label is determined by the task information; a sequence determination module for performing topological analysis on each directed acyclic graph to determine the execution order of each service for each label; a printing management module for executing each service of each label in parallel according to the execution order, and printing the label if it is monitored that any label is executed to the printing service and the current printer meets the preset printing status.

[0013] An embodiment of the present application further provides an electronic device, comprising a memory for storing a label printing management program; and a processor for implementing a method of any one of the above embodiments when executing the label printing management program.

[0014] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method of any of the above embodiments is implemented.

[0015] In the scheme implemented by the label printing management method, system, device and storage medium provided above, the label printing management method obtains labels and generates a directed acyclic graph for each label based on the dependency relationship between the task information of each label and the preset services, thereby clarifying the dependency relationship between services; performs topological analysis on the directed acyclic graph to determine the execution order of each service for each label to avoid errors in the execution order of each label service; executes each service of each label in parallel according to the execution order, and if any label is monitored to execute the printing service and the current printer meets the preset printing status, the label is printed; on the one hand, by executing each service of each label in parallel, the overall processing time is significantly shortened; at the same time, it is convenient to monitor the service status of each label; on the other hand, the current printer is detected and various states of the printer are monitored in real time, which can timely discover potential faults and improve response speed and reliability. The early warning mechanism reduces downtime caused by printer failure, avoids interruption of label printing production, and ensures production continuity and smooth supply chain management; on the other hand, through accurate label printing and management, product quality traceability is ensured, and the efficiency, reliability and stability of vehicle barcode label printing are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 An exemplary system architecture diagram of a label printing management system that can be applied to an embodiment of the present application;

[0018] Figure 2 A flowchart of the label printing management method provided in an embodiment of the present application;

[0019] Figure 3 A schematic diagram of a label in the label printing management method provided in an embodiment of the present application;

[0020] Figure 4 A label printing management diagram in the label printing management method provided in an embodiment of the present application;

[0021] Figure 5A directed acyclic graph in the label printing management method provided in an embodiment of the present application;

[0022] Figure 6 A schematic diagram of the structure of the label printing management system provided in an embodiment of the present application;

[0023] Figure 7 A system structure diagram of the label printing management system provided in an embodiment of the present application;

[0024] Figure 8 A schematic structural diagram of an electronic device in one embodiment of the present application;

[0025] Figure 9 Another structural diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0027] In order to enable those skilled in the art to better understand the improvements of the technical solution provided by the present disclosure, the present disclosure briefly introduces the implementation scenarios and related information of the label printing management method in the related art.

[0028] See also Figure 1 , shows an exemplary system architecture diagram of a label printing management system that can be applied according to an embodiment of the present application. The implementation environment includes a terminal, wherein the terminal integrates a camera and corresponding drivers and a graphics card. The terminal can be a desktop computer (server) 101, a smart phone 102, a tablet computer 103, a laptop computer 104, a smart TV, a wearable device, etc. Figure 2 In the description, the terminal is described as a printing device management terminal, but this is not a limitation.

[0029] Below, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0030] As mentioned previously, effective label printing task tracking is crucial during the printing process, ensuring that any issues can be quickly located and resolved. Furthermore, traditional label printing systems lack a mechanism for real-time printer status monitoring and feedback. Consequently, printer failures cannot be detected and addressed promptly, leading to production interruptions, severely impacting efficiency, and increasing costs.

[0031] In view of this, the embodiment of the present application provides a label printing management method, system, device and storage medium. Taking the printing device management terminal as an example, the label printing management method is executed. Figure 2 , Figure 2 A flowchart of a label printing management method provided in an embodiment of the present application, the method comprising the following steps:

[0032] Step S201: Obtain a label printing task, which includes multiple labels to be printed, each label carrying corresponding task information;

[0033] Specifically, the label printing task can be sent by the printing device management terminal, and the label printing task submitted by the user is received. The task contains multiple labels to be printed and their task information. For example, the task information includes but is not limited to the supplier code, batch code, serial number end code, serial number start code, hardware version, node serial number, software version, component status code, and component type code.

[0034] For example, by parsing the task information, metadata for each tag is extracted. For example, task information can be stored in formats such as JSON (Lightweight Data Interchange Format) or XML (Extensible Markup Language) to ensure scalability. For another example, if a user selects a predefined tag template, such as a full vehicle tag, default task information is automatically populated.

[0035] Step S202: generating a directed acyclic graph of each tag based on the dependency between the task information of each tag and various preset services, wherein the preset services include the order in which the services are executed during the printing process for each type of tag, and the type of the tag is determined by the task information;

[0036] Specifically, graph-theoretic algorithms (such as adjacency lists) are used to store DAG (directed acyclic graph) structures, and service dependency rules are defined through a rule engine or configuration files. For example, the task information for each tag is traversed to identify service dependencies. For example, "data acquisition" must be completed before "printing." When constructing the DAG, nodes represent services, and edges represent dependency directions. For example, A→B means that service B can only be executed after service A is completed.

[0037] Step S203: Perform topological analysis on each directed acyclic graph to determine the execution order of each service for each tag;

[0038] Specifically, topological sorting is achieved using an in-degree-based topological sorting algorithm or depth-first search, and parallel tasks are managed through priority queues. For example, high-priority tags are executed first, and the DAG is topologically sorted to generate a service execution sequence, such as A, B, and C. If there are multiple independent starting nodes A1 and A2, these multiple starting nodes A1 and A2 are executed in parallel. This ensures that services are executed in the order of their dependencies, avoiding logical errors. Furthermore, by executing services for each tag in parallel, processing efficiency is significantly improved.

[0039] Step S204 , executing the services of the labels in parallel according to the execution order. If it is monitored that any label has executed the printing service and the current printer meets the preset printing status, the label is printed.

[0040] Specifically, a thread pool or asynchronous task queue is used to manage parallel execution, and a heartbeat mechanism or callback function is used to monitor printer status. For example, each label service is started in the order of execution, supporting multi-threading / process parallelism. Simultaneously, printer status, such as paper, ink, and idle status, is monitored in real time. When a label executes the print service and the printer meets the conditions, printing is immediately triggered.

[0041] In addition, based on the above, printing efficiency can also be improved by storing the tasks to be printed in a queue and processing them in batches when the printer is idle.

[0042] Through the above method, the use of parallel execution and dynamic scheduling of tasks can greatly shorten the processing time; it can also reduce the printer idle rate and improve the utilization of processor / memory; thus, the overall processing time is significantly shortened; at the same time, it is convenient to monitor the service status of each label; the current printer is tested and the various states of the printer are monitored in real time, which can timely discover potential faults and improve the response speed and reliability. The early warning mechanism reduces the downtime caused by printer failure, avoids the interruption of label printing production, and ensures the continuity of production and smooth supply chain management; through accurate label printing and management, the quality traceability of the product is ensured, and the efficiency, reliability and stability of vehicle barcode label printing are significantly improved.

[0043] In one embodiment, in order to decompose complex label printing tasks into manageable service units, clarify the dependencies between services, and ensure the correctness of the task execution order; task execution efficiency is optimized through service topology modeling to reduce resource idleness and task conflicts.

[0044] To solve the above technical problems, a directed acyclic graph is generated for each tag based on the dependency between the task information and various preset services, including:

[0045] The operation services of label printing tasks are preset as data preparation, label generation, hardware status detection, software status detection, label printing and task recording, and various preset services are obtained;

[0046] Determine the task type corresponding to the task information in each tag, determine the service dependency between the preset services based on the task type of the tag, and generate a directed acyclic graph of the service topology for each tag based on the service dependency.

[0047] Service partitioning reduces coupling, facilitating independent development and maintenance. Standardized interfaces, such as JSON, are used to define service input and output formats to ensure inter-service compatibility. Predefined rules or decision trees are used to match task types with service dependencies. Machine learning is used to train models based on historical task data to automatically infer dependencies. Alternatively, topological sorting algorithms based on in-degree or depth-first search can be used to generate DAGs using topological sorting.

[0048] For example, the label printing task is broken down into six major services, as detailed below:

[0049] Data preparation: Obtain and pre-process label data. For example, obtain the data required for the vehicle barcode label of this application from the print task management module: "hardware version number", "software version number", "node serial number", "supplier code", "part type code", "part status code", and "batch code".

[0050] Label generation: Generate label content based on data, in the form of QR code, barcode, text layout, etc. The label is expressed in the form of Figure 3 shown.

[0051] Hardware status detection: Check the hardware status of the printer, such as paper, ribbon, print head, etc.

[0052] Software status detection: Check the software status of the printer, such as error codes, log information, etc.; verify the system environment such as driver version and permission configuration.

[0053] Label Printing: Sends the generated labels to the printer for actual printing.

[0054] Task log: Confirms whether the task is completed successfully and records relevant logs, such as success status / failure status and timestamp.

[0055] The above services are defined as a preset service set, and the task information of each label, such as data source, print format, and priority, is analyzed to determine its task type, such as "urgent printing" or "batch printing".

[0056] For example, define service dependency rules based on task type; "urgent printing" requires "hardware status detection" and "label printing" to be executed first. "Batch printing" requires "data preparation" and "label generation" to be completed first, and then the status is unified. Based on the service dependency relationship, build a DAG for each label:

[0057] Nodes represent services, such as "data preparation" and "label printing." Edges represent dependency directions, such as "data preparation" → "label generation." Perform topological sorting on the DAG to ensure there are no cyclic dependencies.

[0058] Through the above method, modular services are used for division, which reduces the complexity of preset services and improves the reuse rate of preset services; service topology modeling is used to optimize task execution efficiency, reduce resource idleness and task conflicts, and DAG topology sorting is used to optimize the execution order and shorten the task processing time; hardware / software status detection is used to reduce resource idleness and improve printer utilization.

[0059] In one embodiment, traditional methods are difficult to efficiently identify cycles in complex dependencies. How to detect and correct circular dependencies in service dependencies and ensure that the generated service topology is a directed acyclic graph to avoid deadlocks or logical errors during task execution is a technical problem that needs to be solved urgently.

[0060] To solve the above problems, a directed acyclic graph of the service topology for each label is generated based on service dependencies, including:

[0061] Perform traversal detection on service dependencies;

[0062] If there is a circular dependency in the service dependency, a correction factor of the dependency is generated, and the current service dependency is corrected in response to the correction factor to obtain a new service dependency to determine a directed acyclic graph of each label with respect to the service topology;

[0063] If there is no circular dependency in the service dependency, a directed acyclic graph of the service topology for each label is generated based on the service dependency.

[0064] For example, the service dependency relationship is represented as a directed acyclic graph, where nodes are services and edges are dependencies. A depth-first search or topological sorting algorithm is used to traverse the graph and detect whether there is a loop. If a circular dependency is detected, the loop path and the nodes involved are recorded. A correction factor is generated based on the loop path, and a correction strategy is defined, such as deleting edges, adjusting priorities, or introducing virtual nodes. The correction factor is applied to modify the dependency relationship to eliminate the loop. The embodiment of this application uses the deletion of incoming edges as an example.

[0065] Verify that the revised graph is still a directed acyclic graph. If so, perform a topological sort on the revised dependencies, generate a service execution sequence, and construct a directed acyclic graph, with nodes representing services and edges representing the revised dependencies. If the original dependencies are free of cycles, generate a directed acyclic graph directly.

[0066] Through the above method, the topological sorting algorithm of the directed acyclic graph is used to arrange the order of task execution to ensure that there will be no conflicts between tasks. Each task will not be executed until all its dependent tasks are completed, avoiding the task conflicts that may occur when multiple tasks are executed concurrently. In this way, it is also ensured that tasks are executed in the correct order, which improves the efficiency and reliability of the overall task execution. Through clear task dependencies and reasonable task scheduling, errors and duplication of work caused by task conflicts are reduced, and the stability and production efficiency of the system are improved.

[0067] In one embodiment, to ensure the accuracy of multi-path execution and the accuracy of execution order, topology analysis is used to determine the execution order of services in a directed acyclic graph, ensuring correct task dependencies and efficient execution. Complex dependencies between services, such as multi-path dependencies and shared dependencies, are handled to avoid execution order conflicts or deadlocks.

[0068] To solve the above technical problems, we perform a topological analysis on the directed acyclic graph to determine the execution order of each service for each tag, including:

[0069] Perform topological analysis on the directed acyclic graph and calculate the first in-degree value of each service;

[0070] The service corresponding to the first in-degree value of zero is used as the starting service;

[0071] Along the topological flow of the starting service, delete the in-degree nodes corresponding to the current service and the edge lengths corresponding to the in-degree nodes one by one, and recalculate the second in-degree value of any current service in the directed acyclic graph;

[0072] If the second in-degree value corresponding to any current service is zero, it is determined that any current service has only one execution order;

[0073] If the second in-degree value corresponding to any current service is not zero, it is determined that any current service has multiple execution orders; or, if there are multiple services with the same second in-degree value and the in-degree direction originates from the node corresponding to the same service, it is determined that the execution order of multiple services at the current moment is the same, and any one service is selected as the optimal node at the current moment; if there are multiple services with different second in-degree values and the in-degree direction originates from the node corresponding to the same service, the service with the smallest second in-degree value is selected as the optimal node at the current moment; delete the in-degree node corresponding to the optimal node at the current moment and the edge length corresponding to the in-degree node, and recalculate the third in-degree value in the directed acyclic graph; delete through at least one iteration, and if it is monitored that the third in-degree value at the current moment is zero, then the service corresponding to the optimal node at the current moment is selected as the next execution order; calculate the in-degree value of the next service in turn through multiple repeated iterations until the execution order of each service for each label is determined.

[0074] It should be understood that an indegree value of zero indicates that the service has no dependencies on other services and can be used as the execution starting point. The starting service is the initial node in the topological sort. Task execution is simulated by deleting the indegree edges of executed services. During the indegree iteration process, the indegree is recalculated after each deletion to ensure that dependencies are updated in real time. This process continues until the indegree value of the current service is reduced to zero, at which point the indegree value of the next service is calculated. In this way, through indegree source analysis and multiple iterations, the execution order of each service is determined one by one.

[0075] For example, the DAG is traversed to calculate the first in-degree value of each service, i.e., the number of edges pointing to the service; the service with a first in-degree value of zero is marked as the starting service; starting from the starting service, the current service and its in-degree edges are deleted one by one along the topological flow direction; if the topological flow direction has multiple representations, a certain service node currently has multiple first in-degree values; the in-degree values of the remaining services, i.e., the second in-degree values, are recalculated;

[0076] If the second indegree value of a service is zero, it indicates that the current service execution order is clear. If the second indegree value of a service is not zero, it is determined that it has multiple sources, that is, there are multiple indegree flows, indicating that there are multiple situations in the current execution order.

[0077] If multiple services have the same in-degree value and originate from the same node, then the execution order of these services is the same; record the execution order relationship to avoid conflicts; repeatedly calculate the in-degree values of the remaining services (i.e., services whose in-degree values have not returned to zero after the update), delete the in-degree edges of the remaining services one by one and update the in-degree values until the in-degree values of all services are determined to be zero. Based on the in-degree value changes and dependency relationships, the final execution order of each service is generated. That is, the execution order of each service can be determined by determining the order in which the in-degree values of the nodes corresponding to each service return to zero.

[0078] Through the above method, the accuracy of the execution order is ensured through dynamic in-degree update and multi-path dependency processing; at the same time, the "unique execution order" and "multiple execution orders" in the execution order are clearly distinguished to avoid order conflicts.

[0079] In one embodiment, in the related art, it is impossible to accurately predict the specific status of the printer based on historical data such as the hardware status, environmental status, and software status of the printer, resulting in the inability to promptly discover and avoid problems during the printing process. Therefore, there is an urgent need for a method to analyze the complex correlation between the multi-dimensional status data of the printer's hardware, software, environment, etc. to improve the accuracy of the predicted status.

[0080] To solve the above technical problems, if any label is monitored to execute the printing service and the current printer meets the preset printing status, including:

[0081] Obtain historical status data, which includes the hardware status, software status, and environment status at each historical moment;

[0082] Build a long short-term memory network, train the long short-term memory network based on historical state data, and determine the state prediction model;

[0083] Use the state prediction model to predict the current printer state and determine various state data;

[0084] The various status data are compared with preset thresholds, and the printing status of the printer at the current moment is determined according to the comparison result. The preset thresholds include threshold data corresponding to the various status data.

[0085] Specifically, by integrating hardware, software, and environmental data, comprehensive historical state data is constructed, while ensuring that data from different sources is aligned by timestamp. This allows for the collection of state data at multiple historical moments. The LSTM model captures long-term dependencies through a gating mechanism (input gate, forget gate, and output gate). By automatically learning the complex interactive patterns of hardware, software, and environmental states, the LSTM model infers the current state based on historical patterns without the need for additional labels. By outputting various pieces of state data reflecting corresponding state parameters, the model compares these various types of state data with preset thresholds, and uses the comparison results to determine whether the current printer meets the printing requirements.

[0086] Among them, LSTM (Long Short-Term Memory) is a special recurrent neural network that is specifically used to solve the gradient vanishing or gradient exploding problems of traditional recurrent neural networks when processing long sequences.

[0087] Exemplarily, historical status data is collected from channels such as printer logs, sensors, and monitoring systems. The historical status data includes but is not limited to hardware status, temperature, humidity, remaining consumables, motor speed, etc.; software status, driver version, task queue length, error log, etc.; environmental status, room temperature, humidity, network delay, etc.

[0088] By preprocessing the historical state data by cleaning, denoising, filling missing values, etc., the LSTM network structure is designed to include the input layer, i.e., the multi-dimensional state number; the LSTM layer, i.e., capturing time series dependencies; and the fully connected layer, i.e., outputting the prediction results.

[0089] For example, adjust hyperparameters such as the number of LSTM units and learning rate through cross-validation. Collect current hardware, software, and environmental status data;

[0090] The trained LSTM model is input and outputs the predicted status, such as the specific values of parameters such as temperature and consumables remaining. The prediction results are post-processed, such as smoothing and outlier detection. Thresholds are set for various status data, such as a temperature > 80°C is an abnormality and a consumables remaining < 10% is a warning.

[0091] Compare the predicted status data of a certain type of parameter with the corresponding preset threshold to generate status labels, such as "normal", "high temperature warning", "out of ink", etc., and determine the final printing status based on the label combination, such as "printable", "maintenance required", and "fault".

[0092] Through the aforementioned methods, comprehensive printer status data, including hardware, software, and environmental status, is collected through various means, including built-in sensors, network interfaces, log files, and external sensors. Real-time monitoring of the printer's various states enables timely detection of potential failures, improving system responsiveness and reliability. A state prediction model is used to predict printer status over a period of time and issue warnings before potential failures occur, significantly reducing production interruptions caused by printer failures. By setting appropriate thresholds, such as temperature, error count, and remaining paper / ribbon levels, the accuracy of warnings is ensured, allowing proactive action to avoid production interruptions.

[0093] In some embodiments, in the related technologies, there are large differences in the numerical types and semantics of hardware states, such as temperature and sensor states, and software states, such as error codes and logs; and sensor failures or incomplete log records may lead to data loss. Therefore, there is an urgent need to improve the integrity and accuracy of historical status data.

[0094] To solve the above technical problems, before obtaining historical status data, the following steps are included:

[0095] The collected historical status data is preprocessed, and the preprocessing includes at least one of cleaning, filling missing values, normalization and feature extraction; wherein the hardware status includes printer temperature, paper sensor status, carbon ribbon sensor status, printer power status, print task queue length and print speed; the software status includes error codes and log information; the environmental status includes ambient temperature, humidity temperature and equipment age.

[0096] For example, since the collected data may contain noise, missing values, and outliers, preprocessing is performed to improve the data quality. Common preprocessing steps include:

[0097] Cleaning: Remove invalid data points, such as duplicate records, obviously erroneous data, etc.

[0098] Filling missing values: For missing values, you can use interpolation, mean filling and other methods to complete them.

[0099] Normalization: Normalize data of different dimensions to ensure consistent numerical ranges and facilitate subsequent modeling.

[0100] Feature extraction: Extract useful features such as average temperature, maximum temperature change rate, number of consecutive errors, etc. to enhance the predictive ability of the model.

[0101] In the above-mentioned way, the multi-dimensional and heterogeneous problems of printer status data are solved through systematic data preprocessing.

[0102] In some embodiments, in the related art, since the printer status involves multiple data types such as temperature, paper, carbon ribbon, power supply, task queue, speed, error code, log, etc., its status cannot be accurately predicted.

[0103] To solve the above technical problems, various status data are compared with preset thresholds, and the current printing status of the printer is determined based on the comparison results, including:

[0104] If the temperature status data in each type of status data exceeds the preset temperature threshold, a high temperature warning is issued;

[0105] If the number of errors in various status data exceeds the preset error threshold, a fault warning will be issued;

[0106] If the remaining paper amount in each status data is less than the preset paper remaining amount threshold, a paper supply warning is issued;

[0107] If the remaining amount of carbon ribbon in various status data is less than the preset carbon ribbon remaining amount threshold, a carbon ribbon supply warning will be issued;

[0108] If the power status in each type of status data is less than the preset power status threshold, a power abnormality warning is issued;

[0109] If the print task queue length in various status data exceeds the preset print task queue length threshold, a queue abnormality warning is issued;

[0110] If the printing speed in various status data exceeds the preset printing speed threshold, a printing speed abnormality warning will be issued;

[0111] If the error code in each type of status data is the same as the preset error code, an error warning will be issued;

[0112] If the log information in various status data is consistent with the preset log information, a log abnormality warning will be issued;

[0113] If none of the above situations occurs in the comparison result, it is determined that the current printing state of the printer meets the preset printing state.

[0114] Exemplarily, printer temperature sensor data, such as print head temperature and printer body temperature, is collected; the real-time temperature is compared with a preset temperature threshold, such as 80 degrees Celsius; if the threshold is exceeded, a high temperature warning is triggered, i.e., an alarm is sent to the operation and maintenance system.

[0115] Count the number of errors in the printer log, such as paper jams, ink shortages, and communication failures; compare the number of errors with a preset threshold, such as 5 times / hour; if the threshold is exceeded, trigger a fault warning and associate the error type.

[0116] The remaining amount of carbon ribbon is read from the carbon ribbon sensor data or the printer status report, and the remaining amount of carbon ribbon is compared with a preset carbon ribbon threshold value. For example, the preset carbon ribbon threshold value is 5%; if it is less than the threshold value, a carbon ribbon supply warning is triggered.

[0117] Collect power sensor data, such as voltage, current, and power factor; compare real-time power data with preset power thresholds; if out of range, trigger a power anomaly warning.

[0118] Get the print task queue length, for example, the number of pages to be printed; compare the queue length with a preset queue threshold, for example, the preset queue threshold is 100 pages; if it exceeds the threshold, trigger a queue abnormality warning.

[0119] Collect the actual printing speed of the printer, such as pages per minute; compare the actual printing speed with the preset printing speed threshold, such as the preset printing speed threshold maximum speed of 80 pages per minute; if it exceeds the threshold or fluctuates abnormally, trigger a speed abnormality warning.

[0120] If none of the status data triggers an early warning, the printer status is determined to be "normal", a normal status report is generated, and the timestamp and key status data are recorded. On the contrary, if any of the status data triggers an early warning, the printer status is determined to be "abnormal", an abnormal status report is generated, and the timestamp and key status data are recorded.

[0121] Through the above methods, through real-time monitoring and early warning mechanisms, faults can be discovered and handled in time before they occur, significantly improving the reliability and stability of the system; the early warning mechanism reduces downtime caused by printer failures, ensuring production continuity and smooth supply chain management; through accurate label printing and management, product quality traceability is ensured, improving overall product quality.

[0122] Through the intelligent management system, the automation of task management, task scheduling and real-time monitoring is achieved, which reduces manual intervention and improves production efficiency; by reducing the downtime and repair costs caused by printer failures, the overall operating costs are reduced and the economic benefits are improved; through real-time monitoring and early warning mechanisms, resources are rationally allocated and utilized, avoiding unnecessary waste and improving resource utilization.

[0123] In this embodiment, the introduction of an intelligent management system significantly improves the efficiency, reliability, and stability of vehicle barcode label printing. Specifically, through data persistence, intelligent task scheduling, and real-time monitoring and early warning mechanisms, not only do these solutions address the issues inherent in traditional label printing methods, such as error-prone manual information input, chaotic task management, and a lack of real-time monitoring, but they also significantly improve the system's overall performance and production efficiency. This application not only improves product quality traceability and supply chain management, but also significantly reduces production interruptions caused by printer failures, resulting in significant economic and social benefits.

[0124] In some embodiments, the present application implements a label printing management method, as detailed below:

[0125] Tasks can be various operational services, where tasks A, B, C, D, E, and F represent Figure 5 The nodes corresponding to each service, namely, service A, service B, service C, service D, service E, and service F, are not repeated here.

[0126] Task A is data preparation: Get the data required for the vehicle barcode label application from the printing task management module: "Hardware version number", "Software version number", "Node serial number", "Supplier code", "Part type code", "Part status code", "Batch code", see Figure 4 , which is a label printing management diagram in the label printing management method provided in an embodiment of the present application; wherein the task type is the task type.

[0127] Service B is for label generation: generating specific label content based on data.

[0128] Service C is a hardware status check: it checks the hardware status of the printer, such as paper, ribbon, print head, etc.

[0129] Service D is software status check: checks the software status of the printer, such as error codes, log information, etc.

[0130] Service E is label printing: sending the generated label to the printer for actual printing.

[0131] Service F is service completion confirmation: confirm whether the service is completed successfully and record relevant logs.

[0132] Each task (i.e., service) corresponding to a tag has its own specific dependencies. These dependencies together determine the order and method of service execution. The dependencies are as follows:

[0133] Service A->Service B; Service A->Service C; Service A->Service D;

[0134] Service B->Service E; Service B->Service C; Service B->Service D;

[0135] Service C->Service E; Service C->Service B; Service C->Service D;

[0136] Service D->Service E; Service D->Service B; Service D->Service C

[0137] Service E -> Service F.

[0138] In order to solve the task conflict problem that occurs when multiple services are executed concurrently, an intelligent sorting method is introduced for task scheduling. The topological sorting algorithm in graph theory is used to arrange the task execution order to ensure that there is no conflict between tasks.

[0139] The dependency relationship between printing tasks can be represented by a directed acyclic graph, where each node represents a service and the edges represent the dependency relationship between services.

[0140] See also Figure 5 , which is a directed acyclic graph in the label printing management method provided in the embodiment of the present application, is described in detail as follows:

[0141] A linear task execution order is obtained through the topological sorting algorithm, ensuring that each task is executed only after all its dependent tasks are completed. The steps of the topological sorting algorithm are as follows:

[0142] 1) In-degree calculation:

[0143] Calculate the in-degree of each task. In a directed acyclic graph, in-degree refers to the number of incoming edges of a node. Specifically, for a directed graph G = (V, E), where V is the set of nodes and E is the set of edges, the in-degree (v) of node u and node v∈V is defined as the number of edges pointing to the node, and ∣ is the separator.

[0144] indegree(v)=|{u|(u,v)∈E}|

[0145] 2) Select nodes with in-degree 0: Select all tasks with in-degree 0 as starting tasks;

[0146] V0=v|indegree(v)=0

[0147] 3) Delete the node and its edges: Delete the selected service node from the graph and update the in-degree values of the remaining tasks in the graph;

[0148] 4) Repeat the above process: Repeat the above process until all services are deleted, that is, the in-degree values of all services are updated to zero.

[0149] In the initial state, the first in-degree values calculated for the first time are: indegree(A) = 0, indegree(B) = 3, indegree(C) = 3, indegree(D) = 3, indegree(E) = 3, indegree(F) = 1;

[0150] For the first selection and update, select the node V0={A} with the first in-degree value of 0, which means that the current first execution order is service A. Then, delete the node and its edges: delete A, update the in-degree values of B, C, and D to 2, the in-degree value of E to 3 (the in-degree direction is service B, service C, and service D), and the in-degree value of F to 1 (the in-degree direction is service E). At this time, it means that the execution order of services B, C, and D is the same, and there are three situations for the second execution order.

[0151] For the second selection and update, if service A is the starting node, choose one of the three scenarios. For example, consider selecting service B. Since there is no service node with an in-degree of 0, the in-degrees of services B, C, and D are all 2. If service B is selected as the in-degree node and service B and its related in-degree edges are deleted, then the in-degree of service C is now 1 (with the in-degree direction being service D), the in-degree of service D is 1 (with the in-degree direction being service C), the in-degree of service E is 2 (with the in-degree direction being services C and D), and the in-degree of service F is 1 (with the in-degree direction being service E). Furthermore, services C and D are in-degrees to each other, and the corresponding service execution order is now A->B.

[0152] Next, during the third selection and update, the in-degree value of service C is 1 (the in-degree direction is service D), and the in-degree value of service D is also 1 (the in-degree direction is service C). Only one service node can be selected as the next service node of service B. For example, service C is selected as the next service node, and service C and the in-degree edges related to service C are deleted. At this time, the in-degree value of service D is 0, and the in-degree value of service E is 1 (the in-degree direction is service D). The current corresponding service execution order is A->B->C.

[0153] In the fourth selection and update, since the in-degree value of service D is 0 and the in-degree value of service E is 1 (the in-degree direction is service D), service D is selected as the next service node of service C, and service D and the in-degree edges related to service D are deleted. Currently, the in-degree value of service E is updated to 0, and the corresponding service execution order is A->B->C->D.

[0154] In the fifth selection and update, since the in-degree value of service E is 0 and the in-degree value of service F is 1 (the in-degree direction is service E), service E is selected as the next service node of service D. Service E and the in-degree edges related to service E are deleted. Currently, the in-degree value of service F is updated to 0, forming A->C->B->D->E.

[0155] Finally, since the in-degree value of the current service F is 0, service F and its related in-degree edges are deleted. The topology execution ends, and the sixth execution order is determined to be service F, forming A->C->B->D->E->F.

[0156] Similarly, according to the above logic, other execution logic between services can be determined.

[0157] For example, for A->B / C / D->E->F, since the order of the three intermediate tasks BCD is uncertain, the execution order includes:

[0158] A->B->C->D->E->F

[0159] A->B->D->C->E->F

[0160] A->C->B->D->E->F

[0161] A->C->D->B->E->F

[0162] A->D->B->C->E->F

[0163] A->D->C->B->E->F

[0164] In this way, we can ensure that tasks are executed in the correct order, avoid task conflicts, and improve the overall efficiency and reliability of the system. According to the results of topological sorting, tasks are executed in sequence to complete task scheduling.

[0165] Label printing is a crucial component of product quality traceability and supply chain management, particularly in modern industrial production. However, traditional label printing systems often lack real-time monitoring and early warning mechanisms for printer status, resulting in an inability to respond promptly to equipment failures, which in turn impacts production efficiency. To address this issue, this paper introduces a real-time printer status prediction and early warning mechanism based on machine learning and time series analysis. This mechanism collects and analyzes historical printer status data, uses an LSTM model to predict printer status over a period of time, and issues early warnings before potential failures occur, significantly improving system reliability and stability.

[0166] 1) Data collection and preprocessing

[0167] To achieve accurate status prediction, it is first necessary to obtain comprehensive and accurate status data from the printer. This data includes the following categories:

[0168] ① Hardware status: Print head temperature T(t): reflects the working temperature of the print head; Paper sensor status P(t): detects whether there is enough paper; Ribbon sensor status C(t): detects whether the ribbon is exhausted; Printer power status S(t): monitors whether the power supply is normal; Print task queue length Q(t): reflects the number of tasks currently to be printed; Print speed V(t): records the actual printing speed.

[0169] ② Software status: Error code E(t), records the error code generated by the printer; Log information L(t): saves the printer's log file.

[0170] ③Environmental conditions: ambient temperature T env (t) and humidity H env (t): affects printing results and equipment life; Equipment service life A(t): evaluates the degree of equipment aging.

[0171] In order to ensure the real-time and integrity of the data, the collected data is preprocessed to remove noise, missing values, and outliers, thereby improving the data quality. Common preprocessing steps include:

[0172] Cleaning: Remove invalid data points, such as duplicate records, obviously erroneous data, etc.

[0173] Filling missing values: For missing values, you can use interpolation, mean filling and other methods to complete them.

[0174] Normalization: Normalize data of different dimensions to ensure consistent numerical ranges and facilitate subsequent modeling.

[0175] Feature extraction: Extract useful features such as average temperature, maximum temperature change rate, number of consecutive errors, etc. to enhance the predictive ability of the model.

[0176] 2) LSTM model training

[0177] In order to meet the requirements of the LSTM model, time series data needs to be converted into a form suitable for input. Assume that there is historical state data X t , X t Including hardware status, software status and environment status, the status data at each time point t can be expressed as a vector:

[0178] X t =[T(t),P(t),C(t),S(t),Q(t),V(t),E(t),L(t),T env (t),H env (t),A(t)]

[0179] After data conversion is complete, an LSTM model is constructed. The LSTM model uses a gating mechanism (Gates) to capture long-range dependencies. Specifically, the LSTM unit contains an input gate (InputGate), a forget gate (ForgetGate), and an output gate (OutputGate). These gates control the flow of information using the sigmoid activation function.

[0180] Input gate: determines the importance of new input information.

[0181] Forget gate: determines how much information from the previous moment to retain.

[0182] Output gate: determines the output information of the current unit.

[0183] By introducing a gating mechanism, LSTM can effectively capture long-term dependencies in sequence data and is widely used in natural language processing, time series prediction, speech recognition and other fields.

[0184] 3) State prediction and threshold setting

[0185] Use the trained state prediction model to predict the printer state in the future. The prediction process involves inputting the latest state data into the model and outputting the specific value of the future state.

[0186] If the latest status data X latest , which is fed into the model for prediction:

[0187]

[0188] Among them, f is the trained LSTM model.

[0189] In order to determine whether a printer is malfunctioning, reasonable thresholds need to be set. For example, at least the following key parameters exist:

[0190] Temperature threshold: If the predicted temperature exceeds 80°C, a high temperature warning is issued.

[0191] T threshold =80℃

[0192] Error count threshold: If the same error occurs more than three times in a row, a fault warning will be issued.

[0193] E threshold =3

[0194] Paper / ribbon status: If the paper or ribbon is predicted to be running out, a replenishment reminder will be issued in advance.

[0195] P low_threshold =0.1 (the remaining paper is less than 10%)

[0196] C low_threshold =0.1 (the remaining amount of carbon ribbon is less than 10%)

[0197] For example, if the temperature threshold, error count threshold, paper status, and ribbon status are selected as the judgment conditions, the process of determining whether an early warning needs to be issued can be expressed as follows:

[0198]

[0199] Among them, 1 represents an alarm and 0 represents no alarm; it should be noted that the judgment condition is related to the type of status data, and the judgment condition can also be expanded to all types of status data.

[0200] 4) Early warning mechanism

[0201] Through scheduled tasks or event-driven methods, the latest status data of the printer is regularly obtained and input into the prediction model for real-time prediction; when the prediction result triggers any set threshold, an early warning notification is immediately issued.

[0202] 5) Recording and feedback

[0203] Each prediction and warning operation should be recorded in the log file to facilitate subsequent analysis and auditing; the log content includes: prediction time, prediction results, whether the warning is triggered, warning type and specific content

[0204] By introducing a real-time printer status prediction and early warning mechanism, this application not only improves the reliability and stability of the label printing system but also significantly reduces production interruptions caused by printer failures. This mechanism combines data collection, preprocessing, model training, status prediction, threshold setting, and early warning notifications to ensure the system's intelligence and automation.

[0205] In one embodiment, the present application provides a label printing management system, which is used to execute the label printing management method provided in any of the above embodiments. Figure 6 , Figure 6 A structural diagram of the label printing management system provided in the embodiment of the present application is shown as follows: Figure 6 As shown, the label printing management system includes a task collection module 601, an acyclic graph determination module 602, a sequence determination module 603 and a printing management module 604, wherein:

[0206] The task collection module 601 is used to obtain a label printing task. The label printing task includes multiple labels to be printed, and each label carries corresponding task information.

[0207] an acyclic graph determination module 602 for generating a directed acyclic graph for each tag based on the dependency relationship between the task information of each tag and various preset services, wherein the preset services include the order in which the services are executed during the printing process for each type of tag, and the type of the tag is determined by the task information;

[0208] The order determination module 603 is used to perform topological analysis on each directed acyclic graph to determine the execution order of each service for each tag;

[0209] The printing management module 604 is used to execute various services of various labels in parallel according to the execution order. If it is monitored that any label executes the printing service and the current printer meets the preset printing status, the label is printed.

[0210] Among them, see Figure 7 , is a system structure diagram of the label printing management system provided by the embodiment of the present application, which mainly includes a printing task management module, an intelligent task scheduling and conflict detection module, and a real-time monitoring and early warning module, which together constitute an intelligent vehicle barcode label printing management system, as detailed below:

[0211] The printing task management module is mainly used to manage the barcode label printing tasks for the entire vehicle. It loads the existing task list from the YAML (i.e., a highly readable format for expressing data serialization) file. The system supports adding, deleting, and modifying tasks. All operations are recorded in the YAML file to ensure data persistence.

[0212] For example, when the system starts, it automatically loads the existing print task list from a YAML file (equivalent to the task collection module). YAML files, with their concise and easy-to-read nature, provide a convenient way to store print task-related information. Once loaded, a drop-down box is initialized based on this task information. This drop-down box provides an intuitive interface for users to easily select existing tasks to view, modify, or directly execute print operations.

[0213] Data persistence is one of the key features of the print task management module. All operations related to adding, deleting, and modifying print tasks are instantly recorded in the YAML file. This ensures that even if the system fails or restarts, existing task information will not be lost, ensuring the continuity and stability of task management.

[0214] At the same time, to ensure data security, strict permission control is set for access to YAML files. Only authorized users can read and write files, effectively preventing data from being illegally tampered with or misoperated, ensuring the accuracy and integrity of printing task data, and providing solid data protection for the smooth progress of vehicle barcode label printing.

[0215] The Print Task Management module plays a fundamental and crucial role in the vehicle barcode label printing process within the intelligent management system. It is responsible for comprehensive, detailed, and efficient management of vehicle barcode label printing tasks, ensuring a smooth and accurate printing process. The Print Task Management module provides efficient, accurate, and reliable task management support for the vehicle barcode label printing process, effectively supporting the stable operation of the entire intelligent management system.

[0216] In the intelligent task scheduling and conflict detection module, it is equivalent to the acyclic graph determination module and the sequence determination module. It refers to the specific operations or steps that need to be performed in the label printing system. These tasks can be various operation services, including:

[0217] Among them, the printing management module includes a real-time monitoring and early warning module, which includes data collection and preprocessing. In order to achieve accurate status prediction, it is first necessary to obtain comprehensive and accurate status data from the printer.

[0218] To ensure the real-time and integrity of data, the following methods can be used to collect data:

[0219] Built-in sensors: Use the printer's built-in sensors to collect hardware status data; Network interface: Obtain printer status information through Socket (i.e., socket) or HTTP API (i.e., Hypertext Transfer Protocol Application Programming Interface) interface; Log file: Regularly read the printer's log file to extract useful information; External sensor: Install environmental sensors around the printer to collect environmental status data.

[0220] Since the collected data has problems such as noise, missing values and outliers, preprocessing is required to improve the data quality. Common preprocessing steps include: Cleaning: Remove invalid data points, such as duplicate records, obviously erroneous data, etc. Fill missing values: For missing values, interpolation, mean filling and other methods can be used to complete them. Normalization: Normalize data of different dimensions to ensure that the numerical range is consistent to facilitate subsequent modeling. Feature extraction: Extract useful features, such as average temperature, maximum temperature change rate, number of consecutive errors, etc., to enhance the predictive ability of the model.

[0221] In order to meet the requirements of the LSTM model, time series data needs to be converted into a form suitable for input. Assuming that there is historical status data, including hardware status, software status, and environmental status, the status data at each time point can be represented as a vector. The constructed LSTM model is trained using historical status data to determine the state prediction model.

[0222] The trained state prediction model is used to predict the printer state in the future. The prediction process involves inputting the latest state data into the model and outputting a specific value representing the future state.

[0223] The early warning mechanism regularly obtains the latest status data of the printer through scheduled tasks or event-driven methods, and inputs it into the prediction model for real-time prediction. When the prediction result triggers any set threshold, an early warning notification is immediately issued.

[0224] Recording and feedback: Each prediction and warning operation should be recorded in a log file to facilitate subsequent analysis and auditing. The log content includes: prediction time, prediction results, whether a warning was triggered, warning type and specific content.

[0225] In this embodiment, the introduction of a real-time printer status prediction and early warning mechanism not only improves the reliability and stability of the label printing system but also significantly reduces production interruptions caused by printer failures. This mechanism combines multiple steps, including data collection, preprocessing, model training, status prediction, threshold setting, and early warning notifications, ensuring the system's intelligence and automation.

[0226] In summary, the implementation of the label printing management system of this application has the following technical effects, which are detailed as follows:

[0227] First, through the print task management module, data persistence and permission control are achieved to ensure the security and integrity of task information; an intuitive operation interface is provided to facilitate user selection and management of tasks.

[0228] Second, through the intelligent task scheduling and conflict detection module, a topological sorting algorithm is used to ensure that tasks are executed in the correct order to avoid task conflicts; task dependencies are represented by a directed acyclic graph to ensure the orderliness and efficiency of task execution.

[0229] Third, through the real-time monitoring and early warning module, comprehensive data collection and preprocessing are carried out to ensure data quality and real-time performance. The state prediction model is trained using the LSTM model to predict the state and detect potential faults in advance. By setting reasonable thresholds and early warning logic, timely warnings are ensured before faults occur.

[0230] In this embodiment, not only are the problems existing in the traditional label printing method, such as the manual input of information being prone to errors, chaotic task management, and lack of real-time monitoring, solved, but the overall performance and production efficiency of the system are also greatly improved.

[0231] For the specific definition of the label printing management system, please refer to the definition of the label printing management method above and will not be repeated here. Each module in the above-mentioned label printing management system can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the electronic device in hardware form, or can be stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0232] In this embodiment, the label printing management system is essentially provided with multiple modules for executing the label printing management method in any of the above embodiments. The specific functions and technical effects can be referred to the above embodiments and will not be repeated here.

[0233] In one embodiment, an electronic device is provided. The electronic device may be a server, and its internal structure may be as shown in FIG. Figure 8 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the functions or steps on the server side of the above method are implemented.

[0234] In one embodiment, an electronic device is provided. The electronic device may be a client, and its internal structure diagram may be as follows: Figure 9 As shown. The electronic device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, the functions or steps of the client side of the above method are implemented.

[0235] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:

[0236] Get the label printing task, which contains multiple labels to be printed, and each label carries the corresponding task information; generate a directed acyclic graph for each label based on the dependency between the task information and the preset services of each label; perform topological analysis on the directed acyclic graph to determine the execution order of each service for each label; execute each service of each label in parallel according to the execution order, and print the label if any label is monitored to execute the printing service and the current printer meets the preset printing status.

[0237] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0238] Get the label printing task, which contains multiple labels to be printed, and each label carries the corresponding task information; generate a directed acyclic graph for each label based on the dependency between the task information and the preset services of each label; perform topological analysis on the directed acyclic graph to determine the execution order of each service for each label; execute each service of each label in parallel according to the execution order, and print the label if any label is monitored to execute the printing service and the current printer meets the preset printing status.

[0239] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or electronic device can be referred to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0240] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0241] Those skilled in the art will clearly understand that for the convenience and brevity of description, the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device or system can be divided into different functional units or modules to complete all or part of the functions described above.

[0242] The embodiments provided above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A label printing management method, characterized in that: The method comprises: Obtain a label printing task, wherein the label printing task includes multiple labels to be printed, and each label carries corresponding task information; Generate a directed acyclic graph of each tag based on the dependency relationship between the task information and various preset services for each tag; the various preset services include the order in which each service is executed during the printing process for each type of tag, and the type of the tag is determined by the task information; Performing a topological analysis on each of the directed acyclic graphs to determine the execution order of each of the services for each tag; The services of the labels are executed in parallel according to the execution order. If it is monitored that any of the labels has executed the printing service and the current printer meets the preset printing status, the label is printed.

2. The label printing management method according to claim 1, wherein: According to the dependency relationship between the task information and various preset services of each tag, a directed acyclic graph of each tag is generated, including: The service process of the label printing task is preset as data preparation, label generation, hardware status detection, software status detection, label printing and task recording, and various preset services are obtained; Determine the task type corresponding to the task information in each of the tags, determine the service dependency between the preset services according to the task type of the tag, and generate a directed acyclic graph of the service topology for each tag based on the service dependency.

3. The label printing management method according to claim 2, wherein: Generating a directed acyclic graph of each label about a service topology based on the service dependency relationship includes: Performing traversal detection on the service dependency relationship; If there is a circular dependency in the service dependency, a correction factor of the dependency is generated, and the current service dependency is modified in response to the correction factor to obtain a new service dependency to determine a directed acyclic graph of each label; If there is no circular dependency in the service dependency relationship, a directed acyclic graph of each of the labels is generated based on the service dependency relationship.

4. The label printing management method according to claim 1, wherein: Performing a topological analysis on each of the directed acyclic graphs to determine the execution order of each of the services for each tag includes: Performing topological analysis on each of the directed acyclic graphs, and calculating a first in-degree value of each of the services; Taking the service corresponding to the first in-degree value of zero as the starting service; Along the topological flow direction of the starting service, delete the in-degree nodes corresponding to the current service and the edge lengths corresponding to the in-degree nodes one by one, and recalculate the second in-degree value of any current service in the directed acyclic graph; If the second in-degree value corresponding to any of the current services is zero, it is determined that any of the current services has only one execution order; If the second in-degree value corresponding to any of the current services is not zero, it is determined that any of the current services has multiple execution orders; or, If there are multiple services with the same second in-degree value and the in-degree directions are from the node corresponding to the same service, the execution order of the multiple services at the current moment is determined to be the same, and one of the services is selected as the optimal node at the current moment; if there are multiple services with different second in-degree values and the in-degree directions are from the node corresponding to the same service, the service with the smallest second in-degree value is selected as the optimal node at the current moment; Deleting the in-degree node corresponding to the optimal node at the current moment and the edge length corresponding to the in-degree node, and recalculating the third in-degree value in the directed acyclic graph; After at least one iterative deletion, if it is detected that the third in-degree value at the current moment is zero, the service corresponding to the optimal node at the current moment is selected as the next execution order; The in-degree value of the next service is calculated in turn through multiple repeated iterations until the execution order of each service of each tag is determined.

5. The label printing management method according to claim 1, wherein: If any of the labels is monitored to execute the printing service and the current printer meets the preset printing status, including: Acquire historical status data, including hardware status, software status, and environment status at each historical moment; Constructing a long short-term memory network, training the long short-term memory network based on the historical state data, and determining a state prediction model; Using the state prediction model to predict the printer state at the current moment, and determining various state data; The various status data are compared with preset thresholds, and the printing status of the printer at the current moment is determined according to the comparison result. The preset thresholds include threshold data corresponding to the various status data.

6. The label printing management method according to claim 5, wherein: Before obtaining historical status data, include: The collected historical status data is preprocessed, and the preprocessing includes at least one of cleaning, filling missing values, normalization and feature extraction; wherein the hardware status includes printer temperature, paper sensor status, carbon ribbon sensor status, printer power status, print task queue length and print speed; the software status includes error code and log information; the environmental status includes ambient temperature, humidity temperature and equipment service life.

7. The label printing management method according to claim 6, wherein: Comparing the various status data with preset thresholds, and determining the current printing status of the printer according to the comparison results, includes: If the temperature status data in each type of status data exceeds the preset temperature threshold, a high temperature warning is issued; If the number of errors in each type of status data exceeds a preset error number threshold, a fault warning is issued; If the remaining paper amount in each type of status data is less than a preset remaining paper amount threshold, a paper supply warning is issued; If the remaining amount of carbon ribbon in each type of status data is less than the preset remaining amount threshold of carbon ribbon, a carbon ribbon replenishment warning is issued; If the power status in each type of status data is less than a preset power status threshold, a power abnormality warning is issued; If the print task queue length in each type of status data exceeds a preset print task queue length threshold, a queue abnormality warning is issued; If the printing speed in each type of status data exceeds a preset printing speed threshold, a printing speed abnormality warning is issued; If the error code in each type of status data is the same as the preset error code, an error warning is issued; If the log information in each type of status data is consistent with the preset log information, a log abnormality warning is issued; If none of the above situations occurs in the comparison result, it is determined that the printing state of the printer at the current moment meets the preset printing state.

8. A label printing management system, characterized in that: The label printing management system includes: A task acquisition module is used to obtain a label printing task, wherein the label printing task includes a plurality of labels to be printed, and each of the labels carries corresponding task information; an acyclic graph determination module, configured to generate a directed acyclic graph for each tag based on the dependency relationship between the task information and various preset services for each tag, wherein the various preset services include the order in which the services are executed during the printing process for each type of tag, and the type of the tag is determined by the task information; An order determination module, configured to perform topological analysis on each of the directed acyclic graphs to determine the execution order of each of the services for each tag; The printing management module is used to execute the services of the labels in parallel according to the execution order, and print the label if it is monitored that any label executes the printing service and the current printer meets the preset printing status.

9. An electronic device, characterized in that: The method comprises a memory for storing a label printing management program; and a processor for implementing the method according to any one of claims 1 to 7 when executing the label printing management program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.