# Simulation and Modeling Algorithm for Terminal Container Handling Intelligent Management Based on Internet of Things and Big Data Technology

Authors: Lifen Zhang; Qiang Zhou; Huifang Ding
Journal: Scientific Programming
 (2021)

---

## Abstract

In order to improve the effect of intelligent terminal container management, this paper improves the Internet of Things and big data technology, analyzes the RFID middleware architecture based on the actual needs of container handling management, and proposes a new method of RFID middleware load balancing. Moreover, this paper combines the Internet of Things technology and big data technology to analyze the terminal container loading and unloading process and build a corresponding intelligent system. After constructing a terminal container handling intelligent management system based on the Internet of Things and big data technology, the performance of the system is verified, and multiple sets of simulation data are used to conduct research. The experimental research results show that the terminal container handling management system based on the Internet of Things and big data constructed in this paper basically meets the actual needs of use.


---

## Body

## 1. Introduction

With the rapid development of China’s terminal container transportation industry, major port group companies are facing unprecedented challenges. At present, most domestic ports still adopt manual or semimechanical methods to complete the collection and recording of container data information, which is inefficient and slow [1]. Customs, national inspection, and other government supervision departments also use image processing pattern recognition technology to identify the number of containers. This processing method only has a recognition rate of 80% to 98%, the container traffic management and tracking monitoring are all in an isolated state, and it is impossible to realize the efficient and automated production of terminal containers. Moreover, it is also a heavy and slow fatigue job for government workers [2]. Improving the operational efficiency of terminal containers is directly related to the economic benefits of various enterprises. The use of manual implementation to identify and count the vehicle numbers and container numbers of terminal containers is likely to cause duplication of work, human errors, time delays, stagnation of goods, and low efficiency. Therefore, in order to avoid the waste of container resources in the terminal, it is an urgent issue to improve the automatic management capabilities of terminal containers and modern management facilities [3].The main transportation method of the former port logistics is container transportation. With the continuous growth of port transportation, resource competition among ports has become more intense. The competitive advantage of each port comes from hard conditions such as port geography and hinterland economy and its management. The service level, operation and production efficiency, equipment and facilities conditions, and other automation, informationization, modernization, and technical indicators are also extremely important factors that reflect the competitiveness of the port. Since the 1990s, with the increasing requirements for port operation efficiency, production costs, and sustainable development, port automation has become a new era of port development due to its significant advantages such as efficient operation, low labor costs, and superior safety and reliability Since the 1990s, with the increasing requirements for port operation efficiency, production costs, and sustainable development, port automation has become the general trend of the new era of port development by virtue of its significant advantages such as efficient operation, low labor cost, safety, and reliability. Up to now, more than 30 automated terminals have been applied and put into actual production in many countries around the world and have achieved good operational results. The emergence and in-depth development of automated terminals has become a major change in the sustainable development of ports in the future.This paper combines the Internet of Things technology and big data technology to analyze the terminal container loading and unloading process and build a corresponding intelligent system to provide a reference for subsequent intelligent container loading and unloading and management.


## 2. Related Work

