A poultry product traceability management method and system for food safety

By encrypting the images of the qualified stamp area and breeding data of poultry products, a traceability code is generated and attached to the product packaging, solving the problems of easy removal of labels and easy tampering of data in traditional traceability management, and realizing highly secure traceability management.

CN122492243APending Publication Date: 2026-07-31安徽省安慧家禽有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
安徽省安慧家禽有限公司
Filing Date
2026-05-15
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In traditional poultry product traceability management, electronic tags are easy to remove and replace, breeding data cannot be deeply bound to the product itself, and traceability information is easily tampered with, resulting in low credibility of traceability information and weak data security protection.

Method used

By collecting and preprocessing images of the qualified poultry stamp area, and encrypting the images using an improved version of the YOLOv8 model, a traceability code is generated by combining the two-dimensional matrix image of the breeding data and attached to the product packaging, thus achieving a two-dimensional encrypted fusion of poultry surface biological characteristics and full-cycle breeding data.

Benefits of technology

It achieves dual-dimensional encrypted fusion of poultry surface biological characteristics and full-cycle breeding data, ensuring the security of traceability information and improving the anti-tampering capability of traceability data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492243A_ABST
    Figure CN122492243A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for traceability management of poultry products aimed at food safety, relating to the technical field of data encryption. The method involves: acquiring the target area of ​​the target product; collecting and preprocessing the original image of the target area to obtain a standard image; acquiring the full-cycle breeding data of the target product and mapping it into a two-dimensional matrix image, and obtaining a first key and a second key; encrypting the standard image to obtain a first bitstream, and encrypting the two-dimensional matrix image to obtain a second bitstream; fusing the first bitstream and the second bitstream to reconstruct a traceability code; and adding the traceability code to the packaging of the target product to obtain the final product. Alternatively, the method involves collecting and preprocessing images of the poultry's body surface area stamped with a qualification seal to obtain a standard image, simultaneously mapping the breeding data into a two-dimensional matrix image and encrypting it to generate a corresponding bitstream, fusing and reconstructing the bitstream to generate a traceability code, and attaching it to the product packaging. This ensures the security of traceability information and improves the tamper-proof capability of traceability data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data encryption technology, specifically to a method and system for traceability management of poultry products for food safety. Background Technology

[0002] Poultry products are an important category of fresh food consumed daily by the public. Transparent information and safe management throughout the entire process of breeding, transportation, and slaughter are crucial aspects of food safety supervision. Currently, poultry product traceability management generally relies on traditional methods such as RFID leg bands, batch records, and paper quarantine certificates, which have significant shortcomings. Furthermore, traditional electronic leg bands must be removed after poultry enters the slaughtering and processing stage, and cannot follow the product flow, resulting in a break in the information chain between individual farmers and subsequent products, making it difficult to achieve accurate one-to-one traceability.

[0003] Publication No. CN117115794A discloses a method for recognizing traceability character codes on livestock and poultry carcass skin and a traceability certificate application; a step for acquiring inkjet information, which involves acquiring the inkjet information corresponding to the current scanning operation object; a step for acquiring a traceability code set, which involves acquiring the corresponding traceability code set based on the inkjet information; a step for scanning and recognizing, which involves recognizing the traceability character code imprint on the scanning operation object through graphic scanning to obtain the scanning and recognizing result; and a step for searching, which involves searching for the correct traceability character code from the traceability code set based on the scanning and recognizing result.

[0004] Traditional poultry product traceability relies on a single electronic tag, but this tag is easy to remove and replace. The breeding data and the product itself cannot be deeply linked, and the traceability information is easily tampered with and forged, resulting in low credibility of the traceability information and weak data security. Summary of the Invention

[0005] The purpose of this invention is to address the problems mentioned in the background art, where traditional poultry product traceability relies solely on a single electronic tag. However, this tag is easily removed and replaced, and the breeding data cannot be deeply bound to the product itself. The traceability information is easily tampered with and forged, resulting in low credibility of traceability information and weak data security protection. Therefore, this invention proposes a poultry product traceability management method and system oriented towards food safety.

[0006] A first aspect of this invention provides a method for traceability management of poultry products aimed at food safety, the method comprising: The target area of ​​the target product is obtained, and the original image of the target area is acquired through the target model. The original image is preprocessed to obtain a standard image. The target area is the area of ​​the target product with the qualification stamp. The breeding data of the target product throughout the entire cycle is obtained, the breeding data is mapped into a two-dimensional matrix image, and a first key and a second key are obtained; the entire cycle includes: brooding stage, growing stage, slaughtering stage, transportation stage and slaughtering stage; The standard image is encrypted using the first key to obtain a first bit stream, and the two-dimensional matrix image is encrypted using the second key to obtain a second bit stream. The first bit stream and the second bit stream are then fused and reconstructed to obtain the traceability code. The traceability code is added to the packaging of the target product to obtain the final product.

