Function design of the platform
The grazing tracjectory statistics and visualization platform has six functional modules: data management, map operation, information query, spatial analysis, statistical analysis, and print sharing. The functional modules of the platform are shown in Fig. 1.
Data management adopted SQL Server+ArcSDE spatial data engine to realize the functions of adding, deleting and querying of basic pasture data, herd trajectory data and device information data. The operation of the map mainly includes basic operations such as zoom, translation, and eagle eye. It also includes the replacement of the platform base map and the display and hiding of other layers. Information query is mainly divided into spatial query and attribute query. Spatial query includes both pasture location information query and herd trajectory information query. Attribute query can query the corresponding attribute information of herd trajectory points and trajectory segments. Spatial analysis includes buffer zone analysis, finding hot spots, and predictive analysis, etc. It is used to monitor and predict the feeding behaviors of the herd. Statistical analysis is mainly to analyze the walking speed, feed intake and feed situation of the herd. Then, corresponding line charts and pie charts are generated and displayed on the client. Print and share include the print and share of ranch basic maps and herd trajectory information thematic maps.
Platform structure design
This platform was developed by using browser and server structure (B/S structure). The architecture of the platform is composed of presentation layer, business logic layer and data layer, as shown in Fig. 2.
Presentation layer
The presentation layer used the Web AppBuilder for ArcGIS framework that is a application framework to build views. Web AppBuilder for ArcGIS is a cross-platform web app creation framework. It has the advantages of configurable and scalable. It can be used to build 2D and 3D web applications. A highly customized map is realized by creating quickly map appearances and widget templates without coding. The framework is tightly integrated with Portal/AGOL. The maps published on ArcGIS Online can be seamlessly added to the client display by the framework. The framework adopts responsive layout design. The created application can adapt to screens of various sizes by the framework. It can run on PCs, tablets, and smartphones of various types. This design structure makes the geographic information service simple and flexible. It also improves the reusability of modules and the schedulability of the overall configuration. This platform used ArcGIS API for JavaScript and Web AppBuilder for ArcGIS to carry out modular design and implementation. In order to make the interface rich and easy to operate, the platform put tools with similar logic together (such as map zoom, pan, panorama of the map operation group ; buffer analysis, finding hot spots and prediction analysis of the spatial analysis group), which enhances the operability of the interface.
Business logic layer
The business logic layer is divided into GIS services and Web services. GIS services include basic map services, trajectory processing services and other business services. The main function of the trajectory processing services is to extract the herd trajectory data from the Microsoft SQL Server2008 database, and use the relevant model to calculate the corresponding walking speed of the herd, walking trajectory, and feed intake of the herd. Then, publish the results to the ArcGIS Online server by basic map services and other business services. Finally, the results are displayed visually by Web AppBuilder for ArcGIS. ArcGIS Online is a cloud computing-based application development support platform. It includes global basemaps, map data, applications, configurable application templates, GIS tools and APIs. Therefore, it can be used to create Web maps, publish GIS services, share maps, share data and applications. It also can manage organizational content and multiple users. Web services are responsible for hosting web applications and services. Tomcat is used to deploy web applications for Internet access. The web application or web service can respond to the client’s request, and return the data to the client, so as to realize the data interaction between the client and the server.
Data layer
The data layer used SQL Server+ArcSDE spatial data engine to standardize and store the trajectory data (such as trajectory point data, trajectory segment data, herd feeding information data, etc.), vector data (such as pasture boundary data, herd boundary data, etc.), raster data (such as herd feeding grid data), and devices information data. The main task of this layer is to design and build a comprehensive database of spatial attributes. Firstly, determine the type and characteristics of all data. Then test, optimize and maintain the data. Finally, bulid a comprehensive database including basic boundary database, herd trajectory database, herd feeding information space-time database, devices information database.
Core models
Trajectory and speed model
The grazing trajectory is a sequence of time and space points. It consists of a series of data points that change with time and position. The location information is denoted by the acquired latitude and longitude. T = {T1,1⋯,Ti,j,⋯,Tn,m},Ti,j={P1,P2,⋯,Pn},Pi={Lati,Lngi,ti}(0≤i≤n,0≤j≤m). Where T denotes the set of herd trajectories in a period of time. Ti,j denotes the set of trajectory points of the j-th monitored sheep on the i-th day. It is a collection of spatial points with time series. Pi denotes the i-th trajectory data points. Lati denotes latitude value. Lngi denotes longitude value. ti denotes the positioning time.
Trajectory segment: Several local trajectories are obtained by segmenting the trajectory. The segmentation method is based on the GPS points contained in the trajectory segment. The GPS points are not less than 2. The smaller the number of trajectory points contained in the trajectory segment, the closer the fitted grazing trajectory is to the real grazing trajectory. Therefore, the platform used a segmentation method that contains 2 trajectory points in the trajectory segment to divide the trajectory into several trajectory segments.
Grazing speed: The trajectory segment is a sequential trajectory displacement connected by two trajectory points(Fig. 3). Therefore, grazing speed \(\overrightarrow {{{v}_{i}}}\) is the ratio of trajectory segment \(\overrightarrow {{{P}_{i}}{{P}_{{i+1}}}}\) and the time difference ti+1−ti (Eq. 1):
$$ \overrightarrow{{{v}_{i}}}=\frac{\overrightarrow{{{P}_{i}}{{P}_{{i+1}}}}}{{{t}_{i+1}}-{{t}_{i}}} $$
(1)
Calculation model of feed intake
In the actual grazing process, the grazing trajectory of the herd shows a certain regularity. It presents the strip spatial distribution characteristics. The range of activity produced by the herd feeding is simulated by buffer processing of trajectory segment Li, that is part grazing area, as shown in Fig. 4.
The feed time of the herd is continuous. Based on this feature, this study assumed that there was no significant difference in the feed intake per unit time and the total daily feed intake of the herd. The effective feed time ti of the herd is obtained from each trajectory segment Li. The total daily feed intake is allocated to each trajectory segment Li according to the ratio of the effective feed time ti corresponding to the trajectory segment Li and the daily feed time tADFT. Finally, the feed intake Ii of the PGA corresponding to the trajectory segment Li is obtained [12]:
$$ {{I}_{i}}={{I}_{DHFI}}\cdot{\frac{{{t}_{i}}}{{{t}_{ADFT}}}} (0<\mathrm{i}<{n}) $$
(2)
$$ {{t}_{ADFT}}=\sum\limits_{i=1}^{n-1}{{t}_{i}}=\sum\limits_{i=1}^{n-1}{({{P}_{{i+1}}{t}}{-}{{P}_{{i}}{t}})} $$
(3)
Where IDHFI denotes the daily feed intake of the herd. In this study, the experimental parameter of the IDHFI is 170 ×2000g, 170 denotes that there are 170 sheep in the herd, and 2000g denotes that the total daily feed intake of each sheep is 2000g. tADFT denotes the all-day feed time of the herd. Pi+1t denotes the positioning time of the i+1-th trajectory point Pi+1. Pit denotes the time of the i-th trajectory point Pi. The difference between them is the feeding time ti of the trajectory segment Li. In order to calculate the feed intake of per unit area, the area Si of the part grazing corresponding to each trajectory segment Li is considered. Therefore, feed intake of per unit area of Li is:
$$ {{F}_{i}}={{t}_{i}}\cdot{\frac{{{I}_{DHFI}}}{{\sum\limits_{i=1}^{n-1}{{t}_{i}}\cdot{{S}_{i}}}}}={({{P}_{{i+1}}{t}}{-}{{P}_{{i}}{t}})}\cdot{\frac{{{I}_{DHFI}}}{{\sum\limits_{i=1}^{n-1}{({{P}_{{i+1}}{t}}{-}{{P}_{{i}}{t}})}\cdot{{S}_{i}}}}} $$
(4)
Evaluation model of feed situation
So far, there is no certain standard for the division of herd feed situation. In addition, it is difficult to find out the accurate classification standard for different types of herd feed in different regions. The boundary between the intervals will be too rigid, if it is divided strictly by the classification interval. However, jurisdiction degree theory of fuzzy mathematics can be used to quantitative evaluation. Fuzzy recognition can make a scientific, reasonable and practical quantitative evaluation for the fuzzy information. Therefore, this platform used a simple jurisdiction function based on the descending half trapezoid, the rising half trapezoid and the intermediate symmetry in fuzzy mathematics to evaluate the feed situation of the herd [39]. Taking the feed intake as the domain, the jurisdiction functions of the fuzzy comment set V = (good, moderate, poor) are given. The poor feed situation of the herd is divided into two different jurisdiction functions: one is light feed (Eq. 5) and the other is over feed (Eq. 6).
$$ {{\mu }_{11}}(x)=\left\{ \begin{aligned} & \text{1 \qquad\qquad (\({x}\)}{{<{b}}_{1}}\text{)} \\ & \frac{{{b}_{2}}-x}{{{b}_{2}}-{{b}_{1}}} \quad ({{{b}}_{1}}\le \text{\({x}\)}\le {{{b}}_{2})} \\ & \text{0 \qquad\qquad (\({x}\)}{{>{b}}_{2}}\text{)} \\ \end{aligned} \right. $$
(5)
$$ {{\mu }_{12}}(x)=\left\{ \begin{aligned} & \text{0 \qquad\qquad (\({x}\)}{{<{b}}_{4}}\text{)} \\ & \frac{-{{b}_{4}}+x}{{{b}_{5}}-{{b}_{4}}} \quad ({{{b}}_{4}}\le \text{\({x}\)}\le {{{b}}_{5})} \\ & \text{1 \qquad\qquad (\({x}\)}{{>{b}}_{5}}\text{)} \\ \end{aligned} \right. $$
(6)
The intermediate symmetrical distribution function is used to estimate moderate feed and good feed of the herd (Eqs. 7, 8, and 9).
$$ {{\mu }_{21}}(x)=\left\{ \begin{aligned} & \frac{{x}-{{b}_{1}}}{{{b}_{2}}-{{b}_{1}}}\quad\text{ (}{{{b}}_{1}}\le {x}\le {{{b}}_{2}}\text{)} \\ & \frac{{{b}_{3}}-x}{{{b}_{3}}-{{b}_{2}}}\quad({{{b}}_{2}}<{x}\le {{{b}}_{3})} \\ & \text{0 \qquad\qquad (\({x}\)}<{{{b}}_{1}}\text{ or \({x}\)}>{{{b}}_{3}}\text{)} \\ \end{aligned} \right. $$
(7)
$$ {{\mu }_{22}}(x)=\left\{ \begin{aligned} & \frac{{x}-{{b}_{3}}}{{{b}_{4}}-{{b}_{3}}}\quad\text{ (}{{{b}}_{3}}\le {x}\le {{{b}}_{4}}\text{)} \\ & \frac{{{b}_{5}}-x}{{{b}_{5}}-{{b}_{4}}}\quad ({{{b}}_{4}}<{ x}\le {{{b}}_{5})} \\ & \text{0 \qquad\qquad (\({x}\)}<{{{b}}_{3}}\text{ or \({x}\)}>{{{b}}_{5}}\text{)} \\ \end{aligned} \right. $$
(8)
$$ {{\mu }_{3}}(x)=\left\{ \begin{aligned} & \frac{{x}-{{b}_{2}}}{{{b}_{3}}-{{b}_{2}}}\quad\text{ (}{{{b}}_{2}}\le {x}\le {{{b}}_{3}}\text{)} \\ & \frac{{{b}_{4}}-x}{{{b}_{4}}-{{b}_{3}}}\quad ({{{b}}_{3}}<{ x}\le {{{b}}_{4)}} \\ & \text{0 \qquad\qquad (\({x}\)}<{{{b}}_{2}}\text{ or \({x}\)}>{{{b}}_{4}}\text{)} \\ \end{aligned} \right. $$
(9)
Where bi is the boundary of different feed intake, i=1, 2,..., 5; x is the feed intake, g/ m2.
Spatial analysis models
The spatial analysis models used in this platform include buffer analysis model, finding hot pots model and interpolation point analysis model.
Buffer analysis model is one of the important spatial analysis functions of geographic information systems. It has a wide range of applications in transportation, forestry, resource management, and urban planning, such as the delimitation of the protected areas around lakes and rivers, the selection of automobile service areas, and the establishment of buffer areas far from the street network in residential areas, etc. Buffer analysis is based on point, line and face entities to build automatically a polygon layer of buffer in a certain width range, and then the superposition of this layer and the target layer is built to analyze and obtain the required results. The buffer based on point feature is usually a circle with a point as the center and a certain distance as the radius. The buffer based on line feature is usually a parallel strip polygon with the line as the central axis and a certain distance from the central axis. The buffer based on polygon boundary of the area feature is a new polygon, which can be generated by extending a certain distance outwards or inwards. The buffer program traverses each vertex of the input features and builds a buffer offset. The output buffer features are built by using these offsets.
Finding hot spots model is a spatial clustering which is used to identify high values (hot spots) or low values (cold spots) or data count with statistical significance in data. This model is used to find hot spots and cold spots of the herd feed information clustering. The map layer shows hot spots in red and cold spots in blue. The darkest red features represent the strongest clusters of high values or point density. The clusters associated with these features are not randomly generated results. They have 99% degree of confidence. Similarly, the darkest blue features are associated with the strongest low-value spatial clustering or the lowest point density. Beige features do not belong to statistically significant clusters. The spatial patterns associated with these features are most likely the results of random processes and random production.
Interpolation point analysis model can predict the values of new locations based on the values of a set of trajectory points. This model gets each point data with a value and returns the area classified by the predicted value. The point layer is used as the input layer. The input layer must have a numeric field to be the basis of interpolation. The interpolation speed, precision, and intermediate region can be optimized by setting the interpolation point model. The standard error layer can be created by selecting the output prediction error check box. The 95% confidence interval in the interpolation layer can be calculated by the interpolation value, the two standard upper bound errors and the two standard lower bound errors.