# Mutton Traceability Method Based on Internet of Things

Authors: Wu Min-Ning; Zhang-Xing Li; Zhang Yong-Heng; Zhang Feng
Journal: Journal of Sensors
 (2014)

---

## Abstract

In order to improve the mutton traceability efficiency for Internet of Things and solve the problem of data transmission, analyzed existing tracking algorithm, proposed the food traceability application model, Petri network model of food traceability and food traceability of time series data of improved K-means algorithm based on the Internet of things. The food traceability application model to convert, integrate and mine the heterogeneous information, implementation of the food safety traceability information management, Petri network model for food traceability in the process of the state transition were analyzed and simulated and provides a theoretical basis to study the behavior described in the food traceability system and structural design. The experiments on simulation data show that the proposed traceability method based on Internet of Things is more effective for mutton traceability data than the traditional K-means methods.


---

## Body

## 1. Introduction

With the economic growth at full speed, people’s living standards are generally improved, food consumption of rural residents gradually into a well-off from food and clothing, food consumption of urban residents will also benefit from a well-off steering wealthy. There will be a lot of changes for food supply and demand; it will be synchronous growth of the single pursuit food quantity and the food quality, the government’s attention, and regulation of food from just focusing on food safety and quality concerns safety [1].It will be development refined social division, specialization and globalization of food trade and production methods, and are increasingly complex of food supply chain [2]. Food from the raw material production to final consumption of intermediate links becomes more and more involved in making food safety production, processing, storage, transportation, and sale of the entire food supply chain [3]. On the one hand, it increased from production to consumption of food intermediate links may be causing increase the probability of food safety problems; on the other hand, the supplier pursuit of profit and increasing the food supply chain may be causing food safety problem [4, 5].At present, the food safety control methods in food processing only in the theoretical stage and lacking entire food supply chain safety control methods, but the traditional method is to use food inspection and food control key link in the supply chain and other means, due to poor management, operational errors and manual errors, often leading to inefficiencies and higher error rates. This requires creating a comprehensive system of food information traceability in the supply and ensuring food “from the source to table” all aspects of the information can be held liable retroactively and corresponding of the offender [6–8].With the development of wireless radio frequency identification technology, it has become more sophisticated, gradually becoming various industries in Internet of Things (IoT). IoT refers to all the items through the radio frequency identification and other information sensing device connected to the Internet, to realize intelligent identification and management. Since 2000, the United States, European Union, Japan, and South Korea as the representative of developed countries invest a lot of manpower, material things related to technology research and infrastructure, digital residential, health care, environmental monitoring, food safety and other areas try to deploy IoT applications [9, 10]. In China, IoT related research attention has also been proposed to lead the international standards as the core infrastructure, the core technology research and development is related to platform construction, the research and development road demonstration of IoT applications simultaneously, IoT will become survival of intelligent environments. From the point of view of whole industry chain, social and economic, IoT is not only a sensor network, but also the need of various sectors involved in the application. Therefore, how to build demonstration application features and networking with industry characteristics is critical to the success of the promotion of networking applications.Food safety traceability plays an irreplaceable role in people’s health and social stability and development [11]. It is an important measure of food safety risk management and an effective technology to control the whole supply chain. If there is a problem of food safety production that can be traced back to the source, find the problem and effective governance [12]. The animal food safety traceability system not only includes the animal from birth to enter the slaughterhouse feeding process (feeding and management, disease prevention, treatment, and veterinary feed) recording and monitoring, but also includes animal products into the consumer market (supermarket), consumers can through every animal unique identification code to query the animal products breeding, slaughtering, processing and circulation process. Figure 1 shows the animal food from the producer to the aspects of consumer, and animal food from traced back the reciprocal process.Figure 1
Food traceability process.To sum up, in this paper, applied the traceability management network technology to the mutton food and collection information based on IoT, transmission and processing of each link to achieve mutton food industry chain, in order to create traceability and price analysis data base, the information traceability issues in-depth mutton products is studied.


## 2. Mutton Supply Chain Business Model Based on Petri Network

It is a must to carry on modeling analysis of the mutton supply chain business process in the traceability system design and development. In order to ensure the rationality of the business process, the consistency of logistics, and information flow in the business process [13], there are many modeling methods for business process that can be used, like Petri net as a kind of modeling method based on the strict mathematics definition, and various operating characteristics can be convenient analysis system, which can not only describe the internal system of logistics, but also describe the system of internal flow of information [14, 15].Compared with other modeling approaches, Petri net has strict mathematical definitions, usable graphical representation, and the advantages of being intuitive and easy to understand and use. Specifically, it has the following advantages.(1)
An intuitive graphical representation. Petri net is a graphical language that can describe the basic elements of the process model with distributed, concurrent, and asynchronous features.(2)
Ability to express the semantics and rich formalized analysis. A Petri net model with the corresponding semantic description of a business process can also display the status and activities described in the process model.(3)
Extensive analysis techniques. Petri nets have strong analytical techniques and tools that can be used to analyze various characteristics of the model, such as peer-bounded and activity analysis calculations.In short, it has strict mathematical definition, system analysis and verification methods provider of Petri nets, and an important analytical tool for some uncertainty, concurrency and resource sharing system. The complexity of business processes is mainly manifested in the uncertainty and concurrency and resource sharing problem of many factors, and the Petri net modeling method can well solve the problem. It can describe business processes between the upper and lower reaches of enterprise cooperation by Petri network and can better describe the logistics and information flow in parallel operation. Therefore, it can be used in the business activities, business processes, and their relationship modeling by Petri nets to verification and analysis of the logistics system.


