diff --git a/config.properties b/config.properties
new file mode 100644
index 0000000..ef5659e
--- /dev/null
+++ b/config.properties
@@ -0,0 +1,99 @@
+test_var=1111
+qa_url=http://192.168.1.78:59000/game
+
+cc_url=http://localhost:8070/api/update/data
+
+//condition_backend=http://192.168.1.82
+
+unknown_text=不好意思,我没听懂你刚才说的话,请换个别的问题试试吧~哎呀,刚才开了小差,没理解你的意思,请换个问题吧~请根据上文信息,认真回答吧,谢谢~我们好像不在一个频道上,换个问题试试,希望我们能够接轨上吧
+
+location_hint=请到%s
+
+game_start_hint=请说开始剧情或者继续剧情
+
+game_module_error=游戏模块出错
+
+# -------------------------------游戏生成---------------------------
+delete_old_config_term_error=删除旧数据config失败
+delete_old_variable_error=删除旧变量失败
+delete_old_category_error=删除旧类别失败
+# ----------------------------------------------------------------
+
+unknown_text_description=对于无法识别的问题做出的回答
+game_step_description=QA问答游戏进度
+
+star_plot_not_exist=开始剧情不存在,请到剧情列表设置
+
+助手对应的变量
+assistant=globalVariable_智能助手
+
+# ------------------------助手情绪--------------
+assistant_emotion=正常
+talker_pattern=【%s@%s】
+# ----------------------------------------------
+game_step_format=%s_plot_%s
+
+# ----------------------剧情进度标识-----------------
+task_line=任务线_%s进度
+task_condition=任务线%s最后一个condition
+task_reply=任务线%s最后的回答
+plot_status=剧情%s状态
+# ---------------------------------------------------
+
+plot_generation_error=剧情接口处理出现异常
+
+默认condition
+default_condition=yaobuyao
+
+script_not_exist=话术不存在
+
+goto_condition=yaobuyao
+
+#-------------------话术------------------------
+nothing_found=什么都没有
+dont_found=没有找到
+nowhere_can_go=没有地方可以去了
+attribute_hidden=不能看到哦
+
+attr_value_slot=[属性值]
+attr_name_slot=[属性名]
+npc_name_slot=[人名]
+npc_list_slot=[人物列表]
+site_slot=[地点名]
+site_slot2=[地点]
+site_list_slot=[地点列表]
+item_list_slot=[物品列表]
+item_name_slot=[物品名]
+npc_item_list_slot=[人物物品列表]
+can_go_site_slot=[可去列表]
+path_slot=[途径]
+start_slot=
+destination_slot=[目的地]
+task_description_slot=[任务描述]"
+
+find_item_owner=[物品名]在[人名]身上
+#----------------------------------------------
+
+# ---------------------文本解析---------------------
+text_parse_error=文本解析出错
+automatch_threshold=0.5
+game_condition_category=97
+service_url=http://192.168.1.178:8081/bot/dialog
+options=disable_knowledge_qa,fast_understanding,pattern_cover,no_repeat
+automatch_url=http://dev01.centaurstech.com:5700/mermaid/?model=auto-train
+idlelimit=180000
+condition_generate_url=http://192.168.1.178:1111/conditionProcess
+condition_backend_url=http://192.168.1.82:6636/api
+style=interrupt,multimatchvalues,bothvalue
+fellow=pivot_httppost
+
+post_style1=style=httppost,bothvalue,multimatchvalues
+post_style2=style=httppost,multimatchvalues
+post_action_head=#actions\r\nname=pivot_httppost\r\nstatus=waiting\r\n%s\r\nserviceURL=%s
+
+
+# ----------------------condition增删改查异常----------------------------
+update_keyword_error=更新关键词单元失败
+delete_user_data_error=删除用户数据失败
+game_condition_category_id=123
+platform_sql_init_error=新平台获取sql连接失败
\ No newline at end of file
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..2ccf068
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+mvn clean package -Ppro -Dmaven.test.skip=true
+cd target
+scp my-app.jar hz1:visualkm/chatbot-backend
+cd ..
+
diff --git a/gameconfig.txt b/gameconfig.txt
new file mode 100644
index 0000000..4f6b678
--- /dev/null
+++ b/gameconfig.txt
@@ -0,0 +1 @@
+{"gameStart":[{"conditionName":"start_options","plotText":"请说开始剧情或者继续剧情","id":"start1","place":"加载","branch":[{"curPremise":[{"conditionName":"start_options","cmpType":"match","operator":"Include","keyword":"重新开始"},],"higherPriority":true,"includeCurInfo":false,"autoJump":false,"hisPremise":[],"moveWithPlot":true,"updateKnowledge":{"unknownText":"firstUnknownText",},"extraFeature":"newGame","nextPlotId":"startId",},{"curPremise":[{"conditionName":"start_options","cmpType":"match","operator":"Include","keyword":"+开始+开始游戏+继续游戏+继续"},],"higherPriority":true,"includeCurInfo":false,"autoJump":false,"hisPremise":[],"moveWithPlot":true,"updateKnowledge":{"unknownText":"firstUnknownText",},"extraFeature":"loadLastArchive","nextPlotId":"startId",},{"curPremise":[{"conditionName":"load_game_by_site","cmpType":"match","operator":"Include","keyword":"site_list"},],"higherPriority":true,"includeCurInfo":false,"autoJump":false,"hisPremise":[],"moveWithPlot":true,"updateKnowledge":{"unknownText":"firstUnknownText",},"extraFeature":"loadArchiveBySite","nextPlotId":"startId"},{"curPremise":[],"higherPriority":true,"includeCurInfo":false,"autoJump":false,"hisPremise":[],"moveWithPlot":true,"updateKnowledge":{},"nextPlotId":"start1",},{"curPremise":[{"conditionName":"start_options","cmpType":"match","operator":"Include","keyword":"+存档列表"},],"higherPriority":true,"includeCurInfo":false,"autoJump":false,"hisPremise":[],"extraFeature":"sendArchiveList","moveWithPlot":false,"updateKnowledge":{},"nextPlotId":"start1",}]}]}
\ No newline at end of file
diff --git a/keywords.txt b/keywords.txt
new file mode 100644
index 0000000..6645063
--- /dev/null
+++ b/keywords.txt
@@ -0,0 +1,101 @@
+
+
+# ------------------------------------------------------------------------------
+# 格式
+# 意图|语义关系名字|关键词
+# name表示可以替换的名字,如物品名、角色名
+# attrName是属性名
+# qiwu就是玩家“我”
+
+
+
+# ------------------------------------------------------------------------------
+# 我在哪里
+WHERE_I_AM|zainali|+在:哪里+在:哪儿+在:哪+在:位置+在:地点+在:地方+到:哪里+到:地点+到:地方
+WHERE_I_AM|wenzainali|+哪:qiwu+地方:qiwu+位置:qiwu+地点:qiwu+哪里:qiwu+哪儿:qiwu+哪:landey+地方:landey+位置:landey+地点:landey+哪里:landey+哪儿:landey
+
+
+
+
+# 我能去哪里
+WHERE_CAN_I_GO|choose_gowhere|+哪里:qiwu+哪:qiwu+哪儿:qiwu+地方:qiwu+哪里:去+哪:能去+哪里:能去+哪儿:能去+地方:能去+地方:去+地方:能去+哪里:能去+哪:去+哪:能去+哪儿:去+哪:qiwu+哪:到+哪儿:到+哪里:到
+
+# 周围有什么人
+AROUND_NPC|know_exist_what|+周围:人+旁边:人+附近:人+周围:谁+这里:谁+这里:人+有什么:人+里面:人+里面:谁+哪些:人+qiwu:人+qiwu:谁+有:谁+有:人+附近:谁+有:附近+旁边:谁
+AROUND_NPC|zhiwen|+这里:谁+这里:谁+谁:在
+
+# 周围有什么npc类别
+AROUND_NPC_CLASS|know_exist_what|+周围:name+附近:name
+
+# 周围有什么
+AROUND_THINGS|know_exist_what_mohu|+有什么:周围+有什么:附近+有什么:这里+有:哪些:这里+有谁:周围+有什么:里面+有什么:旁边+qiwu:旁边+有什么:这里+有:哪些
+
+# 周围有什么物品
+AROUND_ITEM|know_exist_what|+周围:物品+旁边:物品+旁边:东西+周围:东西+附近:物品+附近:东西+这里:物品+这里:东西+有什么:东西+有什么:物品+哪些:物品+哪些:东西+有:东西+里面:物品
+AROUND_ITEM|nums|+有:哪些
+# AROUND_ITEM|zhiwen|+附近:who+周围:who+旁边:who
+
+# 周围有什么地方
+AROUND_PLACE|know_exist_what|+周围:地点+周围:地方+哪些:地方+哪些:地点+旁边:地方+旁边:地点+附近:地方+附近:地点
+
+# 周围有什么物品类别
+AROUND_ITEM_CLASS|know_exist_what|+周围:name+附近:name
+
+# 我有什么
+WHAT_ITEM_I_HAVE|know_exist_what_mohu|+有什么:qiwu+什么:qiwu+qiwu:东西+qiwu:地方
+WHAT_ITEM_I_HAVE|know_exist_what|有什么:东西
+WHAT_ITEM_I_HAVE|zhiwen|+qiwu:带
+
+# 里面有谁
+WHO_IN_THERE|shishui|+谁:里面+里面:人
+
+# 去xx
+GO_TO|yaobuyao|+去:name+到:name
+
+# 怎么找到NPC
+HOW_TO_FIND_NPC|xxx|+找到:name
+
+
+# 你是谁
+WHO_YOU_ARE|zhiwen|+botname:谁+botname:干嘛+那个人:谁+人:谁+botname:是+人:是
+
+# 任务是什么
+TASK_IS_WHAT|shishenme|+是什么:任务+qiwu:任务
+TASK_IS_WHAT|zhiwen|+qiwu:要去
+
+# npc在哪里
+NPC_LOCATION|wenzainali|+哪里:name+哪:name+地方:name+地点:name
+
+# 物品在哪里
+ITEM_LOCATION|wenzainali|+哪里:name+哪:name+地方:name+地点:name+位置:name+哪儿:name+位置:name
+
+
+# 怎么找到npc
+HOW_FIND_NPC|want_know_zenmezuo|+找到:name
+#怎么找到物品
+HOW_FIND_ITEM|want_know_zenmezuo|+找到:name
+
+# 沙滩上有什么人
+WHAT_NPC_IN_LOCATION|xxx|地点
+
+# xx上有什么东西
+WAHT_ITEM_IN_LOCATION|xxx|地点
+
+# 地点上有什么
+WHAT_THINGS_IN_LOCATION|xxx|地点
+
+# npc的属性是多少
+NPC_ATTR|nums|+name:attrName
+NPC_ATTR|shishenme|+name:attrName
+
+# 物品的属性是多少
+ITEM_ATTR|nums|+name:attrName
+ITEM_ATTR|shishenme|+name:attrName
+
+# 周围有什么物品类别
+AOURND_NPC_CLASS|know_exist_what|+周围:name+附近:name
+
+# 怎么去XXX
+HOW_TO_THERE|want_know_zenmezuo|+去:name
+
+
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..438dd0f
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,178 @@
+
+
+ 4.0.0
+
+ com
+ chatbot
+ 0.0.1-SNAPSHOT
+ jar
+
+ chatbot
+ Demo project for Spring Boot
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.1.0.RELEASE
+
+
+
+
+ UTF-8
+ UTF-8
+ 1.8
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ com.alibaba
+ fastjson
+ 1.2.51
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5
+
+
+ commons-lang
+ commons-lang
+ 2.5
+
+
+ org.apache.tomcat
+ tomcat-dbcp
+ 9.0.12
+
+
+
+
+ c3p0
+ c3p0
+ 0.9.1.2
+
+
+
+
+ log4j
+ log4j
+ 1.2.17
+
+
+
+ mysql
+ mysql-connector-java
+ 5.0.7
+
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+ com.google.guava
+ guava
+ 18.0
+
+
+
+ org.skyscreamer
+ jsonassert
+ 1.5.0
+
+
+
+
+
+
+ my-app
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.5.1
+
+ 1.8
+ 1.8
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ -Xmx64m
+
+
+
+
+
+
+ src/main/resources
+
+
+ test/*
+ pro/*
+ dev/*
+
+
+ *.properties
+
+ true
+
+
+ src/main/resources/${profiles.active}
+
+
+
+
+
+
+
+ dev
+
+ dev
+ dev
+
+
+ true
+
+
+
+
+
+ test
+
+ test
+ test
+
+
+
+
+
+ pro
+
+ pro
+ pro
+
+
+
+
+
+
diff --git a/src/Config/Config.java b/src/Config/Config.java
new file mode 100644
index 0000000..3da8bd0
--- /dev/null
+++ b/src/Config/Config.java
@@ -0,0 +1,111 @@
+package com.qiwu.chatbotbackend.Config;
+
+import org.springframework.stereotype.Component;
+
+@Component
+public class Config {
+
+ public static String TEXT_PARSE_ERROR = null;
+ public static String CONDITION_URL = null;
+ public static String TEST_VAR = null;
+ public static String QA_URL = null;
+ public static String CC_URL = null;
+ public static String UNKNOWN_TEXT = null;
+ public static String LOCATION_HINT = null;
+ public static String GAME_START_HINT = null;
+ public static String GAME_MODULE_ERROR = null;
+ public static String DELETE_OLD_CONFIG_TERM_ERROR = null;
+ public static String DELETE_OLD_VARIABLE_ERROR = null;
+ public static String DELETE_OLD_CATEGORY_ERROR = null;
+
+ public static String UNKNOWN_TEXT_DESCRIPTION = null;
+ public static String GAME_STEP_DESCRIPTION = null;
+ public static String START_PLOT_NOT_EXIST = null;
+
+
+ public static String ASSISTANT = null;
+ public static String ASSISTANT_EMOTION = null;
+ public static String TASK_DESCRIPTION = null;
+
+ public static String TALKER_PATTERN = null;
+ public static String GAME_STEP_FORMAT = null;
+
+ public static String PLOT_STATUS = null;
+
+ public static String TASK_LINE = null;
+ public static String TASK_CONDITION = null;
+ public static String TASK_REPLY = null;
+
+ public static String PLOT_GENERATION_ERROR = null;
+
+ //默认condition
+ public static String DEFAULT_CONDITION = null;
+
+ //去xx地方condition
+ public static String GOTO_CONDITION = null;
+
+
+ public static class Script {
+ public static String CODE = "subcode";
+ public static int SIZE = 12;
+ };
+
+
+ public static String POST_ACTION_ERROR = null;
+ public static String TOKEN_TIME_OUT = null;
+ public static String ENCODE_ERROR = null;
+
+
+ //话术
+ public static String NOTHING_FOUND = null;
+ public static String DONT_FOUND = null;
+ public static String NOWHERE_CAN_GO = null;
+ public static String ATTRIBUTE_HIDDEN = null;
+
+
+
+ public static String ATTR_VALUE_SLOT = null;
+ public static String ATTR_NAME_SLOT = null;
+ public static String NPC_NAME_SLOT = null;
+ public static String NPC_LIST_SLOT = null;
+ public static String SITE_SLOT = null;
+ public static String SITE_SLOT2 = null;
+ public static String ITEM_LIST_SLOT = null;
+ public static String ITEM_NAME_SLOT = null;
+ public static String NPC_ITEM_LIST_SLOT = null;
+ public static String CAN_GO_SITE_SLOT = null;
+ public static String PATH_SLOT = null;
+ public static String START_SLOT = null;
+ public static String DESTINATION_SLOT = null;
+ public static String SITE_LIST_SLOT = null;
+ public static String TASK_DESCRIPTION_SLOT = null;
+
+ public static String FIND_ITEM_OWNER = null;
+
+
+ //生成action
+ public static String GAME_CONDITION_CATEGORY = null;
+ public static String AUTOMATCH_THRESHOLD = null;
+ public static String IDLE_LIMIT = null;
+ public static String CONDITION_BACKEND_URL = null;
+ public static String CONDITION_GENERATE_URL= null;
+ public static String OPTIONS = null;
+ public static String STYLE = null;
+ public static String AUTOMATCH_URL = null;
+ public static String SERVICE_URL = null;
+
+ public static String FELLOW = null;
+
+ public static String POST_STYLE1 = null;
+ public static String POST_STYLE2 = null;
+
+ public static String POST_ACTION_HEAD=null;
+
+
+
+ //condition增删改查异常
+ public static String UPDATE_KEYWORD_ERROR = null;
+
+ public static String DELETE_USER_DATA_ERROR = null;
+
+}
diff --git a/src/Config/ConfigInitializer.java b/src/Config/ConfigInitializer.java
new file mode 100644
index 0000000..39d6d30
--- /dev/null
+++ b/src/Config/ConfigInitializer.java
@@ -0,0 +1,75 @@
+package com.qiwu.chatbotbackend.Config;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Properties;
+import java.util.Set;
+
+public class ConfigInitializer {
+
+ private static final String CONFIGFILE = "config.properties";
+ private static final String CLASSPREFIX = "com.qiwu.chatbotbackend.config.config";
+
+ /**
+ * 读取配置文件
+ */
+ public static void init() {
+ InputStream configInputStream;
+ try {
+ BufferedReader bufferedReader = new BufferedReader(new FileReader(CONFIGFILE));
+ Properties properties = new Properties();
+ properties.load(bufferedReader);
+
+
+ initNextLevel(properties, Config.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ }
+ }
+
+ public static void initNextLevel(Properties properties, Class nowClass) throws IllegalAccessException {
+ String baseClassName = nowClass.getName().toLowerCase().replaceAll("\\$", "\\.");
+ String shortName = baseClassName.replaceAll(CLASSPREFIX, "").replaceFirst("\\.", "");
+ //key集合
+ Set