Methods, devices, equipment and storage media for inventory management of recycled tobacco.

By acquiring data from the manufacturing execution system, performing preprocessing and feature association calculations, accurate accounting and real-time compliance control of recycled tobacco inventory management are achieved, solving the problems of human error and information silos in existing technologies, and adapting to the refined management of cigarette manufacturing.

CN122332976APending Publication Date: 2026-07-03HONGYUN HONGHE TOBACCO (GRP) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONGYUN HONGHE TOBACCO (GRP) CO LTD
Filing Date
2026-03-30
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing technologies, the management of recycled tobacco inventory generally relies on manual paper ledgers combined with offline manual accounting, which is prone to subjective errors and mistakes, and does not achieve deep two-way data interaction with the manufacturing execution system, thus forming information silos.

Method used

By acquiring production data from external manufacturing execution systems, performing data preprocessing and standardization, and using the LightGBM algorithm for multi-dimensional feature correlation calculations, inventory status is updated in real time and compliance verification is performed, thereby achieving real-time compliance control of the blending operation.

Benefits of technology

It enables accurate accounting of recycled tobacco inventory data and real-time compliant control of blending operations, adapts to the refined management requirements of cigarette manufacturing, reduces the risk of process execution deviations, and supports digital control of the cigarette manufacturing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332976A_ABST
    Figure CN122332976A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, equipment, and storage medium for inventory management of recycled tobacco, relating to the field of tobacco technology. This method addresses the core pain points of recycled tobacco inventory management by establishing a two-way data link with the manufacturing execution system (MES), constructing a full-process control system, and achieving accurate inventory data calculation and real-time compliant control of blending operations, adapting to the refined management needs of cigarette manufacturing. Step S1 provides a unified closed-loop basic data source to ensure consistent control benchmarks; Step S2 standardizes the processing of basic data to improve the quality of accounting data; Step S3 achieves dynamic updates of inventory time sequence to reduce discrepancies between accounts and actual inventory; Step S4 accurately calculates the blending ratio to provide a basis for compliant control; Step S5 completes pre-blending compliance verification to reduce the risk of process deviations; Step S6 achieves closed-loop execution of the process and data synchronization, supporting full-process traceability management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of tobacco technology, and in particular to a method, apparatus, equipment and storage medium for inventory management of recycled tobacco. Background Technology

[0002] In the cigarette manufacturing process, the reuse of recycled tobacco is a crucial step in reducing raw material loss, controlling cigarette production costs, and ensuring production continuity. Inventory management of recycled tobacco covers the entire process from warehousing, storage, outbound shipment, to re-blending. The accuracy, real-time nature, and closed-loop nature of its management data directly impact the accuracy of cost accounting, compliance of process execution, and traceability of finished product quality. It is a core component of tobacco production enterprises' efforts to achieve refined management and digital transformation in the tobacco processing stage, and is of great significance to achieving the industry's core goals of cost reduction, efficiency improvement, and compliant production.

[0003] Currently, the management of recycled tobacco inventory in the cigarette industry generally adopts a management model that combines manual paper ledger recording with offline manual accounting. After the operators perform physical operations, they manually record information such as tobacco brand, weight, and batch. The calculation of the blending ratio, inventory count, report generation, and quality traceability all rely on manual work, which is prone to subjective errors and mistakes. Although some companies have introduced simple digital recording tools, they have not yet achieved deep two-way data interaction with the manufacturing execution system, resulting in serious information silos. Summary of the Invention

[0004] The main purpose of this application is to provide a method, apparatus, equipment and storage medium for inventory management of recycled tobacco, so as to solve the problem that the existing management mode of inventory management of recycled tobacco, which generally adopts manual paper ledger records and offline manual accounting, is prone to subjective errors and mistakes.

[0005] To achieve the above objectives, this application provides the following technical solution: A method for managing the inventory of recycled tobacco, the method comprising: Step S1: Obtain the production batch, tobacco grade, process compliance threshold, and batch feeding data of the tobacco from the external manufacturing execution system to obtain a closed-loop production dataset; Step S2: Perform data preprocessing on the closed-loop production dataset to obtain a standardized control dataset; Step S3: Obtain the inbound and outbound operation events of tobacco shreds, and associate the standardized management dataset with the inbound and outbound operation events in a time series using a real-time inventory dynamic update model. Based on time series cumulative calculation, obtain the real-time updated inventory status time series data bound to the standardized management dataset. Step S4: Input the inventory status time series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time blending ratio value; Step S5: Compare the real-time blending ratio value with the corresponding grade process compliance threshold in the inventory status time series data in real time to obtain the compliance verification result and operation execution instruction; Step S6: Based on the compliance verification result and the operation execution instruction, perform the corresponding back-mixing operation process release or interception lock, obtain the full process operation log and archived data, and send them back to the external manufacturing execution system.

[0006] Beneficial effects of steps S1 to S6: This method addresses the core technical pain points in the management of recycled tobacco inventory by establishing a two-way data interaction link with the manufacturing execution system. It constructs a full-process control system from data acquisition to closed-loop feedback, enabling accurate accounting of recycled tobacco inventory data and real-time compliant control of blending operations. This adapts to the refined management requirements of cigarette manufacturing and provides effective support for the digital control of the cigarette manufacturing process.

[0007] Specifically, step S1 provides a unified closed-loop basic data source for the entire process control, ensuring the consistency of control benchmarks; step S2 performs standardized processing of basic data to improve the quality of basic data in subsequent accounting stages; step S3 realizes the time-series dynamic update of inventory status, reducing the deviation between inventory data and actual status; step S4 performs accurate calculation of the blending ratio, providing a reliable basis for compliance control; step S5 realizes pre-compliance verification of blending operations, reducing the risk of process execution deviations; and step S6 performs closed-loop execution of the control process and data synchronization, supporting traceable management of the entire process.

[0008] As a further improvement to this application, step S1 involves obtaining the production batch, tobacco grade, process compliance threshold, and batch feed data of the tobacco shreds from an external manufacturing execution system to obtain a closed-loop production dataset, including: Step S1.1: Establish a compliant communication session channel with the external manufacturing execution system through the standard API interface; Step S1.2: Extract the production batch, tobacco grade, process compliance threshold, and batch feeding data of the tobacco shreds from the external manufacturing execution system through the compliant communication session channel to obtain the original production data set; Step S1.3: Perform field integrity matching and data source tracing verification on the original production data set. After the verification is passed, the initial production dataset is obtained. Step S1.4: Obtain the real-time operation records of the external manufacturing execution system through the compliant communication session channel, and perform time-series alignment and matching with the initial production dataset to obtain the closed-loop production dataset.

[0009] Beneficial effects of steps S1.1 to S1.4: This series of steps establishes a compliant data interaction link with the external manufacturing execution system, and standardizes the acquisition and integration of basic data for the inventory management of recycled tobacco shreds, forming a unified closed-loop initial data source. This provides consistent and traceable benchmark data support for subsequent inventory accounting and management processes, and adapts to the basic data requirements for refined management and control of tobacco shred production.

[0010] Specifically, step S1.1 ensures the compliance and stability of data interaction with external manufacturing execution systems, providing a reliable link for data transmission; step S1.2 acquires the core basic data required for inventory control in a standardized manner, anchoring the core data dimensions required for control; step S1.3 verifies the integrity and traceability of the basic data, eliminates invalid data, and improves the reliability of the basic data; step S1.4 achieves time-series matching between the basic data and real-time operation records, forming a complete closed-loop production control dataset.

[0011] As a further improvement to this application, step S2 involves preprocessing the closed-loop production dataset to obtain a standardized control dataset, including: Step S2.1: Perform non-empty verification of key fields and format verification of numerical fields on the closed-loop production dataset to obtain a format-screened production dataset. Step S2.2: Filter the production dataset with abnormal value ranges and remove invalid field values ​​to obtain the outlier-processed production dataset. Step S2.3: Perform field logical consistency verification and brand batch association matching on the outlier processing production dataset to obtain the logical verification production dataset; Step S2.4: Perform time-series dimension alignment and data format unification conversion on the logical verification production dataset to obtain a standardized management dataset.

[0012] Beneficial effects of steps S2.1 to S2.4: This series of steps implements a standardized preprocessing process for closed-loop production datasets, progressively filtering, cleaning, and standardizing the data to improve the consistency and usability of the basic data. This provides a standardized, high-quality data foundation for subsequent dynamic inventory accounting and compliance management, and adapts to the stability requirements of input data for precise inventory control.

[0013] The process includes: Step S2.1 initial screening of basic data formats to remove invalid data with non-compliant formats and ensure the basic standardization of input data; Step S2.2 filtering of abnormal values ​​to reduce the impact of data deviations on subsequent calculation steps; Step S2.3 verification of data logical consistency to ensure the correlation and matching degree between core fields; and Step S2.4 time alignment and format unification of data to form a standardized control dataset that adapts to subsequent calculation processes.

[0014] As a further improvement to this application, step S3 involves acquiring the inbound and outbound operation events of tobacco shreds, and using a real-time inventory dynamic update model to correlate the standardized control dataset with the inbound and outbound operation events according to a time series. Based on time-series cumulative calculation, real-time updated inventory status time-series data bound to the standardized control dataset is obtained, including: Step S3.1: Obtain the inbound and outbound operation events of tobacco shreds, and perform field integrity verification and time sequence validity verification. After the verification is passed, the set of inbound and outbound operation events is obtained. Step S3.2: Match the inbound and outbound operation event set with the standardized management dataset by the time dimension field to obtain a time-series matching dataset and operation event combination; Step S3.3: Input the dataset and operation event combination into the real-time inventory dynamic update model, and perform full-dimensional association and binding according to the time series to obtain the time-series associated model operation dataset; Step S3.4: Perform time-series cumulative calculation on the model calculation dataset to obtain real-time updated inventory status time-series data bound to the standardized management and control dataset.

[0015] Beneficial effects of steps S3.1 to S3.4: This series of steps establishes a time-series correlation calculation system for standardized control data and inbound / outbound operation events, constructs a full-process calculation link for dynamic inventory updates, and outputs real-time inventory status time-series data bound to basic control data. This provides core support for the accurate accounting of recycled tobacco inventory and adapts to the real-time inventory control requirements of tobacco processing production.

[0016] Specifically, step S3.1 ensures the integrity and validity of inbound and outbound operation event data, providing compliant basic event data for subsequent correlation and matching; step S3.2 achieves temporal dimension correspondence between operation events and standardized control data, establishing a unified benchmark for multi-source data correlation; step S3.3 performs deep temporal correlation binding of multi-source data, constructing a computational input dataset adapted to dynamic inventory updates; and step S3.4 outputs real-time inventory status temporal data linked with basic control data, providing core accounting basis for subsequent blending control.

[0017] As a further improvement to this application, step S4 involves inputting the inventory status time-series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time blending ratio value, including: Step S4.1: Extract effective feature fields and unify the time series dimensions of the inventory status time series data to obtain an initial feature dataset adapted to the LightGBM algorithm; Step S4.2: Input the initial feature dataset into the LightGBM algorithm to perform dimension matching and format compliance conversion of the feature fields to obtain a standardized computation dataset; Step S4.3: Perform multi-dimensional feature association operations on the standardized computation dataset to obtain a computation result dataset of full-dimensional feature fitting. Step S4.4: Perform numerical verification and format conversion on the calculation result dataset to obtain the real-time doping ratio value.

[0018] Beneficial effects of steps S4.1 to S4.4: This series of steps performs algorithmic adaptation and multi-dimensional correlation calculations on inventory status time-series data, builds a re-blending ratio calculation link adapted to the cigarette manufacturing production scenario, and outputs real-time re-blending ratio values ​​that fit the actual production situation. This provides a core basis for the compliance management of subsequent re-blending operations and adapts to the accuracy requirements of cigarette production for re-blending ratio calculation.

[0019] Step S4.1 performs effective feature screening and time-series dimension unification of inventory time-series data to provide a suitable input basis for algorithm operation; Step S4.2 performs algorithm adaptation conversion of feature data to ensure compliance and adaptability of the operation process; Step S4.3 performs correlation fitting operation of multi-dimensional features to output operation results that fit the production status; Step S4.4 verifies and converts the operation results to output real-time blending ratio values ​​that can be directly used for subsequent compliance management.

