Chicken fighting full life cycle traceability management system based on video analysis tracking

CN122840973APending Publication Date: 2026-09-29BEIJING WUDESHOU AGRICULTURAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611048730.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

脚环或物理标记容易脱落、损毁或被调换,导致个体身份在漫长养殖周期中断裂,无法实现真正的全生命周期连续追踪

Benefits of technology

通过构建包含时空图的图注意力网络,对不同监控点位的视频片段进行跨镜头匹配。时空图的节点存储视频片段内每帧提取的头部羽色、鸡冠形态和虹膜纹理特征所构成的片段特征序列,图的边则连接时间戳差值小于预设阈值的不同点位节点。图注意力网络对每个节点计算相对于相邻节点的注意力权重,依据权重更新节点的融合特征向量,将该融合特征向量与初始生物特征向量进行相似度匹配,相似度超过阈值时将不同点位的视频片段关联至同一个体身份标识。这种机制利用斗鸡在邻近时间窗口内跨越不同监控区域的时空连续性,融合多镜头下的局部生物特征,相比传统仅依赖单帧特征相似度比对的方式,显著提升了在密集混养场景中斗鸡个体重识别的准确率,消除了因物理标记脱落或污损造成的身份断裂,保障了长周期生命档案的个体一致性。采用时序注意力网络结构构建的斗鸡品系演化预测模型,将提取的第一行为特征向量、第一外观特征向量、第二行为特征向量和第二外观特征向量按照生命周期阶段时序拼接为输入特征序列,模型从输出层直接读取品系纯度和未来竞技潜能等级。该方案通过对雏鸡阶段的步态与啄食频率、育成阶段的羽色变化与尾羽生长、成年阶段的打斗姿态与腿部鳞片爪趾特征进行时序建模,自动学习各阶段特征对品系演化走向和竞技天赋显现的贡献权重。与仅依赖成年期静态外观或血统证书记录的传统鉴别方式不同,该方案捕获了贯穿斗鸡全生命周期的动态发育信息和行为表现,使得对血统纯度的判定和对未来竞技潜能的预测建立在完整的生物学发育证据链之上,结果更具客观性和稳定性,消除了人工经验评测的主观偏差。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122840973A_ABST
    Figure CN122840973A_ABST
Patent Text Reader

Abstract

The application discloses a cockfighting full-life-cycle traceability management system based on video analysis tracking, comprising: a collection and tracking module, which is used for collecting cockfighting full-process breeding monitoring video streams, performing video analysis tracking on cockfighting individuals in the video streams, and constructing individual identity identification; a feature extraction module, which is used for extracting cockfighting behavior feature data and cockfighting appearance feature data of each cockfighting individual at different life cycle stages; a strain prediction module, which is used for inputting the cockfighting behavior feature data and the cockfighting appearance feature data into a cockfighting strain evolution prediction model, and predicting the strain purity and future competition potential grade of each cockfighting individual; and an archive storage module, which is used for generating a full-life-cycle traceability archive of each cockfighting individual, binding the full-life-cycle traceability archive with the individual identity identification, and uploading the full-life-cycle traceability archive to a block chain storage node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of traceability management technology, specifically to a full life-cycle traceability management system for fighting cocks based on video analysis and tracking. Background Technology

[0002] In the field of cockfighting breeding and trading, the determination of an individual's bloodline purity and competitive ability has long relied on the manual experience of breeders and paper-based pedigree records. Current technologies for establishing a traceable lifecycle file for each fighting rooster typically employ contact identification methods such as leg bands or wing tags, combined with regular manual measurement and observation of its physical and behavioral characteristics. This approach has significant drawbacks in practical application. Leg bands or physical tags are easily detached, damaged, or replaced, leading to breaks in individual identification throughout the long breeding cycle and making true continuous tracking throughout the entire lifecycle impossible. Furthermore, relying on manual observation and recording of fighting roosters' behavior, feather evolution, and fighting performance at different growth stages is not only inefficient but also results in highly subjective and difficult-to-quantify results, leading to a lack of consistency and objectivity in assessing bloodline purity and competitive potential. In addition, when multiple fighting roosters are raised together, different individuals frequently cross different monitoring areas. Existing single-camera or simple feature comparison technologies struggle to achieve stable re-identification of fighting roosters under cross-camera and non-cooperative conditions. Frequent interruptions in individual activity trajectories result in the collected feature data not being accurately correlated with the correct individual identity. Based on the above problems, there is an urgent need in this field to solve how to achieve continuous tracking and stable identity binding of the appearance and behavioral characteristics of fighting cocks in a multi-camera network without relying on physical markers, and how to transform unstructured behavioral appearance data scattered at different growth stages into standardized prediction results of breed purity and future competitive potential. Summary of the Invention

[0003] The purpose of this invention is to provide a full life-cycle traceability management system that can achieve continuous cross-camera tracking of individual fighting cocks without physical marking, and to make standardized predictions of the purity and competitive potential of fighting cock breeds.

[0004] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a video analysis and tracking-based full life cycle traceability management system for fighting cocks, which includes a data collection and tracking module, a feature extraction module, a breed prediction module, and an archive storage module.

[0005] The data acquisition and tracking module collects video streams of fighting cocks from chicks to adults throughout their breeding process. It then analyzes and tracks individual fighting cocks within these streams to create a unique individual identifier for each cock. This process combines the fighting cocks' biological characteristics with cross-camera tracking technology, enabling continuous identification of each cock at different monitoring points within the farm. This solves the problems of traditional manual identification tags being easily detached or tampered with, ensuring the accuracy of the traceability records.

[0006] The feature extraction module is used to accurately extract behavioral and physical characteristics of each fighting cock at different life stages from the entire breeding monitoring video stream, based on the established individual identification identifiers. By extracting distinctive behavioral and physical characteristics for the chick, rearing, and adult stages, subsequent analysis can fully reflect the entire process of the fighting cock's growth and the formation of its competitive ability, providing a data foundation for accurate evaluation.

[0007] The breed prediction module is used to input behavioral and physical characteristics data of fighting cocks into a pre-trained fighting cock breed evolution prediction model to predict the breed purity and future competitive potential level of each fighting cock. This model is trained based on historical fighting cock life-cycle data and can learn the evolutionary patterns of breed and competitive potential from time-series characteristics. By introducing multi-dimensional features, it improves the objectivity and foresight of the predictions, providing a reference for fighting cock breeding and value assessment.

[0008] The record-keeping module generates a full lifecycle traceability file for each fighting cock based on its breed purity and future competitive potential. This file is then linked to the cock's individual identification and uploaded to a blockchain storage node. Leveraging the immutability and traceability of blockchain, combined with distributed storage, the integrity and credibility of the record content are ensured, and a transparent digital identity is established for each fighting cock from breeding to competition, meeting the needs for full lifecycle supervision and traceability.

[0009] As a preferred technical solution of the present invention, the specific implementation of the acquisition and tracking module is as follows: Simultaneously acquire full-process breeding monitoring video streams containing timestamp information and monitoring point number information at multiple fixed monitoring points in the fighting cock farm; perform head key point detection on each frame of the image to extract the head feather color distribution features, comb morphology features, and iris texture features of each fighting cock; sequentially concatenate the above three features according to the timestamp to generate an initial biometric vector for each fighting cock; then use a cross-monitoring point pedestrian re-identification algorithm to perform cross-camera matching on the initial biometric vector, associating video segments belonging to the same fighting cock individual at different monitoring points with the same individual identity identifier. By extracting and temporally fusing multimodal head biometric features, the recognizability of individual fighting cocks is enhanced, especially suitable for the characteristics of fighting cocks with rich head decorations and obvious individual differences. Cross-camera matching effectively solves the problem of individual re-identification in multi-angle, non-continuous tracking scenarios.

[0010] Furthermore, in a more preferred embodiment, when extracting head feather color distribution features, comb morphology features, and iris texture features, the present invention also performs quality scoring. When the score is lower than a preset resampling threshold, keypoint detection is re-executed. By introducing a feature quality feedback mechanism, low-quality features caused by occlusion, motion blur, and other factors are avoided from being used for identity construction, thus improving the robustness of subsequent tracking and matching.

[0011] For cross-camera matching, a more preferred technical solution is as follows: The entire breeding monitoring video stream collected from each monitoring point is divided into several fixed-length video segments in chronological order. The initial biometric vector extracted after performing head keypoint detection on each frame of each video segment is concatenated in frame order to form the segment's feature sequence. A spatiotemporal graph is constructed for the feature sequences corresponding to all monitoring points. Each node in the spatiotemporal graph represents a video segment and its corresponding monitoring point number and timestamp information. The node attributes store the segment feature sequence of the video segment. Edges in the spatiotemporal graph connect two nodes that satisfy the temporal proximity condition and are at different monitoring points. The temporal proximity condition is that the difference in timestamps between two video segments is less than a preset time window threshold. A graph attention network is used to aggregate features for each node in the spatiotemporal graph, calculating the attention weight of each node relative to its neighboring nodes. The fused feature vector of each node is updated according to the attention weight. The fused feature vector is then matched with the initial biometric vector for similarity. When the similarity exceeds a preset cross-camera matching threshold, video segments belonging to the same individual fighting rooster from different monitoring points are associated with the same individual identifier. By constructing a spatiotemporal graph and using a graph attention network for feature fusion, the spatiotemporal correlation information of the same fighting rooster under different camera shots can be adaptively aggregated, significantly improving the accuracy of cross-camera matching and effectively reducing the probability of false and missed matches. The number of attention heads in the graph attention network can be dynamically configured according to the total number of monitoring points. Each attention head independently calculates the weights of its adjacent nodes, and the average of these weights is taken as the final attention weight, adapting to the deployment needs of farms of different sizes.

