IoT Network for International Trade Cold Chain Logistics Tracking Based on Kalman Algorithm

The application of Internet of Things technology in cold chain transportation can greatly strengthen the monitoring of all aspects of cold chain logistics, so as to promote the progress of cold chain logistics industry. In order to study this aspect, this paper chooses the key link of the Internet of Things as a breakthrough. By analyzing various aspects of the transportation process, an Internet of Things middleware framework serving cold chain transportation tracking is designed. The main products of logistics cold chain transportation are fresh agricultural products, so in order to further make the research fit the actual situation, this paper collects the logistics data and information of agricultural products through investigation and combines the core technology of agricultural products logistics with the Internet and the key technology of cold chain transportation to process the obtained information. The analytic hierarchy process and fuzzy comprehensive evaluation method are used in this process. The processing results prove the validity and rationality of the established index system. The purpose of developing the international trade management system is to enable the company to optimize its international trade management process, reduce some tedious and inconvenient manual operations, make the recording and statistics of international trade information very simple, improve work efficiency, and satisfy the information needs of various departments to enable enterprises to minimize costs, thereby enabling enterprises to obtain better economic benefits.


Introduction
e emergence of the Internet of ings platform has greatly facilitated our daily lives and has also greatly improved people's work efficiency [1]. However, it must be noted that only by complying with the rules and standards of the Internet of ings platform at this stage can the corresponding technical equipment be fully connected. Cold chain transportation is the successful application of the Internet of ings technology in the logistics platform [2]. In this link, the widespread use of sensors has greatly promoted the development of cold chain transportation.
is article mainly studies how to use various types and functions. e sensors provide better service for cold chain transportation [3]. e Internet of ings middleware in the cold chain transportation link is selected as the research object. By analyzing various aspects of the transportation process, an Internet of ings middleware framework serving cold chain transportation tracking is designed [4]. In addition, in order to better deal with the communication obstacles between different sensors, and, at the same time, to filter the useless and redundant data in the sensors, we adopted D-Bus technology and designed the communication means between different sensors [5]. e focus of this article is to prove that IoT technology can optimize and enhance China's agricultural cold chain logistics. In view of this problem, the literature combined with the actual situation of the operation and development of agricultural cold chain logistics enterprises, in view of the problems existing in the enterprise process, the agricultural cold chain logistics mode starting from the enterprise was constructed [6]. e literature combines the previous research experience, uses the Internet technology, solves the practical problems in the development process of cold chain logistics, and upgrades and improves the existing logistics [7]. e international trade management system enables companies to minimize costs and better select suppliers, products, and customer information, thereby enabling companies to obtain better economic benefits [8].

Related Works
e literature has done in-depth research on cold chain logistics middleware; its purpose is to solve the problem of connection and data interaction between different sensor nodes in the cold chain tracking process in the Internet of ings environment, while ensuring the accuracy of data transmission. In the cold chain transportation link, data errors are not allowed [9]. is article adds a data processing module to the middleware of the Internet of ings, which improves the efficiency and accuracy of data collection by the middleware. e literature designed the cold chain logistics tracking middleware to solve a series of problems when collecting cold chain sensor data. e purpose of developing an international trade management system is to enable a limited company to optimize its international trade management process [10]. e international trade management system can reduce some tedious and inconvenient manual operations, make the recording and statistics of international trade information very simple, and improve work efficiency [11,12]. e international trade management system can meet the information needs of various departments, so that companies can minimize costs and better select suppliers, products, and customer information, so that companies can obtain better economic benefits [13].
In embedded devices, embedded devices usually have many sensor nodes. It should be noted that, in these sensor nodes, the memory of each sensor node is relatively small [14]. However, according to the current state of technological development, most operating systems on the market are equipped with large-capacity storage devices, and largecapacity storage devices can promote the increase in computing speed to a certain extent. erefore, when comparing embedded devices with other operating systems on the market, the processing speed of the embedded operating systems is much lower than other large operating systems [15,16]. In the following description in this article, nonembedded general-purpose computer devices are collectively referred to as general-purpose devices. In daily real-life use, the general-purpose device must support the data transmission function of the near-end network, and the data transmission function enables communication and data exchange between the sensor node and the generalpurpose device [17]. D-Bus technology is an end-to-end communication technology, which is used for each sensor and general device in the near-end network to ensure that the communication and data transmission between the sensor node and the general device can be carried out normally [18].