[0020] As a further improvement to this application, step S5 involves comparing the real-time blending ratio with the corresponding grade process compliance threshold in the inventory status time series data in real time to obtain compliance verification results and operation execution instructions, including: Step S5.1: Extract the unique identifier of the corresponding grade and production batch from the real-time re-blending ratio value to obtain the re-blending ratio verification data with a unique matching identifier; Step S5.2: Match the grade and batch fields of the blending ratio verification data with the inventory status time series data to obtain the threshold comparison dataset; Step S5.3: Extract the process compliance threshold of the corresponding grade from the threshold comparison dataset to obtain the compliance benchmark threshold comparison dataset; Step S5.4: Compare the real-time re-doping ratio value in the compliance benchmark threshold comparison dataset with the corresponding grade process compliance threshold in real time to obtain the compliance verification result; Step S5.5: Match and map the compliance verification results with the external process control rules to obtain the operation execution instructions.

[0021] Beneficial effects of steps S5.1 to S5.5: This series of steps establishes a compliance verification and instruction acquisition link for the blending ratio, accurately matches and compares the blending ratio with the process compliance threshold, outputs compliance verification results and corresponding operation execution instructions, provides a clear execution basis for the pre-control of blending operations, reduces the risk of process execution deviation, and adapts to the compliance control needs of cigarette production.

[0022] The process involves the following steps: Step S5.1 extracting the unique identifier from the blending ratio data to provide a clear benchmark for subsequent accurate matching; Step S5.2 matching the fields of the blending ratio data with the inventory time-series data to establish a unified data foundation for compliance comparison; Step S5.3 accurately extracting the compliance threshold for the corresponding grade to clarify the benchmark for compliance verification; Step S5.4 comparing the values ​​of the blending ratio and the compliance threshold to output a clear compliance verification result; and Step S5.5 matching and mapping the verification result with the process rules to obtain directly executable operation control instructions.

[0023] As a further improvement to this application, step S6, based on the compliance verification result and the operation execution instruction, performs corresponding back-mixing operation process release or interception lock, obtains full-process operation log and archived data, and sends it back to the external manufacturing execution system, including: Step S6.1: Parse the instruction fields and verify the execution validity of the compliance verification result and the operation execution instruction. After the verification is passed, the process control instruction is obtained. Step S6.2: Send the process control command to the corresponding remixing operation process link, execute the corresponding remixing operation process release or interception lock, and obtain the process operation record with real-time execution status; Step S6.3: Perform full-link matching and binding of process operation records with real-time execution status with corresponding batch, brand, and time sequence related data to obtain a traceability related operation detail dataset; Step S6.4: Perform full-field integrity verification and format standardization conversion on the traceability and related operation detail dataset to obtain the full-process operation log and archived data; Step S6.5: The full-process operation log and the archived data are sent back to the external manufacturing execution system through the standard API interface to perform bidirectional synchronization of the full-process data.

[0024] Beneficial effects of steps S6.1 to S6.5: This series of steps implements the control instructions for re-blending and constructs a closed-loop data system for the entire process. It achieves standardized process control and full-chain traceability support for re-blending operations, synchronously transmits full-process control data back to the external manufacturing execution system, connects the beginning and end links of the entire process of recycling tobacco inventory control, and adapts to the closed-loop management needs of digital control of cigarette manufacturing.

[0025] Specifically, step S6.1 involves parsing the fields of the control instructions and verifying their execution validity to ensure the compliance and executability of the process control instructions; step S6.2 involves issuing and executing the control instructions, and controlling the release or interception of the back-mixing operation process; step S6.3 involves matching and binding the process operation records and related data across the entire chain to provide complete detailed data support for production traceability; step S6.4 involves verifying the integrity of the operation details data and standardizing its conversion to form a standardized full-process operation log and archived data; and step S6.5 involves transmitting and synchronizing the full-process control data back to achieve a two-way data closed loop with the external manufacturing execution system.

[0026] To achieve the above objectives, this application also provides the following technical solutions: An inventory management device for recycled tobacco, the inventory management device being applied to the inventory management method described above, the inventory management device comprising: The closed-loop production dataset acquisition module is used to obtain the production batch, tobacco grade, process compliance threshold, and batch feeding data of tobacco from the external manufacturing execution system to obtain the closed-loop production dataset. The closed-loop production dataset preprocessing module is used to preprocess the closed-loop production dataset to obtain a standardized control dataset. The inventory status time-series data calculation module is used to acquire the inbound and outbound operation events of tobacco shreds, and associate the standardized management dataset with the inbound and outbound operation events in a time series according to the real-time inventory dynamic update model, and obtain the real-time updated inventory status time-series data bound to the standardized management dataset based on time-series cumulative calculation. The real-time blending ratio calculation module is used to input the inventory status time series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time blending ratio value. The real-time re-blending ratio value comparison module is used to compare the real-time re-blending ratio value with the corresponding grade process compliance threshold in the inventory status time series data in real time, and obtain the compliance verification result and operation execution instruction. The re-doping operation module is used to release or block the corresponding re-doping operation process based on the compliance verification result and the operation execution instruction, obtain the full process operation log and archived data, and send them back to the external manufacturing execution system.

[0027] To achieve the above objectives, this application also provides the following technical solutions: An electronic device includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the inventory management method for recycled tobacco as described above.

[0028] To achieve the above objectives, this application also provides the following technical solutions: A computer-readable storage medium storing program instructions that, when executed by a processor, enable the implementation of the aforementioned inventory management method for recycled tobacco. Attached Figure Description

[0029] Figure 1 This is a schematic flowchart illustrating the steps of an embodiment of a method for managing the inventory of recycled tobacco shreds according to this application. Figure 2 This is a schematic diagram of the functional modules of an embodiment of a reclaimed tobacco inventory management device according to this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the storage medium of this application. Detailed Implementation

[0030] 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 a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0031] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (e.g., as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0032] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0033] It should be noted that, due to the limited types and number of symbols or letters that can represent specific meanings, for embodiments with many formulas or codes, there may be situations where symbols or letters cannot meet the usage requirements. Therefore, the interpretation of formula symbols in the steps or sub-steps of the embodiments is only valid for the current step or sub-step.

[0034] If the same symbol has different interpretations in different steps or sub-steps, the interpretation in the current step or sub-step shall prevail; if the same symbol appears in different steps or sub-steps, but no interpretation is given in subsequent steps or sub-steps after its first appearance, the interpretation in the first step or sub-step shall be used.

[0035] like Figure 1 As shown, this embodiment provides an example of a method for managing the inventory of recycled tobacco. In this embodiment, the inventory management method includes the following steps: Step S1: Obtain the production batch, tobacco brand, process compliance threshold, and batch feeding data of the tobacco shreds from the external manufacturing execution system to obtain a closed-loop production dataset.

[0036] Preferably, this step provides a unified, traceable, closed-loop basic data source for the whole-process management and control of recycled tobacco inventory. The core is to achieve two-way compliant data interaction with the external manufacturing execution system (hereinafter referred to as the MES system) of the cigarette manufacturing workshop, and to complete the standardized extraction, verification and integration of core production data.

[0037] Furthermore, step S1 specifically includes the following steps: Step S1.1: Establish a compliant communication session channel with the external manufacturing execution system through the standard API interface.

[0038] Preferably, this step establishes a secure and stable two-way communication link for data interaction. The implementation process follows the tobacco industry's "Data Interaction Specification for Cigarette Production Information System", adopts a RESTful standard API architecture, and completes the construction of the communication link based on the HTTPS two-way authentication mechanism.

[0039] For communication security configuration, X.509 digital certificates can be used to complete two-way authentication between the client and the MES system server. The certificate validity period is synchronized with the production system operation and maintenance cycle and is set to 12 months. The communication process adopts the TLS1.3 encryption protocol and disables weak encryption suites to ensure the compliance and anti-tampering capabilities of the data transmission process.

[0040] Among them, the session channel parameter configuration can be set to a session heartbeat packet sending interval of 30s to maintain a long connection state; the session timeout threshold is set to 120s, and if no heartbeat response is received after exceeding the threshold, the session is considered to be interrupted; the maximum number of session reconnections is set to 3 times, and the reconnection interval increases exponentially, namely 5s, 10s, and 20s. If the maximum number of reconnections is exceeded, a communication abnormality log is obtained and pushed to the workshop operation and maintenance platform.

[0041] Specifically, the two-way communication permission configuration provides dual permissions for data reading and data feedback for the API interface. The reading permission covers the production work order module, process management module, and material management module of the MES system, while the feedback permission covers the production execution module and log archiving module of the MES system, providing link support for the closed-loop data process.

[0042] Step S1.2: Extract the production batch, tobacco grade, process compliance threshold, and batch feeding data of the tobacco shreds from the external manufacturing execution system through the compliant communication session channel to obtain the original production data set.

[0043] Preferably, this step completes the targeted extraction of core production data required for inventory control. The data extraction trigger mechanism is linked with the silk production work order event in the MES system. When the MES system issues a silk production work order, the data extraction operation in this step is automatically triggered. The extraction frequency is set to 5 seconds / time until the corresponding batch of production is completed.

[0044] The core data fields are defined and extracted according to the following rules: (1) Production batch: The unique batch code corresponding to the silk production work order in the MES system. The coding rule is "4-digit year + 2-digit workshop code + 2-digit production line code + 8-digit serial number". It is a fixed 16-digit character data, which serves as the unique primary key for the entire process data association.

[0045] (2) Tobacco brand: The unique code of the tobacco formula registered by the cigarette enterprise is a fixed 8-character data, which is bound to the process compliance threshold.

[0046] (3) Process compliance threshold: The range of allowable re-blending ratios of recycled tobacco for different brands of tobacco, including upper and lower thresholds. The upper threshold for general brands is set to 15%, and the lower threshold is set to 0%. The threshold for special customized brands is extracted synchronously with the filing parameters of the process module of the MES system, and the numerical accuracy is retained to two decimal places.

[0047] (4) Batch feeding data: the total planned feeding weight of the corresponding work order batch, the feeding weight of the main raw material tobacco, and the start and end time of batch production. The weight unit is kg, the numerical accuracy is retained to 2 decimal places, and the time accuracy is 1s.

[0048] Preferably, based on the idempotency of data extraction, a unique request identifier and batch code can be carried with each extraction request. The MES system can then perform response deduplication based on the request identifier, avoiding data redundancy caused by repeated extraction.

[0049] Step S1.3: Perform field integrity matching and data source traceability verification on the original production data set. After the verification is successful, the initial production dataset is obtained.

[0050] Preferably, this step completes dual compliance verification of the extracted data. The core is to ensure the integrity and traceability of the basic data, eliminate invalid data, and provide a reliable initial data benchmark for subsequent processes.

[0051] For field integrity matching, non-empty and format compliance verification can be performed on four types of core fields. The integrity matching rate is calculated using the following formula: Integrity matching rate = (Number of valid non-empty core fields) / (Total number of core fields) × 100%. The integrity matching threshold is set to 100%. Batch data with a matching rate lower than the threshold are directly judged as failing verification, and a data re-retrieval request is automatically triggered. If the data re-retrieval count for a single batch exceeds 3 times and still fails to meet the standard, a data anomaly log is obtained and it is not included in the subsequent processing flow.

[0052] Preferably, the batch data that passes verification can be verified to carry the unique identifier, timestamp and digital signature of the MES system data source. The digital signature is obtained using the SHA-256 hash algorithm. Data that fails verification is determined to be untrusted data and is directly removed. At the same time, the data source abnormality log is obtained.

[0053] Preferably, for batch data that have passed both verifications, an initial production dataset is obtained by integrating them. The dataset is stored with the production batch as the unique primary key, and the original values ​​and verification identifiers of all fields are retained.

[0054] Step S1.4: Obtain the real-time operation records of the external manufacturing execution system through the compliant communication session channel, and perform time-series alignment and matching with the initial production dataset to obtain the closed-loop production dataset.

[0055] This step completes the time-series alignment and integration of initial production data and real-time operation records, forming a full-dimensional closed-loop production control dataset, providing a unified data benchmark for subsequent full-process control.

[0056] For obtaining real-time operation records, the full real-time operation records of the corresponding batch can be obtained from the production execution module of the MES system through the compliant communication session channel established in step S1.1. The record types include recycling tobacco shreds warehousing operations, warehousing operations, inventory operations, and re-blending operations. Each record carries a unique operation identifier, operation timestamp, associated batch code, associated tobacco shreds brand, operation weight, and operation station code.

[0057] Specifically, for time-series alignment matching, the start and end times of production for the corresponding batch in the initial production dataset are used as the baseline time window. The time-series alignment tolerance threshold is set to 300s. The timestamps of the operation records are matched with the baseline time window, and only valid operation records with timestamps within the range of "baseline start time - 300s to baseline end time + 300s" are retained. Valid operation records of the same batch and the same brand are bound to the initial production dataset by field to achieve time-series unification at the batch level.

[0058] Preferably, after completing the time-series alignment and matching, a closed-loop production dataset is obtained. The dataset uses the batch code as the unique primary key and contains core production data, verification identifiers, and all valid operation records. It is stored in the time-series database to provide a unique basic data source for subsequent steps.