### 2.1. Traceability Business Model Based on Petri Network

Petri network is used to describe discrete, distributed systems mathematical modeling tools. With the development of Petri network, in order to enhance the ability of Petri net description of the system, there were many Petri modeling methods extended to Petri nets, such as Predicate Transition Net (PTN) [16], Colored Petri Net (CPN) [17], and Object-Oriented Petri Net (OPN) [18], as well as other senior Petri nets.In the early stage, the main application field of Petri nets is in communication. In recent years, with the development of the theory of Petri nets, and its increasingly wide range of applications, such as areas of performance evaluation, communication protocols, and production systems [19], it has become asynchronous, concurrent, distributed, strong work in parallel and nondeterministic information systems of Petri nets [20].Petri nets as a graphical and mathematical modeling tool have four basic elements that are place, transition, arc, and token. A Petri net model is formed by the four basic elements, a Petri net model is formed by the four basic elements. In addition, there are common elements in the condition and event of Petri nets model. If a library has only two states and there is no token, it is called event that the library is said to conditions involving changes condition.Define the tripleN=(S,T;F) which is necessary and sufficient condition of Petri nets; it is given by:(1)
S∩Τ=ϕ;(2)
S∪T≠ϕ;(3)
F⊆(S×T)∪(T×S);(4)
dom⁡(F)∪cod(F)=S∪T.S is the set of libraries of N; T is the set of transitions N; F is a collection of S ordered pair elements; and a T-element has flow relation: is set to F contained in the first element and the second element-ordered pair consisting; is called N elements set.The reference pattern of Petri nets is expressed as a library with a round, or a rectangular, or a short line which indicates that changes by directed arcs represent ordered pair and token represented by solid dots. Figure2 is a graphical representation of Petri nets.Figure 2
Graphical representation of Petri nets.For different business processes that the task execution order is different, so it has relations sequence, parallel, selection and circulation between tasks. Petri nets can be divided behavioral characteristics and structural properties, it includes reachability, boundedness, liveness, and conservativeness.There are a lot of Petri net analysis methods; it not only has the static structure analysis but also has the analysis of dynamic behavior, such as reachability graph and coverability tree, that is, incidence matrix, invariant, linguistic analysis, computer simulation analysis, and structure analysis; these methods have the strict mathematical foundation, and each one has its good points, in actual analysis comprehensive use.


### 2.2. Modeling Business Process Based on Petri Network

Petri nets can be simply attributed to two basic concepts: events and conditions. The event is the system in action; event is determined by the system state control. System status may be described as a set of conditions; the predicate condition is a logical description of the system state or condition may also be true to false. Because the event is an action, it can happen; in order to make the event happen, certain conditions must be established in such a condition known as preconditions of the event. Events may damage the precondition and the other conditions are established; the condition is called postcondition events.Based on the basic Petri nets theory and according to the characteristics of the business process for the mutton supply chain, definition the expansion five tipples is given by:(1)∑=(S,T;F,W,M0),
where S is the library collection, representing the flow conditions; T is a transition set, representing the flow of events; F is the flow of the relationship between S and T; W is the weight, when the arc is not marked weights, its default value is given by 1; M0 is the initial marking, which means that is in the initial conditions, the each library token was been distribution.Mutton The mutton supply chain business process algorithm based on Petri nets modeling is given by:(1)
It is represented by a directed arc between tasks for library or process changes.(2)
There is only a starting place to run in the process beginning and has a termination end structure of the process end.(3)
The control structure is adopted the structure link together between starts and end by using the control structure routing. In addition, the beginning and end structure can also enter another control structure and can be linked together.(4)
Changes in the structure can be replaced by the control. A change in the input is replaced by the input library and library control structure of the merger and its output database output library and control structure of the merger.(5)
Repeat steps (3) and (4), until all the process control flow is processed.Using Petri net advantage to the mutton supply chain business process modeling is the behavior of flow by using the analysis method of Petri net analysis. On one hand, the model can reflect the flow characteristics and, on the other hand, can find out potential problems process and ensure the process rationality.Many systems or components can be considered at a time that is only a limited set of states in a “here we use word” and the system related to the history record [21]. A finite automaton is an abstract model with the original memory capacity of the machine. A great advantage of using finite automata is its support for formal verification. In food traceability business, completeness and correctness are crucial issues. As a formal model, finite automata model can support the completeness and correctness of the business logic analysis.Where setS={q0,q1,q2,q3,q4,q5,q6,q7,q}, T={0,1}, W={q}, F is composed of the following state transition equation:
(2)(q0,0)=q,(q0,1)=q1,(q1,0)=q0(q1,1)=q2,(q2,0)=q1,(q2,1)=q3(q3,0)=q,(q2,1)=q4,(q2,1)=q6(q6,1)=q5,(q5,1)=q4,(q6,1)=q7.Figure3 shows the state transition diagram ∑, where q represents the final state, q0 represents the initial state, q1 represents authentication, for receiving user service requests, q2 represents the basic food traceability information query request, such as the production date, food origin, source, and food production and processing information, q3 represents food processing enterprises query information, q4 is inquiries planting and cultivation of state food, q5 is breeding conditions survey, q6 is fertilizer and feed information inquiries, and q7 is related inquiries about disease prevention information.Figure 3
The state transition diagram of∑.In Figure3, triggering state transitions movement 0 indicates the operation failed; 1 indicates the success of the operation. Finite state machine mutton traceability system in the state basically can be expressed as a state transition graph directed graph method. The vertices of the graph represent the state of the system, with a small circle to describe. The side with an arrow indicates the status of the migration from the starting point. The state transition diagram notation is usually adopted if it is not in the specified context, the initial state using a pointing arrow indicating the status of the short tail and not pointing to any system.The business processes and conditions are described below.s0: begin; s1: breeding base of the sheep; s2: processing factory of sheep; s3: detection qualified sheep; s4: detect unqualified sheep; s5: temporary rearing of sheep; s6: emergency treatment after the sheep; s7: sheep carcass; s8: qualified sheep; s9: unqualified sheep; s10: bulk mutton; s11: sheep sheet processed; s12: bulk mutton processed products; s13: product; s14: qualified products; s15: unqualified products: s16: cold storage plant products; s17: product distribution centers; s18: store products; s19: sales of products.The business process of the event is described as follows.t0: aquaculture; t1: plant breeding base to transport; t2: admission detection; t3: relaying; t4: quarantine, emergency treatment; t5: phlebotomy, to the scales, gutted, cleaned, and disinfected; t6: light inspection; t7: cut; t8: cross-sectional slices, peeled, rinsing, disinfection, sterilization, weighing, packaging; t9: rinsing, pickling, drying, disinfection, sterilization, weighing, packaging; t10: packing; t11: metal detector; t12: refrigeration; t13: machining center to send transport; t14: distribution center to store transport; t15: encoding.The business process flow of events is as shown in Table1.Table 1
The flow of events.
Event
Preconditions
Postcondition
t0
s0
s1
t1
s1
s2
t2
s2
s3, s4
t3
s3
s5
t4
s4
s6
t5
s5
s6, s7
t6
s7
s8, s9
t7
s9
s10
t8
s10
s11
t9
s10
s12
t10
s11, s12
s13
t11
s13
s14, s15
t12
s14, s15
s16
t13
s16
s17
t14
s17
s18
t15
s18
s19As the above described process that the position is defined as Petri nets condition, event transfer methods, input transfer events corresponding pre-conditions, output transfer events corresponding post-condition; that is, ignition transfer incident position token condition is true. Based on the above ideas, mutton supply chain business process Petri net model is shown in Figure4.Figure 4
The Petri net model of supply chain business process of mutton.