Overview of Related Technologies of IoT Middleware.
REST refers to the state transfer of the presentation layer, which means that the relevant data of the resource network management center is transferred in a certain way or in a certain state. e main manifestations of the resource representative data are JSON, XML, etc., and the state change is through HTTP verb implementation.
In a period when Internet technology and science and technology were not developed, there was a problem of low penetration rate of mobile device terminals. erefore, in order to save resources and reduce expenses, the client and server are usually combined together. However, in recent years, science and technology have continued to develop, and the penetration rate of the Internet and the Internet of ings has been rising, and various types of Client service plug-ins have appeared. erefore, REST can provide services for various types of platforms through related service plug-ins.
In the process of REST providing services for various platforms, REST is always in the stateless constraint stage. erefore, when the server and the client use the REST framework for interactive communication, the server does not need to know the usage status of the client. Moreover, in the process of interaction, there will be no information loss, and the server and the client can clearly identify and judge the received information.
REST is in the stateless constrained stage. It means that when REST provides services, each web service in REST is in an independent state, and the server does not save the relevant state information of the client.
e REST system conducts standard state interaction through its own resources. erefore, when REST provides services, it does not require a specific interface as an intermediary.
Four basic HTTP verbs are used in the REST system to interact with resources, as shown in Table 1.
Using the REST architecture can make full use of the various functions brought by the HTTP protocol and make the software architecture design clearer and maintainable.
Hidden Markov model is a kind of probability model, which expresses the sequentiality of a set of random processes through probability description. In the hidden Markov model, the most important component is the Markov chain. In the actual application process of the hidden Markov model, the real state of the location is represented by the hidden Markov chain.
Assume that Q is the set of all states, and V is the set of all observed states.
I is the state sequence of length T, and O is the corresponding observation sequence.
e state transition probability matrix is as follows: Among them, 2 Computational Intelligence and Neuroscience e observation probability matrix is Among them, e hidden Markov model is represented by a ternary symbol: e Kalman algorithm is the most commonly used estimation algorithm.
e Kalman algorithm has the characteristics of small calculation requirements and good recursion in the actual application process. erefore, since the Kalman algorithm was proposed, it has been widely used, and the Kalman algorithm has gradually developed into an optimal estimation algorithm. e typical use of Kalman algorithm is to smooth noisy data. Kalmar filter is an accurate reasoning algorithm, which is similar to Bayesian model, but there are certain differences between the two. e latent variable of Kalman filter is always in a continuous state in the state space.
Kalman filter is mainly used in solving random linear discrete systems and parameter estimation. In the actual application process, the steps of using the Kalman filter are divided into estimation and correction. Estimation refers to constructing a priori estimation of the next state based on the current prior state value and then after a reasonable calculation. Correction refers to the use of parameter update equations to check the previously constructed prior estimates. e correction process is mainly a feedback process. e time update equation and state update equation of the discrete Kalman filter are as follows:

IoT Middleware Architecture for Cold Chain Logistics
Tracking. is article assumes that each node with middleware installed is peer-to-peer; that is, each node can be either a consumer or a producer. Consumers remotely call the near-end network to find the required nodes and obtain services, and the provider nodes have unique IDs to facilitate the calls of consumers. Figure 1 describes how external devices access specific services required in a near-end network.
Based on the design idea of this article, in the cold chain traceability environment, the IoT middleware needs to trace all the data in its environment and also provide services for each node of the sensor. e IoT middleware can schedule the location and location of sensor nodes in real time. e current data transmission method uses the above functions to complete data collection and data error correction. In summary, the detailed system architecture diagram of the IoT middleware is shown in Figure 2.
According to Figure 2, the IoT middleware proposed in this article mainly does the following work: (1) Access technology abstraction layer: when sensor nodes choose different transmission methods, there is no need to write communication code. (2) Data processing: including filtering of redundant data and error correction of data with strict requirements. (3) Remote call node service: the method executed by remote call runs in the remote node. Unlike local call, the remote node service runs in a different process.
To communicate with it, the following problems need to be solved: (a) ID mapping: because the function pointer cannot be used like a local call, the corresponding method in each node must have a corresponding ID to implement the corresponding method. (4) Different node communication design: introduce D-Bus technology, connect each sensor node to the session bus, connect general equipment to the session bus and system bus, and then use the system bus daemon to communicate with the sensor nodes.
In the process of cold chain traceability, a large number of sensor nodes are used, and these sensors will generate a large amount of real-time data. However, in actual use, due to various problems such as poor network quality, some error data will be generated, resulting in redundancy of data information; due to the existence of error data, the processing efficiency of the system is greatly reduced. erefore, how to deal with these wrong data has become the focus of the next research. Because the cold chain link requires data to have high accuracy, data error correction is required, and unnecessary network expenses can be reduced through data error correction.