[0007] Optionally, the original image of the target region is acquired through a target model, wherein the target model is an improvement based on the YOLOv8 model, including: The target model is obtained by replacing the C2f module in the backbone network with the C2f-ERB module and replacing the neck structure in the YOLOv8 model with an improved neck structure; the YOLOv8 model includes a backbone network and a neck structure. The working principle of the improved neck structure includes: The output of the backbone network is used as the first input feature of the improved neck structure, the output of the 6th layer C2f-ERB module in the backbone network is used as the second input feature, the output of the 4th layer C2f-ERB module in the backbone network is used as the third input feature, and the output of the 2nd layer C2f-ERB module in the backbone network is used as the fourth input feature. The first input feature is upsampled and then concatenated with the second input feature to obtain the first feature. The first feature is then input into the C2f-ERB module to obtain the second feature. The second feature is upsampled and then concatenated with the third input feature to obtain the fourth feature. The fourth feature is then input into the C2f-ERB module to obtain the fifth feature. The fifth feature is upsampled and then concatenated with the fourth input feature to obtain the sixth feature. The 6th feature is input into the C2f-ERB module to obtain the 7th feature. The 6th feature is input into the Conv module and then concatenated with the 5th feature to obtain the 8th feature. The 8th feature is input into the C2f-ERB module to obtain the 9th feature. The 9th feature is input into the Conv module and then concatenated with the 2nd feature to obtain the 10th feature. The 10th feature is input into the C2f-ERB module to obtain the 11th feature. The fourth input feature is concatenated with the seventh feature to obtain the target seventh feature, the third input feature is concatenated with the ninth feature to obtain the target ninth feature, and the fourth input feature is concatenated with the eleventh feature to obtain the target eleventh feature. The target seventh feature, the target ninth feature, and the target eleventh feature are used as inputs to the detection head.

[0008] Optionally, the workflow of the C2f-ERB module includes: Obtain the original tensor, input the original tensor into the CBS module to obtain the first tensor, split the first tensor to obtain branch tensor A and branch tensor B, input the branch tensor A into the ERB module to obtain branch tensor C, concatenate the branch tensor C with the branch tensor B to obtain the second tensor, concatenate the second tensor with the first tensor to obtain the third tensor, input the third tensor into the CBS module to obtain the fourth tensor, and use the fourth tensor as the output of the C2f-ERB module; The workflow of the ERB module includes: The original image is acquired, and the original image is segmented to obtain branch image A and branch image B. Branch image A is then subjected to convolution and GELU activation operations in sequence to obtain branch image C. Branch image B is then subjected to max pooling, convolution, and GELU activation operations in sequence to obtain branch image D. The branch image C and the branch image D are stitched together to obtain the first image. The first image is input into the Conv module to obtain the second image. The second image is added element by element to the original image to obtain the third image. The third image is used as the output of the ERB module.

[0009] Optionally, encrypting the standard image using the first key to obtain the first bitstream includes: The standard image is compressed using the SPIHT compression algorithm to obtain a compressed bitstream. The first key is mapped using Logistic to obtain the first chaotic sequence. The first chaotic sequence is then sorted in descending order to obtain the first address index sequence. The compressed bit stream is scrambled according to the first address index sequence to obtain the first bit stream.

[0010] Optionally, the second bitstream is obtained by encrypting the two-dimensional matrix image according to the second key, including: The two-dimensional matrix image is reshaped to obtain a one-dimensional array, and the one-dimensional array is run-length encoded to obtain an encoded bitstream; The first key is mapped using Logistic to obtain the second chaotic sequence. The second chaotic sequence is then sorted in descending order to obtain the second address index sequence. The encoded bitstream is then scrambled according to the second address index sequence to obtain the second bitstream.

[0011] A second aspect of this invention provides a poultry product traceability management system for food safety, the system comprising: The image acquisition module is used to acquire the target area of ​​the target product, acquire the original image of the target area through the target model, and preprocess the original image to obtain a standard image; the target area is the area of ​​the target product with the qualification stamp; The data mapping module is used to acquire the breeding data of the target product throughout the entire cycle, map the breeding data into a two-dimensional matrix image, and acquire a first key and a second key; the entire cycle includes: brooding stage, growing stage, market stage, transportation stage and slaughter stage; The data encryption module is used to encrypt the standard image according to the first key to obtain a first bit stream, encrypt the two-dimensional matrix image according to the second key to obtain a second bit stream, and fuse the first bit stream and the second bit stream to reconstruct the source code. The product production module is used to add the traceability code to the packaging of the target product to obtain the final product.

