D-News|扎克伯格下月发布人工智能管家,美放宽无人机商用飞行标准

【摘要】扎克伯格下月公布人工智能管家,微软最新SurfacePro广告又拿苹果开撕;美国放宽无人机商用飞行标准,基因编辑治癌进入临床试验阶段……最新最全数据新闻,尽在本期DNews!


 ◆ 

业界巨头


扎克伯格下月公布人工智能管家

 

Facebook CEO 马克·扎克伯格(MarkZuckerberg)宣布,将于下月展示新的人工智能管家,可基于语音和面部识别去控制空调和灯光。

 

这一最新的人工智能系统可以通过互联网与家用电器相连接。扎克伯格举例说,若其与烤面包机相连,能为他烤面包。最难的问题就是烤面包时间。他早上要处理很多邮件、跑步、开不同会议,所以,他设计出的该系统能判断他所在地点和他所在做的事情,然后确定正确的烤面包时间。

微软最新SurfacePro广告又拿苹果开撕

0?wx_fmt=jpeg
 

在攻讦苹果iPad Pro后才几周,这家Windows操作系统开发商又开始用新的Surface Pro 4广告来揶揄苹果了。这一次,微软宣称它的混搭型PC电脑要比苹果的MacBook电脑更好。微软的这则Surface Pro 4广告长达30秒。它沿袭了微软通常采用的诱惑苹果Mac电脑用户的手法,宣称相对于它的旗舰二合一PC电脑,苹果的笔记本电脑显得“更缓慢”、“用途更小”,就像“宠物猫头上的帽子”。与此同时,它还高调吹捧了Surface的触摸屏、手写笔以及更轻薄的设计。

 

谷歌高管退出Uber董事会 因两家公司竞争性加强


谷歌(微博)母公司Alphabet的资深高管、首席法律官大卫·德拉蒙德(David Drummond)已经退出Uber董事会,原因是两家公司之间的竞争越来越强。德拉蒙德于2013年8月加入Uber董事会。由于Uber正在积极投资自动驾驶技术,它与谷歌之间的竞争性越来越强。谷歌前首席执行官施密特就曾因为Android可能成为苹果iPhone最大的竞争对手而退出苹果董事会。

 


 ◆ 

行业应用


贝瑞和康借壳天兴仪表上市

 

8月29日晚间,停牌两个半月的A股上市公司天兴仪表(SZ:000710)发布《关于筹划重大资产重组的停牌进展暨召开股东大会审议继续停牌相关事项的公告》:重组拟出售的资产为“成都天兴仪表股份有限公司目前拥有的全部资产、负债、业务、人员等”,拟购买的资产为“北京贝瑞和康生物技术股份有限公司100%股权”。本次资产重组构成关联交易,同时构成重大资产重组和借壳上市。这意味着,如果顺利,在不久的将来,基因检测服务公司“贝瑞和康”将以借壳天兴仪表的方式上市。

 

基因编辑治癌进入临床试验阶段


不久前,川大华西医院卢铀团队将进行世界首个人类CRISPR基因编辑临床试验的消息让基因编辑技术再度成为公众关注的焦点。基因编辑技术始于上世纪80年代建立的基因打靶技术,2000年后,相继出现ZFN、TALEN技术,可以实现基因组上的高效率定向剪切,2012年以后,第三代基因编辑技术CRISPR-Cas9出现,这一新技术精度高、成本低、操作简单,大幅降低了技术“门槛”,全球因此掀起对基因编辑的研究试验热潮。基因编辑技术已经在疾病防治、动植物育种、动物模型开发等领域展现出巨大前景。

 

nuTonomy 计划2020年前在10座城市中运营无人车

 

上周在新加坡进行了世界上首次无人驾驶的士公开试验活动的nuTonomy公司在无人驾驶上有更进一步计划。

 

nuTonomy首席运营官道格•帕克(DougParker)在 29 日称,至 2020 年,将在亚洲与美国的 10 座城市中运行无人驾驶车。上周,nuTonomy 公司在新加坡纬壹科技城范围内,揭开了世界上首次无人驾驶的士试验活动的序幕,邀请 10 多人进行了乘坐体验。

 

美国放宽无人机商用飞行标准


这一新规提出,从8月29日开始,美国无人机飞行需要在操作人员的视线范围内,不得在夜间飞行,不要在人群上方飞行。无人机的飞行高度不可超过400英尺(122米),重量必须低于55磅(25千克)。

 

同时,操作无人机商用的人员,必须在16岁以上,只要通过考试就能执行飞行任务。第一次考试于8月29日早晨8时开始,共有3300余人报名参加。这一由美国联邦航空管理局(FAA)制定的新规,引起美国各界的极大关注。

 

 

 ◆ 

资本动态


真机智能获数百万天使轮融资中科创星投资


专注于解决物流最后一公里问题的真机智能,打造了一款智能送货机器人——真机地虎,该项目拿到了中科创星数百万元的天使轮投资。真机地虎内部安装有CPU、GPU、3D传感器、摄像头等诸多精密的仪器,续航可达8个小时,行驶速度可调节,最大承载量不超过50kg,人工成本可降低至原来的四分之一。目前主要承接外卖运输服务,未来的目标是为用户实现30分钟内送货。


原文发布时间为:2016-08-31

本文来自云栖社区合作伙伴“大数据文摘”,了解相关信息可以关注“BigDataDigest”微信公众号

