Slaughter transport hook detection method, device and equipment and readable storage medium

By collecting structural images and QR code images of slaughter transport hooks, and using the YOLOv8s model for region detection and feature point calculation, the problem of low detection efficiency of transport hooks in slaughter production is solved. This achieves efficient and accurate safety status determination and automated detection, ensuring the safety and continuity of production.

CN121860972APending Publication Date: 2026-04-14CHINA RESOURCES NG FUNG LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In modern pig slaughtering and production, the large number and frequent use of slaughtering and transport hooks result in low detection efficiency and poor real-time performance. The existing manual inspection method is inefficient and greatly affected by subjective factors, posing safety hazards.

Method used

By collecting structural images and QR code images of slaughtering transport hooks on the conveyor track, a pre-trained YOLOv8s model is used for region detection, feature point coordinates are extracted to calculate the included angle value, and the transport hook number is extracted from the QR code image to generate detection results, thus achieving automated, non-contact online detection.

Benefits of technology

It achieves automated, non-contact online detection of the safety status of transport hook structures, with a detection accuracy rate of up to 98%. It does not require interruption of production, significantly improves the comprehensiveness and consistency of detection, reduces operation and maintenance costs, and ensures the safety and continuity of slaughtering operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860972A_ABST
    Figure CN121860972A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial detection, and discloses a slaughter transport hook detection method, device and equipment and a readable storage medium, and the method comprises the steps: collecting a structure image and a two-dimensional code image of a slaughter transport hook; performing region detection on the structure image to obtain a key region image; extracting feature point coordinates from the key area image, and calculating an included angle value between a hook tip and an aluminum handle of the slaughter transport hook based on the feature point coordinates; the included angle value is compared with a preset threshold value, and the safety state of the slaughter transport hook is determined; and extracting a transportation hook number from the two-dimensional code image, associating the transportation hook number with the safety state, and generating a detection result of the slaughter transportation hook. According to the application, the automatic and non-contact detection of the welding part damage of the slaughter transportation hook is realized, the detection efficiency and accuracy are greatly improved, the manual leak detection risk is reduced, the real-time requirement of high-beat operation of a production line is met, and the production safety and continuous operation are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial testing technology, and in particular to a method, apparatus, equipment and readable storage medium for detecting slaughter transport hooks. Background Technology

[0002] In modern pig slaughtering, pig carcasses are suspended from a conveyor chain more than 3 meters high by slaughtering hooks, enabling continuous assembly line operations. Because these hooks bear dynamic loads for extended periods, they are prone to cracking or deformation due to mechanical fatigue. If not detected in time, this can lead to breakage accidents, threatening personnel safety and disrupting production continuity. Currently, most slaughterhouses still rely on manual inspections for safety checks, which is inefficient and highly susceptible to subjective factors. In recent years, some organizations have attempted to introduce machine vision technology for assisted inspection. By acquiring and analyzing images, they determine the condition of the conveyor hooks, initially achieving a transition from "human inspection" to "intelligent inspection" and providing a practical foundation for automated inspection.

[0003] Despite existing explorations in visual inspection, several practical contradictions still hinder its effective application. For example, the large number of transport hooks (e.g., over 2,500) and high frequency of use (approximately 2,600 times per day) result in a heavy inspection workload, while production is only suspended for one day a year, leaving an extremely short window for inspection. Summary of the Invention

[0004] In view of this, the embodiments of this application provide a method, apparatus, equipment and readable storage medium for detecting slaughter transport hooks, which can effectively solve the problems of low detection efficiency and poor real-time performance caused by the large number of transport hooks, frequent use and complex structure in the prior art.

[0005] In a first aspect, embodiments of this application provide a method for detecting slaughter transport hooks, including: Collect structural images and QR code images of the slaughtering transport hooks on the conveyor track; Perform region detection on the structure image to obtain key region images; Feature point coordinates are extracted from the key area image, and the angle between the hook tip and the aluminum shank of the slaughtering and transporting hook is calculated based on the feature point coordinates. The included angle value is compared with a preset threshold to determine the safety status of the slaughtering and transport hook; The transport hook number is extracted from the QR code image, and the transport hook number is associated with the safety status to generate the detection result of the slaughter transport hook.

[0006] In some embodiments, the acquisition of structural images and QR code images of the slaughter transport hooks on the conveyor track includes: When the slaughtering transport hook passes through the preset detection position, it receives a trigger signal from the detection sensor; Based on the trigger signal, the first industrial camera is controlled to take a picture and obtain a structural image of the slaughtering and transporting hook; Based on the trigger signal, the second industrial camera is controlled to take a picture and obtain the QR code image of the slaughtering and transport hook.