For a long time, domestic and foreign scholars have carried out many researches on the optimization of container ship loading. Aiming at the problem of container loading, literature [4] first established a 0–1 planning model based on the optimization goals of the smallest amount of container tipping in the yard and the shortest quay crane moving distance. However, due to the large number of variables in the model 0–1, it is difficult to solve the problem when the scale is large and the practicability is not strong. Aiming at the problem that the problem model is difficult to solve, literature [5] simplified the above planning model by ignoring the ship weight stability constraint. The optimization goal is also set to minimize the amount of container dumping in the yard, and the number of variables is reduced compared with the previous one. Literature [6] took the minimum amount of container dumping in the yard and the stability of ship weight as the optimization goals, established a multiobjective integer programming model, and used the weighting method to obtain the noninferior solution of the problem model. On the basis of the previous research on container dumping in the storage yard, literature [7] first proposed a simple method for estimating the amount of container dumping in the container yard in combination with the operation of the container yard. It is defined as the basic amount of container dumping, which simplifies the problem of loading and arranging containers. In the following research, this method will be used as the research basis to analyze the container transportation situation in the terminal in detail. Literature [8] proposed that when analyzing and studying the distribution and arrangement of containers in the yard of ships, factors such as the weight of the container and the distance of the destination port should be taken into consideration. Literature [9] summarized the main methods currently used to study the automatic stowage of container ships and used mathematical modeling methods to optimize the research progress of ship stowage from the perspective of the ship and the port. Literature [10] described in detail the main characteristics of container ship stowage and unilaterally optimized ship stowage based on the linear programming method from the perspective of ship weight stability. Literature [11] proposed three strategies for carrying containers for container yard operations, used the integer programming method to establish a mathematical model, and used the CPLEX solver to accurately solve small-scale cases. The above-mentioned research on the problem of container loading and packing is mainly based on the mathematical model method to solve the problem. After that, the researchers used heuristic algorithms based on rule setting to further study the problem of container loading and packing. Based on the in-depth analysis of the causes of the container tipping problem in the container yard, literature [12] established a rule-based heuristic algorithm for the container loading and arranging problem based on the known container yard storage status and the container ship stowage map, which takes minimizing the amount of box turnover as the optimization goal. The results show that the case-solving effect is good.Literature [13] additionally considers the actual constraints of port customs clearance. Moreover, on this basis, it constructed a heuristic algorithm with the optimization objective of minimizing the amount of container dumping based on the known yard container storage status and container ship stowage map. In addition, it designed numerical experiments to verify the effectiveness and practicability of the algorithm. In recent years, the emergence of intelligent optimization algorithms such as genetic algorithm, tabu search algorithm, simulated annealing algorithm, and particle swarm algorithm has provided new ideas and methods for solving optimization problems. Literature [14] compared the container stowage problem with the traveling salesman problem. On this basis, it considered the constraint conditions of ship stability, heel, and trim moment and established a problem model with the optimization goal of minimizing the amount of tank tipping. Moreover, it used a genetic algorithm to solve the problem. However, there are deficiencies; that is, the algorithm code is too long, the solution space is too large, and so on.Literature [15] constructed an optimization algorithm based on a parallel tabu search to find the optimal ship loading sequence based on the known container ship stowage map. Literature [16] used a genetic algorithm to solve the problem with the minimum amount of box dumping as the optimization objective. Literature [17] regards the influencing factors such as the volume of container dumps, ship stability, strength, and operability as evaluation strategies and also uses genetic algorithms to find the optimal ship loading sequence. Literature [18] combined the actual loading and unloading of the container terminal to analyze the main reasons for the tipping of containers during container loading in the yard and put forward related control methods based on the given ship loading plan and yard. For the storage status of containers, a mathematical model with the smallest amount of unloaded containers as the optimization objective is established, and the genetic algorithm is used to solve them under different unloading rules. Literature [19] regards the container turnover rate of the yard as a constraint, takes the weight stability of the ship after loading as the optimization objective, establishes an integer programming problem model for solving the container loading sequence, and uses an algorithm based on particle swarm optimization to design and solve it. Literature [20] established a model based on the given container loading and stowage map, taking the minimum amount of unloading as the optimization objective, and proposed a parallel genetic particle swarm algorithm to solve it. The simulation experiment was carried out through Matlab, and the solution effect was better. Most of the above researches are based on known ship loading and loading plans from a single perspective of container loading sequence. Literature [21] considered the relationship between container loading sequence and ship stowage, based on the idea of two-stage hierarchical solution, and designed an algorithm based on SWO-HES two-stage optimization to solve the small-scale problem of a single shell position of a ship.


