Milk and meat dual-purpose cattle epidemic disease prevention and control method and system based on image recognition

By using image recognition technology and analyzing the surface temperature and color gradient of cattle using infrared thermal imagers and visible light images, the problem of identifying deviations in body surface status and behavior in the prevention and control of bovine diseases has been solved in existing technologies, enabling dynamic identification and precise control of risk areas.

CN121600552AInactive Publication Date: 2026-03-03第八师石河子市畜牧水产发展服务中心
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511798427.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies struggle to simultaneously track the physical condition and behavior of multiple cattle. Subtle thermal abnormalities and changes in body color are easily missed in dynamic environments. There is a lack of continuous monitoring methods for spatial position changes and behavioral deviations. Local changes on the body surface and the outline of lesions are difficult to identify accurately. The boundaries of symptom areas are unclear, and the location of the spread path and potential risk areas in the herd is limited. Overall, there is data fragmentation, ambiguous lesion identification, inconsistent response, and difficulty in dynamically presenting the spread trend.

Method used

An image recognition-based approach is used to analyze body surface temperature images using an infrared thermal imager, track pixel temperature changes, identify abnormal temperature gradients, combine visible light image partitioning color gradients, calculate spatial coordinate trajectories, locate infected areas and behavioral deviations, optimize the spatial information labeling of the prevention and control platform, and achieve dynamic identification of risk areas.

Benefits of technology

It improves the continuity of anomaly identification, the objectivity of boundary determination, and the real-time nature of risk spatial positioning, supports the accurate determination of disease status and dynamic management of risk areas, and provides timely prevention and control response support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600552A_ABST
    Figure CN121600552A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of epidemic disease prevention and control, in particular to an epidemic disease prevention and control method and system for dairy and meat cattle based on image recognition, and the method comprises the following steps: analyzing a body surface temperature image based on a cattle house infrared thermal imager, recognizing abnormal mutation parameters, judging continuous time sequence temperature change, comparing the gradient difference of visible light images at two sides, and analyzing space coordinate offset; and determining a behavior space abnormal characteristic quantity, and establishing a risk intervention space identification result. According to the method, through collaborative analysis of multi-dimensional image data, features such as a body surface temperature curve, a space coordinate track and a color gradient are synchronously analyzed, focusing abnormal parts are adjusted through region grading, and risk distribution identifiers are established through linkage of space thermal anomalies and behavioral expressions; and the anomaly recognition continuity, the boundary judgment objectivity and the risk space positioning real-time performance are improved, so that support is provided for accurate judgment of epidemic disease states, dynamic management and control of risk areas and timely decision-making of prevention and control responses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of disease prevention and control technology, and in particular to a method and system for disease prevention and control of dual-purpose cattle (dairy and beef cattle) based on image recognition. Background Technology

[0002] Disease prevention and control refers to a comprehensive technology that uses scientific methods to monitor, diagnose, warn against, and intervene in infectious diseases that may occur in livestock, poultry, aquatic animals, and other farmed animals during the breeding process. This technical field encompasses multiple disciplines such as veterinary medicine, epidemiology, biostatistics, image analysis, and artificial intelligence recognition, aiming to improve the efficiency of disease prevention in animal husbandry and ensure animal health and breeding efficiency. Traditional disease prevention and control methods for dual-purpose (dairy and beef) cattle rely on manual inspection, clinical observation, and manual testing to assess the health and determine disease status of cattle. Veterinarians typically make judgments and diagnoses based on the cattle's behavioral state, body temperature, secretions, fecal shape, or by sampling and testing.

[0003] Current technologies rely primarily on inspections and experience-based judgments, making it difficult to simultaneously track the physical condition and behavior of multiple cattle. Subtle thermal anomalies and changes in body color are easily missed in dynamic environments. There is a lack of continuous monitoring methods for spatial position changes and behavioral deviations. Local changes on the body surface and the outlines of lesions are difficult to identify accurately. The boundaries of symptom areas are unclear. It is difficult to establish an effective correlation between changes in body temperature and spatial distribution trends. The location of herd spread paths and potential risk areas is limited. Overall, there are problems such as data fragmentation, ambiguous lesion identification, inconsistent responses, and difficulty in dynamically presenting spread trends. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a method and system for the prevention and control of diseases in dual-purpose cattle (dairy and beef cattle) based on image recognition.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a method for disease prevention and control in dual-purpose (dairy and beef) cattle based on image recognition, comprising the following steps: S1: An infrared thermal imager based on the cattle shed passage analyzes the surface temperature image, tracks the temperature change of pixels in consecutive frames, compares the temperature trend with the normal heat flow distribution, identifies abnormal points of temperature gradient change, and obtains abnormal mutation parameters of the surface. S2: Based on the abnormal mutation parameters of the body surface, determine the changes in the time-series temperature image, calculate the temperature fluctuation amplitude at each inflection point at each time, filter the spatial pixels with stable fluctuations, and connect them to form the thermal anomaly boundary to obtain the contour information of the infected area. S3: Based on the outline information of the infected area, compare the average color gradient values ​​of the visible light image partitions on the left and right sides of the bovine body, calculate the gradient difference between the two sides, determine the direction of color change, label the change areas in the partitions, and obtain the partition gradient priority index. S4: Based on the partition gradient priority index and combined with spatial positioning data, analyze the spatial coordinates of cattle in the movement area, calculate the difference between the individual activity trajectory and the average trajectory of the group, determine the degree of deviation of individual behavior, locate the offset individual, and obtain the spatial abnormality feature quantity of behavior. S5: Based on the abnormal feature quantity of the behavior space, combined with the outline information of the infected area and the partition gradient priority index, optimize the spatial information labeling of the prevention and control platform, and obtain the spatial identification result of risk intervention according to the coordinates and abnormal feature number.

[0006] The present invention is improved in that the abnormal mutation parameters on the body surface include the location of abnormal changes, local heat distribution characteristics, and body surface risk markers; the contour information of the infected area includes the contour boundary line, boundary length, and area expansion range; the partition gradient priority index includes the priority partition number, the area sorting list, and feature enhancement labels; the behavioral spatial abnormal feature quantities include offset trajectory identification, spatial abnormal distribution, and behavioral clustering labels; and the risk intervention spatial identification result includes the prevention and control area identifier number, the risk area location, and the linkage instruction type.

[0007] The present invention is improved in that the steps for obtaining the abnormal mutation parameters on the body surface are specifically as follows: S111: An infrared thermal imager based on the cattle shed passage analyzes the acquired body surface temperature images, identifies the temperature changes of each pixel in the two-dimensional temperature distribution data frame of the body surface in continuous frames, tracks the temperature change trend of each pixel in each time series, and obtains the pixel temperature change sequence. S112: Based on the pixel temperature change sequence, compare the temperature change curves of adjacent pixel regions, analyze the trend difference between the pixel temperature change direction in each region and the normal distribution data of heat flow on the surface of a healthy cow, determine the spatial temperature distribution abnormality, and obtain pixel temperature trend difference information. S113: Based on the pixel temperature trend difference information, target pixels with temperature gradient change characteristics are selected, the gradient change and spatial distribution characteristics of the target region are calculated, the temperature change information of the target pixels is aggregated, and the abnormal mutation parameters of the body surface are obtained.