## 2.1. Traceability Business Model Based on Petri Network

Petri network is used to describe discrete, distributed systems mathematical modeling tools. With the development of Petri network, in order to enhance the ability of Petri net description of the system, there were many Petri modeling methods extended to Petri nets, such as Predicate Transition Net (PTN) [16], Colored Petri Net (CPN) [17], and Object-Oriented Petri Net (OPN) [18], as well as other senior Petri nets.In the early stage, the main application field of Petri nets is in communication. In recent years, with the development of the theory of Petri nets, and its increasingly wide range of applications, such as areas of performance evaluation, communication protocols, and production systems [19], it has become asynchronous, concurrent, distributed, strong work in parallel and nondeterministic information systems of Petri nets [20].Petri nets as a graphical and mathematical modeling tool have four basic elements that are place, transition, arc, and token. A Petri net model is formed by the four basic elements, a Petri net model is formed by the four basic elements. In addition, there are common elements in the condition and event of Petri nets model. If a library has only two states and there is no token, it is called event that the library is said to conditions involving changes condition.Define the tripleN=(S,T;F) which is necessary and sufficient condition of Petri nets; it is given by:(1)
S∩Τ=ϕ;(2)
S∪T≠ϕ;(3)
F⊆(S×T)∪(T×S);(4)
dom⁡(F)∪cod(F)=S∪T.S is the set of libraries of N; T is the set of transitions N; F is a collection of S ordered pair elements; and a T-element has flow relation: is set to F contained in the first element and the second element-ordered pair consisting; is called N elements set.The reference pattern of Petri nets is expressed as a library with a round, or a rectangular, or a short line which indicates that changes by directed arcs represent ordered pair and token represented by solid dots. Figure2 is a graphical representation of Petri nets.Figure 2
Graphical representation of Petri nets.For different business processes that the task execution order is different, so it has relations sequence, parallel, selection and circulation between tasks. Petri nets can be divided behavioral characteristics and structural properties, it includes reachability, boundedness, liveness, and conservativeness.There are a lot of Petri net analysis methods; it not only has the static structure analysis but also has the analysis of dynamic behavior, such as reachability graph and coverability tree, that is, incidence matrix, invariant, linguistic analysis, computer simulation analysis, and structure analysis; these methods have the strict mathematical foundation, and each one has its good points, in actual analysis comprehensive use.


## 2.2. Modeling Business Process Based on Petri Network