[0012] Optionally, the original image of the target region is acquired through a target model, wherein the target model is an improvement based on the YOLOv8 model, including: The target model is obtained by replacing the C2f module in the backbone network with the C2f-ERB module and replacing the neck structure in the YOLOv8 model with an improved neck structure; the YOLOv8 model includes a backbone network and a neck structure. The working principle of the improved neck structure includes: The output of the backbone network is used as the first input feature of the improved neck structure, the output of the 6th layer C2f-ERB module in the backbone network is used as the second input feature, the output of the 4th layer C2f-ERB module in the backbone network is used as the third input feature, and the output of the 2nd layer C2f-ERB module in the backbone network is used as the fourth input feature. The first input feature is upsampled and then concatenated with the second input feature to obtain the first feature. The first feature is then input into the C2f-ERB module to obtain the second feature. The second feature is upsampled and then concatenated with the third input feature to obtain the fourth feature. The fourth feature is then input into the C2f-ERB module to obtain the fifth feature. The fifth feature is upsampled and then concatenated with the fourth input feature to obtain the sixth feature. The 6th feature is input into the C2f-ERB module to obtain the 7th feature. The 6th feature is input into the Conv module and then concatenated with the 5th feature to obtain the 8th feature. The 8th feature is input into the C2f-ERB module to obtain the 9th feature. The 9th feature is input into the Conv module and then concatenated with the 2nd feature to obtain the 10th feature. The 10th feature is input into the C2f-ERB module to obtain the 11th feature. The fourth input feature is concatenated with the seventh feature to obtain the target seventh feature, the third input feature is concatenated with the ninth feature to obtain the target ninth feature, and the fourth input feature is concatenated with the eleventh feature to obtain the target eleventh feature. The target seventh feature, the target ninth feature, and the target eleventh feature are used as inputs to the detection head.

[0013] Optionally, the workflow of the C2f-ERB module includes: Obtain the original tensor, input the original tensor into the CBS module to obtain the first tensor, split the first tensor to obtain branch tensor A and branch tensor B, input the branch tensor A into the ERB module to obtain branch tensor C, concatenate the branch tensor C with the branch tensor B to obtain the second tensor, concatenate the second tensor with the first tensor to obtain the third tensor, input the third tensor into the CBS module to obtain the fourth tensor, and use the fourth tensor as the output of the C2f-ERB module; The workflow of the ERB module includes: The original image is acquired, and the original image is segmented to obtain branch image A and branch image B. Branch image A is then subjected to convolution and GELU activation operations in sequence to obtain branch image C. Branch image B is then subjected to max pooling, convolution, and GELU activation operations in sequence to obtain branch image D. The branch image C and the branch image D are stitched together to obtain the first image. The first image is input into the Conv module to obtain the second image. The second image is added element by element to the original image to obtain the third image. The third image is used as the output of the ERB module.

[0014] Optionally, the data encryption module includes: The image compression module is used to compress the standard image using the SPIHT compression algorithm to obtain a compressed bit stream, map the first key using Logistic to obtain a first chaotic sequence, and sort the first chaotic sequence in descending order to obtain a first address index sequence. The first scrambling module is used to scramble the compressed bit stream according to the first address index sequence to obtain the first bit stream.

[0015] Optionally, the data encryption module includes: A bitstream generation module is used to reshape the two-dimensional matrix image to obtain a one-dimensional array, and to perform run-length encoding on the one-dimensional array to obtain an encoded bitstream; The second scrambling module is used to map the first key using Logistic to obtain a second chaotic sequence, sort the second chaotic sequence in descending order to obtain a second address index sequence, and scramble the encoded bit stream according to the second address index sequence to obtain a second bit stream.

[0016] The beneficial effects of this invention are: This invention proposes a traceability management method for poultry products aimed at food safety. It involves collecting images of the poultry's body surface areas stamped with a quality inspection mark and preprocessing them to obtain standard images. Simultaneously, the breeding data is mapped into a two-dimensional matrix image. Then, the two types of images are encrypted using a first key and a second key to generate corresponding bitstreams. These bitstreams are then fused and reconstructed to generate a traceability code, which is attached to the product packaging. This achieves a two-dimensional encrypted fusion of poultry's surface biological characteristics and full-cycle breeding data, ensuring the security of traceability information and enhancing the tamper-proof capability of traceability data. Attached Figure Description

[0017] Figure 1 A flowchart illustrating a poultry product traceability management method for food safety provided in an embodiment of the present invention; Figure 2 An encrypted flowchart of a poultry product traceability management method for food safety provided in an embodiment of the present invention; Figure 3 A schematic diagram of an improved neck structure for a poultry product traceability management system for food safety, provided in an embodiment of the present invention; Figure 4 A schematic diagram of the C2f-ERB module of a poultry product traceability management system for food safety provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the ERB module of a poultry product traceability management system for food safety, provided in an embodiment of the present invention. Detailed Implementation