Redundant Data Filtering.
In the Bloom Filter-based filtering algorithm, the system adds a timestamp attribute to each data that reaches the data processing layer and sets the time threshold between two data receptions. When the time difference between two adjacent data received exceeds the threshold, or the time difference is less than the threshold, but the data is the same, it is determined as redundant data; otherwise, it is determined that the remaining data is nonredundant data. Set Terminal ID to represent the ID of the sensing device, which has unique properties, and Send Time represents the timestamp when data is sent to the data processing layer, and the set time interval between adjacent data is the Time reshold. e specific schematic diagram is shown in Figure 3. en, establish the following rules: (a) Check the parity bit of the data to determine whether the data is distorted. (b) After receiving the data, the data processing layer determines whether there is a terminal identification code in the sensor device information corresponding to the receiving time point. (c) Judging whether the new data value of the same terminal identification code in rule (b) is the same: if they are the same, it is judged as duplicate data; if they are different, the original data is updated. (d) e old data and the same data are judged as redundant data, and the redundant data is directly discarded.
erefore, when the data processing layer receives data, the system processing steps are as follows: (a1) Determine whether the data is distorted by the check bit, and discard it if distorted.

The user
The Internet The cloud service The gateway node Proximal node 1 (producer) Proximal node 2 (producer) Proximal node 4 (consumer) Proximal node 3 (consumer) The proximal network  Sensor data error correction: after the transmission data is obtained, due to the influence of factors such as environment and equipment, in the process of data display and processing using the obtained data, error data that obviously does not conform to the logic and the scene will be found. erefore, a corresponding data error correction module needs to be added to the middleware of the Internet of ings. e data error correction is performed through the data error correction module, and the error data is eliminated, thereby improving the accuracy of the collected data.