[0007] In some embodiments, performing region detection on the structural image to obtain a key region image includes: The structural image is input into a target detection network built on a pre-trained YOLOv8s model to obtain the location information of the abnormal structural region. Based on the location information, the structural image is cropped to obtain a key area image containing the hook tip and the aluminum shank.

[0008] In some embodiments, the step of extracting feature point coordinates from the key region image and calculating the angle between the hook tip of the slaughter transport hook and the aluminum shank of the slaughter transport hook based on the feature point coordinates includes: Edge detection is performed on the key region image to generate edge image data; Based on the edge image data, key feature point extraction processing is performed to obtain the coordinates of two feature points distributed along the extension direction of the hook body, and the coordinates of one feature point on the aluminum handle; A first straight line is constructed based on the coordinates of the two feature points, and a second straight line is constructed based on the coordinates of a feature point on the aluminum shank and its extension direction. Calculate the angle between the first straight line and the second straight line, and use it as the angle between the hook tip and the aluminum shank of the slaughtering and transporting hook.

[0009] In some embodiments, comparing the included angle value with a preset threshold to determine the safety status of the slaughter transport hook includes: Read the safety threshold range corresponding to the included angle value from the preset configuration; The included angle value is compared with the safety threshold range to generate a comparison result; Based on the comparison results, it is determined whether the slaughter transport hook meets the safety requirements, and status information representing the safety status of the slaughter transport hook is generated.

[0010] In some embodiments, extracting the transport hook number from the QR code image and associating the transport hook number with the safety status to generate a detection result for the slaughter transport hook includes: The QR code image is processed for recognition, and the encoded information in the QR code image is extracted; The encoded information is parsed into the corresponding transport hook number; The transport hook number is bound to the safety status to generate the detection result of the slaughter transport hook.

[0011] In some embodiments, the method further includes: When the safety status in the detection result is abnormal, the transport hook number is sent to the PLC control system via the Modbus protocol to trigger the downstream rejection mechanism to perform a physical removal operation on the abnormal slaughter transport hook.

[0012] Secondly, embodiments of this application provide a slaughter transport hook detection device, comprising: The image acquisition module is used to acquire structural images and QR code images of the slaughter transport hooks on the conveyor track; The region detection module is used to perform region detection on the structure image to obtain key region images; Angle calculation module is used to extract feature point coordinates from the key area image and calculate the angle between the hook tip of the slaughter transport hook and the aluminum shank of the slaughter transport hook based on the feature point coordinates. The data comparison module is used to compare the included angle value with a preset threshold to determine the safety status of the slaughtering and transport hook. The result generation module is used to extract the transport hook number from the QR code image, associate the transport hook number with the safety status, and generate the detection result of the slaughter transport hook.

[0013] Thirdly, embodiments of this application provide a terminal device, the terminal device including a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the slaughtering and transport hook detection method of the first aspect described above.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium, wherein when the computer program is executed on a processor, it implements the slaughtering and transport hook detection method of the first aspect described above.

[0015] The embodiments of this application have the following beneficial effects: acquiring structural images and QR code images of slaughter transport hooks on the conveying track; performing region detection on the structural images to obtain key region images; extracting feature point coordinates from the key region images and calculating the included angle value between the hook tip and the aluminum shank of the slaughter transport hook; comparing the included angle value with a preset threshold to determine the safety status of the transport hook; extracting the transport hook number from the QR code image and associating the number with the safety status to generate detection results.

[0016] This application achieves automated, non-contact online detection of the structural safety status of transport hooks without interrupting the production process. Real-time assessment is completed each time a transport hook passes through the line during its cyclical operation, achieving "non-stop, non-intrusive" detection. Image acquisition and analysis are triggered every time a transport hook passes the inspection station, ensuring full coverage of each hook and each cycle, completely eliminating the risk gap caused by periodic inspections and significantly improving the comprehensiveness and consistency of the detection. The system quickly locates key feature points such as the hook tip and aluminum hook handle using a model, and performs risk assessment based on geometric angle calculations. The processing logic is simple and efficient, with a single full-process time of ≤5 seconds and a detection accuracy rate of ≥98%, effectively overcoming the problems of subjective judgment and slow response time in manual assessment. Compared to the traditional method of relying on a large number of people to check each hook individually, this significantly reduces human intervention and maintenance costs. Once a transport hook with a safety hazard is identified, the system can simultaneously read its QR code to obtain a unique number, triggering a precise removal action, achieving "immediate action upon discovery." This effectively prevents pig carcasses from suddenly falling due to fatigue fracture of the transport hook, avoiding equipment damage, work interruption, and even malfunction of the entire conveying system, thus ensuring the safety, continuity, and operational stability of slaughtering operations. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart of a slaughter transport hook detection method according to an embodiment of this application is shown; Figure 2 Another flowchart of the slaughter transport hook detection method according to an embodiment of this application is shown; Figure 3 This paper shows another flowchart of the slaughtering and transport hook detection method according to an embodiment of the present application; Figure 4 This paper shows a schematic diagram of the key areas in the slaughtering and transport hook detection method according to an embodiment of this application; Figure 5 This illustration shows a schematic diagram of feature extraction in the slaughtering and transport hook detection method according to an embodiment of this application; Figure 6 This paper shows a schematic diagram of the included angle in the slaughtering and transport hook detection method according to an embodiment of this application; Figure 7 This paper shows a schematic diagram of a QR code image in the slaughtering and transport hook detection method according to an embodiment of this application; Figure 8A schematic diagram of a structure in the slaughter transport hook detection method according to an embodiment of this application is shown. Detailed Implementation

