# Research and Application of Edge Computing and Deep Learning in a Recommender System
## 3 Recommendation Models Based on Knowledge Distillation and Edge Computing
### Model Segmentation  
The proposed student model, outlined in Figure 2, mainly comprises an input layer, a hidden layer, an aggregation layer, and an output layer. Furthermore, the output layer consists of three features, namely a passenger feature, a train number feature, and a real-time interaction feature. The hidden layer was divided into two parts; passenger feature data and the train number feature data were subjected to embedding in the hidden layer. The embedding structure for the train number feature involves its fusion with the real-time interaction feature. Afterwards, feature fusion was fulfilled by virtue of full connections at the aggregation layer. In the fully connected layer, each neuron was connected to all of the neurons of the previous layer, and there was a certain connection weight between each input feature and each neuron. The input feature space was mapped to the output result space, thereby achieving the complexity and nonlinear fitting ability of the model. For the features fused, multi-level operations were performed. After computations were performed on these operation results, the predicted values were obtained.  
For the well-trained student model, resource-intensive computing, extensive bandwidth consumption, and reliance on cloud computing network latency pose challenges. To improve the computing speed of the recommender system model, reduce cloud computing resources, and optimize terminal device resources, a specific algorithm segmented the model into a limited number of parts. After segmentation, diverse network layers were deployed on terminal devices or the cloud based on their data and computational complexity. Terminal devices are mainly in charge of reserving network layers involving real-time interaction data, while network layers with small data sizes but high computational complexity or containing passengers' private data were deployed on the cloud. This approach aims to reduce data traffic between the terminal devices and the cloud, lower traffic loads, and uphold the security of private data. Through collaborative computing of the terminal devices and the cloud, the results computed on the cloud were sent back to the terminal devices. Aggregating data from terminal devices and the cloud occurred on the terminal devices, facilitating real-time computing.  
Figure 2: Student model.  
In the present study, the student model was segmented into four modules: passenger feature embedding, train number feature embedding, an aggregation module, and the predicted result output. Based on Edgent, a deep learning model co-inference framework promoting device-edge synergy, different modules and diverse neural network layers were employed to train a regression model estimating the running latency of neural network layers on terminal devices and the cloud. Specific to problems such as data security and data transmission, model segmentation points were carefully designed. Moreover, passenger feature embedding relates to passengers' massive amounts of essential data and transaction data. To ensure the security of passengers' private data, it was deployed on the cloud. Train number feature embedding involves fundamental information on train numbers and relevant real-time interaction data. Given the abundant interaction data generated during ticket purchases, this module was deployed on a terminal device to minimize network latency. For this reason, this module was deployed on a terminal device. The aggregation module and predicted result output were also placed on terminal devices, aiming to reduce the transmission of train number feature data [24].