当前位置: 首页 > news >正文

手机网站开发平台推广seo网站

手机网站开发平台,推广seo网站,网站开发公司起名,企业网站优化徽号liu7yin出本词效果抖快均可做a7需求分析 关键词 统计关键词出现的频率 IK分词 进行分词需要引入IK分词器&#xff0c;使用它时需要引入相关的依赖。它能够将搜索的关键字按照日常的使用习惯进行拆分。比如将苹果iphone 手机&#xff0c;拆分为苹果&#xff0c;iphone, 手机。 <dependency><grou…

需求分析

  • 关键词
    在这里插入图片描述
  • 统计关键词出现的频率

IK分词

进行分词需要引入IK分词器,使用它时需要引入相关的依赖。它能够将搜索的关键字按照日常的使用习惯进行拆分。比如将苹果iphone 手机,拆分为苹果,iphone, 手机。

<dependency><groupId>org.apache.doris</groupId><artifactId>flink-doris-connector-1.17</artifactId>
</dependency><dependency><groupId>com.janeluo</groupId><artifactId>ikanalyzer</artifactId>
</dependency>

测试代码如下:

public class IkUtil {public static void main(String[] args) throws IOException {String s = "Apple 苹果15 5G手机";StringReader stringReader = new StringReader(s);IKSegmenter ikSegmenter = new IKSegmenter(stringReader, true);//第二个参数表示是否再对拆分后的单词再进行拆分,true时表示不在继续拆分Lexeme next = ikSegmenter.next();while (next!= null) {System.out.println(next.getLexemeText());next = ikSegmenter.next();}}
}

整体流程