Petri nets can be simply attributed to two basic concepts: events and conditions. The event is the system in action; event is determined by the system state control. System status may be described as a set of conditions; the predicate condition is a logical description of the system state or condition may also be true to false. Because the event is an action, it can happen; in order to make the event happen, certain conditions must be established in such a condition known as preconditions of the event. Events may damage the precondition and the other conditions are established; the condition is called postcondition events.Based on the basic Petri nets theory and according to the characteristics of the business process for the mutton supply chain, definition the expansion five tipples is given by:(1)∑=(S,T;F,W,M0),
where S is the library collection, representing the flow conditions; T is a transition set, representing the flow of events; F is the flow of the relationship between S and T; W is the weight, when the arc is not marked weights, its default value is given by 1; M0 is the initial marking, which means that is in the initial conditions, the each library token was been distribution.Mutton The mutton supply chain business process algorithm based on Petri nets modeling is given by:(1)
It is represented by a directed arc between tasks for library or process changes.(2)
There is only a starting place to run in the process beginning and has a termination end structure of the process end.(3)
The control structure is adopted the structure link together between starts and end by using the control structure routing. In addition, the beginning and end structure can also enter another control structure and can be linked together.(4)
Changes in the structure can be replaced by the control. A change in the input is replaced by the input library and library control structure of the merger and its output database output library and control structure of the merger.(5)
Repeat steps (3) and (4), until all the process control flow is processed.Using Petri net advantage to the mutton supply chain business process modeling is the behavior of flow by using the analysis method of Petri net analysis. On one hand, the model can reflect the flow characteristics and, on the other hand, can find out potential problems process and ensure the process rationality.Many systems or components can be considered at a time that is only a limited set of states in a “here we use word” and the system related to the history record [21]. A finite automaton is an abstract model with the original memory capacity of the machine. A great advantage of using finite automata is its support for formal verification. In food traceability business, completeness and correctness are crucial issues. As a formal model, finite automata model can support the completeness and correctness of the business logic analysis.Where setS={q0,q1,q2,q3,q4,q5,q6,q7,q}, T={0,1}, W={q}, F is composed of the following state transition equation:
(2)(q0,0)=q,(q0,1)=q1,(q1,0)=q0(q1,1)=q2,(q2,0)=q1,(q2,1)=q3(q3,0)=q,(q2,1)=q4,(q2,1)=q6(q6,1)=q5,(q5,1)=q4,(q6,1)=q7.Figure3 shows the state transition diagram ∑, where q represents the final state, q0 represents the initial state, q1 represents authentication, for receiving user service requests, q2 represents the basic food traceability information query request, such as the production date, food origin, source, and food production and processing information, q3 represents food processing enterprises query information, q4 is inquiries planting and cultivation of state food, q5 is breeding conditions survey, q6 is fertilizer and feed information inquiries, and q7 is related inquiries about disease prevention information.Figure 3
The state transition diagram of∑.In Figure3, triggering state transitions movement 0 indicates the operation failed; 1 indicates the success of the operation. Finite state machine mutton traceability system in the state basically can be expressed as a state transition graph directed graph method. The vertices of the graph represent the state of the system, with a small circle to describe. The side with an arrow indicates the status of the migration from the starting point. The state transition diagram notation is usually adopted if it is not in the specified context, the initial state using a pointing arrow indicating the status of the short tail and not pointing to any system.The business processes and conditions are described below.s0: begin; s1: breeding base of the sheep; s2: processing factory of sheep; s3: detection qualified sheep; s4: detect unqualified sheep; s5: temporary rearing of sheep; s6: emergency treatment after the sheep; s7: sheep carcass; s8: qualified sheep; s9: unqualified sheep; s10: bulk mutton; s11: sheep sheet processed; s12: bulk mutton processed products; s13: product; s14: qualified products; s15: unqualified products: s16: cold storage plant products; s17: product distribution centers; s18: store products; s19: sales of products.The business process of the event is described as follows.t0: aquaculture; t1: plant breeding base to transport; t2: admission detection; t3: relaying; t4: quarantine, emergency treatment; t5: phlebotomy, to the scales, gutted, cleaned, and disinfected; t6: light inspection; t7: cut; t8: cross-sectional slices, peeled, rinsing, disinfection, sterilization, weighing, packaging; t9: rinsing, pickling, drying, disinfection, sterilization, weighing, packaging; t10: packing; t11: metal detector; t12: refrigeration; t13: machining center to send transport; t14: distribution center to store transport; t15: encoding.The business process flow of events is as shown in Table1.Table 1
The flow of events.
Event
Preconditions
Postcondition
t0
s0
s1
t1
s1
s2
t2
s2
s3, s4
t3
s3
s5
t4
s4
s6
t5
s5
s6, s7
t6
s7
s8, s9
t7
s9
s10
t8
s10
s11
t9
s10
s12
t10
s11, s12
s13
t11
s13
s14, s15
t12
s14, s15
s16
t13
s16
s17
t14
s17
s18
t15
s18
s19As the above described process that the position is defined as Petri nets condition, event transfer methods, input transfer events corresponding pre-conditions, output transfer events corresponding post-condition; that is, ignition transfer incident position token condition is true. Based on the above ideas, mutton supply chain business process Petri net model is shown in Figure4.Figure 4
The Petri net model of supply chain business process of mutton.


## 3. Analysis of Functional Clustering Mutton Origin Time Series Data

### 3.1. Analysis of Time Series Data Function Cluster of Food

