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

修改网站版权iis如何建立网站

修改网站版权,iis如何建立网站,广东省住房城乡建设厅网站,网站标头设计一、前言当前DataEase BI更多聚焦于BI展示层,然而,在与组件Copilot 以及后续计划替换的 Sqlbot的融合方面,目前仍存在一些亟待解决的问题,当它们尝试与 DataEase 进行结合应用时,出现了两种较为突出的状况。一方面&…

一、前言

当前DataEase BI更多聚焦于BI展示层,然而,在与组件Copilot 以及后续计划替换的 Sqlbot的融合方面,目前仍存在一些亟待解决的问题,当它们尝试与 DataEase 进行结合应用时,出现了两种较为突出的状况。

一方面,Copilot与 DataEase 的集成割裂感过于强烈。这种割裂不仅体现在操作流程上,用户需要在不同组件之间频繁切换,增加了操作的复杂性和繁琐程度;还表现在数据交互层面,组件之间无法实现无缝的数据传递与共享,导致数据的一致性和连贯性受到影响,极大地降低了用户的使用体验。

另一方面,Sqlbot组件在进行数据查询时,往往针对的是全局数据集。这意味着无论用户当前正在关注哪个具体的大屏展示内容,组件所返回的查询结果都是基于整个数据集的宏观信息。但用户在实际使用过程中,通常更希望针对当前所展示大屏中的特定数据进行问答交互和深入解析,以获取与当前展示内容紧密相关的详细信息和分析结果。现有的这种查询方式与用户实际需求之间存在明显偏差,无法精准满足用户对于当前展示大屏数据问答和解析的期望。

基于上述痛点,我们将MaxKB对应应用嵌入DataEase公共链接大屏,可以实现针对当前大屏的智能问答。

二、实现

1、环境准备

·部署DataEase:详见 https://dataease.io/docs/v2/installation/online_installation/

·部署Maxkb:详见 https://maxkb.cn/docs/v2/installation/online_installtion/

2、MaxKB应用制作

2.1 函数库编写

·生成DataEase token

import jwt
import requestsfrom Crypto.Cipher import AES from Crypto.Util.Padding import pad from base64 import b64encode from uuid import uuid4 import time   def generate_token(accessKey,secretKey):     """生成包含AES加密签名的JWT令牌"""     # 生成唯一ID和时间戳     unique_id = str(uuid4())     timestamp = str(time.time_ns() // 1000000)           # AES加密逻辑(原aes_encrypt方法的功能)     src = accessKey + "|" + unique_id + "|" + timestamp     secret_key = secretKey.encode('utf-8')     iv = accessKey.encode('utf-8')     cipher = AES.new(secret_key, AES.MODE_CBC, iv)     encrypted = cipher.encrypt(pad(src.encode('utf-8'), AES.block_size))     signature = b64encode(encrypted).decode('utf-8')           # 生成并返回JWT令牌     token = jwt.encode(         {'accessKey': accessKey, 'signature': signature},         secretKey,         algorithm='HS256'     )     return token

·调用DataEase查询看板详情接口

import requests
import json  def findById(token,id,busiFlag,domain):       # 生成签名和令牌     # 设置请求头     headers = {         'Accept': '*/*',         'Content-Type': 'application/json',         'x-de-ask-token': token     }           requestData = {         'id': id,         'busiFlag': busiFlag,         'source':'main',         'resourceTable':'core'     }       # 发送请求     response = requests.post(domain+'/de2api/dataVisualization/findById', headers=headers, json=requestData)     responseJson = json.loads(response.text)     title_map = {}     for key, value in responseJson['data']['canvasViewInfo'].items():         # 获取每个对象的title作为新的键         title = value.get('title')         if title: # 确保title存在(避免空值)             title_map[title] = value                   return title_map

·获取图表数据

import requests
import json  def getData(token,key,canvasViewMap,domain):       # 生成签名和令牌     # 设置请求头     headers = {         'Accept': '*/*',         'Content-Type': 'application/json',         'x-de-ask-token': token     }           # 发送请求     response = requests.post(domain+'/de2api/chartData/getData', headers=headers, json=canvasViewMap[key])     responseJson = json.loads(response.text)         data = responseJson['data']['data']           shortname_to_name = {         field["fieldShortName"]: field["name"]         for field in data["fields"]     }       mapped_table_rows = []     for row in data["tableRow"]:         mapped_row = {             shortname_to_name[shortname]: value             for shortname, value in row.items()         }         mapped_table_rows.append(mapped_row)               return mapped_table_rows