[0012] As another preferred technical solution of the present invention, the feature extraction module is implemented as follows: Based on the individual identification, the individual tracking video segment of the fighting rooster is extracted from the full-process breeding monitoring video stream. The individual tracking video segment is then divided along the time axis according to preset life cycle stage division labels to obtain chick stage video segments, rearing stage video segments, and adult stage video segments. For the chick stage video segments, skeletal key point sequence extraction is performed, and the gait cycle parameters and pecking frequency parameters of the fighting rooster are calculated and combined into a first row of feature vectors. For the rearing stage video segments, feather texture segmentation is performed, and the gradient values ​​of back feather color change and tail feather growth length are extracted and combined into a first appearance feature vector. For the adult stage video segments, fighting posture recognition is performed, and the wing span parameters, jump height parameters, and attack frequency parameters are extracted and combined into a second row of feature vectors. Simultaneously, the leg scale color value and claw curvature value are extracted from the adult stage video segments as a second appearance feature vector. By extracting differentiated features in stages, behavioral and appearance characteristics can accurately reflect the development status and competitive traits of fighting cocks at each key growth stage, providing high-value input for subsequent breed and potential prediction.

[0013] In terms of breed and potential prediction, a preferred approach is to obtain the complete life cycle feature sequences of multiple retired fighting cocks stored in a historical fighting cock database, along with the actual breed identification results and actual competition rankings for each retired cock. Using the complete life cycle feature sequences as training input and the actual breed identification results and actual competition rankings as training labels, a fighting cock breed evolution prediction model is trained. This model employs a temporal attention network structure. The first row feature vector, first appearance feature vector, second row feature vector, and second appearance feature vector of the current fighting cock are concatenated into an input feature sequence according to the chronological order of the life cycle stages, and then fed into the fighting cock breed evolution prediction model. The model's output layer is used to read the breed purity and future competitive potential level. Breed purity is expressed as a percentage, and the future competitive potential level is selected from five preset levels as the output. The temporal attention network trained using historical real data can automatically learn the contribution weights of features at different stages to the final breed and competitive ability, resulting in predictions with greater biological interpretability and industry reference value. Furthermore, the complete life cycle feature sequences stored in the historical fighting cock database are classified and stored according to fighting cock breeds, and stratified sampling is performed according to breeds when training the fighting cock breed evolution prediction model, thereby avoiding prediction bias caused by sample imbalance and improving the model's generalization ability across breeds.

[0014] In terms of archive generation and evidence preservation, a preferred technical solution is as follows: Using the individual identification identifier as the primary key for retrieval, keyframe images and key behavioral segments of the fighting rooster at different ages are extracted from the entire breeding monitoring video stream. Keyframe images include frontal standing images, side standing images, and top-down back views. Key behavioral segments include feeding behavior segments, fighting behavior segments, and calling behavior segments. The individual identification identifier, breed purity, future competitive potential level, keyframe images, and key behavioral segments are encapsulated in chronological order into a full lifecycle traceability archive in JSON format. The hash digest value of the full lifecycle traceability archive is calculated, and the hash digest value, together with the individual identification identifier, is submitted to a smart contract in the blockchain storage node, triggering the smart contract to write the hash digest value into the blockchain's distributed ledger. Simultaneously, the full lifecycle traceability archive itself is stored in the InterPlanetary File System (IPS), and the content identifier returned by the IPS is recorded in the metadata of the blockchain storage node. This "on-chain hash evidence preservation, off-chain archive storage" approach balances the storage capacity limitations of the blockchain with the need to preserve the complete multimedia content of the archive, ensuring that once the archive is generated, it is immutable and publicly verifiable. Furthermore, the full lifecycle traceability files stored in the distributed interplanetary file system are configured with access permission whitelists, ensuring that only the owner corresponding to the individual identity or the authorized regulatory body has the right to read them, thus protecting the privacy of farmers' commercial data.

[0015] As a supplementary technical solution of this invention, after extracting the second appearance feature vector, the system also tracks each fighting behavior of the individual fighting cock based on its individual identity identifier, recording the individual identity identifier of the opposing fighting cock, the start time stamp, and the end time stamp of each fighting behavior; it extracts the fighting video segment from the adult stage video segment between the start time stamp and the end time stamp of the fighting, determines the winner of the fighting video segment, and obtains the cumulative number of wins and losses of the individual fighting cock; the cumulative number of wins and losses are written into the competition record field of the full life cycle traceability file. Thus, the traceability file not only contains growth information but also fully records the individual's actual combat performance, providing objective data support for further verification of its competitive potential level.

[0016] Specifically, the preferred method for determining the winner is as follows: For each frame of the fighting video segment, extract the coordinates of the first body center point of the first fighting rooster and the second body center point of the second fighting rooster, and calculate the Euclidean distance between the two body center point coordinates. When the Euclidean distance continuously exceeds a preset escape distance threshold for a preset number of escape judgment frames, the fighting rooster that has been continuously retreating during the period exceeding the escape distance threshold is determined to be the losing fighting rooster, and the other fighting rooster is determined to be the winning fighting rooster. Update the losing fighting rooster's cumulative losses based on its individual identity identifier, and update the winning fighting rooster's cumulative wins based on its individual identity identifier. Utilizing dynamic body distance analysis achieves automatic winner determination without manual intervention, improving the objectivity and collection efficiency of the competition records.

[0017] As another supplementary technical solution of the present invention, after extracting the second appearance feature vector, the system also periodically acquires the environmental temperature, humidity, and light intensity values ​​collected by the breeding environment sensors, and binds the environmental parameters with the corresponding timestamps to obtain an environmental parameter time series; the first and second row feature vectors are time-aligned with the environmental parameter time series, and the correlation coefficient of the fighting cock's behavioral feature data to the environmental parameters is calculated; when the correlation coefficient exceeds a preset stress response threshold, an environmental stress marker is added to the full life cycle traceability file, and the corresponding environmental parameter value and timestamp are written into the details field of the environmental stress marker. By recording environmental stress events in the traceability file, environmental attribution can be provided for changes in fighting cock behavior, which helps to more comprehensively explain the formation conditions of competitive potential and breed performance.

[0018] One preferred method for calculating the response correlation coefficient is as follows: Divide the environmental parameter time series into multiple environmental parameter subsequences according to a preset sliding window length; divide the first and second behavioral feature vectors into multiple behavioral feature vectors according to the same time window length; perform covariance calculation on the environmental parameter subsequences and behavioral feature vectors within each time window to obtain the covariance value; and calculate the first standard deviation of the environmental parameter subsequences and the second standard deviation of the behavioral feature vectors respectively; divide the covariance value by the product of the first and second standard deviations to obtain the Pearson correlation coefficient as the response correlation coefficient. Using the Pearson correlation coefficient can quantify the degree of linear correlation between behavioral changes and environmental changes, accurately identifying periods with significant stress responses.

[0019] As a further optimization of this invention, after extracting the second appearance feature vector, the system further queries the full life cycle traceability file in the blockchain storage node based on the individual identity identifier to obtain the parent identity identifier of the fighting cock's parent fighting cocks. The system then extracts the parent breed purity and parent competitive potential level corresponding to the parent identity identifier from the blockchain storage node, compares the parent breed purity and parent competitive potential level with the current fighting cock's breed purity and future competitive potential level, and calculates a genetic consistency score. When the genetic consistency score is lower than a preset genetic abnormality threshold, a pedigree verification mark is added to the full life cycle traceability file, and the parent identity identifier and genetic consistency score are written into the pedigree verification mark. This solution, through cross-generational information comparison, can automatically detect potential abnormalities in breed records or bloodline claims, improve the genetic credibility of the traceability file, and provide early warning references for breed management.