[0059] Beneficial effects of steps S1.1 to S1.4: This series of steps establishes a compliant data interaction link with the external manufacturing execution system, and standardizes the acquisition and integration of basic data for the inventory management of recycled tobacco shreds, forming a unified closed-loop initial data source. This provides consistent and traceable benchmark data support for subsequent inventory accounting and management processes, and adapts to the basic data requirements for refined management and control of tobacco shred production.

[0060] Specifically, step S1.1 ensures the compliance and stability of data interaction with external manufacturing execution systems, providing a reliable link for data transmission; step S1.2 acquires the core basic data required for inventory control in a standardized manner, anchoring the core data dimensions required for control; step S1.3 verifies the integrity and traceability of the basic data, eliminates invalid data, and improves the reliability of the basic data; step S1.4 achieves time-series matching between the basic data and real-time operation records, forming a complete closed-loop production control dataset.

[0061] Step S2: Perform data preprocessing on the closed-loop production dataset to obtain a standardized control dataset.

[0062] Preferably, this step takes the closed-loop production dataset output from step S1 and completes the full-process data preprocessing operation. Through layer-by-layer verification, cleaning, and standardization transformation, it eliminates format noise, outliers, and logical conflicts in the original data, and outputs a high-quality standardized control dataset that is adapted to subsequent dynamic inventory accounting and algorithm calculation. All processing processes retain the original data and processing logs to meet the compliance requirements of traceability and auditability of tobacco industry production data.

[0063] Furthermore, step S2 specifically includes the following steps: Step S2.1: Perform non-empty validation of key fields and format validation of numerical fields on the closed-loop production dataset to obtain the initial format-screened production dataset.

[0064] Preferably, this step is the first screening checkpoint in data preprocessing, completing the non-empty compliance verification of all key fields in the closed-loop production dataset and the format compliance verification of numerical fields, eliminating invalid data at the format level, and outputting the initial format-screened production dataset.

[0065] Regarding the definition of the scope of verification fields, based on the structure of the closed-loop production dataset, two types of key verification fields are defined. The character-type key fields include production batch code, tobacco brand code, operation unique identifier, workstation code, and data source identifier. The numerical-type key fields include process compliance upper and lower limit thresholds, batch planned feed weight, actual feed weight, weight corresponding to a single operation record, and operation timestamp.

[0066] The rules for validating non-empty key fields are as follows: (1) Character-type key fields: null values, empty strings, and all-space characters are prohibited. At the same time, they must match the predefined encoding format rules. The production batch code must conform to the 16-digit fixed length rule, and the tobacco brand code must conform to the 8-digit fixed length rule. Fields that do not conform to the rules are judged as non-empty and fail the verification. (2) Numeric key fields: null values ​​and non-numeric characters are prohibited. The basic value must be greater than or equal to 0. Fields that do not conform to the rules are judged as non-null and fail the verification.

[0067] (3) The pass rate threshold for non-empty verification of key fields of a single data record is set to 100%. Records with a pass rate that does not reach the threshold are marked as format abnormal records, included in the abnormal log archive, and not entered into the subsequent processing flow.

[0068] The implementation rules for format verification of numeric fields are designed to verify the data type format of numeric fields that have passed the non-empty verification. Specifically, weight fields are uniformly verified as double-precision floating-point numbers, timestamp fields are verified as 10-bit / 13-bit standard Unix timestamp formats, and ratio threshold fields are verified as floating-point data in the range of 0-1. Fields that do not meet the format requirements are judged as failing the format verification, and the corresponding records are marked as format abnormal records.

[0069] Step S2.2: Filter the production dataset for outlier values ​​and remove invalid field values ​​to obtain the outlier-processed production dataset.

[0070] Preferably, this step involves initial screening of the production dataset, statistical identification and filtering of outlier values, removal of invalid field values, elimination of noise interference in the data, and output of the outlier-processed production dataset.

[0071] The outlier identification method and implementation rules adopt the 3σ criterion commonly used in industrial data to identify outliers. The outlier judgment threshold is set to ±3σ, that is, samples with values ​​outside the range of [μ-3σ, μ+3σ] are judged as outliers; at the same time, a process fallback threshold is set, when the weight value of a single operation record exceeds 30% of the total planned feed weight of the corresponding batch, it is directly judged as an outlier.

[0072] The rules for filtering out abnormal values ​​and removing invalid field values ​​are as follows: (1) For a single record that is determined to be an abnormal value, mark it as a record with abnormal value, include it in the abnormal log archive, do not enter the subsequent processing process, do not modify the original data, and ensure data traceability.

[0073] (2) For isolated field values ​​and duplicate or redundant field values ​​that have no corresponding batch or brand binding relationship, they are directly determined as invalid field values, the removal operation is completed, and the removal log is recorded synchronously.

[0074] Preferably, for operation records of the same batch and brand, after outlier filtering, the threshold for the percentage of valid records is set to 90%. If the percentage is lower than this threshold, a batch data quality anomaly warning is issued and pushed to the workshop operation and maintenance platform. The corresponding batch data will not enter the subsequent processing flow. All valid data records that pass the outlier filtering are integrated to obtain an outlier processing production dataset. The dataset retains the original values, anomaly tags, and processing logs.

[0075] Step S2.3: Perform field logical consistency verification and brand batch association matching on the outlier processing production dataset to obtain the logical verification production dataset.

[0076] Preferably, this step takes the outlier processing production dataset, completes the logical consistency verification between fields and the association matching verification between grade and batch, eliminates logical conflicts in the data, ensures the consistency of association between data, and outputs the logically verified production dataset.

[0077] Among them, for the field logical consistency verification implementation rules, four core verification dimensions can be set, and records that pass the verification of all dimensions are judged to be logically compliant.

[0078] (1) Brand-Batch Binding Logic Verification: The same production batch code can only correspond to a unique main tobacco brand code. Records that fail the verification are judged as logical conflict records.

[0079] (2) Verification of consistency of process thresholds: For the same tobacco brand code in the same production batch, the corresponding upper and lower limits of process compliance thresholds must be completely consistent. Records that fail the verification are judged as logical conflict records.

[0080] (3) Timing logic consistency verification: Within the same batch, the timestamp of the recycling of tobacco shreds into the warehouse must be earlier than the timestamp of the corresponding outbound and remixing operations. The timing tolerance threshold is set to 0s, and reverse timing operation records are not allowed. Records that fail the verification are judged as logical conflict records.

[0081] (4) Weight cumulative logic verification: Under the same batch and the same brand, the cumulative outbound operation weight shall not exceed the sum of the cumulative inbound operation weight and the initial inventory weight. Records that fail the verification are judged as logical conflict records.

[0082] Preferably, the brand-batch association matching implementation rule uses "production batch code + tobacco brand code" as a joint unique primary key to perform full association matching between the core production data of the batch and the corresponding operation records. The matching degree threshold is set to 100%. Isolated operation records that do not match the corresponding primary key are marked as ownerless records, included in the abnormal log archive, and not entered into the subsequent processing flow.

[0083] Step S2.4: Perform time-series dimension alignment and data format unification conversion on the logical verification production dataset to obtain a standardized management dataset.

[0084] Preferably, this step involves logically verifying the production dataset, completing the time-series dimension unification and data format standardization conversion of the entire dataset, and outputting a standardized management dataset that is compatible with subsequent inventory dynamic update models and algorithm calculations.

[0085] The rules for time-series alignment are as follows: (1) Unified time base: All timestamps are uniformly converted to UTC+8 standard time in East 8 zone, and the time precision is uniformly 1s, which is consistent with the time granularity of the production data of the MES system.

[0086] (2) Timing window alignment: Using the start and end times of the corresponding production batch as the reference timing window, all operation records are arranged in ascending order by timestamp to complete the timing alignment with the reference window, and a timing index with 1 second as the smallest granularity is obtained.

[0087] (3) Timing continuity completion: For time granularity where there are no operation records in the baseline timing window, fill in the empty operation mark to ensure the continuity of timing data and provide a unified timing benchmark for subsequent timing cumulative calculation.

[0088] The unified data format conversion implementation rules are as follows: (1) Character fields: uniformly convert to UTF-8 encoding format, remove redundant leading and trailing spaces, and unify uppercase and lowercase case; (2) Numerical fields: Weight fields are uniformly converted to double-precision floating-point type, with the unit uniformly being kg, and the numerical precision is retained to 2 decimal places; Proportional fields are uniformly converted to floating-point type format within the range of 0-1, replacing the percentage format; Timestamp fields are uniformly converted to 13-bit standard Unix timestamp format. (3) Category fields: Category fields such as operation type and verification result are uniformly converted into preset enumeration value format to ensure the uniqueness and standardization of field values.

[0089] Preferably, the data that has completed time-series alignment and format conversion can be converted into a three-dimensional structured format of "batch dimension - grade dimension - time-series dimension". The batch dimension stores core production data and process parameters, the grade dimension stores corresponding compliance thresholds, and the time-series dimension stores operation records and time-series indexes sorted by time, forming a standardized management and control dataset.

[0090] Preferably, before the standardized control dataset is output, the final verification of all fields is completed. After the verification is passed, the data is stored in the time series database as the sole input data source for the subsequent step S3. The full-process preprocessing log is obtained synchronously and archived to the MES system log module.

[0091] Beneficial effects of steps S2.1 to S2.4: This series of steps implements a standardized preprocessing process for closed-loop production datasets, progressively filtering, cleaning, and standardizing the data to improve the consistency and usability of the basic data. This provides a standardized, high-quality data foundation for subsequent dynamic inventory accounting and compliance management, and adapts to the stability requirements of input data for precise inventory control.

[0092] The process includes: Step S2.1 initial screening of basic data formats to remove invalid data with non-compliant formats and ensure the basic standardization of input data; Step S2.2 filtering of abnormal values ​​to reduce the impact of data deviations on subsequent calculation steps; Step S2.3 verification of data logical consistency to ensure the correlation and matching degree between core fields; and Step S2.4 time alignment and format unification of data to form a standardized control dataset that adapts to subsequent calculation processes.

[0093] Step S3: Obtain the inbound and outbound operation events of tobacco shreds, and associate the standardized control dataset with the inbound and outbound operation events according to the time series through the real-time inventory dynamic update model. Based on the time series cumulative calculation, obtain the real-time updated inventory status time series data bound to the standardized control dataset.

[0094] Preferably, this step follows the standardized control dataset output in step S2. The core is to construct a time-series, real-time dynamic accounting system for the inventory status of recycled tobacco, establish a linkage link between inbound and outbound operation events and basic control data, solve the pain points of data lag, discrepancy between accounts and actual inventory, and inconsistent accounting benchmarks in traditional inventory management, and finally output real-time inventory status time-series data that is deeply bound to basic control data, providing a unique and accurate inventory data benchmark for subsequent blending ratio calculation.

[0095] Furthermore, step S3 specifically includes the following steps: Step S3.1: Obtain the inbound and outbound operation events of tobacco shreds, and perform field integrity verification and time sequence validity verification. After the verification is passed, the set of inbound and outbound operation events is obtained.

[0096] Preferably, the core of this step is to complete the dual-mode collection and dual compliance verification of the recycling tobacco shreds warehousing and warehousing operation events, eliminate invalid and non-compliant event data, and output a standardized set of warehousing and warehousing operation events that can be used for subsequent time-series matching calculations.

[0097] The operation event collection mechanism adopts a dual collection mode of "batch historical data extraction + real-time incremental event subscription". Batch data is extracted from the time-series dimension module of the standardized control dataset output in step S2, extracting the full volume of inbound and outbound historical operation events of the corresponding batch and grade. Real-time incremental events are subscribed to the inbound and outbound operation completion events of the manufacturing execution system and the warehouse control system through the standard API session channel established in step S1. The event reporting delay threshold is set to 200ms, that is, the event must be reported within 200ms after the operation is completed. Events exceeding the threshold are marked as delayed events and included in the abnormal log archive.

[0098] Among them, for the core field definition of operation events, a single valid operation event must contain fixed fields, namely, event unique ID, event type, associated batch code, associated tobacco brand, operation weight, operation timestamp, operation workstation code, and event status. The event unique ID adopts the UUID v4 format as a globally unique identifier, and the event type only supports two enumeration values: "IN" for inbound and "OUT" for outbound.

[0099] The implementation rules for field integrity verification are as follows: The core mandatory fields for an event are defined as ["EVENT_ID","EVENT_TYPE","BATCH_NO","GRADE_NO","OP_WEIGHT","OP_TIMESTAMP"]. The field integrity matching rate for a single event is calculated using the following formula: Integrity Matching Rate = (Number of valid non-empty mandatory fields) / (Total number of mandatory fields) × 100%. An integrity matching rate threshold of 100% is set. Events with a matching rate below the threshold are directly deemed invalid, and format compliance verification is performed simultaneously. Operation weight must be ≥0, and the timestamp must be in 13-bit standard Unix format. Events that do not meet these requirements are simultaneously removed and do not proceed to the next processing step.