[0018] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.

[0019] This invention provides a method for traceability management of poultry products aimed at food safety. See also... Figure 1 , Figure 1 A flowchart illustrating a poultry product traceability management method for food safety, provided as an embodiment of the present invention. The method includes the following steps: S101, Obtain the target area of ​​the target product, collect the original image of the target area through the target model, and preprocess the original image to obtain a standard image; S102, Obtain the breeding data of the target product throughout the entire cycle, map the breeding data into a two-dimensional matrix image, and obtain the first key and the second key; S103, encrypt the standard image according to the first key to obtain the first bit stream, encrypt the two-dimensional matrix image according to the second key to obtain the second bit stream, and merge the first bit stream and the second bit stream to reshape the source code. S104. Add the traceability code to the packaging of the target product to obtain the final product.

[0020] The target area is the region where the target product is stamped with a certificate of conformity; the entire lifecycle includes: the brooding stage, the growing stage, the market stage, the transportation stage, and the slaughter stage; This invention provides a method for traceability management of poultry products aimed at food safety. It involves collecting images of the poultry's body surface with the stamped area to obtain standard images, mapping breeding data into a two-dimensional matrix image, and then encrypting the two types of images using a first key and a second key to generate corresponding bitstreams. The bitstreams are then fused and reconstructed to generate a traceability code, which is attached to the product packaging. This method achieves dual-dimensional encrypted fusion of poultry's surface biological characteristics and full-cycle breeding data, ensuring the security of traceability information and enhancing the tamper-proof capability of traceability data.

[0021] In one implementation, the target product is poultry. Throughout the entire breeding cycle, poultry are equipped with RFID smart leg bands. During the brooding stage, these bands are used to record individual numbers, hatching times, and breeding information. During the rearing stage, they are used to record feed batches, medication records, and growth and health status. At the slaughter stage, each poultry's RFID leg band is scanned, and the individual IDs are aggregated and bound to a unified slaughter batch number. During transportation, the transport vehicle, time, temperature, humidity, and quarantine certificate are recorded. At the slaughter stage, the RFID smart leg bands are removed, and a ferrule-type quarantine tag (with a batch code) is placed on the poultry's leg. The data from the RFID smart leg bands is transferred to the cloud, where the data is received to obtain the poultry's breeding data.

[0022] In one implementation, the original image is preprocessed to obtain a standard image: after acquiring the original image of the poultry body surface containing the quarantine stamp, the image is sequentially grayscaled to remove color interference, then image filtering and noise reduction are performed to remove stains, feather residue and other irrelevant noise, then binarization segmentation is used to highlight the skin pores and stamp edge features, and finally image normalization and size correction are performed to unify the image resolution, angle and acquisition area specifications, thus completing the standardized image preprocessing, providing regular and reliable basic image data for subsequent pore feature extraction, data image fusion and encrypted traceability.

[0023] In one implementation, the poultry are stamped with a quality stamp on their carcasses. The quality stamp is used for subsequent image positioning and to indicate that the poultry has passed quality inspection, thus obtaining the target area of ​​the target product, which is the area where the poultry is stamped with the quality stamp.

[0024] In one implementation, aquaculture data is mapped to a two-dimensional matrix image: the aquaculture data is structured and organized, and scattered aquaculture information is organized into standardized digital codes: text is converted into conventional numbers, for example: site A=01, vaccine type=05, medication compliance=01, violation=00; all text, categories, time, and values ​​are converted into decimal / binary number strings. Data completion and standardization into a fixed-length sequence: Concatenate all encoded number strings, adding check codes and padding codes if the length is insufficient to form a fixed-length one-dimensional number sequence. Mapping the one-dimensional sequence to a two-dimensional pixel matrix: Set a fixed image size, such as 64×64 or 128×128 pixels; fill the one-dimensional number sequence into a two-dimensional grid row-wise, with each value corresponding to a pixel grayscale value. Value size → Map to 0–255 grayscale levels, automatically generating a grayscale two-dimensional image. Image standardization preprocessing: Perform normalization, noise reduction, and contrast fixing to generate a unique, fixed-size, and unalterable two-dimensional feature map of the aquaculture data. This can be further binarized into a black-and-white binary image.

[0025] In one implementation, see [link to implementation details]. Figure 2 , Figure 2 This invention provides an encryption flowchart for a poultry product traceability management method for food safety. The traceability code is obtained by fusing the first bitstream and the second bitstream: the first bitstream, the second bitstream, the synchronization code "ABABABAB", and the total number of pixels M×N are sequentially concatenated. If the total number of bits after concatenation is less than M×N, random bits are added at the end to make the length exactly equal to M×N. The result is then reconstructed into a two-dimensional image, which is the traceability code.