[0020] The technical effects and advantages provided by the present invention in the above technical solution are as follows: By constructing a graph attention network incorporating a spatiotemporal graph, cross-shot matching of video clips from different monitoring locations is performed. The nodes of the spatiotemporal graph store the segment feature sequence composed of head feather color, comb shape, and iris texture features extracted from each frame within a video clip. The edges of the graph connect nodes at different locations where the timestamp difference is less than a preset threshold. The graph attention network calculates the attention weight of each node relative to its neighboring nodes, updates the node's fused feature vector based on the weight, and performs similarity matching between this fused feature vector and the initial biometric vector. When the similarity exceeds the threshold, video clips from different locations are associated with the same individual identity. This mechanism leverages the spatiotemporal continuity of fighting cocks traversing different monitoring areas within a nearby time window, fusing local biometric features from multiple shots. Compared to traditional methods that rely solely on single-frame feature similarity comparison, this significantly improves the accuracy of individual weight identification in densely populated mixed-species environments, eliminates identity gaps caused by physical marker detachment or damage, and ensures individual consistency in long-term life records. A cockfighting breed evolution prediction model constructed using a temporal attention network structure concatenates the extracted first behavioral feature vector, first appearance feature vector, second behavioral feature vector, and second appearance feature vector according to the life cycle stages into an input feature sequence. The model directly reads the breed purity and future competitive potential level from the output layer. This scheme automatically learns the contribution weight of each stage's features to the breed evolution direction and the manifestation of competitive talent by temporally modeling the gait and pecking frequency in the chick stage, the feather color changes and tail feather growth in the rearing stage, and the fighting posture and leg scale and claw features in the adult stage. Unlike traditional identification methods that rely solely on static appearance in adulthood or pedigree certificate records, this scheme captures dynamic developmental information and behavioral performance throughout the entire life cycle of the fighting cock. This allows the determination of pedigree purity and the prediction of future competitive potential to be based on a complete biological developmental evidence chain, resulting in more objective and stable results and eliminating the subjective bias of human experience evaluation. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0022] Figure 1 This is a schematic diagram of the structure of the full life cycle traceability management system for fighting cocks; Figure 2 This is a flowchart of a method for extracting individual biometric features of fighting cocks and associating them with identities across different shots; Figure 3 This is a flowchart of multi-stage feature extraction for individual fighting cocks; Figure 4 This is a flowchart of the training and prediction process for a fighting cock breed evolution prediction model; Figure 5 It is a flowchart of the entire lifecycle traceability archive generation and storage process; Figure 6 This is a flowchart of the cockfighting behavior analysis and source tracing file update process; Figure 7 This is a schematic diagram showing the distribution of cross-camera feature similarity and matching thresholds for cockfighting. Figure 8 This is a probability distribution chart of the duration of key behavioral segments in cockfighting; Figure 9 This is a schematic diagram illustrating the change in the Euclidean distance between the body's center point and the escape determination during cockfighting. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] See Figure 1This invention provides a video analysis and tracking-based full life cycle traceability management system for fighting cocks, including a data acquisition and tracking module, a feature extraction module, a breed prediction module, and an archive storage module. The data acquisition and tracking module synchronously collects full-process breeding monitoring video streams from multiple monitoring points deployed in the breeding farm during the breeding process of fighting cocks from chicks to adults. It performs individual cock detection and tracking on each frame of the video stream, constructing a unique individual identity for each fighting cock. Based on the individual identity, the feature extraction module extracts complete video segments of each fighting cock from the full-process breeding monitoring video stream, divides it according to life cycle stages, and extracts behavioral and physical characteristic data for different stages. The behavioral characteristic data covers multi-dimensional dynamic parameters such as gait, pecking, and fighting posture, while the physical characteristic data covers multi-dimensional static parameters such as feather color, comb shape, iris texture, leg scales, and claw and toe shape. The breed prediction module concatenates the aforementioned behavioral and physical characteristic data in chronological order and inputs them into a pre-trained cockfighting breed evolution prediction model. The model outputs the breed purity and future competitive potential level for each cock. Breed purity is expressed as a percentage, and the future competitive potential level is selected from five preset levels. The record preservation module generates a full lifecycle traceability record based on the breed purity and future competitive potential level, combined with keyframe images and key behavioral segments extracted from the video stream. This record is bound to an individual identity identifier, its hash digest value is calculated and uploaded to a blockchain storage node, and the record file itself is stored in a distributed interplanetary file system, achieving tamper-proof full lifecycle data traceability.

[0025] Example 1: In specific implementation, please refer to Figure 2 The acquisition and tracking module synchronously collects full-process monitoring video streams from multiple fixed monitoring points at the fighting chicken farm. These fixed monitoring points are set up in different areas of the farm, each equipped with a high-definition camera. The high-definition cameras capture images at a frame rate of no less than 25 frames per second. Each frame in the full-process monitoring video stream is embedded with a timestamp via the system clock, along with the corresponding monitoring point number. The monitoring point number is a unique string identifier pre-assigned to each fixed monitoring point.

[0026] Key point detection of the fighting rooster's head was performed frame-by-frame on the entire breeding monitoring video stream. A pre-trained convolutional neural network (CNN) model was used for head key point detection. The backbone of the CNN model was a ResNet-50 structure, and the output layer contained five key point coordinates, corresponding to the forehead vertex, occipital bone point, center point of the left eye, center point of the right eye, and beak tip of the fighting rooster's head. Further, the head region was delineated based on these five key point coordinates, and head feather color distribution features, comb morphology features, and iris texture features were extracted from this region. The extraction method for head feather color distribution features was as follows: using the line connecting the center points of the left and right eyes as a reference, the top of the head was divided. Within this region, a 16-interval histogram of the H channel in the HSV color space was calculated, and the normalized frequencies corresponding to the 16 intervals were used as the 16-dimensional vector of the head feather color distribution features. The extraction method for the rooster comb morphology features is as follows: contour detection is performed in the area above the line connecting the frontal vertex and the occipital bone, and the curvature sequence of the outer contour of the rooster comb is extracted. The curvature sequence is sampled at equal length to obtain 20 curvature values, and then the 20 curvature values ​​are arranged into a 20-dimensional vector of the rooster comb morphology features. The extraction method for the iris texture features is as follows: a 36×36 pixel local image of the left eye is cropped with the center point of the left eye as the center point, and a 36×36 pixel local image of the right eye is cropped with the center point of the right eye as the center point. The orientation gradient histograms are calculated for the left and right local images respectively. The parameters of the orientation gradient histogram are set to 9 orientation intervals, 8×8 pixels per cell unit, and 2×2 cell units per block. The orientation gradient histogram feature vectors of the left and right local images are concatenated to obtain the iris texture features.

[0027] For each frame of the image, the extracted head feather color distribution features, comb morphology features, and iris texture features are each scored for quality. The quality score for the head feather color distribution features is calculated based on the average brightness value of the top of the head region, which is obtained from the pixel mean of the V channel in the HSV color space. If the average brightness value of the top of the head region is below 80 or above 230, the quality score for the head feather color distribution features is recorded as 0; otherwise, it is recorded as 1. The quality score for the comb morphology features is determined based on the integrity of the contour detection, which is equal to the ratio of the number of successfully detected continuous contour points to the theoretical number of contour points. If the integrity of the contour detection is below 0.7, the quality score for the comb morphology features is recorded as 0; otherwise, it is recorded as 1. The quality score for the iris texture features is calculated based on the average of the Laplacian variance values ​​of the left and right eye local images. If the average Laplacian variance values ​​of the left and right eye local images are below 50, the quality score for the iris texture features is recorded as 0; otherwise, it is recorded as 1. The comprehensive quality score is the product of the quality scores for head feather color distribution features, comb morphology features, and iris texture features. When the comprehensive quality score is 0, it is determined that the comprehensive quality score is lower than the preset resampling threshold. At this time, the detection of key points in the fighting rooster's head and the extraction of head feather color distribution features, comb morphology features, and iris texture features are re-performed on the frame image until the comprehensive quality score reaches 1.

[0028] The head feather color distribution features, comb morphology features, and iris texture features that have passed the quality score are sequentially concatenated according to timestamp information to generate the initial biometric vector for each fighting rooster. Specifically, the head feather color distribution feature vector, comb morphology feature vector, and iris texture feature vector of the same fighting rooster in consecutive frames are concatenated frame by frame to form an initial biometric vector of the form T×D, where T is the number of video frames and D is the sum of the dimensions of the three feature vectors, that is, the sum of the dimensions of the 16-dimensional head feather color distribution feature, the 20-dimensional comb morphology feature, and the histogram of directional gradients of the left and right eyes.

[0029] A pedestrian re-identification algorithm across monitoring points is used to perform cross-camera matching on the initial biometric vector. The first step involves dividing the entire aquaculture monitoring video stream collected from each monitoring point into several fixed-length video segments, each 3 seconds long, in chronological order. For each frame in each video segment, the initial biometric vector extracted after performing rooster head keypoint detection is concatenated in frame order to form the segment feature sequence. This segment feature sequence is an M×D matrix, where M is the number of frames contained within the 3 seconds.

[0030] The second step is to construct a spatiotemporal graph for the segment feature sequences corresponding to all monitoring points. Each node in the spatiotemporal graph represents a video segment, and the node attributes include the segment feature sequence, monitoring point number, and timestamp information. The timestamp information is taken from the timestamp of the middle frame of the video segment. Edges in the spatiotemporal graph connect two nodes that satisfy the time proximity condition and are at different monitoring points. The time proximity condition is set to the difference between the timestamps of two video segments being less than a preset time window threshold, which is set to 5 seconds.

[0031] The third step involves using a graph attention network to aggregate features for each node in the spatiotemporal graph. The input to the graph attention network is the average feature vector obtained by average pooling the fragment feature sequence of each node; the dimension of the average feature vector is the same as D. The graph attention network contains two multi-head attention layers, each followed by a feedforward neural network layer, residual connections, and layer normalization. The number of attention heads is dynamically configured based on the total number of monitoring points. When the total number of monitoring points is N, the number of attention heads is set to the smaller of N and 4. Each attention head independently calculates the attention weights between adjacent nodes. Specifically, for node i and its neighboring node j, their respective average feature vectors are mapped to a query vector, key vector, and value vector through a learnable linear transformation matrix. The dot product of the query vector and key vector is calculated, and the result is scaled by dividing by the square root of the vector dimension and normalized using the Softmax function to obtain the attention weight of node i for node j. Each attention head generates a head output vector by weighted summing of the value vectors. The head output vectors from multiple attention heads are concatenated and passed through a linear transformation layer to obtain the fused feature vector of the node. During the computation, the above operations are performed independently for each attention head, and the average value of the head output vectors of all attention heads is taken. The average value is used as the final attention weight for feature update, thereby updating the fused feature vector of each node.