[0019] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0020] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.

[0022] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0023] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0024] Considering the problems of low detection efficiency, difficult feature extraction, and poor real-time performance caused by the large number, frequent use, and complex structure of transport hooks in existing technologies, a new method for detecting slaughter transport hooks is proposed. This method involves acquiring structural images and QR code images of transport hooks along the conveying path, performing region detection on the structural images to obtain key areas, extracting feature points from these areas, and calculating the angle between the hook tip and the aluminum shank. This angle value is then compared with a preset threshold to determine the safety status. Finally, the transport hook number extracted from the QR code image is combined with the safety status to generate a complete detection result. This method enables automated identification and identity binding of abnormal transport hook structures, improving detection efficiency and accuracy, and meeting the real-time detection requirements of high-speed production line operation.

[0025] The following describes the method for detecting slaughter transport hooks using specific examples.

[0026] Figure 1 A flowchart of a slaughterhouse transport hook detection method according to an embodiment of this application is shown. Exemplarily, the slaughterhouse transport hook detection method includes the following steps: Step S100: Collect structural images and QR code images of the slaughter transport hooks on the conveyor track.

[0027] The structural image refers to a visual image containing the overall geometry of the slaughter transport hook, used to extract key feature points and calculate the angle between the hook tip and the aluminum shank. The QR code image refers to a local image focused on the stainless steel hook body of the slaughter transport hook, clearly displaying a laser-engraved QR code, used to uniquely identify the transport hook's identification number. This step uses a multi-camera collaborative system to achieve synchronous imaging of the transport hook in motion, ensuring that effective image data usable for analysis can still be acquired under high-speed operation conditions on the production line.

[0028] In one alternative embodiment, such as Figure 2 As shown, step S100 includes the following sub-steps: S101: When the slaughtering transport hook passes through the preset detection position, it receives a trigger signal from the detection sensor.

[0029] Among them, the preset detection position refers to the workstation on the conveyor chain that is fixedly installed with photoelectric or proximity position sensors. Its setting position is aligned with the center of the field of view of the dual cameras to ensure that the image acquisition time is precisely matched with the spatial position of the transport hook; the trigger signal is the signal output by the sensor when it senses the passage of a metal object (i.e., the transport hook), which serves as the synchronization reference for starting the entire detection process.

[0030] As an example, when the stainless steel transport hook suspended on the conveyor chain moves with the production line to a position approximately 10cm from the camera group, the photoelectric sensor mounted on the bracket detects a metal obstruction, immediately generates a TTL level signal with a valid rising edge, and transmits it to the control unit of the vision inspection device via the I / O interface, marking the start of the inspection task. This mechanism avoids redundant data accumulation caused by continuous image capture, achieving on-demand data acquisition and precise response.

[0031] S102, based on the trigger signal, controls the first industrial camera to take pictures and obtain a structural image of the slaughter transport hook.

[0032] The first industrial camera is a high-resolution grayscale industrial camera deployed on the left side of the inspection station, with a field of view covering the main structure of the transport hook. It has global shutter and low light sensitivity characteristics to adapt to complex lighting conditions on site.

[0033] Exemplary, upon receiving a trigger signal, the vision processing unit sends an exposure enable command to the first industrial camera, which then initiates an exposure cycle (exposure time is...). A grayscale image with a resolution of 2448×2048 was captured, clearly showing the two hook tips, the rotating connector, and the overall outline of the aluminum hook. This image was transmitted in real time to the image processing module of the edge computing device via the GigE Vision protocol.

[0034] For example, since the transport hook may sway or rotate slightly during use, the system uses a ring LED for forward illumination and adds a polarizing filter in front of the camera lens to effectively eliminate reflection interference from the stainless steel surface and improve image contrast and edge sharpness.