[0100] The implementation rules for time sequence validity verification include three-tiered time sequence verification rules: First, the event timestamp must fall within the production time sequence window of the corresponding batch, with a time sequence tolerance threshold set to ±300s. Events exceeding the window are considered invalid. Second, the same event ID cannot be reported repeatedly. Only the first valid record of duplicate events is retained, and the rest are directly deduplicated. Third, reverse time sequence event verification is performed. Under the same batch and brand, the timestamp of the outbound event must not be earlier than the timestamp of the first inbound event of that group. Events that do not comply with the rules are considered invalid.

[0101] Preferably, all valid events that pass dual verification are sorted in ascending order by operation timestamp, and structured and integrated using "batch code + tobacco brand" as the grouping key to obtain a set of inbound and outbound operation events. Event verification exception logs are obtained synchronously and archived to the production log module.

[0102] Step S3.2: Match the inbound and outbound operation event sets with the standardized management dataset by time dimension to obtain a time-series matching dataset and operation event combination.

[0103] Preferably, this step involves the collection of inbound and outbound operation events. The core is to align the operation events with the time dimension benchmark and match the multi-dimensional fields of the standardized management dataset, build a unified time series benchmark for multi-source data, eliminate time series misalignment problems, and output the combination of the time series initially matched dataset and operation events.

[0104] Among them, for the unified matching benchmark setting, the time-series dimension index of the standardized management dataset is used as the only matching benchmark. This time-series index has a minimum granularity of 1 second and fully covers the time-series window of the entire production cycle of the corresponding batch. All matching operations are carried out based on this unified time-series benchmark to ensure the time-series consistency of multi-source data.

[0105] The three-level progressive matching rules are as follows: (1) Primary key matching: Using “batch code + tobacco brand” as the joint unique primary key, the event set of inbound and outbound operations is accurately matched with the batch-brand dimension of the standardized control dataset. The matching threshold is set to 100%. Event groups that do not match the corresponding primary key are directly removed and do not enter the subsequent process.

[0106] (2) Secondary time granularity matching: Align the timestamp of each operation event to the corresponding 1-second granularity time slot in the time sequence index of the standardized control dataset. Multiple events in the same time slot are sorted according to the reporting order to complete the one-to-one binding of events and time slots.

[0107] (3) Three-level field mapping and matching: The core production data of the batch, process compliance threshold, initial inventory data and accounting rule parameters in the standardized control dataset are fully mapped and bound to each time slot and corresponding event of the corresponding batch-brand group, so as to realize the field-level association between basic control data and operation events.

[0108] Preferably, the matching results of each time slot can be verified for completeness. The verification content includes the validity of primary key association, the accuracy of time sequence binding, and the completeness of field mapping. Time slots that pass all verification items are determined to be valid matching units.

[0109] Preferably, all valid matching units are arranged in ascending order of time series and integrated to obtain a combination of the dataset and operation events of the initial time series matching. The combination adopts a structured format of "time slot index + batch-brand basic dataset + corresponding operation event list". Each time slot is an independent operation unit, providing standardized input for subsequent model operations.

[0110] Step S3.3: Input the dataset and operation event combination into the real-time inventory dynamic update model, and perform full-dimensional association and binding according to the time series to obtain the time-series associated model operation dataset.

[0111] Preferably, this step takes over the dataset and operation event combination of the initial time-series matching. The core is to complete the deep association and binding of the time-series dimension of the combination through the real-time inventory dynamic update model, build a time-series calculation link that conforms to the material accounting specifications of the tobacco industry, and output a standardized time-series association model calculation dataset.

[0112] Among them, the real-time inventory dynamic update model is defined as an industrial-grade inventory accounting model based on time-series sliding windows. It is designed specifically for the scenario of recycled tobacco inventory in the cigarette manufacturing process. The core logic follows the "Cigarette Manufacturing Material Balance Accounting Specification". The model adopts a single-step long sliding window architecture, which is fully adapted to the real-time calculation requirements of industrial time-series data.

[0113] The model input and output specifications are as follows: (1) Model input: The combination of the dataset and operation events of the initial time matching, with the smallest input unit being the structured matching data of a single time slot.

[0114] (2) Model output: The time-series related model operation dataset, the smallest output unit is a standardized operation unit that is bound to all dimensions of related fields, operation parameters and time-series dependencies.

[0115] The rules for implementing the full-dimensional association and binding of the model are as follows: (1) Binding of time-series dependencies: Strictly follow the ascending order of time sequence, bind the cumulative operation dependency of the preceding time slot to each time slot, set the sliding window step size to 1s, that is, the operation of each time slot only depends on the output result of the previous time slot, ensuring the real-time performance and continuity of the operation, and avoiding the operation delay caused by full backtracking.

[0116] (2) Full field association and binding: The operation events, basic production data, process compliance thresholds, initial inventory data and material accounting rules of each time slot are deeply associated and bound to eliminate the field isolation problem and ensure that each operation unit contains all the fields required for complete inventory accounting without the need to call external data.

[0117] (3) Accounting rule binding: For different brands of tobacco, the corresponding inventory accounting rules are bound. The general brands adopt the first-in-first-out (FIFO) accounting rule, and the special customized brands are bound to the weighted average accounting rule of the corresponding batch. The accounting rules correspond one-to-one with the brand parameters in the standardized control dataset to ensure accounting compliance.

[0118] Preferably, after the association binding is completed, the model performs format standardization conversion on the data of each operation unit, unifies the type and precision of the operation fields, retains the precision of weight fields to 4 decimal places, and unifies the time field to 13-digit Unix timestamp format. Finally, the data is sorted in ascending order of time series to obtain the time-series associated model operation dataset.

[0119] Step S3.4: Perform time-series cumulative calculation on the model calculation dataset to obtain real-time updated inventory status time-series data that is bound to the standardized management and control dataset.

[0120] Preferably, this step takes over the time-series associated model calculation dataset, and the core is to perform time-series cumulative calculations for each time slot, outputting real-time updated inventory status time-series data for the entire production cycle, and at the same time completing the deep binding of the data with the standardized management and control dataset, providing a core data benchmark for subsequent blending ratio calculation.

[0121] The core formula for time-series cumulative calculation adopts a sliding cumulative calculation method, strictly following the material balance accounting standards of the tobacco industry. The calculation formula is as follows: (1) Formula for calculating inventory change in a single time slot: ΔS t =IN t -OUT t Where t is the time-series index of the current time slot, IN t OUT represents the cumulative weight of goods received within time slot t. t This represents the cumulative outbound weight within time slot t.

[0122] (2) Formula for calculating the real-time inventory balance of a single time slot: S t =S t-1 +ΔS t Among them, S t-1 The real-time inventory balance of the previous time slot is S for the initial time slot t0. t_0 To standardize the management and control of the beginning inventory weight of the corresponding batch and grade in the data set.

[0123] The rules for implementing time-series cumulative operations are as follows: (1) Operation order constraint: Strictly follow the ascending order of the time series, and perform cumulative operations one slot at a time starting from the initial time slot. Skipping or reversing the order of operations is prohibited to ensure the continuity and accuracy of the time series data; (2) Accuracy control of calculation: All calculation processes adopt double-precision floating-point calculation, the accuracy of intermediate results is retained to 4 decimal places, and the accuracy of the final output result is retained to 2 decimal places, which is consistent with the accuracy standard of material accounting in the cigarette industry; (3) Abnormal fallback handling: If the inventory balance is negative after the calculation of a single time slot, the abnormal verification is triggered immediately, the time slot is marked as an abnormal operation, the events and calculation process of the previous 300 time slots are automatically traced back, and an inventory abnormality warning is pushed to the workshop management platform. Abnormal data is not included in the final output dataset.

[0124] Preferably, the real-time inventory balance, inventory change, cumulative inbound weight, and cumulative outbound weight of each time slot obtained from the calculation can be fully bound to the corresponding time-series index and corresponding batch-brand group of the standardized management and control dataset to form a one-to-one traceability binding relationship, ensuring the consistency between inventory data and basic production data and process data.

[0125] Preferably, after completing the full time-series window operation, real-time updated inventory status time-series data bound to the standardized control dataset is obtained. The data is stored in the time-series database in a three-dimensional structured format of "batch-brand-time-series index". It includes the real-time inventory balance at each time point, cumulative inbound and outbound data, corresponding operation event list, and bound basic control data index. The inventory accounting full-process log is obtained synchronously and archived to the manufacturing execution system.

[0126] Beneficial effects of steps S3.1 to S3.4: This series of steps establishes a time-series correlation calculation system for standardized control data and inbound / outbound operation events, constructs a full-process calculation link for dynamic inventory updates, and outputs real-time inventory status time-series data bound to basic control data. This provides core support for the accurate accounting of recycled tobacco inventory and adapts to the real-time inventory control requirements of tobacco processing production.

[0127] Specifically, step S3.1 ensures the integrity and validity of inbound and outbound operation event data, providing compliant basic event data for subsequent correlation and matching; step S3.2 achieves temporal dimension correspondence between operation events and standardized control data, establishing a unified benchmark for multi-source data correlation; step S3.3 performs deep temporal correlation binding of multi-source data, constructing a computational input dataset adapted to dynamic inventory updates; and step S3.4 outputs real-time inventory status temporal data linked with basic control data, providing core accounting basis for subsequent blending control.

[0128] Step S4: Input the inventory status time series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time blending ratio value.

[0129] Preferably, this step follows the real-time updated inventory status time-series data that is bound to the standardized management and control dataset output in step S3. The core is based on the LightGBM gradient boosting tree algorithm to complete the correlation fitting and accurate calculation of multi-dimensional time-series features, and output the real-time blending ratio value that is adapted to the production needs of the corresponding batch and grade. This solves the pain points of insufficient accuracy, strong lag and inability to adapt to the dynamic adjustment of multi-dimensional production variables in traditional manual accounting, and provides the core judgment basis for subsequent compliance verification and process control.

[0130] Furthermore, step S4 specifically includes the following steps: Step S4.1: Extract effective feature fields and unify the time series dimensions of the inventory status time series data to obtain the initial feature dataset adapted to the LightGBM algorithm.

[0131] Preferably, the core of this step is to complete the effective feature selection, extraction and time-series dimension alignment of the input time-series data, eliminate feature redundancy and time-series misalignment, and output an initial feature dataset that conforms to the input specification of the LightGBM algorithm.

[0132] The feature dimension definition and extraction rules are based on the blending process requirements of cigarette manufacturing, defining three main categories of core effective feature dimensions. All features are extracted from the inventory status time-series data output in step S3 and the bound standardized control dataset, without the introduction of any external non-standard features, as detailed below: (1) Inventory time-series characteristics: including real-time inventory balance, cumulative inbound weight in the past 10 minutes, cumulative outbound weight in the past 10 minutes, inventory volatility, total cumulative recycled tobacco shreds per batch, and inventory availability time. The formula for calculating inventory volatility is:

[0133] In the formula, N is the number of time series samples within the sliding window, and S i This represents the inventory balance for a single time slot. The average inventory value within the window is used, with the sliding window fixed at 10 minutes and the step size consistent with the inventory data update frequency of 1 second.

[0134] (2) Production process characteristics: including the upper and lower limits of compliance of the recycling process of the corresponding brand of tobacco, the total weight of planned feed in the batch, the proportion of feed completed in the batch, the remaining production time of the batch, and the production operation status parameters of the tobacco processing line.

[0135] (3) Material batch characteristics: including the storage time of the recycled tobacco batch, the matching parameters of the corresponding main tobacco brand formula, and the batch material balance deviation rate.

[0136] Preferably, a variance threshold method can be used to remove low-value features. The variance threshold is set to 0.01. Features with variances below this threshold are considered to be invalid features without fluctuations and are directly removed. At the same time, non-core fields that are not related to the remixing ratio are removed to ensure the effectiveness of the feature set.

[0137] Among them, the unified alignment implementation rule of the time series dimension takes the 1-second granular time series index of the inventory status time series data as the sole benchmark, aligns all extracted feature fields to the same time series index, sets the time series alignment tolerance threshold to 1 second, and uses the forward filling method to complete feature data exceeding the tolerance, prohibiting backward filling to avoid data leakage; for feature sequences that are continuously missing for more than 30 seconds, they are marked as feature anomalies and trigger a data re-retrieval request.