上面的是我的项目结构,现在我想要加入开源的通义大模型,实现项目具有以下功能 自行准备本地知识库资料(如本专业相关资料内容)作为大模型本地知识库的输入 教师侧:备课与设计: 根据所提供的本地课程大纲、课程知识库文档等自动设计教学内容,包括知识讲解、实训练习与指导、时间分布等。 · 考核内容生成: 根据教学内容自动生成考核题目及参考答案,考核题目种类可多样化,根据学科设计,如计算机类可设计相关编程题和答案 · 学情数据分析: 对学生提交的答案进行自动化检测,提供错误定位与修正建议。对学生整体数据进行分析,总结知识掌握情况与教学建议。 学生侧: · 在线学习助手: 对学生的提出的问题,结合教学内容进行解答; · 实时练习评测助手: 根据学生历史练习情况,以及学生的练习要求,生成随练题目,并对练习纠错。 管理侧: 用户管理:管理员/教师/学生等用户的基本管理 课件资源管理:按学科列表教师备课产生的课件、练习等资源,可以导出。 大屏概览: · 教师使用次数统计/活跃板块(当日/本周) · 学生使用次数统计/活跃板块(当日/本周) · 教学效率指数(备课与修正耗时、课后练习设计与修正耗时、课程优化方向(如:某学科通过率持续偏低) · 学生学习效果(平均正确率趋势、知识点掌握情况,高频错误知识点等) 非功能性需求 需明确使用至少1个开源大模型作为核心技术组件; 需采用本地知识库作为输入,知识库资料总量不大于100M; 生成的内容、练习与答案与本地知识库的关联性和准确性;(对抽取知识点设计的题目验证关联性和与答案的准确性有知识点说明) 我该在哪里添加 下面我再对功能进行进一步的说明:1、首先本地知识库可以让用户自己上传(即用户自己可以控制本地知识库,但一开始会有一个默认的知识库,知识库是在项目中的某个目录中可以吗), 2、在备课与设计的功能上ai可以帮助教师设计教学内容,并且教师可以下载该教学内容 3、在考核内容生成中,考核题目同样可以进行下载,而且可以有带答案不带答案两种方式; 完整的项目结构又是怎样的,哪些内容需要更改 下面是我目前的项目结构卷 Windows-SSD 的文件夹 PATH 列表 卷序列号为 20C7-404E C:. | project_structure.txt | +---main | +---java | | \---com | | | Aiapp1Application.java | | | | | +---annotation | | | APPLoginUser.java | | | IgnoreAuth.java | | | LoginUser.java | | | | | +---config | | | InterceptorConfig.java | | | MybatisPlusConfig.java | | | MyMetaObjectHandler.java | | | | | +---controller | | | CommonController.java | | | ConfigController.java | | | DictionaryController.java | | | ExampaperController.java | | | ExamquestionController.java | | | ExamrecordController.java | | | ExamredetailsController.java | | | ExamrewrongquestionController.java | | | FileController.java | | | ForumController.java | | | JiaoshiController.java | | | KechengController.java | | | KechengLiuyanController.java | | | NewsController.java | | | UsersController.java | | | YonghuController.java | | | | | +---dao | | | CommonDao.java | | | ConfigDao.java | | | DictionaryDao.java | | | ExampaperDao.java | | | ExamquestionDao.java | | | ExamrecordDao.java | | | ExamredetailsDao.java | | | ExamrewrongquestionDao.java | | | ForumDao.java | | | JiaoshiDao.java | | | KechengDao.java | | | KechengLiuyanDao.java | | | NewsDao.java | | | TokenDao.java | | | UsersDao.java | | | YonghuDao.java | | | | | +---entity | | | | ConfigEntity.java | | | | DictionaryEntity.java | | | | EIException.java | | | | ExampaperEntity.java | | | | ExamquestionEntity.java | | | | ExamrecordEntity.java | | | | ExamredetailsEntity.java | | | | ExamrewrongquestionEntity.java | | | | ForumEntity.java | | | | JiaoshiEntity.java | | | | KechengEntity.java | | | | KechengLiuyanEntity.java | | | | NewsEntity.java | | | | TokenEntity.java | | | | UsersEntity.java | | | | YonghuEntity.java | | | | | | | +---model | | | | DictionaryModel.java | | | | ExampaperModel.java | | | | ExamquestionModel.java | | | | ExamrecordModel.java | | | | ExamredetailsModel.java | | | | ExamrewrongquestionModel.java | | | | ForumModel.java | | | | JiaoshiModel.java | | | | KechengLiuyanModel.java | | | | KechengModel.java | | | | NewsModel.java | | | | YonghuModel.java | | | | | | | +---view | | | | DictionaryView.java | | | | ExampaperView.java | | | | ExamquestionView.java | | | | ExamrecordView.java | | | | ExamredetailsView.java | | | | ExamrewrongquestionView.java | | | | ForumView.java | | | | JiaoshiView.java | | | | KechengLiuyanView.java | | | | KechengView.java | | | | NewsView.java | | | | YonghuView.java | | | | | | | \---vo | | | DictionaryVO.java | | | ExampaperVO.java | | | ExamquestionVO.java | | | ExamrecordVO.java | | | ExamredetailsVO.java | | | ExamrewrongquestionVO.java | | | ForumVO.java | | | JiaoshiVO.java | | | KechengLiuyanVO.java | | | KechengVO.java | | | NewsVO.java | | | YonghuVO.java | | | | | +---interceptor | | | AuthorizationInterceptor.java | | | | | +---model | | | \---enums | | | TypeEnum.java | | | | | +---service | | | | CommonService.java | | | | ConfigService.java | | | | DictionaryService.java | | | | ExampaperService.java | | | | ExamquestionService.java | | | | ExamrecordService.java | | | | ExamredetailsService.java | | | | ExamrewrongquestionService.java | | | | ForumService.java | | | | JiaoshiService.java | | | | KechengLiuyanService.java | | | | KechengService.java | | | | NewsService.java | | | | TokenService.java | | | | UsersService.java | | | | YonghuService.java | | | | | | | \---impl | | | CommonServiceImpl.java | | | ConfigServiceImpl.java | | | DictionaryServiceImpl.java | | | ExampaperServiceImpl.java | | | ExamquestionServiceImpl.java | | | ExamrecordServiceImpl.java | | | ExamredetailsServiceImpl.java | | | ExamrewrongquestionServiceImpl.java | | | ForumServiceImpl.java | | | JiaoshiServiceImpl.java | | | KechengLiuyanServiceImpl.java | | | KechengServiceImpl.java | | | NewsServiceImpl.java | | | TokenServiceImpl.java | | | UsersServiceImpl.java | | | YonghuServiceImpl.java | | | | | +---ServletContextListener | | | DictionaryServletContextListener.java | | | | | +---thread | | | MyThreadMethod.java | | | | | \---utils | | BaiduUtil.java | | CommonUtil.java | | FileUtil.java | | HttpClientUtils.java | | JQPageInfo.java | | MPUtil.java | | PageUtils.java | | PoiUtil.java | | Query.java | | R.java | | SpringContextUtils.java | | SQLFilter.java | | StringUtil.java | | ValidatorUtils.java | | | \---resources | | application.yml | | | +---front | | | index.html | | | | | +---css | | | bootstrap.min.css | | | common.css | | | front-kaoshi-style.css | | | homeworkPC.min.css | | | style.css | | | theme.css | | | | | +---elementui | | | | elementui.css | | | | elementui.js | | | | | | | \---fonts | | | element-icons.ttf | | | element-icons.woff | | | | | +---img | | | avator.png | | | banner.jpg | | | jianshe.png | | | jiaotong.png | | | line.jpg | | | nongye.png | | | seckilling.jpg | | | select.png | | | selectActive.png | | | unselect.png | | | weixin.png | | | yuan.png | | | zhifubao.png | | | zhongguo.png | | | | | +---js | | | bootstrap.AMapPositionPicker.js | | | bootstrap.min.js | | | config.js | | | jquery.js | | | utils.js | | | validate.js | | | vue.js | | | | | +---layui | | | | layui.all.js | | | | layui.js | | | | | | | +---css | | | | | layui.css | | | | | layui.mobile.css | | | | | | | | | \---modules | | | | | code.css | | | | | | | | | +---laydate | | | | | \---default | | | | | laydate.css | | | | | | | | | \---layer | | | | \---default | | | | icon-ext.png | | | | icon.png | | | | layer.css | | | | loading-0.gif | | | | loading-1.gif | | | | loading-2.gif | | | | | | | +---font | | | | iconfont.eot | | | | iconfont.svg | | | | iconfont.ttf | | | | iconfont.woff | | | | iconfont.woff2 | | | | | | | +---images | | | | \---face | | | | 0.gif | | | | 1.gif | | | | 10.gif | | | | 11.gif | | | | 12.gif | | | | 13.gif | | | | 14.gif | | | | 15.gif | | | | 16.gif | | | | 17.gif | | | | 18.gif | | | | 19.gif | | | | 2.gif | | | | 20.gif | | | | 21.gif | | | | 22.gif | | | | 23.gif | | | | 24.gif | | | | 25.gif | | | | 26.gif | | | | 27.gif | | | | 28.gif | | | | 29.gif | | | | 3.gif | | | | 30.gif | | | | 31.gif | | | | 32.gif | | | | 33.gif | | | | 34.gif | | | | 35.gif | | | | 36.gif | | | | 37.gif | | | | 38.gif | | | | 39.gif | | | | 4.gif | | | | 40.gif | | | | 41.gif | | | | 42.gif | | | | 43.gif | | | | 44.gif | | | | 45.gif | | | | 46.gif | | | | 47.gif | | | | 48.gif | | | | 49.gif | | | | 5.gif | | | | 50.gif | | | | 51.gif | | | | 52.gif | | | | 53.gif | | | | 54.gif | | | | 55.gif | | | | 56.gif | | | | 57.gif | | | | 58.gif | | | | 59.gif | | | | 6.gif | | | | 60.gif | | | | 61.gif | | | | 62.gif | | | | 63.gif | | | | 64.gif | | | | 65.gif | | | | 66.gif | | | | 67.gif | | | | 68.gif | | | | 69.gif | | | | 7.gif | | | | 70.gif | | | | 71.gif | | | | 8.gif | | | | 9.gif | | | | | | | \---lay | | | \---modules | | | carousel.js | | | code.js | | | colorpicker.js | | | element.js | | | flow.js | | | form.js | | | jquery.js | | | laydate.js | | | layedit.js | | | layer.js | | | laypage.js | | | laytpl.js | | | mobile.js | | | rate.js | | | slider.js | | | table.js | | | transfer.js | | | tree.js | | | upload.js | | | util.js | | | | | +---modules | | | | config.js | | | | | | | +---http | | | | http.js | | | | | | | +---layarea | | | | layarea.js | | | | | | | \---tinymce | | | | index.html | | | | tinymce.js | | | | | | | \---tinymce | | | | jquery.tinymce.min.js | | | | license.txt | | | | readme.md | | | | tinymce.js | | | | tinymce.min.js | | | | | | | +---langs | | | | readme.md | | | | zh_CN.js | | | | | | | +---plugins | | | | +---advlist | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---anchor | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---autolink | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---autoresize | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---autosave | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---bbcode | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---charmap | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---code | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---codesample | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---colorpicker | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---contextmenu | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---directionality | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---emoticons | | | | | | plugin.js | | | | | | plugin.min.js | | | | | | | | | | | \---js | | | | | emojis.js | | | | | emojis.min.js | | | | | | | | | +---fullpage | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---fullscreen | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---help | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---hr | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---image | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---imagetools | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---importcss | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---indent2em | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---insertdatetime | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---legacyoutput | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---link | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---lists | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---media | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---nonbreaking | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---noneditable | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---pagebreak | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---paste | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---preview | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---print | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---quickbars | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---save | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---searchreplace | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---spellchecker | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---tabfocus | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---table | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---template | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---textcolor | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---textpattern | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---toc | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---visualblocks | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | +---visualchars | | | | | plugin.js | | | | | plugin.min.js | | | | | | | | | \---wordcount | | | | plugin.js | | | | plugin.min.js | | | | | | | +---skins | | | | +---content | | | | | +---dark | | | | | | content.css | | | | | | content.min.css | | | | | | content.min.css.map | | | | | | | | | | | +---default | | | | | | content.css | | | | | | content.min.css | | | | | | content.min.css.map | | | | | | | | | | | +---document | | | | | | content.css | | | | | | content.min.css | | | | | | content.min.css.map | | | | | | | | | | | \---writer | | | | | content.css | | | | | content.min.css | | | | | content.min.css.map | | | | | | | | | \---ui | | | | +---oxide | | | | | | content.css | | | | | | content.inline.css | | | | | | content.inline.min.css | | | | | | content.inline.min.css.map | | | | | | content.min.css | | | | | | content.min.css.map | | | | | | content.mobile.css | | | | | | content.mobile.min.css | | | | | | content.mobile.min.css.map | | | | | | skin.css | | | | | | skin.min.css | | | | | | skin.min.css.map | | | | | | skin.mobile.css | | | | | | skin.mobile.min.css | | | | | | skin.mobile.min.css.map | | | | | | | | | | | \---fonts | | | | | tinymce-mobile.woff | | | | | | | | | \---oxide-dark | | | | | content.css | | | | | content.inline.css | | | | | content.inline.min.css | | | | | content.inline.min.css.map | | | | | content.min.css | | | | | content.min.css.map | | | | | content.mobile.css | | | | | content.mobile.min.css | | | | | content.mobile.min.css.map | | | | | skin.css | | | | | skin.min.css | | | | | skin.min.css.map | | | | | skin.mobile.css | | | | | skin.mobile.min.css | | | | | skin.mobile.min.css.map | | | | | | | | | \---fonts | | | | tinymce-mobile.woff | | | | | | | \---themes | | | +---mobile | | | | theme.js | | | | theme.min.js | | | | | | | \---silver | | | theme.js | | | theme.min.js | | | | | +---pages | | | +---chat | | | | chat.html | | | | | | | +---dictionary | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---exampaper | | | | add.html | | | | detail.html | | | | exam.html | | | | list.html | | | | | | | +---examquestion | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---examrecord | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---examredetails | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---examrewrongquestion | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---forum | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---home | | | | home.html | | | | | | | +---jiaoshi | | | | add.html | | | | center.html | | | | detail.html | | | | list.html | | | | register.html | | | | | | | +---kecheng | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---kechengLiuyan | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---login | | | | login.html | | | | | | | +---news | | | | add.html | | | | detail.html | | | | list.html | | | | | | | +---recharge | | | | recharge.html | | | | | | | \---yonghu | | | add.html | | | center.html | | | detail.html | | | list.html | | | register.html | | | | | \---xznstatic | | +---css | | | | bootstrap.min.css | | | | common.css | | | | element.min.css | | | | login.css | | | | public.css | | | | style.css | | | | swiper.min.css | | | | | | | \---fonts | | | element-icons.ttf | | | element-icons.woff | | | | | +---img | | | 162237296.jpg | | | 162240878.jpg | | | 19.jpg | | | 1_092ZZ2503138.jpg | | | 20.jpg | | | index_24.gif | | | index_35.gif | | | index_41.gif | | | index_44.gif | | | logo.png | | | news_list_time.jpg | | | service_btn.png | | | service_img.png | | | service_title.png | | | | | \---js | | bootstrap.min.js | | element.min.js | | index.js | | jquery-1.11.3.min.js | | jquery.SuperSlide.2.1.1.js | | swiper.min.js | | | +---img | | \---img | | back-img-bg.jpg | | front-img-bg.jpg | | logo.jpg | | | +---mapper | | CommonDao.xml | | ConfigDao.xml | | DictionaryDao.xml | | ExampaperDao.xml | | ExamquestionDao.xml | | ExamrecordDao.xml | | ExamredetailsDao.xml | | ExamrewrongquestionDao.xml | | ForumDao.xml | | JiaoshiDao.xml | | KechengDao.xml | | KechengLiuyanDao.xml | | NewsDao.xml | | TokenDao.xml | | UsersDao.xml | | YonghuDao.xml | | | +---static | | +---admin | | | | 1-install.bat | | | | 2-run.bat | | | | 3-build.bat | | | | babel.config.js | | | | package-lock.json | | | | package.json | | | | vue.config.js | | | | | | | +---dist | | | | | favicon.ico | | | | | index.html | | | | | | | | | +---css | | | | | app.381d2044.css | | | | | chunk-vendors.a72b0961.css | | | | | | | | | +---fonts | | | | | element-icons.535877f5.woff | | | | | element-icons.732389de.ttf | | | | | | | | | +---img | | | | | 404.3648f234.png | | | | | zhongguo.20798bfa.png | | | | | | | | | \---js | | | | app.b100d28f.js | | | | app.b100d28f.js.map | | | | chunk-vendors.213b68ba.js | | | | chunk-vendors.213b68ba.js.map | | | | | | | +---public | | | | favicon.ico | | | | index.html | | | | | | | \---src | | | | App.vue | | | | main.js | | | | | | | +---assets | | | | +---css | | | | | element-variables.scss | | | | | style.scss | | | | | | | | | \---img | | | | | 404.png | | | | | avator.png | | | | | bg.jpg | | | | | captcha.jpg | | | | | login.png | | | | | logo.png | | | | | password.png | | | | | role.png | | | | | username.png | | | | | | | | | \---test | | | | jianshe.png | | | | jiaotong.png | | | | nongye.png | | | | weixin.png | | | | zhifubao.png | | | | zhongguo.png | | | | | | | +---components | | | | +---common | | | | | BreadCrumbs.vue | | | | | Editor.vue | | | | | FileUpload.vue | | | | | | | | | +---home | | | | | HomeCard.vue | | | | | HomeChart.vue | | | | | HomeComment.vue | | | | | HomeProgress.vue | | | | | | | | | +---index | | | | | IndexAside.vue | | | | | IndexAsideStatic.vue | | | | | IndexAsideSub.vue | | | | | IndexHeader.vue | | | | | IndexMain.vue | | | | | | | | | \---SvgIcon | | | | index.vue | | | | | | | +---icons | | | | | index.js | | | | | svgo.yml | | | | | | | | | \---svg | | | | | 404.svg | | | | | articleEdit.svg | | | | | banner.svg | | | | | bug.svg | | | | | build.svg | | | | | cfg.svg | | | | | channel.svg | | | | | chart.svg | | | | | clipboard.svg | | | | | code.svg | | | | | component.svg | | | | | contacts.svg | | | | | dashboard.svg | | | | | date.svg | | | | | dept.svg | | | | | dict.svg | | | | | documentation.svg | | | | | download.svg | | | | | drag.svg | | | | | druid.svg | | | | | edit.svg | | | | | education.svg | | | | | email.svg | | | | | excel.svg | | | | | exit-fullscreen.svg | | | | | eye-open.svg | | | | | file.svg | | | | | form.svg | | | | | fullscreen.svg | | | | | icon.svg | | | | | international.svg | | | | | job.svg | | | | | language.svg | | | | | link.svg | | | | | list.svg | | | | | lock.svg | | | | | log.svg | | | | | logininfor.svg | | | | | menu.svg | | | | | message.svg | | | | | money.svg | | | | | monitor.svg | | | | | nested.svg | | | | | nested0.svg | | | | | online.svg | | | | | operation.svg | | | | | password.svg | | | | | password0.svg | | | | | pdf.svg | | | | | people.svg | | | | | peoples.svg | | | | | phone.svg | | | | | post.svg | | | | | qq.svg | | | | | search.svg | | | | | sender.svg | | | | | server.svg | | | | | shopping.svg | | | | | shoppingCard.svg | | | | | size.svg | | | | | skill.svg | | | | | star.svg | | | | | swagger.svg | | | | | system.svg | | | | | tab.svg | | | | | table.svg | | | | | table0.svg | | | | | task.svg | | | | | template.svg | | | | | theme.svg | | | | | tool.svg | | | | | tree-table.svg | | | | | tree.svg | | | | | user.svg | | | | | user0.svg | | | | | validCode.svg | | | | | wechat.svg | | | | | zip.svg | | | | | | | | | \---svg | | | | agricultureRegister.svg | | | | AI.svg | | | | AIDeviceLayout.svg | | | | area.svg | | | | base.svg | | | | batch.svg | | | | board.svg | | | | board1.svg | | | | boardConfig.svg | | | | cfg.svg | | | | code.svg | | | | company.svg | | | | crop.svg | | | | crops.svg | | | | dashboard.svg | | | | dataAbnormal.svg | | | | dataLack.svg | | | | dept.svg | | | | device.svg | | | | deviceMonitorData.svg | | | | dict.svg | | | | diseasesinsect.svg | | | | diseasesinsects.svg | | | | documentation.svg | | | | EIM.svg | | | | email.svg | | | | environmental.svg | | | | eye-open.svg | | | | farmingProject.svg | | | | finance.svg | | | | financeBudget.svg | | | | financeReality.svg | | | | firm.svg | | | | firms.svg | | | | harvestBatch.svg | | | | harvestDetection.svg | | | | harvestManage.svg | | | | harvestWorks.svg | | | | heavyMetalDetection.svg | | | | home.svg | | | | inspection.svg | | | | internet.svg | | | | internetActive.svg | | | | log.svg | | | | mainSystem.svg | | | | mainSystemActive.svg | | | | menu.svg | | | | monitorEquipment.svg | | | | news.svg | | | | order.svg | | | | password.svg | | | | peoples.svg | | | | pest.svg | | | | pestActive.svg | | | | pesticideResidue.svg | | | | pests.svg | | | | phone.svg | | | | plant.svg | | | | plants.svg | | | | plantsActive.svg | | | | residual.svg | | | | retroactiveCoding.svg | | | | scheme.svg | | | | source.svg | | | | sourceActive.svg | | | | system.svg | | | | task.svg | | | | tempFarm.svg | | | | traceability.svg | | | | traceabilityList.svg | | | | traceabilityStyle.svg | | | | user.svg | | | | user0.svg | | | | validCode.svg | | | | video.svg | | | | videoEquipment.svg | | | | videoKey.svg | | | | VIP.svg | | | | vipCustomized.svg | | | | warnings.svg | | | | workOrder.svg | | | | ┐┤?х╣▄└э.svg | | | | ╓╪╜Ё╩?╝ь▓т╣▄└э.svg | | | | | | | +---router | | | | router-static.js | | | | | | | +---store | | | | store.js | | | | | | | +---utils | | | | api.js | | | | base.js | | | | http.js | | | | i18n.js | | | | menu.js | | | | storage.js | | | | style.css | | | | style.js | | | | utils.js | | | | validate.js | | | | | | | \---views | | | | 404.vue | | | | center.vue | | | | home.vue | | | | index.vue | | | | login.vue | | | | pay.vue | | | | register.vue | | | | update-password.vue | | | | | | | \---modules | | | +---config | | | | add-or-update.vue | | | | list.vue | | | | | | | +---dictionary | | | | add-or-update.vue | | | | list.vue | | | | | | | +---dictionaryExampaper | | | | add-or-update.vue | | | | list.vue | | | | | | | +---dictionaryExamquestion | | | | add-or-update.vue | | | | list.vue | | | | | | | +---dictionaryForumState | | | | add-or-update.vue | | | | list.vue | | | | | | | +---dictionaryKecheng | | | | add-or-update.vue | | | | list.vue | | | | | | | +---dictionaryNews | | | | add-or-update.vue | | | | list.vue | | | | | | | +---dictionarySex | | | | add-or-update.vue | | | | list.vue | | | | | | | +---exampaper | | | | add-or-update.vue | | | | exam.vue | | | | list.vue | | | | | | | +---examquestion | | | | add-or-update.vue | | | | list.vue | | | | | | | +---examrecord | | | | add-or-update.vue | | | | list.vue | | | | | | | +---examredetails | | | | add-or-update.vue | | | | list.vue | | | | | | | +---examrewrongquestion | | | | add-or-update.vue | | | | list.vue | | | | | | | +---forum | | | | add-or-update.vue | | | | list.vue | | | | | | | +---jiaoshi | | | | add-or-update.vue | | | | list.vue | | | | | | | +---kecheng | | | | add-or-update.vue | | | | list.vue | | | | | | | +---kechengLiuyan | | | | add-or-update.vue | | | | list.vue | | | | | | | +---news | | | | add-or-update.vue | | | | list.vue | | | | | | | +---users | | | | add-or-update.vue | | | | list.vue | | | | | | | \---yonghu | | | add-or-update.vue | | | list.vue | | | | | \---upload | | a.txt | | config1.jpg | | config2.jpg | | config3.jpg | | file.rar | | jiaoshi.xls | | jiaoshi1.jpg | | jiaoshi2.jpg | | jiaoshi3.jpg | | jiaoshi4.jpg | | jiaoshi5.jpg | | jiaoshi6.jpg | | kecheng1.jpg | | kecheng2.jpg | | kecheng3.jpg | | kecheng4.jpg | | kecheng5.jpg | | kecheng6.jpg | | music.mp3 | | news1.jpg | | news2.jpg | | news3.jpg | | news4.jpg | | news5.jpg | | news6.jpg | | video.mp4 | | yonghu1.jpg | | yonghu2.jpg | | yonghu3.jpg | | | \---templates \---test \---java \---com Aiapp1ApplicationTests.java
07-15
<think>根据需求,我们需要在项目中集成开源大模型(如通义大模型)来实现教师侧的备课与设计、考核内容生成、学情数据分析,学生侧的在线学习助手和实时练习评测助手,以及管理侧的大屏概览等功能。同时,需要支持本地知识库的上传和管理。 ### 分析现有项目结构 当前项目是一个典型的Spring Boot应用,包含以下主要部分: - `main/java/com/...`: 包含应用的主要Java代码,包括启动类、配置、控制器、实体、DAO、服务等。 - `main/resources`: 包含配置文件、前端资源、静态文件、MyBatis映射文件等。 - `test`: 测试代码。 ### 需要添加的功能模块 1. **大模型集成模块**:用于调用开源大模型(如通义)的API。 2. **本地知识库管理模块**:允许用户上传和管理知识库文件(默认知识库放在项目目录中,如`resources/knowledge`)。 3. **教师侧功能**: - 备课与设计:根据知识库生成教学内容(包括知识讲解、实训、时间分布等),并提供下载。 - 考核内容生成:生成题目和答案,支持下载(带答案和不带答案)。 4. **学生侧功能**: - 在线学习助手:回答学生问题,结合知识库和教学内容。 - 实时练习评测:生成练习题,并自动批改和纠错。 5. **管理侧功能**: - 用户管理(已有,可能需要扩展)。 - 课件资源管理:管理教师生成的课件和练习,支持导出。 - 大屏概览:统计教师和学生的使用情况,教学效率,学习效果等。 ### 项目结构调整建议 1. **在`com`包下新建包`ai`**,用于存放与大模型交互相关的代码。 - `service`: 大模型服务接口和实现。 - `controller`: 提供AI相关接口(如生成教学内容、题目等)。 - `utils`: 大模型调用工具类。 2. **知识库存储**: - 默认知识库:放在`resources/knowledge`目录下,项目启动时加载。 - 用户上传知识库:存储在服务器文件系统中(如`upload/knowledge`),并在数据库中记录知识库文件信息(可能需要新建实体和表)。 3. **教师侧功能**: - 在`controller`包下新建`TeacherAIController`,处理备课、生成题目等请求。 - 在`service`包下新建`TeacherAIService`,实现调用大模型生成教学内容和题目的逻辑。 4. **学生侧功能**: - 在`controller`包下新建`StudentAIController`,处理学生提问和练习评测请求。 - 在`service`包下新建`StudentAIService`,实现问题解答和练习评测逻辑。 5. **管理侧功能**: - 课件资源管理:在现有的`FileController`中增加对课件资源的管理,或新建`ResourceController`。 - 大屏概览:新建`DashboardController`,提供统计数据接口。 6. **数据库调整**: - 可能需要新增表来存储生成的教学内容、题目、答案、练习记录等。 - 例如:`teaching_content`, `exam_question`, `practice_record`等。 7. **前端调整**: - 在`resources/front/pages`下新增教师备课、学生练习等页面。 - 在管理后台的前端(`static/admin`)中添加课件资源管理和大屏概览的页面。 ### 代码示例 #### 1. 大模型服务接口 在`com.ai.service`包下创建`AIService`接口和实现类`AIServiceImpl`,用于封装大模型调用。 ```java package com.ai.service; public interface AIService { String generateTeachingContent(String knowledgeBase, String courseOutline); String generateExamQuestions(String knowledgeBase, int questionCount, boolean withAnswers); String answerQuestion(String question, String context); String generatePracticeExercise(String userId, String history); String evaluateAnswer(String answer, String correctAnswer); } ``` #### 2. 实现类(示例使用通义大模型,假设有对应的SDK) 这里假设我们使用HTTP API调用通义大模型,具体URL和参数需根据通义文档调整。 ```java package com.ai.service.impl; import com.ai.service.AIService; import com.utils.HttpClientUtils; import org.springframework.stereotype.Service; @Service public class AIServiceImpl implements AIService { private static final String TONGYI_API_URL = "https://api.tongyi.com/v1/chat/completions"; private static final String API_KEY = "your_api_key"; @Override public String generateTeachingContent(String knowledgeBase, String courseOutline) { String prompt = "根据以下知识库和课程大纲,设计教学内容:\n知识库:" + knowledgeBase + "\n课程大纲:" + courseOutline; return callTongyiAPI(prompt); } @Override public String generateExamQuestions(String knowledgeBase, int questionCount, boolean withAnswers) { String prompt = "根据以下知识库生成" + questionCount + "道题目" + (withAnswers ? "并附答案" : "") + ":\n" + knowledgeBase; return callTongyiAPI(prompt); } @Override public String answerQuestion(String question, String context) { String prompt = "问题:" + question + "\n上下文:" + context + "\n请回答:"; return callTongyiAPI(prompt); } @Override public String generatePracticeExercise(String userId, String history) { // 根据用户历史练习情况生成练习题 String prompt = "根据用户" + userId + "的练习历史:" + history + ",生成一道练习题"; return callTongyiAPI(prompt); } @Override public String evaluateAnswer(String answer, String correctAnswer) { String prompt = "判断学生答案是否正确,并给出解析。学生答案:" + answer + "\n参考答案:" + correctAnswer; return callTongyiAPI(prompt); } private String callTongyiAPI(String prompt) { // 构造请求体,这里以通义API为例,实际根据API文档调整 String requestBody = "{\"model\":\"qwen-turbo\",\"messages\":[{\"role\":\"user\",\"content\":\"" + prompt + "\"}]}"; Map<String, String> headers = new HashMap<>(); headers.put("Authorization", "Bearer " + API_KEY); headers.put("Content-Type", "application/json"); try { String response = HttpClientUtils.post(TONGYI_API_URL, requestBody, headers); // 解析响应,这里假设返回的JSON中choices[0].message.content是回答 // 实际解析需要根据通义API返回结构 JSONObject jsonResponse = new JSONObject(response); return jsonResponse.getJSONArray("choices").getJSONObject(0).getJSONObject("message").getString("content"); } catch (Exception e) { e.printStackTrace(); return "调用大模型失败"; } } } ``` #### 3. 教师侧控制器 在`com.controller`包下创建`TeacherAIController`: ```java package com.controller; import com.ai.service.AIService; import com.utils.R; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/ai/teacher") public class TeacherAIController { @Autowired private AIService aiService; @PostMapping("/generateContent") public R generateContent(String courseOutline) { // 从默认知识库或用户上传的知识库中读取内容(这里简化,实际需要从数据库或文件中读取) String knowledgeBase = "从知识库中读取的内容"; String content = aiService.generateTeachingContent(knowledgeBase, courseOutline); return R.ok().put("content", content); } @PostMapping("/generateExam") public R generateExam(int questionCount, boolean withAnswers) { String knowledgeBase = "从知识库中读取的内容"; String exam = aiService.generateExamQuestions(knowledgeBase, questionCount, withAnswers); return R.ok().put("exam", exam); } } ``` #### 4. 学生侧控制器 在`com.controller`包下创建`StudentAIController`: ```java package com.controller; import com.ai.service.AIService; import com.utils.R; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/ai/student") public class StudentAIController { @Autowired private AIService aiService; @PostMapping("/ask") public R askQuestion(String question) { // 结合当前课程的知识库内容作为上下文 String context = "相关知识点上下文"; String answer = aiService.answerQuestion(question, context); return R.ok().put("answer", answer); } @PostMapping("/generatePractice") public R generatePractice(String userId) { // 获取用户历史练习记录 String history = "用户历史练习记录"; String exercise = aiService.generatePracticeExercise(userId, history); return R.ok().put("exercise", exercise); } @PostMapping("/evaluate") public R evaluateAnswer(String answer, String correctAnswer) { String result = aiService.evaluateAnswer(answer, correctAnswer); return R.ok().put("result", result); } } ``` #### 5. 知识库管理 在`FileController`中增加知识库上传接口,或新建`KnowledgeBaseController`。 ```java // 在FileController中添加 @PostMapping("/uploadKnowledge") public R uploadKnowledge(@RequestParam("file") MultipartFile file) throws IOException { // 保存知识库文件到指定目录,如upload/knowledge // 记录到数据库,关联用户 return R.ok(); } ``` ### 数据库表设计建议 1. **知识库表(knowledge_base)**: - id, user_id, file_name, file_path, create_time 2. **教学内容表(teaching_content)**: - id, teacher_id, title, content, create_time 3. **题目表(exam_question)**: - id, content_id, question, answer, options (如果是选择题), type (题型), difficulty 4. **练习记录表(practice_record)**: - id, student_id, question_id, answer, is_correct, feedback, time ### 前端调整 - 教师备课页面:调用`/ai/teacher/generateContent`生成内容,并提供下载按钮(可生成Word或PDF)。 - 题目生成页面:调用`/ai/teacher/generateExam`生成题目,提供下载(带答案和不带答案)。 - 学生提问页面:调用`/ai/student/ask`获取答案。 - 练习页面:调用`/ai/student/generatePractice`生成练习,提交后调用`/ai/student/evaluate`进行批改。 ### 注意事项 1. **大模型选择**:通义大模型需要申请API Key,注意API调用频率和费用。 2. **本地知识库处理**:上传的知识库文件需要解析(如TXT、PDF、Word等),提取文本供大模型使用。可以使用Apache Tika等工具。 3. **性能考虑**:大模型调用可能较慢,考虑异步处理(如使用Spring的@Async)。 4. **安全性**:对上传的文件进行安全检查,防止恶意文件。 ### 项目结构变化 - 新增`ai`包,包含大模型相关代码。 - 新增控制器`TeacherAIController`和`StudentAIController`。 - 新增数据库表(需在entity包下新增实体,并创建Mapper和Service)。 - 前端新增页面。 ### 默认知识库放置 在`resources`目录下创建`knowledge`文件夹,存放默认知识库文件。在应用启动时,可以加载这些文件到内存或数据库。 ### 相关依赖 在`pom.xml`中添加HTTP客户端(如OkHttp或Apache HttpClient)和JSON处理库(如fastjson)。 ```xml <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>4.9.0</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.78</version> </dependency> ``` ### 总结 以上方案将大模型集成到现有项目中,实现了教师备课、题目生成,学生问答和练习评测等功能。同时,通过文件上传管理知识库,并提供下载功能。需要根据实际的大模型API调整调用方式,并完善前后端交互。 §§相关问题§§: 1. 如何解析上传的PDF、Word等格式的知识库文件? 2. 如何设计数据库表来存储生成的教学内容和题目? 3. 如何实现异步调用大模型API以避免阻塞请求? 4. 如何保证大模型生成的内容与知识库的关联性和准确性?</think>为了将开源通义大模型集成到您的项目中,并实现所需功能,以下是详细的解决方案和项目结构调整建议: ### 1. 本地知识库管理 **实现方案:** - 在`resources`目录下创建`knowledge-base`文件夹存放默认知识库 - 新增知识库管理模块(实体、DAO、Service、Controller) - 实现文件上传接口管理用户上传的知识库 **代码示例:** `KnowledgeBaseController.java`: ```java @RestController @RequestMapping("/knowledge") public class KnowledgeBaseController { @Autowired private KnowledgeService knowledgeService; // 上传知识库文件 @PostMapping("/upload") public R uploadKnowledge(@RequestParam("file") MultipartFile file) { return knowledgeService.uploadKnowledge(file); } // 获取知识库列表 @GetMapping("/list") public R listKnowledge() { return knowledgeService.getKnowledgeList(); } } ``` `KnowledgeService.java`: ```java @Service public class KnowledgeService { @Value("${knowledge.base.path}") private String basePath; public R uploadKnowledge(MultipartFile file) { // 文件大小校验(<100MB) if (file.getSize() > 100 * 1024 * 1024) { return R.error("文件大小不能超过100MB"); } // 保存文件到知识库目录 String fileName = FileUtil.saveFile(file, basePath); // 保存记录到数据库 KnowledgeEntity entity = new KnowledgeEntity(); entity.setFileName(fileName); entity.setOriginalName(file.getOriginalFilename()); knowledgeDao.insert(entity); return R.ok().put("path", fileName); } } ``` ### 2. 教师备课功能集成 **实现方案:** - 新增`AIController`处理AI相关请求 - 集成通义大模型SDK(如通义千问) - 实现教学内容生成接口 **代码示例:** `AIController.java`: ```java @RestController @RequestMapping("/ai") public class AIController { @Autowired private AIService aiService; // 生成教学内容 @PostMapping("/generate-teaching-plan") public R generateTeachingPlan(@RequestBody TeachingPlanRequest request) { TeachingContent content = aiService.generateTeachingContent( request.getCourseId(), request.getKnowledgeIds() ); return R.ok().put("data", content); } } ``` `AIServiceImpl.java`: ```java @Service public class AIServiceImpl implements AIService { @Autowired private KnowledgeDao knowledgeDao; @Override public TeachingContent generateTeachingContent(Long courseId, List<Long> knowledgeIds) { // 1. 获取知识库内容 List<String> knowledgeContents = knowledgeDao.getContentsByIds(knowledgeIds); String context = String.join("\n\n", knowledgeContents); // 2. 构造大模型提示词 String prompt = "你是一名专业教师,请根据以下课程大纲和知识库内容设计教学方案:\n" + context + "\n\n" + "要求包含:知识讲解框架、实训练习设计、时间分配建议(总课时90分钟)"; // 3. 调用通义大模型API String aiResponse = TongyiClient.generateText(prompt); // 4. 解析响应并生成结构化教学内容 return TeachingContentParser.parse(aiResponse); } } ``` ### 3. 考核内容生成 **实现方案:** - 新增题目生成接口 - 支持带答案/不带答案两种模式 - 实现题目下载功能(PDF/Word) **代码示例:** `AIController.java` 新增: ```java // 生成考核题目 @PostMapping("/generate-exam") public R generateExamQuestions(@RequestBody ExamRequest request) { ExamContent exam = aiService.generateExam( request.getCourseId(), request.getQuestionTypes(), request.isIncludeAnswers() ); return R.ok().put("data", exam); } // 下载题目(PDF) @GetMapping("/download-exam/{examId}") public void downloadExam(@PathVariable Long examId, HttpServletResponse response) { ExamContent exam = examService.getExamById(examId); PdfUtil.generateExamPdf(exam, response); } ``` ### 4. 项目结构调整 需要新增/修改的模块: ``` src/main/java/com/ ├── ai │ ├── controller │ │ └── AIController.java │ ├── service │ │ ├── AIService.java │ │ └── impl │ │ └── AIServiceImpl.java │ └── client │ └── TongyiClient.java ├── knowledge │ ├── entity │ │ └── KnowledgeEntity.java │ ├── dao │ │ └── KnowledgeDao.java │ └── service │ └── KnowledgeService.java └── teaching ├── entity │ ├── TeachingContent.java │ └── ExamContent.java └── util └── PdfUtil.java ``` ### 5. 配置文件修改 `application.yml` 新增配置: ```yaml tongyi: api-key: YOUR_API_KEY endpoint: https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation knowledge: base-path: classpath:knowledge-base/ max-size-mb: 100 ``` ### 6. 前端调整建议 1. 教师侧新增页面: - `resources/front/pages/teaching/ai-teaching-plan.html` 备课页面 - `resources/front/pages/exam/ai-exam-generator.html` 题目生成页面 2. 学生侧新增页面: - `resources/front/pages/learning/ai-assistant.html` 学习助手 - `resources/front/pages/practice/ai-practice.html` 智能练习 3. 管理侧新增: - `static/admin/src/views/modules/dashboard.vue` 教学数据大屏 - `static/admin/src/views/modules/knowledge` 知识库管理 ### 7. 通义大模型集成 **通义千问集成示例:** `TongyiClient.java`: ```java public class TongyiClient { private static final Logger logger = LoggerFactory.getLogger(TongyiClient.class); public static String generateText(String prompt) { OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); // 构造请求体 String json = "{\"model\":\"qwen-turbo\",\"input\":{\"messages\":[" + "{\"role\":\"system\",\"content\":\"你是一名专业助教\"}," + "{\"role\":\"user\",\"content\":\"" + prompt + "\"}]}}"; Request request = new Request.Builder() .url("https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation") .post(RequestBody.create(mediaType, json)) .addHeader("Authorization", "Bearer " + apiKey) .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); JSONObject jsonResponse = new JSONObject(response.body().string()); return jsonResponse.getJSONObject("output") .getJSONArray("choices") .getJSONObject(0) .getJSONObject("message") .getString("content"); } catch (Exception e) { logger.error("调用通义API失败", e); return "生成失败,请稍后重试"; } } } ``` ### 8. 非功能性需求实现 1. **知识库关联性验证**: ```java // 在生成题目后验证关联性 public void validateQuestionRelevance(Question question, List<Long> knowledgeIds) { List<String> knowledgePoints = knowledgeDao.getKeyPoints(knowledgeIds); String prompt = "请验证以下题目是否涉及这些知识点:\n知识点: " + String.join(",", knowledgePoints) + "\n题目: " + question.getContent(); String validation = TongyiClient.generateText(prompt); if (validation.contains("不相关")) { throw new ValidationException("生成题目与知识库关联性不足"); } } ``` 2. **教学效率指数计算**: ```sql -- 在DashboardController中使用的SQL SELECT AVG(TIMESTAMPDIFF(MINUTE, start_time, end_time)) AS avg_prep_time, SUM(CASE WHEN correctness < 60 THEN 1 ELSE 0 END) * 100.0 / COUNT(*) AS low_score_rate FROM teaching_sessions WHERE course_id = #{courseId} ``` ### 完整项目结构调整 ``` C:. ├── main │ ├── java │ │ └── com │ │ ├── ai │ │ ├── knowledge │ │ ├── teaching │ │ └── utils # 新增AI相关工具类 │ └── resources │ ├── knowledge-base # 知识库默认目录 │ ├── mapper │ │ └── KnowledgeDao.xml # 新增 │ └── templates │ └── exam-template.ftl # 考题模板 └── test └── java └── com └── ai └── AIServiceTest.java # 新增测试 ``` ### 关键注意事项 1. **知识库存储**: - 默认知识库:`resources/knowledge-base/` - 用户上传:存储在外部目录(如`/data/knowledge/`),避免打包时包含 2. **大模型调用优化**: - 使用异步调用避免阻塞:`@Async` - 实现结果缓存:`@Cacheable` - 添加限流保护:Resilience4j 3. **安全性**: - 知识库文件类型白名单(PDF/DOCX/TXT) - 文件内容病毒扫描 - API调用频率限制 4. **性能考虑**: - 大模型响应可能较慢(>5s),前端需要加载状态提示 - 大量知识库处理时分块调用API
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值