[0008] The present invention is improved in that the step of obtaining the contour information of the infected area is specifically as follows: S211: Based on the abnormal mutation parameters of the body surface, analyze the spatial coordinate distribution in the continuous time series body surface temperature images, determine the changing trend of each temperature curve at each time, identify the key spatial locations where the temperature change direction changes, and obtain the spatial coordinate set of the turning point. S212: Based on the set of spatial coordinates of the turning point, compare the fluctuation amplitude of each temperature curve in the continuous time series, identify the spatial coordinates that maintain stable fluctuation amplitude between adjacent time points, organize the filtered spatial positions, and obtain a set of stable spatial pixel coordinates. S213: Based on the spatial pixel stable coordinate group, adjust the spatial sorting, connect the coordinates according to the arrangement relationship in the body surface temperature image, aggregate the spatial area enclosed by the connecting lines, and obtain the outline information of the infected area.

[0009] The present invention is improved in that the step of obtaining the partition gradient priority index is specifically as follows: S311: Based on the outline information of the infected area, compare the visible light images of the left and right sides of the cattle, calculate the horizontal and vertical gradient changes of the RGB three-channel pixels within the divided spatial partitions, integrate the channel gradient results of each partition, determine the overall gradient change trend of each partition, and obtain the color gradient spatial distribution sequence. S312: Based on the color gradient spatial distribution sequence, compare the gradient change rates of the same numbered partitions on the left and right sides of the body, filter out partitions with different guidance, optimize the spatial order of gradient changes, and label the different spatial numbers to obtain a color gradient guidance label set. S313: Based on the aforementioned color gradient-guided annotation set, calculate the channel gradient change rate of each partition, analyze the normalized rate differences, and use the following formula: ; Optimize the partition offset factor, adjust the sorting results, and obtain the partition gradient-first index, where... Indicates the first Color gradient distribution offset factor for each image partition Indicates the first The rate of change of the aggregated color gradient in the channel corresponding to the left side of the cow's body. Indicates the first The rate of change of the aggregated color gradient in the channel corresponding to the right side of the cow's body.

[0010] The present invention is improved in that the step of obtaining the abnormal feature quantity of the behavior space is specifically as follows: S411: Based on the partition gradient priority index, analyze the continuous spatial coordinates of the cattle in the movement area, number the coordinate set of each cattle in the same time period, calculate the sequence of movement trajectory points according to the timestamp order, and collect the cattle number and corresponding coordinate information to obtain the individual trajectory sequence. S412: Based on the individual trajectory sequence, compare the trajectory points of each cow with the average coordinates of the group at the same time period, calculate the spatial distance difference, determine the degree of difference between the trajectory of each cow and the group, and obtain the spatial offset distance sequence. S413: Based on the spatial offset distance sequence, individuals that differ from the spatial reference interval are selected. Based on the spatial coordinates of the individuals in each time period, the position of the cattle in the movement area is determined, and the spatial abnormality feature quantity of behavior is obtained.

[0011] The present invention is improved in that the steps for obtaining the spatial identification results of risk intervention are specifically as follows: S511: Based on the abnormal behavior spatial features, analyze the spatial trajectory of each cow in the movement area, determine the distribution of spatial offset points in the trajectory according to the matching relationship between the spatial trajectory and the activity area, mark the spatial area where the activity trajectory deviates from the normal activity distribution, and obtain abnormal behavior spatial distribution data. S512: Based on the spatial distribution data of the abnormal behavior, combined with the outline information of the infected area and the partition gradient priority index, optimize the labeling method of each spatial coordinate in the cattle shed and movement area, adjust the arrangement order of each spatial partition label, unify the partition coordinate and risk level marking process, and obtain spatial distribution labeling information. S513: Based on the spatial distribution labeling information, identify the coordinate characteristics and abnormal behavior markers of each spatial unit, integrate the numbering of the labeled space with the spatial coordinate correspondence, identify the spatial area that needs intervention and label it with a number, and obtain the risk intervention spatial identification result.

[0012] The present invention is improved in that the temperature change refers to whether the temperature of adjacent pixels increases or decreases in consecutive frames or in the same frame, the temperature gradient change describes the rate and direction of temperature distribution change in a certain area of ​​the body surface, and the partition labeling refers to spatial labeling of key areas detected in the image.

[0013] A disease prevention and control system for dual-purpose (dairy and beef) cattle based on image recognition, the system comprising: The thermal anomaly extraction module is based on an infrared thermal imager in the cattle shed channel. It analyzes the surface temperature image, tracks the temperature change of pixels in consecutive frames, compares the temperature trend with the normal heat flow distribution, identifies abnormal points of temperature gradient change, and obtains abnormal mutation parameters of the surface. The infection contour construction module judges the changes in the time-series temperature image based on the abnormal mutation parameters of the body surface, calculates the temperature fluctuation amplitude of each inflection point at each time, filters spatial pixels with stable fluctuations, and connects them to form thermal anomaly boundaries to obtain the infection area contour information. Based on the outline information of the infected area, the gradient partitioning recognition module compares the average color gradient of the visible light image partitions on the left and right sides of the bovine body, calculates the gradient difference between the two sides, determines the direction of color change, marks the changing areas in the partitions, and obtains the partition gradient priority index. The behavior anomaly determination module analyzes the spatial coordinates of cattle in the movement area based on the partition gradient priority index, calculates the difference between the individual activity trajectory and the average trajectory of the group, determines the degree of deviation of individual behavior, locates the off-center individual, and obtains the spatial anomaly feature quantity of behavior. The risk spatial identification module optimizes the spatial information labeling of the prevention and control platform based on the abnormal feature quantity of the behavioral space, combined with the contour information of the infected area and the partition gradient priority index, and obtains the risk intervention spatial identification result according to the coordinates and abnormal feature number.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, through the collaborative analysis of multidimensional image data, features such as body surface temperature curves, spatial coordinate trajectories, and color gradients are analyzed simultaneously. Trend comparison is used to determine local anomalies, and stability analysis is used to obtain the outline of the infected area. By adjusting the focus on abnormal parts through regional hierarchical adjustment, abnormal features are extracted by combining trajectory offset. Risk distribution markers are established by linking spatial thermal anomalies with behavioral manifestations, forming a dynamic collaborative expression of body surface status, behavioral trajectory, and infection boundary. This improves the continuity of anomaly identification, the objectivity of boundary determination, and the real-time nature of risk spatial positioning, thereby providing support for the accurate determination of disease status, dynamic management of risk areas, and timely decision-making in prevention and control responses. Attached Figure Description

[0015] Figure 1 This is a flowchart of the main steps of the present invention; Figure 2 This is a flowchart illustrating the acquisition of abnormal mutation parameters on the body surface in this invention. Figure 3 This is a flowchart illustrating the process of obtaining the contour information of the infected area in this invention. Figure 4 This is a flowchart illustrating the process of obtaining the partition gradient priority index in this invention. Figure 5 This is a flowchart illustrating the acquisition of behavioral space anomaly features in this invention. Figure 6 This is a flowchart illustrating the process of obtaining spatial identification results for risk intervention in this invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0018] All user-related information involved in this invention (including but not limited to biometric information, identity verification information, behavioral data, device information, and other data that can be used for identity verification and personalized services) is collected and processed with the user's full knowledge and voluntary consent. The collection, storage, and use of all information strictly comply with applicable national and regional laws and regulations, and meet relevant data protection standards and policy requirements. The use of data is limited to purposes necessary for providing the technical services of this invention, and reasonable technical and management measures will be taken to ensure the security and confidentiality of users' personal information in terms of information protection and privacy.