[0138] Preferably, integer encoding conversion is performed for categorical features (such as production operation status and brand code), and data types are uniformly converted to double-precision floating-point for numerical features to ensure that the feature format meets the basic requirements of the algorithm input. All features that have been extracted, filtered, and aligned are arranged in ascending order by time-series index and stored in a structured manner with "batch code + tobacco brand + time-series index" as the joint primary key to obtain the initial feature dataset adapted to the LightGBM algorithm, and feature extraction logs are obtained simultaneously.

[0139] Step S4.2: Input the initial feature dataset into the LightGBM algorithm to perform dimension matching and format compliance conversion of the feature fields, and obtain a standardized computation dataset.

[0140] Preferably, this step takes the initial feature dataset and focuses on matching the features with the input dimensions of the pre-trained LightGBM algorithm, performing format compliance conversion and compliance verification, and outputting a standardized computation dataset that the algorithm can directly execute inference operations to ensure the compliance and stability of the inference process.

[0141] The LightGBM model used in this step is a gradient boosting tree regression model pre-trained based on more than 3 years of historical tobacco production data from cigarette companies. The model task is a regression task, and the prediction target is the optimal proportion of recycled tobacco in the corresponding production scenario. After the model is trained, the structure and parameters are fixed. There is no real-time training process. It is only used for real-time inference calculation to avoid the risk of model drift in the production environment.

[0142] The precise feature dimension matching implementation rule uses the fixed input feature dimension of the pre-trained model as the sole benchmark to complete the dimension alignment of the initial feature dataset, as follows: (1) For features that are required to exist in the model input but are missing in the initial feature dataset, use a fixed value of 0 to complete the feature filling and record the missing feature log synchronously.

[0143] (2) Redundant features that exist in the initial feature dataset but are not included in the model input are directly removed to ensure that the dimension of the input feature is completely consistent with the dimension during model training. The dimension matching threshold is set to 100%, and datasets that do not reach the threshold are not included in the subsequent calculation process.

[0144] The implementation rules for format compliance conversion are as follows: (1) Numerical features are uniformly converted to float32 format to maintain consistency with the feature data type during model training.

[0145] (2) The classification features are completed by LabelEncoder integer encoding. The encoding mapping table is completely consistent with the model training. Adding undefined enumeration values ​​is prohibited.

[0146] (3) Convert the feature data that has completed dimension matching and format conversion into the Dataset data format natively supported by the LightGBM algorithm, set free_raw_data=False, and retain the original data for tracing.

[0147] Preferably, a triple verification rule can be set: first, feature missing rate verification, where the feature missing rate of a single sample must not exceed 5%, and samples exceeding the threshold are marked as invalid samples; second, numerical range verification, where all numerical features must fall within the feature value range used during model training, and samples exceeding the range trigger an anomaly warning; and third, temporal continuity verification, where the temporal index of samples must be continuous, and datasets with gaps exceeding 5 seconds are marked as temporal anomalies. All compliant data that passes verification is sorted in ascending order by temporal index to obtain a standardized computation dataset that the algorithm can execute, and dimension matching and format conversion logs are obtained simultaneously.

[0148] Step S4.3: Perform multi-dimensional feature association operations on the standardized computation dataset to obtain the computation result dataset of full-dimensional feature fitting.

[0149] Preferably, this step takes a standardized computation dataset and its core is to perform nonlinear correlation fitting and inference operations on multi-dimensional features through pre-trained LightGBM algorithm, to explore the intrinsic relationship between features and the optimal backmixing ratio, and to output a dataset of computation results for fitting full-dimensional features.

[0150] The core inference parameters of the LightGBM algorithm are set as follows: the fixed parameters of the pre-trained model are used without real-time parameter tuning. The core parameters are shown in Table 1 below: Table 1: LightGBM Algorithm Parameter Table.

[0151]

[0152] The implementation rules for multi-dimensional feature association operations are as follows: (1) Calculation triggering mechanism: The real-time triggering mode is adopted, which is synchronized with the update frequency of inventory status time series data. The input and inference calculation of the standardized calculation dataset is completed every 1 second to ensure the real-time performance of the blending ratio.

[0153] (2) Core operation logic: Based on the histogram optimization algorithm of LightGBM, the multi-dimensional features of the input are split and fitted layer by layer to explore the nonlinear correlation between the three types of features of inventory time series, production process and material batch and the optimal remixing ratio, and complete the global correlation operation of multi-dimensional features to output the predicted value of the remixing ratio corresponding to each time series sample.

[0154] (3) Parallel computing settings: For parallel production scenarios with multiple batches and multiple grades, a multi-threaded parallel inference mode is adopted, with the number of threads set to 4 to ensure low latency for simultaneous operation of multiple lines. The single-sample inference latency is controlled within 10ms to meet the real-time production management and control requirements.

[0155] The structured processing of the computation results involves integrating the predicted values ​​output by the algorithm into a structured manner. For each time series sample, the corresponding batch code, tobacco brand, time series index, input feature value, and feature contribution ranking are added. The feature contribution is calculated based on the feature_importance function built into LightGBM and uses the split number of splits to output the contribution ratio of each feature to the prediction result, ensuring the interpretability of the computation results and meeting the requirements for compliance and traceability in tobacco production.

[0156] Preferably, for each prediction result, the model output confidence score is calculated. The confidence score is based on the inter-tree variance of the predicted values, and a confidence score threshold of 0.85 is set. Prediction results with a confidence score below the threshold are marked as low-confidence results, included in the anomaly log, and not included in subsequent output processes. At the same time, abnormal results with negative predicted values ​​or those exceeding the reasonable range of the process are removed. All valid calculation results that pass the verification are sorted in ascending order by time-series index to obtain the calculation result dataset of the full-dimensional feature fitting, and the algorithm inference calculation log and feature contribution report are obtained simultaneously.

[0157] Step S4.4: Perform numerical verification and format conversion on the calculation result dataset to obtain the real-time back-mixing ratio value.

[0158] Preferably, this step takes the dataset of calculation results after completing the full-dimensional feature fitting. The core is to complete the numerical compliance verification, boundary correction and format standardization conversion of the calculation results, and output the real-time re-blending ratio value that can be directly used for subsequent compliance verification, so as to ensure that the output results meet the process compliance requirements of cigarette manufacturing.

[0159] The implementation rules for numerical compliance verification and boundary correction are as follows: (1) Extract the upper and lower limits of compliance for the recycled tobacco blending process of the corresponding brand and batch from the bound standardized control dataset, and use them as the sole benchmark for numerical correction.

[0160] (2) For the predicted remixing ratio values ​​in the calculation result dataset, complete the range verification. If the value is lower than the lower limit threshold of the process, correct it to the lower limit threshold; if the value is higher than the upper limit threshold of the process, correct it to the upper limit threshold; if the value is within the compliance range, retain the original predicted value to ensure that the output value always meets the process compliance requirements.

[0161] (3) Numerical accuracy correction: All blending ratio values ​​are uniformly retained to two decimal places to maintain consistency with the accuracy standards of process control in the tobacco industry. The correction formula is as follows:

[0162] In the formula, R final For the final real-time re-doping ratio value, R predict R represents the algorithm's predicted value. lower R is the lower limit threshold of the process. upper `clip` is the upper limit threshold for the process, `clip` is the boundary truncation function, and `round` is the rounding function.

[0163] Preferably, the corrected blending ratio can be uniquely bound to the corresponding batch code, tobacco brand, and time sequence index to establish a one-to-one traceability relationship; at the same time, the format conversion is completed, converting the value into a floating-point format in the range of 0-1, so as to be consistent with the threshold format in the subsequent compliance verification process.

[0164] Preferably, numerical fluctuation verification rules can be set. For continuous time-series output results of the same batch and grade, if the fluctuation range of the re-blending ratio within adjacent 1s exceeds ±2%, smoothing processing is triggered. The numerical smoothing is completed by using the 3-point moving average method to avoid the impact of drastic numerical fluctuations on production stability. If the fluctuation exceeds ±5% for 3 consecutive time-series points, an abnormality warning is triggered and pushed to the workshop control platform.

[0165] Preferably, after all verifications and corrections are completed, a real-time backmixing ratio value uniquely bound to the corresponding batch, grade, and time series index is output, and a value correction log and fluctuation verification log are output synchronously. All logs are archived to the production log module, and the values ​​are synchronously stored in the time series database as the sole input data source for step S5.

[0166] Beneficial effects of steps S4.1 to S4.4: This series of steps performs algorithmic adaptation and multi-dimensional correlation calculations on inventory status time-series data, builds a re-blending ratio calculation link adapted to the cigarette manufacturing production scenario, and outputs real-time re-blending ratio values ​​that fit the actual production situation. This provides a core basis for the compliance management of subsequent re-blending operations and adapts to the accuracy requirements of cigarette production for re-blending ratio calculation.

[0167] Step S4.1 performs effective feature screening and time-series dimension unification of inventory time-series data to provide a suitable input basis for algorithm operation; Step S4.2 performs algorithm adaptation conversion of feature data to ensure compliance and adaptability of the operation process; Step S4.3 performs correlation fitting operation of multi-dimensional features to output operation results that fit the production status; Step S4.4 verifies and converts the operation results to output real-time blending ratio values ​​that can be directly used for subsequent compliance management.

[0168] Step S5: The real-time blending ratio value is compared with the corresponding grade process compliance threshold in the inventory status time series data in real time to obtain the compliance verification result and operation execution instruction.

[0169] Preferably, this step follows the real-time re-doping ratio value output in step S4. The core is to construct a complete process link for pre-compliance verification and instruction acquisition of the re-doping operation, complete the accurate matching of multi-source data, the compliant extraction of process thresholds, the real-time numerical comparison and the mapping of standardized control instructions, and solve the pain points of traditional manual verification, such as strong lag, high misjudgment rate and inability to achieve pre-production control. Finally, it outputs compliance verification results and standardized operation execution instructions, providing a unique and clear compliance basis and execution benchmark for the process execution in step S6.

[0170] Furthermore, step S5 specifically includes the following steps: Step S5.1: Extract the unique identifier of the corresponding grade and production batch from the real-time blending ratio value to obtain the blending ratio verification data with a unique matching identifier.

[0171] Preferably, the core of this step is to complete the extraction of the unique identifier and compliance verification of the real-time re-mixing ratio value, establish a globally unique traceability primary key for subsequent full-process matching verification, and output the re-mixing ratio verification data with a unique matching identifier.

[0172] The only input to this step is the real-time blending ratio structured dataset output from step S4. Each sample in the dataset contains the following fixed fields: production batch code BATCH_NO, tobacco grade code GRADE_NO, 13-bit Unix format time-series index TIME_INDEX, real-time blending ratio value REAL_TIME_MIXING_RATIO, and the corresponding grade's upper and lower limit thresholds for the process.

[0173] The joint unique identifier extraction rule adopts "production batch code + tobacco brand code + time sequence index" as the globally unique matching identifier. The production batch code is fixed as a 16-character type, the tobacco brand code is fixed as an 8-character type, and the time sequence index is fixed as a 13-digit type. The combination of these three types of fields can realize the unique traceability of a single blending ratio data in the entire production process, without the risk of duplicate primary keys.

[0174] The implementation rules for label compliance verification are as follows: (1) Non-empty verification: Null values, empty strings, and all-space characters are prohibited in the three types of identifier fields. The threshold for the non-empty pass rate of a single sample identifier field is set to 100%. Samples that do not reach the threshold are marked as invalid data, included in the abnormal log archive, and will not enter the subsequent process.

[0175] (2) Format verification: Strictly match the predefined encoding format rules. Samples that do not meet the format requirements are marked as abnormal data, triggering a data re-retrieval request. The maximum number of re-retrievals for a single sample is set to 3. If the number of re-retrievals exceeds the limit and the data still does not meet the standard, it will be directly removed.

[0176] (3) Deduplication verification: For samples with duplicate primary keys, only the latest valid data in time series is retained, and the remaining duplicate samples are directly removed to avoid subsequent matching conflicts.

[0177] Preferably, the unique identifier that has been verified is deeply bound to the corresponding real-time re-doping ratio value and process threshold field, and sorted in ascending order by time-series index to obtain the re-doping ratio verification data with unique matching identifier. The dataset is structured and stored with the unique matching identifier as the primary key, and the identifier extraction and verification logs are obtained synchronously.

[0178] Step S5.2: Match the blending ratio verification data with the inventory status time series data by grade and batch fields to obtain the threshold comparison dataset.

[0179] Preferably, this step takes the verification data of the blending ratio with a unique matching identifier. The core is to complete the multi-dimensional accurate matching of the verification data and the inventory status time series data, build a unified data benchmark for compliance comparison, and output the threshold comparison dataset.

