Construction method and system of tea product whole-process quality tracing data table
By constructing a data platform for the entire process of tea product quality traceability, unified collection and standardized processing of data for the entire tea product process have been achieved. A ternary correlation model has been established and multi-level early warning rules have been designed, which has solved the problems of data silos, broken traceability chains and delayed early warnings in tea product production, and achieved efficient data exchange, rapid traceability and real-time early warning.
Patent Information
- Application Number
- CN202511484133.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-17
AI Technical Summary
The existing tea product quality traceability system suffers from serious data silos, broken traceability chains, and delayed early warning responses. It cannot achieve linked queries of material batches, production work orders, and quality inspection records, resulting in long raw material traceability times and high non-conforming product rates.
A data platform for the entire process of tea product quality traceability is constructed. By collecting and standardizing warehousing, production and quality inspection data, a ternary correlation model is established to realize many-to-many correlation between batch work orders and inspection sheets. Multi-level early warning rules are designed, and multi-dimensional correlation early warning of quality anomalies is carried out in combination with the real-time data platform.
It achieved a data interoperability rate of 99%, reduced the full-process traceability time to 1560 minutes, the early warning response time to 5 minutes, and reduced the non-conforming product rate to 2%, solving the problems of low traceability efficiency and lagging quality control caused by data fragmentation in tea product production.
Smart Images