[0035] S103, based on the trigger signal, controls the second industrial camera to take pictures and obtain the QR code image of the slaughter transport hook.

[0036] The second industrial camera is a fixed-focus industrial camera located on the right side of the inspection station, specifically designed for reading QR codes. Its focal length and working distance have been calibrated and optimized to ensure that the QR code area occupies the main part of the image and that the characters are clearly identifiable.

[0037] Demonstratively, driven by the same trigger signal, a second industrial camera simultaneously performs a single image capture, obtaining a 1200×900 resolution partial image with focus on the QR code area formed on the surface of the stainless steel hook using a laser direct engraving process. This image is then sent to an OCR decoding module for recognition processing. For example, the QR code uses... Laser etching is performed on the aluminum surface in one step, with a depth of approximately 0.15mm and a size of 8mm×8mm. The encoding format is Data Matrix, which can accommodate four-digit numbers (such as "1234"). It has the advantages of high temperature resistance, corrosion resistance, and wear resistance, and is suitable for the humid and high-cleaning environment of slaughterhouses.

[0038] In other implementations, the QR code can be replaced with a corrosion-resistant RFID tag, which, together with a near-field reader, enables non-visual identity recognition.

[0039] Step S200: Perform region detection on the structural image to obtain key region images.

[0040] The structural image refers to a grayscale image captured by the first industrial camera, containing the overall geometry of the slaughtering and transport hook. This image is used for subsequent extraction of key feature points and calculation of the angle between the hook tip and the aluminum shank. The key region image refers to a localized region image cropped from the original structural image. Its content focuses on the two hook tips of the stainless steel hook and the aluminum hook portion, eliminating background interference and irrelevant structures to reduce the amount of data processed by subsequent algorithms and improve computational efficiency. This step uses a target detection model to locate the core components, achieving the filtering from the entire image to key sub-regions, providing high-quality data for accurate extraction of feature point coordinates.

[0041] In one alternative embodiment, such as Figure 3 As shown, step S200 includes the following sub-steps: S201, the structural image is input into the target detection network built based on the pre-trained YOLOv8s model to obtain the location information of the abnormal structural region.

[0042] Among them, the pre-trained YOLOv8s model refers to a lightweight convolutional neural network model pre-trained based on the COCO dataset, whose backbone and neck structures remain unchanged and are used as a fixed feature extractor; the object detection network refers to a dedicated detection module formed by replacing the final detection head on the original YOLOv8s, and only outputs the bounding box coordinates of three new categories: left hook tip, right hook tip, and aluminum hook handle region; the position information refers to the bounding box coordinates of the left hook tip, right hook tip, and aluminum hook handle region output by the object detection network after fine-tuning through transfer learning, which represents the spatial position of each key component in the image.

[0043] Demonstratively, the structural image is first scaled to 640×640 pixels and the pixel values ​​are normalized (divided by 255). It is then fed into the object detection network for forward inference, outputting bounding boxes and their confidence scores for three categories within approximately 80 milliseconds. The system retains detection results with a confidence score higher than 0.7 for subsequent region cropping. For example, since transport hooks may rotate or tilt slightly while suspended, the YOLOv8s model incorporates a large number of sample images with different angles and poses during training. Randomized affine transformations and brightness perturbations are used for data augmentation, giving it strong rotational robustness and illumination adaptability, ensuring stable positioning of key components even under complex working conditions.

[0044] S202, based on location information, performs region cropping on the structural image to obtain key region images containing the hook point and aluminum shank, such as... Figure 4 As shown.

[0045] The location information refers to the set of coordinates of multiple bounding boxes output by the YOLOv8s model, with each bounding box corresponding to a key component to be analyzed; the region clipping refers to the process of merging these bounding boxes according to their spatial distribution to generate a minimum bounding rectangle region that covers all key components, and then extracting pixels within that region from the original structural image.

[0046] Exemplary approach: The system integrates the minimum row, maximum row, minimum column, and maximum column of the three bounding boxes for the left hook tip, right hook tip, and aluminum shank, expanding the edge buffer by 10% to preserve contextual information, forming a new ROI (Region of Interest). This region is then extracted from the original 1280×960 image, generating a grayscale sub-image with a resolution of approximately 400×300, which serves as the key region image. This image is cached in memory for subsequent use by traditional image processing algorithms. For example, this cropping operation significantly reduces the computational load of subsequent edge detection and line fitting—the original image requires processing over a million pixels, while the cropped image only requires processing approximately 120,000 pixels, enabling the entire process to run in real-time on edge CPU devices without GPU support (total processing time ≤ 5 seconds).