With the gradual refinement of the social division of labor, specialization of food production, food supply chains become increasingly complex [22]. With the refinement of the social division of labor that caused specialization production and supply chains become increasingly complex of food [22]. The intermediate link food from raw material production to final consumption becomes more and more complex, the food safety relates to the production, processing, storage, transportation and sales throughout the food supply chain [23]. It is Increased food intermediate links from production to consumption, to achieve the goal of the security problem analysis traced is to increase the probability of food safety issues. But because of the complexity of food data timeliness, the food traceability applications can only finish to food and raw material related to the collection of data, as well as some intuitive simple retrospective application. For example, a market mutton sold or heavy metals found in microbial contamination exceeding the traditional traceability system can be traced from the piece of meat, but it does not explain microbial contamination or excessive heavy metals and cannot make in-depth analysis of emerging issues and decision-making departments. It will be change over time that the mutton slaughter, transportation, sales process, water quality, feed ingredients and the surrounding environment growth process for several months, so the traditional system cannot effectively discrete data mining.To analyse the basic methods and ideas by using the functional data through the networking mutton supply chain traceability system based on a large amount of first-hand data extraction, create the timing chain clustering data of the mutton generality framework. By mining the mutton breeding, slaughtering, circulation, and consumption quality data, it can be effective in-depth statistics, analysis, and regulatory tracking; create a data center to regulatory corresponding results of the final release through a unified platform based on web technology.As a result the quality of morphological change over time is due to the sale of food production and processing is a dynamic process; most of the data is timing data type in the data center, such as the bacterial index chilled mutton slaughter plant environment index, temperature, and location data transport vehicles. The total number of colonies contains each market and the contact surface of the sales data and the like, and the characterized in that the attribute value is reflects the time order. The traditional methods mostly focused on the study of longitudinal data, but there are insufficient sample size and the estimated always difficult to measure the problem. In this paper, we introduced data function characteristics of the food chain, and the perspective of data methods is analyzed. First we analysis functional data, from the literature [24], and [25] give a description of a system, then that is literature [26] functional data.


### 3.2. Time Series Data Function Cluster Process

#### 3.2.1. Parametric Curve

The multiple time series data can have some more direct processing approach, but it may lead to timing index set changed, causing it to become difficult for practical application. but it will cause a great amount of computation that makes it difficult to get the final calculation result. So it is necessary to maintain the functional structure for the time series data by analysis and processing of sampled functional data. In order to maintain such configuration, usually using a linear or nonlinear curve fitting model and classified on the model coefficients. But the limitations of the linear model make it unable to fit some basic phenomena, nonlinear model and too little, so choice a relevant model is more trouble. Through using theB-spline basis fitting function data and then using the K-means to cluster the colony data, B-spline function is convenient in polynomial computation can also adapt to the specific application environment.Suppose that{G1,…,Gn} is a discrete set of independent data function curve. Firstly, it can fit the observed data by using the regression spline function.GivenK nodes (knots), distributed in [a,b] interval, meet the conditions:
(3)(ξ0=)a<ξ1<ξ2<⋯<ξn<b(=ξn+1).
The spline function s(x) is an arbitrary interval on interval and is a polynomial of degree d and has a d-1 continuous derivative on the interval [a, b]. For a fixed node sequence, spline set of linear space is a function of p=K+d+1. A sequence commonly used is the B-splines linear space. It is given a spline expressed by
(4)s(x,β)=∑i=1pβkBk(x),
where β=(β1,…,βp) is the vector of the spline coefficients. A cubic B-spline basis can give a smooth curve; B-spline basis is well suited as a single-variable regression-based function. For fixed nodes, the smallest quadratic spline element is equivalent to a linear problem, once the B-spline basis; it is not difficult to find the polynomial regression.CurveGi is a range of [a,b]×R, it is including the mi observations, the collection of data types for (xji,Yji)j=1,…,mi regression. At the same time, the sample matrix function of mi×p matrix corresponding is the representation of, and Bi={Bk(xji)}j=1,…,mik=1,…,p, and Yi=(Y1i,…,Ymii). This data is used to fit through a spline intuitive least-squares problem. Spline coefficients can be calculated by the following equation:
(5)βi=argmin⁡1mi∑j=1mi(Yji-s(xji,βi))2.


#### 3.2.2. Clustering

SupposeK is a constant; in order to put n observations into k, the vector n spline coefficients need an unsupervised clustering technique. The set of has n objects, it can be constructed according to {βi,…,βn} the partitions of the same class, the partition means is z={cl,…,ck} the, where each cl is within in Rp, the problem is to choose a z={cl,…,ck}, get the minimize data function is given by
(6)1n∑i=1nmin⁡∥βi-c∥2,
where ∥·∥ represents the Euclidean norm. This problem is equivalent to finding {βi,…,βn} partition {cl,…,ck}, so we can get a minimum given by
(7)1n∑i=1n∑βi∈cj∥βi-c∥2,
where cj is the center of Ci, the first step in the algorithm; each βi is assigned to the nearest cluster center. In this way, each data center will have access to a subset of the knife as its base. If the mean value cj with the replacement cluster, the mean value of the point Ci may be reduced further when it can be reassigned to a number of new β center.Clustering process is described as follows.Step 1.
Input the number of clustersK, with n sample points databases S.Step 2.
The related information functionF(n,p) is recorded for each cluster, where n is the number of data points in each cluster; p is the average of each cluster data point that is K-means clustering algorithm initial heart values.Step 3.
It record thek number of each cluster and can be restricted by the K time DBSCAN algorithm terminates, the K is also determined by the number of clusters K-means clustering algorithm.Step 4.
OutputK clustering center is C.Step 5.
SelectedK arbitrarily sample points as the initial cluster centers.Step 6.
Every other sample point data set is to calculate the distance in the cluster center and then assign them to the appropriate class based on the nearest principle.Step 7.
Calculate the new cluster center: innovation average for each sample point in the formation of a class.Step 8.
Repeat process Step5 and Step 6, until the distances between the classes and βi are no longer changed.