2.2高级编排

注:

1、其中涉及的id等信息与de嵌入式那里获取类似,应用见附件

2、原理是通过接口查询视图标题(所以视图必须得有标题且不一样,故富文本不支持)

3、中间会用到大模型提取视图标题,目前有些客户本地部署的大模型不能正确提取标题

3、部署Nginx

yum install gcc pcre-devel openssl-devel -y
wget http://nginx.org/download/nginx-1.20.2.tar.gz && tar -zxvf nginx-1.20.2.tar.gz && cd nginx-1.20.2 && ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_v2_module --with-http_sub_module && make && make install

cat /usr/local/nginx/conf/nginx.conf

#user nobody;
worker_processes  1;   #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info;   #pid       logs/nginx.pid;     events {     worker_connections  1024; }     http {     include      mime.types;     default_type application/octet-stream;       #log_format main  '$remote_addr - $remote_user [$time_local] "$request" '     #                  '$status $body_bytes_sent "$http_referer" '     #                  '"$http_user_agent" "$http_x_forwarded_for"';       #access_log logs/access.log main;       sendfile       on;     #tcp_nopush    on;       #keepalive_timeout  0;     keepalive_timeout  65;       #gzip on;       server_tokens off;          server {                 listen 8088 ;                            location / {                         proxy_pass  http://localhost:9080/;#DataEase                         server_name_in_redirect off;                         proxy_http_version      1.1;                         proxy_set_header       Upgrade        $http_upgrade;                         proxy_set_header       Connection "upgrade";                           proxy_set_header          Host $host:$server_port;                         proxy_set_header          X-Real-IP $remote_addr;                         proxy_set_header          X-Forwarded-For $proxy_add_x_forwarded_for;                         proxy_set_header          X-Forwarded-Proto $scheme;                           sub_filter '</head>' '<script async defer src="http://XXX:8080/chat/api/embed?protocol=http&host=XXX:8080&token=XXXX"></script>'; #MaxKB应用嵌入                         sub_filter_once on;                 }         }       server {         listen       80;         server_name localhost;           #charset koi8-r;           #access_log logs/host.access.log main;           location / {             root  html;             index index.html index.htm;         }     } }

4、效果展示

三、优化点

  1. 应用中的提示词可以根据实际需求优化,也可以与智能问数场景结合;
  2. 当前nginx那边多个大屏+对应mk应用需要多个url代理
通过网盘分享的文件:DataEase.mk
链接: https://pan.baidu.com/s/1bRJLBHasveXR4l4wPPaE8g?pwd=7htt 提取码: 7htt
http://www.dtcms.com/a/440551.html

相关文章:

  • 佛山移动网站建设公司wordpress内容
  • wordpress云建站深圳建筑设计有限公司
  • 怎样上网站dns解析不了杭州公司注销网站备案
  • 如何自己做代理网站的想法网站改版思路
  • 领优惠券的小网站怎么做广州做地铁的公司网站
  • 网站建设与管理需要哪些证书北京三快在线科技有限公司
  • 简易手机网站开发中国能源建设集团招聘
  • 网站改版合同书公司官网制作教程
  • 有什么网站可以做简历免费ps软件网站
  • 网站查询平台官网嘉兴做网站建设的公司哪家好
  • 建设银行网站买手机wordpress 4.7.11搬家
  • 做理论的网站黄村网站开发公司电话
  • 做二手房网站有哪些邢台做wap网站费用
  • 廊坊专业网站制作服务移动互联网营销
  • 建筑专业网站wordpress postgres
  • 大都会app官网最新云seo关键词排名优化软件
  • 最简单的电子商务网站建设代码定制高端网页
  • 宝盈集团直营网站怎么做wordpress网址更换
  • 网站开发工具及框架介绍关键词排名工具有哪些
  • 网站不关站备案广告设计与制作需要学什么专业
  • wordpress怎么搭深圳seo优化seo优化
  • seo建站要求五金企业网站模板
  • 教育技术专业网站开发课程网站制作公司怎么收费
  • 1688做网站多少钱建设部网站为什么打不开
  • 深圳建网站app官方网站
  • 网站建设的域名续费百度seo关键词排名
  • 陕西网站建设维护北碚区网络营销推广公司
  • 广州网站建设 超凡科技外包项目网站
  • 关岭县建设局网站谷德室内设计网
  • 一个公司是否可以做多个网站WordPress4.8中文的把