## 3. Internet of Things and Big Data Processing Algorithms Applied to Container Unloading Management

This paper analyzes the architecture of RFID middleware and proposes a new method of RFID middleware load balancing. This method is based on ALE (Application Level Events). This method defines the workload on the RFID middleware as ALE’s ECSpecs, and ALE’s ECSpecs are sent from the RFID application. Therefore, the workload of RFID middleware is to migrate ECSpecs from middleware with higher load to middleware with lower load by managing components.ALE provides a set of flexible interfaces with standard functions, which are realized through RFID middleware. Therefore, ALE defines a set of standard interfaces with aggregation, filtering, and counting functions.Figure1 shows the role of ALE in an RFID system. An RFID application layer requests the RFID middleware to collect and transmit EPCs information through the ALE interface. When requesting EPCs information, the RFID application layer specifies EPCs related to ECSpec. The three fields of EPCs are actually sent to the RFID application layer. The reading field specifies the EPCs information collected from the reader. The boundary section specifies the time stamp of the collection and the report generated. The ECSpec report specifies a filter that removes EPCs that are not related to the RFID application layer.Figure 1
RID middleware architecture diagram with label data flow.The ALE interface uses the logical name for the meaning reader. Logical reader is an abstract name. This abstract name refers to one or multiple physical readers that can be regarded as a group. For example, there are three RFID readers on a door carrying a lock in a warehouse. It is very simple and convenient to compile these three physical readers into a group of logical readers. The RFID middleware maintains the mapping information between the logical reader and the physical reader. Figure2 is a class diagram of the relationship between the concepts mentioned, shows the dependencies between the various components, and also shows the architectural relationship in ALE.Figure 2
Basic concept diagram in ALE.The load of the RFID middleware mentioned here is mainly caused by the collection and filtering of the tag data read by the connection with the reader. A large number of data tags have to be processed so as to cause the load of the middleware. Therefore, in order to reduce the load of the middleware, we need to effectively manage the large amount of raw label data processed by the middleware. As discussed in the previous section, the ECSpec sent by the RFID application layer defines a set of readers and tag data that is meaningful to the RFID application layer. In other words, an ECSpec determines a set of readers and notes data information processed by the RFID middleware. Therefore, we can manage the load status of the RFID middleware by controlling the ECSpec assigned to the middleware.For the method of achieving load balancing of RFID middleware by migration, Figures3(a) and 3(b) can be used to explain the overall process of this method. Figure 3(a) shows two application servers, and an RFID application is running in each application server. There are a total of six ECSpecs distributed among three middleware servers. The connection between the RFID application server and ECSpecs represents the process of ECSpecs distributed by the RFID application.Figure 3
Example diagram of the migration algorithm of ECSpec for RFID middleware load balancing. (a) Before migration. (b) After migration.
(a)(b)Suppose we find a large amount of ECSpecs label data, ECSpec1, ECSpec2, and ECSpec3 will cause middleware 1 to overload. In order to reduce the load on middleware 1, we need to move ECSpecs from middleware 1 to other types of low-load middleware. For example, by moving ECSpec3 on middleware 1 to middleware 2 with the lowest load, the load on middleware 1 is reduced, so that middleware 1 is not overloaded. Since ECSpecs directly determines the label data that a large amount of middleware will process, the load status of the entire system caused by ECSpec3 is now balanced by migrating from middleware 1 to middleware 2. This situation is shown in Figure3(b). The algorithm described above only occurs when the processing capabilities of the middleware components are the same. In the figure, middleware 1, middleware 2, and middleware 3 all have the same ability to process label data.It is worth noting that the migration of ECSpec3 did not lead to changes in the distribution of RFID applications and the use of ECSpec3. The RFID application does not even notice that the originally allocated ECSpec3 has migrated from one middleware to another. This situation is determined by the properties of ECSpec itself. As described in the previous section, each ECSpec specifies the destination location and this result is transferred by the ECSpec through the Notification component of the URI. Therefore, the result of ECSpec is even still routing migration from the original location to the destination. Therefore, we can safely migrate the ECSpec of the overloaded middleware to the lightest-loaded middleware without worrying about the distribution of RFID applications.As mentioned above, we balance the system load by migrating the same ECSpec from the overweight middleware to the overweight middleware. In addition, because RFID applications have no dependencies on certain RFID middleware, migration can occur without considering RFID-related applications. Therefore, when we choose to migrate ECSpec, we can ignore the related RFID applications.Compared with the independence of RFID applications, RFID readers that are closely related to ECSpec can also be considered for migration and distribution of ECSpec. As we discussed in the previous section, each ECSpec has a specification on the logical reader/writer that can read meaningful ECSpec. In other words, ECSpec specifies a specific logical reader/writer that can read tag data. Since the RFID reader is usually connected to an RFID middleware, the reader designated by ECSpec can also be reassigned to another middleware to which ECSpec will move. For example, in Figure4 showing ECSpec, the configuration of an RFID system and the relationship between the RFID reader and ECSpec are considered. Suppose that we choose to move ECSpec3 to middleware 2; in this case, the related readers R4 and R5 should be moved to middleware 2. At the same time, ECSpec3 will also be migrated to middleware 2. This is because ECSpec3 must be connected to R4 and R5, and each reader can only be connected to one RFID middleware.Figure 4
Distribution diagram considering the dependency of the reader. (a) Before assignment. (b) After assignment.
(a)(b)Dynamic weighted load algorithm distribution ECSpecs is feasible. According to the above migration and aggregation methods, it can be described as a distributed function to show the intuitiveness of the algorithm. The distribution of RFID middleware ECSpecs can be identified by comparing and calculating distributed functions. The formula is as follows:(1)Yi=Li×ei+Ri×er+Mi×em.Among them,Lmaxi represents the maximum and affordable number of effective connections of the reader/writer connected to the i-th RFID middleware. L(i) represents the load status of the i-th RFID middleware server. This can be expressed as follows:(2)Li=LWi×ew+Lni×enLmaxi+Lmi×ec.R(i) represents the degree of correlation between the i-th RFID middleware and ECSpecs, which is expressed as follows:(3)Ri=RWi×eW+Rni×en.M(i) represents the number of readers that need to be migrated for the i-th RFID middleware, which is expressed as follows:(4)Mi=MWi×eW+Mmi×em.LWi represents the number of readers running on the i-th RFID middleware server. Lni represents the number of nonoperational readers on the i-th RFID middleware server. Lmi represents the load of the machine on the i-th RFID middleware server. This is expressed as follows:(5)Lmi=Lcpui×ecpu+Lmemi×emem.Lcpui represents the CPU utilization of the i-th RFID middleware server. Lmemi represents the memory utilization of the i-th RFID middleware server. Similarly, RWi, Rni, MWi, and Mni are also expressed in the above method. Moreover, ei+er+em=1 and ei,er,em,ew,en,ec,ecpu,emem are corresponding weights.In order to describe the load status of each node, reader, and middleware cluster, a convenient calculation method is defined, which is expressed as follows:(6)T=∑Li∑Lmaxi,Ti=LiLmaxi.In view of a clear understanding of the load balancing under the set dynamic weights, we must first define the load of the three-state nodes ofT(i). (A) Light load: this refers to a computing node with a small number of connections and a low machine load of the reader. (B) Heavy load: this refers to a computing node with a large number of connections and a high machine load of the reader. (C) Moderate balance: this refers to a state between heavy load and light load. This state is Ti−Ts<Θ, where Ts is the average and Θ is the deviation. The corresponding balance states Lcpui and Lmemi of the utilization rate of the RFID middleware server are similarly expressed as described above. Moreover, when T changes, ei:er:em will also change. When T is a light load, then ei will take a larger value. When T is a heavy load, ei and em will take larger values. In the same way, when Lcpui and Lmemi change, ecpu and emem also change. When Lcpui and Lmemi are in a light load state, ecpu and emem will take smaller values together, and vice versa. In addition, Lm(i) is proportional to ec. When T(i) changes, ew:en will change accordingly. When T(i) exhibits a heavy load, ew will take a larger value, and vice versa.Figure5 shows the relationship between the components of RLBA. The components MLT and RLT are middleware.Figure 5
Proxy FD load balancing component diagram.Middleware Load Table (MLT) and Reader Load Table (RLT) provide component management. The IMLTManager interface of MLT and the IRLTManager interface of RLT will perform update and retrieval in each middleware. Therefore, other components can access them by using the corresponding interface.All nodes begin to perform calculation work. After a period of implementation, the node starts to check whether it is a heavy load node. If the node is overloaded, it will try to distribute its own jobs in the relevant domain. If it is assumed that the heavily loaded node is Lp, there areM nodes in the relevant domain, and these nodes are L1,L2,......,Lm. Therefore, the average load is(7)Lavg=1m+1Lp+∑i=1MLi.In order to achieve uniform distribution, the load can be obtained as Nm by transmitting the overloaded load node to other nodes in the relevant domain. First, a hm value is set. This value is set to move all load nodes to the heaviest load node in the heavy load-related domain. If there isLavg>Lm, the expression of Nm is(8)Nm+Lp−Lavghm∑i=1Mhi.Then, the task can be sent to all relevant nodes at this time.The start strategy at the receiving end is to use a light load start strategy. This strategy requires all other nodes to send tasks to this light node, and other nodes also use this strategy to send tasks to nodes other than the specified node like this light node. This strategy must first set anM value. This M value has the same effect as the M value of the sender startup strategy above, and it is also a critical value for distinguishing between heavy load and light load. The definition of the relevant domain here is the same as the above definition, and the same is true for all nodes to start performing calculation tasks. As time goes by, once a node detects that it is a light node, it also tries to distribute the load to itself in the relevant domain. The formula at this time is the same as formula (7), so that the value of Lavg can be calculated.In order to achieve uniform distribution, the load can be obtained asNm by transmitting the overloaded load node to other nodes in the relevant domain. The Nm formula listed here is the same as formula (8), except that the condition here is Lavg<Lm.Figure6 is the architecture diagram of the agent-based RFID middleware. In this figure, the JADE platform is based on JAVA. In the past few years, mobile agent system technology has become an exciting new field of computer science. There are a large number of methods, toolkits, and platforms of different qualities and maturities in this field, including Grasshopper, IBM Aglet, and JADE (Java Agent Development Framework).Figure 6
Architecture diagram of agent-based RFID middleware.Each instance running in the JADE runtime environment is called a container, and this container contains multiple agents. A group of running containers is called a platform. Figure7 shows the architecture of the JADE platform.Figure 7
Architecture diagram of JADE platform.Partial view: once the system starts, this special main container must always be executed on a platform, and through this special container, other containers can be registered. In addition to being able to accept registrations from other containers, the main container is different from other containers in that the main container is loaded with two special agents. AMS (Agent Management System) that can provide naming services (e.g., make sure that each agent on the platform has a unique name) is a representative authoritative platform. DF (Directory Facilitator is a directory service provider) provides a yellow pages service in a specific way. In this way, an agent finds other agents that can meet the needs of the agent in order to obtain the target.Because the mobile agent’s RFID middleware load architecture is built on the agent’s RFID middleware architecture, but the mobile agent has a few more functional components that are not available in the agent, and the others are developed based on the agent architecture. Moreover, mobile agents and agents are built on the RLBA architecture, and both can and must run on JADE to some extent. Figure8 is the architecture class diagram shared by mobile agents and agents.Figure 8
RLBA class diagram.Figure8 is a class diagram of RLBA, which explains how RLBA and its components perform RFID middleware load balancing. JADE platform provides RLBA extended agent class. The agent class is used to initialize the runtime environment of the agent. GLT and RLT can be used to support RFID middleware load balancing decisions. RLBA is also composed of five components: load monitor, balance trigger, middleware selector, reader/writer distributor, and reader/writer selector. Another important class is NodeCriteria, which provides the definition of the equilibrium metric name, maximum threshold, minimum threshold, and initial type.