[0032] The fourth step is to perform similarity matching between the fused feature vector and the initial biometric feature vector. For any two nodes u and v from different monitoring points, the fused feature vector of node u is taken. The initial biometric vector of any frame in the video segment corresponding to node v Cosine similarity is calculated using the following formula:

[0033] in, This represents the fused feature vector obtained by updating node u through the graph attention network. This represents the initial biometric vector extracted from a specific frame of the video segment corresponding to node v, with the symbol... This represents the vector dot product operation. Representing vectors of Norm, Representing vectors of Norm. When the cosine similarity S exceeds the preset cross-shot matching threshold, the cross-shot matching threshold is set to 0.82. The video segments corresponding to nodes u and v are associated with the same individual identifier, which is a globally unique string generated by the system. The above process is repeated until all video segments that meet the cosine similarity condition are associated, and finally a unique individual identifier is constructed for each fighting cock.

[0034] See Figure 7 In the graph, the horizontal axis represents cosine similarity, ranging from 0 to 1, and the vertical axis represents the probability density of the corresponding cosine similarity. The solid curve represents the probability density distribution of cross-camera feature similarity for the same fighting cock individual, while the dashed curve represents the probability density distribution of cross-camera feature similarity for different fighting cock individuals. The dotted line represents the cross-camera matching threshold, which is set to 0.82. The solid curve shows a significant peak to the right of the threshold, with a maximum probability density of approximately 7.9. The cosine similarity corresponding to the peak is concentrated in the range of 0.85 to 0.95, indicating that the cross-camera feature similarity for the same fighting cock individual is generally high and concentrated. The dashed curve is concentrated to the left of the threshold, with a peak at approximately 0.45 cosine similarity and a maximum probability density of approximately 3.2, indicating that the cross-camera feature similarity for different fighting cock individuals is low and more dispersed. The cross-camera matching threshold of 0.82 effectively distinguishes the cross-camera feature similarity between the same fighting cock individual and different fighting cock individuals, ensuring that the system can correctly associate video clips from different monitoring points of the same fighting cock individual based on the threshold, thus achieving the unique construction of individual identity identifiers.

[0035] Example 2: In specific implementation, please refer to Figure 3 The feature extraction module extracts all video frames associated with the individual identity generated by the acquisition and tracking module from the entire breeding monitoring video stream, combining them into an individual tracking video segment for each fighting rooster. The time span of this individual tracking video segment covers the entire time range from the rooster's entry into the breeding farm to the current moment. The individual tracking video segment is then divided along a timeline according to preset life cycle stage labels, resulting in chick stage video segments, rearing stage video segments, and adult stage video segments. The life cycle stage labels are set based on the fighting rooster's age range: chick stage corresponds to the age range of 0 to 60 days, rearing stage corresponds to the age range of 61 to 180 days, and adult stage corresponds to the age range of 181 days and above. The segmentation operation reads the timestamp information of each frame in the individual tracking video segment, matches the age corresponding to the timestamp information with the life cycle stage labels, and assigns consecutive frames to the corresponding stage's video segment.

[0036] Skeleton keypoint sequence extraction was performed on video segments from the chick stage. A pre-trained skeleton keypoint detection network was used for extraction, with the backbone structure of HRNet-W32. The input was a single-frame RGB image, and the output was the two-dimensional coordinates and corresponding confidence scores of 17 skeleton keypoints. The 17 skeleton keypoints included the head apex, neck midpoint, trunk center point, left wing root joint, left wing tip joint, right wing root joint, right wing tip joint, left leg root joint, left leg middle joint, left claw joint, right leg root joint, right leg middle joint, right claw joint, tail root joint, tail tip joint, beak tip, and occipital bone point. The skeleton keypoint detection network was fine-tuned and trained on a fighting rooster image dataset. The optimizer used during training was Adam, with an initial learning rate of 0.0001, a batch size of 16, and 80 training iterations. Each frame of the video segment in the chick stage is input into the skeleton keypoint detection network, and the two-dimensional coordinates of 17 skeleton keypoints in each frame are obtained in turn. The two-dimensional coordinates of the skeleton keypoints of all frames are arranged in order of frame timestamp to construct a temporal skeleton sequence.

[0037] The gait cycle parameters and pecking frequency parameters of individual fighting cocks were calculated from the temporal skeleton sequence. The gait cycle parameter was extracted by taking the waveform of the difference in the ordinates of the left and right leg joints over time, detecting the fundamental frequency period of the waveform using an autocorrelation function, and dividing the number of frames corresponding to the fundamental frequency period by the video frame rate to obtain the number of seconds of one gait cycle. This number of seconds was used as the gait cycle parameter. The pecking frequency parameter was extracted by calculating the waveform of the Euclidean distance between the beak tip and the midpoint of the neck in the vertical direction over time, performing a short-time Fourier transform on the waveform, and extracting the peak frequency in the frequency spectrum within the range of 1Hz to 3Hz. This peak frequency was used as the pecking frequency parameter. The gait cycle parameters and pecking frequency parameters were concatenated sequentially to form a feature vector. The first row of the feature vector is a two-dimensional vector, with the first dimension storing the numerical values ​​of the gait cycle parameters and the second dimension storing the numerical values ​​of the pecking frequency parameters.

[0038] Feather texture segmentation was performed on video segments from the breeding stage. Feather texture segmentation used a semantic segmentation network (SSN) with a DeepLabV3+ architecture. The encoder backbone was ResNet-101, and the decoder employed a bilinear upsampling and shallow feature fusion structure. The output of the SSN was a segmentation mask with the same resolution as the original image. Each pixel in the segmentation mask was assigned a semantic category label, including back feather region, tail feather region, background region, and other regions. The SSN was trained using a segmentation annotation dataset containing 3500 images of fighting cocks from various angles. The annotation dataset included pixel-wise annotations for the back feather and tail feather regions. During training, a cross-entropy loss function was used, with stochastic gradient descent as the optimizer, a momentum parameter of 0.9, an initial learning rate of 0.01, a multinomial decay strategy, a batch size of 8, and 100 training iterations.

[0039] The gradient values ​​of back feather color change are extracted from the back segmentation region. For the keyframe sequence within the video segment of the growth stage, the keyframes are selected at 24-hour intervals, i.e., one frame is selected per day. For the back segmentation region of each keyframe, the mean vectors of the H and S channels in the HSV color space are calculated to form the feather color feature vector for that day. The Euclidean distance between the feather color feature vectors of adjacent keyframes is calculated, and this Euclidean distance is used as the back feather color change value corresponding to the adjacent keyframe. The average of the back feather color change values ​​of all adjacent keyframes within the growth stage is then used as the back feather color change gradient value.

[0040] The tail feather growth length value is extracted from the segmented tail feather region. Using the tail root joint as the reference point, in each frame of the tail feather segmentation mask, the boundary of the segmentation mask is searched from the tail root joint along the direction of the tail tip joint to obtain the position of the tail feather tip pixel. The pixel distance from the tail root joint to the tail feather tip pixel position is calculated. The median of the pixel distances of all frames within the growth stage video segment is taken as the representative value of the tail feather tip pixel distance. The conversion relationship between the tail feather tip pixel distance and the actual length value is expressed as:

[0041] in, This indicates the length of tail feather growth, in millimeters. This represents the pixel distance to the tip of the tail feathers, in pixels, calculated from the segmentation mask. This indicates the distance from the camera lens to the individual fighting cock, in millimeters, obtained through depth calibration data from the monitoring points. The focal length of the camera lens, expressed in pixels, is read from the camera intrinsic calibration data. The gradient values ​​of back feather color change and tail feather growth length are concatenated sequentially to form the first appearance feature vector. The first appearance feature vector is a two-dimensional vector, with the first dimension storing the gradient values ​​of back feather color change and the second dimension storing the tail feather growth length.

[0042] Fighting posture recognition was performed on video segments from the adult stage. A 3D convolutional neural network (I3D-ResNet50) was used for this recognition. The input consisted of 16 consecutive stacked RGB images, and the outputs were wing span angle category, jump height category, and attack action category. The wing span angle category was divided into 10 intervals, each covering 18 degrees; the jump height category was divided into 5 intervals, corresponding to 0-5 cm, 5-10 cm, 10-15 cm, 15-20 cm, and over 20 cm; the attack action categories included pecking, kicking, pouncing, and no attack. The 3D convolutional neural network was trained on a cockfighting video dataset containing 500 labeled fighting videos. Each video was labeled with frame-by-frame wing span angle, jump height interval, and attack action category. During training, the cross-entropy loss was calculated for each output branch using a classification loss function and then summed. The optimizer was Adam, with a learning rate of 0.0001, a batch size of 8, and a training duration of 120 epochs.