[0047] In other implementations, if the scene lighting changes drastically or there is a risk of occlusion, an image completion step based on morphological inpainting can be added after the YOLOv8s output to improve the integrity of key areas.

[0048] Step S300: Extract feature point coordinates from the key area image, and calculate the angle between the hook tip and the aluminum shank of the slaughter transport hook based on the feature point coordinates.

[0049] Among them, the feature point coordinates refer to the two-dimensional coordinates (x, y) of the key geometric position in the pixel coordinate system that is accurately located by the image processing algorithm. It includes two hook tip points representing the main axis direction of the hook body and a reference point reflecting the orientation of the aluminum shank. The included angle value refers to the angle value formed by the extension direction of the hook body and the central axis of the aluminum shank. This parameter is strongly correlated with the mechanical integrity of the welded part and is used to determine whether the transport hook has a structural offset caused by fatigue or welding defects.

[0050] In an optional embodiment, step S300 includes the following sub-steps: S301 performs edge detection on the key region image to generate edge image data.

[0051] Edge detection refers to using gradient operators to identify regions of abrupt changes in brightness in an image, used to extract body contours and structural boundaries; edge image data is a binary image that retains only significant edge information, usually stored in an 8-bit single-channel format, with white pixels representing detected edge points and black backgrounds representing non-edge regions.

[0052] As an example, the key region image is input into the Canny edge detector. First, Gaussian filtering (kernel size 5×5) is applied to smooth the noise. Then, the image gradient magnitude and direction are calculated. Finally, edge connection is performed through a dual thresholding mechanism (low threshold set to 50, high threshold set to 150), and a clear and coherent contour map is output.

[0053] For example, since the surface of the stainless steel hook may have slight scratches or oil stains that reflect light, the system introduces adaptive histogram equalization (CLAHE) in the preprocessing stage to enhance local contrast, ensure edge continuity and integrity, and avoid breakage or false detection.

[0054] S302, based on the edge image data, performs key feature point extraction processing to obtain the coordinates of two feature points distributed along the extension direction of the hook body, and the coordinates of one feature point on the aluminum handle, such as... Figure 5 As shown.

[0055] Among them, the key feature point extraction process refers to the calculation process of locating key coordinates with clear physical meaning from the edge image by combining morphological analysis and geometric fitting algorithms; the coordinates of the two feature points correspond to the farthest vertices of the left and right hook tips, that is, the hook end positions farthest from the rotation center; the coordinates of one feature point on the aluminum handle refer to the reference point located in the middle of the aluminum hook, used to characterize its axial direction.

[0056] Exemplary approach: The system first performs Harris corner detection or vertex search algorithm on the edge image, identifying two vertices with the largest curvature and symmetrical distribution in the left and right edge sets as the hook tip coordinates. For the aluminum shank, its main axis segment is fitted using Hough Line Transform, and its midpoint is taken as a representative feature point. Subsequently, all coordinates are mapped back to the original image coordinate system to ensure spatial consistency.

[0057] For example, to improve vertex positioning accuracy, the system uses subpixel interpolation methods (such as quadratic polynomial fitting) to fine-tune the initially detected corner points, keeping the positioning error within ±0.5 pixels, thereby ensuring the accuracy of angle calculation.

[0058] S303, construct a first straight line based on the coordinates of two feature points, and construct a second straight line based on the coordinates of one feature point on the aluminum shank and its extension direction.

[0059] The first straight line refers to the line segment formed by connecting the two hook tip feature points on the left and right sides, representing the overall opening direction and main axis of the stainless steel hook body; the second straight line is a directed straight line constructed based on the feature points of the aluminum shank and its axial direction vector, used to characterize the spatial orientation of the aluminum hook.

[0060] As an example, the coordinates of the two hook tips are... and Substitute into the equation of the line to generate the first line. Simultaneously, the endpoints of the aluminum shank line segment output by Hough detection are utilized. Calculate its center point and unit direction vector , and thus define the process And the direction is Infinite straight line .

[0061] For example, when the aluminum handle tilts due to welding deformation, its axial direction will deviate from the standard installation angle. Changes in direction can sensitively reflect such anomalies, forming an effective basis for judgment.

[0062] S304, calculate the angle between the first and second straight lines, which will be used as the angle between the hook tip and the aluminum shank of the slaughter transport hook. Figure 6 As shown.

[0063] As an example, the system extracts separately and Direction vector and After normalization, substitute into the formula:

[0064] Find the angle between the two. The value is rounded to one decimal place, for example, "106.3°".

[0065] For example: Based on historical data analysis, under normal welding conditions, this included angle is stably distributed as follows: Within this range; if the measured value exceeds this range (e.g., reaching 110° or lower to 100°), it indicates that crack propagation or metal creep may occur at the welded area, posing a risk of fracture. Therefore, this included angle value becomes the core quantitative indicator for judging the safety of the transport hook.