Design and Implementation of Middleware Remote
Procedure Call. In the cold chain traceability link, users of sensor nodes and middleware can call the internal data of the system at any time and can provide users with corresponding service requirements by calling the data.
(1) REST Interface Design. It is extremely important to design a unified style interface, which is also clear for later maintenance. e corresponding verbs and resource operations are shown in Table 2.
According to the above principles, the design of the cold chain link interface is as follows: (1) GET: get the temperature of a specific node (2) POST: update the temperature of the node (error correction operation, etc.) When using the local method for data processing, you only need to add the data to be processed to the relevant stack, and the local method can automatically call the relevant parameters to process the relevant data. In the method of using remote calls, the programming language used by the client and the server may be different, and the processing process may not be at the same stage. erefore, the memory transfer method cannot be used for data processing. erefore, the client needs to convert the parameters and data it wants to transmit into a binary byte stream and then send it to the server. Finally, the server converts the received binary byte stream into a coded form that it can read. In the above operations, the process of converting parameters and data into a binary byte stream is called serialization, and the process of converting a binary byte stream into a readable encoding form is called deserialization. In the actual application process, whether the client transmits parameters and data to the server, or the server transmits parameters and data to the client, both of them need to undergo the serialization and deserialization processes. e related schematic diagram is shown in Figure 4.
In the actual application process, the programming languages used by different servers and different clients are not the same, and different programming languages will cause   Computational Intelligence and Neuroscience differences in data structures, and differences in data structures will lead to differences in the representation of binary structures. If different, the client and server need to specify some transmission protocols when performing serialization and deserialization operations. Currently, common transmission protocols include XML, JSON, and rift. However, the XML transfer protocol has certain disadvantages. Since the amount of information transmitted between the sensor node and the client is not large, the resulting byte stream will be lengthy and complicated when the XML protocol is used for serialization. In contrast, the JSON protocol is better in the process of use. Compared with the XML protocol, the JSON protocol uses the data processed by the JSON protocol to have a simpler data format, faster parsing density, and better readability. e most important point is that, after serialization using the JSON protocol, the resulting file size is smaller. erefore, in actual applications, in order to ensure the conciseness of the obtained data, we often use the JSON protocol as an intermediate protocol when performing serialization and deserialization operations. In the actual use, you will find that the computing power of embedded devices will be affected by the memory of the sensor node. If the memory of a sensor node is larger, its computing power will be stronger. Similarly, if the memory of a sensor node is smaller, the computing power of the embedded device is smaller. erefore, when the sensor node is in use, it is only introduced into the session bus to reduce expenses through such measures. General-purpose devices are different from sensor nodes because generalpurpose devices need to serve the entire system at all times. erefore, in the process of use, general-purpose devices are introduced into the system bus and the session bus. e system bus will automatically start when the general-purpose device is running and shut down when the generalpurpose device is closed. In the system bus, the bus daemon can communicate with other processes in the system during the running process, and the sensor node is running. In the process, different sensors can use different session buses to access the system bus.
erefore, sensor nodes can send signals by using the session bus and then connect with each process. e specific steps are divided into the following: (1) the node first sends the target address to the general-purpose device to request access to the system bus.
(2) e system bus processes the request information relayed by the generalpurpose equipment and forwards the request information to the logo node. (3) e slogan node responds to the received information, and then the daemon sends the response information back to the node. rough the specific communication steps, it can be seen that the communication between the node and the system needs to pass through the daemon of the system bus, which means that when the sensor node communicates with the system, the daemon of the system can play an intermediary role, and at the same time, it can ensure the security of messages and the schematic diagram of communication between nodes, which are shown in Figure 5.
In summary, sensor nodes can communicate with general-purpose devices. In the process of connection and communication, the daemon acts as an intermediary to ensure the security of information in this way.

Research on Data Error Correction Technology of Cold Chain Logistics Middleware.
e Kalman filter is suitable for the estimation of dynamic data. e optimal state is given by estimating the dynamic data. Because there is noise in the  6 Computational Intelligence and Neuroscience dynamic data, the data measured by the sensor is not accurate, so the Kalman filter is used to filter out the noise and estimate the true state value of the data. During data calculation, vector data such as temperature and humidity can be converted into scalar data. e predicted deviation of temperature type is In a cold chain vehicle, first assume that the temperature at time K and at time K − 1 are the same. At this time, calculate the Kalman gain: And estimate the temperature at time K: Solve the optimal deviation at time T k : Iteratively process the calculated temperature at T k+1 and the measured temperature to obtain more realistic temperature data.
It should be noted that if the monitored data is very far away from the corresponding road section, it can be determined with a high probability that the detected location point is not on the road section. However, if the GPS signal has a large error, the above situation will also occur.
erefore, under this background, this article gives a related optimization plan, through which this kind of situation can be avoided, thereby improving the accuracy of trajectory correction. e relevant calculation formula is as follows: In the calculation process, taking into account the GPS noise during the transportation process, the value of the element in the observation probability matrix is set as Among them, σ is the standard deviation of GPS measurements. When solving the state transition probability function, there is no need to consider the positioning information relationship between the devices; only the information between the real positions is considered. If the distance between the two candidate real positions is shorter, the probability that the two candidates actually undergo a state transition is also greater. Based on the above situation, it can be seen that the state transition probability is proportional to the distance between candidate points. e relevant calculation formula is as follows: e initial state probability of the vehicle trajectory model can be expressed as e path solved by the Vibit algorithm will correspond to a hidden state sequence. Its iterative principle formula is as follows: en, in time t, the maximum probability node of a single path is In the actual survey process, the original data was obtained through questionnaire surveys, and the corresponding weight judgment matrix was determined by comparing the importance of indicators. First-level index weight judgment matrix is shown in Table 3. IOT organizational structure U1 weight judgment matrix is shown in Table 4. Secondary index score is shown in Table 5.
(1) Data that requires stable temperature and humidity: In the process of data processing, the temperature of the cold chain vehicle is set to T � 5°C, and then the values of Tpe, Kg, Tk, and Toe are calculated according to the smooth data error correction algorithm of Kalman filtering. (2) Latitude and longitude: Choose about 500 anchor points, and the time interval between each anchor point is s to obtain ten trajectory data sets. e time is stored in a unix timestamp format for convenience. Some data are shown in Table 6.