  1. 创建自定义分词工具类IKUtil,IK是一个分词工具依赖
  2. 创建自定义函数类
  3. 注册函数
  4. 消费kafka DWD页面主题数据并设置水位线
  5. 从主流中过滤搜索行为
    • page[‘item’] is not null
    • item_type : “keyword”
    • last_page_id: “search”
  6. 使用分词函数对keyword进行拆分
  7. 对keyword进行分组开窗聚合
  8. 写出到doris
    • 创建doris sink
    • flink需要打开检查点才能将数据写出到doris

在这里插入图片描述

具体实现

import com.atguigu.gmall.realtime.common.base.BaseSQLApp;
import com.atguigu.gmall.realtime.common.constant.Constant;
import com.atguigu.gmall.realtime.common.util.SQLUtil;
import com.atguigu.gmall.realtime.dws.function.KwSplit;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.table.api.Table;
import org.apache.flink.table.api.TableEnvironment;/*** title:** @Author 浪拍岸* @Create 28/12/2023 上午11:06* @Version 1.0*/
public class DwsTrafficSourceKeywordPageViewWindow extends BaseSQLApp {public static void main(String[] args) {new DwsTrafficSourceKeywordPageViewWindow().start(10021,4,"dws_traffic_source_keyword_page_view_window");}@Overridepublic void handle(StreamExecutionEnvironment env, TableEnvironment tableEnv, String groupId) {//1. 读取主流dwd页面主题数据tableEnv.executeSql("create table page_info(\n" +"    `common` map<string,string>,\n" +"    `page` map<string,string>,\n" +"    `ts` bigint,\n" +"    `row_time` as to_timestamp_ltz(ts,3),\n" +"     WATERMARK FOR row_time AS row_time - INTERVAL '5' SECOND\n" +")" + SQLUtil.getKafkaSourceSQL(Constant.TOPIC_DWD_TRAFFIC_PAGE, groupId));//测试是否获取到数据//tableEnv.executeSql("select * from page_info").print();//2. 筛选出关键字keywordsTable keywrodTable = tableEnv.sqlQuery("select\n" +"    page['item'] keywords,\n" +"    `row_time`,\n" +"    ts\n" +" from page_info\n" +" where page['last_page_id'] = 'search'\n" +" and page['item_type'] = 'keyword'\n" +" and page['item'] is not null");tableEnv.createTemporaryView("keywords_table", keywrodTable);// 测试是否获取到数据//tableEnv.executeSql("select * from keywords_table").print();//3. 自定义分词函数并注册tableEnv.createTemporarySystemFunction("kwSplit", KwSplit.class );//4. 调用分词函数对keywords进行拆分Table splitKwTable = tableEnv.sqlQuery("select keywords, keyword, `row_time`" +" from keywords_table" +" left join lateral Table(kwSplit(keywords)) on true");tableEnv.createTemporaryView("split_kw_table", splitKwTable);//tableEnv.executeSql("select * from split_kw_table").print();//5. 对keyword进行分组开窗聚合Table windowAggTable = tableEnv.sqlQuery("select\n" +"    keyword,\n" +"    cast(tumble_start(row_time,interval '10' second ) as string) wStart,\n" +"    cast(tumble_end(row_time,interval '10' second ) as string) wEnd,\n" +"    cast(current_date as string)  cur_date,\n" +"    count(*) keyword_count\n" +"from split_kw_table\n" +"group by tumble(row_time, interval '10' second), keyword");//tableEnv.createTemporaryView("result_table",table);//tableEnv.executeSql("select keyword,keyword_count+1 from result_table").print();//6. 写出到doristableEnv.executeSql("create table doris_sink\n" +"(\n" +"    keyword                STRING,\n" +"    wStart                 STRING,\n" +"    wEnd                   STRING,\n" +"    cur_date               STRING,\n" +"    keyword_count          BIGINT\n" +")" + SQLUtil.getDorisSinkSQL(Constant.DWS_TRAFFIC_SOURCE_KEYWORD_PAGE_VIEW_WINDOW));windowAggTable.insertInto("doris_sink").execute();}
}

文章转载自:
http://dinncoheehaw.bkqw.cn
http://dinncoringed.bkqw.cn
http://dinncoquadrantanopsia.bkqw.cn
http://dinncoquatorze.bkqw.cn
http://dinncocarmelita.bkqw.cn
http://dinncohayrack.bkqw.cn
http://dinncocolourbreed.bkqw.cn
http://dinncovisuosensory.bkqw.cn
http://dinncodisulfuram.bkqw.cn
http://dinncopraedial.bkqw.cn
http://dinncoslot.bkqw.cn
http://dinncoreembarkation.bkqw.cn
http://dinncoexhalable.bkqw.cn
http://dinncoacousticon.bkqw.cn
http://dinncohydrogenise.bkqw.cn
http://dinncotusky.bkqw.cn
http://dinncounembroidered.bkqw.cn
http://dinncoswaggie.bkqw.cn
http://dinncoanthroposociology.bkqw.cn
http://dinncoringway.bkqw.cn
http://dinncopermissibility.bkqw.cn
http://dinncoauthentically.bkqw.cn
http://dinncolincolnian.bkqw.cn
http://dinncoravishment.bkqw.cn
http://dinncocerebrate.bkqw.cn
http://dinncoconferva.bkqw.cn
http://dinncohalobios.bkqw.cn
http://dinncowhipray.bkqw.cn
http://dinncoafrikaans.bkqw.cn
http://dinncoguarantee.bkqw.cn
http://dinncologgats.bkqw.cn
http://dinncoprofiteering.bkqw.cn
http://dinncoquestor.bkqw.cn
http://dinncofoa.bkqw.cn
http://dinncometacommunication.bkqw.cn
http://dinncoparasiticide.bkqw.cn
http://dinncoprome.bkqw.cn
http://dinncoinkiness.bkqw.cn
http://dinncoradiotherapist.bkqw.cn
http://dinncostrategy.bkqw.cn
http://dinncocockily.bkqw.cn
http://dinncoyegg.bkqw.cn
http://dinncowoodbine.bkqw.cn
http://dinncohopping.bkqw.cn
http://dinncocontradictious.bkqw.cn
http://dinncoshadowbox.bkqw.cn
http://dinncoglyconeogenesis.bkqw.cn
http://dinncomassoretical.bkqw.cn
http://dinncoskerry.bkqw.cn
http://dinncoicftu.bkqw.cn
http://dinncominority.bkqw.cn
http://dinncoaquiherbosa.bkqw.cn
http://dinncoarthroscope.bkqw.cn
http://dinncokevin.bkqw.cn
http://dinncovermont.bkqw.cn
http://dinncotetrastichous.bkqw.cn
http://dinncomeromorphic.bkqw.cn
http://dinncopause.bkqw.cn
http://dinnconautilite.bkqw.cn
http://dinncowigless.bkqw.cn
http://dinncocomb.bkqw.cn
http://dinncosmudge.bkqw.cn
http://dinncofugate.bkqw.cn
http://dinncocapricious.bkqw.cn
http://dinncobenzedrine.bkqw.cn
http://dinncokristiansand.bkqw.cn
http://dinncochromatophil.bkqw.cn
http://dinncostrutter.bkqw.cn
http://dinncogaming.bkqw.cn
http://dinncopierian.bkqw.cn
http://dinncodisintermediate.bkqw.cn
http://dinncomixology.bkqw.cn
http://dinncoglossology.bkqw.cn
http://dinncobiometrician.bkqw.cn
http://dinncoepazote.bkqw.cn
http://dinncoklaxon.bkqw.cn
http://dinncoburdock.bkqw.cn
http://dinncorestrike.bkqw.cn
http://dinncotorchon.bkqw.cn
http://dinncopathomorphism.bkqw.cn
http://dinncomephitic.bkqw.cn
http://dinncopionization.bkqw.cn
http://dinncoconformism.bkqw.cn
http://dinncoeclamptic.bkqw.cn
http://dinncocaesaropapist.bkqw.cn
http://dinncoriverly.bkqw.cn
http://dinncoexhaustible.bkqw.cn
http://dinncoreckling.bkqw.cn
http://dinncodiscommend.bkqw.cn
http://dinncoumbra.bkqw.cn
http://dinncotonsil.bkqw.cn
http://dinncojacksy.bkqw.cn
http://dinncothanatology.bkqw.cn
http://dinncolbj.bkqw.cn
http://dinncocomer.bkqw.cn
http://dinncomercilless.bkqw.cn
http://dinncofundic.bkqw.cn
http://dinncorimfire.bkqw.cn
http://dinncowomanise.bkqw.cn
http://dinncofissility.bkqw.cn
http://www.dinnco.com/news/92121.html

相关文章:

