ElasticSearch7+Spark 构建高匹配度搜索服务+千人千面推荐系统

download:ElasticSearch7+Spark 构建高匹配度搜索服务+千人千面推荐系统

基于大众点评搜索以及推荐业务,从企业实际项目落地实践的角度出发,在使用SpringBoot加mybatis完成用户登录、注册、商家入驻以及结合前端模板搭建运营后台门店服务管理功能后,借助ElasticSearch的最新版本ES7逐步迭代,完成高相关性进阶搜索服务,并基于spark mllib2.4.4构建个性化千人千面推荐系统。
适合人群

想了解EasticSearch,对搜索推荐系统感兴趣,
符合技术储备的同学
技术储备要求
熟悉JavaWeb基本应用
了解MySQL常用命令
1 #include<bits/stdc++.h>
2 using namespace std;
3 const int maxn=5e4+10;
4 const int mod=1e9+7;
5 #define ll long long
6 #define ull unsigned long long
7 #define pi pair<int,int>
8 #define fi first
9 #define sc second
10 #define pb push_back
11 #define ull unsigned long long
12 ll ans;
13 ll dp[maxn][505];
14 int n,k;
15 vectorE[maxn];
16
17
18 void dfs(int u,int fa)
19 {
20 dp[u][0]=1;
21 for(auto &v:E[u])
22 {
23 if(v==fa) continue;
24 dfs(v,u);
25 for(int i=0;i<k;i++)
26 ans+=dp[v][k-1-i]*dp[u][i];
27 for(int i=1;i<=k;i++)
28 dp[u][i]+=dp[v][i-1];
29 }
30 }
31
32 int main()
33 {
34 ios::sync_with_stdio(0);
35 cin.tie(0);
36 cin>>n>>k;
37 for(int i=1;i<n;i++)
38 {
39 int x,y;
40 cin>>x>>y;
41 E[x].pb(y);
42 E[y].pb(x);
43 }
44 dfs(1,0);
45 cout<<ans<<'\n';
46
47
48
49
50 }

猜你喜欢

转载自blog.51cto.com/15134646/2664642
今日推荐