[0043] The wingspan amplitude, jump height, and attack frequency parameters are extracted from the fighting posture recognition results. The wingspan amplitude parameter is extracted as follows: wing span angle categories are obtained frame by frame; the median value of the interval corresponding to each wing span angle category is used as the wing span angle value for that frame; and the maximum wing span angle value across all frames within the adult video segment is used as the wingspan amplitude parameter. The jump height parameter is extracted as follows: body jump height categories are obtained frame by frame; the median value of the interval corresponding to each body jump height category is used as the jump height value for that frame; and the peak value of the jump height value across all frames within the adult video segment is used as the jump height parameter. The attack frequency parameter is extracted as follows: attack action categories are obtained frame by frame; frames with an attack action category other than no attack are considered attack frames; the number of attack frames per unit time (1 minute) is counted; and the average number of attack frames per unit time within the adult video segment is used as the attack frequency parameter. The wingspan amplitude, jump height, and attack frequency parameters are concatenated sequentially to form the second row of feature vectors, which is a three-dimensional vector.

[0044] Simultaneously, leg scale color values ​​and claw / toe curvature values ​​are extracted from adult video segments as the second appearance feature vector. The leg scale color value extraction method is as follows: The leg region is located using the mid-joint points of the left and right legs in the skeletal keypoints. A 20×40 pixel rectangular region is cropped from each leg. This rectangular region is converted to the LAB color space, and the mean values ​​of the A and B channels are calculated. The average of the mean values ​​of the left, right, and right legs (A and B channels) is then taken as the leg scale color value. The claw / toe curvature value extraction method is as follows: The claw region images corresponding to the left and right claw joints are taken. The Canny edge detection operator is used to extract the claw / toe contours. An ellipse is fitted to each claw / toe contour, and the ratio of the minor axis to the major axis of the fitted ellipse is calculated. The inverse cosine of this ratio is taken to obtain the claw / toe curvature angle. The average of the median of all claw / toe curvature angles for the left and right claws is taken as the claw / toe curvature value. The color values ​​of the leg scales and the curvature values ​​of the claws and toes are concatenated in sequence to form the second appearance feature vector, which is a two-dimensional vector.

[0045] Example 3: In specific implementation, please refer to Figure 4 The breed prediction module retrieves the complete lifecycle characteristic sequences of multiple retired fighting cocks stored in the historical fighting cock database, along with the actual breed identification results and actual competition rankings for each retired cock. The historical fighting cock database is deployed on a dedicated server. The storage structure of the complete lifecycle characteristic sequences is as follows: each retired fighting cock corresponds to one record, containing a unique cock number, a first row of characteristic vector sequences, a first appearance characteristic vector sequence, a second row of characteristic vector sequences, and a second appearance characteristic vector sequence. Each characteristic vector sequence is sorted by timestamp. The actual breed identification results are stored as a combination of a breed name string and a breed purity percentage value. The breed purity percentage value is obtained by professional breeders through pedigree analysis, ranging from 0% to 100%. The actual competition rankings are stored as integer ranking values, starting from 1, where 1 represents first place, and smaller values ​​indicate better performance.

[0046] The historical fighting cock database stores complete lifecycle characteristic sequences categorized by fighting cock breed. The classification is based on the breed name string in the breed identification results, grouping retired fighting cocks with the same breed name string into the same breed category. When training the fighting cock breed evolution prediction model, stratified sampling is performed by breed. Specifically, for each breed category, 80% of the retired fighting cock records in that category are randomly selected for the training set, and the remaining 20% ​​are included in the validation set. This ensures that both the training and validation sets contain samples from all breed categories, and that the proportion of each breed category in both sets is consistent with the original proportion in the historical fighting cock database.

[0047] A fighting cock breed evolution prediction model is trained using the complete life cycle feature sequence of each retired fighting cock record in the training set as training input, and the actual breed identification results and actual competition rankings of the same retired fighting cock record as training labels. The complete life cycle feature sequence is concatenated before being input into the model. The concatenation method is as follows: the first row of feature vectors, the first appearance feature vector, the second row of feature vectors, and the second appearance feature vector are concatenated end-to-end according to the time sequence of the life cycle stages to form the input feature sequence. In the input feature sequence, the feature dimension of each time step is the sum of the dimensions of the first row of feature vectors, the first appearance feature vector, the second row of feature vectors, and the second appearance feature vector, i.e., two-dimensional plus two-dimensional plus three-dimensional plus two-dimensional, totaling a nine-dimensional vector. When the number of time steps in the complete life cycle feature sequence of different fighting cock individuals is inconsistent, zero vectors are used to pad to the maximum number of time steps.

[0048] The cockfighting breed evolution prediction model employs a temporal attention network structure, which comprises three modular layers. The first layer is a temporal coding layer, consisting of a bidirectional long short-term memory (LSTM) network with 128 hidden units each in the forward and reverse LSM networks. At output, the forward and reverse hidden state sequences are concatenated bit-by-bit to obtain a 256-dimensional encoded vector for each time step. The second layer is a multi-head self-attention layer, containing four attention heads. Each attention head maps the input vector to a query vector, key vector, and value vector using an independent linear transformation matrix. Each attention head's vector dimension is set to 64. The dot product of the query and key vectors, divided by the square root of 64, is used to calculate attention weights via a Softmax function. The attention weights are then weighted and summed with the value vectors to obtain the output vector for each attention head. The output vectors of the four attention heads are concatenated and mapped back to 256 dimensions using a linear transformation matrix. The multi-head self-attention layer is followed by residual connections and layer normalization. The third layer is the output fully connected layer, which contains two parallel linear mapping branches. The first linear mapping branch outputs the strain purity prediction value with an output dimension of 1 and the activation function is the Sigmoid function. The output value is multiplied by 100 and mapped to a percentage range of 0 to 100. The second linear mapping branch outputs the future competitive potential level prediction value with an output dimension of 5 and the activation function is the Softmax function. The five output values ​​correspond to the probabilities of five preset levels, and the level with the highest probability is taken as the future competitive potential level.

[0049] When training the fighting cock breed evolution prediction model, a joint loss function is used, which is a weighted sum of the breed purity regression loss and the competitive potential level classification loss. The breed purity regression loss uses a mean squared error loss function, calculating the mean squared error between the predicted breed purity value and the actual breed purity percentage. The competitive potential level classification loss uses a cross-entropy loss function, calculating the cross-entropy between the predicted probability distribution of future competitive potential levels and the level labels obtained by mapping actual competitive rankings. The mapping method for actual competitive rankings to level labels is as follows: those ranking in the top 5% are labeled Level 1, those ranking between 5% and 20% are labeled Level 2, those ranking between 20% and 50% are labeled Level 3, those ranking between 50% and 80% are labeled Level 4, and those ranking in the bottom 20% are labeled Level 5. In the joint loss function, the weight coefficient for the breed purity regression loss is set to 0.6, and the weight coefficient for the competitive potential level classification loss is set to 0.4. The training optimizer is Adam, and the initial learning rate is set to 0.001. At the end of each training cycle, the validation loss is calculated on the validation set. When the validation loss does not decrease for 5 consecutive cycles, the learning rate is multiplied by a decay factor of 0.5.

[0050] After training, the first row of the target fighting rooster's feature vector, first appearance feature vector, second row feature vector, and second appearance feature vector, output by the feature extraction module, are concatenated into an input feature sequence according to the time sequence of the life cycle stages. This sequence is then fed into the trained fighting rooster breed evolution prediction model. The breed purity prediction value is read from the first linear mapping branch of the output layer of the fighting rooster breed evolution prediction model, and the breed purity is expressed as a percentage. Five output values ​​are read from the second linear mapping branch of the output layer. The magnitudes of the five output values ​​are compared, and the preset level corresponding to the index with the largest output value is selected as the future competitive potential level. The five preset levels are Level 1, Level 2, Level 3, Level 4, and Level 5, where Level 1 represents the highest future competitive potential and Level 5 represents the lowest future competitive potential.

[0051] When the number of time steps in the input feature sequence differs from the maximum number of time steps in the training phase, the same zero-vector padding method as in the training phase is used. In the complete computational process of zero-vector padding, all feature vectors undergo layer normalization before concatenation. The mean and variance of the layer normalization are calculated within the dimensions of the same feature vector. The formula for layer normalization is:

[0052] in, This represents the value of the k-th dimension after normalization. This represents the original value of the k-th dimension. This represents the mean of all dimension values ​​within the same feature vector. This represents the variance of all dimension values ​​within the same feature vector. This represents a constant to prevent the denominator from being zero, and its value is... The feature vectors after layer normalization are then concatenated in time step order to form the input feature sequence.

[0053] Example 4: In specific implementation, please refer to Figure 5 The archiving module uses the individual identification identifier generated by the breed prediction module as the retrieval key, extracting keyframe images and key behavioral segments of fighting chickens at different ages associated with the individual identification identifier from the full-process breeding monitoring video stream. The association between the individual identification identifier and video frames in the full-process breeding monitoring video stream is established by the acquisition and tracking module during the cross-camera matching stage and stored in an in-memory index table. The in-memory index table uses the individual identification identifier as the key and the list of storage paths for the video frames as the values.