[0180] The unique matching benchmark in this step is the real-time updated inventory status time-series data output in step S3, which is bound to the standardized management and control dataset. This dataset contains time-series inventory data corresponding to all batches and grades, process filing thresholds, and batch production lifecycle information, and maintains traceability consistency with the original data of the MES system extracted in step S1.

[0181] The three-level progressive precise matching rule is as follows: (1) Primary key matching: Using “BATCH_NO+GRADE_NO” as the joint primary key, the batch-grade dimension of the back-mixing ratio verification data and the inventory status time series data are accurately bound. The matching degree threshold is set to 100%. Samples that do not match the corresponding primary key are marked as having no baseline data, triggering the rematch process.

[0182] (2) Secondary time series matching: Based on the TIME_INDEX time series index, the time series matching tolerance threshold is set to 1s. Only valid samples with a time difference of less than 1s from the inventory time series data are retained to ensure the time series consistency of the comparison data and avoid comparison errors caused by time series misalignment.

[0183] (3) Three-level field mapping and matching: The full process threshold field, batch production status field and inventory status field of the corresponding batch and brand in the inventory status time series data are fully mapped and bound to the corresponding successfully matched back-mixing ratio verification data sample to achieve deep association at the field level.

[0184] Preferably, a single sample is considered valid if all three levels of matching pass; samples that fail are triggered for rematching, with a maximum of 3 rematches and a rematch interval of 500ms. Samples that still fail to match after exceeding the number of rematches are marked as matching anomalies, included in the anomaly log archive, and not proceeded to the next process; when the matching success rate of a single batch is less than 95%, a batch data anomaly warning is triggered and pushed to the workshop management platform.

[0185] Preferably, all successfully matched valid samples are sorted in ascending order by time-series index and stored in a structured manner with UNIQUE_MATCH_KEY as the primary key to obtain the threshold comparison dataset. The dataset contains core data on the back-mixing ratio, matched inventory time-series data, process threshold related fields, and batch production status fields, providing a complete data foundation for subsequent threshold extraction.

[0186] Step S5.3: Extract the process compliance threshold of the corresponding grade from the threshold comparison dataset to obtain the compliance benchmark threshold comparison dataset.

[0187] Preferably, this step takes the threshold comparison dataset and its core is to accurately extract and verify the validity of the corresponding grade process compliance threshold, establish a unique and compliant benchmark for compliance comparison, and output a compliance benchmark threshold comparison dataset.

[0188] Among them, the threshold precise extraction and locking rules adopt a "brand + batch" dual-dimensional locking mechanism. It prioritizes extracting the customized process compliance threshold of the corresponding batch in the threshold comparison dataset. For samples without customized thresholds, it extracts the general process compliance threshold of the corresponding tobacco brand registered in the MES system. The threshold extraction priority is: batch customized threshold > brand general threshold, ensuring that the thresholds are fully matched with the compliance requirements of the production work order.

[0189] The core field range for threshold extraction is fixed to two types of core threshold fields: the lower limit threshold for the proportion of recycled tobacco shreds to be blended back into the base and the upper limit threshold for the proportion of recycled tobacco shreds to be blended back into the base. At the same time, the effective time range, filing number and corresponding formula code of the threshold are also extracted to ensure the traceability of the threshold.

[0190] The threshold validity verification implementation rules set up a triple compliance verification rule. The threshold that passes all rules is determined to be a valid compliance benchmark, as detailed below: (1) Numerical range verification: The threshold must satisfy the formula 0≤LOWER_LIMIT≤UPPER_LIMIT≤1. Thresholds that do not conform to the numerical logic are deemed invalid.

[0191] (2) Effective time verification: The effective time range of the threshold must completely cover the production time window of the corresponding batch. Thresholds that exceed the effective period are deemed invalid.

[0192] (3) Filing compliance verification: The threshold must be completely consistent with the parameters filed in the process module of the MES system. Unfiled custom thresholds are deemed invalid.

[0193] Preferably, an invalid threshold triggers a threshold re-retrieval process. The corresponding batch and grade filing threshold is retrieved again from the process module of the MES system through the standard API interface built in step S1. The maximum number of retrievals is set to 3. If a sample still cannot obtain a valid threshold after exceeding the number of retrievals, it is marked as a threshold anomaly, included in the anomaly log archive, and will not enter the subsequent comparison process.

[0194] Preferably, the valid compliance threshold that has been verified can be uniquely bound to the corresponding sample in the threshold comparison dataset. Each sample is matched with a unique and compliant comparison benchmark, and the benchmarks are sorted in ascending order by time-series index to obtain the compliance benchmark threshold comparison dataset. Threshold extraction and verification logs are obtained simultaneously.

[0195] Step S5.4: Compare the real-time re-doping ratio values ​​in the compliance benchmark threshold comparison dataset with the corresponding grade process compliance threshold values ​​in real time to obtain the compliance verification results.

[0196] Preferably, this step takes the compliance benchmark threshold comparison dataset, and the core is to complete the real-time comparison of the real-time re-doping ratio value with the compliance threshold value, and output clear and traceable compliance verification results.

[0197] Among them, the real-time comparison triggering mechanism can adopt a real-time triggering mode that is synchronized with the data update frequency. The comparison calculation of all valid samples is completed every 1 second, which is completely consistent with the output frequency of the remixing ratio in step S4 and the update frequency of the inventory data in step S3, ensuring the real-time nature of compliance verification and realizing the pre-control of the production process.

[0198] The core formula for compliance determination is as follows: LOWER_LIMIT≤REAL_TIME_MIXING_RATIO≤UPPER_LIMIT Based on the above formula, three types of fixed judgment results can be set: (1) Samples that meet the core condition formula are judged as "compliant" in compliance verification.

[0199] (2) For samples whose real-time remixing ratio is lower than the lower limit threshold, the compliance verification result is judged as "not compliant if it is lower than the lower limit".

[0200] (3) For samples whose real-time remixing ratio is higher than the upper limit threshold, the compliance verification result is judged as "higher than the upper limit and non-compliant".

[0201] Preferably, to avoid misjudgment caused by instantaneous numerical fluctuations in industrial scenarios, a continuous anomaly judgment threshold is set. Only when samples of the same batch and brand are judged to be non-compliant for three consecutive time periods (3s) are they marked as valid anomalies. Anomalies at a single time point are marked as instantaneous fluctuations, are only included in the log record, and do not trigger the anomaly control process.

[0202] Preferably, each sample's compliance verification result can be bound with a unique matching identifier, comparison timestamp, valid compliance threshold, real-time re-doping ratio, judgment result, anomaly type, and deviation rate, wherein the deviation rate is calculated using the following formula:

[0203] The deviation rate is used to quantify the degree of deviation of non-compliant samples, providing a basis for subsequent instruction classification.

[0204] Preferably, all samples that have completed the comparison are arranged in ascending order by time-series index, and stored in a structured manner with a unique matching identifier as the primary key to obtain a compliance verification result dataset. The entire comparison operation log is obtained synchronously and archived to the production log module.

[0205] Step S5.5: Match and map the compliance verification results with the external process control rules to obtain the operation execution instructions.

[0206] This step follows the compliance verification results. Its core is to match and map the verification results with the standardized process control rules to obtain standardized operation execution instructions that can be directly executed, providing a clear execution basis for subsequent process control.

[0207] Regarding the source and standardization of process control rules, the process control rules adopted in this step are all from the predefined and filed standardized rules in the production process control module of the MES system. The rules are synchronized through the standard API interface built in step S1. The rules are fixed and there is no real-time human intervention, which fully adapts to the compliance control requirements of cigarette manufacturing.

[0208] The hierarchical rule mapping mechanism sets three levels of fixed mapping rules based on the type of compliance verification results and valid anomaly markers, with no custom rule branches, as detailed below: (1) Level 1 rule: The compliance verification result is “compliant”, which is mapped to “re-mixing process release instruction”. The instruction execution content is to allow the corresponding batch of re-mixing operation to be executed normally without control restrictions.

[0209] (2) Secondary rule: If the compliance verification result is "non-compliant" and the anomaly type is "non-compliant below the lower limit", regardless of whether it is a valid anomaly, it will be mapped to "re-mixing ratio adjustment prompt instruction". The instruction execution content is to push the ratio adjustment prompt, without blocking the normal production process.

[0210] (3) Level 3 rule: If the compliance verification result is “non-compliant”, the anomaly type is “non-compliant above the upper limit” and the valid anomaly is marked as True, it is mapped to “intercept and lock instruction for the remixing process”. The instruction execution content is to immediately suspend the remixing operation process of the corresponding batch, lock the material conveying link, and trigger the abnormal warning of the workshop control platform.

[0211] Preferably, each obtained operation execution instruction contains standardized fields: globally unique instruction ID, associated unique matching identifier, associated batch code, associated tobacco brand, instruction type, execution content, execution time limit, and triggering condition. The instruction execution time limit is fixed at 1 second, meaning that the instruction must be executed immediately after it is issued to ensure the real-time nature of control.

[0212] Preferably, a dual verification rule can be set: first, the instruction type must be within the range of three predefined enumeration values; second, the associated batch must be in a production state. Instructions that pass both verifications are determined to be valid and executable instructions, while invalid instructions are directly removed and included in the exception log archive.

[0213] Preferably, all valid operation execution instructions that pass verification are uniquely bound to the corresponding compliance verification results, arranged in ascending order by time sequence index, to obtain a standardized operation execution instruction dataset, which is synchronously output to step S6. At the same time, the instruction mapping full-process log is obtained and archived to the MES system production log module.

[0214] Beneficial effects of steps S5.1 to S5.5: This series of steps establishes a compliance verification and instruction acquisition link for the blending ratio, accurately matches and compares the blending ratio with the process compliance threshold, outputs compliance verification results and corresponding operation execution instructions, provides a clear execution basis for the pre-control of blending operations, reduces the risk of process execution deviation, and adapts to the compliance control needs of cigarette production.

[0215] The process involves the following steps: Step S5.1 extracting the unique identifier from the blending ratio data to provide a clear benchmark for subsequent accurate matching; Step S5.2 matching the fields of the blending ratio data with the inventory time-series data to establish a unified data foundation for compliance comparison; Step S5.3 accurately extracting the compliance threshold for the corresponding grade to clarify the benchmark for compliance verification; Step S5.4 comparing the values ​​of the blending ratio and the compliance threshold to output a clear compliance verification result; and Step S5.5 matching and mapping the verification result with the process rules to obtain directly executable operation control instructions.

[0216] Step S6: Based on the compliance verification results and operation execution instructions, the corresponding remixing operation is released or blocked, and the full process operation log and archived data are obtained and sent back to the external manufacturing execution system.

[0217] Preferably, this step follows the compliance verification results and operation execution instructions output in step S5. The core is to complete the implementation of control instructions, trace the entire process of operation, archive and transmit the data in a closed loop from the Manufacturing Execution System (hereinafter referred to as the MES system). This builds a closed-loop control system for the entire process from data collection and compliance verification to instruction execution and data archiving. It solves the pain points of traditional recycled tobacco re-blending control, such as lack of traceability, lack of process closure, and data asynchrony. Finally, it completes the end of the entire process control link and ensures the compliance, traceability and data consistency of the entire recycled tobacco inventory management process.

[0218] Furthermore, step S6 specifically includes the following steps: Step S6.1: Parse the instruction fields and verify the execution validity of the compliance verification results and operation execution instructions. After the verification is passed, the process control instructions are obtained.

[0219] Preferably, the core of this step is to complete the field parsing of the control instructions, the dual verification of execution permissions and validity, eliminate invalid, unauthorized, and expired instructions, and output compliant and executable process control instructions, providing a unique and compliant execution benchmark for subsequent process execution.

[0220] Preferably, the only input to this step is the standardized operation execution instruction dataset and the bound compliance verification result dataset output from step S5. Each instruction always contains the following core fields: globally unique instruction ID, associated unique matching identifier, production batch code, tobacco brand code, time sequence index, instruction type enumeration value, execution content, execution time threshold, triggering condition, and the full data of the bound compliance verification results.

[0221] The rules for full parsing of instruction fields are as follows: (1) A hierarchical parsing logic is adopted. First, the instruction metadata is parsed to extract global identifier fields such as instruction ID, batch, brand, and time sequence index, and a unique traceability primary key for the entire life cycle of the instruction is established. Then, the core execution parameters of the instruction are parsed to extract the instruction type, execution content, and execution time. The predefined enumeration value range is strictly matched, and the parsing of non-standard instruction content is prohibited. Finally, the associated compliance data is parsed to extract the bound compliance verification results, threshold comparison data, and backmixing ratio values, providing a benchmark for subsequent validity verification.