[0019] Example Please see Figure 1 This invention provides a technical solution for the prevention and control of diseases in dual-purpose (dairy and beef) cattle based on image recognition, comprising the following steps: S1: An infrared thermal imager based on the cattle shed passage analyzes the collected surface temperature images, tracks the temperature change direction of each pixel in continuous image frames, performs directional trend analysis on the temperature curves of pixels in adjacent areas, and identifies target pixels with temperature gradient change characteristics by comparing the difference between pixel temperature trends and the normal distribution pattern of heat flow on the cattle's surface, thus obtaining abnormal mutation parameters of the surface. S2: Based on the abnormal mutation parameters of the body surface, the change pattern in the continuous time series body surface temperature image is determined. By calculating the fluctuation amplitude of the temperature curve at each inflection point at each time, and combining the maximum and minimum range of the temperature curve between adjacent time points, the spatial pixel coordinates of the fluctuation are identified, and the coordinates are connected to form the thermal anomaly boundary to obtain the contour information of the infected area. S3: Based on the contour information of the infected area, compare the average color gradient of each region in the visible light images of the left and right sides of the cow's body surface, calculate the gradient difference between the two images, determine the direction of change based on the trend of color gradient change, label the image regions that show changes, adjust the priority order of feature input paths, and obtain the partition gradient priority index. S4: Based on the partition gradient priority index and combined with spatial positioning data, analyze the continuous spatial coordinates of cattle in the movement area. By calculating the spatial difference between the activity trajectory of each cattle and the average trajectory of the whole group, compare the degree of deviation between individual behavior and group behavior in the same period of time, determine the location of individuals whose spatial coordinates deviate to the reference interval, and obtain the spatial abnormality feature quantity of behavior. S5: Based on the abnormal feature quantity of the behavioral space, combined with the outline information of the infected area and the zoning gradient priority index, the labeling logic of the distribution information of cattle sheds and movement space on the prevention and control platform is optimized. The prevention and control area number is established according to the spatial coordinates and abnormal features to obtain the spatial identification result of risk intervention.

[0020] The abnormal mutation parameters on the body surface include the location of abnormal changes, local heat distribution characteristics, and risk markers on the body surface. The contour information of the infected area includes the contour boundary line, boundary length, and the extent of the area's expansion. The zoning gradient priority index includes the priority zoning number, the area sorting list, and the feature enhancement label. The behavioral spatial abnormality features include offset trajectory identification, spatial abnormality distribution, and behavioral clustering labels. The spatial identification results of risk intervention include the prevention and control area identifier, the location of the risk area, and the type of linkage instruction.

[0021] In S1, the body surface temperature image refers to a two-dimensional temperature distribution image of the surface of a dual-purpose (dairy and beef) cattle body acquired by an infrared thermal imager. Each pixel corresponds to the temperature at a certain location on the body surface. The direction of temperature change refers to whether the temperature of adjacent pixels increases or decreases in consecutive frames or within the same frame, used to determine the spatial trend of body surface temperature changes. Directional trend analysis analyzes the trend of pixel temperature changes along the spatial or temporal axis to determine the direction of temperature distribution changes. Pixel temperature trend refers to the temperature change of a certain pixel in different time or spatial sequences, commonly used to analyze the temperature change process of diseased sites. The normal distribution pattern of bovine body surface heat flow refers to the typical distribution pattern of body surface temperature in healthy dual-purpose (dairy and beef) cattle, used as a reference baseline for abnormality detection. The temperature gradient change feature describes the rate and direction of temperature change in a certain area of ​​the body surface, and is one of the image features for determining potential lesion areas.

[0022] In S2, continuous time-series body surface temperature images are multiple body surface temperature distribution maps acquired sequentially over time, used to dynamically observe changes in body temperature; inflection points refer to pixels where the temperature change trend changes from rising to falling or from falling to rising, reflecting key nodes of local temperature change; fluctuation amplitude calculation refers to the calculation of the temperature change range (maximum and minimum temperature difference) of a certain pixel over a period of time, used to assess the stability of temperature change; fluctuation stability refers to the small temperature change amplitude of a pixel in the time series, indicating that the temperature in that area remains relatively stable, often used as a basis for infection boundaries; spatial pixel coordinates refer to the actual spatial location of the pixel on the body surface in the temperature image, used to accurately locate abnormal areas; thermal anomaly boundaries refer to lines or surfaces composed of a series of abnormal or abrupt pixel points, used to define the boundaries of suspected infected areas on the body surface.

[0023] In S3, the visible light image refers to the bovine body surface image acquired using a regular visible light camera, reflecting the visible color and structural information of the body surface; the average color gradient refers to the average level of the rate of color change (such as RGB channels) within a certain region of the image, reflecting the degree of uniformity of color change on the body surface; the gradient difference refers to the difference in the average color gradient between the left and right regions of the bovine body, used to detect lateral lesions; the color gradient change trend refers to the spatial direction of the color gradient change (increasing, decreasing, or remaining stable), reflecting whether there is local tissue abnormality; the direction of change refers to the main direction of gradient change (left to right, top to bottom, etc.), which facilitates focusing on abnormal regions; the region labeling refers to spatially labeling the key areas detected in the image, which facilitates subsequent processing and recognition; the input path priority order refers to the priority order of different regions in subsequent feature processing (such as convolution operations), prioritizing the processing of high-risk regions.

[0024] In S4, the movement area refers to the spatial range within which the cattle herd can move, typically referring to pastures, exercise areas outside barns, etc.; the movement trajectory refers to the positional change trajectory of a single cow over a period of time, continuously recorded from spatial positioning data; the average trajectory refers to the average line of movement trajectories of all members of the herd within the same time period, used as a benchmark for group behavior; the degree of deviation refers to the spatial distance between the movement trajectory of a single cow and the average trajectory of the herd, reflecting behavioral abnormalities; the spatial coordinate offset refers to the distance between the actual spatial coordinates of a single cow at a certain moment and its theoretical or average position, used to judge spatial behavioral abnormalities; the reference interval refers to the reasonable range of spatial coordinate changes set based on herd behavior statistics, exceeding which is considered abnormal.

[0025] In S5, the spatial distribution information of cattle movement refers to the real-time location distribution data of cattle throughout the pasture or exercise area, reflecting the space utilization and aggregation. The labeling logic refers to the rules and procedures for marking spatial areas or cattle with risk tags and numbers based on the identification results. The abnormal features refer to the set of parameters that do not conform to normal distribution or behavior identified in the analysis process, including spatial, temperature, and color aspects. The prevention and control area number refers to assigning a unique code to spatial areas with risks or abnormalities to facilitate system tracking and management.

[0026] Please see Figure 2 The specific steps for obtaining abnormal mutation parameters on the body surface are as follows: S111: An infrared thermal imager based on the cattle shed passage analyzes the acquired body surface temperature images, identifies the temperature changes of each pixel in the two-dimensional temperature distribution data frame of the body surface in continuous frames, tracks the temperature change trend of each pixel in each time series, and obtains the pixel temperature change sequence. The continuously acquired two-dimensional temperature images of the cow's carcass were processed. The temperature values ​​corresponding to all pixels in each frame were read and recorded. Each pixel represents a tiny location on the cow's carcass. In the actual deployment, 10 frames were acquired per second for 30 seconds, resulting in 300 images. All pixels were numbered using an image numbering system. The temperature values ​​of each pixel in each frame were extracted and arranged chronologically to form a temperature change sequence. For each pixel, its temperature change over time was analyzed to determine whether its temperature was continuously rising, falling, or remaining stable. During the acquisition process, for example, if the temperature of a certain pixel continuously rises within 5 frames, from 36.2℃ to 37.4℃, then that pixel is judged to have a rising temperature trend. If the temperature change has no obvious direction, it is judged to have a fluctuating trend. The judgment period is set to 5 frames. Within this time window, it is judged whether the trend direction is consistent. The trend of all pixels in the time series is labeled one by one, and classified and statistically analyzed according to their trend categories. At the same time, the trend data is correlated with the position of cattle in the image, thus laying the foundation for subsequent identification of abnormal areas on the body surface, and obtaining the temperature change trend and identification results of each pixel in the time series.