[0066] Step S400: Compare the included angle value with a preset threshold to determine the safety status of the slaughter transport hook.

[0067] The preset threshold refers to the allowable deviation range calibrated based on historical inspection data and welding quality verification experiments, used to determine whether the current included angle is in a normal process state; the safety status refers to the binary judgment result made on whether the transport hook has the risk of mechanical fatigue, welding cracking, or structural deformation, usually divided into normal or abnormal. This step realizes the transformation from visual measurement to safety decision-making by performing logical judgment on quantitative indicators.

[0068] In an optional embodiment, step S400 includes the following sub-steps: S401, read the safety threshold range corresponding to the included angle value from the preset configuration.

[0069] The preset configuration includes a set of parameters set for different types of slaughter transport hooks, such as standard included angle reference value, upper and lower limit tolerance, alarm delay time, etc.; the safety threshold range is a closed range formed by a certain standard angle as the center and fluctuating within a certain range (e.g., [102°, 108°]), and exceeding this range is considered to have a safety hazard.

[0070] As an example, a default configuration file is loaded upon system startup, from which the included angle threshold parameters corresponding to the model of transport hooks used on the current production line are extracted. If the system supports mixed-model detection, the corresponding threshold group is dynamically matched based on the transport hook type parsed from the QR code.

[0071] For example, long-term data analysis has revealed that the standard installation angle of newly manufactured transport hooks is approximately 105°, with a permissible fluctuation of ±3° under normal operating conditions. When the angle is less than 102° or greater than 108°, X-ray inspection results show that microcracks or insufficient penetration are commonly found in the weld area. Therefore, this range is used as the basis for judgment and is fixed in the configuration file.

[0072] S402, compare the included angle value with the safety threshold range and generate a comparison result.

[0073] The comparison result refers to the positional relationship of the included angle value relative to the safety threshold range, specifically including three logical states: "within the range", "above the upper limit" or "below the lower limit", represented in Boolean or enumerated data form.

[0074] As an example, the included angle value (e.g., 106.3°) is compared item by item with the threshold range [102°, 108°]: If and If, then output "within range"; if If the value is higher than the upper limit, then output "higher than the upper limit"; if the value is higher than the upper limit, If the output is "below the lower limit", then the output will be "below the lower limit".

[0075] S403, based on the comparison results, determine whether the slaughter transport hook meets the safety requirements, and generate status information indicating the safety status of the slaughter transport hook.

[0076] Whether the security requirements are met is the final security conclusion made based on the comparison results. The judgment logic is as follows: if the comparison result is "within the range", it is determined that the requirements are met; otherwise, it is determined that the requirements are not met. The status information is a structured data packet that contains at least the following fields: status (with the value "normal" or "abnormal"), angle_value (measured angle value), threshold_range (threshold range), and timestamp (detection timestamp).

[0077] For example, this status information is not only used to trigger rejection actions, but is also synchronously saved to the local database to form a traceable quality profile, supporting fault attribution analysis and model optimization iteration.

[0078] In other implementations, additional fields can be added according to the enterprise's quality management needs, such as the inspector ID, equipment number, and ambient temperature and humidity.

[0079] Step S500: Extract the transport hook number from the QR code image and associate the transport hook number with the safety status to generate the detection result of the slaughter transport hook.

[0080] The QR code image refers to a localized grayscale image captured by a second industrial camera, focused on the aluminum hook area. Its content includes a two-dimensional code laser-engraved directly onto the metal surface. The transport hook number is a unique identifier for each slaughter transport hook, used for individual-level tracking and management. The safety status refers to the detection conclusion based on angle value comparison, including "normal" or "abnormal" conditions. The detection result is a structured information record formed by binding the number and status data. This step achieves a precise mapping between physical objects and digital information, ensuring that potentially hazardous hooks are locatable and traceable.

[0081] In an optional embodiment, step S500 includes the following sub-steps: S501 performs recognition processing on the QR code image, extracting the encoded information from the QR code image, such as... Figure 7 As shown.

[0082] The identification process refers to the use of image decoding algorithms to perform operations such as positioning, segmentation, binarization, and symbol parsing on the received QR code image; the encoded information refers to the raw byte data stored in the QR code matrix in a specific format, which has not yet undergone semantic parsing.

[0083] For example, after receiving a 640×480 resolution grayscale image from a second industrial camera, the image is first converted into a black and white binary image by applying adaptive threshold segmentation (such as the OTSU algorithm) to enhance the symbol contrast. Then, the open-source decoding library ZXing or a commercial SDK (such as Halcon QR Code Reader) is called to automatically locate the Data Matrix code region, correct perspective distortion, and read the module polarity line by line, finally outputting a string of original encoded characters (such as DMTX1234).