[0026] In one embodiment, the original image of the target region is acquired through a target model, and the target model is an improvement based on the YOLOv8 model, including: The target model is obtained by replacing the C2f module in the backbone network with the C2f-ERB module and replacing the neck structure in the YOLOv8 model with an improved neck structure. The YOLOv8 model includes a backbone network and a neck structure. The working principle of improving neck structure includes: The output of the backbone network is used as the first input feature for improving the neck structure, the output of the 6th layer C2f-ERB module in the backbone network is used as the second input feature, the output of the 4th layer C2f-ERB module in the backbone network is used as the third input feature, and the output of the 2nd layer C2f-ERB module in the backbone network is used as the fourth input feature. The first input feature is upsampled and then concatenated with the second input feature to obtain the first feature. The first feature is then input into the C2f-ERB module to obtain the second feature. The second feature is upsampled and then concatenated with the third input feature to obtain the fourth feature. The fourth feature is then input into the C2f-ERB module to obtain the fifth feature. The fifth feature is upsampled and then concatenated with the fourth input feature to obtain the sixth feature. The 6th feature is input into the C2f-ERB module to obtain the 7th feature. The 6th feature is input into the Conv module and concatenated with the 5th feature to obtain the 8th feature. The 8th feature is input into the C2f-ERB module to obtain the 9th feature. The 9th feature is input into the Conv module and concatenated with the 2nd feature to obtain the 10th feature. The 10th feature is input into the C2f-ERB module to obtain the 11th feature. The fourth input feature is concatenated with the seventh feature to obtain the target seventh feature. The third input feature is concatenated with the ninth feature to obtain the target ninth feature. The fourth input feature is concatenated with the eleventh feature to obtain the target eleventh feature. The target seventh feature, the target ninth feature, and the target eleventh feature are used as inputs to the detection head.

[0027] In one implementation, see [link to implementation details]. Figure 3 , Figure 3 This diagram illustrates an improved neck structure for a poultry product traceability management system for food safety, provided by an embodiment of the present invention. The neck structure constructs a top-down feature enhancement path by progressively concatenating and fusing features at different scales output from layers 2, 4, and 6 of the backbone network with deep features processed by upsampling and the C2f-ERB module. During this process, deep semantic information is transmitted to shallow layers, while high-resolution detail information from shallow layers is also fed back to deeper layers through bottom-up secondary concatenation and convolution operations. This multi-level, bidirectional interactive feature fusion mechanism allows feature maps of different scales to simultaneously obtain both global contextual information and local detail information, effectively narrowing the semantic gap and enhancing the model's ability to locate poultry skin features.

[0028] In one implementation, the neck structure incorporates a C2f-ERB module for further feature extraction after each feature concatenation. Furthermore, a Conv module is used in the bottom-up path to scale the features before concatenating them with the corresponding layer features. This not only enhances the differentiated fusion of cross-layer features but also gradually refines the quality of features at each layer by repeatedly utilizing the feature enhancement capabilities of the C2f-ERB module. The original input features are then concatenated with the corresponding features after complete neck layer processing, serving as multi-scale input to the detection head. This allows the detection head to obtain richer, more complementary, and noise-suppressed feature representations, thereby improving the model's robustness and accuracy in detecting targets under complex backgrounds and low-light conditions.

[0029] In one embodiment, the workflow of the C2f-ERB module includes: Obtain the original tensor, input the original tensor into the CBS module to obtain the first tensor, split the first tensor to obtain branch tensor A and branch tensor B, input branch tensor A into the ERB module to obtain branch tensor C, concatenate branch tensor C with branch tensor B to obtain the second tensor, concatenate the second tensor with the first tensor to obtain the third tensor, input the third tensor into the CBS module to obtain the fourth tensor, and use the fourth tensor as the output of the C2f-ERB module; The ERB module's workflow includes: Obtain the original image, segment the original image to obtain branch image A and branch image B, perform convolution and GELU activation operations on branch image A in sequence to obtain branch image C, and perform max pooling, convolution and GELU activation operations on branch image B in sequence to obtain branch image D; The first image is obtained by stitching together branch image C and branch image D. The first image is then input into the Conv module to obtain the second image. The second image is then added element by element to the original image to obtain the third image. The third image is then used as the output of the ERB module.

[0030] In one implementation, see [link to implementation details]. Figure 4 , Figure 4 This diagram illustrates a C2f-ERB module for a poultry product traceability management system for food safety, as provided in an embodiment of the present invention. The module first performs CBS initial transformation and feature segmentation on the original tensor. One branch tensor is then fed into the ERB module for enhanced feature extraction, while the other branch tensor retains the original intermediate features. The two feature paths are concatenated and fused again with the earlier feature map, finally outputting the result through the CBS module. This allows the module to simultaneously transmit high-resolution detail information and deep semantic information at different depths, thereby alleviating the problem of detail loss in deep networks and improving the model's ability to preserve and express features of multi-scale targets, especially small-scale targets.