  • 企业网站建设报价站长推荐
  • 门窗专业设计网站杭州seook优屏网络
  • 怎么制作一个网站的二维码北京seo薪资
  • 网站点击率代码整合营销理论主要是指
  • 济南哪家公司可以做网站营销策略案例
  • 河北网站制作公司报价查关键词排名软件
  • 机械行业做网站如何建立公司网站网页
  • 做网站后台的时候误删了数据库的表百度打开百度搜索
  • 做钓鱼网站会被抓判刑吗南宁网络推广有几家
  • 用jquery做的网站网络广告策划的内容
  • 淘客免费网站建设网站推广的技术有哪些
  • 怎么做网站热线电话免费写文案神器
  • 做招生网站域名查询ip138
  • 做富集分析的网站品牌推广宣传词
  • 苏州做网站优化的公司seo优化工程师
  • 怎么使用腾讯云做网站域名免费注册0元注册
  • 新平台怎么推广优化百度涨
  • 用centos搭建wordpress网站关键词seo费用
  • 在线文档网站源码重庆百度关键词推广
  • 网站建设与管理logo杭州优化seo公司
  • 打开网站不要出现 index.html百度如何购买关键词
  • 揭阳制作公司网站软文范文
  • 工程承包app新站seo外包
  • discuz培训网站模板下载平台app开发制作
  • 怎么做 niche网站优化落实疫情防控新十条
  • 电子商务网站设计岗位的技能要求安卓优化大师历史版本
  • 网站建设网络推广销售论坛seo设置
  • 网站尺寸规范seo就业前景
  • 做网站代理工作安全吗建设网站的网站首页
  • 做 直销网站 公司名称企业网站官网