One-object-one-code full life cycle tracking system
By building a multi-dimensional integrated full life cycle tracking system, we have solved problems such as identification binding, image acquisition, label quality recognition and inventory safety monitoring in traditional systems, achieved deep binding of product identity identification, dynamic adaptive image acquisition, real-time label status monitoring and reasonable shipping route planning, and improved the stability and security of the tracking system.
Patent Information
- Application Number
- CN202510910966.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-07-02
AI Technical Summary
The traditional one-item-one-code full life cycle tracking system has a single method of binding product identification, fails to deeply bind manufacturing process parameters, has poor adaptability in the image acquisition link, insufficient label status recognition, lacks real-time monitoring of inventory management, and unreasonable shipping route planning, posing identification stability and safety risks.
Build an image binding module, an automatic product warehousing module, a safe shelf identification module and a product life cycle tracking module, introduce product production data to drive serial number generation, dynamically adjust image acquisition, monitor label status in real time, optimize label materials and printing parameters, combine inventory data and physical parameters for path planning, and introduce a fault-tolerant identification mechanism to ensure tracking continuity.
It improves the uniqueness and anti-counterfeiting of product identification, enhances the clarity and stability of image acquisition, realizes real-time monitoring of label status, improves the timeliness of inventory information and the rationality of shipping routes, reduces tracking breakpoints caused by label failure, avoids the risk of product damage, and enhances the system's fault tolerance and tracking continuity.
Smart Images