[0031] In one implementation, the C2f-ERB module concatenates the enhanced features output by the ERB with the original branch features that have not undergone deep processing, and then concatenates them again with the first tensor after the initial transformation. This multi-layer feature reuse design enhances gradient flow and information reuse, reducing feature redundancy and degradation during the transfer process. While maintaining high computational efficiency, the module can provide richer and more discriminative feature maps for subsequent detection heads, enhancing the model's localization accuracy on the skin surface and its resistance to background interference.

[0032] In one implementation, see [link to implementation details]. Figure 5 , Figure 5 This diagram illustrates an ERB module of a poultry product traceability management system for food safety, provided in an embodiment of the present invention. Through parallel high-frequency enhancement branches and local feature extraction branches, the ERB module can respectively enhance high-frequency detail information such as edges and contours in the image, as well as the structural features of local regions. The two are then fused and residually connected to the original input. This allows the model to more accurately capture the fine texture and boundary information of targets when processing complex backgrounds or low-contrast scenes, thereby effectively improving the feature recognition ability for occluded targets or small-scale targets and reducing the risk of missed detections and false detections.

[0033] In one implementation, the ERB module introduces convolutional operations for channel fusion after concatenating the bi-branch features, and retains the original input information by adding elements one by one. This not only enhances the diversity of feature representation, but also avoids the problems of gradient degradation or information loss in deep networks. When extracting multi-scale features, the model can maintain richer semantic details and original context, thereby improving the overall network's robustness to target morphological changes and detection stability.

[0034] In one embodiment, encrypting a standard image using a first key to obtain the first bitstream includes: The standard image is compressed using the SPIHT compression algorithm to obtain a compressed bitstream. The first key is mapped using Logistic to obtain the first chaotic sequence. The first chaotic sequence is then sorted in descending order to obtain the first address index sequence. The first bit stream is obtained by scrambling the compressed bit stream according to the first address index sequence.

[0035] In one implementation, the standard image is compressed using the SPIHT compression algorithm, which significantly reduces the bitstream length of the standard image at a compression ratio of 0.75 bpp, thereby reducing the amount of data that needs to be embedded. This allows for the embedding of high-resolution information into a binary carrier image with limited capacity, ultimately achieving a high embedding rate for the overall scheme. The compression process preserves the key structural information of the image, and combined with the reserved space in the subsequent run-length encoding, it ensures that the standard image can be reliably embedded in the encrypted domain.

[0036] In one implementation, a chaotic sequence is generated from the first key using a Logistic mapping, and then the first address index sequence is obtained by arranging it in descending order. This sequence is then used to scramble and encrypt the compressed bitstream. This process completely randomizes the compressed bitstream, eliminating the statistical regularities in the original bitstream, making it impossible for attackers to obtain any useful information through analysis even if they intercept the encrypted data. The chaotic sequence is extremely sensitive to the initial key value, resisting cracking attacks and thus ensuring high security of secret information during transmission and storage.

[0037] In one embodiment, encrypting the two-dimensional matrix image using a second key to obtain the second bit stream includes: The two-dimensional matrix image is reshaped to obtain a one-dimensional array, and the one-dimensional array is run-length encoded to obtain an encoded bitstream; The first key is mapped using Logistic to obtain the second chaotic sequence. The second chaotic sequence is then sorted in descending order to obtain the second address index sequence. The encoded bit stream is then scrambled according to the second address index sequence to obtain the second bit stream.

[0038] In one implementation, by reshaping the original binary carrier image into a one-dimensional array and performing run-length encoding (RLE), the high redundancy of consecutive identical pixels (especially large black-and-white blocks) in the binary image can be utilized to compress the carrier image into a shorter encoded bitstream. This process reserves a large amount of space for subsequent embedding information, thereby improving the embedding rate without affecting the final reconstruction of the carrier image.

[0039] In one implementation, a chaotic sequence is generated using a second key and sorted in descending order to obtain a second address index sequence. This sequence is then used to scramble and encrypt the run-length encoded bitstream. This operation ensures that the encoded data of the carrier image presents a random sequence without statistical regularity during transmission, preventing attackers from inferring the contour or texture information of the original binary image and thus preventing content leakage. Furthermore, since the encryption process is completely reversible (the original binary image can be recovered losslessly by reversing the scrambling and decoding with the correct key), this step ensures both the security of the carrier image and the reversibility of the scheme.

[0040] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention should still fall within the scope of the claims of the present invention.