[0027] S112: Based on the pixel temperature change sequence, compare the temperature change curves of adjacent pixel regions, analyze the trend difference between the pixel temperature change direction in each region and the normal heat flow distribution data of healthy cattle, determine the spatial temperature distribution abnormality, and obtain pixel temperature trend difference information. Based on the temperature change trend of each pixel, the local region formed by each pixel and its neighboring pixels in the image is compared to observe whether the temperature change direction among neighboring regions is consistent. Taking a pixel as the center, a nine-point region is formed by taking its eight neighboring pixels. The temperature change direction of all pixels in the region is analyzed to determine whether its direction is consistent with that of the central pixel. For example, if the central pixel shows an increasing temperature trend, while more than half of the neighboring pixels show a decreasing temperature trend, then a trend difference is considered to exist in this region. Furthermore, the regional trend information is compared with the established data on the heat flow direction of healthy cattle bodies, and then compared with the actual reference image. The shoulder area of ​​a cow should be in a warming direction, while the back area should be in a stable temperature direction. If the actual temperature of the back area of ​​a cow is in a cooling direction, it is considered that the location is significantly different from the health benchmark. Based on the quantification of the degree of difference, pixels with inconsistent trend directions are screened, and the difference level between the position and direction of the pixel and the direction of the health benchmark is recorded. When the trend direction of the pixel is completely opposite to that of the health reference image, it is defined as the highest level of difference; when it is partially inconsistent, it is defined as the medium level of difference; and when they are consistent, they are not recorded as abnormal. A distribution map reflecting the trend difference is formed in the image, which is used for subsequent screening of target areas with temperature gradient characteristics.

[0028] S113: Based on the temperature trend difference information of pixel points, target pixels with temperature gradient change characteristics are selected, the gradient change and spatial distribution characteristics of the target region are calculated, the temperature change information of the target pixels is aggregated, and the abnormal mutation parameters of the body surface are obtained. Pixels exhibiting abrupt temperature gradient changes are screened to determine if they possess spatial characteristics of abnormal temperature variations. First, the difference in the rate of temperature change between the pixel and its neighboring regions is observed. If this difference significantly exceeds the upper limit of the average slope in healthy samples, it is considered an anomaly. For example, in healthy cow samples, the average temperature change between pixels is 0.05 degrees Celsius per frame, fluctuating within ±0.02 degrees Celsius. If the actual pixel's rate of change reaches 0.085 degrees Celsius per frame, it clearly exceeds this range, indicating a sudden change. Next, multiple consecutively occurring pixels of this type are aggregated to determine if they constitute a spatially continuous region, using 8-connectivity. The method aggregates all adjacent anomalous pixels, combines them to form a target region, and statistically analyzes the overall characteristics of this region, including the number of pixels it covers in space. When converted to actual area, each pixel represents approximately 4 square millimeters. In addition, it calculates the difference between the maximum and minimum temperature differences within the region, as well as the consistency index in the region's direction. Furthermore, it establishes a parameter set for each region, including the region's location coordinates, maximum temperature difference, actual area, degree of directional consistency, and average temperature change rate. All regions that meet the screening criteria have the above feature data extracted and recorded to form a set of surface anomalous mutation parameters, which are used to identify parts of the cattle's body surface that show potential signs of infection.

[0029] Please see Figure 3 The specific steps for obtaining the outline information of the infected area are as follows: S211: Based on abnormal mutation parameters of the body surface, analyze the spatial coordinate distribution in continuous time series body surface temperature images, determine the changing trend of each temperature curve at each time, identify the key spatial locations where the temperature change direction changes, and obtain the spatial coordinate set of the turning point. Based on the spatial location, temperature gradient values, and local change trends recorded in the abnormal mutation parameters of the body surface, for the corresponding continuous infrared thermographic image sequence, the spatial coordinates marked as abnormal mutation regions are extracted in each frame of the image. The positions of the coordinate points are matched one by one in continuous time frames. The temperature values ​​of all abnormal pixels at each moment are sorted by time to construct a time-series temperature curve. The temperature curve of each abnormal coordinate position is analyzed separately according to the image frame order. By comparing the temperature change value and the direction of change between two adjacent frames, it is determined whether there is a turning point in the temperature change direction from heating to cooling or from cooling to heating. In the judgment process, a minimum change threshold of 0.3℃ is set. If a certain pixel If a point has a temperature of 37.1℃ in the previous frame and 36.7℃ in the next frame, its change is downward. If the change direction reverses twice consecutively, it is determined to be a temperature inflection point. At the same time, the frame number and spatial position of the point are recorded. When this happens at more than three consecutive time points, the point is further confirmed as a critical change point. If the pixel point shows more than two temperature direction reversals within a 30-second period, it is recorded as a strong inflection feature point. After the above judgment, the coordinates of all inflection points are summarized in the image space, and points with stable change direction or fluctuations of less than 0.3℃ within the time period are removed. The spatial position points with obvious directional inflection in the temperature curve are obtained, forming a complete set of inflection point spatial coordinates.

[0030] S212: Based on the spatial coordinate set of inflection points, compare the fluctuation amplitude of each temperature curve under continuous time series, identify the spatial coordinates that maintain stable fluctuation amplitude changes between adjacent time points, organize the filtered spatial positions, and obtain the spatial pixel stable coordinate group. At each identified turning point, the temperature change value throughout the entire time series is extracted. A complete temperature fluctuation curve is constructed according to the frame number order. The temperature change amplitude between any two adjacent time points is calculated. The difference in amplitude is extracted in each time period and formed into a continuous fluctuation amplitude sequence. The stability judgment condition for the fluctuation amplitude is set as follows: the temperature change difference within five consecutive time segments does not exceed 0.2℃. If this condition is met, the fluctuation amplitude of the point is judged to be stable; otherwise, it is removed from the coordinate screening process. In actual sampling, for example, the temperature change of a turning point in five consecutive frames is 0.12℃, 0.14℃, 0.09℃, 0.15℃, and 0.11℃, which does not exceed the judgment threshold, so it is recorded as a stable point. The above judgment logic is repeated for all turning points in the image. The spatial position of each point that meets the condition is sorted, and points whose fluctuation exceeds the threshold range in the time series are removed. Then, all spatial coordinates that meet the condition are sorted according to their row and column numbers in the image to form a coordinate table arranged in the image scanning order, which facilitates the region construction and sorting connection processing in subsequent operations, and completes the screening and organization of spatial pixel stable coordinate groups.

[0031] S213: Based on the spatial pixel stable coordinate group, adjust the spatial sorting, connect the lines according to the arrangement relationship of the coordinates in the body surface temperature image, aggregate the spatial region enclosed by the connecting lines, and obtain the contour information of the infected area. The coordinate points in the image matrix are reordered according to row and column priority to ensure the coordinate list is continuous and forms a logically closed curve structure. Adjacent points are sequentially connected to construct a closed region outline. During the connection process, if the pixel spacing between two coordinate points exceeds three pixels, intermediate connection points are automatically inserted to fill the gap and prevent broken patterns. All pixels within the enclosed structure are marked, and the pixel numbers within the region are counted. The total area of ​​the enclosed region is calculated based on the actual area represented by each pixel (e.g., 4 mm² per pixel). If the area is less than a set baseline of 80 mm², the region is discarded as it has no infection determination reference value. If the area is greater than the baseline, the region is marked as a potential infection region. Contour extraction is performed on its boundary pixels, saving the position, relative order, total boundary length, and horizontal and vertical extension dimensions of each boundary pixel. The entire region is then marked and numbered as the output result for infection region identification, completing the extraction of infection region contour information.