[0222] (2) The parsing process adopts the UTF-8 unified encoding format, and cleans up special characters and garbled fields. Fields that fail to be parsed are marked as parsing exceptions, and the corresponding instructions are included in the invalid instruction processing.

[0223] The implementation rules for the four-fold validation of execution validity are as follows: (1) First layer: Integrity verification. Define a list of required fields for instructions. Set the pass rate threshold for non-empty fields of a single instruction to 100%. Instructions that do not reach the threshold are judged as invalid instructions with abnormal integrity and are directly removed.

[0224] (2) Second layer: Permission compliance verification. The production operation permission matrix of the MES system is synchronized through the API interface built by S1.1 to verify the execution permission of the corresponding batch, workstation and operation type of the instruction. Instructions without corresponding execution permissions are judged as unauthorized invalid instructions and are directly removed. Unauthorized operation warning logs are obtained synchronously.

[0225] (3) Third layer: Timeliness verification. Based on the timing index carried by the instruction, the effective duration threshold of the instruction is set to 5s. That is, if the difference between the time the instruction is obtained and the current system time exceeds 5s, it is judged as an expired instruction and directly removed to avoid expired instructions from interfering with the normal production process.

[0226] (4) Fourth layer: Production status consistency verification. Verify the real-time production status of the batch corresponding to the instruction. The instruction is considered valid only when the batch is in the "in production" state; if the batch is in the completed, paused, or canceled state, the instruction is considered invalid and is directly discarded.

[0227] Preferably, invalid instructions are synchronously logged as exception logs and archived to the production safety log module; all valid instructions that pass the four-fold verification are standardized and converted into a format, arranged in ascending order by time sequence index to obtain process control instructions, and each instruction is bound to a unique execution serial number to provide a traceability basis for subsequent execution.

[0228] Step S6.2: Send the process control command to the corresponding remixing operation process link, execute the corresponding remixing operation process release or interception lock, and obtain the process operation record with real-time execution status.

[0229] Preferably, this step follows the process control instructions output in step S6.1. The core is to complete the industrial-grade issuance and execution of the instructions, realize the process release or interception and locking of the back-mixing operation, and simultaneously collect execution feedback to obtain process operation records with real-time execution status.

[0230] Specifically, for the instruction delivery link specification, the OPC UA unified architecture communication protocol conforming to tobacco industry standards can be adopted. The instruction is delivered to the PLC programmable logic controller of the tobacco processing line, the WCS control system of the warehouse, and the field HMI human-machine interface through the workshop industrial ring network. The communication process adopts triple authentication of username + password + X.509 certificate, which is consistent with the security system of step S1.1 to ensure the security of the industrial control link.

[0231] Specifically, the execution rules for hierarchical instructions strictly match the instruction type to execute the corresponding operation, with no custom execution branches, as detailed below: (1) Execution of release command for the re-blending process: Send a “allow operation” signal to the PLC control system of the corresponding batch of re-blending pipeline, open the solenoid valve for conveying recycled tobacco material, unlock the metering belt operation permission, and simultaneously push the release information to the on-site HMI interface. The command execution response threshold is set to 200ms, that is, the hardware action response must be completed within 200ms after the command is issued.

[0232] (2) Execution of instructions for adjusting the remixing ratio: Only pushes standardized prompt pop-ups to the on-site HMI interface. The pop-up content includes the current remixing ratio, compliance threshold range, and adjustment suggestions. It does not interfere with the operation of hardware equipment, does not lock the production process, and ensures production continuity.

[0233] (3) Interception and lock command execution of the re-blending process: Send a "safety pause" signal to the corresponding PLC control system, immediately close the solenoid valve for conveying recycled tobacco materials, stop the metering belt from running, lock the material conveying authority of the corresponding batch, trigger the on-site sound and light warning simultaneously, push the abnormal information to the workshop central control platform, and set the command execution response threshold to 100ms to ensure rapid control of abnormal situations.

[0234] Specifically, for real-time acquisition and feedback verification of execution status: after the instruction is issued, the execution feedback signals of the PLC and WCS system are continuously acquired with a sampling period of 50ms, and the following three fixed execution states are set: (1) Execution successful: A positive execution feedback signal is received from the device, the action is 100% complete, and it is completely matched with the instruction execution content.

[0235] (2) Execution failure: A fault feedback signal is received from the device, or the hardware action is not completed as required by the instruction.

[0236] (3) Execution timeout: The execution timeout threshold has been exceeded and no feedback signal has been received.

[0237] Preferably, for the execution process of each instruction, a process operation record with real-time execution status is obtained. The record fixedly includes the following fields: execution serial number, instruction ID, batch code, brand code, instruction type, issuance time, execution completion time, execution status, equipment feedback signal, execution exception information, and on-site operation station code. Each record is uniquely bound to the corresponding instruction, with no duplication or omission.

[0238] Preferably, if an instruction fails to execute or times out, a second retransmission process is immediately triggered. The maximum number of retransmissions is set to 2, and the retransmission interval is 500ms. If the retransmission still fails, an equipment execution anomaly warning is obtained and pushed to the workshop equipment operation and maintenance platform. The anomaly information is also recorded in the operation log.

[0239] Step S6.3 involves performing full-link matching and binding of process operation records with real-time execution status with corresponding batch, brand, and time-series related data to obtain a traceability related operation detail dataset.

[0240] Preferably, this step takes over the process operation record with real-time execution status. The core is to complete the full-link matching and binding of the operation record with the whole process related data, build a complete traceability link from raw material warehousing to re-blending execution, and obtain the operation detail dataset with complete traceability association.

[0241] Specifically, for the end-to-end matching and binding benchmark, the standardized control dataset obtained from the entire process of steps S1-S5 is used as the unique binding benchmark, "UNIQUE_MATCH_KEY unique matching identifier" is used as the core association primary key, and "BATCH_NO batch code + GRADE_NO brand code + TIME_INDEX time sequence index" is used as the auxiliary association key to achieve deep binding between operation records and end-to-end data.

[0242] The implementation rules for the three-level progressive full-link binding are as follows: (1) Level 1: Core primary key binding. The process operation records are bound one-to-one with the compliance verification results output by S5, the real-time remixing ratio value output by S4, and the inventory status time series data output by S3 through UNIQUE_MATCH_KEY, so as to realize reverse traceability from instruction execution to remixing ratio calculation and inventory calculation.

[0243] (2) Level 2: Time-series link binding. Based on the execution time of the operation record, the time-series link of the corresponding batch production cycle is aligned, and the operation record is bound to the full time-series nodes of batch work order issuance, raw material feeding, recycled tobacco shreds warehousing, warehousing, and re-blending. The production link context before and after the operation is completed, and the time-series traceability of the entire production process is realized.

[0244] (3) Level 3: Material traceability binding. By matching the batch code and brand code, the corresponding batch of recycled tobacco shreds, storage location, material code, place of origin information and inspection report number are matched to complete the binding of the entire material chain from the execution of the blending operation to the source of recycled tobacco shreds entering the warehouse, so as to realize the traceability of the entire life cycle of materials and meet the material traceability compliance requirements of the tobacco industry.

[0245] Preferably, for each operation record, the full-link matching threshold is set to 100%, that is, all related data of the three-level binding must be fully matched. Unmatched related nodes trigger the data completion process, pull the corresponding missing data from the MES system through the API interface of S1.1, and the failure to complete is marked as a source traceability exception and included in the exception log archive.

[0246] Preferably, all operation records that have completed the full-link binding are arranged in ascending order of time and structured to obtain a detailed dataset of operations that have completed traceability association. Each detailed data includes full information on operation execution, bound compliance verification data, blending ratio data, inventory data, production timeline data, and material traceability data. Each detailed unit has independent full-process traceability capabilities and can complete full-link traceability without relying on external data.

[0247] Step S6.4: Perform full-field integrity verification and format standardization conversion on the traceability and related operation detail dataset to obtain the full-process operation log and archived data.

[0248] Preferably, this step involves completing the operation details dataset for traceability and association. The core is to complete the full field integrity verification and format standardization conversion to obtain the full process operation log and archived data that conform to the tobacco industry archiving standards, providing compliant and tamper-proof original data for subsequent auditing, tracing, and review.

[0249] The implementation rules for full-field integrity verification are as follows: (1) Define the core archive field list of the traceability detail dataset, covering all dimensions of operation execution, compliance verification, proportion calculation, inventory data, and material traceability. The threshold for the non-empty pass rate of the core archive field of a single detail data is set to 100%. Detail data that does not reach the threshold triggers the field completion process. Failed completion is marked as an archive exception and included in the exception log archive.

[0250] (2) Data consistency verification: Verify the logical consistency of each related field in the detailed data, including the consistency of batch code, brand code, and time series index in the full-dimensional data. Data with logical conflicts are marked as abnormal and are included in the archiving scope after correction.

[0251] The implementation rules for format standardization conversion follow the "Tobacco Industry Cigarette Production Data Archiving Management Standard," as detailed below: (1) Character fields: uniformly converted to UTF-8 encoding format, removing redundant leading and trailing spaces, unifying uppercase and lowercase standards, and escaping special characters to ensure the readability and compatibility of archived data.

[0252] (2) Numerical fields: The unit of weight fields is uniformly kg, and the precision is retained to 2 decimal places; the ratio fields are uniformly floating-point format in the range of 0-1, and the precision is retained to 4 decimal places; the time fields are uniformly converted to a dual format of 13-bit Unix timestamp + East 8th time zone formatted time to ensure the consistency of time base.

[0253] (3) Structured fields: The structured content such as the bound associated data and time series context is uniformly converted into the JSON standardized format for storage to ensure the parsability of the archived data.

[0254] The rules for obtaining the full-process operation log and archived data are as follows: (1) Operation log classification: There are three types of standardized logs: production operation log, which records the entire process information of all re-blending operations; control and compliance log, which records the entire process information of all compliance verification, threshold comparison and instruction; and abnormal alarm log, which records all abnormal events, warning information and processing results of the entire process. All three types of logs are obtained as independent log files on a daily basis. The file naming rule is "year + month + date + log type + recycled tobacco inventory control.log".

[0255] (2) Encrypted storage of archived data: The full set of detailed data that has been standardized and converted is encrypted and stored using the AES-256 symmetric encryption algorithm. At the same time, each archived file is provided with a SHA-256 hash verification value to prevent the archived data from being tampered with. The archived data storage period is set to no less than 3 years, which meets the requirements for archiving and retaining production data in the tobacco industry.

[0256] Preferably, the completed archived data is obtained, and the final verification of format compliance, integrity, and immutability is completed. Data that passes the verification is marked as compliant archived data and included in the production archive. Data that fails the verification is triggered to re-obtain the process and the archived exception log is obtained synchronously.

[0257] Step S6.5: The entire process operation log and archived data are sent back to the external manufacturing execution system through the standard API interface to perform bidirectional synchronization of the entire process data.

[0258] Preferably, this step involves receiving the entire process operation logs and archived data. The core is to complete the compliant data back to the external MES system through the standard API interface, realize the two-way synchronization between the entire process control data and the enterprise's main production system, and complete the entire process data closed loop of the recycled tobacco inventory management method.

[0259] Among them, the compliance communication session channel built in step S1.1 of the backhaul link specification reuse adopts the RESTful standard API architecture, and completes data backhaul based on the HTTPSTLS1.3 encryption protocol and X.509 two-way digital certificate authentication. The backhaul permissions are consistent with the backhaul permissions of the MES system configured in S1.1, ensuring the security and compliance of data transmission.

[0260] The return trigger mechanism and data range are as follows: (1) Triggering mechanism: The dual mode of real-time triggering + batch retransmission is adopted. Real-time retransmission is triggered within 1 second after a single operation is completed and the archived data is obtained. Batch retransmission of the full archived data of the previous day is triggered at 2:00 am every day to ensure that there is no omission or missing data.

[0261] (2) Scope of data to be returned: Full return of the entire process operation log, archived data metadata, compliance verification results, real-time blending ratio values, real-time inventory status time series data, and abnormal alarm information. The format of the returned data is fully compatible with the data interface specification of the MES system and there are no non-standard data fields.

[0262] The mechanisms for ensuring idempotency and reliability in data return are as follows: (1) Idempotency: Each return data packet carries a unique return ID, which is obtained in UUIDv4 format. The MES system performs deduplication based on the return ID to avoid data redundancy caused by repeated reporting and ensure data consistency.

[0263] (2) Failure retransmission mechanism: If the MES system does not receive a successful ACK response within 10 seconds after the return request is sent, it is determined that the return has failed and the automatic retransmission process is triggered. The maximum number of retransmissions is set to 3, and the retransmission interval increases exponentially, namely 5s, 10s, and 20s. If the return still fails after exceeding the maximum number of retransmissions, a return exception log is obtained and pushed to the workshop operation and maintenance platform. The retransmission is triggered after the link is restored.