[0054] Keyframe image extraction includes the extraction of frontal standing images, side standing images, and top-down rear views. The extraction method for frontal standing images is as follows: traverse all video frames associated with the individual's identity identifier, call the skeleton keypoint detection network to output the coordinates of 17 skeleton keypoints for each frame, calculate the midpoint of the line connecting the center points of the left and right eyes, and determine the current frame as a candidate frame for frontal standing image when the horizontal offset between the midpoint of this line and the nose tip is less than 5 pixels, and the difference in the horizontal coordinates between the left and right wing root joints is greater than 30 pixels. From all candidate frames, the frame with the highest average confidence scores for the left and right eye center points is selected as the frontal standing image. The extraction method for the side-view standing image is as follows: Calculate the difference in horizontal coordinates between the left and right wing root joints. When the difference is less than 8 pixels, and the average horizontal coordinate of the left and right eye center points is offset by more than 20 pixels relative to the horizontal coordinate of the trunk center point, the current frame is determined to be a candidate frame for the side-view standing image. From all candidate frames, the frame with the highest confidence score for the trunk center point is selected as the side-view standing image. The extraction method for the top-down view image is as follows: Read the monitoring point number information, select the video frame collected by the monitoring point corresponding to the top-down view angle, and detect the line connecting the tail root joint and the midpoint of the neck in the video frame of that top-down view angle. When the angle between the line and the vertical direction of the image is less than 15 degrees, the current frame is determined to be a candidate frame for the top-down view. From all candidate frames, the frame with the highest average confidence score for the tail root joint and the midpoint of the neck is selected as the top-down view image.

[0055] The extraction of key behavioral segments includes feeding behavior segments, fighting behavior segments, and vocalization behavior segments. The feeding behavior segment extraction method is as follows: The distribution sequence of pecking frequency parameters on the timeline generated by the feature extraction module is read; time windows where the pecking frequency parameter continuously exceeds 0.8 Hz are detected; the start and end timestamps of the time window are mapped back to the entire aquaculture monitoring video stream; and the corresponding video segments are extracted as feeding behavior segments. The duration of each feeding behavior segment is limited to a minimum of 2 seconds and a maximum of 15 seconds. The fighting behavior segment extraction method is as follows: The distribution sequence of attack frequency parameters on the timeline generated by the feature extraction module is read; time windows where the attack frequency parameter is greater than zero are detected; and the 10 consecutive seconds of video with the highest attack frequency parameter within the time window are extracted as fighting behavior segments. The method for extracting the calling behavior segments is as follows: audio tracks are extracted from the entire breeding monitoring video stream. A calling detection algorithm based on Mel frequency cepstral coefficients is applied to the audio tracks. The calling detection algorithm is pre-trained on a fighting rooster calling audio dataset. During training, the positive samples are 1200 fighting rooster calling audio segments, and the negative samples are 800 breeding farm environmental noise audio segments. The classifier is a support vector machine with a radial basis function kernel function and a classification threshold of 0.7. The time window corresponding to the continuous audio segments with a classifier output probability higher than 0.7 is extracted as the calling behavior segment. The duration of the calling behavior segment is limited to a minimum of 1 second and a maximum of 8 seconds.

[0056] Individual identification, breed purity, future competitive potential level, keyframe images, and key behavioral segments are encapsulated in chronological order into a full lifecycle traceability file in JSON format. The top-level structure of the JSON full lifecycle traceability file contains six keys: individual identification key, breed purity key, future competitive potential level key, keyframe image key, key behavioral segment key, and timestamp sequence key. The individual identification key's value is the individual identification string. The breed purity key's value is the breed purity percentage output by the breed prediction module. The future competitive potential level key's value is the future competitive potential level string output by the breed prediction module, with the string taking one of four values: Level 1, Level 2, Level 3, Level 4, or Level 5. The keyframe image key contains three subkeys: frontal standing posture subkey, side standing posture subkey, and back top view subkey. Each subkey's value is the Base64 encoded string of the corresponding keyframe image. The key behavior fragment key contains three subkeys: feeding behavior, fighting behavior, and vocalization behavior. Each subkey's value is a content identifier string returned after the corresponding key behavior fragment's video file is stored via the InterPlanetary File System (IPS). The timestamp sequence key is an ordered list of timestamps generated for each data item.

[0057] Calculate the hash digest value of the full lifecycle traceability file. The hash digest value is calculated as follows: Serialize the JSON-formatted full lifecycle traceability file into a byte string. During serialization, the order of the keys is fixed as individual identification, breed purity, future competitive potential level, keyframe images, key behavior segments, and timestamp sequence. Remove all whitespace characters from the serialization result. Input the byte string after removing whitespace characters into the SHA-256 hash function. The SHA-256 hash function outputs a 256-bit hash value. Convert the 256-bit hash value into a 64-bit hexadecimal string as the hash digest value.

[0058] The hash digest value and the individual's identity identifier are jointly submitted to a smart contract in the blockchain storage node. The blockchain storage node is built on an Ethereum-compatible blockchain network, and the smart contract is written in Solidity and deployed on the blockchain storage node. The smart contract contains a storage map where the key is the individual's identity identifier string, and the values ​​are the corresponding hash digest value string and a timestamp. The submission operation is completed by calling the notarization function in the smart contract. The notarization function takes the individual's identity identifier string and the hash digest value string as input parameters. When the notarization function executes, it combines the current blockchain timestamp with the two input parameters to form a storage record and writes it to the storage map. Simultaneously, it triggers a notarization event, which includes index parameters for the individual's identity identifier string and the hash digest value string.

[0059] The entire lifecycle traceability file is stored in the InterPlanetary File System (IPFS). The IPFS network handles storage operations via the IPFS client interface. After adding the JSON-formatted lifecycle traceability file to the IPFS network, IPFS returns a content identifier, a 46-character Base58 encoded string starting with "Qm". This content identifier is then recorded in the metadata of the blockchain storage node. This is done by calling a metadata update function in the smart contract. The input parameters for this function are the individual identity string and the content identifier string. The update function appends the content identifier string to the record corresponding to the individual identity in the storage mapping.

[0060] The InterPlanetary File System (IPFS) sets access whitelists for full lifecycle traceability archives. The whitelist is implemented as follows: Before adding the full lifecycle traceability archive file to the IPFS network, it is encrypted using a symmetric encryption algorithm, AES-256-GCM, with a randomly generated 256-bit key. The encrypted archive file is uploaded to the IPFS network, and a content identifier is obtained. The AES-256-GCM encryption key is then encrypted using an asymmetric encryption algorithm and stored in the smart contract of the blockchain storage node. The asymmetric encryption algorithm used is elliptic curve cryptography (ECC), and each authorized party in the whitelist possesses an ECC public-private key pair. When an authorized party in the whitelist requests access to the full lifecycle traceability archive, it uses its own ECC private key to decrypt and obtain the AES-256-GCM encryption key, and then uses the AES-256-GCM encryption key to decrypt the encrypted full lifecycle traceability archive file obtained from the IPFS network. The access permission whitelist is maintained through a whitelist management function in a smart contract. Owners corresponding to individual identifiers are automatically added to the whitelist, and authorized regulators are added by the owners of the individual identifiers through the whitelist addition function. The permission verification formula for the whitelist addition function is as follows:

[0061] in, This represents the execution permission value for adding to the whitelist. A value of 1 allows the addition operation to be performed, while a value of 0 denies the addition operation. The caller address refers to the blockchain account address that initiates the whitelist addition function call, and the owner address refers to the blockchain account address of the owner corresponding to the individual identity identifier. The owner address is written to the smart contract storage when the full lifecycle traceability file is generated for the first time.

[0062] See Figure 8 In the figure, the horizontal axis represents the duration of key behavioral segments in seconds, ranging from 0 to 16 seconds; the vertical axis represents the probability density of the corresponding duration segment. The legend shows the duration distribution curves of three key behavioral segments: the duration distribution of feeding behavior segments (solid line), the duration distribution of fighting behavior segments (dashed line), and the duration distribution of vocalization behavior segments (dotted line).

[0063] The duration distribution curve of feeding behavior segments shows a single-peak shape, with the peak value located in the range of about 3 to 5 seconds and the probability density being the highest at about 0.23. This indicates that the short duration of feeding behavior is relatively concentrated, with most feeding behavior segments ranging from 2 to 7 seconds in length. After that, the probability density gradually decreases to close to zero, reflecting that the duration of feeding behavior segments is relatively stable and mostly concentrated in the short to medium period.

[0064] The duration distribution curve of the fighting behavior segments shows a relatively obvious single peak with the peak value being significantly higher than other curves. The peak value is concentrated in the range of 9 to 11 seconds, with the highest probability density of approximately 0.49. This indicates that the duration of fighting behavior is significantly longer and more concentrated than that of feeding and chirping behavior. Moreover, the duration of fighting behavior is mostly distributed in the range of 8 to 12 seconds, with almost no fighting behavior segments shorter than 5 seconds, indicating that fighting behavior has the characteristics of long continuous actions.

[0065] The duration distribution curve of the vocalization behavior segments shows a single peak with the peak value located in the range of 1 to 3 seconds. The probability density is the highest, about 0.27. The overall distribution is relatively short, and the probability of vocalization behavior segments exceeding 6 seconds is significantly reduced, indicating that vocalization behavior segments are mostly short-term, and most are concentrated between 1 and 4 seconds.

[0066] In summary, this figure reflects the duration distribution characteristics of key behavioral segments extracted from the full-process breeding monitoring video stream of fighting chickens. Feeding behavior is mostly manifested as continuous short-to-medium-term actions, fighting behavior is manifested as obvious long-term continuous actions, while calling behavior is mainly short-term audio behavior. This duration distribution characteristic helps the archival module to accurately extract representative key behavioral segments at different age stages, ensuring the accuracy and completeness of key behavioral data in the full life cycle traceability archive.