[0032] Please see Figure 4 The specific steps for obtaining the partition gradient-first index are as follows: S311: Based on the outline information of the infected area, compare the visible light images of the left and right sides of the cattle, calculate the horizontal and vertical gradient changes of the RGB three-channel pixels within the divided spatial partitions, integrate the channel gradient results of each partition, determine the overall gradient change trend of each partition, and obtain the color gradient spatial distribution sequence. The system retrieves visible light image data at the corresponding time point, projects the left and right body surface images of the cattle onto the visible light image according to the coordinates of the infected area, and extracts image data according to the standard spatial partitions defined in the image. For each partition, it extracts the raw pixel values ​​of the RGB three channels. The difference between the red, green, and blue channel values ​​of two adjacent pixels in the horizontal direction is calculated to form a horizontal gradient matrix. The same method is then performed on adjacent pixels in the vertical direction to form a vertical gradient matrix. The average values ​​of the three-channel horizontal and vertical gradient matrices in each partition are then calculated and summarized. During the process, if the average horizontal gradient of the R channel is 12 and the vertical gradient is 9, the average horizontal gradient of the G channel is 10 and the vertical gradient is 11, and the average horizontal gradient of the B channel is 13 and the vertical gradient is 10, then the overall gradient change can be weighted and combined based on the sum of the gradient values ​​of each channel. The resulting partition has a combined horizontal gradient value of 11.7 and a vertical gradient value of 10. This process needs to be performed in parallel in the corresponding numbered image partitions on the left and right sides. Each partition obtains an independent average gradient value for the RGB three channels and also needs to determine the gradient change trend. That is, based on the image coordinate axis direction, the direction of the increase or decrease in value from left to right or from top to bottom is determined, and the main change direction identifier of each partition is recorded. The direction identification standard is set as follows: if the channel average value gradually increases from the left edge to the right edge of the image and exceeds the set threshold of 10, it is marked as a right-rising partition; otherwise, it is a left-rising partition. If there is no regular change, it is marked as a fluctuating partition. This directionality judgment is based on a row-by-row or column-by-column comparison process between multiple pixel pairs. When the number of image partitions is 12, a color gradient spatial distribution sequence composed of 12 sets of structures is formed. Each set of data contains the average gradient values ​​of the RGB three channels in the horizontal and vertical directions and the main change direction identifier.

[0033] S312: Based on the color gradient spatial distribution sequence, compare the gradient change rates of the same numbered partitions on the left and right sides of the body, filter out partitions with different guidance, optimize the spatial order of gradient changes, and label the different spatial numbers to obtain the color gradient guidance label set. The spatially numbered partitions in the left and right images of the cow are compared one-to-one. The difference between the average horizontal and vertical gradients of the RGB channels in each pair of partitions is calculated. A threshold of 15 is set as the criterion; if the gradient difference between channels exceeds this value, it is considered a significant difference in that channel. The total number of channel differences in that partition is then determined. If two or more of the RGB channels meet the above condition, it is determined that there is a directional difference in color gradient between the left and right sides of the partition. The spatial number of this partition is recorded as the potential difference partition number. For example, partition number 5 has horizontal gradients of 10, 12, and 15 in the RGB channels on the left, and the corresponding channel on the right has 3. 0, 29, 35, and channel differences of 20, 17, 20 respectively, all greater than the threshold of 15, are labeled as difference partitions. Then, all the selected difference partitions are rearranged according to their coordinates in the image. The sorting logic is to adjust the numbering from top to bottom and left to right in the image so that subsequent image annotations can be processed in batches in sequence. At the same time, the main channel change direction of each partition is recorded. That is, if the channel value of a certain channel gradually increases from left to right, the direction is recorded as right-ascending in that partition. During the annotation process, the spatial number of the confirmed channel change difference is combined with its corresponding direction information to form a label. The label is then attached to the original image annotation layer to generate a color gradient guided annotation set.

[0034] S313: Based on the color gradient-guided annotation set, calculate the channel gradient change rate of each partition, analyze the difference in normalized rates, and use the following formula: ; Optimize the partition offset factor, adjust the sorting results, and obtain the partition gradient-first index, where... Indicates the first The color gradient distribution offset factor for each image region is used to describe the relative offset of the color gradient changes on the left and right sides of that region. Indicates the first The rate of change of the aggregated color gradient in the channel corresponding to the left side of the cow's body. Indicates the first The rate of change of the aggregated color gradient in the channel corresponding to the right side of the cow's body. This indicates the difference in the rate of color gradient change between the left and right sides of the body at this location. This represents the combination of color gradient change rates on the left and right sides at this partition location, used to normalize rate differences. The color gradient distribution offset factor refers to the index obtained by normalizing the difference analysis of the color gradient change rates between the left and right sides of a cow's body under the same spatial partition number. This factor is used to quantitatively reflect whether there is a spatial distribution offset in the color gradient change trend of the left and right sides of the current partition. The closer its value is to zero, the more consistent the color gradient distribution of the left and right sides of the partition is. The larger its value is, the more obvious the spatial offset of the color gradient distribution of the left and right sides of the partition is.

[0035] For each labeled partition, calculate the rate of change of the channel aggregated color gradient at the corresponding position in the left and right images of the cow, and denot them as follows: and This rate originates from the three-channel average gradient synthesis calculation completed in the previous steps, with units of pixel grayscale difference per pixel length. Min-max normalization is performed to unify the units. Taking three labeled partitions numbered D21, D24, and D33 as examples, their original channel aggregated gradient rate data are as follows: , ; , ; , ; The maximum value among all the above rate data is 18.6, and the minimum value is 9.4. Standardization was performed using the least-maximum normalization method, and the normalized results are as follows: , ; , ; , ; Substituting the normalized parameters into the formula, we perform the partition offset factor calculation. First, we calculate the offset factor for partition D21. The formula expands to: ; Calculate for partition D24: ; Calculate for partition D33: ; The formula constructs a standardized offset intensity index by introducing a structural symmetry normalization ratio, and amplifies weak differences through a square root function, thereby achieving a quantitative description of the gradient distribution differences between the left and right body surface channels and enhancing the response performance of the offset region in image recognition.

[0036] Range of offset factor Divided into three logical sections, each representing the degree of offset in the symmetry of the color gradient structure: The first interval is 0.8 < ≤1, the image partition corresponding to this interval is determined to be a high-off region, indicating that the color gradient structure of this region on the left and right sides of the body is extremely different and the spatial distribution shows obvious asymmetric features, and should be the highest priority processing target; The second interval is 0.5 < If the value is ≤0.8, the corresponding image region is determined to be a moderately offset region, indicating that there is a certain offset in the color gradient change of the left and right body surfaces, but it has not reached an extreme degree of asymmetry and belongs to the medium priority processing range. The third interval is 0≤ If the value is ≤0.5, the corresponding image region is determined to be a low-offset region, indicating that the color gradient structure of the left and right sides in this region is relatively similar and there is no significant symmetry disruption. It can be processed later or not included as the main target region in the analysis.

[0037] The calculation results are then used for interval determination, where the offset factor for partition D33 is... It falls into the first interval and is determined to be a height offset region; the offset factor for partition D24 is... Falling into the first interval, it is also judged as a height offset area; the offset factor of partition D21 is... It falls into the second interval and is judged to be in a moderately offset region. This result indicates that the offset factor... The value not only provides a measure of color structure shift, but also the interval in which it is located directly determines the priority level of the image partition. This ranking is then organized into a partition gradient priority index.