#### 3.2.3. K-Means Consistency

Check the following progressive characteristicsz average. Let v interval [a,b] on a positive measure, L2 is a function f Hilbert space, it is given by
(8)∥f∥2=(∫abf(x)2v(dx)1/2)≺∞.
Let (Gn)n be an independent and identically distributed random sequence of functions, mapping from the probability space (Ω,A,P) to (L2,β), where β is the Borel field, for each f∈L2, set from L2 to ∏(f) generated by the B-spline subspace(B1,…,Bp), the coordinates is the orthogonal projection vector, so ∏(f) is a unique β∈Rp, so we have:
(9)inf⁡∥f-s(·,β)∥2=∥f-s(·,∏(f))∥2.
Let βRp and μ denote the Rp domain and P images Borel measure, since ∏ is continuous, (Rp,βRp,μ) is a probability space, a sequence (G1,G2,…,Gn) comprising the sequence Rp random vector βi=∏(Gi) of the βn=(β1,β2,…,ϕn).


## 3.1. Analysis of Time Series Data Function Cluster of Food

With the gradual refinement of the social division of labor, specialization of food production, food supply chains become increasingly complex [22]. With the refinement of the social division of labor that caused specialization production and supply chains become increasingly complex of food [22]. The intermediate link food from raw material production to final consumption becomes more and more complex, the food safety relates to the production, processing, storage, transportation and sales throughout the food supply chain [23]. It is Increased food intermediate links from production to consumption, to achieve the goal of the security problem analysis traced is to increase the probability of food safety issues. But because of the complexity of food data timeliness, the food traceability applications can only finish to food and raw material related to the collection of data, as well as some intuitive simple retrospective application. For example, a market mutton sold or heavy metals found in microbial contamination exceeding the traditional traceability system can be traced from the piece of meat, but it does not explain microbial contamination or excessive heavy metals and cannot make in-depth analysis of emerging issues and decision-making departments. It will be change over time that the mutton slaughter, transportation, sales process, water quality, feed ingredients and the surrounding environment growth process for several months, so the traditional system cannot effectively discrete data mining.To analyse the basic methods and ideas by using the functional data through the networking mutton supply chain traceability system based on a large amount of first-hand data extraction, create the timing chain clustering data of the mutton generality framework. By mining the mutton breeding, slaughtering, circulation, and consumption quality data, it can be effective in-depth statistics, analysis, and regulatory tracking; create a data center to regulatory corresponding results of the final release through a unified platform based on web technology.As a result the quality of morphological change over time is due to the sale of food production and processing is a dynamic process; most of the data is timing data type in the data center, such as the bacterial index chilled mutton slaughter plant environment index, temperature, and location data transport vehicles. The total number of colonies contains each market and the contact surface of the sales data and the like, and the characterized in that the attribute value is reflects the time order. The traditional methods mostly focused on the study of longitudinal data, but there are insufficient sample size and the estimated always difficult to measure the problem. In this paper, we introduced data function characteristics of the food chain, and the perspective of data methods is analyzed. First we analysis functional data, from the literature [24], and [25] give a description of a system, then that is literature [26] functional data.


## 3.2. Time Series Data Function Cluster Process

### 3.2.1. Parametric Curve

The multiple time series data can have some more direct processing approach, but it may lead to timing index set changed, causing it to become difficult for practical application. but it will cause a great amount of computation that makes it difficult to get the final calculation result. So it is necessary to maintain the functional structure for the time series data by analysis and processing of sampled functional data. In order to maintain such configuration, usually using a linear or nonlinear curve fitting model and classified on the model coefficients. But the limitations of the linear model make it unable to fit some basic phenomena, nonlinear model and too little, so choice a relevant model is more trouble. Through using theB-spline basis fitting function data and then using the K-means to cluster the colony data, B-spline function is convenient in polynomial computation can also adapt to the specific application environment.Suppose that{G1,…,Gn} is a discrete set of independent data function curve. Firstly, it can fit the observed data by using the regression spline function.GivenK nodes (knots), distributed in [a,b] interval, meet the conditions:
(3)(ξ0=)a<ξ1<ξ2<⋯<ξn<b(=ξn+1).
The spline function s(x) is an arbitrary interval on interval and is a polynomial of degree d and has a d-1 continuous derivative on the interval [a, b]. For a fixed node sequence, spline set of linear space is a function of p=K+d+1. A sequence commonly used is the B-splines linear space. It is given a spline expressed by
(4)s(x,β)=∑i=1pβkBk(x),
where β=(β1,…,βp) is the vector of the spline coefficients. A cubic B-spline basis can give a smooth curve; B-spline basis is well suited as a single-variable regression-based function. For fixed nodes, the smallest quadratic spline element is equivalent to a linear problem, once the B-spline basis; it is not difficult to find the polynomial regression.CurveGi is a range of [a,b]×R, it is including the mi observations, the collection of data types for (xji,Yji)j=1,…,mi regression. At the same time, the sample matrix function of mi×p matrix corresponding is the representation of, and Bi={Bk(xji)}j=1,…,mik=1,…,p, and Yi=(Y1i,…,Ymii). This data is used to fit through a spline intuitive least-squares problem. Spline coefficients can be calculated by the following equation:
(5)βi=argmin⁡1mi∑j=1mi(Yji-s(xji,βi))2.