## 4. Intelligent Terminal Container Management System Based on Internet of Things and Big Data Technology

Business research and demand analysis cannot be successful once we need to continue to refine and research. This requires an excellent program developer to have a comprehensive understanding of the overall process of the investigated business and continue to refine it from the shallower to the deeper. We not only need to understand the relationship between terminal companies and various port logistics links but also need to understand the independent work responsibilities of each business department, each job position, and the relationship between each position. Figure9 shows the business relationship between container terminals and various port logistics links.Figure 9
Business relationship between container terminals and various port logistics links.Import unloading business refers to the process of unloading containers loaded on arriving ships from the ship to the dock site within a predetermined plan. The specific unloading process mainly involves several aspects shown in Figure10.Figure 10
Division of container terminal business.After constructing a terminal container handling intelligent management system based on the Internet of Things and big data technology through the above analysis, the performance of the system is verified. This paper uses multiple sets of simulation data to count the container dispatching effect, loading effect, and management effect, and the test results shown in Table1 and Figure 11 are obtained.Table 1
Simulation effect verification of terminal container handling intelligent management system.
NumberScheduling effectLoading effectManagement effect179.3294.3786.07288.0990.5594.23383.5288.5789.96489.9486.7691.42593.2187.8594.97681.7086.9296.65793.5080.0892.69883.6583.1794.01987.4995.1990.631083.0093.9096.181183.1387.3090.081291.1891.3195.861386.3987.8788.261482.3189.5690.981583.7386.4995.341683.2485.9392.151780.2895.3586.471887.4192.6994.281980.0288.5695.422090.1788.2591.052190.7681.2594.122280.3095.5382.552388.1286.0090.582483.5990.4488.702592.4986.3185.302693.7795.3984.772786.6993.4286.192883.7091.0995.392993.0388.5390.343079.5988.5884.933180.9088.5485.703282.1288.2489.503379.1481.6991.933489.0686.0095.813591.9590.7793.563679.9889.9286.093788.8584.6990.043892.3591.7686.75Figure 11
The performance verification results of the terminal container handling management system based on the Internet of Things and big data.From the above research, it can be seen that the terminal container handling management system based on the Internet of Things and big data constructed in this paper basically meets the expected needs, and the system can be used for auxiliary management in subsequent practice.


## 5. Conclusion

Terminal container handling is a key part of the daily production activities of the port. The overall economic benefits of a container port are closely related to the loading quality of container ships in the port. The loading quality of ships directly affects the ship’s port time, maritime navigation safety, and the efficiency of terminal loading and unloading operations, which in turn affects the port’s reputation status and operating costs. The current large-scale development of container ships makes the loading and unloading tasks of ships in ports more arduous and the loading process more complicated. How to use the opportunity of the booming development of automated container terminals to integrate informatization, intelligent technology, and advanced management methods to rationally carry out container loading and dispatch, improve terminal service levels and ship transportation efficiency, and improve the competitiveness of the port itself and the transportation efficiency of the shipping industry is an urgent problem to be solved. This paper analyzes the loading and unloading process of containers in the terminal by combining the Internet of Things technology and big data technology and constructs the corresponding intelligent system. The experimental research results show that the terminal container handling management system based on the Internet of Things and big data constructed in this paper basically meets the expected needs, and the system can be used for auxiliary management in subsequent practice.



---

*Source: 8667945-2021-11-09.xml*