[0038] Please see Figure 5 The specific steps for obtaining abnormal feature quantities in the behavior space are as follows: S411: Based on the partition gradient priority index, analyze the continuous spatial coordinates of cattle in the movement area, number the coordinate set of each cattle in the same time period, calculate the sequence of movement trajectory points in the order of timestamps, and collect the cattle number and corresponding coordinate information to obtain the individual trajectory sequence. Continuous temporal monitoring of the movement areas covered in the pasture is conducted. Video positioning or infrared tracking sensors deployed at cattle shed entrances, passageways, and fence boundaries are used to extract the spatial coordinate data of each cow within the monitoring period. Each individual is uniquely identified and associated with its collected spatial coordinates, arranged chronologically from morning to night by timestamp, forming a sequence of positional changes for each individual within a specified time period. Each data set includes a timestamp, individual number, and spatial coordinate values. The data is stored in a structured list. For example, cow number A034 records a coordinate every 2 seconds between 9:00 AM and 9:10 AM; its trajectory list contains 300 consecutive coordinate points, each recorded as... Recorded as (time: 9:00:00, x: 1.20 meters, y: 3.40 meters), etc., by traversing all cattle numbers and grouping them according to the same time period, the movement trajectory sequence corresponding to each individual is constructed. For cases where some data is missing (e.g., due to occlusion causing location loss), the missing segments are interpolated to supplement them. Linear interpolation is only performed when the missing point is less than 3 consecutive frames. If it exceeds 3 frames, the segment is marked as an invalid trajectory segment and is not included in the trajectory statistics. Then, the coordinate points in the trajectory are numbered sequentially from 1 to N, and a complete mapping list of the number and trajectory information of each cattle is constructed. The data is then summarized to form a set of numbers and spatial coordinates of all cattle in the movement area, thus completing the collection of individual trajectory sequences.

[0039] S412: Based on individual trajectory sequences, compare the trajectory points of each cow with the average coordinates of the group during the same time period to calculate the spatial distance difference, using the following formula: ; By determining the degree of difference between the trajectories of each cattle and the herd, a spatial offset distance sequence is obtained, where, Indicates cattle In time Spatial offset distance, Indicates cattle In time The horizontal spatial coordinates, Indicates time The average lateral spatial coordinates of all cattle in the herd. Indicates cattle In time The vertical spatial coordinates, Indicates time The average of the longitudinal spatial coordinates of all cattle in the herd; Spatial offset distance refers to the Euclidean distance between the spatial coordinates of each cow at a certain moment and the average spatial coordinates of the group of cows at the same moment. Specifically, spatial offset distance reflects the actual degree of spatial deviation between an individual cow and the center of the group. It is a quantitative indicator describing the spatial consistency of the behavior of a single cow relative to the behavior of the entire group. The larger the distance, the greater the dispersion of the cow's activity position from the overall position of the group at that time. Extract the lateral spatial coordinates of cattle A, B, and C within the same time segment. with vertical spatial coordinates Each constitutes a set , ; The original coordinate values ​​were processed using range normalization: The maximum value in the horizontal direction is 17.1, and the minimum value is 15.7, corresponding to the normalized values: ; ; ; The maximum value in the vertical direction is 35, and the minimum value is 32.9, corresponding to the normalized values: ; ; ; The normalized coordinates of the three individuals are summed, and the population mean coordinates are calculated: ; ; Substitute them into the spatial offset distance formula respectively: Perform distance calculations for each cow: The spatial offset distance of cow A is: ; Cow B is: ; Cow C is: ; The reference interval was established using sample statistical analysis. Based on the normalized spatial offset distance of all cattle at the same time segment each day in the historical 7-day herd behavior data, the mean of the overall sample was calculated. Standard deviation is Therefore, the reference range for judgment is set as follows: ; This interval is divided into three behavior determination segments based on the standard floating setting: If the offset distance If the individual cattle are in a highly consistent behavior range, it means that their movement behavior completely matches the group's trajectory. If the offset distance If the behavior is within a certain range, it is considered a stable behavioral range, indicating that the individual's behavior is well consistent with the group's behavior. If the offset distance If the value is within the behavioral deviation range, it indicates that the cow is significantly deviated from the group in terms of spatial location.

[0040] The offset value of cow A is 0.0927, which falls within the high consistency behavior range, indicating that it is very close to the group's location; The offset value of cow B is 0.7197, which exceeds the upper limit and falls within the behavioral offset range, indicating that it is far from the group center. The offset value of cow C is 0.6976, which also exceeds the upper limit, and is judged to be a behavior offset state.

[0041] By accumulating offset behavior labels in time segments, a temporal judgment vector is formed, and finally a spatial offset distance sequence for individual cattle is constructed. This sequence serves as an input indicator to participate in anomaly identification and location status determination, affecting the generation structure and content of subsequent behavioral spatial anomaly feature quantities.

[0042] S413: Based on the spatial offset distance sequence, individuals that differ from the spatial reference interval are screened. Based on the spatial coordinates of the individuals in each time period, the position of the cattle in the movement area is determined, and the spatial abnormality feature quantity of behavior is obtained. The system reads the spatial coordinates of each cow recorded within a continuous time period, compares the individual's current coordinates with the spatial reference center point formed by the average position of the group within the corresponding time period, and measures the positional deviation based on the Euclidean distance between the coordinate points. The spatial distance of each coordinate point is calculated against the reference center value. If, within a certain time period, the distance between a cow and the group center exceeds the upper limit of a set reference interval, it is considered a behavioral deviation. The reference interval is set as the average radius of normal group activity plus the standard deviation multiplied by 1.5. For example, if the average group activity radius is 3.0 meters and the standard deviation is 0.5 meters, then the upper limit of the reference interval is set to 3.75 meters. If an individual's deviation is 4.2 meters, it exceeds this interval and is recorded as an anomaly. This judgment logic is repeated to iterate through the entire range. In time segments, if the same cow is marked as out of reference range three times consecutively, the cow as a whole is marked as an individual with deviant behavior, and its coordinates at all abnormal moments are recorded. In addition, spatial location clustering is performed on the deviation coordinates. If they are concentrated at the outer edge of the movement area, they are judged as edge behavior characteristics. If they are distributed in a specific fence dead corner area, they are marked as corner behavior. If they deviate from the group in a specific direction, the direction identifier is further recorded, such as eastward or southward. Through the above processing, various abnormal spatial location manifestations are summarized and combined to form the behavioral spatial abnormality feature quantity of the cow in the movement area. The output results are marked with individual number, number of deviations, deviation type, spatial orientation information and abnormal coordinate distribution characteristics.