### 3.2.2. Clustering

SupposeK is a constant; in order to put n observations into k, the vector n spline coefficients need an unsupervised clustering technique. The set of has n objects, it can be constructed according to {βi,…,βn} the partitions of the same class, the partition means is z={cl,…,ck} the, where each cl is within in Rp, the problem is to choose a z={cl,…,ck}, get the minimize data function is given by
(6)1n∑i=1nmin⁡∥βi-c∥2,
where ∥·∥ represents the Euclidean norm. This problem is equivalent to finding {βi,…,βn} partition {cl,…,ck}, so we can get a minimum given by
(7)1n∑i=1n∑βi∈cj∥βi-c∥2,
where cj is the center of Ci, the first step in the algorithm; each βi is assigned to the nearest cluster center. In this way, each data center will have access to a subset of the knife as its base. If the mean value cj with the replacement cluster, the mean value of the point Ci may be reduced further when it can be reassigned to a number of new β center.Clustering process is described as follows.Step 1.
Input the number of clustersK, with n sample points databases S.Step 2.
The related information functionF(n,p) is recorded for each cluster, where n is the number of data points in each cluster; p is the average of each cluster data point that is K-means clustering algorithm initial heart values.Step 3.
It record thek number of each cluster and can be restricted by the K time DBSCAN algorithm terminates, the K is also determined by the number of clusters K-means clustering algorithm.Step 4.
OutputK clustering center is C.Step 5.
SelectedK arbitrarily sample points as the initial cluster centers.Step 6.
Every other sample point data set is to calculate the distance in the cluster center and then assign them to the appropriate class based on the nearest principle.Step 7.
Calculate the new cluster center: innovation average for each sample point in the formation of a class.Step 8.
Repeat process Step5 and Step 6, until the distances between the classes and βi are no longer changed.


### 3.2.3. K-Means Consistency

Check the following progressive characteristicsz average. Let v interval [a,b] on a positive measure, L2 is a function f Hilbert space, it is given by
(8)∥f∥2=(∫abf(x)2v(dx)1/2)≺∞.
Let (Gn)n be an independent and identically distributed random sequence of functions, mapping from the probability space (Ω,A,P) to (L2,β), where β is the Borel field, for each f∈L2, set from L2 to ∏(f) generated by the B-spline subspace(B1,…,Bp), the coordinates is the orthogonal projection vector, so ∏(f) is a unique β∈Rp, so we have:
(9)inf⁡∥f-s(·,β)∥2=∥f-s(·,∏(f))∥2.
Let βRp and μ denote the Rp domain and P images Borel measure, since ∏ is continuous, (Rp,βRp,μ) is a probability space, a sequence (G1,G2,…,Gn) comprising the sequence Rp random vector βi=∏(Gi) of the βn=(β1,β2,…,ϕn).


## 3.2.1. Parametric Curve

The multiple time series data can have some more direct processing approach, but it may lead to timing index set changed, causing it to become difficult for practical application. but it will cause a great amount of computation that makes it difficult to get the final calculation result. So it is necessary to maintain the functional structure for the time series data by analysis and processing of sampled functional data. In order to maintain such configuration, usually using a linear or nonlinear curve fitting model and classified on the model coefficients. But the limitations of the linear model make it unable to fit some basic phenomena, nonlinear model and too little, so choice a relevant model is more trouble. Through using theB-spline basis fitting function data and then using the K-means to cluster the colony data, B-spline function is convenient in polynomial computation can also adapt to the specific application environment.Suppose that{G1,…,Gn} is a discrete set of independent data function curve. Firstly, it can fit the observed data by using the regression spline function.GivenK nodes (knots), distributed in [a,b] interval, meet the conditions:
(3)(ξ0=)a<ξ1<ξ2<⋯<ξn<b(=ξn+1).
The spline function s(x) is an arbitrary interval on interval and is a polynomial of degree d and has a d-1 continuous derivative on the interval [a, b]. For a fixed node sequence, spline set of linear space is a function of p=K+d+1. A sequence commonly used is the B-splines linear space. It is given a spline expressed by
(4)s(x,β)=∑i=1pβkBk(x),
where β=(β1,…,βp) is the vector of the spline coefficients. A cubic B-spline basis can give a smooth curve; B-spline basis is well suited as a single-variable regression-based function. For fixed nodes, the smallest quadratic spline element is equivalent to a linear problem, once the B-spline basis; it is not difficult to find the polynomial regression.CurveGi is a range of [a,b]×R, it is including the mi observations, the collection of data types for (xji,Yji)j=1,…,mi regression. At the same time, the sample matrix function of mi×p matrix corresponding is the representation of, and Bi={Bk(xji)}j=1,…,mik=1,…,p, and Yi=(Y1i,…,Ymii). This data is used to fit through a spline intuitive least-squares problem. Spline coefficients can be calculated by the following equation:
(5)βi=argmin⁡1mi∑j=1mi(Yji-s(xji,βi))2.