Claims

1. A method for traceability management of poultry products aimed at food safety, characterized in that, The product's skin surface is stamped with a quality mark. The product is poultry. The method includes: The target area of ​​the target product is obtained, and the original image of the target area is acquired through the target model. The original image is preprocessed to obtain a standard image. The target area is the area of ​​the target product with the qualification stamp. The breeding data of the target product throughout the entire cycle is obtained, the breeding data is mapped into a two-dimensional matrix image, and a first key and a second key are obtained; the entire cycle includes: brooding stage, growing stage, slaughtering stage, transportation stage and slaughtering stage; The standard image is encrypted using the first key to obtain a first bit stream, and the two-dimensional matrix image is encrypted using the second key to obtain a second bit stream. The first bit stream and the second bit stream are then fused and reconstructed to obtain the traceability code. The traceability code is added to the packaging of the target product to obtain the final product.

2. The poultry product traceability management method for food safety as described in claim 1, characterized in that, The original image of the target region is acquired through a target model, which is an improvement on the YOLOv8 model, including: The target model is obtained by replacing the C2f module in the backbone network with the C2f-ERB module and replacing the neck structure in the YOLOv8 model with an improved neck structure; the YOLOv8 model includes a backbone network and a neck structure. The working principle of the improved neck structure includes: The output of the backbone network is used as the first input feature of the improved neck structure, the output of the 6th layer C2f-ERB module in the backbone network is used as the second input feature, the output of the 4th layer C2f-ERB module in the backbone network is used as the third input feature, and the output of the 2nd layer C2f-ERB module in the backbone network is used as the fourth input feature. The first input feature is upsampled and then concatenated with the second input feature to obtain the first feature. The first feature is then input into the C2f-ERB module to obtain the second feature. The second feature is upsampled and then concatenated with the third input feature to obtain the fourth feature. The fourth feature is then input into the C2f-ERB module to obtain the fifth feature. The fifth feature is upsampled and then concatenated with the fourth input feature to obtain the sixth feature. The 6th feature is input into the C2f-ERB module to obtain the 7th feature. The 6th feature is input into the Conv module and then concatenated with the 5th feature to obtain the 8th feature. The 8th feature is input into the C2f-ERB module to obtain the 9th feature. The 9th feature is input into the Conv module and then concatenated with the 2nd feature to obtain the 10th feature. The 10th feature is input into the C2f-ERB module to obtain the 11th feature. The fourth input feature is concatenated with the seventh feature to obtain the target seventh feature, the third input feature is concatenated with the ninth feature to obtain the target ninth feature, and the fourth input feature is concatenated with the eleventh feature to obtain the target eleventh feature. The target seventh feature, the target ninth feature, and the target eleventh feature are used as inputs to the detection head.

3. The poultry product traceability management method for food safety as described in claim 2, characterized in that, The workflow of the C2f-ERB module includes: Obtain the original tensor, input the original tensor into the CBS module to obtain the first tensor, split the first tensor to obtain branch tensor A and branch tensor B, input the branch tensor A into the ERB module to obtain branch tensor C, concatenate the branch tensor C with the branch tensor B to obtain the second tensor, concatenate the second tensor with the first tensor to obtain the third tensor, input the third tensor into the CBS module to obtain the fourth tensor, and use the fourth tensor as the output of the C2f-ERB module; The workflow of the ERB module includes: The original image is acquired, and the original image is segmented to obtain branch image A and branch image B. Branch image A is then subjected to convolution and GELU activation operations in sequence to obtain branch image C. Branch image B is then subjected to max pooling, convolution, and GELU activation operations in sequence to obtain branch image D. The branch image C and the branch image D are stitched together to obtain the first image. The first image is input into the Conv module to obtain the second image. The second image is added element by element to the original image to obtain the third image. The third image is used as the output of the ERB module.

4. The poultry product traceability management method for food safety as described in claim 1, characterized in that, The first bit stream is obtained by encrypting the standard image according to the first key, including: The standard image is compressed using the SPIHT compression algorithm to obtain a compressed bitstream. The first key is mapped using Logistic to obtain the first chaotic sequence. The first chaotic sequence is then sorted in descending order to obtain the first address index sequence. The compressed bit stream is scrambled according to the first address index sequence to obtain the first bit stream.

5. A method for traceability management of poultry products for food safety as described in claim 1, characterized in that, The second bit stream is obtained by encrypting the two-dimensional matrix image using the second key, including: The two-dimensional matrix image is reshaped to obtain a one-dimensional array, and the one-dimensional array is run-length encoded to obtain an encoded bitstream; The first key is mapped using Logistic to obtain the second chaotic sequence. The second chaotic sequence is then sorted in descending order to obtain the second address index sequence. The encoded bitstream is then scrambled according to the second address index sequence to obtain the second bitstream.