[0043] Please see Figure 6 The specific steps for obtaining the spatial identification results of risk intervention are as follows: S511: Based on the abnormal spatial features of behavior, analyze the spatial trajectory of each cow in the movement area, determine the distribution of spatial offset points in the trajectory according to the matching relationship between the spatial trajectory and the activity area, mark the spatial areas where the activity trajectory deviates from the normal activity distribution, and obtain the spatial distribution data of abnormal behavior. Based on the identified individual numbers and their corresponding offset coordinates, the continuous trajectory data of each cattle within the monitoring time period is read sequentially. The spatial locations of the offset points marked in the trajectory sequence are extracted and mapped to a preset movement area spatial grid. Following a unit grid division logic, each spatial grid unit is defined as an area of ​​2 meters × 2 meters. All abnormal coordinate points are collected and statistically analyzed according to their grid unit numbers. The cumulative number of abnormal trajectory points within each grid unit is analyzed, and a distribution marking threshold is set where a spatial area with more than 20 cumulative abnormal point occurrences is considered an abnormal concentration area. For example, in the time period from 9:00 AM to 10:00 AM, areas numbered C112, C097, and C097 would be considered abnormal concentration areas. If three cows exhibit multiple instances of offset behavior within the same movement area in grid cell X15Y07, with a cumulative coordinate count of 28, then this grid cell is marked as an abnormal region. Further analysis is conducted based on the continuity of individual trajectories to determine whether abnormal path connections have been formed, i.e., to determine whether there is connectivity between abnormal coordinate points in multiple consecutive grids. If there are consecutive abnormal points in three or more adjacent grids, they are classified as a region chain, and the boundary of the smallest rectangle covering it is taken as the boundary range of the abnormal behavior region. At the same time, the cow numbers, offset time periods, spatial coordinate point sets, and coverage area values ​​of the abnormal behavior in this region are recorded, and the data is organized into a structured dataset, i.e., spatial distribution data of abnormal behavior.

[0044] S512: Based on the spatial distribution data of abnormal behavior, combined with the outline information of the infected area and the zoning gradient priority index, optimize the labeling method of each spatial coordinate in the cattle shed and movement area, adjust the arrangement order of each spatial zoning label, unify the zoning coordinate and risk level marking process, and obtain spatial distribution labeling information. The system retrieves boundary data of all abnormal regions from the infection area contour information and compares them with the spatial distribution using two-dimensional coordinates. Overlapping regions are marked, and the grid numbers of the overlapping areas are recorded. Then, the system reads the corresponding partition number, gradient direction, and weight priority parameters from the partition gradient priority index. These parameters are matched according to the degree of regional overlap. For regions where all three types of information overlap—namely, areas with concentrated behavioral anomalies, thermal anomaly contour coverage, and spatial blocks where the color gradient direction matches the risk characteristics—these are uniformly designated as priority labeling target regions. The labeling level field is then reset based on the original spatial label for these regions. In the arrangement of spatial partition labels, priority is given to regions with high risk level. The data is sorted from lowest to highest based on a weighted total score of behavior offset frequency, hotspot coverage, and color gradient difference. A baseline total score of 80 is set. In the actual example, if a certain partition A has a behavior frequency of 24 times, corresponding to a score of 30, a thermal anomaly area coverage score of 35, and a color gradient direction offset score of 25, then the total score is 90, exceeding the baseline. This space is marked as a high-risk area with a labeling level of Level 1. In the spatial coordinate labeling process, the coordinate labeling format is uniformly adopted as (region number, risk level, location center point). All sorted regions are re-generated into an index list for reference by downstream processing programs, and the updated spatial distribution labeling information is output.

[0045] S513: Based on spatial distribution labeling information, identify the coordinate characteristics and abnormal behavior markers of each spatial unit, integrate the numbering and spatial coordinate correspondence of the labeled spaces, identify the spatial areas that need intervention and label them with numbers, and obtain the risk intervention spatial identification results; Coordinate data is extracted from all marked areas, and the center point coordinates are matched and organized with the number information to establish a one-to-one correspondence between the number and the spatial location. Based on this, the abnormal behavior marking content of each area is read item by item to determine whether it meets the intervention conditions. The judgment criteria are that the number of abnormal trajectory points accumulated in the area during the monitoring period exceeds 30, or the thermal anomaly boundary overlap rate exceeds 50% and the color gradient difference direction deviation intensity is higher than a set threshold. If either of these conditions is met, the area is identified as an area that needs to be subject to risk intervention. For example, if the area numbered G18 has accumulated 42 behavioral deviation points in the past 24 hours, the thermal anomaly contour overlap area accounts for 67%, and the color gradient R channel deviation direction angle is greater than 30 degrees, then the area meets the intervention identification conditions. Then, the area number, spatial boundary coordinates, center location, partition label, and risk level field are combined into structured identification information, and this information is added to the intervention spatial area list, and the unified output is the risk intervention spatial identification result.

[0046] An image recognition-based disease prevention and control system for dual-purpose (dairy and beef) cattle, comprising: The thermal anomaly extraction module is based on an infrared thermal imager in the cattle shed channel. It analyzes the surface temperature image, tracks the temperature change of pixels in consecutive frames, compares the temperature trend with the normal heat flow distribution, identifies abnormal points of temperature gradient change, and obtains abnormal mutation parameters of the surface. The infection contour construction module judges the changes in time-series temperature images based on abnormal mutation parameters on the body surface, calculates the temperature fluctuation amplitude at each inflection point at each time, filters spatial pixels with stable fluctuations, and connects them to form thermal anomaly boundaries to obtain the infection area contour information. The gradient partitioning recognition module compares the mean color gradient of the visible light image partitions on the left and right sides of the bovine body surface based on the contour information of the infected area, calculates the gradient difference between the two sides, determines the direction of color change, marks the changing areas in the partitions, and obtains the partition gradient priority index. The behavioral anomaly determination module is based on the partition gradient priority index, analyzes the spatial coordinates of cattle in the movement area, calculates the difference between the individual activity trajectory and the average trajectory of the group, judges the degree of deviation of individual behavior, locates the off-center individual, and obtains the spatial anomaly feature quantity of behavior. The risk spatial identification module optimizes the spatial information labeling of the prevention and control platform based on behavioral spatial anomaly features, combined with infection area contour information and partition gradient priority index. Based on coordinates and anomaly feature numbers, it obtains the spatial identification results of risk intervention.

[0047] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for disease prevention and control in dual-purpose (dairy and beef) cattle based on image recognition, characterized in that, Includes the following steps: S1: An infrared thermal imager based on the cattle shed passage analyzes the surface temperature image, tracks the temperature change of pixels in consecutive frames, compares the temperature trend with the normal heat flow distribution, identifies abnormal points of temperature gradient change, and obtains abnormal mutation parameters of the surface. S2: Based on the abnormal mutation parameters of the body surface, determine the changes in the time-series temperature image, calculate the temperature fluctuation amplitude at each inflection point at each time, filter the spatial pixels with stable fluctuations, and connect them to form the thermal anomaly boundary to obtain the contour information of the infected area. S3: Based on the outline information of the infected area, compare the average color gradient values ​​of the visible light image partitions on the left and right sides of the bovine body, calculate the gradient difference between the two sides, determine the direction of color change, label the change areas in the partitions, and obtain the partition gradient priority index. S4: Based on the partition gradient priority index and combined with spatial positioning data, analyze the spatial coordinates of cattle in the movement area, calculate the difference between the individual activity trajectory and the average trajectory of the group, determine the degree of deviation of individual behavior, locate the offset individual, and obtain the spatial abnormality feature quantity of behavior. S5: Based on the abnormal feature quantity of the behavior space, combined with the outline information of the infected area and the partition gradient priority index, optimize the spatial information labeling of the prevention and control platform, and obtain the spatial identification result of risk intervention according to the coordinates and abnormal feature number.

2. The method for disease prevention and control in dual-purpose (dairy and beef) cattle based on image recognition according to claim 1, characterized in that, The abnormal mutation parameters on the body surface include the location of abnormal changes, local heat distribution characteristics, and risk markers on the body surface. The contour information of the infected area includes the contour boundary line, boundary length, and area expansion range. The partition gradient priority index includes the priority partition number, the area sorting list, and the feature enhancement label. The behavioral spatial abnormal feature quantities include offset trajectory identification, spatial abnormal distribution, and behavioral clustering label. The risk intervention spatial identification results include the prevention and control area identifier number, the risk area location, and the linkage instruction type.