Figure CN120975804A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to an industrial data management and quality control system, in particular to a construction method and system of a tea product whole-process quality traceability data platform. BACKGROUND
[0002] The existing tea product quality traceability system mostly adopts a decentralized architecture, which has the following core defects: 1. Serious data island: warehouse management system (WMS), manufacturing execution system (MES), and quality management system (QMS) data are stored independently, and the intercommunication rate is low. The traditional system cannot realize the linkage query of material batch, production work order, and quality inspection record, resulting in that the raw material traceability takes as long as 1 3 days.
[0003] 2. Broken traceability chain: only covers part of the nodes in the production link (such as finished product detection), and lacks the whole-process data association from raw material storage (batch management), production material taking (work order association) to semi-finished product / finished product quality inspection. The existing technology is difficult to track the association between auxiliary material batch and finished product quality, and the coverage rate of key links is 70%.
[0004] 3. Early warning response lag: quality abnormality warning relies on manual inspection, and the response time is long, and it is impossible to combine warehouse inventory and production process parameters for linkage analysis. The traditional system does not construct a cooperative model of quality inventory process, resulting in high unqualified product rate.
[0005] The root cause is that: the existing system does not establish a unified data model, lacks a whole-link mapping mechanism of “batch work order detection sheet”, and does not realize the real-time fusion of warehouse, production, and quality inspection data through a data platform, making it difficult to meet the traceability and quality control needs of tea product multi-specification and multi-batch production.
[0006] Patent document CN216916785U discloses a storage device for tea detection, which comprises a box body, a sampling mechanism is arranged on the inner wall of the box body, and the sampling mechanism comprises sampling cylinders arranged at equal distances on the inner wall of one side of the box body, sampling tubes arranged at equal distances and inserted and fixed on the inner wall of the bottom of the sampling cylinders, and covers inserted on the inner wall of the sampling tubes. However, the purpose of this patent document is to realize layered sampling of tea, which is different from the technical problems to be solved by the present application. SUMMARY
[0007] In view of the defects in the prior art, the purpose of the present application is to provide a construction method and system of a tea product whole-process quality traceability data platform.
[0008] The application provides a construction method of a tea product whole-process quality traceability data platform, which comprises the following steps: Step S1: collecting warehouse data, production data and quality inspection data, and performing standardization processing respectively; Step S2: establishing a ternary association model based on the standardized data, and completing the many-to-many association between entities through an intermediate table; the entities comprise batch entities, work order entities and detection single entities; Step S3: completing the traceability from finished products to raw materials or from raw materials to finished products according to the ternary association model, and outputting a traceability result; Step S4: performing multi-level early warning according to preset rules based on the traceability result and real-time detection data, and responding to the early warning information.
[0009] Preferably, the step S1 comprises the following steps: The message queue is used to connect the WMS system in a message-driven manner, and the warehouse-in batch numbers, supplier information, warehouse-in time and sampling result data of raw materials, auxiliary materials and packaging materials are accepted in real time; The work order state change of the MES system is listened to by the production collection class, the work order ID, product type, production process, equipment number, operator and starting time data are automatically collected when the work order enters the production state, and the real-time production state is stored by Redis cache; The quality inspection data comprises raw material detection data, process detection data and finished product detection data; The standardization processing comprises coding standardization, field standardization and unit standardization; The abnormal data is filtered by cleaning data.
[0010] Preferably, the step S2 comprises the following sub-steps: Step S2.1: defining the batch entities, work order entities and detection single entities and the association relationship respectively; Step S2.2: completing the mapping of batches and work orders, the mapping of work orders and detection singles and the mapping of batches and detection singles through an intermediate table; Step S2.3: completing the hybrid storage of data in a combination mode of a relational database and a time sequence database.
[0011] Preferably, the step S3 comprises the following steps: The traceability from finished products to raw materials is completed by a forward traceability algorithm, the finished product batch number or the work order ID is input, and the associated raw material batch and each process detection result are output; The traceability from raw materials to finished products is completed by a reverse traceability algorithm, the raw material batch number is input, and all work orders using the batch, finished product batches and final quality inspection results are output.
[0012] Preferably, the step S4 comprises the following sub-steps: Step S4.1: design a three-level early warning rule, and automatically trigger based on the detection data and the ternary mapping relationship; Step S4.2: lock resources for the raw material batches or work orders involved in the first-level and second-level early warnings, and automatically generate a traceability report; record the processing progress, and close the early warning when the processing is completed; Step S4.3: provide a standardized API service to support front-end system calls; the API interface includes a traceability query interface, an early warning query interface, and a data export interface; Step S4.4: deploy a distributed guarantee mechanism; the distributed guarantee mechanism includes asynchronously processing early warning tasks through a Kafka message queue, and setting a fuse mechanism for critical services, and automatically switching to cache queries when the database is overloaded.
[0013] According to the construction system of the tea product full-process quality traceability data platform provided by the application, comprising: Module M1: collect warehouse data, production data, and quality inspection data, and perform standardized processing respectively; Module M2: based on the standardized data, establish a ternary association model, and complete the many-to-many association between entities through an intermediate table; the entities include batch entities, work order entities, and detection single entities; Module M3: according to the ternary association model, complete the traceability from finished products to raw materials, or from raw materials to finished products, and output the traceability result; Module M4: based on the traceability result and real-time detection data, perform multi-level early warning according to preset rules, and respond to the early warning information.
[0014] Preferably, the module M1 comprises: The message queue is used to connect the WMS system in a message-driven manner, and real-time acceptance of the raw material, auxiliary material and packaging material, warehouse batch number, supplier information, warehouse time and sampling result data is realized; The production acquisition type listens to the work order state change of the MES system, and when the work order enters the production state, the work order ID, product type, production process, equipment number, operator and starting time data are automatically collected, and the real-time production state is stored through Redis cache; The quality inspection data includes raw material detection data, process detection data and finished product detection data; The standardized processing includes coding standardization, field standardization and unit standardization; Abnormal data is filtered through cleaning data.
[0015] Preferably, the module M2 comprises the following sub-modules: Module M2.1: define batch entity, work order entity and detection single entity respectively and the association relationship; Module M2.2: complete batch and work order mapping, work order and detection single mapping and batch and detection single mapping through an intermediate table; Module M2.3: complete hybrid storage of data in a combination of a relational database and a time series database.
[0016] Preferably, the module M3 comprises: Complete the traceability from the finished product to the raw material through a forward traceability algorithm, input the finished product batch number or work order ID, and output the associated raw material batch and detection results of each process; Complete the traceability from the raw material to the finished product through a reverse traceability algorithm, input the raw material batch number, and output all work orders, finished product batches and final quality inspection results using the batch.
[0017] Preferably, the module M4 comprises the following sub-modules: Module M4.1: design a three-level early warning rule and automatically trigger based on detection data and ternary mapping relationship; Module M4.2: lock resources for raw material batches or work orders involved in first-level and second-level early warnings, and automatically generate a traceability report; record the processing progress and close the early warning when the processing is completed; Module M4.3: provide standardized API services to support front-end system calls; API interfaces include traceability query interface, early warning query interface and data export interface; Module M4.4: deploy a distributed guarantee mechanism; the distributed guarantee mechanism includes asynchronous processing of early warning tasks through a Kafka message queue and setting a fuse mechanism for key services, which automatically switches to cache query when the database is overloaded.
[0018] Compared with the prior art, the present application has the following beneficial effects: 1. The present application integrates warehouse batch data (raw material / auxiliary material / packaging material warehouse record), production work order data (semi-finished product / finished product batch number association) and quality inspection data (material detection, process detection, finished product detection single) through a unified data model, realizes a data intercommunication rate 99%, and compresses the whole process traceability time to 15 60 minutes.
[0019] 2. The present application constructs a ternary mapping algorithm of “batch work order detection single”, realizes multi-dimensional association early warning of quality abnormalities (such as linkage of raw material batch quality fluctuation and finished product detection results) combined with a real-time data platform, so that the early warning response time 5 minutes, and the unqualified product rate is reduced to 2%, solves the problem of low efficiency and quality control lag caused by data fragmentation in tea product production.
[0020] 3、The whole-process data acquisition and standardized processing steps in the application solve the "data island" problem of scattered data of raw materials, production, and quality inspection in the whole process of tea products in the warehouse system, MES system, and quality inspection system. Through standardized acquisition and cleaning, data interconnection is realized.
[0021] 4、The application realizes the "collection and storage" of tea product whole-process quality data, supports the core goal of "data interconnection, rapid traceability, and real-time early warning" from a technical level, is suitable for quality control scenes of multiple categories of tea products such as green tea, black tea, and oolong tea, and has good practicability. BRIEF DESCRIPTION OF DRAWINGS
[0022] Other features, objects, and advantages of the application will become more apparent through reading the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 The method flowchart of the application.
[0023] Figure 2 The flowchart of the whole-process data acquisition and standardized processing of the application.
[0024] Figure 3 The tea product whole-process quality inspection task intelligent generation and scheduling flowchart of the application.
[0025] Figure 4 The tea product quality traceability bidirectional association query flowchart of the ternary mapping service in the application.
[0026] Figure 5 The tea product quality multi-level linkage early warning control flowchart in the application. DETAILED DESCRIPTION
[0027] The application will be described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the application, but do not limit the application in any form. It should be noted that for those skilled in the art, without departing from the concept of the application, a number of changes and improvements can be made. These all belong to the protection scope of the application.
[0028] Example 1 In view of the defects of the existing traceability system such as data fragmentation, incomplete traceability, and late warning, the application provides a whole-process construction method based on data platform: Through unified data model integration of warehouse batch data (raw material / auxiliary material / packaging material warehousing The system integrates material requisition records, production work order data (linked to semi-finished / finished product batch numbers), and quality inspection data (material arrival inspection, process inspection, and finished product inspection reports) to achieve high data interoperability. 99%, with the entire process traceability time reduced to 15 minutes. 60 minutes; Build "batch" Work order The "test report" ternary mapping algorithm, combined with a real-time data platform, enables multi-dimensional correlation early warning of quality anomalies (such as the linkage between raw material batch quality fluctuations and finished product test results), and improves early warning response time. In 5 minutes, the defect rate decreased to This 2% improvement solved the problems of low traceability efficiency and lagging quality control caused by data fragmentation in tea product production.
[0029] Reference Figure 1 As shown, a method for constructing a data platform for full-process quality traceability of tea products includes: Step S1: Collect warehousing data, production data, and quality inspection data, and perform standardization processing on each data point. Step S2: Establish a ternary association model based on the standardized data, and complete the many-to-many association between entities through an intermediate table; the entities include batch entities, work order entities, and inspection order entities; Step S3: Based on the ternary correlation model, complete the traceability from finished product to raw material, or from raw material to finished product, and output the traceability results; Step S4: Based on the traceability results and real-time detection data, perform multi-level early warnings according to preset rules, and respond accordingly based on the early warning information.
[0030] The specific steps are as follows: (I) Full-process data collection and standardized processing Reference Figure 2 As shown, this step is the foundation for building a data platform, aiming to solve the "data silo" problem in the entire tea product process, where raw material, production, and quality inspection data are scattered across warehousing, MES, and quality inspection systems. It achieves data interoperability through standardized collection and cleaning.
[0031] 1. Multi-source data acquisition: Data acquisition rules are designed for key nodes throughout the entire lifecycle of tea products. In the warehousing process: a message queue (mq) is used to connect to the WMS (Warehouse Management System) in a message-driven manner to receive data such as batch number of raw materials / auxiliary materials / packaging materials, supplier information, warehousing time, and sampling results in real time. Triggered push (such as push immediately after the warehousing operation is completed) is combined to ensure the integrity of batch data.
[0032] Production link: Through the production of acquisition type of listening MES system work order state changes, when the work order into the "production" state, automatically collect work order ID, product type, production process, equipment number, operator, start time and other data, and through the Redis cache storage real-time production status, support subsequent process traceability.
[0033] Quality inspection link: Through the quality inspection data acquisition type of integration of three types of quality inspection data: raw material to material detection, process detection, finished product detection, data trigger points include raw material into the warehouse, process start and finished product off-line, to ensure that the quality inspection data and batch, work order real-time association.
[0034] 2. Data standardization processing: design unified data format specification, eliminate the data heterogeneity of different systems: Coding standardization: define batch number rules (such as "raw material type + date + serial number"), work order coding rules (such as "product type + production batch + line number"), generate unique identification through coding self-generation service method, ensure cross-system data association.
[0035] Field standardization: unify synonymous fields in different systems (such as "supplier ID" "supplier code" unified as SupplierId), field mapping conversion through data standardization class normalization method.
[0036] Unit standardization: unit conversion for weight (unified as kg), time (unified as Unix timestamp), temperature (unified as ℃) and other physical quantities, conversion formula is: standardized value = original value conversion factor + offset 3. Data cleaning and verification: through data cleaning class to realize abnormal data filtering: Missing value processing: for data missing in key fields (such as batch number, detection value), use "mark recording" mechanism, through the exception push service to push the recording reminder to the corresponding post.
[0037] Abnormal value processing: use Z score algorithm to identify data outside the reasonable range (such as raw material moisture content 20%), formula is: , when 3 is judged as an abnormal value, automatically trigger the secondary verification process.
[0038] Where: x: single data point to be detected (such as the actual value of the moisture content of a batch of raw materials, for example, 22%); μ (mu): the mean of the data population (such as the historical average value of the moisture content of this type of raw material, for example, 15%); σ (sigma): The standard deviation of the population (reflecting the dispersion of the data; for example, 2% means that most of the data falls within 13%). (fluctuating within 17%) Z: The calculated Z-score represents the degree of deviation of the data point from the mean (in standard deviation).
[0039] The core logic of the formula is to convert data of different magnitudes into a uniform "deviation factor" through standardization, which makes it easier to determine whether the data exceeds a reasonable range (usually with ±3σ as the threshold, covering 99.7% of normal data).
[0040] The above logic enables the collection, standardization, and cleaning of data throughout the entire process, laying the foundation for subsequent data integration and achieving comprehensive data collection coverage. 99.5%, field standardization rate 100%.
[0041] (II) Construction of a Unified Data Model like Figure 3 As shown, by constructing a "batch" Work order The "Inspection Report" ternary correlation model breaks down the logical barriers between warehousing, production, and quality inspection data, achieving structured integration of data across the entire process. This step is the core support for the data platform to achieve "full-process traceability." Based on the characteristics of tea product production: 1. Define three core entities and their relationships: Batch Entity: Stores batch information for raw materials / auxiliary materials / packaging materials. Key fields include BatchId (primary key), MaterialCode (material code), SupplierId (supplier ID), StorageTime (inbound time), and QualityStatus (quality status). It is synchronized from the WMS system via message subscription.
[0042] Work order entity: Stores production task information. Key fields include OrderId (primary key), ProductType (product type), ProcessList (process list), StartTime (start time), and Status (status). It is synchronized from the MES system through the production data collection class.
[0043] Inspection Single Entity: Stores quality inspection data. Key fields include TaskId (primary key), RelatedId (association ID, which can be batch ID or work order ID), QualityType (quality inspection type), Result (inspection result), and Inspector (inspector). It is synchronized from the quality inspection system through the quality inspection data collection class.
[0044] 2. Ternary mapping relationship design: achieve many-to-many association between entities through intermediate table: Batch and work order mapping: associated through BatchOrderMap table, fields include MapId (mapping ID), BatchId (batch ID), OrderId (order ID), UsageQuantity (usage quantity), record the specific usage of a batch of raw materials for a certain order, the mapping logic is triggered when the raw material is received (corresponding to the association process of warehouse data and order data in the code).
[0045] Work order and detection single mapping: associated through OrderQualityMap table, fields include MapId (mapping ID), OrderId (order ID), TaskId (detection single ID), ProcessId (process ID), record the quality inspection task of a certain order in a certain process, the mapping logic is triggered when the process starts (corresponding to the process of generating quality inspection task in WorkOrderProcessStart method in the code).
[0046] Batch and detection single mapping: associated through BatchQualityMap table, fields include MapId (mapping ID), BatchId (batch ID), TaskId (detection single ID), record the arrival detection result of a certain batch of raw materials, the mapping logic is triggered when the raw material is received (corresponding to the QuantityAddAndMessagePush method in the code).
[0047] 3. Data model storage architecture: adopt "relational database + time series database" mixed storage: Core entities and mapping relationships are stored in MySQL database, CRUD operations are implemented through SqlSugarORM framework to ensure transaction consistency (such as the association of work order and detection single needs to be completed atomically).
[0048] High-frequency collected time series data (such as device running parameters, real-time detection values) are stored in InfluxDB, partitioned by time series (such as partitioned by day), support efficient historical data query, query response time 1 second.
[0049] 4. Model scalability design: reserve custom field interface, support association of new dimensions (such as "logistics single number" "customer ID") through entity extension parent class EntityExtension class, when extending mapping relationship, no need to modify core table structure, only need to add extended mapping table, meet the traceability requirements of tea products in multiple categories and multiple scenarios.
[0050] Through the ternary model, scattered data is woven into a complete data chain of "raw material batch → production order → quality inspection result", making data association accuracy 99%, providing structured data support for subsequent tracing and early warning.
[0051] (III) Implementation of ternary mapping algorithm As shown in Figure 4 , based on the unified data model, a "batch work order detection single" ternary mapping algorithm is designed to realize fast correlation query of multi-dimensional data, solve the problems of "chain breakage and inefficient query" in traditional tracing, and support the compression of full-process tracing time to 15 60 minutes.
[0052] 1. Forward tracing algorithm (finished product → raw material): input finished product batch number or work order ID, output associated raw material batch, and detection results of each process, algorithm: Query the corresponding ProcessList (process list) in OrderEntity through the work order ID, and get all associated ProcessId.
[0053] Based on the OrderQualityMap table, associate ProcessId with TaskId, query the quality inspection results (Result) and unqualified items (AbnormalItems) of each process, and form the process quality inspection chain.
[0054] Through the BatchOrderMap table, associate the work order ID with the BatchId, and get the batch information of the raw materials / auxiliary materials, including the supplier and the warehouse detection results (associated query through the BatchQualityMap table).
[0055] Aggregate the results according to the "work order → process → raw material" hierarchy to generate a tracing report, and the algorithm time complexity is O(n) (n is the amount of associated data). Cache the tracing results of hot work orders through Redis (cache validity period is 30 minutes) to further improve query efficiency.
[0056] 2. Reverse tracing algorithm (raw material → finished product): input raw material batch number, output all work orders using this batch, finished product batch, and final quality inspection results, algorithm: Query all associated OrderId in the BatchOrderMap table through BatchId, which is the work order list using this raw material.
[0057] For each OrderId, query OrderEntity to get the finished product batch number and production status (such as "in warehouse" "sold").
[0058] Query the final quality inspection results of these work orders through the OrderQualityMap table, and count the number of unqualified products and reasons.
[0059] Calculate the quality impact range of the raw material batch, formula: Impact = Number of defective products using this batch / Total number of products using this batch 100% When the impact is 5%, it is marked as a "high-risk batch" and triggers an early warning (corresponding to the early warning logic below).
[0060] 4. Multi-dimensional correlation query optimization: For complex query scenarios (such as "raw materials of a certain supplier → a process failure → corresponding finished products"), design index acceleration strategy: Establish joint index: establish (BatchId, OrderId) index in BatchOrderMap table, establish (OrderId, ProcessId) index in OrderQualityMap table, index selectivity 0.8, ensure index hit rate when querying 95%.
[0061] Chunk query algorithm: for correlation queries with data volume exceeding 100,000, use chunk processing (1000 per chunk), load through Skip / Take pagination to avoid memory overflow, and support parallel query (use Parallel.ForEach), query efficiency is improved by 3 5 times.
[0062] Algorithm fault tolerance mechanism: When some data is missing (such as a certain process quality inspection sheet is not entered), the algorithm automatically marks the missing node and tries to infer through upstream and downstream data (such as estimating the possible time of the process according to the timestamps of adjacent processes), while pushing data recording reminders to ensure the integrity of the traceability chain (allowing 1 non-critical node to be missing).
[0063] Through the ternary mapping algorithm, the "bidirectional penetration" query of full-process data is realized, with an average time consumption of 30 minutes for forward tracing, and an average time consumption of 45 minutes for reverse tracing, meeting the core requirements of "fast tracing" in the invention.
[0064] (4) Quality early warning and traceability service packaging As Figure 5 shown, based on the ternary mapping algorithm and real-time data, build quality anomaly early warning and traceability service, realize multi-dimensional correlation early warning of anomalies (response time 5 minutes) and control of the defective product rate ( 2%), which is the core of data platform business empowerment.
[0065] 1. Real-time early warning trigger mechanism: Design a three-level early warning rule, automatically triggered based on detection data and ternary mapping relationship: First-level warning (raw material anomaly): When the key items of raw material arrival detection (such as pesticide residues, moisture content) exceed the standard, through the CheckRawMaterial method of QualityAlertService, based on the BatchQualityMap table, query the expected use order of this batch, immediately push the warning to the production planning post, the formula is: Warning trigger condition = detection value Threshold value 1.1 (1.1 is the safety factor) Second-level warning (process anomaly): When the process detection data (such as kneading and twisting temperature, fermentation time) exceeds the process range, through the CheckProcessQuality method, based on the OrderQualityMap table, query the raw material batch corresponding to this process, analyze whether the process anomaly is caused by the characteristics of the raw material, and push the warning to the workshop director (corresponding to the CheckAndAlert method in the code).
[0066] Third-level warning (finished product anomaly): When the finished product detection is unqualified, through the CheckFinishedProduct method, based on the ternary mapping, trace back to the problem process and raw material batch, calculate the impact range (such as upgrade to global warning if it involves more than 3 orders), and push to the quality inspection manager and production director.
[0067] 2. Early warning response and closed-loop processing: Start the closed-loop process after the early warning is triggered: Automatic locking: Lock the resources (such as mark the raw material as "prohibit delivery" and the order as "suspend production") involved in the first and second-level warnings through the LockRelatedResources method to prevent the transfer of unqualified products.
[0068] Traceability analysis: Automatically generate a traceability report to show the abnormal transmission chain of "raw material Process Finished product", such as "high moisture content of raw material
[0069] Processing tracking: Record the processing progress (such as "isolated raw material" and "adjusted process parameters") through the ExceptionProcessService, and automatically verify the effect (such as secondary detection qualified) after processing is completed, and close the warning.
[0070] 3. Encapsulation of traceability service interface: Provide standardized API services to support front-end system calls: Trace query interface: / api / trace / query, input parameter is batch number / work order ID, output trace report (JSON format), including raw material information, process data, detection result hierarchical structure.
[0071] Early warning query interface: / api / alert / list, support filtering early warning records by time, level, state, return processing progress and traceability result.
[0072] Data export interface: / api / trace / export, support exporting trace report to PDF / Excel format, including data watermark (such as "internal trace file"), ensure data security.
[0073] 4. Performance and reliability guarantee: Early warning engine adopts distributed deployment, processes early warning tasks asynchronously through Kafka message queue, supports concurrent processing of 100 early warnings per second, avoids single point of failure.
[0074] Key services (such as early warning triggering, trace query) set fuse mechanism (use Polly framework), when database pressure is too large, automatically degrade to cache query, ensure core function available.
[0075] Through early warning and traceability services, the technical capabilities of data platform are transformed into business value, early warning response time 5 minutes, unqualified product rate controlled within 2%, solve the problem of quality control lag in tea product production.
[0076] Through the above four processes, the "collection storage connection " closed loop of tea product whole process quality data is realized, which supports the core goals of "data interconnection, rapid traceability, real-time early warning" from the technical level, and is suitable for quality control scenes of multiple categories of tea products such as green tea, black tea and oolong tea.
[0077] The present application also provides a construction system of a tea product whole process quality traceability data platform, which can be realized by executing the process steps of the construction method of the tea product whole process quality traceability data platform, that is, the construction method of the tea product whole process quality traceability data platform can be understood as the preferred embodiment of the construction system of the tea product whole process quality traceability data platform by those skilled in the art.
[0078] Specifically, a construction system of a tea product whole process quality traceability data platform comprises: Module M1: Collect warehouse data, production data and quality inspection data, and perform standardization processing respectively; Module M2: based on the standardized data, a three-way association model is established, and a many-to-many association between entities is completed through an intermediate table; the entities include batch entities, work order entities, and detection single entities; Module M3: according to the three-way association model, the traceability from finished products to raw materials or from raw materials to finished products is completed, and a traceability result is output; Module M4: based on the traceability result and real-time detection data, multi-level early warning is performed according to a preset rule, and a response is made according to the early warning information.
[0079] The module M1 includes: The message queue is used to connect the WMS system in a message-driven manner, and real-time acceptance of raw material, auxiliary material and packaging material, warehouse batch number, supplier information, warehouse time and sampling result data is realized; The production acquisition type listens to the work order state change of the MES system, and when the work order enters the production state, the work order ID, product type, production process, equipment number, operator and starting time data are automatically collected, and the real-time production state is stored through Redis cache; The quality inspection data includes raw material to material detection data, process detection data and finished product detection data; The standardization processing includes coding standardization, field standardization and unit standardization; Abnormal data is filtered through cleaning data.
[0080] The module M2 includes the following sub-modules: Module M2.1: batch entities, work order entities and detection single entities and association relationships are defined respectively; Module M2.2: batch and work order mapping, work order and detection single mapping, and batch and detection single mapping are completed through an intermediate table; Module M2.3: a combination of a relational database and a time series database is used to complete hybrid storage of data.
[0081] The module M3 includes: The forward traceability algorithm is used to complete the traceability from finished products to raw materials, the finished product batch number or work order ID is input, and the associated raw material batch and each process detection result are output; The reverse traceability algorithm is used to complete the traceability from raw materials to finished products, the raw material batch number is input, and all work orders, finished product batches and final quality inspection results using the batch are output.
[0082] The module M4 includes the following sub-modules: Module M4.1: three-level early warning rules are designed, and automatic triggering is realized based on detection data and three-way mapping relationships; Module M4.2: Resource locking for raw material batches or work orders involved in primary and secondary early warnings, and automatic generation of traceability reports; record processing progress, and close the early warning when processing is complete; Module M4.3: Provide standardized API services to support front-end system calls; API interfaces include traceability query interface, early warning query interface and data export interface; Module M4.4: Deploy distributed guarantee mechanism; the distributed guarantee mechanism includes asynchronous processing of early warning tasks through Kafka message queue, setting a fuse mechanism for key services, and automatically switching to cache query when the database is overloaded.
[0083] Those skilled in the art know that, in addition to implementing the system provided by the present application and each device, module, unit thereof in a pure computer readable program code manner, the same functions can be achieved by logically programming the method steps in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers. Therefore, the system provided by the present application and each device, module, unit thereof can be considered as a hardware component, and the devices, modules, units included therein for achieving various functions can also be considered as structures within the hardware component; the devices, modules, units for achieving various functions can also be considered as both software modules for implementing methods and structures within hardware components.
[0084] The specific embodiments of the present application are described above. It should be understood that the present application is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essential content of the present application. In the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for constructing a data platform for full-process quality traceability of tea products, characterized in that, include: Step S1: Collect warehousing data, production data, and quality inspection data, and perform standardization processing on each data point. Step S2: Establish a ternary association model based on the standardized data, and complete the many-to-many association between entities through an intermediate table; the entities include batch entities, work order entities, and inspection order entities; Step S3: Based on the ternary correlation model, complete the traceability from finished product to raw material, or from raw material to finished product, and output the traceability results; Step S4: Based on the traceability results and real-time detection data, perform multi-level early warnings according to preset rules, and respond accordingly based on the early warning information.
2. The method for constructing a tea product full-process quality traceability data platform according to claim 1, characterized in that, Step S1 includes: The system uses a message queue to connect to the WMS system in a message-driven manner to receive the batch number, supplier information, warehousing time and sampling inspection results of raw materials, auxiliary materials and packaging materials in real time. By monitoring the status changes of work orders in the MES system through the production data collection class, when a work order enters the production status, the work order ID, product type, production process, equipment number, operator and start time data are automatically collected and stored in real time through Redis cache. The quality inspection data includes raw material arrival inspection data, process inspection data, and finished product inspection data; Standardization processes include code standardization, field standardization, and unit standardization; Filter out abnormal data by cleaning the data.
3. The method for constructing a tea product full-process quality traceability data platform according to claim 2, characterized in that, Step S2 includes the following sub-steps: Step S2.1: Define the batch entity, work order entity, and inspection order entity and their relationships respectively; Step S2.2: Complete the mapping between batch and work order, work order and inspection order, and batch and inspection order through the intermediate table; Step S2.3: Use a combination of relational databases and time-series databases to complete the hybrid storage of data.
4. The method for constructing a tea product full-process quality traceability data platform according to claim 1, characterized in that, Step S3 includes: The forward traceability algorithm completes the traceability from finished products to raw materials. Input the finished product batch number or work order ID, and output the associated raw material batch and the test results of each process. The reverse traceability algorithm completes the traceability from raw materials to finished products. Input the raw material batch number, and output all work orders that used the batch, finished product batches, and final quality inspection results.
5. The method for constructing a tea product full-process quality traceability data platform according to claim 1, characterized in that, Step S4 includes the following sub-steps: Step S4.1: Design a three-level early warning rule that is automatically triggered based on the detection data and the ternary mapping relationship; Step S4.2: Lock resources for raw material batches or work orders involved in Level 1 and Level 2 warnings and automatically generate traceability reports; record the processing progress, and close the warning when the processing is completed; Step S4.3: Provide standardized API services to support front-end system calls; The API interfaces include traceability query interface, early warning query interface, and data export interface; Step S4.4: Deploy a distributed protection mechanism; the distributed protection mechanism includes asynchronously processing early warning tasks through a Kafka message queue, setting up a circuit breaker mechanism for critical services, and automatically switching to cache queries when the database is overloaded.
6. A system for constructing a data platform for full-process quality traceability of tea products, characterized in that, include: Module M1: Collects warehousing data, production data, and quality inspection data, and performs standardization processing on each. Module M2: Establishes a ternary association model based on standardized data, and completes many-to-many associations between entities through an intermediate table; the entities include batch entities, work order entities, and inspection order entities; Module M3: Based on the ternary correlation model, complete the traceability from finished product to raw material, or from raw material to finished product, and output the traceability results; Module M4: Based on the traceability results and real-time detection data, it performs multi-level early warnings according to preset rules and responds accordingly based on the early warning information.
7. The system for constructing a tea product full-process quality traceability data platform according to claim 6, characterized in that, The module M1 includes: The system uses a message queue to connect to the WMS system in a message-driven manner to receive the batch number, supplier information, warehousing time and sampling inspection results of raw materials, auxiliary materials and packaging materials in real time. By monitoring the status changes of work orders in the MES system through the production data collection class, when a work order enters the production status, the work order ID, product type, production process, equipment number, operator and start time data are automatically collected and stored in real time through Redis cache. The quality inspection data includes raw material arrival inspection data, process inspection data, and finished product inspection data; Standardization processes include code standardization, field standardization, and unit standardization; Filter out abnormal data by cleaning the data.
8. The system for constructing a tea product full-process quality traceability data platform according to claim 7, characterized in that, The module M2 Includes the following sub-modules: Module M2.1: Defines batch entities, work order entities, and inspection order entities, as well as their relationships; Module M2.2: Completes batch-to-work-order mapping, work-to-inspection-order mapping, and batch-to-inspection-order mapping through intermediate tables; Module M2.3: Uses a combination of relational databases and time-series databases to achieve hybrid data storage.
9. The system for constructing a tea product full-process quality traceability data platform according to claim 6, characterized in that, The module M3 includes: The forward traceability algorithm completes the traceability from finished products to raw materials. Input the finished product batch number or work order ID, and output the associated raw material batch and the test results of each process. The reverse traceability algorithm completes the traceability from raw materials to finished products. Input the raw material batch number, and output all work orders that used the batch, finished product batches, and final quality inspection results.
10. The system for constructing a tea product full-process quality traceability data platform according to claim 6, characterized in that, The module M4 includes the following sub-modules: Module M4.1: Designs a three-level early warning rule, which is automatically triggered based on the detection data and the ternary mapping relationship; Module M4.2: Locks resources for raw material batches or work orders involved in Level 1 and Level 2 warnings and automatically generates traceability reports; records processing progress and closes the warning when processing is complete; Module M4.3: Provides standardized API services to support front-end system calls; The API interfaces include traceability query interface, early warning query interface, and data export interface; Module M4.4: Deploy a distributed protection mechanism; the distributed protection mechanism includes asynchronously processing early warning tasks through a Kafka message queue, setting up a circuit breaker mechanism for critical services, and automatically switching to cache queries when the database is overloaded.
Citation Information
Patent Citations
Storage device for tea leaf detection
CN216916785U
Bidirectional tracing method and system for the whole production process
CN110378582A
Traditional Chinese medicine decoction piece production data acquisition system for quality tracing
CN113657907A
Cigarette production quality multi-dimensional information tracing method, system and terminal
CN116187793A
Batch circulation method for tobacco primary processing workshop
CN120655317A