6. A poultry product traceability management system for food safety, characterized in that, The system includes: The image acquisition module is used to acquire the target area of ​​the target product, acquire the original image of the target area through the target model, and preprocess the original image to obtain a standard image; the target area is the area of ​​the target product with the qualification stamp; The data mapping module is used to acquire the breeding data of the target product throughout the entire cycle, map the breeding data into a two-dimensional matrix image, and acquire a first key and a second key; the entire cycle includes: brooding stage, growing stage, market stage, transportation stage and slaughter stage; The data encryption module is used to encrypt the standard image according to the first key to obtain a first bit stream, encrypt the two-dimensional matrix image according to the second key to obtain a second bit stream, and fuse the first bit stream and the second bit stream to reconstruct the source code. The product production module is used to add the traceability code to the packaging of the target product to obtain the final product.

7. A poultry product traceability management system for food safety as described in claim 6, characterized in that, The original image of the target region is acquired through a target model, which is an improvement on the YOLOv8 model, including: The target model is obtained by replacing the C2f module in the backbone network with the C2f-ERB module and replacing the neck structure in the YOLOv8 model with an improved neck structure; the YOLOv8 model includes a backbone network and a neck structure. The working principle of the improved neck structure includes: The output of the backbone network is used as the first input feature of the improved neck structure, the output of the 6th layer C2f-ERB module in the backbone network is used as the second input feature, the output of the 4th layer C2f-ERB module in the backbone network is used as the third input feature, and the output of the 2nd layer C2f-ERB module in the backbone network is used as the fourth input feature. The first input feature is upsampled and then concatenated with the second input feature to obtain the first feature. The first feature is then input into the C2f-ERB module to obtain the second feature. The second feature is upsampled and then concatenated with the third input feature to obtain the fourth feature. The fourth feature is then input into the C2f-ERB module to obtain the fifth feature. The fifth feature is upsampled and then concatenated with the fourth input feature to obtain the sixth feature. The 6th feature is input into the C2f-ERB module to obtain the 7th feature. The 6th feature is input into the Conv module and then concatenated with the 5th feature to obtain the 8th feature. The 8th feature is input into the C2f-ERB module to obtain the 9th feature. The 9th feature is input into the Conv module and then concatenated with the 2nd feature to obtain the 10th feature. The 10th feature is input into the C2f-ERB module to obtain the 11th feature. The fourth input feature is concatenated with the seventh feature to obtain the target seventh feature, the third input feature is concatenated with the ninth feature to obtain the target ninth feature, and the fourth input feature is concatenated with the eleventh feature to obtain the target eleventh feature. The target seventh feature, the target ninth feature, and the target eleventh feature are used as inputs to the detection head.

8. A poultry product traceability management system for food safety as described in claim 7, characterized in that, The workflow of the C2f-ERB module includes: Obtain the original tensor, input the original tensor into the CBS module to obtain the first tensor, split the first tensor to obtain branch tensor A and branch tensor B, input the branch tensor A into the ERB module to obtain branch tensor C, concatenate the branch tensor C with the branch tensor B to obtain the second tensor, concatenate the second tensor with the first tensor to obtain the third tensor, input the third tensor into the CBS module to obtain the fourth tensor, and use the fourth tensor as the output of the C2f-ERB module; The workflow of the ERB module includes: The original image is acquired, and the original image is segmented to obtain branch image A and branch image B. Branch image A is then subjected to convolution and GELU activation operations in sequence to obtain branch image C. Branch image B is then subjected to max pooling, convolution, and GELU activation operations in sequence to obtain branch image D. The branch image C and the branch image D are stitched together to obtain the first image. The first image is input into the Conv module to obtain the second image. The second image is added element by element to the original image to obtain the third image. The third image is used as the output of the ERB module.

9. A poultry product traceability management system for food safety as described in claim 6, characterized in that, The data encryption module includes: The image compression module is used to compress the standard image using the SPIHT compression algorithm to obtain a compressed bit stream, map the first key using Logistic to obtain a first chaotic sequence, and sort the first chaotic sequence in descending order to obtain a first address index sequence. The first scrambling module is used to scramble the compressed bit stream according to the first address index sequence to obtain the first bit stream.

10. A poultry product traceability management system for food safety as described in claim 6, characterized in that, The data encryption module includes: A bitstream generation module is used to reshape the two-dimensional matrix image to obtain a one-dimensional array, and to perform run-length encoding on the one-dimensional array to obtain an encoded bitstream; The second scrambling module is used to map the first key using Logistic to obtain a second chaotic sequence, sort the second chaotic sequence in descending order to obtain a second address index sequence, and scramble the encoded bit stream according to the second address index sequence to obtain a second bit stream.