Multi-source data fusion label content automatic generation method and system
By monitoring PLC signals and integrating multi-source data through configuration monitoring software, labels are generated and printed, solving the problems of low label printing efficiency, high error rate and difficulty in data integration in existing technologies, and realizing automation, accuracy and continuous production of label printing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies for label printing suffer from low efficiency, high error rates, strong reliance on personnel, and an inability to flexibly integrate multi-source heterogeneous data, leading to interruptions in label generation and difficulties in quality traceability.
The system uses configuration monitoring software to listen to the PLC's trigger signals, automatically collects and integrates multi-source data, performs data verification, and generates label content. It communicates with the human-machine interface via the Modbus TCP protocol to achieve automation and fault tolerance in label printing.
It achieves a high degree of automation, accuracy, and zero error in label printing, ensuring the accuracy of label information and the continuity of production, improving the efficiency and traceability of the production line, and reducing maintenance costs.
Smart Images

Figure CN121832867A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of label printing technology, and more specifically, to a method and system for automatically generating label content through multi-source data fusion. Background Technology
[0002] In modern manufacturing, logistics warehousing, retail, and supply chain management, item identification and tracking are crucial. Currently, label printing operations in small and medium-sized enterprises, and even some large enterprises, generally follow two mainstream models, both of which have significant drawbacks: 1. Pure manual operation mode: Operators need to query and retrieve data from multiple independent information systems. For example, they need to find order information from Enterprise Resource Planning (ERP) systems, obtain work order status and production data from Manufacturing Execution Systems (MES), copy material codes from Product Data Management (PDM) systems, and even extract customer-specific requirements from Excel spreadsheets or emails. Subsequently, operators need to manually input this scattered data into dedicated label design software (such as Bartender or LabelView), splicing, layout, and generating the final label content before driving the printer to output it. This method is inherently inefficient, has a high error rate, and is highly dependent on human intervention. A simple input error can render an entire batch of labels unusable. If incorrect labels enter the market, it can trigger serious quality traceability issues, causing huge economic losses and reputational damage.
[0003] 2. Semi-automated but rigid scripting model: To improve efficiency, some companies develop simple scripts or programs to automatically read data from a single database (such as an MES database) and generate tags. However, this approach has serious limitations: Single data source and fragmented information: Such systems typically can only interface with a single fixed data source, and cannot flexibly integrate and merge heterogeneous data from multiple sources such as ERP, MES, WMS (warehouse management system), and external API interfaces (such as customer order systems). When the tag content needs to be determined by data from multiple systems, this system is powerless.
[0004] Lack of intelligence and fault tolerance: Existing simple scripts lack complex data validation and logical processing capabilities. When a data source becomes temporarily unavailable, returns an abnormal value, or the data format is incompatible, the system often directly reports an error and terminates, without attempting to activate a backup data source or execute preset fault-tolerant logic, causing the printing process to be interrupted and affecting production cycle time. Summary of the Invention
[0005] The purpose of this application is to provide a method and system for automatically generating label content based on multi-source data fusion. This system can handle multi-source heterogeneous data and ensure that the core label printing function can continue to operate even when some subsystems experience temporary failures through data verification.
[0006] This application is implemented as follows: Firstly, this application provides a method for automatically generating tag content through multi-source data fusion, comprising the following steps: S1, Event Listening: The configuration monitoring software is used to monitor the status changes of the preset trigger address in the programmable logic controller (PLC) in real time. When a valid trigger signal is detected, S2 is executed. S2. Data Acquisition: The configuration monitoring software reads real-time data related to trigger signals from the programmable logic controller (PLC) and extracts keywords for correlation queries from the real-time data; the keywords include product ID or order number. S3. Fusion Judgment: The configuration monitoring software initiates a query to the MySQL database based on keywords to obtain relevant business data; and merges and verifies the validity of real-time data from the programmable logic controller (PLC) and business data from MySQL according to preset rules. S4. Tag Generation: The configuration monitoring software calls the preset tag template and automatically fills the complete dataset after fusion and verification in S3 into the predetermined position of the tag template to generate the final tag content. S5. Drive printing: Use configuration monitoring software to send the generated label content to the designated label printer to complete the automatic printing of labels; S6. Feedback Record: The printing completion signal is fed back to the programmable logic controller (PLC) to control the production line operation. At the same time, the key information of this printing is extracted and recorded in the MySQL database for traceability and query. The key information includes printing time, printing content and printing result.
[0007] Based on the first aspect, real-time data is transmitted from the programmable logic controller (PLC) to the human-machine interface (HMI). After address mapping and binding by the HMI, the data is then transmitted to the configuration monitoring software via the Modbus TCP protocol.
[0008] Based on the first aspect, the Modbus TCP protocol uses function code 04 to transmit the register address mapping after being bound to the human-machine interface to the KingSCADA software.
[0009] Based on the first aspect, the steps for validating real-time data and business data include: The measurement leak rate of real-time data and business data is obtained. It is valid if the measurement leak rate is lower than the preset leak rate threshold.
[0010] Based on the first aspect, the programmable logic controller (PLC) is used to provide real-time status data of the production process and receive control commands; the real-time status data includes sensor signals, equipment status, and counting signals; the actuators include conveyor belts and robotic arms.
[0011] Based on the first aspect, the MySQL database is used to store structured business data associated with the production process, including product specifications, order information, production process parameters, and customer information.
[0012] Secondly, this application provides a multi-source data fusion-based automatic tag content generation system, which includes: A programmable logic controller (PLC) is used to provide real-time status data of the production process and receive control commands. The human-machine interface connects to the programmable logic controller (PLC) and is used to map and bind the PLC register addresses. A MySQL database used to store structured business data associated with the production process; The KingSCADA server communicates with the human-machine interface and the MySQL database respectively, and is used to perform event listening, data acquisition, fusion judgment, tag generation, driver printing and feedback recording. The label printer connects to the KingSCADA server to receive and print the generated label content.
[0013] Thirdly, this application provides an electronic device, comprising: Memory, used to store one or more programs; processor; The above method is implemented when one or more programs are executed by the processor.
[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0015] Compared with the prior art, this application has at least the following advantages or beneficial effects: High degree of automation and high efficiency: Automatic triggering by the programmable logic controller (PLC) status replaces tedious manual searching and input operations, greatly improving the efficiency of label printing and the production line cycle time.
[0016] Data accuracy and zero errors: It avoids errors that may be caused by manual input, ensures that the information on the label (especially key data such as serial number and batch number) matches the physical product perfectly, and achieves accurate traceability.
[0017] Powerful system integration and flexibility: It can handle multi-source heterogeneous data and seamlessly connect the industrial control layer (programmable logic controller PLC), information management layer (MySQL), and human-machine interaction layer (touch screen). Through the configuration capabilities of the configuration monitoring software, it can quickly adapt to complex needs such as product changes and process adjustments, and has low maintenance costs.
[0018] High reliability and robustness: Built-in data verification and fault tolerance mechanisms ensure that the core label printing function can continue to operate even when some subsystems experience temporary failures, thus guaranteeing production continuity. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating a method for automatically generating tag content through multi-source data fusion, as described in this application. Figure 2 This is a schematic diagram of the structure of a multi-source data fusion automatic tag content generation system according to this application; Figure 3 This is a schematic diagram of the structure of an electronic device according to this application.
[0021] icon: 1. Programmable Logic Controller (PLC); 2. Human-Machine Interface (HMI); 3. MySQL Database; 4. KingSCADA Server; 5. Label Printer; 6. Processor; 7. Memory; 8. Communication Interface. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0023] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the various embodiments and features described below can be combined with each other. Example
[0024] This application provides a method and system for automatically generating label content based on multi-source data fusion. It can process heterogeneous data from multiple sources and ensure that the core label printing function can continue to operate even when some subsystems experience temporary failures through data verification.
[0025] Please refer to Figure 1 This method for automatically generating tag content through multi-source data fusion includes the following steps: S1, Event Listening: The configuration monitoring software is used to monitor the status changes of the preset trigger address in the programmable logic controller (PLC) in real time. When a valid trigger signal is detected, S2 is executed. Specifically, KingSCADA software is preferred for configuration monitoring. By listening to specific signals from the programmable logic controller (PLC) in real time (such as when a sensor detects that a product has arrived), the software replaces manual button pressing or visual judgment, achieving unmanned and precise start-up of the process.
[0026] S2. Data Acquisition: The configuration monitoring software reads real-time data related to trigger signals from the programmable logic controller (PLC) and extracts keywords for correlation queries from the real-time data; the keywords include product ID or order number. Specifically, data (such as product serial numbers and batch numbers) is read directly from the programmable logic controller (PLC) that controls the production equipment, ensuring the authenticity, accuracy, and timeliness of the core information on the labels and eliminating errors that may occur during manual transcription. Keywords such as "product ID" or "order number" are automatically extracted from real-time data, providing accurate and unique query criteria for retrieving more information from the database later.
[0027] S3. Fusion Judgment: The configuration monitoring software initiates a query to the MySQL database based on keywords to obtain relevant business data; and merges and verifies the validity of real-time data from the programmable logic controller (PLC) and business data from MySQL according to preset rules. Specifically, by combining real-time data from the PLC with business data from MySQL, the generated label information is upgraded from a simple production identifier to a data carrier carrying rich business attributes. Validation through preset rules can detect data anomalies or logical errors before printing, preventing erroneous labels from entering production and playing a role in pre-emptive quality control, reducing rework and waste.
[0028] S4. Tag Generation: The configuration monitoring software calls the preset tag template and automatically fills the complete dataset after fusion and verification in S3 into the predetermined position of the tag template to generate the final tag content. Specifically, pre-set templates ensure that the format, layout, and information items of all labels are completely consistent, conforming to enterprise specifications or industry standards. Automatic filling replaces manual typesetting and input, greatly improving generation efficiency and eliminating human formatting errors. Templates can easily integrate QR codes, barcodes, and multi-field text, meeting the needs of modern traceability and logistics management. Dynamic data filling makes each label unique and information-complete.
[0029] S5. Drive printing: Use configuration monitoring software to send the generated label content to the designated label printer to complete the automatic printing of labels; Specifically, software commands directly drive the printer, completing the final link from data to physical product, achieving a fully automated closed loop, and reducing operator intervention.
[0030] S6. Feedback Record: The printing completion signal is fed back to the programmable logic controller (PLC) to control the production line operation. At the same time, the key information of this printing is extracted and recorded in the MySQL database for traceability and query. The key information includes printing time, printing content and printing result.
[0031] Specifically, a closed-loop production control system is formed: the printing completion signal is fed back to the PLC, which can automatically trigger the next action on the production line (such as release or diversion), allowing the information flow to control the material flow in reverse, achieving truly flexible automated control. Key information such as time, content, and results are recorded in a database, creating a complete digital twin file for each product. In the event of a quality problem, it can be quickly and accurately traced back to the source of production, meeting the stringent requirements of quality management systems (such as ISO9001) and industry regulations, greatly improving product traceability and quality management levels.
[0032] Furthermore, real-time data is transmitted from the programmable logic controller (PLC) to the human-machine interface (HMI). After address mapping and binding by the HMI, the data is then transmitted to the configuration monitoring software via the Modbus TCP protocol.
[0033] Specifically, in existing technologies, configuration software communicates directly with the PLC, requiring direct configuration of the PLC's complex register addresses. When the PLC model changes or address planning is adjusted, tedious low-level configuration must be re-performed in the configuration software, resulting in a large workload and a high risk of errors. This embodiment introduces a human-machine interface (such as a touchscreen) as an intermediate layer and data proxy. All low-level communication with the PLC (address mapping, binding) is completed on the touchscreen. The configuration software no longer needs to concern itself with the PLC's low-level addresses; it only needs to communicate with the touchscreen via a standard protocol. The benefits include: when the PLC needs to be replaced or its internal addresses adjusted, only the mapping relationship needs to be reconfigured on the touchscreen; no changes are required to the configuration software. This reduces system maintenance complexity and improves adaptability to hardware changes. The adoption of a standard industrial protocol (Modbus TCP) ensures the universality and reliability of communication.
[0034] Preferably, the Modbus TCP protocol uses function code 04 to transmit the register address mapping after binding with the human-machine interface to the KingSCADA software.
[0035] Further steps for validating real-time and business data include: The measurement leak rate of real-time data and business data is obtained. It is valid if the measurement leak rate is lower than the preset leak rate threshold.
[0036] Specifically, the leakage rate refers to the packet loss rate, signal sampling missing rate, or deviation rate from the expected data frequency during data acquisition. By setting a scientific leakage rate threshold, an objective and measurable engineering standard is provided for data validity. This avoids subjective judgments and standardizes and automates the data verification process. Only data with a leakage rate within an acceptable range is considered "valid," ensuring that data entering subsequent processes has basic integrity guarantees.
[0037] Furthermore, the programmable logic controller (PLC) is used to provide real-time status data of the production process and receive control commands; preferably, the real-time status data includes sensor signals, equipment status, and counting signals; the actuators include conveyor belts and robotic arms.
[0038] Furthermore, the MySQL database is used to store structured business data associated with the production process. Preferably, the structured business data includes product specifications, order information, production process parameters, and customer information.
[0039] This application also provides a multi-source data fusion-based automatic tag content generation system, which includes: The programmable logic controller (PLC1) is used to provide real-time status data of the production process and receive control commands. Specifically, real-time status data includes sensor signals, equipment status, and counting signals; actuators include conveyor belts and robotic arms; the PLC directly connects to sensors, equipment, and actuators (conveyor belts, robotic arms), acquiring real-time status data with millisecond-level response and high reliability. By receiving "print complete" commands from the configuration server, the system directly controls the start and stop of the conveyor belt and the movement of the robotic arm, forming a closed loop of "information decision-making - physical execution," ensuring strict synchronization between production actions and information flow.
[0040] Human-machine interface 2 is connected to the programmable logic controller (PLC) and is used to map and bind the PLC register addresses. Specifically, the human-machine interface includes a touchscreen; it maps and binds the complex internal register addresses of the PLC into standardized variables or labels that are easy for configuration software to understand. When the PLC model is changed or the program address is modified, the mapping only needs to be reconfigured on the touchscreen, without modifying the upper-level configuration server program, which greatly improves the maintainability and flexibility of the system.
[0041] MySQL database 3 is used to store structured business data associated with the production process; Specifically, structured business data includes product specifications, order information, production process parameters, and customer information. By centrally managing product specifications, order information, and process parameters, the labels are provided with rich static or semi-static business background information that extends beyond the production site, making the labels an information fusion encompassing production and management. As a storage center for logs and records, it records detailed information about each printing job (time, content, and result), providing a data foundation for enterprises to establish comprehensive and searchable digital quality traceability archives.
[0042] The KingSCADA server 4 communicates with the human-machine interface and the MySQL database respectively, and is used to perform event listening, data acquisition, fusion judgment, tag generation, driver printing and feedback recording. Specifically, KingSCADA Server 4 acts as the core hub, uniformly monitoring PLC events, collecting data, querying the database, performing fusion judgments, driving peripherals (printers), and providing feedback control signals. This enables the integration of multi-source information across hardware and software and the automated scheduling of complex business processes. Through its internal scripts or logic blocks, it performs data validity checks and business rule judgments, elevating simple data aggregation into an intelligent decision-making process with quality control capabilities.
[0043] Label printer 5 connects to the KingSCADA server to receive and print the generated label content.
[0044] Specifically, the label printer 5 accurately and quickly prints the electronic label content generated by the system, which contains multi-source fusion data, into a physical label that is affixed to the product, completing the last link in the information loop and serving as the physical carrier for product traceability.
[0045] Thirdly, this application provides an electronic device, comprising: Memory 7 is used to store one or more programs; Processor 6; Processor 6 is connected to memory 7 via communication interface 8; When one or more programs are executed by processor 6, all or some of the above methods are implemented.
[0046] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor 6, implements all or part of the methods described above.
[0047] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for automatically generating tag content through multi-source data fusion, characterized in that, Includes the following steps: S1, Event Listening: The configuration monitoring software is used to monitor the status changes of the preset trigger address in the programmable logic controller (PLC) in real time. When a valid trigger signal is detected, S2 is executed. S2. Data Acquisition: Real-time data related to the trigger signal is read from the programmable logic controller (PLC) using configuration monitoring software, and keywords for correlation query are extracted from the real-time data; the keywords include product ID or order number. S3. Fusion Judgment: The configuration monitoring software initiates a query to the MySQL database based on the keywords to obtain the relevant business data; and merges and verifies the validity of the real-time data from the programmable logic controller (PLC) and the business data from MySQL according to preset rules. S4. Tag Generation: The configuration monitoring software calls the preset tag template and automatically fills the complete dataset after fusion and verification in S3 into the predetermined position of the tag template to generate the final tag content. S5. Drive printing: Use configuration monitoring software to send the generated label content to the designated label printer to complete the automatic printing of labels; S6. Feedback Record: The printing completion signal is fed back to the programmable logic controller (PLC) to control the production line operation. At the same time, the key information of this printing is extracted and recorded in the MySQL database for traceability and query. The key information includes printing time, printing content and printing result.
2. The method for automatically generating tag content based on multi-source data fusion according to claim 1, characterized in that, The real-time data is transmitted from the programmable logic controller (PLC) to the human-machine interface (HMI). After address mapping and binding by the HMI, it is transmitted to the configuration monitoring software via the Modbus TCP protocol.
3. The method for automatically generating tag content based on multi-source data fusion according to claim 2, characterized in that, The Modbus TCP protocol uses function code 04 to transmit the register address mapping, which is bound to the human-machine interface, to the KingSCADA software.
4. The method for automatically generating tag content based on multi-source data fusion according to claim 1, characterized in that, The steps for validating real-time data and business data include: The measurement leak rate of real-time data and business data is obtained. It is valid if the measurement leak rate is lower than the preset leak rate threshold.
5. The method for automatically generating tag content based on multi-source data fusion according to claim 1, characterized in that, The programmable logic controller (PLC) is used to provide real-time status data of the production process and receive control commands; the real-time status data includes sensor signals, equipment status, and counting signals; the actuators include conveyor belts and robotic arms.
6. The method for automatically generating tag content based on multi-source data fusion according to claim 1, characterized in that, The MySQL database is used to store structured business data associated with the production process, including product specifications, order information, production process parameters, and customer information.
7. A system for automatically generating tag content through multi-source data fusion, characterized in that, include: A programmable logic controller (PLC) is used to provide real-time status data of the production process and receive control commands. The human-machine interface connects to the programmable logic controller (PLC) and is used to map and bind the PLC register addresses. A MySQL database used to store structured business data associated with the production process; The KingSCADA server is connected to the human-machine interface and the MySQL database respectively, and is used to perform event listening, data acquisition, fusion judgment, tag generation, driver printing and feedback recording. A label printer, connected to the KingSCADA server, is used to receive and print the generated label content.
8. An electronic device, characterized in that, include: Memory, used to store one or more programs; processor; When the one or more programs are executed by the processor, the method as described in any one of claims 1-6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.