[0264] Preferably, after receiving the ACK success response from the MES system, the corresponding data packet is marked as completed and the return receipt number of the MES system is simultaneously bound to the corresponding archived data to complete the closed-loop confirmation of two-way data synchronization throughout the entire process. After all batches of production are completed, a closed-loop report of the entire process control is obtained and simultaneously pushed to the production management module of the MES system to complete the final closing of the entire recycled tobacco inventory management process.

[0265] Beneficial effects of steps S6.1 to S6.5: This series of steps implements the control instructions for re-blending and constructs a closed-loop data system for the entire process. It achieves standardized process control and full-chain traceability support for re-blending operations, synchronously transmits full-process control data back to the external manufacturing execution system, connects the beginning and end links of the entire process of recycling tobacco inventory control, and adapts to the closed-loop management needs of digital control of cigarette manufacturing.

[0266] Specifically, step S6.1 involves parsing the fields of the control instructions and verifying their execution validity to ensure the compliance and executability of the process control instructions; step S6.2 involves issuing and executing the control instructions, and controlling the release or interception of the back-mixing operation process; step S6.3 involves matching and binding the process operation records and related data across the entire chain to provide complete detailed data support for production traceability; step S6.4 involves verifying the integrity of the operation details data and standardizing its conversion to form a standardized full-process operation log and archived data; and step S6.5 involves transmitting and synchronizing the full-process control data back to achieve a two-way data closed loop with the external manufacturing execution system.

[0267] In summary, the overall beneficial effects of steps S1 to S6 in this embodiment are as follows: This embodiment addresses the core technical pain points of recycled tobacco inventory management by establishing a two-way data interaction link with the manufacturing execution system. It constructs a full-process control system from data acquisition to closed-loop feedback, enabling accurate accounting of recycled tobacco inventory data and real-time compliant control of blending operations. This adapts to the refined management requirements of cigarette manufacturing and provides effective support for digital control of the cigarette manufacturing process.

[0268] Specifically, step S1 provides a unified closed-loop basic data source for the entire process control, ensuring the consistency of control benchmarks; step S2 performs standardized processing of basic data to improve the quality of basic data in subsequent accounting stages; step S3 realizes the time-series dynamic update of inventory status, reducing the deviation between inventory data and actual status; step S4 performs accurate calculation of the blending ratio, providing a reliable basis for compliance control; step S5 realizes pre-compliance verification of blending operations, reducing the risk of process execution deviations; and step S6 performs closed-loop execution of the control process and data synchronization, supporting traceable management of the entire process.

[0269] like Figure 2 As shown, this embodiment provides an example of an inventory management device for recycled tobacco. In this embodiment, the inventory management device is applied to the inventory management method described in the above embodiment.

[0270] Specifically, the inventory management device includes a closed-loop production dataset acquisition module 1, a closed-loop production dataset preprocessing module 2, an inventory status time-series data calculation module 3, a real-time blending ratio calculation module 4, a real-time blending ratio comparison module 5, and a blending operation module 6, which are connected electrically or through communication in sequence.

[0271] The closed-loop production dataset acquisition module 1 is used to acquire production batches, tobacco grades, process compliance thresholds, and batch feeding data of tobacco shreds from an external manufacturing execution system to obtain a closed-loop production dataset. The closed-loop production dataset preprocessing module 2 is used to preprocess the closed-loop production dataset to obtain a standardized control dataset. The inventory status time-series data calculation module 3 is used to acquire the warehousing and outbound operation events of tobacco shreds, and associate the standardized control dataset with the warehousing and outbound operation events according to the time series using a real-time inventory dynamic update model. Based on time-series cumulative calculation, it obtains the real-time updated inventory bound to the standardized control dataset. The system includes: a real-time re-blending ratio calculation module 4, which inputs inventory status time-series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time re-blending ratio value; a real-time re-blending ratio comparison module 5, which compares the real-time re-blending ratio value with the corresponding grade process compliance threshold in the inventory status time-series data to obtain compliance verification results and operation execution instructions; and a re-blending operation module 6, which releases or intercepts the corresponding re-blending operation process based on the compliance verification results and operation execution instructions, obtains the full-process operation log and archived data, and sends it back to the external manufacturing execution system.

[0272] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Figure 3 As shown, the electronic device 7 includes a processor 71 and a memory 72 coupled to the processor 71.

[0273] The memory 72 stores program instructions for implementing the inventory management method for recycled tobacco shreds in any of the above embodiments.

[0274] The processor 71 is used to execute program instructions stored in the memory 72 for inventory management of recycled tobacco.

[0275] The processor 71 can also be referred to as a CPU (Central Processing Unit). The processor 71 may be an integrated circuit chip with signal processing capabilities. The processor 71 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0276] Furthermore, Figure 4 This is a schematic diagram of the structure of a storage medium according to an embodiment of this application. See also: Figure 4The storage medium 8 in this embodiment stores program instructions 81 capable of implementing all the above methods. These program instructions 81 can be stored in the storage medium as a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in each embodiment of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0277] In the several embodiments provided in this application, it should be understood that the disclosed apparatus, devices, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, signal, or other forms.

[0278] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method of managing the stock of recovered tobacco, characterized in that, The inventory management method includes: Step S1: Obtain the production batch, tobacco grade, process compliance threshold, and batch feeding data of the tobacco from the external manufacturing execution system to obtain a closed-loop production dataset; Step S2: Perform data preprocessing on the closed-loop production dataset to obtain a standardized control dataset; Step S3: Obtain the inbound and outbound operation events of tobacco shreds, and associate the standardized management dataset with the inbound and outbound operation events in a time series using a real-time inventory dynamic update model. Based on time series cumulative calculation, obtain the real-time updated inventory status time series data bound to the standardized management dataset. Step S4: Input the inventory status time series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time blending ratio value; Step S5: Compare the real-time blending ratio value with the corresponding grade process compliance threshold in the inventory status time series data in real time to obtain the compliance verification result and operation execution instruction; Step S6: Based on the compliance verification result and the operation execution instruction, perform the corresponding back-mixing operation process release or interception lock, obtain the full process operation log and archived data, and send them back to the external manufacturing execution system.

2. The inventory management method according to claim 1, characterized by, Step S1: Obtain the production batch, tobacco grade, process compliance threshold, and batch feed data of the tobacco shreds from the external manufacturing execution system to obtain a closed-loop production dataset, including: Step S1.1: Establish a compliant communication session channel with the external manufacturing execution system through the standard API interface; Step S1.2: Extract the production batch, tobacco grade, process compliance threshold, and batch feeding data of the tobacco shreds from the external manufacturing execution system through the compliant communication session channel to obtain the original production data set; Step S1.3: Perform field integrity matching and data source tracing verification on the original production data set. After the verification is passed, the initial production dataset is obtained. Step S1.4: Obtain the real-time operation records of the external manufacturing execution system through the compliant communication session channel, and perform time-series alignment and matching with the initial production dataset to obtain the closed-loop production dataset.

3. The inventory management method according to claim 1, characterized by, Step S2: Perform data preprocessing on the closed-loop production dataset to obtain a standardized management and control dataset, including: Step S2.1: Perform non-empty verification of key fields and format verification of numerical fields on the closed-loop production dataset to obtain a format-screened production dataset. Step S2.2: Filter the production dataset with abnormal value ranges and remove invalid field values ​​to obtain the outlier-processed production dataset. Step S2.3: Perform field logical consistency verification and brand batch association matching on the outlier processing production dataset to obtain the logical verification production dataset; Step S2.4: Perform time-series dimension alignment and data format unification conversion on the logical verification production dataset to obtain a standardized management dataset.

4. The inventory management method according to claim 1, characterized by, Step S3: Obtain the inbound and outbound operation events of tobacco shreds, and associate the standardized management dataset with the inbound and outbound operation events according to the time series using a real-time inventory dynamic update model. Based on time-series cumulative calculation, obtain the real-time updated inventory status time-series data bound to the standardized management dataset, including: Step S3.1: Obtain the inbound and outbound operation events of tobacco shreds, and perform field integrity verification and time sequence validity verification. After the verification is passed, the set of inbound and outbound operation events is obtained. Step S3.2: Match the inbound and outbound operation event set with the standardized management dataset by the time dimension field to obtain a time-series matching dataset and operation event combination; Step S3.3: Input the dataset and operation event combination into the real-time inventory dynamic update model, and perform full-dimensional association and binding according to the time series to obtain the time-series associated model operation dataset; Step S3.4: Perform time-series cumulative calculation on the model calculation dataset to obtain real-time updated inventory status time-series data bound to the standardized management and control dataset.

5. The inventory management method according to claim 1, characterized by, Step S4: Input the inventory status time-series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time blending ratio value, including: Step S4.1: Extract effective feature fields and unify the time series dimensions of the inventory status time series data to obtain an initial feature dataset adapted to the LightGBM algorithm; Step S4.2: Input the initial feature dataset into the LightGBM algorithm to perform dimension matching and format compliance conversion of the feature fields to obtain a standardized computation dataset; Step S4.3: Perform multi-dimensional feature association operations on the standardized computation dataset to obtain a computation result dataset of full-dimensional feature fitting. Step S4.4: Perform numerical verification and format conversion on the calculation result dataset to obtain the real-time doping ratio value.

6. The inventory management method according to claim 1, characterized in that, Step S5: Compare the real-time blending ratio with the corresponding grade process compliance threshold in the inventory status time series data in real time to obtain the compliance verification result and operation execution instruction, including: Step S5.1: Extract the unique identifier of the corresponding grade and production batch from the real-time re-blending ratio value to obtain the re-blending ratio verification data with a unique matching identifier; Step S5.2: Match the grade and batch fields of the blending ratio verification data with the inventory status time series data to obtain the threshold comparison dataset; Step S5.3: Extract the process compliance threshold of the corresponding grade from the threshold comparison dataset to obtain the compliance benchmark threshold comparison dataset; Step S5.4: Compare the real-time re-doping ratio value in the compliance benchmark threshold comparison dataset with the corresponding grade process compliance threshold in real time to obtain the compliance verification result; Step S5.5: Match and map the compliance verification results with the external process control rules to obtain the operation execution instructions.

7. The inventory management method according to claim 1, characterized in that, Step S6 involves releasing or blocking the corresponding back-mixing operation based on the compliance verification result and the operation execution instruction, obtaining the full-process operation log and archived data, and transmitting them back to the external manufacturing execution system, including: Step S6.1: Parse the instruction fields and verify the execution validity of the compliance verification result and the operation execution instruction. After the verification is passed, the process control instruction is obtained. Step S6.2: Send the process control command to the corresponding remixing operation process link, execute the corresponding remixing operation process release or interception lock, and obtain the process operation record with real-time execution status; Step S6.3: Perform full-link matching and binding of process operation records with real-time execution status with corresponding batch, brand, and time sequence related data to obtain a traceability related operation detail dataset; Step S6.4: Perform full-field integrity verification and format standardization conversion on the traceability and related operation detail dataset to obtain the full-process operation log and archived data; Step S6.5: The full-process operation log and the archived data are sent back to the external manufacturing execution system through the standard API interface to perform bidirectional synchronization of the full-process data.

8. An inventory management device for recycled tobacco, wherein the inventory management device is applied to the inventory management method as described in any one of claims 1 to 7, characterized in that, The inventory management device includes: The closed-loop production dataset acquisition module is used to obtain the production batch, tobacco grade, process compliance threshold, and batch feeding data of tobacco from the external manufacturing execution system to obtain the closed-loop production dataset. The closed-loop production dataset preprocessing module is used to preprocess the closed-loop production dataset to obtain a standardized control dataset. The inventory status time-series data calculation module is used to acquire the inbound and outbound operation events of tobacco shreds, and associate the standardized management dataset with the inbound and outbound operation events in a time series according to the real-time inventory dynamic update model, and obtain the real-time updated inventory status time-series data bound to the standardized management dataset based on time-series cumulative calculation. The real-time blending ratio calculation module is used to input the inventory status time series data into the LightGBM algorithm for multi-dimensional feature association calculation to obtain the real-time blending ratio value. The real-time re-blending ratio value comparison module is used to compare the real-time re-blending ratio value with the corresponding grade process compliance threshold in the inventory status time series data in real time, and obtain the compliance verification result and operation execution instruction. The re-doping operation module is used to release or block the corresponding re-doping operation process based on the compliance verification result and the operation execution instruction, obtain the full process operation log and archived data, and send them back to the external manufacturing execution system.

9. An electronic device, characterized in that, The method includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the inventory management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed by a processor, enable the inventory management method as described in any one of claims 1 to 7.