[0084] For example, due to the risk of water mist and oil stains adhering to the slaughterhouse, the system is equipped with a compressed air blowing device in front of the camera to clean the lens in real time, and uses a short exposure time (200μs) to freeze motion blur to ensure that the QR code image is clear and readable.

[0085] S502, the encoded information is parsed into the corresponding transport hook number.

[0086] Parsing refers to the process of extracting the valid digital part representing the identity of the transport hook from the original encoded information, which usually involves operations such as string truncation, check code verification, and format standardization; the transport hook number specifically refers to a four-digit number (such as "1234"), which is used to match the rejection instruction address in the PLC control system.

[0087] As an example, upon receiving the original code "DMTX1234", the code extracts "1234" according to a preset rule (removing the prefix "DMTX" and retaining the last four digits), and verifies its validity using the Luhn algorithm or other simple verification mechanisms. If the verification passes, the code is confirmed as valid; if it fails, it is marked as "code reading error" and a retry mechanism is triggered, or the code is entered into a manual review queue. For example: all transport hooks use... The laser etches a QR code at the base of the aluminum handle in one pass, with a depth of approximately 0.15mm and a character height of no less than 3mm. It features high-temperature cleaning resistance, mechanical wear resistance, and rust prevention, ensuring stable readability throughout its entire lifespan.

[0088] S503, binds the transport hook number to the safety status, and generates the inspection results of the slaughter transport hook.

[0089] Binding refers to the operation of associating the parsed transport hook number with safety status information to form a complete one-to-one detection record.

[0090] For example, each test record comes with a corresponding image storage path index. The system can automatically archive the original structural image and QR code image as needed to build a complete electronic archive, meeting the requirements of the food safety management system for equipment traceability.

[0091] In other implementations, the detection results can also be uploaded to the MES system or cloud platform via industrial Ethernet to achieve cross-plant data aggregation and early warning.

[0092] In an optional embodiment, the slaughter transport hook detection method further includes the following steps: When the safety status in the detection result is abnormal, the transport hook number is sent to the PLC control system via the Modbus protocol to trigger the downstream rejection mechanism to perform a physical removal operation on the abnormal slaughter transport hook.

[0093] Among them, "abnormal safety status" means that the transport hook is determined to have welding deformation, mechanical fatigue, or structural displacement risks based on the status information, and must be removed from the production line in a timely manner; Modbus protocol is a master-slave communication protocol used in the field of industrial automation, which supports serial link (RTU) or Ethernet (TCP) transmission and has high compatibility and real-time performance; PLC control system refers to the programmable logic controller in the production line responsible for logic control, receiving external instructions and driving the actuator to perform actions; downstream rejection mechanism refers to the pneumatic push rod or electromagnetic fork device set at a specific distance after the inspection station, used to push the problematic transport hook laterally off the conveyor chain to achieve physical isolation.

[0094] As an example, after generating the anomaly detection result, the communication module is activated, encapsulating the transport hook number into a standard Modbus TCP message (function code 0x10, writing to multiple registers), and sending it via an industrial switch to the PLC's IP address "192.168.1.10" port 502, writing it to a specified register address (e.g., 40001). Upon receiving the data, the PLC, combining the current conveyor speed and position encoder feedback, calculates the time delay for the abnormal hook to reach the rejection station, and outputs a control signal at the precise moment to activate the pneumatic solenoid valve, pushing the push rod to extend and eject the corresponding transport hook from the main line into the recovery track.

[0095] For example, if the rejection location is about 15 meters away from the detection point and the conveyor chain speed is 0.3 m / s, the system will calculate the transmission delay time (about 50 seconds) based on the chain speed and distance, and send the rejection command immediately after the detection is completed, ensuring that the PLC executes the action on time when the transport hook arrives at the rejection station.

[0096] Figure 8 A schematic diagram of a slaughter transport hook detection device according to an embodiment of this application is shown. Exemplarily, the device 100 includes: Image acquisition module 110 is used to acquire structural images and QR code images of the slaughter transport hooks on the conveyor track; Region detection module 120 is used to perform region detection on the structure image to obtain key region images; Angle calculation module 130 is used to extract feature point coordinates from the key area image and calculate the angle between the hook tip of the slaughter transport hook and the aluminum shank of the slaughter transport hook based on the feature point coordinates. The data comparison module 140 is used to compare the included angle value with a preset threshold to determine the safety status of the slaughtering and transport hook. The result generation module 150 is used to extract the transport hook number from the QR code image and associate the transport hook number with the safety status to generate the detection result of the slaughter transport hook.

