# Research on Hybrid Recommendation Model for Personalized Recommendation Scenarios
## 3 NRH Recommendation Model
### Hybrid Forecast  
In this section, as shown in Figure 3, the probability values are calculated separately for the constructed user profiles, and the final recommendation prediction is made by combining the two probability values. In the Embedding layer, the input data include item portraits and user portraits; in the preference prediction part, a hybrid recommendation approach is adopted, i.e., on the one hand, the prediction score \(\hat{y}_{uv}\) is calculated based on the static history portraits of users and item portraits, and on the other hand, the prediction score \(\hat{y}^{\prime}_{uv}\) is calculated based on the dynamic preference portraits of users and item portraits; the target score \(y_{uv}\) is continuously optimized, and, finally, the preference score of a user for a specific item is output in the output layer by combining the two prediction scores. The core part of the NRH recommendation model is preference prediction. First, the Node2 vec-side knowledge representation is used to construct the item-attribute knowledge graph for the item portrait. Then the static history portrait of the user is built based on the user's historical click data, and the prediction probability \(\hat{y}^{\prime}_{uv}\) is obtained by calculating the cosine similarity between the static history portrait vector of User \(u\) and item vector \(v\). Moreover, the parameter \(\beta\) is set to adjust the score. The prediction score \(scores_{1}\) is obtained as follows:  
\[scores_{1}=\hat{y}^{\prime}_{uv}=cos(u,v^{\prime})-\beta, \tag{20}\]  
where \(\beta\) represents the score adjustment parameter, which can be adjusted according to different recommended data. Figure 3: Framework diagram of NRH recommendation model. Secondly, the single knowledge representation model is changed in the dynamic preference prediction part. The item portrait based on Node2 vec-side knowledge representation is added. The knowledge representation of each node and relationship is obtained based on the knowledge graph, and the tail node is predicted in the Ripple set using cosine similarity. After that, the dynamic preference portrait of User u is then obtained by preference propagation iterations based on the Hop count and feedback to update the portrait of item v. The predicted click probability \(\hat{y}_{uv}\) and score \(\mathit{scores}_{2}\) are output by combining User \(u\) and item \(v\) as follows:  
\[\mathrm{scores}_{2}=\hat{y}_{uv}=\sigma\Big{(}U^{T}v\Big{)}, \tag{21}\]  
where  
\[\sigma(x)=\frac{1}{1+\exp(-x)}, \tag{22}\]  
The NRH recommendation model takes User \(u\) and item \(v\) as initial data input, respectively, and finally obtains the click probability (preference score) of User \(u\) on item \(v\). Combining (20) and (21) yields the combined prediction score scores of User \(u\) for item \(v\):  
\[\mathit{scores}=(1-\alpha)\mathit{scores}_{2}+\mathit{ascores}_{1}, \tag{23}\]  
where if scores \(\geq\) 0.5, the model can recommend item \(v\) to User \(u\). If scores \(<\) 0.5, the model will not recommend item \(v\) to User \(u\). Specifically, the algorithm for NRH is described as Algorithm 1 follows:  
```
Input: recommendation item knowledge graph triad set N, user history data click_history. Output: recommendation_list Initialization: set random walk parameters: p, q, implicit feedback parameters: \(\alpha\); set model hyperparameters: embedding_dimension, walk_length, num_walks, window_size, epochs 1. Build item-attribute knowledge graph. (a) Initialize the graph: graph = EmptyGraph(b) (b) Initialize item attribute data: item_list = get_item_list(N); item_attributes = get_item_attributes(item_list, N) (c) add item nodes: for item in item_attributes: graph.add_node(item, 'item') (d) add attribute node: for attribute in attributes: graph.add_node(attribute, 'attribute') (e) associate item and attribute: for item, attribute in item_attributes: graph.add_edge(item, attribute) 2. Item portrait construction: (a) Construct item vector by Node2 vec-side algorithm: v2 = Node2 vec_side(graph, p, q, walk_length, num_walks) 3.