# A Total Crop-Diagnosis Platform Based on Deep Learning Models in a Natural Nutrient Environment
## 2 Related Works
### A Design of an Optimized Farm Sensor Gateway (OFSG) Based on Wireless Sensor Network
#### 3.2.2 A Design of a Sensor Data Fragmentation Sub-Module (SDFS)  
Because the size of the sensor data to be transferred one at a time is limited in a wireless sensor node, the sensor node generates messages of 127 bytes as shown in Figure 5. Figure 5 represents the data format used for wireless communication and Figure 5 represents the changed data format of Figure 5 when the basic compressed method of IPv6 over Low power Wireless Personal Area Network (6 LoWPAN) was applied to Figure 5. The SDFS works in the following steps.  
First, the SDFS fragments them to transfer the messages received from the sensor nodes to the farm central server. Figure 5 shows the received message format.  
Second, the SFDS compresses the headers of fragments by using the compression technique provided by 6 LoWPAN. The uncompressed header IPv6 header (40 bytes) and User Datagram Protocol (UDP) (8 bytes) of Figure 5 are compressed to header compression 1(HC1) (1 byte), header compression 2 (HC2) (1 byte), IPv6 (1 byte), and UDP (3 bytes) of Figure 5. Figure 5 shows the compressed message format.  
Third, in Figure 6,c, the SDFS expands the maximum transmission size by integrating the fields of the compressed headers and compressing them again.  
Figure 4: Structure of the interconnection protocol sub-module (IPS). PSDU: physical service data unit; CRC: cyclic redundancy check; DSP: dispatch code; HC: header compression; UDP: user datagram protocol; CIF: compressed integration field; FCS: frame check sequence.  
Figure 5: The compression technique of IPv6 over Low power Wireless Personal Area Network (6 LoWPAN).  
Therefore, the SDFS reduces the transmission cost of sensor data and makes the transmitted payload size larger at the same time.  
The SDFS improves the fragmentation process to solve the problem that the data size transmitted at one time is limited in the wireless sensor network. The size of each fragment by fragmentation is 127 bytes, and a header and payload are included in the fragment. However, fragmentation happens frequently because the transmitted payload size is reduced as the header size gets larger.  
To solve this problem, the SDFS minimizes the header size and maximizes the payload size. All the fields except the hop limit field are compressed in the existing 6 LoWPAN and only the header--except version, source/destination address, payload length, traffic class, flow label, next header fields--is compressed in the SDFS. The compression shows that the payload size is a maximum of 97 bytes. The DSP, HC1, HC2, IPv6, and UDP field in the compressed header in the wireless sensor network is 1-3 bytes long. Because the 5 fields cannot be compressed or fragmented further, the size of the payload transmitted at one time is limited to 97 bytes. Figure 6a,b shows that the DSP, HC1, HC2, IPv6 and UDP fields of the header are integrated into one integrated field (IF).  
In Figure 6c, if the IF is compressed, the header becomes smaller and the payload becomes bigger. The payload becomes a maximum of 101 bytes long. Here, if the payload size becomes bigger, the number of data fragmentation times is smaller.