[0097] It is understood that the apparatus of this embodiment corresponds to the method of the above embodiments, and the options in the above embodiments are also applicable to this embodiment, so they will not be described again here.

[0098] This application also provides a terminal device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the terminal device to perform the functions of the various modules in the above-described method or apparatus.

[0099] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0100] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.

[0101] This application also provides a computer-readable storage medium for storing the computer program used in the aforementioned terminal device. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0103] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0104] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0105] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for detecting slaughter transport hooks, characterized in that, The method includes: Collect structural images and QR code images of the slaughtering transport hooks on the conveyor track; Perform region detection on the structure image to obtain key region images; Feature point coordinates are extracted from the key area image, and the angle between the hook tip and the aluminum shank of the slaughtering and transporting hook is calculated based on the feature point coordinates. The included angle value is compared with a preset threshold to determine the safety status of the slaughtering and transport hook; The transport hook number is extracted from the QR code image, and the transport hook number is associated with the safety status to generate the detection result of the slaughter transport hook.

2. The method for detecting slaughter transport hooks according to claim 1, characterized in that, The acquisition of structural images and QR code images of the slaughtering transport hooks on the conveyor track includes: When the slaughtering transport hook passes through the preset detection position, it receives a trigger signal from the detection sensor; Based on the trigger signal, the first industrial camera is controlled to take a picture and obtain a structural image of the slaughtering and transporting hook; Based on the trigger signal, the second industrial camera is controlled to take a picture and obtain the QR code image of the slaughtering and transport hook.

3. The method for detecting slaughter transport hooks according to claim 1, characterized in that, The step of performing region detection on the structural image to obtain key region images includes: The structural image is input into a target detection network built on a pre-trained YOLOv8s model to obtain the location information of the abnormal structural region. Based on the location information, the structural image is cropped to obtain a key area image containing the hook tip and the aluminum shank.

4. The method for detecting slaughter transport hooks according to claim 1, characterized in that, The step of extracting feature point coordinates from the key area image and calculating the angle between the hook tip and the aluminum shank of the slaughter transport hook based on the feature point coordinates includes: Edge detection is performed on the key region image to generate edge image data; Based on the edge image data, key feature point extraction processing is performed to obtain the coordinates of two feature points distributed along the extension direction of the hook body, and the coordinates of one feature point on the aluminum handle; A first straight line is constructed based on the coordinates of the two feature points, and a second straight line is constructed based on the coordinates of a feature point on the aluminum shank and its extension direction. Calculate the angle between the first straight line and the second straight line, and use it as the angle between the hook tip and the aluminum shank of the slaughtering and transporting hook.

5. The method for detecting slaughter transport hooks according to claim 1, characterized in that, The step of comparing the included angle value with a preset threshold to determine the safety status of the slaughter transport hook includes: Read the safety threshold range corresponding to the included angle value from the preset configuration; The included angle value is compared with the safety threshold range to generate a comparison result; Based on the comparison results, it is determined whether the slaughter transport hook meets the safety requirements, and status information representing the safety status of the slaughter transport hook is generated.

6. The method for detecting slaughter transport hooks according to claim 1, characterized in that, The step of extracting the transport hook number from the QR code image and associating the transport hook number with the safety status to generate the detection result of the slaughter transport hook includes: The QR code image is processed for recognition, and the encoded information in the QR code image is extracted; The encoded information is parsed into the corresponding transport hook number; The transport hook number is bound to the safety status to generate the detection result of the slaughter transport hook.

7. The method for detecting slaughter transport hooks according to claim 1, characterized in that, The method further includes: When the safety status in the detection result is abnormal, the transport hook number is sent to the PLC control system via the Modbus protocol to trigger the downstream rejection mechanism to perform a physical removal operation on the abnormal slaughter transport hook.

8. A detection device for slaughtering and transporting hooks, characterized in that, include: The image acquisition module is used to acquire structural images and QR code images of the slaughter transport hooks on the conveyor track; The region detection module is used to perform region detection on the structure image to obtain key region images; Angle calculation module is used to extract feature point coordinates from the key area image and calculate the angle between the hook tip of the slaughter transport hook and the aluminum shank of the slaughter transport hook based on the feature point coordinates. The data comparison module is used to compare the included angle value with a preset threshold to determine the safety status of the slaughtering and transport hook. The result generation module is used to extract the transport hook number from the QR code image, associate the transport hook number with the safety status, and generate the detection result of the slaughter transport hook.

9. A terminal device, characterized in that, The terminal device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the slaughter transport hook detection method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed on a processor, implements the slaughter transport hook detection method according to any one of claims 1-7.