3. The method for disease prevention and control of dual-purpose (dairy and beef) cattle based on image recognition according to claim 1, characterized in that, The specific steps for obtaining the abnormal mutation parameters on the body surface are as follows: S111: An infrared thermal imager based on the cattle shed passage analyzes the acquired body surface temperature images, identifies the temperature changes of each pixel in the two-dimensional temperature distribution data frame of the body surface in continuous frames, tracks the temperature change trend of each pixel in each time series, and obtains the pixel temperature change sequence. S112: Based on the pixel temperature change sequence, compare the temperature change curves of adjacent pixel regions, analyze the trend difference between the pixel temperature change direction in each region and the normal distribution data of heat flow on the surface of a healthy cow, determine the spatial temperature distribution abnormality, and obtain pixel temperature trend difference information. S113: Based on the pixel temperature trend difference information, target pixels with temperature gradient change characteristics are selected, the gradient change and spatial distribution characteristics of the target region are calculated, the temperature change information of the target pixels is aggregated, and the abnormal mutation parameters of the body surface are obtained.

4. The method for disease prevention and control in dual-purpose (dairy and beef) cattle based on image recognition according to claim 1, characterized in that, The specific steps for obtaining the outline information of the infected area are as follows: S211: Based on the abnormal mutation parameters of the body surface, analyze the spatial coordinate distribution in the continuous time series body surface temperature images, determine the changing trend of each temperature curve at each time, identify the key spatial locations where the temperature change direction changes, and obtain the spatial coordinate set of the turning point. S212: Based on the set of spatial coordinates of the turning point, compare the fluctuation amplitude of each temperature curve in the continuous time series, identify the spatial coordinates that maintain stable fluctuation amplitude between adjacent time points, organize the filtered spatial positions, and obtain a set of stable spatial pixel coordinates. S213: Based on the spatial pixel stable coordinate group, adjust the spatial sorting, connect the coordinates according to the arrangement relationship in the body surface temperature image, aggregate the spatial area enclosed by the connecting lines, and obtain the outline information of the infected area.

5. The method for disease prevention and control in dual-purpose (dairy and beef) cattle based on image recognition according to claim 1, characterized in that, The specific steps for obtaining the partition gradient priority index are as follows: S311: Based on the outline information of the infected area, compare the visible light images of the left and right sides of the cattle, calculate the horizontal and vertical gradient changes of the RGB three-channel pixels within the divided spatial partitions, integrate the channel gradient results of each partition, determine the overall gradient change trend of each partition, and obtain the color gradient spatial distribution sequence. S312: Based on the color gradient spatial distribution sequence, compare the gradient change rates of the same numbered partitions on the left and right sides of the body, filter out partitions with different guidance, optimize the spatial order of gradient changes, and label the different spatial numbers to obtain a color gradient guidance label set. S313: Based on the aforementioned color gradient-guided annotation set, calculate the channel gradient change rate of each partition, analyze the normalized rate differences, and use the following formula: ; Optimize the partition offset factor, adjust the sorting results, and obtain the partition gradient-first index, where... Indicates the first Color gradient distribution offset factor for each image partition Indicates the first The rate of change of the aggregated color gradient in the channel corresponding to the left side of the cow's body. Indicates the first The rate of change of the aggregated color gradient in the channel corresponding to the right side of the cow's body.

6. The method for disease prevention and control in dual-purpose (dairy and beef) cattle based on image recognition according to claim 1, characterized in that, The specific steps for obtaining the abnormal feature quantities in the behavior space are as follows: S411: Based on the partition gradient priority index, analyze the continuous spatial coordinates of the cattle in the movement area, number the coordinate set of each cattle in the same time period, calculate the sequence of movement trajectory points according to the timestamp order, and collect the cattle number and corresponding coordinate information to obtain the individual trajectory sequence. S412: Based on the individual trajectory sequence, compare the trajectory points of each cow with the average coordinates of the group at the same time period, calculate the spatial distance difference, determine the degree of difference between the trajectory of each cow and the group, and obtain the spatial offset distance sequence. S413: Based on the spatial offset distance sequence, individuals that differ from the spatial reference interval are selected. Based on the spatial coordinates of the individuals in each time period, the position of the cattle in the movement area is determined, and the spatial abnormality feature quantity of behavior is obtained.

7. The method for disease prevention and control in dual-purpose (dairy and beef) cattle based on image recognition according to claim 1, characterized in that, The specific steps for obtaining the spatial identification results of the risk intervention are as follows: S511: Based on the abnormal behavior spatial features, analyze the spatial trajectory of each cow in the movement area, determine the distribution of spatial offset points in the trajectory according to the matching relationship between the spatial trajectory and the activity area, mark the spatial area where the activity trajectory deviates from the normal activity distribution, and obtain abnormal behavior spatial distribution data. S512: Based on the spatial distribution data of the abnormal behavior, combined with the outline information of the infected area and the partition gradient priority index, optimize the labeling method of each spatial coordinate in the cattle shed and movement area, adjust the arrangement order of each spatial partition label, unify the partition coordinate and risk level marking process, and obtain spatial distribution labeling information. S513: Based on the spatial distribution labeling information, identify the coordinate characteristics and abnormal behavior markers of each spatial unit, integrate the numbering of the labeled space with the spatial coordinate correspondence, identify the spatial area that needs intervention and label it with a number, and obtain the risk intervention spatial identification result.

8. The method for disease prevention and control of dual-purpose (dairy and beef) cattle based on image recognition according to claim 1, characterized in that, The temperature change refers to whether the temperature of adjacent pixels increases or decreases in consecutive frames or the same frame. The temperature gradient change describes the rate and direction of temperature distribution change in a certain area of ​​the body surface. The partition labeling refers to spatial labeling of key areas detected in the image.

9. A disease prevention and control system for dual-purpose (dairy and beef) cattle based on image recognition, characterized in that, The system is used to implement the image recognition-based disease prevention and control method for dual-purpose (dairy and beef) cattle as described in any one of claims 1-8, and the system comprises: The thermal anomaly extraction module is based on an infrared thermal imager in the cattle shed channel. It analyzes the surface temperature image, tracks the temperature change of pixels in consecutive frames, compares the temperature trend with the normal heat flow distribution, identifies abnormal points of temperature gradient change, and obtains abnormal mutation parameters of the surface. The infection contour construction module judges the changes in the time-series temperature image based on the abnormal mutation parameters of the body surface, calculates the temperature fluctuation amplitude of each inflection point at each time, filters spatial pixels with stable fluctuations, and connects them to form thermal anomaly boundaries to obtain the infection area contour information. Based on the outline information of the infected area, the gradient partitioning recognition module compares the average color gradient of the visible light image partitions on the left and right sides of the bovine body, calculates the gradient difference between the two sides, determines the direction of color change, marks the changing areas in the partitions, and obtains the partition gradient priority index. The behavior anomaly determination module analyzes the spatial coordinates of cattle in the movement area based on the partition gradient priority index, calculates the difference between the individual activity trajectory and the average trajectory of the group, determines the degree of deviation of individual behavior, locates the off-center individual, and obtains the spatial anomaly feature quantity of behavior. The risk spatial identification module optimizes the spatial information labeling of the prevention and control platform based on the abnormal feature quantity of the behavioral space, combined with the contour information of the infected area and the partition gradient priority index, and obtains the risk intervention spatial identification result according to the coordinates and abnormal feature number.