# Scene Equipment Saving and Loading Method for Digital Twin Workshop
## 4 Case Study
### Test Methods and Processes
#### 4.2.2 Test for Saving and Loading Large Amount of Data  
The data in the DT workshop are massive, multi-source and heterogeneous. Therefore, it is challenging to save and load the large volume of data in the workshop using the workshop software. This section is divided into different cases to compare the efficiency of saving and loading large volumes of data.  
The DTWorks software platform proposed in this study is a platform based on Client/Server (C/S) architecture, which has a secure form of access, fast processing speed and facilitates the processing of large amounts of data. Another kind of DT workshop platform based on browser/server (B/S) architecture is widely used at this stage. Although it has certain advantages in terms of deployment speed and development ease, it relies on a strong and stable network foundation and lacks data security, data transmission speed and the comprehensiveness of function implementation.  
First, we evaluate the efficiency of saving and loading fundamental data types. For both platforms, we determine the efficacy of saving and loading large volumes of various data types, including Boolean, byte, integer, float and string. Based on the team's prior knowledge of how frequently each data type is used in the DT workshop, various data volumes ranging from 1000 to 1,000,000 were specified for the saving and loading efficiency comparisons. Secondly, saving and loading efficiency tests are conducted on typical composite data in the workshop, including bearing temperature information, bearing vibration information and machine tool abrasion information. The test data are obtained from the PHM2010 and PHM2012 [32] datasets. Among them are 1,000,000 pieces of bearing temperature information detailing the date (hour, minute and second), sensor number and temperature; 1,000,000 pieces of bearing vibration information detailing the date (hour, minute, second and microsecond), horizontal vibration signal and vertical vibration signal; 1,000,000 pieces of machine tool abrasion information detailing the X/Y/Z three-dimensional force, X/Y/Z three-dimensional vibration and acoustic emission root mean square (AE-RMS) data content.  
Figure 8 depicts the testing technique for saving and loading efficiency using the DTWorks workshop software platform proposed in this study.  
1. Create several scene elements for testing in the DTWorks software platform and add a structure type member variable to them. This operation is carried out in the edit mode of the software.
2. Enter the runtime mode of the DTWorks software platform and initialize the data content within each struct.
3. Change the data content within the struct and provide a save/load instruction; then, record the timestamp of the moment.
4. Record the timestamp again when the saving/loading operation is completed.
5. Record the time interval between two timestamps as the time used for saving/loading operations.
6. Repeat steps 3, 4, 5 and 6, and calculate the average of the saving/loading time as the final result.  
The procedure for testing data saving and loading efficacy using a B/S-based DT platform is very similar to that of DTWorks, with the following exceptions: due to the B/S architecture's features, the saved archive is downloaded after the data have been saved on the server side and uploaded before the data are reloaded on the server side; the time spent on these two operations is also recorded. The B/S architecture's saving and loading functions are implemented in Python and endowed with a 200 Mbps broadband connection. Due to the uniqueness of the test dataset, it is important to note that the data content does not change during repeated testing of the saving and loading efficiency of typical composite data using both platform architectures.