International Trade Management Demand Analysis.
rough the LAMP trade management system, users can conveniently and quickly query relevant data and information, while also reducing management costs, making enterprise management systematized and accurate. e system management module is composed of many management subsystems, and the administrator manages the whole by manipulating the subsystems. e management system mainly provides managers with the following two aspects of help: first, manage employee information. Second, the system administrator can back up, restore, and manage the information in the database. At the same time, the system also restricts the administrator's authority and functions to a certain extent to ensure the safety of the entire system, thereby providing convenience for international trade management activities. e purchasing management module of the system is usually controlled by purchasing personnel.
e specific business process is as follows: first, the purchasing personnel determine the purchase list according to the actual situation, and the management and modification of the list are controlled by the purchasing personnel. After receiving the purchase list, the purchasing department confirms the content of the purchase order. e system combines the data and information of each supplier in the database to make a comprehensive judgment and gives the most cost-effective supplier information. e purchasing department conducts actual negotiation with the supplier based on the information provided by the system and then confirms the purchase.
e inventory management module provides support for warehouse administrators in the following activities: product storage, product delivery, supplier information management, and product viewing. e data analysis module is solely responsible for the corporate accounting. e accountant can perform the following activities in the system data analysis module: manage loss information, manage financial information, and query out-of-stock information.

Implementation of an International Trade Management
System. System management mainly includes four aspects: data security, administrator, user management, data backup and recovery, and authority management. e system has a   strong ability to protect information. When the computer is running the system, if the user leaves in the middle, the system will automatically lock the computer to protect the important information from being read by others. At the same time, the system gives the administrator an important authority, which is to modify the login restrictions of ordinary users. e procurement management module is the most critical and core part of the entire system. is module is responsible for purchasing planning, expediting, checking, and receiving warehouse, settlement and payment, etc. At the same time, the procurement management module realizes a global material supply cycle. e main process of procurement management is as follows: the buyer determines the purchase list in the purchase interface according to the actual situation, the system sends the purchase information to the supplier, and then the supplier is responsible for transporting the purchased materials. After the materials arrive, the inspection department will proceed according to the purchase list acceptance. erefore, the inventory management module must have three functions: inbound acceptance, outbound acceptance, and raw material inventory inquiry.
Sales are inseparable from any commodity, so the sales management module is also an extremely important part of the system. e sales management module provides sales forecasts, sales plans, and sales contracts for corporate sales personnel, as well as a series of information about product sales to improve the core competitiveness of the company in the commercial field. e data analysis module uses a series of high-tech methods such as big data, the Internet, and intelligent algorithms to analyze the current operating conditions and competitive environment, while giving correct judgments. e data analysis module can truly understand the market and can respond to market changes in a timely and effective manner.

Conclusion
e rapid development of the Internet of ings technology makes the Internet of ings platform based on the Internet of ings technology spring up like mushrooms. e emergence of the Internet of ings platform has greatly facilitated our daily lives and has also greatly improved people's work efficiency. However, at present, there are multiple communication standards and mechanisms in the Internet of ings platform. How to quickly and conveniently exchange information between different devices is a key issue that we must consider in the research process of Internet of ings middleware. e article selects the Internet of ings middleware in the cold chain transportation link as the research object and designs an Internet of ings middleware framework for cold chain transportation tracking by analyzing various aspects of the transportation process. In addition, in order to better deal with the communication obstacles between different sensors and filter the redundant data in the sensors, we adopted D-Bus technology and designed the communication means between different sensors. e development and utilization of the international trade management system can reduce some tedious and inconvenient manual operations, make the recording and statistics of international trade information very simple, improve work efficiency, and, at the same time, meet the information needs of various departments, so that enterprises can minimize cost and better select suppliers, products, and customer information, so that enterprises can obtain better economic benefits.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.