Figure CN120822971A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent manufacturing technology, and in particular to a one-item-one-code full life cycle tracking system. Background Art
[0002] The traditional one-item-one-code full-lifecycle tracking system has a relatively simple product identification binding method, relying solely on two-dimensional visual encoding methods such as barcodes or QR codes. It fails to deeply bind to the product's own structure and manufacturing process parameters, making it difficult to establish a stable and anti-counterfeiting identity at the source; the image acquisition process generally adopts a fixed angle and a single lighting condition, which fails to adapt to the dynamic environment of multiple angles and complex lighting in assembly line operations, resulting in a decrease in image resolution and recognition stability, which in turn affects tracking accuracy; the warehousing process generally lacks a label status recognition mechanism, and cannot effectively perceive the warping, wrinkling or damage of labels during transportation and stacking, resulting in interruption of the tracking path; label quality optimization lacks a closed-loop feedback mechanism, and fails to dynamically adjust the label material, structure or printing process parameters based on the label failure data generated in actual use, making it difficult to achieve systematic label stability optimization; in terms of inventory management, it mostly relies on fixed sensors or manual inventory, lacks real-time location recognition and dynamic storage optimization capabilities linked to product status data, especially in dense storage scenarios, there are problems with insufficient identification of hidden safety risks such as weld cracks and label obstruction. Summary of the Invention
[0003] Based on this, it is necessary for the present invention to provide a one-item-one-code full life cycle tracking system to solve at least one of the above technical problems.
[0004] To achieve the above objectives, the one-item-one-code full lifecycle tracking system includes the following modules:
[0005] An image binding module is used to obtain product production data; generate a unique serial number for the product based on the product production data; and perform image acquisition based on the unique serial number of the product to obtain a product serial number image;
[0006] The automatic commodity storage module is used to detect label wrinkles based on the product serial number image to obtain label wrinkle data; perform label breakage assessment based on the label wrinkle data to obtain label breakage data; and optimize the label production process based on the label breakage data to obtain label optimization data; perform automatic commodity storage simulation based on the label optimization data to obtain automatic commodity storage data;
[0007] The safety shelf identification module is used to dynamically manage inventory based on the automated warehousing data of goods and obtain dynamic inventory management data; calculate shelf utilization based on the dynamic inventory management data; identify shelf welding cracks based on the shelf utilization rate and obtain shelf crack data; and determine the safety shelf area based on the shelf crack data;
[0008] The product life cycle tracking module analyzes the product shipping path based on the secure shelf area to obtain product shipping path data; performs product shipment simulation based on the product shipping path data to obtain product shipment data; performs serial number verification based on the product shipment data to obtain serial number verification data, and transmits it to the product management system to execute the product life cycle tracking task.
[0009] The present invention establishes a multi-dimensional, dynamically adaptive, one-to-one-code full-lifecycle tracking system by constructing an image binding module, an automated commodity warehousing module, a secure shelf identification module, and a commodity full-lifecycle tracking module. This overcomes many technical bottlenecks in traditional systems in terms of identification binding, image acquisition, label quality identification and optimization, inventory safety monitoring, shipping path analysis, and serial number verification. This system introduces a commodity production data-driven mechanism in the commodity identity binding link, which can deeply bind manufacturing process parameters to the serial number during the serial number generation stage, ensuring the uniqueness and unforgeability of the commodity identification. Compared with traditional two-dimensional encoding methods such as barcodes and QR codes, this method constructs an identity mapping model based on manufacturing process characteristics, which improves the data credibility of the tracking starting point. During the image acquisition process, the system dynamically adjusts the image acquisition mechanism based on the generated unique serial number of the commodity, and can link multi-angle, high-frame-rate image sensors to automatically adapt to the complex lighting and perspective changes in the production line, effectively improving the clarity and stability of the acquired image, and enhancing the robust recognition capability of the commodity serial number image. During the commodity entry phase, the system introduces a label wrinkle detection and breakage assessment process, which not only enables real-time monitoring of the label status, but also extracts physical deformation characteristics from the failed label data collected during actual entry, and forms a closed-loop feedback path. Based on this feedback data, the system dynamically optimizes label process parameters such as label material, size, adhesive strength, and printing parameters, thereby gradually improving the overall label production quality and damage resistance, and reducing tracking breakpoints caused by label failure. At the same time, the entry simulation link fully considers real-world scenario variables such as storage routes, transfer rhythms, and stacking strength in the structural setting, and realizes dynamic verification of the commodity entry process through physical modeling, providing parameter basis for actual deployment. The inventory management link introduces a commodity status data linkage mechanism based on traditional warehouse location identification, and improves the timeliness of inventory information by dynamically analyzing the entry behavior of commodities and changes in label status. The system can calculate shelf utilization based on real-time storage location status and, combined with image recognition results, automatically detect microcracks, deformed areas, or label occlusion issues at shelf welding locations, enabling active sensing of hidden structural damage. This assists the system in automatically dividing safe shelf areas to prevent goods from being stacked in locations with potential structural risks. In the product shipment scheduling process, the system breaks the static path planning model and integrates actual physical parameter data of the shipment path, such as shelf slope, aisle width, and ground vibration intensity. Combining inventory data with safe shelf areas, it dynamically performs optimal path simulation analysis. This approach avoids the risk of secondary damage to fragile goods caused by high-vibration and high-slope aisles, and improves the rationality of shipment path selection and logistics stability.The serial number verification part introduces an image fault-tolerant recognition mechanism. It no longer relies solely on string comparison. Instead, it performs image repair and pattern matching to complete visual anomalies such as incomplete, scratched, and tilted inkjet codes in product delivery images. This ensures that serial number comparison and tracking closed-loop maintenance can still be completed even in the case of incomplete printing, significantly enhancing the system's fault tolerance and tracking continuity. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments thereof made with reference to the following drawings:
[0011] Figure 1 This is a module diagram of the one-item-one-code full life cycle tracking system of the present invention;
[0012] Figure 2 Detailed functional flow diagram of the image binding module of the present invention;
[0013] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0014] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. Obviously, the embodiments described are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of the present invention.
[0015] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.
[0016] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.
[0017] To achieve this, please refer to Figures 1 to 2 The present invention provides a one-item-one-code full life cycle tracking system, which includes the following modules:
[0018] S1: Image binding module, used to obtain product production data; generate a unique serial number for the product based on the product production data; and perform image acquisition based on the unique serial number of the product to obtain a product serial number image;
[0019] In this embodiment, an industrial visual acquisition terminal is arranged at the end of the product production line. A global shutter black and white industrial camera with a resolution of 2448×2048 (such as Basler acA2440-75gm) is used, equipped with a 5mm fixed-focus lens, and a white light LED array (wavelength of approximately 400nm to 700nm) is used to uniformly fill light at a vertical angle. The visual terminal is connected to the embedded control unit (NVIDIA Jetson AGX Xavier) via the GigE industrial camera acquisition interface to achieve high-speed image acquisition control and edge computing processing. Based on the product production batch information (including production date, team number, production process parameters, etc.) provided by the upstream MES system, a unique serial number is generated using the built-in serial number generation rule. The rule consists of 12 digits, including a 2-digit product type code, a 4-digit production timestamp (format: YYMM), a 2-digit production line number, and a 4-digit serial number. For example: A11205230125. After generation, the serial number is printed onto a PVC label using a thermal transfer printer (Zebra ZT411) in bold font, 12 point size, and 0.8mm spacing, and is automatically bound to the product in the packaging section. Subsequently, an industrial camera synchronously captures a high-resolution image of the labeled area, and the serial number image is extracted using an image processing algorithm. The image extraction steps include image binarization (threshold set to 0.6 grayscale value), area contour recognition (area threshold is above 400 pixels2), character segmentation (based on 1.5mm spacing), and area enhancement (CLAHE histogram equalization). After processing, the image file is named the serial number in PNG format and stored in the local cache, and then written to the product master database to achieve the binding of the unique serial number to the actual product image.
[0020] S2: Automated product warehousing module, which is used to detect label wrinkles based on product serial number images to obtain label wrinkle data; perform label breakage assessment based on the label wrinkle data to obtain label breakage data; and optimize the label production process based on the label breakage data to obtain label optimization data; perform automated product warehousing simulation based on the label optimization data to obtain automated product warehousing data;
[0021] In this embodiment, a panoramic image of the label in the serial number image area is collected by using a dual visual detection position (a color industrial camera with a resolution of 1920×1200 is arranged on each side) set up in the warehousing channel. The image is transmitted to the GPU server (using RTX A6000) to execute the label wrinkle detection algorithm. The algorithm extracts the label edge based on Canny edge detection (the upper and lower thresholds are 70 and 150 respectively), and then uses Hough linear transform to analyze the number of broken line segments. If more than 5 continuous curve segments with an edge curvature change angle greater than 30° are detected, it is marked as a wrinkled label. For wrinkled labels, the feature map directional gradient analysis (using the Sobel operator, window size 3×3) is used to further determine whether the label is broken. If the grayscale mutation area exceeds 15% of the label area and is distributed in the central axis area (center ±10mm), it is judged to be broken. The fracture data is recorded by number and fed back to the label optimization system. The label optimization data consists of the fracture rate (%), fracture distribution density (pieces / mm 2 ), and the label feeding force (N) are input together into the thermal transfer process control module. The process is optimized by changing the label material to PET substrate, adjusting the label thickness from the original 0.08mm to 0.12mm, adjusting the label temperature from 200℃ to 215℃, and reducing the printing speed from 120mm / s to 100mm / s. The optimization plan is implemented in the next batch of labels, and a version mark is added to the system. After the optimization is completed, based on the existing warehousing path simulation engine (using the AnyLogic simulation platform), the process of goods entering the warehouse under different label states is simulated. The input parameters include label detection pass rate (90%), handling distance (1.5m), height difference between upper and lower shelves (0.6m), and relative humidity of the warehouse area (45%). After the simulation, the warehousing efficiency data and label integrity rate data are obtained, and the automatic warehousing data of goods is output for the next module to call.
[0022] S3: A safety shelf identification module is used to dynamically manage inventory based on automated product warehousing data to obtain dynamic inventory management data; calculate shelf utilization based on the dynamic inventory management data; identify shelf welding cracks based on the shelf utilization rate to obtain shelf crack data; and determine the safety shelf area based on the shelf crack data.
[0023] In this embodiment, the secure shelf identification module first retrieves the automated warehousing data for goods, including the specific location number, shelf time, product specifications, and label integrity. The precise current location of the goods is recorded using UWB positioning tags (positioning accuracy ±10cm) embedded in each row of shelves. A matching RFID reader (such as the Impinj Speedway R420) periodically scans the shelf RFID chips to record the inventory status of the goods. Based on the time series data of the location, a time sliding window (sliding period of 3 hours) is used to count the actual number of goods carried by each shelf layer and divide it by the shelf's maximum designed load capacity (provided by the structural design data) to obtain the shelf utilization rate, rounded to three decimal places. If the shelf utilization rate exceeds 95% and there is no significant record of product displacement in the same area within the past 48 hours, the shelf is determined to be a high-voltage load area. To further assess the safety of this area, structural vibration sensors (sampling frequency 500Hz, sensitivity 50mV / g) deployed at key nodes of the shelves are called to record the three-axis vibration waveform after each manual loading and unloading of the shelves. Wavelet packet transform is used to analyze signal energy changes. If the high-frequency signal energy percentage in a node area increases by more than 20% from the mean, and if the shelf utilization rate exceeds the set safety threshold of 90%, ultrasonic crack detection is performed on the shelf weld node (using a 25MHz probe and a maximum detection depth of 12mm). If the signal reflection amplitude in the test results is greater than 80dB and the waveform repeats more than twice, the node is marked as having a weld crack, its spatial coordinates are located, and it is marked as a dangerous area.
[0024] S4: Product life cycle tracking module, which analyzes the product shipping path based on the safe shelf area to obtain product shipping path data; performs product shipment simulation based on the product shipping path data to obtain product shipment data; performs serial number verification based on the product shipment data to obtain serial number verification data, and transmits it to the product management system to execute the product life cycle tracking task.
[0025] In this embodiment, the product lifecycle tracking module utilizes a safe shelf area map and combines it with product shipment demand data to perform path analysis. The system uses the Dijkstra algorithm to construct a three-dimensional planogram structure. Each node represents a safe and feasible aisle. Edge weights are determined based on aisle width (unit weight is 1 / w, where w is width in meters), slope (each 5% increase in slope increases the weight by 1.5), and ground friction coefficient (if the slope is less than 0.5, the weight increases by 1). This comprehensive path cost function is constructed. The path search is limited to the safe shelf area, and a shortest path solution is generated and entered into the shipment task list. Based on the path solution, the shipment simulation module is invoked to dispatch a three-axis mobile AGV (load ≤ 60kg) to complete the shipment simulation task. The dispatch instructions set a maximum operating speed of 0.7m / s, a steering angle of no more than 30°, and an obstacle avoidance distance of at least 0.3m. For each completed shelf task point along the path, the completion time, path deviation angle, and actual time taken are automatically recorded, and the shipment simulation data is output. After the shipment simulation is complete, the serial number verification process begins, employing a dual mechanism: the first layer uses optical character recognition (OCR) to extract the serial number from the shipment image (with an accuracy threshold exceeding 98%). The second layer employs a structural matching algorithm, employing the Levenshtein distance algorithm to analyze the difference between the extracted serial number and the original serial number in the database. A maximum edit distance of 1 is allowed; any difference beyond this distance is marked as a verification failure. The serial numbers of products that pass verification, along with their path, inbound and outbound status, labeling process version number, shelf number, and other data, are aggregated to form a complete tracking record. This data is transmitted in real time to the product master management system via the MQTT protocol and stored in the full lifecycle database, completing the tracking process.
[0026] As an example of the present invention, refer to Figure 2 As shown, Figure 1 Schematic diagram of the functional flow of the image binding module in FIG. 1 . In this embodiment, the functions of the image binding module include:
[0027] S11: Obtain commodity production data and perform production batch feature extraction to obtain production batch data;
[0028] In this embodiment, a Siemens S7-1500 series PLC control system is deployed on the production line, and a Siemens ET 200 SPI / O module based on the Profinet industrial Ethernet communication protocol is installed to collect data. Each key production equipment has an independent collection point. The collected data types include raw material number (scanned by a barcode scanner), production timestamp (generated by the PLC's built-in RTC), operation process number (assigned based on the process flow chart in the Siemens TIA Portal), equipment number (encoded with a fixed production line ID and location number), equipment operating status (using the Modbus protocol to obtain operating status bit information, 0 for shutdown and 1 for operation), and process environment parameters (using a thermocouple to detect the workstation temperature, the model is a K-type thermocouple with an accuracy of ±1°C and a sampling period of 1 second). The collected data is uniformly packaged in JSON format and transmitted to the InfluxDB database, with the timestamp field set as the primary key. Every 10 minutes, a batch cycle is constructed as a production unit. Aggregation is performed based on the "material_code," "workstation_id," "start_time," and "end_time" fields. The aggregation logic is: all products produced within a 600-second window with the same raw material number and equipment number are grouped as a single batch. The batch number consists of the format "PRD+year-month-day+production line ID+time period number," for example, "PRD20250528-L05-T06." This number is written as the primary key index into the batch table "production_batch_list."
[0029] S12: Analyze product structure parameters based on production batch data;
[0030] In this embodiment, according to each batch number generated by S11, the fields "material_code" and "assembly_step_code" are called from the database and used as indexes to query the local structural parameter mapping database. The database is established using PostgreSQL and named "product_structure_definitions". The table fields in the database include: product type number (such as ST3L is a three-layer laminated structure), number of layers (number of layers, integer value 1-5), connection method (such as ultrasonic welding, threaded fixing), key structural dimensions (such as length 60mm, width 40mm, thickness 5mm), number of connection points (defined according to CAD drawings, such as 8 point-to-point welding positions), tolerance range (written in units of ±0.03mm), connection method standard number (such as USW-03 represents the third type of ultrasonic welding standard), and material code and structural part number binding information. The parsing process is performed by a Python script, which reads data through the psycopg2 database connection interface. The corresponding field comparison logic is as follows: if the "material_code" in the batch data is "A7075T6", it is mapped to the structure code "ST3L". The structure code is then mapped to a parameter set containing the aforementioned fields such as the structure level and connection method. The parsed structure parameters are stored as a structure, including the contents of all structure fields and the batch number to which they belong. A structure parameter description document is generated, named "BATCH_Batch Number_STRUCT.json".
[0031] S13: Bind the production timestamp based on the product structure parameters to obtain product production traceability data;
[0032] In the present embodiment, by calling the PLC historical operation record and process log, relying on the PLC log buffer module (LogDataBlock), the key process node time of each commodity is extracted, including the initialization startup time (field init_time), the welding step completion time (field weld_finish_time), the size detection completion time (field dim_check_time) and the final packaging completion time (field final_pack_time). All times are expressed in UTC format, accurate to milliseconds, for example, "2025-05-28T14:32:56.712Z". This time data is centrally collected by the Siemens WinCC SCADA system and synchronized with the database using the industrial middleware platform KepServerEX. The timestamp data is uniformly stored in a table called "product_time_log", and "product_id" is used as a unique foreign key. Subsequently, the fields "structure_code", "layer_number" and "joint_type" are extracted from the structure parameter document and combined with the above four time nodes and the equipment number "workstation_id" to form a complete set of traceability data records. Each record is organized in structured JSON format, with the fields in the following order: {product_id, structure_code, init_time, weld_finish_time, dim_check_time, final_pack_time, workstation_id}. It is written to a table named "product_traceability" with the primary key being "product_id". Each field must be fully populated and no null values are allowed.
[0033] S14: Perform cryptographic hashing on the product identification based on the product production traceability data to obtain an identification code;
[0034] In this embodiment, S13 extracts the fields "structure_code," "init_time," "final_pack_time," and "workstation_id," and concatenates them in a fixed order. The concatenation rule is as follows: "structure_code + init_time + workstation_id + final_pack_time." An example concatenation is shown below: "ST3L20250528143256712WS19020250528143501421." This string is irreversibly encrypted using the SHA-256 hash algorithm. The hash algorithm is implemented by calling the SHA256_Init(), SHA256_Update(), and SHA256_Final() functions in the OpenSSL encryption library. Before processing, the original concatenated string is encoded in UTF-8 format and converted into a byte stream input. The generated hash result is a 256-bit binary value, which is converted to a 64-bit hexadecimal string, such as "a7d1e1c74beaeed14c1bda4a6d03dbf40794fe8b1c132a7a0f9b1fc2e8384ef3." This hash result is the product identification code. The identification code is stored in the "product_hash_index" table. The table structure is: {product_id VARCHAR, hash_code CHAR(64), creation_time TIMESTAMP}, where "product_id" is a foreign key and is consistent with the unique product number in S13. The hash_code field is set as a unique index.
[0035] S15: Standardize the serial format based on the identification code and generate a unique serial number for the product;
[0036] In this embodiment, a unique serial number for a product is generated based on a hash code, using the format "YYYYMMDD+LINEID+LAYER+HASH10." YYYYMMDD is derived from the date value extracted from the init_time field, LINEID is derived from the first three digits of workstation_id (e.g., L19 for WS19), LAYER is derived from structure_code (e.g., 3L for ST3L), and HASH10 is the first 10 characters of the identifier code. For example, if the identifier code is "a7d1e1c74beaeed1...", HASH10 is "A7D1E1C74B," indicating the encoded serial number is specifically "20250528L193LA7D1E1C74B." Use the regular expression r'\d{8}L\d{2}\dL[A-F0-9]{10}' to verify the validity of the serial number format. All generated results are written to the "product_identity_list" table. The table structure fields include: {product_id, serial_number, hash_code, serial_time, serial_format_version}, where serial_format_version is the current version identifier, fixed to "V1.0". All field values must be fully populated, with no empty values. Set a unique index for the serial_number field to prevent generation conflicts.
[0037] S16: Capture an image based on the unique serial number of the product to obtain a product serial number image.
[0038] In this embodiment, a visual acquisition module consisting of a Basler acA2440-35um industrial camera is deployed at the end of the packaging line. The resolution is 2448×2048 pixels, the shutter time is set to 8500μs, and the image acquisition trigger is a level signal emitted by a PNP type reflective photoelectric switch to control the image acquisition time point. The camera is equipped with a CCTV lens (focal length 25mm, field of view coverage range 50×50mm), a 470nm wavelength blue light LED ring fill light is configured in front of the lens, and a diffuse reflection plate is installed to enhance the contrast of the QR code area. The unique serial number of the product is printed by a Zebra ZT510 thermal transfer printer using 300dpi mode and a font size of 24 points. The serial number position is fixed in the upper left corner of the front of the product, and the border is no more than 5mm from the edge. After image acquisition, call cv2.findContours() in the OpenCV library to identify the serial number text area. Use cv2.getRectSubPix() to crop a standard 300×300 pixel area. Call cv2.resize() to resize the image to a uniform 400×400 pixel size and save it in PNG format. The image is named "SERIAL_Serial Number_Timestamp.png" and stored in the path " / data / product_images / YYYY / MM / DD / ". The file index is also written to a table named "serial_image_index" with the following fields: {serial_number, image_path, image_capture_time}.
[0039] Preferably, the image binding module collects images based on the unique serial number of the product, including:
[0040] Generate image acquisition instructions based on the product's unique serial number;
[0041] In this embodiment, based on the unique serial number of the product, the instruction generation module is called to construct the image acquisition control instruction. The acquisition control instruction consists of 5 fields, namely: serial number ID, acquisition angle identifier (set to 4 angles: 0°, 45°, 90°, 135°), exposure time parameter (unit: ms, default is 100ms), light source intensity value (integer value of 0 to 255, default value is 200), shooting resolution specification (set to 1920×1080 pixels). The generation of the image acquisition control instruction depends on the established matching mechanism between the unique serial number and the shooting template library. When matching, the classification label of the product is used as the main index field, and the corresponding standard shooting parameter combination is retrieved from the template library. The control instruction encapsulation adopts hexadecimal encoding format to ensure compatibility with the parser standard of the image acquisition control module during serial communication.
[0042] Schedule image acquisition devices according to image acquisition instructions and trigger device shooting signals;
[0043] In this embodiment, image acquisition scheduling is implemented by a PLC controller, using a Siemens S7-1500 series PLC, and cooperating with an industrial control host for synchronous communication via PROFINET. The image acquisition device is a Basler acA1920-40uc industrial camera. After receiving the image acquisition instruction, the PLC parses the acquisition angle and resolution parameters according to the instruction field. The PLC then controls the servo motor to drive the rotating bracket to the specified angle position with an accuracy of ±0.2 degrees. The Omron E6B2-CWZ6C encoder is used to feedback the angle position. After reaching the set position, the PLC sends a 5V high-level shooting trigger signal to the camera through the output port. The signal duration is 20ms, which is used to control the camera shutter. After the shooting action is completed, the camera uploads the image data to the image processing server through the USB3.0 interface.
[0044] Collect product images from multiple angles based on device shooting signals to obtain the original image dataset;
[0045] In this embodiment, image acquisition utilizes a four-angle shooting method, with angles of 0°, 45°, 90°, and 135°, respectively. A single shot is performed at each angle, ultimately yielding four product images with complementary perspectives. The exposure time for each shot is strictly set to 100ms, and auto-exposure is disabled using a fixed-value exposure control method. Captured images are saved in RAW format, without compression or preprocessing. Each image file is approximately 2MB in size and is named "serial number_angle number_timestamp.raw." After image acquisition is complete, the image acquisition workstation centrally schedules the images and files them into the primary product image data directory according to their serial numbers, forming a raw image dataset. Each product number corresponds to a folder containing four images.
[0046] Perform resolution correction processing on the original image data set to obtain standardized image data;
[0047] In this embodiment, the cv2.resize() function in the OpenCV 4.5.1 library is used to standardize the image resolution, and the target size is uniformly set to 1920×1080 pixels. The image size is determined before correction. If the size does not match, linear interpolation (INTER_LINEAR) scaling is performed; if the image ratio is abnormal (the aspect ratio error exceeds ±5%), edge filling is added without changing the pixel content, and the filling color is the RGB mean of the 5 pixels on the edge of the image. After the image size is standardized, the image color space is uniformly converted to BGR format, and grayscale processing is performed to generate a grayscale image. The grayscale conversion uses the weighted average method (Y=0.299R+0.587G+0.114B), and the image contrast is enhanced by histogram equalization. The standardized image data is stored in PNG format, and the naming rule for each image is "serial number_angle number_std.png".
[0048] The product's unique serial number is bound according to the standardized image data to obtain the product serial number image.
[0049] In this embodiment, the image file naming and the binding of the unique serial number are implemented through a database index. A table "product_image_binding" is established based on MySQL8.0, and the fields include: serial number (CHAR(32)), image path (VARCHAR(255)), acquisition angle (INT), and shooting time (DATETIME). After each standardized image is stored in the warehouse, the image processing thread extracts the image path and file name, binds it with the serial number instruction queue in the memory, and writes it to the database. The database implements two-way query support, which means that the image can be located by the serial number, and the serial number can be reversed by the image path. The definition of the final product serial number image is the image set of the corresponding product in the binding result set, which supports subsequent image recognition and anomaly detection.
[0050] Preferably, the automatic commodity warehousing module performs label wrinkle detection based on the commodity serial number image, including:
[0051] Recognize the outline of serial number characters based on the product serial number image;
[0052] In this embodiment, character contour recognition adopts a method combining morphological processing and contour extraction. The standardized image is first subjected to Canny edge detection, with the low threshold set to 50 and the high threshold set to 150. Then, a rectangular structural element with an erosion kernel size of 3×3 is used to perform corrosion processing twice, and then an expansion processing is performed once to disconnect non-character boundary lines and highlight character boundaries. Call OpenCV's cv2.findContours() function to extract contours, set the contour retrieval mode to RETR_EXTERNAL, and only retain the outermost contour. When screening character contours, preliminary screening is performed based on the contour area (the threshold is set to 500 pixels) and the contour aspect ratio (limited to 0.2 to 1.5), retaining the suspected character area, and outputting the contour polygon vertex coordinate set for subsequent character line deformation analysis.
[0053] Calculate the character line deformation rate based on the serial number character outline;
[0054] In this embodiment, the deformation rate of character lines is calculated using linear regression and contour baseline comparison method. For each character contour, the boundary point set of its upper and lower edges is extracted, and the least squares linear fitting is performed on each set of boundary points to obtain the slopes of the fitted lines of the upper and lower edges (denoted as k_top and k_bottom), respectively. If the character is printed normally, the difference between its k_top and k_bottom should be within ±0.05, and the deformation rate is defined as |k_top-k_bottom|, with the unit being a dimensionless floating point number. When the deformation rate exceeds 0.1, it is considered that the character is obviously bent or stretched. The deformation rate data is matched one-to-one with the character area position, and a character deformation rate matrix is constructed for subsequent detection.
[0055] Perform label edge warping detection based on the character line deformation rate to obtain label edge warping data;
[0056] In this embodiment, based on the deformation rate data of the character contour, the characters in the edge area (within 50 pixels of the image edge) are extracted. If the deformation rate is continuously greater than 0.1, it is determined to be a warped area of the label edge. With these area coordinates as the center, the detection area width is expanded to 20 pixels, and the surrounding image blocks are extracted for edge gradient analysis. The Sobel operator is called to calculate the gradient direction and intensity of the image block. If the mean gradient intensity is greater than 30 and the direction is concentrated within ±30°, it is determined that warping exists. The coordinate range and gradient vector direction of the area are extracted to form the label warping data structure, which serves as the target area for subsequent laser contour acquisition.
[0057] Laser 3D contour acquisition is performed based on the label edge warping data to obtain the label edge warping 3D contour;
[0058] In this embodiment, the three-dimensional contour acquisition uses a Keyence LJ-V7000 series laser profiler, the light source wavelength is set to 405nm, the scanning speed is set to 800Hz, and the scanning resolution is 5μm. According to the coordinate range in the warping data, the mobile platform is controlled to position the product within the scanning range, and the PLC is used to control the start and stop of the laser head. The X, Y, and Z three-dimensional point data are automatically recorded during scanning. The Z axis represents the warping height with an accuracy of 0.01mm. The contour data is exported in CSV format, and the fields are X, Y, and Z three-axis coordinates. The acquisition time of a single warping area does not exceed 0.5 seconds. Coordinate normalization processing is performed after each acquisition task to align all point cloud data with the center point of the product.
[0059] Calculate shear stress based on the three-dimensional contour of the label warping edge to obtain shear stress data;
[0060] In this embodiment, after completing the three-dimensional contour collection of the label warping, the shear stress needs to be calculated based on the three-dimensional data. During the operation, the three-dimensional contour data is imported into the three-dimensional processing platform in the form of a point cloud. The platform selects PolyWorks Inspector and loads the point cloud format as .ply. The system partitions the label warping area with a regular grid of 5 mm by 5 mm, extracts the point coordinates within each grid and fits the local surface. The fitting surface uses the least squares method to fit the quadratic surface. By extracting the changes in the tangent slope of the local surface in the X and Y directions, the deformation tensor of the point position in different directions is obtained, and the shear modulus value in the material parameter is set to 1.6 times 10 to the 8th power Pascal. The shear stress value corresponding to each grid is calculated according to the shear deformation in each direction. Finally, a shear stress distribution matrix is established in the entire map. The matrix structure is the shear stress value corresponding to each grid, in Pascals, and the matrix is exported to CSV format for subsequent steps.
[0061] Identify shear stress concentration areas based on shear stress data;
[0062] In this embodiment, according to the exported shear stress data, the shear stress field is rendered by a data visualization tool, and the imshow function is executed on the shear stress matrix using the Matplotlib tool to map the shear stress value to a color depth to represent the intensity distribution. The shear stress critical value threshold is defined as 8 MPa. Through empirical analysis, this value can be used to identify the stress range of the label film entering the plastic deformation stage. The grid positions with stress values greater than the threshold are marked, and the findContours function of the OpenCV tool is used to extract all continuous stress areas that meet this condition. In the marked results, the noise interference area with too small an area is further excluded, and the area threshold is set to 3 square millimeters. Only the connected areas with an area greater than the threshold are retained as the effective shear stress concentration area. The minimum circumscribed rectangular boundary of each valid area is extracted by the boundingRect function of OpenCV, and the main direction angle of each area is extracted in combination with the principal component analysis function. The angle represents the main direction of the shear stress in the area. All results are saved in JSON format, including the number, boundary coordinates, center position, average shear stress value and main direction angle information of each area.
[0063] Predict the wrinkle direction based on the shear stress concentration area and obtain wrinkle direction data;
[0064] In this example, the principal direction angles of identified shear stress concentration areas are used as a basis for predicting wrinkle directions. The stress direction information within each area is further processed. The principal direction vectors are extracted from the shear stress distribution within each area using the PCA method. The direction vectors of all stress points are averaged to obtain the global average direction angle of the shear stress direction within each area. This angle represents the direction of potential wrinkle formation. The predicted wrinkle direction angles for each area are organized into a structured list, recording the area number, predicted wrinkle direction angle, and direction vector information. This list is then aligned with the original labeled 3D point cloud to create a labeling layer.
[0065] Label wrinkle detection is performed based on wrinkle direction data to obtain label wrinkle data.
[0066] In this embodiment, label wrinkle detection is performed based on the predicted wrinkle direction angle. The predicted direction angle is first used as the reference direction for image directional filtering. Z-axis height changes along the predicted direction are extracted from the 3D point cloud to construct a directional gradient map. During this process, the Sobel operator is used to perform first-order differential processing on the point cloud data along the predicted direction to identify areas with sudden changes in label surface height. A sudden change detection threshold of 0.4 mm is defined, and the minimum continuous sudden change edge length is set to 10 mm to eliminate non-continuous interference edges. A continuous edge tracking algorithm is used to connect all sudden change edges that meet the above criteria and identify them as suspected wrinkle paths. The location and direction of maximum curvature are extracted for each path. All identified wrinkle paths are summarized by region number, with a record containing path length, start and end point coordinates, direction angle, maximum curvature location coordinates, and curvature value. Finally, all detection data is summarized and output as an XML structured document, which is used to update structured fields in the label status tracking database. This wrinkle information, when bound to the product's unique serial number, can be used as a constraint in the product's incoming quality control process, achieving closed-loop quality status annotation for the one-item-one-code lifecycle tracking system.
[0067] Preferably, the optimization of the label production process based on label breakage data in the commodity automatic warehousing module includes:
[0068] Detect the material fiber arrangement direction based on the label wrinkle data;
[0069] In this embodiment, after obtaining the label wrinkle data, in order to detect the material fiber arrangement direction, it is necessary to locate the wrinkle area in the three-dimensional contour data and perform micro-texture analysis on the wrinkle path in the vertical direction. First, using the wrinkle path data extracted in the previous step, with the center of each path as the reference, a rectangular area with a length of 20 mm and a width of 5 mm is extracted, and point cloud profile data is extracted in this area at a step size of 0.1 mm. By extracting the height change in the Z-axis direction and the projection change in the X-axis or Y-axis direction, a surface texture gradient map of each region is constructed. The texture gradient map is analyzed in the frequency domain using a two-dimensional Fourier transform to extract the main frequency direction angle, which is the material fiber arrangement direction angle in degrees, and it is bound to the regional coordinates and output as a structured data table. Each regional record field includes the wrinkle number, the main texture direction angle, the texture direction intensity value (in dB), and the coordinates of the regional center point.
[0070] It is particularly important to examine the fiber orientation of the material, including:
[0071] Based on the texture extraction processing of the labeled wrinkle data, the grayscale texture atlas of the wrinkle area is obtained;
[0072] In this embodiment, in the collected label image data, the image cutting tool is first used to perform a local segmentation operation on the label surface to extract the wrinkle area caused by tension interference. The label image resolution is not less than 300DPI, and the image size is maintained at 800×600 pixels or more to ensure clear image details. After the wrinkle area is determined, the RGB label image is converted into a grayscale image using a grayscale mapping algorithm, in which the weighted average conversion formula used is set to 0.299, 0.587, and 0.114 for the red, green, and blue channels, respectively. After the grayscale image is generated, a local variance filter is called to extract areas with significant grayscale differences. The filter kernel window size is 5×5 pixels and the sliding step size is 1 pixel. Subsequently, a Gabor filter is applied to enhance the texture direction features. The Gabor kernel parameters are set to a frequency of 0.25 and a direction angle θ set every 15° from 0° to 180°. The response amplitudes at all angles are superimposed and saved as a texture response map. The output image is the grayscale texture map of the wrinkle area.
[0073] Calculate the texture direction gradient based on the grayscale texture atlas of the wrinkle area;
[0074] In this embodiment, the Sobel gradient operator is used to perform a two-dimensional spatial derivative operation on the grayscale texture map of the wrinkle area. The Sobel operator performs filtering operations in the x and y directions respectively, and the convolution kernels are [-1, 0, 1], [-2, 0, 2], [-1, 0, 1] and [-1, -2, -1], [0, 0, 0], [1, 2, 1]. After performing the convolution, the gradient maps in the Gx and Gy directions are obtained respectively. The directional gradient calculation formula arctangent (Gy / Gx) is then used to calculate the texture direction angle for each pixel, and the angle is mapped to the range of 0–180°. In order to remove background noise interference, the pixel gradient amplitude threshold is set to 20, and the pixel angle data below the threshold is eliminated. Then, the valid angle data is grouped into 5° for angle frequency statistics, and the statistical results constitute a directional histogram, which is used as the input data source for subsequent fitting.
[0075] The main direction of the wrinkles is fitted according to the texture direction gradient to obtain the linear fitting data of the main direction of the wrinkles;
[0076] In this embodiment, based on the obtained directional histogram data, the minimum mean square error fitting method is used to perform a linear regression fitting on the angle frequency distribution curve, with the goal of extracting the most dense directional area. The directional histogram is first smoothed, and the noise fluctuation is smoothed by a weighted average method with a sliding average window width of 3 angle intervals. In the smoothing result, the position where the maximum frequency occurs and the interval within the range of ±10° are selected as the main fitting segment, and the angle value in the segment and its frequency of occurrence are constructed as scatter data. Then the least squares formula is called to fit the angle-frequency scatter points to obtain the slope and intercept of the linear fitting equation. The maximum response angle corresponding to the fitting result is regarded as the main direction angle of the wrinkle. The final output includes the linear fitting data of the main direction of the wrinkle, including the fitting slope, fitting intercept, fitting confidence interval, fitting angle and other parameters, and the angle accuracy is retained to 1 decimal place.
[0077] The material fiber arrangement direction is inferred based on the linear fitting data of the main direction of the wrinkles.
[0078] In this embodiment, the linear fitting angle of the main direction of the wrinkle is used as a candidate main fiber direction, and the direction mapping is performed according to the reference standard set in the material production process. Taking the known label printing direction as the reference coordinate axis, the printing direction is defined as 0°, the direction consistent with it is defined as the parallel direction, and the direction perpendicular to it is defined as the vertical direction. If the angle between the fitting angle and the reference direction is less than 15°, the fiber arrangement direction is judged to be "parallel"; if the angle between the fitting angle and the reference direction is between 75° and 105°, it is judged to be "vertical"; if the above two conditions are not met, it is marked as "inclined" and the specific angle is recorded. Finally, the material fiber arrangement direction data containing the arrangement direction annotation (parallel, vertical, inclined) and the corresponding angle value is output and uploaded to the material data label library of the "One Item One Code Full Life Cycle Tracking System" as a record item for fiber structure traceability.
[0079] Calculate the directional deviation according to the material fiber arrangement direction;
[0080] In this embodiment, after obtaining the material fiber arrangement direction, in order to calculate the directional deviation, it is necessary to use the reference fiber arrangement direction in the original design process for comparison. The design direction data comes from the standard fiber direction defined in the label manufacturing process database and is set to the horizontal direction, that is, the angle is 0 degrees. The difference between each actual measured material fiber arrangement angle and the standard angle is calculated to obtain the directional deviation angle, and the result unit is degree. In order to eliminate the error caused by directional symmetry, all angle differences are calculated as the minimum angle, for example, the deviation angle is the smaller value of |θ_actual–θ_standard| and 360–|θ_actual–θ_standard|. At the same time, in order to quantify the deviation intensity of each region, the deviation index is calculated by combining the amplitude of the main frequency component in the Fourier frequency domain result and the deviation angle, and the deviation P = deviation angle × main texture direction amplitude, in degrees × dB. All deviation data are output as a CSV format file, and the columns include region number, deviation angle, main texture direction intensity, and deviation value.
[0081] Determine the imbalance of material fiber arrangement according to the directional deviation and obtain the material fiber arrangement imbalance data;
[0082] In this embodiment, in order to determine the imbalance state of the material fiber arrangement, it is necessary to set a deviation threshold judgment standard. According to measured statistics, the deviation angle critical value is set to 15 degrees, and the area with the main texture direction intensity lower than 25dB is regarded as a low signal-to-noise ratio area. The area with a deviation angle greater than 15 degrees and a main texture direction intensity lower than 25dB is marked as "strong imbalance", the area with a deviation angle between 5 and 15 degrees or a main texture direction intensity between 25 and 35dB is marked as "medium imbalance", and the rest are marked as "weak imbalance" or "normal". The above judgment rules are automatically executed by the Python script, which reads the CSV file line by line and generates new structure fields according to the conditions. The output data structure includes: area number, deviation angle, intensity, deviation degree, and imbalance level. The imbalance level field type is an integer, 0 means normal, 1 means weak imbalance, 2 means medium imbalance, and 3 means strong imbalance. The result is used to establish a mapping model between label manufacturing data and fiber arrangement status, and is written into the data field corresponding to the label number in the database.
[0083] Predict crack initiation points based on material fiber arrangement imbalance data;
[0084] In this embodiment, after extracting the imbalance state of the fiber arrangement, it is necessary to further predict the crack initiation point. This process is based on the "strong imbalance" and "medium imbalance" regions, and stress concentration trend analysis is performed on the point cloud data within these regions. During the operation, the Z-axis height change rate, surface curvature, and three-dimensional angle jump are extracted within a circular area with a diameter of 10 mm centered on the imbalance region. The Z-axis height change rate is extracted using a linear fitting slope with a step size of 0.2 mm, the surface curvature is calculated using Gaussian curvature, and the angle jump is obtained by the angle between the surface tangents. The initiation indicator thresholds are set as follows: the risk of crack initiation is considered to exist when the Z-axis slope is greater than 0.3, the curvature value is greater than 0.002 mm^-2, and the angle jump is greater than 10 degrees. If two of the three parameters meet the conditions, the point is marked as a crack initiation point, and its spatial coordinates are recorded. If there are multiple crack initiation points in each label, the first three points with the largest curvature values are sorted by curvature value and extracted as key prediction points. The final output crack initiation point data is in JSON format, and the fields include tag number, crack number, spatial coordinates (X, Y, Z), local maximum curvature, direction jump variable, and slope value.
[0085] Conduct label fracture assessment based on the crack initiation point to obtain label fracture data;
[0086] In this embodiment, when the label fracture assessment is performed based on the above-mentioned crack initiation point data, the connectivity and stress propagation trend between the initiation points are used to estimate the fracture path. The specific method is to calculate the Euclidean distance between the initiation points. When the distance between the two initiation points is less than 5 mm and aligned at a similar direction angle (less than 15 degrees), it is considered that there is a potential fracture path between the two points. In this way, a crack connection graph is constructed, and the path length, path curvature average value, and path Z-axis jump number are calculated for each connectivity graph. If the path length is greater than 10 mm or the curvature average value exceeds 0.0015 mm^-2, the path is marked as a potential fracture path. After all paths are integrated, the output is a fracture data structure, which includes the path number, start and end point coordinates, total path length, average curvature, maximum height mutation value, and crack level (weighted classification by length and curvature, level 1 is mild, level 2 is medium, and level 3 is severe). The data is exported in XML format and written into the label database.
[0087] Trace back the die-cutting contour position based on the label breakage data;
[0088] In this embodiment, the die-cutting contour position is traced back according to the path starting position of the crack level 2 or 3 in the label fracture data. The specific operation is to align the crack starting position to the label CAD contour layer in the label plane coordinate system, and the layer is stored in the vector format SVG. Through the coordinate matching operation, the closest distance from the crack starting point to the die-cutting edge is calculated. If the distance is less than 3 mm and the direction is perpendicular to the edge segment, it is considered that the origin of the fracture is related to the die-cutting edge. Record the path number and position interval corresponding to the die-cutting edge segment in the die-cutting design file. All crack starting points are bound to the path number and output to form a die-cutting contour crack mapping table. The data structure includes the label number, crack number, corresponding die-cutting contour number, edge segment start and end point coordinates, and the relative angle of the crack origin.
[0089] Calculate the die path error rate based on the die cutting contour position; optimize the chamfer structure parameters according to the die path error rate to obtain the chamfer structure optimization parameters;
[0090] In this embodiment, based on the above-mentioned die-cutting contour position, the error rate of the die cutting path is calculated. The actual die-cutting trajectory is reconstructed and compared with the designed CAD contour. First, the actual die-cutting image is extracted and edge recognition is performed through the visual system. The edge path is extracted as a continuous vector sequence, set as P_actual. The designed die cutting path is imported as a CAD contour point sequence, set as P_design. The error of each segment is calculated by the average point distance of each 10 mm path segment, wherein the formula for calculating the error rate is specifically shown as follows: |P_actual(i)–P_design(i)| / L_design(i), where L_design is the length of the designed segment. The error threshold is set to 0.5 mm. If the error of a single segment exceeds the threshold, the segment is marked as an abnormal segment. The ratio of the length of all abnormal segments to the total length is calculated as the overall error rate. The output error rate data includes label number, path number, total error rate, number and position of abnormal segments. Based on the error rate, the die cutting chamfer structure parameter optimization is performed, focusing on analyzing the chamfer curvature and chamfer radius in the area where the error rate is concentrated. The locations of abnormal sections are extracted, and the corresponding CAD chamfer design parameters include the curvature radius R and angle A. A table is created that corresponds to the chamfer parameters. The corresponding curvature radius is extracted from the point with the maximum error rate. If the error is greater than 1%, the curvature radius is increased by 10%; if it is less than 0.5%, the curvature radius remains unchanged. For errors in between, the chamfer radius is adjusted linearly. After updating the parameters, a chamfer structure optimization table is output. Fields include the label number, path number, original chamfer parameters, optimized chamfer parameters, and optimization amplitude percentage, all in millimeters and percentages.
[0091] Calculate the die cutting trajectory mutation rate based on the die cutting contour position; and perform die cutting contour line smoothness according to the die cutting trajectory mutation rate;
[0092] In this embodiment, the mutation rate of the die cutting trajectory is calculated based on the die cutting contour position. The tangent direction angle of each path segment in the CAD path is continuously calculated. If the angle between adjacent path segments is greater than 25 degrees, it is recorded as a mutation. The mutation rate = number of mutations / total number of path segments. After calculating the mutation rate of each path, a mutation statistics table is generated. If the mutation rate is greater than 5%, it is marked as an unsmooth path. The mutation rate results of all paths are output in JSON format, and the fields include path number, total number of segments, number of mutations, mutation rate value, and smoothness level.
[0093] Integrate the chamfer structure optimization parameters and the smoothness of the die contour line to obtain the label optimization production process data;
[0094] In this embodiment, the optimized chamfer parameters for each path are combined with its mutation rate level to form a recommended optimization operation for each path. The optimization operation list for all paths is then compiled by tag number. The output process data structure consists of: tag number, path number, optimized chamfer radius, mutation rate level, whether re-molding is required, and the estimated path error lower limit. All optimized process data is output to a structured database table and serves as input parameters for the subsequent tag production simulation module.
[0095] Based on the label optimization production process data, label production simulation is performed to obtain label optimization data.
[0096] In this embodiment, in the label production simulation stage, based on the optimized process data, the CNC die-cutting simulation system SimCAM is used to import the optimized die parameters and simulate the label die-cutting process. The material parameters are set to match the die parameters, including the material thickness of 60 microns, the elastic modulus of 2.2GPa, and the die linear speed is set to 0.3m / s. The simulation process records the pressure distribution of the die contact point, the die feed trajectory, the fracture trend prediction heat map, and the three-dimensional structure of the label after simulation. All simulation data are structured and output as label optimization data, and the fields include simulation number, fracture trend index, die-cutting accuracy, die force uniformity index, etc. The data is ultimately used to replace the original process data in the label traceability database to form "label optimization data" to support the high-precision traceability and improvement records of the label production path in the "one item one code full life cycle tracking system".
[0097] Preferably, the automatic warehousing simulation of goods based on label optimization data in the automatic warehousing module includes:
[0098] Import label optimization data into the warehousing simulation system;
[0099] In this embodiment, data synchronization is performed with the industrial database through the PLC control interface, and the RS485 communication protocol is used to import the aforementioned label optimization data into the integrated warehousing simulation module of the MES (manufacturing execution system). The imported data format is the CSV standard format, and the fields include "label ID number", "label size (unit: mm)", "label material code", "optimized fiber arrangement balance (unit: %)", "die contour smoothness coefficient (unit: %)" and "breakage probability index (0-1)". During the import process, the data is verified by the data verification submodule to perform field format verification, and the CRC32 algorithm is used to check the integrity of each line of data, and the error rate is controlled within 0.01%. After the label optimization data is imported, the cache time is set to 60 seconds in the cache area to ensure that the simulation execution stage is entered after the writing is completed.
[0100] In the warehousing simulation system, the product surface friction coefficient is set to 0.1-0.6, the center of gravity offset distance is 30-100mm, the surface reflectivity is 10%-90%, and the packaging compression modulus is 50kPa-500kPa;
[0101] In this embodiment, the physical property parameters of the commodity are set through an HMI (human-machine interface) touch terminal and written into the warehousing simulation system parameter configuration table. The specific settings are as follows: the surface friction coefficient is measured by a physical friction test instrument (model: FPT-C2000) for static friction coefficient measurement, the friction comparison material is an industrial-grade rubber sheet, the setting range is 0.1 to 0.6, and the setting particle size is 0.05; the center of gravity offset distance is measured by a three-dimensional coordinate measuring machine (model: Hexagon GLOBAL S) to measure the spatial displacement of the object's center of mass relative to the geometric center, with a setting range of 30mm to 100mm and a value accuracy of ±0.1mm; the surface reflectivity is measured using an integrating sphere spectrophotometer (model: CAS140CT) with a setting range of 10% to 90% and an accuracy of ±2%; the packaging compression modulus is measured by applying a constant rate compression load using a material mechanics testing machine (model: Instron 5982) to obtain a stress-strain curve. The compression modulus is calculated as Δσ / Δε, with a setting range of 50kPa to 500kPa and a minimum interval of 25kPa.
[0102] In the warehousing simulation system, the conveyor belt speed is set to 0.1m / s-1.5m / s, and the picking frequency of the sorting robot arm is set to 30 times / min-180 times / min.
[0103] In this embodiment, the conveyor belt speed is set by the servo driver control parameters, and the motor output speed is adjusted by the frequency converter (model: ABB ACS580). The running speed is monitored in real time by the speed measuring wheel. The setting range is 0.1m / s to 1.5m / s, and the setting interval is 0.1m / s. The grasping frequency is configured by the six-axis robot arm controller (model: KUKA KR C4), and the robot arm motion cycle is calculated based on the maximum acceleration and minimum rotation angle of the joint. The grasping frequency of the robot arm is set to 30 times / min to 180 times / min, and the frequency adjustment step is 15 times / min. The optimal grasping cycle is corrected by matching the workstation spacing. After each grasping is completed, the visual recognition feedback module confirms the label scanning data and triggers the feedback signal. The robot arm grasping rhythm performs PID adjustment according to the feedback signal to synchronize the recognition and grasping rhythm.
[0104] In the warehousing simulation system, the identification distance of the label identification device is set to 100mm-800mm, the identification angle is ±45°, and the label surface reflectivity is 20%-80%;
[0105] In this embodiment, the recognition device adopts an industrial-grade CCD scanning head (model: KEYENCE SR-2000W), and the recognition distance is set by the built-in parameters of the laser ranging module. The set distance range is 100mm to 800mm, and the set granularity is 50mm. The recognition angle is ±45° of the reference axis. The angle is adjusted by the built-in servo motor of the scanning head and corrected in real time with the gyroscope. The angle error is controlled at ±1°. The reflectivity of the label surface is obtained by the ratio of the incident light intensity to the reflected light intensity. The setting range is 20% to 80%. A label test piece (made of PET, coated paper, and self-adhesive) is used for benchmark calibration. A pre-scan test is performed before each reflectivity setting to ensure that the recognition boundary range is stable, and the setting error does not exceed ±3%.
[0106] Run the commodity automatic warehousing module and output the commodity automatic warehousing data.
[0107] In this embodiment, after all parameters are set, the automated warehousing simulation module is activated through the warehousing simulation control terminal. When the system is running, the main control PLC module (model: Siemens S7-1500) schedules the logical execution order of each unit, controls the conveyor belt delivery rhythm, the recognition module scanning feedback, the robotic arm grasping execution and the stacking path planning according to the warehousing cycle. The entire warehousing process is monitored in real time in the SCADA system, and the monitoring indicators include the tag recognition success rate, the grasping accuracy, the warehousing error distance and the item stacking stability. The simulation process lasts for 1200 seconds, and records the core indicators such as the total number of warehousing, the number of successful recognitions, and the number of grasping errors. The commodity automated warehousing data table is exported, and the fields include "tag ID", "warehousing timestamp", "recognition success flag", "grabbing error (mm)", and "final positioning offset (mm)". The export format is standard XML for subsequent system calls.
[0108] Preferably, the safety shelf identification module includes the following functions:
[0109] Identify real-time incoming batches based on the automated incoming goods data;
[0110] In this embodiment, in the process of identifying real-time incoming batches based on the automated incoming goods data, the timestamp, product serial number, packaging identification, and conveyor belt receiving position information output by the automated incoming goods module are first called. By constructing an incoming data structure, the fields of which include: product ID, batch number, incoming time (accurate to seconds), packaging barcode number, and incoming workstation number. The product data is merged based on the adjacent 30-second time interval as a grouping dimension to generate an incoming batch number in the format of "IN-YYYYMMDD-HHMMSS-workstation number". This is recorded by the scheduling management end and written into the table "realtime_batch_table" in the real-time database.
[0111] Calculate current inventory capacity based on real-time incoming batches;
[0112] In this embodiment, when calculating the current inventory capacity based on the real-time incoming batches, the current status field stock_status of all batches of goods in the inventory database is queried, and the items with the status "in stock" are selected, and the corresponding packaging volume (m 3 ) data field and accumulate it: Inventory capacity = ∑ single product packaging volume. If the inventory area is divided into multiple physical locations, the location number field must also be read and accumulated by group to form the current occupied volume statistics for each location. Inventory capacity data is uploaded to the inventory analysis engine in JSON format.
[0113] Perform location priority analysis based on current inventory capacity to obtain location priority data;
[0114] In this embodiment, in the process of performing location priority analysis based on the current inventory capacity, the priority calculation parameter weights are assigned by reading the "available volume", "distance from the conveyor line (mm)", "usage frequency", and "historical loss rate" fields of each location. The recommended weight coefficients are: distance weight 0.3, volume utilization weight 0.3, loss rate reverse weight 0.2, and usage frequency forward weight 0.2. The comprehensive priority score is calculated using a linear combination formula, and the value range is limited to 0-100. Locations with a priority score greater than 70 are marked as "high priority" and recorded in the priority allocation table slot_priority_table.
[0115] Perform dynamic inventory management based on location priority data to obtain dynamic inventory management data;
[0116] In this embodiment, during dynamic inventory management based on location priority data, the high-priority location ID is retrieved and individually bound to the products in the current batch to be stocked. Each binding is performed on a batch-by-batch basis. Before binding, a check is made to see if the remaining volume of the location is greater than the volume of the individual products. If so, the location ID is recorded and the corresponding location volume field is updated to "original value - product volume." The location's latest status is updated to "pre-allocated." A table for binding products and locations, item_slot_bind_table, is generated, and a dynamic inventory allocation log is uploaded to the "inventory_dynamics_log" table.
[0117] Calculate shelf utilization based on inventory dynamic management data;
[0118] In this example, when calculating shelf utilization based on dynamic inventory management data, the physical capacity and actual volume of objects currently allocated to each shelf are obtained. The "current occupied volume" of all sub-locations associated with that shelf ID is queried from the table slot_occupancy_table. This value is then compared to the "maximum load volume" in the shelf definition. Shelf utilization = current occupied volume / maximum load volume × 100%. The calculated result is saved in the "shelf_utilization_table" for subsequent structural analysis.
[0119] Identify shelf welding cracks based on shelf utilization and obtain shelf crack data;
[0120] In this embodiment, in the process of identifying shelf welding cracks based on shelf utilization, multi-channel vibration acceleration sensors and ultrasonic microcrack detectors installed at the four corners and welding nodes of the shelf are called. Through a continuous 2-hour data collection cycle, the vibration spectrum of the shelf structure is compared to see whether there is abnormal frequency band drift. Crack identification uses the occurrence of more than 3 times of vibration band shift range greater than 0.05Hz and the identification of echo notch reflection peak intensity greater than 5dB in the ultrasonic echo as the detection standard. The crack node coordinates are recorded, and the shelf crack data file shelf_crack_data.csv is generated and uploaded to the equipment health diagnosis system.
[0121] Evaluate the load-bearing capacity of the shelf structure based on the shelf crack data;
[0122] In this example, when assessing the load-bearing capacity of a shelf structure based on shelf crack data, the crack ratio is calculated as the weld crack length divided by the total weld length, according to the correction factor for the impact of welding defects on load-bearing capacity in the national standard GB50017-2017, "Code for Design of Steel Structures." A safety correction factor is also introduced. If the crack length of a weld node exceeds 10% of the original weld length, the corresponding component strength reduction factor is set to 0.8; if it exceeds 20%, the reduction factor is set to 0.6. The load limit is reassessed based on the shelf geometry model, the load-bearing capacity index is recalculated, and the structural assessment report, shelf_strength_report.json, is output.
[0123] Identify safe racking areas based on the racking structure's load-bearing capacity.
[0124] In this embodiment, in the process of identifying safe shelf areas based on the load-bearing capacity of the shelf structure, the load-bearing capacity value is compared with the current load in use. If the load safety factor = the assessed load limit / the current load in use, the shelf area with a value greater than 1.5 is marked as a "safe area", the value between 1.0-1.5 is a "monitoring area", and the value less than 1.0 is a "dangerous area". The identification result is stored in the shelf_safety_zone_table table, and the system scheduling module automatically avoids allocating goods to non-safe areas in the next warehousing task, thereby realizing an inventory distribution management strategy based on structural safety.
[0125] Preferably, the safety shelf identification module identifies shelf welding cracks based on shelf utilization, including:
[0126] Identify high-utilization shelf areas based on shelf utilization;
[0127] In this embodiment, in the shelf management system, the incoming and outgoing data records are called, and each piece of data contains the unique identification of "one item, one code", shelf number, incoming time, outgoing time, and item weight. The cumulative storage time and total weight of all items on the designated shelf are summarized and compared with the maximum load-bearing capacity and standard working cycle of the shelf. The usage of each shelf is counted on a daily basis, with a cycle of 7 days. Using the rule engine configured in the warehouse management platform, areas where the average shelf utilization ratio reaches more than 80% are set as high-utilization areas. This threshold comes from the medium- and high-risk workload boundaries defined in the structural fatigue standard for long-term full-load monitoring of shelves. After summarizing the historical data, the system marks the high-utilization shelf numbers on the warehouse map, and exports them in the form of a list to the "High-Utilization Shelf List" as the target area for acoustic detection.
[0128] Collect acoustic sensor data based on high-utilization shelf areas;
[0129] In this embodiment, acoustic sensors are deployed at welding nodes in high-utilization shelf areas. Four sensing points are deployed on each group of shelves. The sensor model is an industrial-grade piezoelectric ceramic acoustic sensor. The installation locations include the base beam, the intersection of vertical columns, the top support beam and the middle support weld. Each sensor is adhered to the metal surface using special industrial glue. The bonding area is controlled within 2 square centimeters and is kept stable for 12 hours using a pressure clamp to ensure coupling performance. The signal cable uses a metal shielded wire with a length of no more than 5 meters and is connected to the centralized acquisition controller. The acoustic acquisition controller model is TDSP-308. The continuous sampling time is set to 2 minutes and the sampling frequency is set to 1 million times per second. The data records are saved in the local hard disk in the original waveform binary format. After the acquisition is completed, it is automatically archived to the specified file directory of the data center, and the data file is identified by the shelf number and sensor number.
[0130] Perform fast Fourier transform on the acoustic sensor data to obtain the acoustic sensor spectrum;
[0131] In this embodiment, the acoustic waveform data collected by each group of sensors is imported into a dedicated data processing module in the edge server. The signal is preprocessed, including high-frequency interference filtering and signal normalization. The processing module calls the FFT transformation plug-in, sets the data segmentation window to 1024 points, and outputs the processing results as an acoustic spectrum in the form of a frequency distribution, covering a frequency range from 10kHz to 500kHz. The processed data is saved in CSV format, with each line representing the sound intensity value of a frequency point. A spectrum file is generated for each channel and stored in a file named "shelf_number_channel_number_spectrum.csv", which serves as the data source for subsequent mutation segment identification and high-frequency energy analysis.
[0132] Identify broadband mutation segments based on acoustic sensor spectrum; Identify high-frequency segments based on acoustic sensor spectrum;
[0133] In this embodiment, the spectrum file is segmented and the frequency is divided into several intervals of 100kHz. The sound intensity changes are read in each interval, and the position segments where the sound intensity value fluctuates violently between adjacent frequency points are identified. If the fluctuation in a certain frequency interval exceeds twice the historical background noise fluctuation standard, it is marked as a mutation segment. The background noise standard is calculated by the acoustic spectrum collected under the no-load state on site. The system outputs the mutation record file according to the start and end frequency and occurrence position of the mutation segment, and marks the mutation segment as a candidate segment of structural abnormality signal for use in the next energy density analysis cross-validation. The frequency range in the spectrum is limited to between 200kHz and 500kHz, which is referred to as the high-frequency segment. All sound intensity data within this range are read and compared with the average sound intensity of the complete spectrum. If the overall sound intensity level of the high-frequency segment is more than 15% higher than the set threshold of the average sound intensity of the entire segment, the frequency segment is marked as a high-frequency aggregation segment. This standard threshold is derived from the statistical feature setting of a large number of normal shelf weld samples. The processing results generate a high-frequency aggregation record file, which contains information such as the start and end frequencies of the aggregation segment, average sound intensity, maximum sound intensity, and sound intensity standard deviation, which is used for high-frequency energy density evaluation.
[0134] Calculate high-frequency energy density based on high-frequency band;
[0135] In this embodiment, for the spectrum data marked as high-frequency aggregation segments, the sound intensity value is extracted frequency point by frequency point, and the value is converted into linear energy units and then aggregated and counted. The sum of the sound intensities of all frequency points is divided by the length of the frequency range to obtain the high-frequency energy density. Each acoustic channel is processed independently, and the results are output to a unified energy density file with the shelf number, sensor number, high-frequency band range and corresponding energy density value. Subsequently, the data of multiple sensor channels on the same shelf are integrated and weighted averaged using distance weights to improve the sensitivity of identifying local weld anomalies. The final output is the high-frequency energy density index corresponding to each shelf number.
[0136] The shelf welding cracks are determined based on the broadband mutation segment and high-frequency energy density, and the shelf crack data are obtained.
[0137] In this embodiment, the system retrieves the broadband mutation segment and high-frequency energy density indicators, and matches the two types of data in the frequency range. If the mutation segment corresponding to a certain sensor is completely within the high-frequency aggregation segment, and the energy density corresponding to the frequency band exceeds the preset safety threshold, it is determined that there is a crack signal in the weld area. The safety threshold is derived from the acoustic energy boundary value recorded in the welding structure load-bearing experiment, and the value is 90% of the minimum abnormal value in the reference sample. At the same time, combined with the arrival time difference of the acoustic signals between multiple sensors, spatial inversion is performed through the geometric position of the sensor layout to calculate the three-dimensional coordinates of the sound source point, and the error range is controlled within 15 mm. All recognition results are written into the shelf crack data file, including shelf number, crack location, crack signal frequency range, energy density, recognition time and sound source positioning coordinates.
[0138] Preferably, the product life cycle tracking module includes the following functions:
[0139] Extract channel structure features based on the safety shelf area to obtain channel structure data;
[0140] In this embodiment, image modeling of the warehouse aisle structure is performed around the shelf cluster that has been identified as the "safe shelf area". A three-dimensional laser scanner (model FARO Focus S150) is used to collect three-dimensional point cloud data, with the scanning distance set to 50 meters and the resolution set to 2 million points per square meter. The scanner is deployed at both ends of the shelf aisle and the horizontal aisle area in the center of the shelf, with a total of no less than 6 measuring points. After scanning, the point cloud data is converted into a three-dimensional structural model through a dedicated laser mapping system, and the wall position, shelf occupancy boundary, aisle edge line, and ground undulation points are marked in the model. Subsequently, the BIM modeling system is used to extract the channel structure parameters, including channel width (in mm), minimum turning angle (in degrees), total channel length (in m), and ground height difference (in mm). Finally, all parameters are summarized and output as a channel structure data document in JSON format and the correspondence between each channel section and the shelf number is marked.
[0141] Obtain shipping gateway data; match shipping task nodes based on shipping gateway data and channel structure data to obtain target shipping node data for the product;
[0142] In this embodiment, shipping gate data is read in real time by an intelligent gate control system installed at each warehouse shipping gate. The system reads the gate number, current opening status, bandwidth size, accessible time period, and geographical distance from the shelf area. Each shipping gate number is updated in real time using an RFID reader. The data format is CSV and contains fields such as gate number, bandwidth (mm), door height (mm), available status flag (1 or 0), and the shortest distance to each shelf (in meters). Matching rules are implemented based on the following parameters: the shelf number associated with each product is compared with the channel structure data to select the shipping gate closest to the product, with a door width greater than 600mm, a door height greater than 1500mm, and currently in the "available" state. Channel number mapping is used to determine whether the gate is directly connected to the shelf's aisle. Shipping gates that meet these conditions are marked as target shipping nodes and output as "product target shipping node data," which contains the product's unique ID, target shipping gate number, corresponding channel number, distance data, and shipping time period.
[0143] Conduct path feasibility analysis based on the target product shipping node data to obtain preliminary achievable path data;
[0144] In this embodiment, a geographic information modeling system (such as Revit or Autodesk Navisworks) is used to load channel structure data and shipping node data, and a depth-first graph search algorithm is used to construct all paths in the channel structure diagram based on the spatial path between the node starting point (the current shelf position of the product) and the end point (the target shipping door). The path construction process limits the following parameters: the path turning angle must not be less than 45 degrees, the turning radius must not be less than 500mm, and the effective passage width of the channel must not be less than 400mm. The number of path segments, the length of each segment, the number of corners, and the cumulative distance are calculated for each path segment by segment, and the path information is output as "preliminary reachable path data", including the number of each path segment, the coordinates of the starting point and end point, the segment length, the channel number, the corresponding channel width, the corner information, and the ground elevation.
[0145] Calculate the ground flatness based on preliminary reachable path data;
[0146] In this embodiment, based on the preliminary achievable path data, the ground point cloud data of the corresponding section of the path is read, and the surface fitting is performed using a three-dimensional ground fitting algorithm. Each path area is divided into several grids with a grid size of 100mmx100mm. The maximum and minimum height differences of each grid are extracted, and the height fluctuation value is recorded. If the height difference exceeds 5mm, it is recorded as a "micro-step"; if the width of the undulating area is less than 400mm and the height difference is greater than 20mm, it is marked as a "step obstacle". The overall standard deviation value is calculated for each path segment and a ground flatness factor is generated. The record output is a "ground flatness table", which includes the segment number, maximum height difference, average height change rate, obstacle segment number, and ground condition score.
[0147] Screen the shipping path for the preliminary accessible path data based on the flatness of the ground to obtain the product shipping path data;
[0148] In this example, all path segments with any of the following issues are removed from the preliminary reachable path data: first, the presence of steps with a height variation greater than 20mm; second, an average ground relief value (i.e., the standard deviation of the average height) greater than 10mm; third, a path mid-segment width less than 400mm; and fourth, a maximum slope greater than 12 degrees in any segment. The filtered path set is sorted in ascending order by total length, and the shortest path is selected as the product shipping path. The output structure is "Product Shipping Path Data," which includes the starting point, end point, path segment sequence, each segment length, cumulative total length, each segment's ground features, and channel number.
[0149] A product delivery simulation is performed based on the product delivery path data, where the transport channel width is set to 400mm-600mm, the maximum allowable slope is ≤12°, and the maximum step height difference is ≤20mm, to obtain product delivery data;
[0150] In this embodiment, a simulation engine (such as FlexSim or AnyLogic) is called, and the shipping path data is set as the shipping trajectory in the imported three-dimensional model of the warehouse channel. The physical dimensions of the transportation equipment are defined in the simulation system (length 800mm, width 350mm, height 450mm), the wheel diameter is 100mm, the maximum climbable gradient is 12°, and the maximum obstacle crossing ability is 20mm steps. During the simulation process, the ground elevation and channel boundary data are read point by point along the path to simulate the passage status of the transportation equipment in each section of the channel, including the equipment's tilt angle, turning radius, whether it contacts an obstacle, and whether it freezes or stops. Each simulation lasts for no less than 10 times, and records whether each shipment is successful. Finally, the product shipment data is output, including whether the path is successful, the simulation time, the maximum slope, the maximum number of collisions, and the moving speed record.
[0151] Serial number verification is performed based on product delivery data to obtain serial number verification data, which is then transmitted to the product management system to perform product full life cycle tracking tasks.
[0152] In this embodiment, after completing the simulated confirmed shipping path, the "one item one code" data corresponding to the unique identifier of the product is retrieved, and the full life cycle tracking code of the product is obtained from the shipping task generation list. The RFID reader at the end point of the reading path identifies the product tag information, and the read items include product serial number, shipping time, path number, shelf outbound number, and shipping port number. The serial number read on site is compared one by one with the shipping serial number recorded in the database. If they are completely consistent, it is marked as a successful verification. All verification results are written to the "Serial Number Verification Log" in real time. The format is CSV, and the fields include product ID, task number, actual shipping serial number, database matching serial number, verification time, and verification status code (1 for success and 0 for failure). The log data is pushed to the host interface address "192.168.1.99:2083" of the product management system in real time through the MQTT protocol for recording and associated calls for life cycle tracking.
[0153] Preferably, the serial number verification based on the product delivery data in the product life cycle tracking module includes:
[0154] Read the product serial number based on the product shipment data;
[0155] In this embodiment, an industrial barcode scanning and identification device is set up at the end of the shipping and loading channel, and the model used is the KEYENCE SR-2000W series fixed barcode reader. The device is installed 200mm above the conveyor belt, the acquisition angle is set to a 90° vertical overhead shooting mode, and the reading area is set to 100mmx100mm. Each product in the shipping data contains a path end timestamp, and the timed exposure function of the barcode scanner is triggered according to the timestamp. The exposure time is set to 1.2ms and the aperture is set to F4. The read content includes the QR code and the clear code characters under the code, and the recognition format is Code128 or DataMatrix type barcode. After scanning the code, the original barcode string read is used as the initial value of the serial number, and the timestamp, camera number, image frame number, and product ID are recorded to form a preliminary serial number record data table.
[0156] Collect serial number images based on product serial numbers;
[0157] In this embodiment, after the code is scanned and read, the image acquisition system is triggered to perform high-resolution image acquisition. The device used is a Basler acA1920-40gc industrial camera with a resolution of 1920×1200, an image format of BMP, and a frame rate set to 20fps. The camera is installed next to the code scanner, and the light source is set to a white LED backlight module with a light intensity of 3000 lux and an exposure time fixed to 2.0ms. When shooting, the image capture center area is controlled to be aligned with the barcode area, and the ROI parameter is set to a range of 640×480 pixels to ensure that the barcode and surrounding characters are fully captured. The naming rule for the captured image is "product ID+timestamp", and the storage path is the " / barcode_images / " directory of the shared server in the local area network. This image serves as the original input for subsequent processing steps such as scratch detection and inkjet overlap analysis.
[0158] Perform barcode scratch detection based on the serial number image to obtain barcode scratch data;
[0159] In this embodiment, after loading the above image, an edge detection algorithm is used to identify the scratched area. The Sobel operator is used to perform horizontal and vertical gradient detection on the image to identify the continuity of the black and white boundaries of the barcode. When the length of the missing segment of the boundary is greater than 3 pixels and the width of the missing segment is not less than 5 pixels, it is determined to be a scratched area. The starting coordinates, width, height and grayscale mean of each scratched area are recorded as the scratched block information. According to the image resolution, every 100 pixels is equivalent to the actual size of 5mm, so the barcode scratch determination threshold is set to a black and white broken area with a continuous area greater than 30 pixels, which is a valid scratch point. The output content includes information such as the image number, the total number of scratched areas, the position coordinates of each area, width, height, grayscale standard deviation, etc., which are uniformly formed into a "barcode scratch data table".
[0160] Of particular importance is the barcode scratch detection in the product lifecycle tracking module, which includes:
[0161] Perform image grayscale processing according to the serial number image to obtain a grayscale serial number image;
[0162] In this embodiment, the image grayscale processing is completed by linearly weighting the red, green and blue three-channel pixel values. The weighting factors are R: 0.299, G: 0.587, and B: 0.114 respectively. The collected original serial number image is read pixel by pixel, and the grayscale value of each pixel is calculated according to the above ratio, and the original RGB color information is replaced to generate a new single-channel image matrix. This operation is implemented by the image matrix channel processing function in OpenCV. All images use 8-bit grayscale accuracy, and the image resolution is uniformly adjusted to 640×480 pixels to ensure consistency in subsequent processing. The generated grayscale image is saved as a two-dimensional array structure, and each position represents a grayscale value ranging from 0 to 255, which is used for subsequent boundary analysis.
[0163] Based on the grayscale serial number image, the black and white boundary continuity analysis is performed to obtain the boundary fracture detection data;
[0164] In this embodiment, Sobel edge detection is performed on the grayscale image to obtain gradient information in the horizontal and vertical directions. The convolution kernel size of the Sobel operator is set to 3×3, and the horizontal gradient (Gx) and vertical gradient (Gy) are processed separately, and the gradient amplitude G=√(Gx2+Gy2) is calculated. The gradient map is binarized, and the edge response threshold is set to 80 (an empirical value, determined by obtaining the average minimum boundary fracture response amplitude from the sampled training data). Pixels greater than the threshold are regarded as boundary points. The continuity of the boundary line is detected by row-wise scanning. Boundaries with an interruption length of more than 10 pixels or an interruption frequency of more than 3 times per 100 pixels are marked as "broken boundaries", and their start and end positions, pixel coordinates, and gradient amplitude are recorded as boundary fracture detection data.
[0165] Extract the coordinates of the continuous fracture area based on the boundary fracture detection data and mark it as the suspected scratch area;
[0166] In this embodiment, regional connectivity analysis is performed based on the clustering characteristics of fracture points in the boundary fracture detection data. The 8-neighborhood connected region detection algorithm is used to mark the connected components to which all fractured pixels belong. The connection threshold is set to a minimum number of connected pixels ≥ 15 and a minimum width span ≥ 4 pixels, and connected components that meet this standard are extracted as "continuous fracture regions". The boundary coordinates (upper left corner, lower right corner), total number of pixels, and center point coordinates of each connected region are extracted and marked as suspected scratch area data. The storage format is a structure array, including the fields: "bounding_box" (rectangular boundary), "area" (number of pixels), "center_coord" (center of mass), and "fracture strength value" (mean gradient of the fracture area).
[0167] Based on the suspected scratch area, screen out areas with an area larger than 30 pixels and a boundary span larger than 5 pixels, and mark the valid scratch area;
[0168] In this embodiment, conditional filtering is performed on all suspected scratch areas extracted in the previous step. The screening parameters are set as follows: the area threshold is set to 30 pixels, and the boundary span threshold is set to 5 pixels, that is, the area boundary width or height is ≥5 pixels. For each area, it is determined whether its "area" field is ≥30, and whether the "width" or "height" field in its "bounding_box" is ≥5. If both are met, the area is marked as a valid scratch area. The area is marked as a highlighted area in the image, and the field "is_valid=True" is added to the data structure. All valid scratch area data is output in JSON format, and each record contains five fields: image number, serial number, area coordinates, area, and span value.
[0169] Barcode texture breakage detection is performed based on the effective scratch area to obtain barcode scratch data.
[0170] In this embodiment, for the effective scratch area, local texture directionality analysis is performed in each area. First, the grayscale co-occurrence matrix (GLCM) of the image in the area is extracted, the calculation window is set to 21×21 pixels, and the offset direction is set to 0°, 45°, 90°, and 135°. The contrast (contrast) and angular second-order moment (correlation) in four directions are calculated from the GLCM. If the coefficient of variation CV of the contrast in different directions within the area is greater than 0.3, and the directional correlation difference is greater than 0.25, it is determined that the texture direction is dislocated or broken. The area that meets the above criteria is defined as the final scratch area. The final barcode scratch data includes: image number, serial number, scratch area coordinates, regional texture contrast CV, correlation difference Δcorrelation, and is output as a standard structured data table. The data format is .csv or .json for subsequent inkjet overlapping analysis.
[0171] Perform inkjet overlap analysis based on barcode scratch data to obtain inkjet overlap data;
[0172] In this embodiment, according to the scratch detection results, pixel-level binarization is performed on the basis of the original image, and the threshold value is set to grayscale 128. All pixels above 128 are regarded as background, and pixels below or equal to 128 are regarded as foreground. Then, the connected region analysis method is used to perform contour extraction on the character edge. If it is detected that the horizontal spacing between two groups of characters is less than 10 pixels, and there is mutual nesting or shared pixels exceeding 20% at the contour boundary, it is marked as a coding overlap area. The analysis uses the findContours() function in OpenCV to perform contour search, and uses the area ratio and boundary coincidence rate as standards. The area with low contrast and edge intersection area greater than 20 square pixels is determined to be an overlapping area. The output data includes the overlapping area number, upper left coordinate, number of overlapping characters, overlapping contour area, and minimum boundary spacing between characters, which are structured to form "coding overlap data".
[0173] Perform character position alignment according to the inkjet overlapping data to obtain character alignment data;
[0174] In this embodiment, character segmentation and alignment processing is performed based on the recognition results of the overlapping areas. The pixel distribution map of the characters in the vertical direction is statistically analyzed by the projection contour method (vertical projection histogram) to locate the center point of the character. Character separation is performed on the overlapping area, and the minimum circumscribed rectangle envelope processing is used to forcibly divide the overlapping blocks into two groups of characters. The width of each group of characters must be greater than 20 pixels and the height must be greater than 40 pixels. All recognition areas smaller than this threshold are rejected. Subsequently, all characters are re-sorted according to the horizontal position, and the difference in the left boundary position of the characters is set to not exceed 15% of the average character width. After the characters are sorted, a character number table is established to record the character index number, original coordinates, new coordinates, and displacement deviation values. Finally, a "character alignment data table" is formed to ensure that the characters are arranged in order from left to right, and the image pixel coordinates corresponding to each character position are clearly defined.
[0175] reconstructing the serial number based on the character alignment data to obtain reconstructed serial number data;
[0176] In this embodiment, the template matching method is used to perform character recognition on each character block based on the aligned character area. The template library stores a set of standard character images, including all characters from AZ to 0-9. The size of each character template is 28×28 pixels, and the matching method adopts the normalized correlation coefficient (NCC) algorithm. Characters with a maximum correlation coefficient greater than 0.75 in the matching results are confirmed, and characters less than the threshold are judged as unrecognizable characters and marked with "#". All successfully recognized characters are concatenated into a string according to the sorting position to construct a reconstructed serial number. The reconstructed serial number is output in JSON format, and the fields include product ID, reconstructed serial number string, coordinate block of each character, and recognition confidence, forming a "reconstructed serial number data table".
[0177] Serial number verification is performed based on the reconstructed serial number data to obtain serial number verification data, which is then transmitted to the product management system to perform the product full life cycle tracking task.
[0178] In this embodiment, the reconstructed serial number data is compared character by character with the original serial number registered for shipment in the commodity database. The comparison logic corresponds one-to-one according to the index. A perfect character match is scored as 1, and a score of 0 is obtained if "#" is present or the characters are inconsistent. If the total score is higher than 90%, it is deemed to be "verifiable". The comparison result is marked as a verification status bit (1 for success, 0 for failure), and the comparison time, reconstruction number, original number, difference character index, and difference content are recorded. Finally, a "serial number verification log" is generated in CSV format, with fields including commodity ID, original serial number, reconstructed serial number, verification result, difference list, timestamp, etc. The log is sent to the commodity management system master node via the LAN UDP protocol with an IP address of "10.10.0.20" and a port of 18550. After receiving it, the system writes to the database and executes the tracking chain node binding.
[0179] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.
[0180] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.
Claims
1. One-item-one-code full life cycle tracking system, characterized by: Includes the following modules: An image binding module is used to obtain product production data; generate a unique serial number for the product based on the product production data; and perform image acquisition based on the unique serial number of the product to obtain a product serial number image; The automatic product warehousing module is used to detect label wrinkles based on the product serial number image to obtain label wrinkle data; perform label breakage assessment based on the label wrinkle data to obtain label breakage data; and optimize the label production process based on the label breakage data to obtain label optimization data; Perform commodity automated warehousing simulation based on label optimization data to obtain commodity automated warehousing data; The safety shelf identification module is used to perform dynamic inventory management based on the automated warehousing data of goods and obtain dynamic inventory management data; Calculate shelf utilization based on inventory dynamic management data; Identify shelf welding cracks based on shelf utilization and obtain shelf crack data; Determine safe shelf areas based on shelf crack data; The product life cycle tracking module analyzes the product shipping path based on the secure shelf area to obtain product shipping path data; performs product shipment simulation based on the product shipping path data to obtain product shipment data; performs serial number verification based on the product shipment data to obtain serial number verification data, and transmits it to the product management system to execute the product life cycle tracking task.
2. The one-item-one-code full lifecycle tracking system according to claim 1 is characterized in that: The image binding module includes the following features: Obtain commodity production data and extract production batch features to obtain production batch data; Analyze product structure parameters based on production batch data; Based on the product structure parameters, the production timestamp is bound to obtain the product production traceability data; Perform encrypted hashing of the product identification based on the product production traceability data to obtain the identification code; Standardize the serial format based on the identification code to generate a unique serial number for the product; Image collection is performed based on the unique serial number of the product to obtain a product serial number image.
3. The one-item-one-code full lifecycle tracking system according to claim 2 is characterized in that: Image collection based on the product's unique serial number in the image binding module includes: Generate image acquisition instructions based on the product's unique serial number; Schedule image acquisition devices according to image acquisition instructions and trigger device shooting signals; Collect product images from multiple angles based on device shooting signals to obtain the original image dataset; Perform resolution correction processing on the original image data set to obtain standardized image data; The product's unique serial number is bound according to the standardized image data to obtain the product serial number image.
4. The one-item-one-code full lifecycle tracking system according to claim 1 is characterized in that: In the automated product warehousing module, label wrinkle detection based on product serial number images includes: Recognize the outline of serial number characters based on the product serial number image; Calculate the character line deformation rate based on the serial number character outline; Perform label edge warping detection based on the character line deformation rate to obtain label edge warping data; Laser 3D contour acquisition is performed based on the label edge warping data to obtain the label edge warping 3D contour; Calculate shear stress based on the three-dimensional contour of the label warping edge to obtain shear stress data; Identify shear stress concentration areas based on shear stress data; Predict the wrinkle direction based on the shear stress concentration area and obtain wrinkle direction data; Label wrinkle detection is performed based on wrinkle direction data to obtain label wrinkle data.
5. The one-item-one-code full lifecycle tracking system according to claim 1 is characterized in that: In the commodity automated warehousing module, the optimization of label production process based on label breakage data includes: Detect the material fiber arrangement direction based on the label wrinkle data; Calculate the directional deviation according to the material fiber arrangement direction; Determine the imbalance of material fiber arrangement according to the directional deviation and obtain the material fiber arrangement imbalance data; Predict crack initiation points based on material fiber arrangement imbalance data; Conduct label fracture assessment based on the crack initiation point to obtain label fracture data; Trace back the die-cutting contour position based on the label breakage data; Calculate the die path error rate based on the die cutting contour position; optimize the chamfer structure parameters according to the die path error rate to obtain the chamfer structure optimization parameters; Calculate the die cutting trajectory mutation rate based on the die cutting contour position; and perform die cutting contour line smoothness according to the die cutting trajectory mutation rate; Integrate the chamfer structure optimization parameters and the smoothness of the die contour line to obtain the label optimization production process data; Based on the label optimization production process data, label production simulation is performed to obtain label optimization data.
6. The one-item-one-code full lifecycle tracking system according to claim 1 is characterized in that: The automatic warehousing simulation based on label optimization data in the automatic warehousing module includes: Import label optimization data into the warehousing simulation system; In the warehousing simulation system, the product surface friction coefficient is set to 0.1-0.6, the center of gravity offset distance is 30-100mm, the surface reflectivity is 10%-90%, and the packaging compression modulus is 50kPa-500kPa; In the warehousing simulation system, the conveyor belt speed is set to 0.1m / s-1.5m / s, and the picking frequency of the sorting robot arm is set to 30 times / min-180 times / min. In the warehousing simulation system, the identification distance of the label identification device is set to 100mm-800mm, the identification angle is ±45°, and the label surface reflectivity is 20%-80%; Run the commodity automatic warehousing module and output the commodity automatic warehousing data.
7. The one-item-one-code full lifecycle tracking system according to claim 1 is characterized in that: The safety shelf identification module includes the following functions: Identify real-time incoming batches based on the automated incoming goods data; Calculate current inventory capacity based on real-time incoming batches; Perform location priority analysis based on current inventory capacity to obtain location priority data; Perform dynamic inventory management based on location priority data to obtain dynamic inventory management data; Calculate shelf utilization based on inventory dynamic management data; Identify shelf welding cracks based on shelf utilization and obtain shelf crack data; Evaluate the load-bearing capacity of the shelf structure based on the shelf crack data; Identify safe racking areas based on the racking structure's load-bearing capacity.
8. The one-item-one-code full lifecycle tracking system according to claim 7 is characterized in that: The safety shelf identification module identifies shelf welding cracks based on shelf utilization, including: Identify high-utilization shelf areas based on shelf utilization; Collect acoustic sensor data based on high-utilization shelf areas; Perform fast Fourier transform on the acoustic sensor data to obtain the acoustic sensor spectrum; Identify broadband mutation segments based on acoustic sensor spectrum; Identify high-frequency segments based on acoustic sensor spectrum; Calculate high-frequency energy density based on high-frequency band; The shelf welding cracks are determined based on the broadband mutation segment and high-frequency energy density, and the shelf crack data are obtained.
9. The one-item-one-code full lifecycle tracking system according to claim 1 is characterized in that: The product life cycle tracking module includes the following functions: Extract channel structure features based on the safety shelf area to obtain channel structure data; Obtain shipping gateway data; match shipping task nodes based on shipping gateway data and channel structure data to obtain target shipping node data for the product; Conduct path feasibility analysis based on the target product shipping node data to obtain preliminary achievable path data; Calculate the ground flatness based on preliminary reachable path data; Screen the shipping path for the preliminary accessible path data based on the flatness of the ground to obtain the product shipping path data; A product delivery simulation is performed based on the product delivery path data, where the transport channel width is set to 400mm-600mm, the maximum allowable slope is ≤12°, and the maximum step height difference is ≤20mm, to obtain product delivery data; Serial number verification is performed based on product delivery data to obtain serial number verification data, which is then transmitted to the product management system to perform product full life cycle tracking tasks.
10. The one-item-one-code full lifecycle tracking system according to claim 9 is characterized in that: Serial number verification based on product delivery data in the product lifecycle tracking module includes: Read the product serial number based on the product shipment data; Collect serial number images based on product serial numbers; Perform barcode scratch detection based on the serial number image to obtain barcode scratch data; Perform inkjet overlap analysis based on barcode scratch data to obtain inkjet overlap data; Perform character position alignment according to the inkjet overlapping data to obtain character alignment data; reconstructing the serial number based on the character alignment data to obtain reconstructed serial number data; Serial number verification is performed based on the reconstructed serial number data to obtain serial number verification data, which is then transmitted to the product management system to perform the product full life cycle tracking task.
Citation Information
Patent Citations
Full life cycle management method and system
CN107808177A
Acquired information processing method and system of code anti-counterfeit printed matter
CN116912831A
Storage process data management method and system for cross-border e-commerce
CN118940047A
Intelligent warehouse management system and method based on big data
CN120069755A