Sheep flock behavior trajectory judgment method
The sheep behavior trajectory judgment method combining the MICP framework model and B-spline curves solves the problem of insufficient multi-view in sheep trajectory prediction, and realizes stable monitoring of sheep behavior and safe grazing.
Patent Information
- Application Number
- CN202511691258.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-27
AI Technical Summary
In complex pastoral environments, sheep flock trajectory prediction suffers from a lack of multi-perspective capabilities, neglects the interrelationships between groups, and under special circumstances, sheep dispersal behavior affects grazing safety and regional security.
The MICP framework model is used for vectorized segmentation and encoding. Combined with trajectory prediction based on the incremental correlation coefficient of motion posture and B-spline curves, attention mechanism and CPMP-local flock convergence model are used to monitor flock behavior and predict trajectories in real time. The flock turning and convergence are determined by reconstructing the posture change and covariance matrix.
This enables stable and safe monitoring of sheep behavior, reduces scattered behavior, and improves the safety and effectiveness of grazing.
Smart Images

Figure CN121579976A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animal husbandry technology, specifically to a method for determining the behavioral trajectory of sheep flocks. Background Technology
[0002] In the context of pasture ecology and livestock management, sheep flocks are typical examples of group movement. The complex dynamic interactions between individuals (such as following, gathering, and obstacle avoidance) and the uncertainty of their future movement trajectories make sheep flock trajectory prediction a key task for improving the efficiency of intelligent pasture management, optimizing grazing path planning, and ensuring the safety of sheep flocks.
[0003] In complex pastoral environments, the spatial and temporal relationships of sheep flocks change due to factors such as topography, vegetation distribution, predator interference (e.g., the presence of wild animals), and human activities. Existing research has significant shortcomings in understanding the spatial relationships of sheep flocks from multiple perspectives: on the one hand, it often focuses on single-dimensional group movement characteristics (e.g., overall migration direction), neglecting the inter-group relationships caused by special circumstances; on the other hand, in some areas, small flocks of sheep graze, and the presence of roads, rivers, and other special circumstances (people, animals, vehicles) near the grazing areas can affect the foraging trajectory of the entire flock and may also affect the safety of the surrounding areas. Summary of the Invention
[0004] The purpose of this invention is to provide a method for judging the behavior trajectory of sheep flocks, which can monitor the normal movement trajectory of sheep flocks in real time and effectively reduce the dispersion behavior of sheep flocks caused by special circumstances, thereby achieving a stable and safe monitoring objective.
[0005] The present invention adopts the following technical solution:
[0006] The method for determining sheep flock behavior patterns includes the following steps:
[0007] S1. Using the MICP framework model, the grazing land of sheep is vectorized and segmented to obtain behavioral codes, river topography codes, and spatiotemporal codes.
[0008] S2. Input the spatiotemporal code into the trajectory prediction model of motion attitude increment correlation coefficient to obtain the set of attitude change and motion attitude increment correlation coefficient, and determine whether the flock turns within a certain period of time.
[0009] S3. When the flock does not turn within a certain period of time, use B-spline curves to predict the trajectory of the flock's behavior.
[0010] S4. Based on the set of incremental correlation coefficients of motion posture, the CPMP-local flock convergence model is used to converge and judge the trajectory motion of flock behavior, and obtain the final flock behavior trajectory motion.
[0011] Furthermore, in step S2, the spatiotemporal encoding is input into the trajectory prediction model based on the incremental correlation coefficient of motion posture. The attention mechanism module is used to map the spatiotemporal encoding to perceptual features, and the Transform module is used to construct the initial covariance matrix and the initial covariance matrix. The specific formula is as follows:
[0012] ;
[0013] ;
[0014] in, Let represent the initial covariance matrix at time t. This represents the covariance between flock a and flock b at time t. This represents the correlation coefficient between the head vector angles of sheep flock a and sheep flock b at time t. This represents the standard deviation of the head vector angle of the sheep flock at time t. This represents the standard deviation of the angle of the head vector of sheep b at time t. This represents the correlation coefficient between the head vector angle and azimuth angle of sheep flock a and sheep flock b at time t. This represents the standard deviation of the azimuth angle of flock b at time t. This represents the correlation coefficient between the azimuth and head vector angles of sheep flocks a and b at time t. This represents the standard deviation of the azimuth angle of the sheep flock at time t. This represents the correlation coefficient between the azimuth angles of sheep flock a and sheep flock b at time t;
[0015] attitude change The formula is:
[0016] ;
[0017] in, Denotes the joint probability distribution at time t. This indicates the historical movement trajectory of the sheep flock. This represents the set of average location information for a sheep flock. Indicates the parameter value. Represents the distribution expression. Let represent the mean change in the number of sheep at time t. The initial covariance matrix represents the change in the sheep population increment at time t;
[0018] Using the attitude change and the mean and variance of the edge distribution, the initial covariance matrix in the xy coordinate system is reconstructed, and the final covariance matrix is obtained. The specific formula is as follows:
[0019] ;
[0020] in, The standard deviation of a sheep flock; The correlation coefficient of the sheep flock is represented by ; N represents the total number of sheep in the flock. Indicates the change in vector angle and azimuth angle;
[0021] Based on the final covariance matrix, the set of correlation coefficients for motion attitude increments is obtained. The specific formula is as follows:
[0022] ;
[0023] when A value of 0 indicates that the sheep are currently moving normally; when... When the value is 1, it indicates that the current flock is split, but the flock is moving in the same direction; when... A value of -1 indicates that the current sheep flocks are moving in inconsistent directions;
[0024] Head vector angle change The specific formula is:
[0025] ;
[0026] ;
[0027] in, This represents the head vector of sheep flock 'a'. This represents the head vector of sheep flock b. Indicates the outer product. Indicates the inner product;
[0028] The head vector angle difference is:
[0029] ;
[0030] in, Let represent the head vector angle difference between sheep flock a and sheep flock b at time t;
[0031] Azimuth change The specific formula is:
[0032] ;
[0033] ;
[0034] in, This represents the center-to-center distance between sheep flock a and sheep flock b;
[0035] The azimuth difference is:
[0036] ;
[0037] in, This represents the difference in azimuth between flock a and flock b at time t;
[0038] To obtain the historical location sequence and terrain information of the sheep flock in the global coordinate system, construct the future location of the sheep flock in the global coordinate system using the following formula:
[0039] ;
[0040] in, Denotes the joint probability distribution function. This represents scene information in the global coordinate system. This represents the historical movement trajectory of the sheep in the global coordinate system. This represents the parameter value in the global coordinate system. This represents the future position of the sheep herd in the global coordinate system at time t. This represents the mean of the future state of the sheep in the global coordinate system at time t. This represents the covariance matrix in the global coordinate system at time t;
[0041] The specific formula for the position transformation of the sheep flock in the global coordinate system is as follows:
[0042] ;
[0043] in, This represents the mean of the current initial state. Represents a diagonal matrix;
[0044] when and The sheep flock does not turn around within a certain period of time, and the specific formula is:
[0045] ;
[0046] Where sgn represents the sign function, The correlation coefficient represents the movement changes of sheep herd a and sheep herd b within time t.
[0047] Furthermore, spatiotemporal coding includes time dimension, spatial dimension, environmental and semantic features.
[0048] Furthermore, in step S3, the B-spline curve The specific formula is:
[0049] ;
[0050] in, Let n represent the i-th control point, and n represent the total number of control points. Let B-spline basis functions be defined for the i-th control point at order 3. Represents a parameter sequence;
[0051] The actual time is normalized to obtain the adjusted B-spline curve. The specific formula is as follows:
[0052] ;
[0053] in, Indicates actual time. Represents the maximum value of the actual time;
[0054] Trajectory movement for predicting sheep behavior The specific formula is as follows:
[0055] ;
[0056] in, Indicates the initial time. Indicates the final moment, express The B-spline basis function of the i-th control point at time 3. express The B-spline basis function of the i-th control point at time 3. express The first direction One control point, express The first direction One control point.
[0057] Furthermore, in step S4, the behavior code, river topography code, and attitude change are input into the CPMP-local flock convergence model. B-spline curves are then fitted to obtain the curve polygons corresponding to each flock. Finally, based on the set of motion attitude increment correlation coefficients, the intersection points of any edges connecting the control points of the curve polygons are determined. and When the directions are the same, it indicates that the two flocks of sheep do not intersect and will not merge; when... and If the directions are inconsistent, continue to judge. and Direction, if and If the directions are the same, it means the two flocks of sheep do not intersect and will not merge; when and In the opposite direction, and and When the directions are opposite, it indicates that the two flocks of sheep intersect at a point, which is the control point in the curve polygon corresponding to flock a. Control points in the curve polygon corresponding to sheep herd b The process involves: determining the intersection points of all edges of the curved polygon to obtain the movement trends of each flock in the future; defining counterclockwise direction angles as positive and clockwise direction angles as negative; processing the movement trends of each flock in the future using trajectory regression, a classification head, and a softmax function to obtain the trajectory probability scores of each flock; and selecting the movement trend of the future state with the highest trajectory probability score as the final flock behavior trajectory.
[0058] in This represents the e-th control point in the curved polygon corresponding to sheep flock a. With the (e+1)th control point The connected edges , This represents the total number of control points of the curved polygon corresponding to sheep flock 'a'. This represents the h-th control point in the curved polygon corresponding to sheep flock b. With the (h+1)th control point The connected edges , This represents the total number of control points of the curved polygon corresponding to sheep flock b. They represent arrive Connection arrive Connection arrive Connection arrive The directional angle between the connecting lines.
[0059] Furthermore, the present invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the sheep behavior trajectory judgment method.
[0060] Furthermore, the present invention also proposes a computer-readable storage medium storing a computer program, which is executed by a processor to perform the sheep behavior trajectory judgment method.
[0061] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:
[0062] This invention can intuitively reveal the movement correlation of sheep flock splitting due to special circumstances. It can not only effectively judge the state of sheep flock movement, but also better solve the problem of sheep flock splitting caused by special circumstances and special grazing grounds, effectively improving the safety and effectiveness of grazing. Attached Figure Description
[0063] Figure 1This is a flowchart illustrating the overall implementation of the present invention. Detailed Implementation
[0064] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0065] To achieve the above objectives, this invention proposes a method for determining the behavioral trajectory of sheep flocks, such as... Figure 1 As shown, the specific steps are as follows:
[0066] S1. The MICP framework model is used to perform vectorized segmentation and encoding of the grazing land of sheep flocks, resulting in behavioral codes, river topography codes, and spatiotemporal codes. The MICP framework model can comprehensively consider the interrelationships among sheep flocks under different movement trajectory states under special conditions, and effectively improve the accuracy of trajectory prediction based on the movement poses and interrelationships among sheep flocks.
[0067] S2. Input the spatiotemporal encoding into the trajectory prediction model based on the correlation coefficient of motion attitude increments to obtain the set of attitude change and motion attitude increment correlation coefficients, and determine whether the flock has turned around within a certain period of time; specifically:
[0068] The spatiotemporal encoding is input into the trajectory prediction model based on the incremental correlation coefficient of motion posture. An attention mechanism module maps the spatiotemporal encoding to perceptual features. The Transform module is used to construct the initial covariance matrix and the initial covariance matrix, with the specific formula as follows:
[0069] ;
[0070] ;
[0071] in, Let represent the initial covariance matrix at time t. This represents the covariance between flock a and flock b at time t. This represents the correlation coefficient between the head vector angles of sheep flock a and sheep flock b at time t. This represents the standard deviation of the head vector angle of the sheep flock at time t. This represents the standard deviation of the angle of the head vector of sheep b at time t. This represents the correlation coefficient between the head vector angle and azimuth angle of sheep flock a and sheep flock b at time t. This represents the standard deviation of the azimuth angle of flock b at time t. This represents the correlation coefficient between the azimuth and head vector angles of sheep flocks a and b at time t. This represents the standard deviation of the azimuth angle of the sheep flock at time t. This represents the correlation coefficient between the azimuth angles of sheep flock a and sheep flock b at time t;
[0072] For time t, obtain the attitude change. , , Let be the mean change in the movement of sheep herd a and sheep herd b at different times, and let be the straight-line distance moved by sheep herd a and sheep herd b at different times. The mean changes in the head vector angle and azimuth angle of sheep flock a and sheep flock b are: , The initial average value of the current position for all sheep in the scene is: .
[0073] attitude change The formula is:
[0074] ;
[0075] in, Denotes the joint probability distribution at time t. This indicates the historical movement trajectory of the sheep flock. This represents the set of average location information for a sheep flock. Indicates the parameter value. Represents the distribution expression. Let represent the mean change in the number of sheep at time t. The initial covariance matrix represents the change in the sheep population increment at time t;
[0076] Solve using optimization algorithms Find the parameter value that minimizes the Gaussian likelihood function, i.e. .
[0077] Using the attitude change and the mean and variance of the edge distribution, the initial covariance matrix in the xy coordinate system is reconstructed, and the final covariance matrix is obtained. The specific formula is as follows:
[0078] ;
[0079] in, The standard deviation of a sheep flock; The correlation coefficient of the sheep flock is represented by ; N represents the total number of sheep in the flock. Indicates the change in vector angle and azimuth angle;
[0080] Based on the final covariance matrix, the set of correlation coefficients for motion attitude increments is obtained. The specific formula is as follows:
[0081] ;
[0082] when A value of 0 indicates that the sheep are moving normally without any other interference; when... When the value is 1, it indicates that although the flock has split due to special circumstances, each flock is moving in the same direction and is in the same safe area; when When the value is -1, it indicates inconsistent behavior among the sheep. The closer it is to -1, the more likely it is that some sheep have deviated from the normal area or have not followed the driving direction normally specified by the herder.
[0083] Head vector angle change The specific formula is:
[0084] ;
[0085] ;
[0086] in, This represents the head vector of sheep flock 'a'. This represents the head vector of sheep flock b. Indicates the outer product. Indicates the inner product;
[0087] The head vector angle difference is:
[0088] ;
[0089] in, Let represent the head vector angle difference between sheep flock a and sheep flock b at time t;
[0090] Azimuth change The specific formula is:
[0091] ;
[0092] ;
[0093] in, This represents the center-to-center distance between sheep flock a and sheep flock b;
[0094] The azimuth difference is:
[0095] ;
[0096] in, This represents the difference in azimuth between flock a and flock b at time t;
[0097] To obtain the historical location sequence and terrain information of the sheep flock in the global coordinate system, construct the future location of the sheep flock in the global coordinate system using the following formula:
[0098] ;
[0099] in, Denotes the joint probability distribution function. This represents scene information in the global coordinate system. This represents the historical movement trajectory of the sheep in the global coordinate system. This represents the parameter value in the global coordinate system. This represents the future position of the sheep herd in the global coordinate system at time t. This represents the mean of the future state of the sheep in the global coordinate system at time t. This represents the covariance matrix in the global coordinate system at time t;
[0100] The specific formula for the position transformation of the sheep flock in the global coordinate system is as follows:
[0101] ;
[0102] in, This represents the mean of the current initial state. Represents a diagonal matrix;
[0103] when and The sheep flock does not turn around within a certain period of time, and the specific formula is:
[0104] ;
[0105] Where sgn represents the sign function, The correlation coefficient represents the movement changes of sheep flock a and sheep flock b within time t;
[0106] In addition, spatiotemporal coding includes time dimension, spatial dimension, environmental and semantic features.
[0107] S3. When the flock does not turn within a certain time period, the trajectory of the flock's behavior is predicted using B-spline curves. The advantage of B-spline curves is that changing one of the control points will not cause positional deviations in the entire fitted curve, and it maintains its stability to a certain extent. Specifically:
[0108] B-spline curve The specific formula is:
[0109] ;
[0110] in, Let n represent the i-th control point, and n represent the total number of control points. Let B-spline basis functions be defined for the i-th control point at order 3. Represents a parameter sequence;
[0111] The actual time is normalized to obtain the adjusted B-spline curve. The specific formula is as follows:
[0112] ;
[0113] in, Indicates actual time. Represents the maximum value of the actual time;
[0114] Trajectory movement for predicting sheep behavior The specific formula is as follows:
[0115] ;
[0116] in, Indicates the initial time. Indicates the final moment, express The B-spline basis function of the i-th control point at time 3. express The B-spline basis function of the i-th control point at time 3. express The first direction One control point, express The first direction One control point.
[0117] S4. Based on the set of incremental correlation coefficients of motion postures, the CPMP-local flock convergence model is used to converge and determine the trajectory motion of sheep behavior, and the final flock behavior trajectory motion is obtained; specifically:
[0118] After obtaining the trajectory of the sheep's behavior, special circumstances may cause the flock to split into multiple local flocks (vehicles passing by the flock, the flock being frightened and causing the flock to disperse, road obstruction, etc.). In this case, designing methods to judge the convergence of the flock and the separation of local flocks can better help shepherds grasp the actual situation of sheep that have separated from the main flock.
[0119] Behavior codes, river topography codes, and attitude changes are input into the CPMP-local flock convergence model. B-spline curves are then fitted to obtain curve polygons corresponding to each flock. Finally, based on the set of correlation coefficients for motion attitude increments, intersection points are determined for any edges connecting the control points of the curve polygons. and When the directions are the same, it indicates that the two flocks of sheep do not intersect and will not merge; when... and If the directions are inconsistent, continue to judge. and Direction, if and If the directions are the same, it means the two flocks of sheep do not intersect and will not merge; when and In the opposite direction, and and When the directions are opposite, it indicates that the two flocks of sheep intersect at a point, which is the control point in the curve polygon corresponding to flock a. Control points in the curve polygon corresponding to sheep herd b The process involves: determining the intersection points of all edges of the curved polygon to obtain the movement trends of each flock in the future; defining counterclockwise direction angles as positive and clockwise direction angles as negative; processing the movement trends of each flock in the future using trajectory regression, a classification head, and a softmax function to obtain the trajectory probability scores of each flock; and selecting the movement trend of the future state with the highest trajectory probability score as the final flock behavior trajectory.
[0120] in This represents the e-th control point in the curved polygon corresponding to sheep flock a. With the (e+1)th control point The connected edges , This represents the total number of control points of the curved polygon corresponding to sheep flock 'a'. This represents the h-th control point in the curved polygon corresponding to sheep flock b. With the (h+1)th control point The connected edges , This represents the total number of control points of the curved polygon corresponding to sheep flock b. They represent arrive Connection arrive Connection arrive Connection arrive The directional angle between the connecting lines.
[0121] This invention also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. It should be noted that when the processor executes the computer program, it corresponds to the specific steps of the method provided in this invention, possessing the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in this invention.
[0122] This invention also proposes a computer-readable storage medium storing a computer program. It should be noted that when the computer program is executed by a processor, it corresponds to the specific steps of the method provided in this invention, possessing the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in this invention.
[0123] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for determining the behavioral trajectory of sheep flocks, characterized in that, include: S1. Using the MICP framework model, the grazing land of sheep is vectorized and segmented to obtain behavioral codes, river topography codes, and spatiotemporal codes. S2. Input the spatiotemporal code into the trajectory prediction model of motion attitude increment correlation coefficient to obtain the set of attitude change and motion attitude increment correlation coefficient, and determine whether the flock turns within a certain period of time. S3. When the flock does not turn within a certain period of time, use B-spline curves to predict the trajectory of the flock's behavior. S4. Based on the set of incremental correlation coefficients of motion posture, the CPMP-local flock convergence model is used to converge and judge the trajectory motion of flock behavior, and obtain the final flock behavior trajectory motion.
2. The method for determining sheep flock behavior trajectory according to claim 1, characterized in that, In step S2, the spatiotemporal encoding is input into the trajectory prediction model based on the incremental correlation coefficient of motion posture. The attention mechanism module is used to map the spatiotemporal encoding to perceptual features. The Transform module is used to construct the initial covariance matrix and the initial covariance matrix. The specific formula is as follows: ; ; in, Let represent the initial covariance matrix at time t. This represents the covariance between flock a and flock b at time t. This represents the correlation coefficient between the head vector angles of sheep flock a and sheep flock b at time t. This represents the standard deviation of the head vector angle of the sheep flock at time t. This represents the standard deviation of the angle of the head vector of sheep b at time t. This represents the correlation coefficient between the head vector angle and azimuth angle of sheep flock a and sheep flock b at time t. This represents the standard deviation of the azimuth angle of flock b at time t. This represents the correlation coefficient between the azimuth and head vector angles of sheep flocks a and b at time t. This represents the standard deviation of the azimuth angle of the sheep flock at time t. This represents the correlation coefficient between the azimuth angles of sheep flock a and sheep flock b at time t; attitude change The formula is: ; in, Denotes the joint probability distribution at time t. This indicates the historical movement trajectory of the sheep flock. This represents the set of average location information for a sheep flock. Indicates the parameter value. Represents the distribution expression. Let represent the mean change in the number of sheep at time t. The initial covariance matrix represents the change in the sheep population increment at time t; Using the attitude change and the mean and variance of the edge distribution, the initial covariance matrix in the xy coordinate system is reconstructed, and the final covariance matrix is obtained. The specific formula is as follows: ; in, The standard deviation of a sheep flock; The correlation coefficient of the sheep flock is represented by ; N represents the total number of sheep in the flock. Indicates the changes in vector angle and azimuth angle; Based on the final covariance matrix, the set of correlation coefficients for motion attitude increments is obtained. The specific formula is as follows: ; when A value of 0 indicates that the sheep are currently moving normally; when... When the value is 1, it indicates that the current flock is split, but the flock is moving in the same direction; when... A value of -1 indicates that the current sheep flocks are moving in inconsistent directions; Head vector angle change The specific formula is: ; ; in, This represents the head vector of sheep flock 'a'. This represents the head vector of sheep flock b. Indicates the outer product. Indicates the inner product; The head vector angle difference is: ; in, Let represent the head vector angle difference between sheep flock a and sheep flock b at time t; Azimuth change The specific formula is: ; ; in, This represents the center-to-center distance between sheep flock a and sheep flock b; The azimuth difference is: ; in, This represents the difference in azimuth between flock a and flock b at time t; To obtain the historical location sequence and terrain information of the sheep flock in the global coordinate system, construct the future location of the sheep flock in the global coordinate system using the following formula: ; in, Denotes the joint probability distribution function. This represents scene information in the global coordinate system. This represents the historical movement trajectory of the sheep in the global coordinate system. This represents the parameter value in the global coordinate system. This represents the future position of the sheep herd in the global coordinate system at time t. This represents the mean of the future state of the sheep in the global coordinate system at time t. This represents the covariance matrix in the global coordinate system at time t; The specific formula for the position transformation of the sheep flock in the global coordinate system is as follows: ; in, This represents the mean of the current initial state. Represents a diagonal matrix; when and The sheep flock does not turn around within a certain period of time, and the specific formula is: ; Where sgn represents the sign function, The correlation coefficient represents the movement changes of sheep herd a and sheep herd b within time t.
3. The method for determining the behavior trajectory of sheep flocks according to claim 2, characterized in that, Spatiotemporal coding includes time dimension, spatial dimension, environmental and semantic features.
4. The method for determining sheep flock behavior trajectory according to claim 1, characterized in that, In step S3, the B-spline curve The specific formula is: ; in, Let n represent the i-th control point, and n represent the total number of control points. Let B-spline basis functions be defined for the i-th control point at order 3. Represents a parameter sequence; The actual time is normalized to obtain the adjusted B-spline curve. The specific formula is as follows: ; in, Indicates actual time. Represents the maximum value of the actual time; Trajectory movement for predicting sheep behavior The specific formula is as follows: ; in, Indicates the initial time. Indicates the final moment, express The B-spline basis function of the i-th control point at time 3. express The B-spline basis function of the i-th control point at time 3. express The first direction One control point, express The first direction One control point.
5. The method for determining the behavior trajectory of a sheep flock according to claim 1, characterized in that, In step S4, the behavior code, river topography code, and attitude change are input into the CPMP-local flock convergence model. B-spline curves are then fitted to obtain the curve polygons corresponding to each flock. Finally, based on the set of motion attitude increment correlation coefficients, the intersection points of any edges connecting the control points of the curve polygons are determined. and When the directions are the same, it indicates that the two flocks of sheep do not intersect and will not merge; when... and If the directions are inconsistent, continue to judge. and Direction, if and If the directions are the same, it means the two flocks of sheep do not intersect and will not merge; when and In the opposite direction, and and When the directions are opposite, it indicates that the two flocks of sheep intersect at a point, which is the control point in the curve polygon corresponding to flock a. Control points in the curve polygon corresponding to sheep herd b The intersection points of all sides of the curved polygon are determined to obtain the movement trend of each flock in the future state. The counterclockwise direction angle is defined as positive and the clockwise direction angle as negative. Trajectory regression, classification head and softmax function are used to process the movement trend of each flock in the future state to obtain the trajectory probability score of each flock. The movement trend of the future state with the highest trajectory probability score is selected as the final herd behavior trajectory. in This represents the e-th control point in the curved polygon corresponding to sheep flock a. With the (e+1)th control point The connected edges , This represents the total number of control points of the curved polygon corresponding to sheep flock 'a'. This represents the h-th control point in the curved polygon corresponding to sheep flock b. With the (h+1)th control point The connected edges , This represents the total number of control points of the curved polygon corresponding to sheep flock b. They represent arrive Connection arrive Connection arrive Connection arrive The directional angle between the connecting lines.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the sheep behavior trajectory determination method according to any one of claims 1 to 5.
7. A computer-readable storage medium storing a computer program, characterized in that, The computer program, when executed by the processor, performs the sheep behavior trajectory judgment method as described in any one of claims 1 to 5.