[0067] Example 5: In specific implementation, please refer to Figure 6 After the feature extraction module extracts the leg scale color value and claw curvature value from the adult video segment as the second appearance feature vector, it performs a fighting behavior recording operation. Each fighting behavior of an individual fighting cock is tracked based on its individual identity. The specific process is as follows: the attack action category output frame-by-frame by the feature extraction module in the adult video segment through the fighting posture recognition network is read. When the number of consecutive frames with an attack action category of "not non-attack" first exceeds 5 frames, the timestamp of the starting frame of that consecutive frame is recorded as the start timestamp of the fight. When the number of subsequent consecutive frames with an attack action category of "not attack" exceeds 30 frames, the timestamp of the last non-non-attack frame is recorded as the end timestamp of the fight, completing the start and end time location of one fighting behavior. Within the determined fighting behavior time period, by querying the attack action category output in the individual tracking video segments of other fighting cocks within the same time period, fighting cocks with the same non-non-attack attack action category that continuously overlap with the current fighting cock's attack action category within the same time period are identified. The individual identity of the fighting cock is recorded as the individual identity of the opponent fighting cock. Store the individual identity of the opposing cock, the start time stamp of the fight, and the end time stamp of the fight in the fight record array for each fight.

[0068] From the adult video segments, fight video segments from the start timestamp to the end timestamp of the fight are extracted, and the winner is determined for each fight video segment. For each frame of the fight video segment, the coordinates of the first body center point of the first fighting rooster and the coordinates of the second body center point of the second fighting rooster are extracted. The body center point is calculated as follows: the coordinates of the torso center point, the left wing root joint, and the right wing root joint are obtained from the skeletal keypoint detection network, and a weighted average is performed using preset weights. The weighting coefficients for the torso center point coordinates are 0.6, the left wing root joint coordinates are 0.2, and the right wing root joint coordinates are 0.2. After weighting, the x-coordinate and y-coordinate values ​​of the body center point are obtained. The Euclidean distance between the first and second body center point coordinates is calculated based on the difference in the x-coordinate and y-coordinate of the two body center points within the same frame using the Euclidean distance formula.

[0069] When the Euclidean distance value continuously exceeds a preset escape distance threshold for a preset number of escape judgment frames, a win or loss is determined. The escape distance threshold is set based on the average body length of an adult fighting cock, which is 35 cm. Combining this with the conversion coefficient between the image pixels of the monitoring point and the actual physical distance, the escape distance threshold is set to 80 pixels. The escape judgment frame count is set to 15 frames, corresponding to a 0.6-second observation window at a video frame rate of 25 frames per second. During the period when the escape distance threshold is continuously exceeded, the displacement direction of the body's center point is calculated frame by frame. The displacement direction is determined by the displacement vector of the body's center point in the current frame relative to the body's center point in the previous frame. The cock whose displacement vector points away from the opponent's body's center point is determined to be the one continuously retreating. If the Euclidean distance value exceeds 80 pixels for 15 consecutive frames and the continuously retreating cock is always the same individual, the cock continuously retreating during the period exceeding the escape distance threshold is determined to be the losing cock, and the other cock is determined to be the winning cock. Update the cumulative number of losses based on the individual identifier of the losing cock, incrementing by 1 each time; update the cumulative number of wins based on the individual identifier of the winning cock, incrementing by 1 each time. Write the cumulative number of wins and cumulative number of losses into the competition record field in the full lifecycle traceability file. The competition record field is stored as a JSON object, containing the cumulative number of wins and cumulative number of losses.

[0070] The system periodically acquires environmental temperature, humidity, and light intensity values ​​from sensors, including temperature, humidity, and light sensors. All three sensors send data to the system at fixed 10-minute intervals. The environmental temperature, humidity, and light intensity values ​​are bound to the timestamps carried during sensor data reporting, resulting in environmental parameter time series consisting of timestamp-temperature, timestamp-humidity, and timestamp-light value record sequences. The first and second rows of feature vectors are then time-aligned with the environmental parameter time series. This time alignment involves matching the timestamp sequences of gait period, pecking frequency, wingspan, jump height, and attack frequency parameters from the behavioral feature vectors with the timestamps of the environmental parameter time series to obtain the behavioral feature value corresponding to each environmental parameter record timestamp.

[0071] The correlation coefficient between cockfighting behavior data and environmental parameters is calculated. The environmental parameter time series is divided into multiple environmental parameter subsequences according to a preset sliding window length of 60 minutes and a sliding step size of 30 minutes. For each environmental parameter subsequence, the average environmental temperature value within the same sliding window is used to obtain a scalar environmental representative value sequence. The average environmental humidity value and the average environmental light intensity value are used to obtain three separate numerical sequences for the environmental parameter subsequences. The first and second behavioral feature vectors are divided into multiple behavioral feature subvectors according to the same sliding window length and sliding step size. Each behavioral feature subvector contains a set of all behavioral feature values ​​within the window period. The attack frequency parameter sequence in the behavioral feature subvector is taken as the behavioral response numerical sequence. Covariance calculation is performed on the environmental parameter subsequence numerical sequence and the behavioral response numerical sequence within each time window to obtain the covariance value. The first standard deviation of the environmental parameter subsequence numerical sequence and the second standard deviation of the behavioral response numerical sequence are calculated respectively. Dividing the covariance by the product of the first and second standard deviations yields the Pearson correlation coefficient, which is used as the response correlation coefficient. The formula for calculating the response correlation coefficient is as follows:

[0072] in, This represents the response correlation coefficient, with a value ranging from -1 to 1. Represents a numerical sequence of environmental parameter subsequences. With behavioral response numerical sequence The covariance, which is obtained by summing the sequence Elements and sequences The difference of the means multiplied by the sequence Corresponding elements and sequences in the middle The average of the differences in the means is obtained; Represents a numerical sequence of environmental parameter subsequences. The first standard deviation is derived from the sequence. Elements and sequences The square root of the mean of the sum of the squares of the differences in the means is obtained; Represents a numerical sequence of behavioral responses The second standard deviation, derived from the sequence Elements and sequences The square root of the sum of the squares of the differences in the means is obtained. The above operation is performed three times for the environmental temperature, environmental humidity, and environmental light intensity sequences, each time taking the corresponding environmental parameter subsequence. The correlation coefficients for temperature response, humidity response, and light response were calculated and obtained.

[0073] When the absolute value of any response correlation coefficient exceeds a preset stress response threshold, the stress response threshold is set to 0.75, and an environmental stress marker is added to the full lifecycle traceability file. The environmental stress marker is stored as a JSON object in the top-level structure of the full lifecycle traceability file, containing a stress type field and a details field. The stress type field contains the name of the environmental parameter that caused the stress response to exceed the threshold; its value is a string combining one or more of temperature, humidity, or light intensity. The details field contains the corresponding environmental parameter value and a timestamp; the environmental parameter value is the average environmental temperature, average environmental humidity, or average environmental light intensity within the stress occurrence time window.

[0074] The system retrieves the parent identification of a fighting cock from its parent rooster's full lifecycle traceability file within the blockchain storage node based on the individual's identification. Parental lineage information is entered into the breeding management system and written to the smart contract on the blockchain storage node during the fighting cock breeding process. The smart contract maintains a parental lineage mapping table, using the individual identification as the key and containing both the mother's and father's individual identifications as values. The query operation calls the smart contract's read function, passing in the current fighting cock's individual identification, to retrieve the mother's and father's individual identifications, which are then merged into a set of parental identifications.

[0075] The parental strain purity and competitive potential level are extracted from the parental identity set of each parental identity node. The extraction method involves querying the hash digest value of the corresponding full lifecycle traceability file stored in the network based on the parental identity, then obtaining the full lifecycle traceability file of the parent through the distributed interplanetary file system. The strain purity key and future competitive potential level key in the file are parsed. The average of the strain purity of the maternal and paternal parents is taken as the parental strain purity, and the average of the competitive potential level values ​​of the maternal and paternal parents, rounded, is taken as the parental competitive potential level.

[0076] The genetic consistency score is calculated by comparing the parental strain purity and competitive potential level with the current individual's strain purity and future competitive potential level. The deviation in strain purity is obtained by subtracting the current individual's strain purity from the parental strain purity, taking the absolute value, and ranging from 0% to 100%. The difference in competitive potential level is obtained by subtracting the current individual's future competitive potential level from the parental competitive potential level, taking the absolute value. The level value mapping rule is: level one corresponds to value 1, level two to value 2, level three to value 3, level four to value 4, and level five to value 5. The difference in level value ranges from 0 to 4. The genetic consistency score is calculated by weighting the deviation value of the breed purity and the grade difference of the competitive potential level. The normalized weight of the breed purity deviation value is set to 0.5, and the normalized weight of the competitive potential grade difference is set to 0.5. The breed purity deviation value is first divided by 100 to convert it into a dimensionless value between 0 and 1, and the competitive potential grade difference is first divided by 4 to convert it into a dimensionless value between 0 and 1. The two are then weighted and summed, and the weighted sum is subtracted from 1 to obtain the genetic consistency score. The genetic consistency score ranges from 0 to 1, and the closer the value is to 1, the higher the genetic consistency.

