博客
关于我
认知智能机器人已经来了!认知智能时代!道翰天琼认知智能未来机器人接口API简介介绍
阅读量:185 次
发布时间:2019-02-28

本文共 3185 字,大约阅读时间需要 10 分钟。

?????????????????60???chatbot?????????????????????????????????20??60???90????chatbot????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

  • ???????????????
  • ?????????????????
  • ???????????????????
  • ??????????????????????????
  • ?????????????????????????

  • ????????????????????????????????????????HNC???????
  • ??????????????????????????????????????
  • ??????????????????????????????????????????
  • ??????????????????????????????
  • ????????????????????????????????????

    ?????????

    ???????????????????????

  • ??APIKEY??????????????????????APIKEY?
  • ?????IP?????????????????IP???????????QQ???
  • ???????????????GBK????????????
  • ?????????????????APIKEY?????????IP??????URL???
  • ??????

    ???????Java????????????

    import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.UnsupportedEncodingException;import java.net.HttpURLConnection;import java.net.URL;import java.net.URLEncoder;import ai.nlp.jiekou.test.ChangLiangZi;public class ApiTest {    private static String opUrl(String urlStr) {        try {            URL url = new URL(urlStr);            HttpURLConnection conn = (HttpURLConnection) url.openConnection();            conn.setReadTimeout(5 * 10000);            conn.setConnectTimeout(5 * 10000);            conn.setRequestMethod("POST");                        if (conn.getResponseCode() == 200) {                InputStream is = conn.getInputStream();                ByteArrayOutputStream baos = new ByteArrayOutputStream();                byte[] buf = new byte[128];                int len = -1;                                while ((len = is.read(buf)) != -1) {                    baos.write(buf, 0, len);                }                baos.flush();                return baos.toString();            } else {                throw new Exception("????????");            }        } catch (Exception e) {            e.printStackTrace();        } finally {            try {                if (is != null) {                    is.close();                }                try {                    if (baos != null) {                        baos.close();                    }                } catch (IOException e) {                    e.printStackTrace();                }                conn.disconnect();            } catch (IOException e) {                e.printStackTrace();            }        }        return ChangLiangZi.WU;    }    public static void main(String[] args) {        String msg = "??????";        String apikey = "UTNJK34THXK010T566ZI39VES50BLRBE8R66H5R3FOAO84J3BV";        String ip = "127.0.0.1";        try {            msg = URLEncoder.encode(msg, "GBK");            System.out.println(opUrl("http://a239p06512.zicp.vip/Web/BuAppJava.bujqrex?apikey=" + apikey + "&msg=" + msg + "&ip=" + ip));        } catch (UnsupportedEncodingException e) {            e.printStackTrace();        }    }}

    ????

  • ???????????????????
  • ??????????????GBK?????????????
  • IP?????????IP??????????
  • ??????????POST?????
  • ???????????????????????????????????????

    转载地址:http://nuwn.baihongyu.com/

    你可能感兴趣的文章
    Nginx的是什么?干什么用的?
    查看>>
    Nginx访问控制_登陆权限的控制(http_auth_basic_module)
    查看>>
    nginx负载均衡的五种算法
    查看>>
    Nginx配置ssl实现https
    查看>>
    Nginx配置TCP代理指南
    查看>>
    Nio ByteBuffer组件读写指针切换原理与常用方法
    查看>>
    NI笔试——大数加法
    查看>>
    NLP 基于kashgari和BERT实现中文命名实体识别(NER)
    查看>>
    No 'Access-Control-Allow-Origin' header is present on the requested resource.
    查看>>
    Node.js安装与配置指南:轻松启航您的JavaScript服务器之旅
    查看>>
    npm的问题:config global `--global`, `--local` are deprecated. Use `--location=global` instead 的解决办法
    查看>>
    NR,NF,FNR
    查看>>
    nrf开发笔记一开发软件
    查看>>
    NSDateFormatter的替代方法
    查看>>
    NSSet集合 无序的 不能重复的
    查看>>
    ntko文件存取错误_苹果推送 macOS 10.15.4:iCloud 云盘文件夹共享终于来了
    查看>>
    nullnullHuge Pages
    查看>>
    numpy 用法
    查看>>
    Numpy如何使用np.umprod重写range函数中i的python
    查看>>
    oauth2-shiro 添加 redis 实现版本
    查看>>