A multi-camera data fusion-based abnormal early warning method for cattle density
By using multi-camera data fusion and a risk mapping model, the problem of disease transmission and congestion caused by abnormal cattle density in cattle farms was solved. This enabled early warning and closed-loop optimization of risk events, reducing the incidence of risks.
Patent Information
- Application Number
- CN202511268909.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-06
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-09-06
AI Technical Summary
In beef cattle farms, traditional monitoring methods cannot monitor changes in cattle density in a timely manner, leading to increased risk of disease transmission and frequent trampling and congestion accidents. Existing solutions lack an effective early warning mechanism for risk events.
By employing multi-camera data fusion technology, a two-dimensional coordinate system is established, and the density of beef cattle within the grid is statistically analyzed. A risk mapping model is introduced, thresholds are set, and early warning signals are generated in advance. The probability of risk is quantified through a logistic regression model, and the model is optimized by combining closed-loop feedback.
It enabled real-time monitoring of cattle density changes, reduced the incidence of risk events in cattle breeding farms, and increased beef cattle output.
Smart Images

Figure CN120997463B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing, and particularly relates to a beef cattle density abnormality early warning method based on multi-camera data fusion. BACKGROUND
[0002] Multi-camera data fusion technology is a technology of aligning, extracting and reasoning images or videos of multiple cameras, utilizing the complementarity of multiple visual sources to realize cross-view synthesis and enhancement of the same target or scene. In the field of beef cattle breeding, due to the generally high density of beef cattle farms and the large range of beef cattle activities, the traditional monitoring method cannot timely monitor the density change, which easily leads to the increase of disease transmission risk, stampede and congestion accidents. On the other hand, the existing scheme lacks relationship modeling between beef cattle density change and risk events, and fails to early warn the risk events.
[0003] Based on the above consideration, the beef cattle density abnormality early warning method based on multi-camera data fusion provided by the application utilizes the multi-camera data fusion technology to establish a two-dimensional coordinate system for the beef cattle farm, divides the grid to count the beef cattle density in the grid, forms a mapping relationship and introduces model verification, sets a threshold for the risk probability and generates an early warning signal in advance, so as to effectively avoid the above problems. SUMMARY
[0004] The application provides a beef cattle density abnormality early warning method based on multi-camera data fusion, which aims to solve the problems of beef cattle density abnormality, increase of disease transmission risk and stampede and congestion accidents in beef cattle farms.
[0005] To solve the above technical problems, the application provides a beef cattle density abnormality early warning method based on multi-camera data fusion: multi-camera data fusion, establishment of a beef cattle movement model; field area spatial gridding, calculation of grid density and extraction of features; introduction of a risk mapping model to establish a mapping relationship between beef cattle density and risk probability; early generation of early warning, closed-loop feedback and model optimization.
[0006] As a preferred embodiment, the specific steps of the multi-camera data fusion are as follows: static calibration of multiple cameras, fixation of the camera position, placement of a static calibration board at different angle positions of the camera for shooting, extraction of pixel coordinates in the shooting image, input into a calibration algorithm for solution, and the calibration algorithm formula is:
[0007]
[0008] Wherein (u, v) represents the pixel coordinates, (i, j) is the global coordinates, R and T represent the rotation and horizontal parameters, f r represents the horizontal focal length, f t represents the vertical focal length, (c x , cy ) represents the principal point coordinates, s represents the pixel coordinate system slope value, and PTP protocol is enabled on the network switch and camera.
[0009] As a preferred embodiment, the specific steps of establishing a cattle movement model are as follows: selecting a field area corner point as an origin to establish a global coordinate system, restoring pixel coordinates observed by a camera to normalized coordinates in a camera coordinate system, and then converting the camera coordinates to reference coordinates in the same global coordinate system through rotation and horizontal parameters and a pixel coordinate system slope value; introducing velocity (v x , y ) and acceleration (a x , y ) motion parameters for beef cattle position changes between consecutive frames to form a state vector S(t) = [x, y, v x , y , a x , y ], record the state vector of beef cattle every 300 ms to form a state sequence S(t0), S(t1),..., S(t n ) arranged by time, wherein S(t) represents a state vector at a current t moment, generate state sequences of different beef cattle, compare beef cattle characteristic similarity, and combine spatial distance to match multi-camera shooting of the same beef cattle to form a global trajectory of the beef cattle.
[0010] As a preferred embodiment, the specific steps of field area space gridding are as follows: dividing a grid in a global coordinate system, taking an origin as a starting point, and taking 1.5 m as a unit length in each direction to form a 1.5 m*1.5 m grid; projecting an outline of beef cattle in the global coordinate system according to rectangular values, respectively counting beef cattle in different grids according to projection area ratios of beef cattle in different grids for beef cattle crossing grid units; calculating a density of each grid through grid area and beef cattle head count, and the grid density calculation formula is: grid density wherein ρ represents grid density, and Count represents beef cattle number; dividing levels according to grid density, when ρ≤0.28 head / m 2 , it belongs to a safe level, when 0.28<ρ≤0.46 head / m 2 , it belongs to a mild congestion level, when 0.46<ρ≤0.69 head / m 2 , it belongs to a moderate congestion level, and when ρ>0.69 head / m 2 , it belongs to a severe congestion level; extracting features for grid density conditions and using a characteristic value formula wherein L quality represents a characteristic value size of a grid, and ρ highThe grid density is unsafe, greater than 0.46 is unsafe, T represents time, Δρ represents grid density change range, the eigenvalue size of all grids is calculated every 120s, the values are arranged in order, and the top 20% are selected as characteristic grids.
[0011] As a preferred embodiment, the specific step of introducing the risk mapping model is: selecting a logistic regression model as the risk probability mapping model, quantifying the influence of the risk probability by using the calculation method of the weight coefficient in the logistic regression model, transparently analyzing and verifying the model decision logic, and reasoning for large-scale grid scenarios such as cattle farms through vector inner product calculation and logarithmic ratio mapping.
[0012] As a preferred embodiment, the specific step of establishing the mapping relationship between the cattle density and the risk probability is: continuously focusing on the top 20% of the characteristic grids sorted in the above step, writing all grid numbers that meet the conditions into the same characteristic grid table, and assigning a unique identifier, if a stampede, crowd disturbance or other risk event occurs within the next 5 minutes, record the time when the risk event occurs, and mark the grid data involved in the risk event as positive examples, represented by the value 1, otherwise mark as negative examples, represented by the value 0; select the grid with a marked value of 1, extract the global trajectory of all beef cattle individuals in the grid, and analyze the changes in the state vector values of the beef cattle individuals before and after the risk event; in the grid where the risk event occurs, extract each frame of image, identify each beef cattle appearing in the grid, and compare the state vectors of the same beef cattle in different time periods, clearly observe which frame before and after the risk event the movement parameters of the beef cattle have a clear change trend, and are related to the grid density at the time of the risk event; combine the speed and acceleration movement parameters with the grid density eigenvalue as sample data, combine with the marked value Label∈{0,1}, form a feature vector f(o)=[v x ,v y ,a x ,a y ,Label,L quality ,ρ], o represents the current time, and the feature vector f(o) is calculated with the weight parameter w=[w1,w2,w3,w4,w5,w6,w7], wherein w1, w2, w3, w4, w5, w6, w7 respectively represent the weight in the corresponding feature vector, and the linear score is calculated as:
[0013] z(o)=[v x ,v y ,a x ,a y ,Label,L quality ,ρ][v x ,v ya x ,a y ,Label,L quality ,ρ] T ,
[0014] As an input activation probability function, the probability function formula is Where P risk represents the probability of risk occurrence, and the probability value of risk occurrence is obtained by logit mapping; the determination range of the risk occurrence probability value is set, and when P risk <0.2, it is identified as a low probability level, when 0.2≤P risk <0.5, it is identified as a medium probability level, and when P risk ≥0.5, it is identified as a high probability level.
[0015] As a preferred embodiment, the specific steps of the early warning generation are: P risk ≥0.2 is considered to be manually processed, the risk probability of the grid is viewed by the staff in real time through the intelligent large screen, and the high probability level grid is marked with red, the medium probability level grid is marked with orange, and the low probability level grid is marked with yellow; the warning event is recorded and written into the database, the feedback function is set on the mobile terminal, the on-site personnel updates the state according to the disposal situation, and the early warning closed loop is completed.
[0016] As a preferred embodiment, the specific steps of the closed loop feedback and model optimization are: deploying automatic log grabbing, combining the early warning information in the database with the disposal situation fed back by the on-site personnel, scoring the risk probability given by the risk mapping model, calculating the risk hit rate, counting the false positive or false negative situation in the cattle farm, and iteratively optimizing the model.
[0017] The beneficial effects of the present application are:
[0018] 1. Fusion of multi-camera data, conversion of cow group pixel information into a unified coordinate system through high-precision calibration and clock synchronization, covering the field area without dead angle, realizing real-time monitoring of the density change of the cow group.
[0019] 2. Introducing a risk mapping model, mapping the grid density characteristics into a risk probability, realizing quantitative connection, early warning of risk events, reducing the risk event occurrence rate of the cattle farm, and improving the beef cattle output. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 It is a kind of cow group density anomaly early warning method based on multi-camera data fusion. DETAILED DESCRIPTION
[0021] In order to make the technical means, creative features, purposes and effects of the present application easy to understand, the following further describes the present application in combination with specific embodiments, but the following embodiments are only preferred embodiments of the present application, not all. Based on the embodiments in the embodiments, other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0022] Embodiment 1, as Figure 1 A multi-camera data fusion-based abnormal early warning method for cattle density, first uses multi-camera data fusion technology to convert cattle pixel data into two-dimensional coordinates to form beef cattle global motion trajectory, divides the field area according to grid units, calculates the density of each grid, and according to the density size, determines the crowded degree, calculates the characteristic value of the grid, introduces the logistic regression model, monitors the grid with high characteristic value and labels, combines the grid data and global motion trajectory, calculates the risk probability, makes early warning arrangement according to the risk probability level, and re-trains the model to complete the closed-loop iteration. The specific implementation steps are as follows:
[0023] Step one, multi-camera data fusion, establish cattle movement model;
[0024] Step two, field space gridding, calculate grid density and extract features;
[0025] Step three, introduce risk mapping model, establish the mapping relationship from cattle density to risk probability;
[0026] Step four, generate early warning in advance, closed-loop feedback and model optimization;
[0027] A multi-camera data fusion-based abnormal early warning method for cattle density, multi-camera data fusion, establish cattle movement model, wherein the specific steps of multi-camera data fusion are: static calibration of the cameras in the cattle breeding farm, first fix the set camera position, place the static calibration board at different angle positions of the camera for shooting, then extract the pixel coordinates in the shooting image, input into the calibration algorithm for solving, the calibration algorithm formula is:
[0028]
[0029] Where (u, v) represents the pixel coordinates, (i, j) is the global coordinates, R and T represent the rotation and horizontal parameters, f r represents the horizontal focal length, f t represents the vertical focal length, (c x , c y) represents the principal point coordinates, s represents the pixel coordinate system slope value, and the parameters obtained by solving are used to fuse the shooting data of multiple cameras in a unified global coordinate system, so as to minimize the spatial alignment error and improve the overall accuracy and robustness of target positioning, data extraction and risk warning; the PTP protocol is enabled on the network switch and the camera, so that the frame timestamps of the multiple camera system can be consistent, laying a foundation for subsequent time alignment and accurate density monitoring; the specific steps of establishing the cow movement model are as follows: selecting the field area corner point as the origin, establishing a global coordinate system, restoring the pixel coordinates observed by the camera to the normalized coordinates in the camera coordinate system to obtain a view direction on the image plane, and then converting the camera coordinates to the reference coordinates (x, y) in the same global coordinate system through rotation and horizontal parameters and the pixel coordinate system slope value, introducing the velocity (v x ,v y ) and acceleration (a x ,a y ) motion parameters of the beef cattle between consecutive frames to form a state vector S(t) = [x, y, v x ,v y ,a x ,a y ], and recording the state vector of the beef cattle every 300 ms to form a state sequence S(t0), S(t1)....S(t n ) arranged by time, wherein S(t) represents the state vector at the current time t, generating the state sequence of different beef cattle, comparing the beef cattle feature similarity, and matching the multiple camera shooting of the same beef cattle to form the global trajectory of the beef cattle.
[0030] Based on the above steps, the specific steps of the field area space gridding are as follows: dividing the grid with the global coordinate system, wherein the origin selected in the above steps is the starting point, each direction is 1.5 m in length, and a 1.5 m*1.5 m grid is formed; after confirming the grid size, the installation height and viewing angle of each camera are adjusted before data fusion, and 10 grid units in the field of view are ensured to be covered; taking an adult beef cattle as an example, the body length is about 1.8 m to 2.2 m, the shoulder width is about 0.5 m to 0.8 m, and the approximate projection of the outer contour is roughly rectangular, and the projection area in the global coordinate system is about 0.9 m 2 to 1.8 m 2 ; in consideration of simplicity and accuracy, 1.3 m 2 is taken as the average value of the beef cattle projection area, and the area of one grid unit is 2.25 m 2 ; when a cow is in two or more grids, the number of beef cattle in different grids is counted according to the ratio of the projection area of the cow in different grids to the average value of the beef cattle projection area; the specific steps of calculating the grid density and extracting the features are as follows: the density in the grid wherein ρ represents the grid density, Count represents the number of beef cattle; it is generally considered that the case of one beef cattle in two grids is normal, the projection area of one beef cattle is 1.3 m 2 , the area of two grids is 4.5 m 2 , and the grid density is calculated to be ρ = 0.28 head / m 2 , one beef cattle in one grid is mild crowding, and the grid density is calculated to be ρ = 0.46 head / m 2 , three beef cattle in two grids is moderate crowding, and the grid density is calculated to be ρ = 0.69 head / m 2 , the grid density is divided into levels according to the grid density, when ρ ≤ 0.28 head / m 2 , it belongs to the safe level, when 0.28 < ρ ≤ 0.46 head / m 2 , it belongs to the mild crowding level, when 0.46 < ρ ≤ 0.69 head / m 2 , it belongs to the moderate crowding level, and when ρ > 0.69 head / m 2 , it belongs to the severe crowding level; the grid density is extracted as a feature, and the characteristic value formula is used, wherein L quality represents the characteristic value size of the grid, ρ high represents the unsafe grid density, greater than 0.46 is unsafe, T represents time, and Δρ represents the grid density change amplitude, the characteristic value size of all grids is calculated every 120 s, and the values are arranged in order, because in many risk monitoring or event distribution scenarios, about 80% of risk events tend to concentrate in the most serious 20% area, therefore, the first 20% of the characteristic grids are selected, which can greatly reduce false positives and resource waste while maintaining high recall rate.
[0031] Based on the above steps, the specific steps of introducing the risk mapping model are: selecting a logistic regression model as the risk probability mapping model, because the logistic regression model has a weight coefficient calculation method, which can directly quantify the influence of the risk probability, and can analyze and verify the model decision logic transparently. On the other hand, the logistic regression contains vector inner product calculation and logarithmic ratio mapping, which is suitable for reasoning in large-scale grid scenarios such as cattle farms. The output of the logistic regression has lower requirements for the number and accuracy of training data, and the probability value can be directly used for risk classification and threshold judgment without calibration. Compared with other models, it can be periodically and quickly retrained and updated during operation when adapting to the cattle farm scene, meeting the comprehensive needs of performance, reliability and engineering implementation; The specific steps of establishing the risk probability mapping relationship of the cattle density are: continuously focusing on the top 20% of the feature grids in the above steps, writing all the grid numbers that meet the conditions into the same feature grid table, and assigning a unique identifier. Within 5 minutes, if a stampede, group disturbance or other risk event occurs, record the time when the risk event occurs, and mark the grid data involved in the risk event as positive examples, represented by the value 1, and vice versa. Marked as negative examples, represented by the value 0; Select the grid with a marked value of 1, extract the global trajectory of all beef cattle individuals in the grid, and analyze the changes in the state vector values of beef cattle individuals before and after the risk event. Specifically: in the grid of the risk event, extract each frame of image, identify each beef cattle appearing in the grid, and compare the state vectors of the same beef cattle in different time periods. Observe which frame before and after the risk event has a clear trend of change in the motion parameters of the beef cattle, and is related to the grid density at the time of the risk event, so as to have a specific numerical relationship between the risk event and the global motion trajectory of the beef cattle; Combine the speed and acceleration motion parameters with the grid density feature value as sample data, combine with the marked value Label∈{0,1}, form a feature vector f(o)=[v x ,v y ,a x ,a y ,Label,L quality ,ρ],o represents the current time, and the feature vector f(o) is calculated with the weight parameter w=[w1,w2,w3,w4,w5,w6,w7], wherein w1, w2, w3, w4, w5, w6, w7 respectively represent the weight in the corresponding feature vector, which can be adjusted according to actual production. The linear score is calculated as:
[0032] z(o)=[v x ,v y ,a x ,a y ,Label,L quality ,ρ][vx ,v y ,a x ,a y ,Label,L quality ,ρ] T ,as the input activation probability function, the probability function formula is where P risk represents the probability of risk occurrence, and the probability value of risk occurrence is obtained by logit mapping; in the process of model training and iteration, the cumulative distribution analysis of risk probability, the risk event occurrence has obvious interval demarcation at 0.2 and 0.5, so the determination range of risk probability value is set, when P risk <0.2, it is identified as low probability level, and the subsequent situation of the grid is real-time concerned, if it exceeds 10 min, the grid risk probability does not decrease but increases, the on-site staff can be arranged to check, when 0.2≤P risk <0.5, it is identified as medium probability level, the on-site staff needs to be arranged to check, when P risk ≥0.5, it is identified as high probability level, the terminal equipment needs to be linked, and the early warning signal is generated in the field area in time, and the regional staff is notified to intervene.
[0033] Based on the above steps, the specific steps of generating early warning in advance are: P risk ≥0.2 is considered to be handled by artificial, therefore, a smart large screen is installed in the cattle farm, the staff can check the risk probability of the grid in real time, and the high probability level grid is marked with red, the medium probability level grid is marked with orange, and the low probability level grid is marked with yellow; when orange or red early warning occurs, the response animation prompt is made in the smart large screen grid, and the grid trajectory is drawn on the mobile terminal device, so that the staff can go to the grid to dispose the early warning; the electric gate or controllable feed baffle is configured at the common passage of the cattle herd, and the electric gate or controllable feed baffle is automatically lifted or closed when the early warning is triggered, so as to forcibly disperse the herd and reduce congestion; the early warning event is recorded and written into the database, and the feedback function is set on the mobile terminal, so that the on-site staff can update the state in time according to the disposal situation, and complete the early warning closed loop; the specific steps of closed loop feedback and model optimization are: deploying automatic log grabbing, combining the early warning information in the database with the disposal situation fed back by the on-site staff, so as to score the risk probability given by the risk mapping model, calculate the risk hit rate, and at the same time, the false positive or false negative situation in the cattle farm is counted, when the false positive or false negative rate continues to rise, the model needs to be rechecked or the risk threshold needs to be adjusted.
[0034] Embodiment 2, based on the above embodiment 1, the abnormal early warning method of cattle herd density based on multi-camera data fusion is optimized, and the specific scheme is as follows:
[0035] Step one, multi-camera data fusion, establish the movement model of the cattle herd, unify the contents of multi-camera shooting to the same ground reference plane, use the perspective change matrix to convert the pixel coordinates of shooting to the two-dimensional coordinates of the ground, record the position of each beef cattle in the image, calculate the average speed and acceleration and other motion parameters using the sliding window, construct the sequence curve of beef cattle movement trajectory, and combine with the LSTM (long short-term memory network) prediction to establish the fitting model;
[0036] Step two, field area spatial gridding, calculate the grid density and extract features, take the beef cattle position as the seed point, construct the Voronoi diagram, divide the field area into dynamic areas centered on the beef cattle, specifically, dynamically adjust the grid size according to the beef cattle frequency and high-density aggregation area; build a time series heat map, superimpose the beef cattle frequency calculation, make the grid density smooth through time weighting, and extract the heat evolution trend as a characteristic value for the next step;
[0037] Step three, introduce a risk mapping model, establish the mapping relationship between the density of the cattle herd and the risk probability, select a risk level evaluation model based on fuzzy logic, no longer regard the input density and the output risk as specific numerical values, divide them into fuzzy sets, fuzz the data such as high density and fast flow rate change as input features, construct fuzzy rules, determine the risk through the fuzzy rule set, and finally directly output the risk level instead of the probability;
[0038] Step four, generate early warning, closed-loop feedback and model optimization, automatically adjust the grid density and the threshold value of risk level division according to environmental parameters such as weather, time period, and beef cattle behavior characteristics, realize dynamic setting of the threshold value, after giving the risk level, only push the high risk level to the on-site staff for confirmation, and provide information such as historical beef cattle movement trajectory and grid density map to help determine, and the rest of the levels are dispersed and physically isolated by automatic equipment for the high-density grid of beef cattle.
[0039] The above describes the embodiments of the present application, without departing from the embodiments of the present application and its broader aspects, in the specific operation, the skilled in the art can make data modification and mode change based on this place, the appended claims are for all such data modification and mode change not departing from the embodiments of the present application.
Claims
1. A multi-camera data fusion-based cattle herd density anomaly early warning method, characterized in that: Multi-camera data fusion, establish a cattle herd movement model, fuse multi-camera shooting data, convert global coordinates through static calibration, model and analyze beef cattle movement trajectory; Field area space gridding, calculate grid density and extract features, divide the field area space by grid, calculate grid density, and analyze grid density calculation characteristic value; Introduce risk mapping model, establish the mapping relationship between cattle herd density and risk probability, select logistic regression model, use weight coefficient calculation method to quantify risk probability, count grid with high characteristic value, label grid, combine feature vector and motion parameters to generate sample data to train model, calculate risk probability using probability function, and divide risk probability level; Early warning, closed-loop feedback and model optimization, generate early warning signal according to risk probability level, calculate model risk hit rate, and iteratively optimize model.
2. The method according to claim 1, characterized in that: The specific steps of the multi-camera data fusion are: static calibration of multiple cameras, fixing the position of the camera, placing a stationary calibration board at different angles of the camera for shooting, extracting the pixel coordinates in the shooting image, inputting into the calibration algorithm for solving, and the calibration algorithm formula is: , where (u, v) represents pixel coordinates, (i, j) is a global coordinate, R and T represent rotation and horizontal parameters, denotes a horizontal focal length, denotes a vertical focal length, , ) denotes a principal point coordinate, s denotes a pixel coordinate system slope value, and PTP protocol is enabled on a network switch and a camera; The specific steps of establishing the cattle herd movement model are: selecting the field area corner point as the origin to establish a global coordinate system, restoring the pixel coordinates observed by the camera to the normalized coordinates in the camera coordinate system, and then converting the normalized coordinates of the camera coordinates to the reference coordinates in the global coordinate system through rotation and horizontal parameters and the slope value of the pixel coordinate system.
3. The method according to claim 2, wherein the method is characterized in that: The specific steps of establishing the cattle movement model further include introducing the beef cattle speed of position change between continuous frames and acceleration movement parameters, forming a state vector , recording the state vector of the beef cattle every 300 ms, forming a state sequence arranged in time , wherein represents the state vector at the current t moment, generating the state sequence of different beef cattle, comparing the beef cattle characteristic similarity, and combining the spatial distance to match the multi-camera shooting of the same beef cattle, forming the global trajectory of the beef cattle.
4. The method according to claim 1, characterized in that: The specific steps of the field area spatial gridding are as follows: dividing a grid in a global coordinate system, taking an origin as a starting point, and forming a grid with 1.5 m as a unit length in each direction In the global coordinate system, the outer contour of the beef cattle is projected and valued as a rectangle, and for the beef cattle crossing the grid unit, the beef cattle are respectively counted into different grids according to the projection area proportion of the beef cattle in different grids. The specific steps of calculating the grid density and extracting the features are as follows: the density of each grid is calculated by the ratio of the grid area to the number of beef cattle, and the density calculation formula in the grid is as follows: grid density wherein denotes the grid density, and Count denotes the number of beef cattle.
5. The method according to claim 4, characterized in that: The specific steps of calculating the grid density and extracting features further include: according to the grid density classification level, when 0.28 heads / m2, belonging to the safe level, when 0.28 0.46 heads / m2, belonging to the light congestion level, when 0.46 0.69 head / m2, belongs to the moderate crowded level, when head / m2, belongs to the severe crowded level; the feature value formula is used to extract the feature of the grid density , wherein represents the feature value size of the grid, represents the unsafe grid density, greater than 0.46 is unsafe, T represents time, represents the grid density change amplitude, the feature value size of all grids is calculated every 120 s, arranged according to the numerical value, and the first 20% of the feature grids are selected.
6. The method according to claim 1, characterized in that: The specific steps of introducing the risk mapping model are: selecting a logistic regression model as the risk probability mapping model, quantifying the influence of risk probability using the weight coefficient calculation method in the logistic regression model, transparently analyzing and verifying the model decision logic, and reasoning the large-scale grid scene of the beef cattle farm through vector inner product calculation and logarithmic ratio mapping; The specific steps of establishing the mapping relationship between cattle herd density and risk probability are: continuously monitoring the top 20% of the characteristic grids in the above step, writing all grid numbers that meet the conditions into the same characteristic grid table, and assigning a unique identifier, if a stampede, crowd disturbance or density congestion risk event occurs within the next 5 minutes, record the time when the risk event occurs, and mark the grid data involved in the risk event as positive examples, represented by the value 1, otherwise mark as negative examples, represented by the value 0; Select the grid with a marked value of 1, extract the global trajectory of all beef cattle individuals in the grid, and analyze the changes in the state vector values of beef cattle individuals before and after the risk event.
7. The method according to claim 6, characterized in that: The specific steps of establishing the mapping relationship between cattle herd density and risk probability also include: in the grid where the risk event occurs, extract each frame of image, identify each beef cattle appearing in the grid, take 50s before and after the risk event as the comparison space, compare the state vectors of the same beef cattle in the data, record the risk event timestamp, and observe the change trend of beef cattle motion parameters.
8. The method according to claim 6, characterized in that: The specific steps of establishing the mapping relationship of the cattle population density to the risk probability further include: combining the speed and acceleration motion parameters with the grid density characteristic value as sample data, and combining the sample data with the marked value to form a characteristic vector , o represents the current time, respectively represent the speed in the x and y axis directions, represent the acceleration in the x and y axis directions, represent the characteristic value size of the grid, represent the grid density, and the characteristic vector is calculated with a weight parameter to obtain a linear score, wherein respectively represent the weight in the corresponding characteristic vector, and the linear score is calculated. , As the input activation probability function, the probability function formula is wherein represents the risk occurrence probability, and the probability value of the risk occurrence is obtained by the logit mapping; dividing the risk occurrence probability value into decision levels, when <0.2 is identified as a low probability level, when 0.2 <0.5 is identified as a medium probability level, when 0.5 is identified as a high probability level.
9. The multi-camera data fusion-based abnormal early warning method for cattle density according to claim 1, characterized in that: The specific steps of the early generation of the early warning are as follows: 0.2 is considered to be manually handled, wherein The risk probability is represented, the staff can view the risk probability of the grid in real time through the intelligent large screen, and the grid with high probability level is marked with red, the grid with medium probability level is marked with orange, and the grid with low probability level is marked with yellow; the record of the early warning event is written into the database, the feedback function is set in the mobile terminal, the on-site personnel updates the state according to the disposal situation, and the early warning closed loop is completed.
10. The method of claim 1, wherein the method comprises: The specific steps of the closed-loop feedback and model optimization are: deploying automatic log grabbing, combining the early warning information in the database with the disposal conditions fed back by the on-site personnel, scoring the risk probability given by the risk mapping model, calculating the risk hit rate, counting the false positive or false negative conditions in the calf ranch, and iteratively optimizing the model.
Citation Information
Patent Citations
Crowd flow multidirectional counting method based on computer vision technology
CN117351408A
Quantification and early warning analysis method for high-density crowd trampling risk of subway platform
CN118230260A