## 3.2.2. Clustering

SupposeK is a constant; in order to put n observations into k, the vector n spline coefficients need an unsupervised clustering technique. The set of has n objects, it can be constructed according to {βi,…,βn} the partitions of the same class, the partition means is z={cl,…,ck} the, where each cl is within in Rp, the problem is to choose a z={cl,…,ck}, get the minimize data function is given by
(6)1n∑i=1nmin⁡∥βi-c∥2,
where ∥·∥ represents the Euclidean norm. This problem is equivalent to finding {βi,…,βn} partition {cl,…,ck}, so we can get a minimum given by
(7)1n∑i=1n∑βi∈cj∥βi-c∥2,
where cj is the center of Ci, the first step in the algorithm; each βi is assigned to the nearest cluster center. In this way, each data center will have access to a subset of the knife as its base. If the mean value cj with the replacement cluster, the mean value of the point Ci may be reduced further when it can be reassigned to a number of new β center.Clustering process is described as follows.Step 1.
Input the number of clustersK, with n sample points databases S.Step 2.
The related information functionF(n,p) is recorded for each cluster, where n is the number of data points in each cluster; p is the average of each cluster data point that is K-means clustering algorithm initial heart values.Step 3.
It record thek number of each cluster and can be restricted by the K time DBSCAN algorithm terminates, the K is also determined by the number of clusters K-means clustering algorithm.Step 4.
OutputK clustering center is C.Step 5.
SelectedK arbitrarily sample points as the initial cluster centers.Step 6.
Every other sample point data set is to calculate the distance in the cluster center and then assign them to the appropriate class based on the nearest principle.Step 7.
Calculate the new cluster center: innovation average for each sample point in the formation of a class.Step 8.
Repeat process Step5 and Step 6, until the distances between the classes and βi are no longer changed.


## 3.2.3. K-Means Consistency

Check the following progressive characteristicsz average. Let v interval [a,b] on a positive measure, L2 is a function f Hilbert space, it is given by
(8)∥f∥2=(∫abf(x)2v(dx)1/2)≺∞.
Let (Gn)n be an independent and identically distributed random sequence of functions, mapping from the probability space (Ω,A,P) to (L2,β), where β is the Borel field, for each f∈L2, set from L2 to ∏(f) generated by the B-spline subspace(B1,…,Bp), the coordinates is the orthogonal projection vector, so ∏(f) is a unique β∈Rp, so we have:
(9)inf⁡∥f-s(·,β)∥2=∥f-s(·,∏(f))∥2.
Let βRp and μ denote the Rp domain and P images Borel measure, since ∏ is continuous, (Rp,βRp,μ) is a probability space, a sequence (G1,G2,…,Gn) comprising the sequence Rp random vector βi=∏(Gi) of the βn=(β1,β2,…,ϕn).


## 4. Experiments and Results

To verify the effectiveness of the presented method, select 60 days, December 1, 2013, to February 1, 2014, with a mutton supply chain process of continuous monitoring data for each contact surface and popliteal surface microbial contamination condition data. Analysis of microbial pollution factors through the monitoring of microbial contamination in the slaughter, transportation, sales and other meat supply chain link, the total number of bacteria per unit area to measure microbial pollution indicators, with the change of time, the influence of humidity temperature on the surface and the contact surface of the mutton in the total number is bacteria changing. There were 20 contact surface colony counts in the time series data, including tools, workers’ hands, slaughter workshop air, cooling air, slaughtering water, tray, refrigerator car air, partition table, packaging materials, packaging workshop air.First, we use ofB-spline basis function vector of curve smoothing knife; a set of internal nodes must be properly selected according to the colony data. If all sample intervals have equal priority, then the node is equal to the more appropriate distance, usually only the part range is more important, so the internal nodes must be spread out along these intervals, where select cubic B-spline and seven nodes mutton chain based on the data collected and the specific aspects, based on the data collected and the specific aspects of a mutton chain situation that select cubic B-spline and seven nodes ξ=(3.0,3.2,4.3,4.7,5.2,5.6,6.3,7.2) gcfu/cm2.In the 3000 data objects, randomly select 300 samples’ data to constitute a data set and density-based clustering; the simulation results are shown in Figure5.Figure 5
Random sample clustering.Then use the S-Plus of K-means function divided the B vector into three groups and the three initial cluster center, it can get high quality clustering results by using the K-means algorithm for the entire data sets clustering; the corresponding block is shown in Figure6.Figure 6
Final clustering results.Such data are also colonies of each contact surface is divided into three categories, and can be seen from the graph of each sub-colony clustering results are basically similar level of contact surface changes came together, clustering results nicely captures the total number of colonies in the form of on similarity, which can provide the basis for further analysis and decision-makers.


## 5. Conclusions

In this paper, we study the application of the model mutton traceability system. Firstly, from the point of view of information management and technology for the food traceability system involves information collection, transmission, integration, processing, regulatory and other aspects of the problem,and then explore the application architecture, standards and key technologies traceability system; Secondly, to simulate the traceability process, finite automata theory and finite automata model traceability system; Finally, analysis a function of cluster using the complex timing and strong traceability data, the complex discrete data clustering continuous classified information, making traceability data availability greatly enhanced.



---

*Source: 506580-2014-08-10.xml*