[0077] When the genetic consistency score falls below a preset genetic anomaly threshold (set to 0.65), a pedigree verification marker is added to the generated or updated full-lifecycle tracing file. The pedigree verification marker is stored as a JSON object, containing a parental identity field and a genetic consistency score field. The maternal and paternal individual identities are written to the parental identity field, and the calculated genetic consistency score is written to the genetic consistency score field. After adding the pedigree verification marker, the full-lifecycle tracing file's hash digest value is recalculated and submitted to the blockchain storage node for update and notarization.

[0078] See Figure 9In the graph, the horizontal axis represents time in seconds, and the vertical axis represents the Euclidean distance between the body centers in pixels. The solid curve represents the change in the Euclidean distance between the body centers of the two fighting cocks over time, while the dashed line represents the preset escape distance threshold, set at 80 pixels. The time interval is from 0 seconds to approximately 40 seconds, and the solid curve generally shows a trend of first decreasing and then increasing.

[0079] Between 0 and 20 seconds, the Euclidean distance between the body centers gradually decreases from approximately 150 pixels to below 20 pixels, indicating that the two fighting cocks are gradually approaching each other and entering a closer interaction phase. Between 20 and 30 seconds, the curve shows significant fluctuations within a lower distance range, with the Euclidean distance varying between approximately 10 and 60 pixels, indicating that the two fighting cocks are in a state of intense fighting, approaching each other and moving frequently.

[0080] Starting from approximately 30 seconds, the Euclidean distance significantly increased, continuously exceeding the escape distance threshold of 80 pixels, and reaching over 200 pixels at the end of 40 seconds, indicating that one of the fighting roosters began to continuously move away from the other, meeting the criteria for escape behavior. This phenomenon corresponds to the process of determining the winner of the fight in Example 5, where the fighting rooster whose Euclidean distance continuously exceeds the threshold and continues to retreat is determined to be the loser.

[0081] Overall, the diagram clearly illustrates a technical solution that uses the dynamic change of the Euclidean distance between the center points of two fighting cocks over time to pinpoint the start and end times of the fight and determine the winner, effectively assisting in recording and analyzing the behavioral characteristics during cockfighting competitions.

[0082] 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 video analysis and tracking-based full lifecycle traceability management system for fighting cocks, characterized in that, include: The acquisition and tracking module is used to acquire video streams of the entire breeding and monitoring process of fighting cocks from the chick stage to the adult stage, perform video analysis and tracking on the individual fighting cocks in the entire breeding and monitoring video stream, and construct an individual identity identifier for each fighting cock. The feature extraction module is used to extract the behavioral and physical characteristics of each fighting cock at different life stages from the full-process breeding monitoring video stream based on the individual identity identifier. The breed prediction module is used to input the fighting cock behavioral characteristic data and the fighting cock appearance characteristic data into the fighting cock breed evolution prediction model to predict the breed purity and future competitive potential level of each fighting cock. The record storage module is used to generate a full life cycle traceability record for each fighting cock based on the breed purity and the future competitive potential level, and then upload the full life cycle traceability record to the blockchain storage node after binding it with the individual identity identifier.

2. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 1, characterized in that, Collect video streams of the entire breeding and monitoring process of fighting cocks from chicks to adults, perform video analysis and tracking on individual fighting cocks in the video streams, and construct an individual identification identifier for each fighting cock, specifically: The entire breeding monitoring video stream is simultaneously collected from multiple fixed monitoring points in the fighting cock farm. The entire breeding monitoring video stream includes timestamp information and monitoring point number information. The key points of the fighting rooster's head are detected frame by frame in the entire breeding monitoring video stream, and the head feather color distribution characteristics, comb morphology characteristics and eye iris texture characteristics of each fighting rooster are extracted. The head feather color distribution features, the comb morphology features, and the iris texture features are sequentially spliced ​​according to the timestamp information to generate the initial biometric vector of each fighting rooster. A pedestrian re-identification algorithm across monitoring points is used to perform cross-camera matching on the initial biometric vector, and video clips belonging to the same fighting cock individual in different monitoring points are associated with the same individual identity identifier.

3. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 2, characterized in that, The quality scores of the head feather color distribution features, the comb morphology features, and the iris texture features are evaluated. When the scores are lower than the preset resampling threshold, key point detection is re-executed.

4. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 2, characterized in that, A pedestrian re-identification algorithm across monitoring points is used to perform cross-camera matching on the initial biometric vector, associating video clips belonging to the same fighting cock individual from different monitoring points with the same individual identity identifier. Specifically: The entire aquaculture monitoring video stream collected at each monitoring point is divided into several video segments of fixed duration according to time sequence. The initial biological feature vector extracted after performing the detection of key points on the head of the fighting rooster in each frame of each video segment is spliced ​​together in the order of frame number to form the segment feature sequence of the video segment. A spatiotemporal graph is constructed for the segment feature sequences corresponding to all monitoring points. Each node in the spatiotemporal graph represents a video segment and its corresponding monitoring point number and timestamp information. The node attributes store the segment feature sequence of the video segment. The edges in the spatiotemporal graph connect two nodes that satisfy the time proximity condition and have different monitoring points. The time proximity condition is that the difference in timestamps between two video segments is less than a preset time window threshold. A graph attention network is used to aggregate features for each node in the spatiotemporal graph, calculate the attention weight of each node relative to its neighboring nodes, update the fused feature vector of each node according to the attention weight, and perform similarity matching between the fused feature vector and the initial biometric vector. When the similarity exceeds a preset cross-camera matching threshold, video clips belonging to the same fighting cock individual in different monitoring locations are associated with the same individual identity identifier.

5. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 4, characterized in that, The number of attention heads in the graph attention network is dynamically configured according to the total number of monitoring points. Each attention head independently calculates the weights of its adjacent nodes and takes the average value as the final attention weight.

6. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 2, characterized in that, Based on the individual identification, behavioral and physical characteristics of each fighting rooster at different life stages are extracted from the full-process breeding monitoring video stream, specifically as follows: Based on the individual identification, the individual tracking video segment of the fighting rooster is extracted from the entire breeding monitoring video stream. The individual tracking video segment is then divided into time segments according to preset life cycle stage division tags to obtain chick stage video segments, growing stage video segments, and adult stage video segments. The skeleton key point sequence is extracted from the video segment of the chick stage, the gait period parameters and pecking frequency parameters of the fighting rooster are calculated, and the gait period parameters and pecking frequency parameters are combined into a first row feature vector. Feather texture segmentation is performed on the video segment of the growth stage, and the gradient value of back feather color change and the growth length value of tail feather are extracted. The gradient value of back feather color change and the growth length value of tail feather are combined into a first appearance feature vector. Fighting posture recognition is performed on the adult stage video segments, and the wingspan amplitude parameter, jump height parameter, and attack frequency parameter are extracted. The wingspan amplitude parameter, jump height parameter, and attack frequency parameter are combined into a second behavior feature vector. At the same time, the leg scale color value and claw toe curvature value are extracted from the adult stage video segments as a second appearance feature vector.

7. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 6, characterized in that, The behavioral and physical characteristics of the fighting cocks are input into a fighting cock breed evolution prediction model to predict the breed purity and future competitive potential level of each fighting cock. Specifically: Obtain the complete life cycle characteristic sequences of multiple retired fighting cocks stored in the historical fighting cock database, as well as the actual breed identification results and actual competitive rankings of each retired fighting cock; Using the complete life cycle feature sequence as training input, and the actual strain identification results and the actual competitive ranking as training labels, the fighting cock strain evolution prediction model is trained and generated. The fighting cock strain evolution prediction model adopts a temporal attention network structure. The first behavioral feature vector, the first appearance feature vector, the second behavioral feature vector, and the second appearance feature vector are concatenated into an input feature sequence according to the time order of the life cycle stage, and the input feature sequence is sent into the fighting cock breed evolution prediction model. The breed purity and the future competitive potential level are read from the output layer of the cockfighting breed evolution prediction model. The breed purity is expressed as a percentage value, and the future competitive potential level is selected from five preset levels as the output.

8. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 7, characterized in that, The complete life cycle feature sequences stored in the historical fighting cock database are classified and stored according to fighting cock breeds, and are sampled stratified by breed when training the fighting cock breed evolution prediction model.

9. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 7, characterized in that, Based on the breed purity and future competitive potential level, a full life-cycle traceability file is generated for each fighting cock. This full life-cycle traceability file is then bound to the individual identity identifier and uploaded to a blockchain storage node. Specifically: Using the individual identification as the retrieval key, key frame images and key behavioral segments of the fighting rooster at different ages are extracted from the full-process breeding monitoring video stream. The key frame images include frontal standing images, side standing images, and top-down images from the back. The key behavioral segments include feeding behavior segments, fighting behavior segments, and calling behavior segments. The individual identification, the breed purity, the future competitive potential level, the key frame images, and the key behavioral segments are encapsulated in chronological order into a full life cycle traceability file in JSON format; Calculate the hash digest value of the full lifecycle traceability file, and submit the hash digest value and the individual identity identifier together to the smart contract in the blockchain storage node, triggering the smart contract to write the hash digest value into the distributed ledger of the blockchain; The entire lifecycle traceability file itself is stored in the InterPlanetary File System (IPS), and the content identifier returned by the IPS is recorded in the metadata of the blockchain storage node.

10. The video analysis and tracking-based full lifecycle traceability management system for fighting cocks according to claim 9, characterized in that, The full lifecycle traceability files stored in the distributed interplanetary file system have access permission whitelists, meaning only the owner or authorized regulator corresponding to the individual identity has read access.