2025年4月1日发版内容

This commit is contained in:
workpc 2025-04-01 19:08:10 +08:00
parent 54506df99e
commit 12710ae39c
8 changed files with 516 additions and 173 deletions

View File

@ -89,24 +89,20 @@ data = {
ClassifyId = 1214
# 变量定义--测试环境
server_host = '192.168.100.53' # 内网
# server_host = '183.242.74.28' # 外网
login_pushreport_url = f"http://{server_host}:8080/jingbo-dev/api/server/login"
# 上传报告
upload_url = f"http://{server_host}:8080/jingbo-dev/api/analysis/reportInfo/researchUploadReportSave"
# 停更预警
upload_warning_url = f"http://{server_host}:8080/jingbo-dev/api/basicBuiness/crudeOilWarning/save"
# 查询数据项编码
query_data_list_item_nos_url = f"http://{server_host}:8080/jingbo-dev/api/warehouse/dwDataItem/queryDataListItemNos"
################################################################################################################ 变量定义--线上环境
server_host = '10.200.32.39'
login_pushreport_url = "http://10.200.32.39/jingbo-api/api/server/login"
upload_url = "http://10.200.32.39/jingbo-api/api/analysis/reportInfo/researchUploadReportSave"
upload_warning_url = "http://10.200.32.39/jingbo-api/api/basicBuiness/crudeOilWarning/save"
query_data_list_item_nos_url = f"http://{server_host}/jingbo-api/api/warehouse/dwDataItem/queryDataListItemNos"
# 上传数据项值
push_data_value_list_url = f"http://{server_host}:8080/jingbo-dev/api/dw/dataValue/pushDataValueList"
push_data_value_list_url = f"http://{server_host}/jingbo-api/api/dw/dataValue/pushDataValueList"
login_data = {
"data": {
"account": "api_test",
# "password": "MmVmNzNlOWI0MmY0ZDdjZGUwNzE3ZjFiMDJiZDZjZWU=", # Shihua@123456
"password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", # 123456
"account": "api_dev",
"password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=",
"tenantHashCode": "8a4577dbd919675758d57999a1e891fe",
"terminal": "API"
},
@ -114,45 +110,48 @@ login_data = {
"funcOperation": "获取token"
}
upload_data = {
"groupNo": '', # 用户组id
"funcModule": '研究报告信息',
"funcOperation": '上传原油价格预测报告',
"data": {
"ownerAccount": 'arui', # 报告所属用户账号
"reportType": 'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
"fileName": '2000-40-5-50--100-原油指标数据.xlsx-Brent活跃合约--2024-09-06-15-01-29-预测报告.pdf', # 文件名称
"fileBase64": '', # 文件内容base64
"categoryNo": 'yyjgycbg', # 研究报告分类编码
"smartBusinessClassCode": 'YCJGYCBG', # 分析报告分类编码
"reportEmployeeCode": "E40116", # 报告人
"reportDeptCode": "D0044", # 报告部门
"productGroupCode": "RAW_MATERIAL" # 商品分类
}
"funcModule":'研究报告信息',
"funcOperation":'上传原油价格预测报告',
"data":{
"groupNo":'', # 用户组id
"ownerAccount":'27663', #报告所属用户账号 27663 - 刘小朋
"reportType":'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
"fileName": '', #文件名称
"fileBase64": '' ,#文件内容base64
"categoryNo":'yyjgycbg', # 研究报告分类编码
"smartBusinessClassCode":'YCJGYCBG', #分析报告分类编码
"reportEmployeeCode":"E40482" ,# 报告人 E40482 - 管理员 0000027663 - 刘小朋
"reportDeptCode" :"002000621000", # 报告部门 - 002000621000 SH期货研究部
"productGroupCode":"RAW_MATERIAL" # 商品分类
}
}
warning_data = {
"groupNo": '', # 用户组id
"funcModule": '原油特征停更预警',
"funcOperation": '原油特征停更预警',
"data": {
'WARNING_TYPE_NAME': '特征数据停更预警',
'WARNING_CONTENT': '',
'WARNING_DATE': ''
}
"groupNo":'', # 用户组id
"funcModule":'原油特征停更预警',
"funcOperation":'原油特征停更预警',
"data":{
'WARNING_TYPE_NAME':'特征数据停更预警',
'WARNING_CONTENT':'',
'WARNING_DATE':''
}
}
query_data_list_item_nos_data = {
"funcModule": "数据项",
"funcOperation": "查询",
"funcModule": "数据项",
"funcOperation": "查询",
"data": {
"dateStart": "20200101",
"dateEnd": "20241231",
"dataItemNoList": ["Brentzdj", "Brentzgj"] # 数据项编码,代表 brent最低价和最高价
"dateStart":"20200101",
"dateEnd":"20241231",
"dataItemNoList":["Brentzdj","Brentzgj"] # 数据项编码,代表 brent最低价和最高价
}
}
push_data_value_list_data = {
"funcModule": "数据表信息列表",
"funcOperation": "新增",
@ -176,26 +175,134 @@ push_data_value_list_data = {
}
# 八大维度数据项编码
bdwd_items = {
'ciri': 'yyycbdwdcr',
'benzhou': 'yyycbdwdbz',
'cizhou': 'yyycbdwdcz',
'gezhou': 'yyycbdwdgz',
'ciyue': 'yyycbdwdcy',
'cieryue': 'yyycbdwdcey',
'cisanyue': 'yyycbdwdcsy',
'cisiyue': 'yyycbdwdcsiy',
'ciri': '原油大数据预测|FORECAST|PRICE|T',
'benzhou': '原油大数据预测|FORECAST|PRICE|W',
'cizhou': '原油大数据预测|FORECAST|PRICE|W_1',
'gezhou': '原油大数据预测|FORECAST|PRICE|W_2',
'ciyue': '原油大数据预测|FORECAST|PRICE|M_1',
'cieryue': '原油大数据预测|FORECAST|PRICE|M_2',
'cisanyue': '原油大数据预测|FORECAST|PRICE|M_3',
'cisiyue': '原油大数据预测|FORECAST|PRICE|M_4',
}
# 北京环境数据库
host = '192.168.101.27'
# 生产环境数据库
host = 'rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com'
port = 3306
dbusername = 'root'
password = '123456'
dbname = 'jingbo_test'
dbusername ='jingbo'
password = 'shihua@123'
dbname = 'jingbo'
table_name = 'v_tbl_crude_oil_warning'
# # 变量定义--测试环境
# server_host = '192.168.100.53' # 内网
# # server_host = '183.242.74.28' # 外网
# login_pushreport_url = f"http://{server_host}:8080/jingbo-dev/api/server/login"
# # 上传报告
# upload_url = f"http://{server_host}:8080/jingbo-dev/api/analysis/reportInfo/researchUploadReportSave"
# # 停更预警
# upload_warning_url = f"http://{server_host}:8080/jingbo-dev/api/basicBuiness/crudeOilWarning/save"
# # 查询数据项编码
# query_data_list_item_nos_url = f"http://{server_host}:8080/jingbo-dev/api/warehouse/dwDataItem/queryDataListItemNos"
# # 上传数据项值
# push_data_value_list_url = f"http://{server_host}:8080/jingbo-dev/api/dw/dataValue/pushDataValueList"
# login_data = {
# "data": {
# "account": "api_test",
# # "password": "MmVmNzNlOWI0MmY0ZDdjZGUwNzE3ZjFiMDJiZDZjZWU=", # Shihua@123456
# "password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", # 123456
# "tenantHashCode": "8a4577dbd919675758d57999a1e891fe",
# "terminal": "API"
# },
# "funcModule": "API",
# "funcOperation": "获取token"
# }
# upload_data = {
# "groupNo": '', # 用户组id
# "funcModule": '研究报告信息',
# "funcOperation": '上传原油价格预测报告',
# "data": {
# "ownerAccount": 'arui', # 报告所属用户账号
# "reportType": 'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
# "fileName": '2000-40-5-50--100-原油指标数据.xlsx-Brent活跃合约--2024-09-06-15-01-29-预测报告.pdf', # 文件名称
# "fileBase64": '', # 文件内容base64
# "categoryNo": 'yyjgycbg', # 研究报告分类编码
# "smartBusinessClassCode": 'YCJGYCBG', # 分析报告分类编码
# "reportEmployeeCode": "E40116", # 报告人
# "reportDeptCode": "D0044", # 报告部门
# "productGroupCode": "RAW_MATERIAL" # 商品分类
# }
# }
# warning_data = {
# "groupNo": '', # 用户组id
# "funcModule": '原油特征停更预警',
# "funcOperation": '原油特征停更预警',
# "data": {
# 'WARNING_TYPE_NAME': '特征数据停更预警',
# 'WARNING_CONTENT': '',
# 'WARNING_DATE': ''
# }
# }
# query_data_list_item_nos_data = {
# "funcModule": "数据项",
# "funcOperation": "查询",
# "data": {
# "dateStart": "20200101",
# "dateEnd": "20241231",
# "dataItemNoList": ["Brentzdj", "Brentzgj"] # 数据项编码,代表 brent最低价和最高价
# }
# }
# push_data_value_list_data = {
# "funcModule": "数据表信息列表",
# "funcOperation": "新增",
# "data": [
# {"dataItemNo": "91230600716676129",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.11
# },
# {"dataItemNo": "91230600716676129P|ETHYL_BEN|CAPACITY",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.55
# },
# {"dataItemNo": "91230600716676129P|ETHYL_BEN|CAPACITY",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.55
# }
# ]
# }
# # 八大维度数据项编码
# bdwd_items = {
# 'ciri': 'yyycbdwdcr',
# 'benzhou': 'yyycbdwdbz',
# 'cizhou': 'yyycbdwdcz',
# 'gezhou': 'yyycbdwdgz',
# 'ciyue': 'yyycbdwdcy',
# 'cieryue': 'yyycbdwdcey',
# 'cisanyue': 'yyycbdwdcsy',
# 'cisiyue': 'yyycbdwdcsiy',
# }
# # 北京环境数据库
# host = '192.168.101.27'
# port = 3306
# dbusername = 'root'
# password = '123456'
# dbname = 'jingbo_test'
# table_name = 'v_tbl_crude_oil_warning'
# 开关
is_train = True # 是否训练
is_debug = False # 是否调试
@ -205,9 +312,9 @@ is_timefurture = True # 是否使用时间特征
is_fivemodels = False # 是否使用之前保存的最佳的5个模型
is_edbcode = False # 特征使用edbcoding列表中的
is_edbnamelist = False # 自定义特征对应上面的edbnamelist
is_update_eta = False # 预测结果上传到eta
is_update_eta = True # 预测结果上传到eta
is_update_report = True # 是否上传报告
is_update_warning_data = False # 是否上传预警数据
is_update_warning_data = True # 是否上传预警数据
is_update_predict_value = True # 是否上传预测值到市场信息平台
is_del_corr = 0.6 # 是否删除相关性高的特征,取值为 0-1 0 为不删除0.6 表示删除相关性小于0.6的特征
is_del_tow_month = True # 是否删除两个月不更新的特征

View File

@ -89,21 +89,20 @@ data = {
ClassifyId = 1214
# 变量定义--测试环境
server_host = '192.168.100.53:8080' # 内网
# server_host = '183.242.74.28' # 外网
login_pushreport_url = f"http://{server_host}/jingbo-dev/api/server/login"
upload_url = f"http://{server_host}/jingbo-dev/api/analysis/reportInfo/researchUploadReportSave"
upload_warning_url = f"http://{server_host}/jingbo-dev/api/basicBuiness/crudeOilWarning/save"
query_data_list_item_nos_url = f"http://{server_host}/jingbo-dev/api/warehouse/dwDataItem/queryDataListItemNos"
################################################################################################################ 变量定义--线上环境
server_host = '10.200.32.39'
login_pushreport_url = "http://10.200.32.39/jingbo-api/api/server/login"
upload_url = "http://10.200.32.39/jingbo-api/api/analysis/reportInfo/researchUploadReportSave"
upload_warning_url = "http://10.200.32.39/jingbo-api/api/basicBuiness/crudeOilWarning/save"
query_data_list_item_nos_url = f"http://{server_host}/jingbo-api/api/warehouse/dwDataItem/queryDataListItemNos"
# 上传数据项值
push_data_value_list_url = f"http://{server_host}/jingbo-dev/api/dw/dataValue/pushDataValueList"
push_data_value_list_url = f"http://{server_host}/jingbo-api/api/dw/dataValue/pushDataValueList"
login_data = {
"data": {
"account": "api_test",
# "password": "MmVmNzNlOWI0MmY0ZDdjZGUwNzE3ZjFiMDJiZDZjZWU=", # Shihua@123456
"password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", # 123456
"account": "api_dev",
"password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=",
"tenantHashCode": "8a4577dbd919675758d57999a1e891fe",
"terminal": "API"
},
@ -111,45 +110,48 @@ login_data = {
"funcOperation": "获取token"
}
upload_data = {
"groupNo": '', # 用户组id
"funcModule": '研究报告信息',
"funcOperation": '上传原油价格预测报告',
"data": {
"ownerAccount": 'arui', # 报告所属用户账号
"reportType": 'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
"fileName": '2000-40-5-50--100-原油指标数据.xlsx-Brent活跃合约--2024-09-06-15-01-29-预测报告.pdf', # 文件名称
"fileBase64": '', # 文件内容base64
"categoryNo": 'yyjgycbg', # 研究报告分类编码
"smartBusinessClassCode": 'YCJGYCBG', # 分析报告分类编码
"reportEmployeeCode": "E40116", # 报告人
"reportDeptCode": "D0044", # 报告部门
"productGroupCode": "RAW_MATERIAL" # 商品分类
}
"funcModule":'研究报告信息',
"funcOperation":'上传原油价格预测报告',
"data":{
"groupNo":'', # 用户组id
"ownerAccount":'27663', #报告所属用户账号 27663 - 刘小朋
"reportType":'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
"fileName": '', #文件名称
"fileBase64": '' ,#文件内容base64
"categoryNo":'yyjgycbg', # 研究报告分类编码
"smartBusinessClassCode":'YCJGYCBG', #分析报告分类编码
"reportEmployeeCode":"E40482" ,# 报告人 E40482 - 管理员 0000027663 - 刘小朋
"reportDeptCode" :"002000621000", # 报告部门 - 002000621000 SH期货研究部
"productGroupCode":"RAW_MATERIAL" # 商品分类
}
}
warning_data = {
"groupNo": '', # 用户组id
"funcModule": '原油特征停更预警',
"funcOperation": '原油特征停更预警',
"data": {
'WARNING_TYPE_NAME': '特征数据停更预警',
'WARNING_CONTENT': '',
'WARNING_DATE': ''
}
"groupNo":'', # 用户组id
"funcModule":'原油特征停更预警',
"funcOperation":'原油特征停更预警',
"data":{
'WARNING_TYPE_NAME':'特征数据停更预警',
'WARNING_CONTENT':'',
'WARNING_DATE':''
}
}
query_data_list_item_nos_data = {
"funcModule": "数据项",
"funcOperation": "查询",
"funcModule": "数据项",
"funcOperation": "查询",
"data": {
"dateStart": "20200101",
"dateEnd": "20241231",
"dataItemNoList": ["Brentzdj", "Brentzgj"] # 数据项编码,代表 brent最低价和最高价
"dateStart":"20200101",
"dateEnd":"20241231",
"dataItemNoList":["Brentzdj","Brentzgj"] # 数据项编码,代表 brent最低价和最高价
}
}
push_data_value_list_data = {
"funcModule": "数据表信息列表",
"funcOperation": "新增",
@ -173,26 +175,135 @@ push_data_value_list_data = {
}
# 八大维度数据项编码
bdwd_items = {
'ciri': 'yyycbdwdcr',
'benzhou': 'yyycbdwdbz',
'cizhou': 'yyycbdwdcz',
'gezhou': 'yyycbdwdgz',
'ciyue': 'yyycbdwdcy',
'cieryue': 'yyycbdwdcey',
'cisanyue': 'yyycbdwdcsy',
'cisiyue': 'yyycbdwdcsiy',
'ciri': '原油大数据预测|FORECAST|PRICE|T',
'benzhou': '原油大数据预测|FORECAST|PRICE|W',
'cizhou': '原油大数据预测|FORECAST|PRICE|W_1',
'gezhou': '原油大数据预测|FORECAST|PRICE|W_2',
'ciyue': '原油大数据预测|FORECAST|PRICE|M_1',
'cieryue': '原油大数据预测|FORECAST|PRICE|M_2',
'cisanyue': '原油大数据预测|FORECAST|PRICE|M_3',
'cisiyue': '原油大数据预测|FORECAST|PRICE|M_4',
}
# 北京环境数据库
host = '192.168.101.27'
# 生产环境数据库
host = 'rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com'
port = 3306
dbusername = 'root'
password = '123456'
dbname = 'jingbo_test'
dbusername ='jingbo'
password = 'shihua@123'
dbname = 'jingbo'
table_name = 'v_tbl_crude_oil_warning'
# # 变量定义--测试环境
# server_host = '192.168.100.53:8080' # 内网
# # server_host = '183.242.74.28' # 外网
# login_pushreport_url = f"http://{server_host}/jingbo-dev/api/server/login"
# upload_url = f"http://{server_host}/jingbo-dev/api/analysis/reportInfo/researchUploadReportSave"
# upload_warning_url = f"http://{server_host}/jingbo-dev/api/basicBuiness/crudeOilWarning/save"
# query_data_list_item_nos_url = f"http://{server_host}/jingbo-dev/api/warehouse/dwDataItem/queryDataListItemNos"
# # 上传数据项值
# push_data_value_list_url = f"http://{server_host}/jingbo-dev/api/dw/dataValue/pushDataValueList"
# login_data = {
# "data": {
# "account": "api_test",
# # "password": "MmVmNzNlOWI0MmY0ZDdjZGUwNzE3ZjFiMDJiZDZjZWU=", # Shihua@123456
# "password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", # 123456
# "tenantHashCode": "8a4577dbd919675758d57999a1e891fe",
# "terminal": "API"
# },
# "funcModule": "API",
# "funcOperation": "获取token"
# }
# upload_data = {
# "groupNo": '', # 用户组id
# "funcModule": '研究报告信息',
# "funcOperation": '上传原油价格预测报告',
# "data": {
# "ownerAccount": 'arui', # 报告所属用户账号
# "reportType": 'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
# "fileName": '2000-40-5-50--100-原油指标数据.xlsx-Brent活跃合约--2024-09-06-15-01-29-预测报告.pdf', # 文件名称
# "fileBase64": '', # 文件内容base64
# "categoryNo": 'yyjgycbg', # 研究报告分类编码
# "smartBusinessClassCode": 'YCJGYCBG', # 分析报告分类编码
# "reportEmployeeCode": "E40116", # 报告人
# "reportDeptCode": "D0044", # 报告部门
# "productGroupCode": "RAW_MATERIAL" # 商品分类
# }
# }
# warning_data = {
# "groupNo": '', # 用户组id
# "funcModule": '原油特征停更预警',
# "funcOperation": '原油特征停更预警',
# "data": {
# 'WARNING_TYPE_NAME': '特征数据停更预警',
# 'WARNING_CONTENT': '',
# 'WARNING_DATE': ''
# }
# }
# query_data_list_item_nos_data = {
# "funcModule": "数据项",
# "funcOperation": "查询",
# "data": {
# "dateStart": "20200101",
# "dateEnd": "20241231",
# "dataItemNoList": ["Brentzdj", "Brentzgj"] # 数据项编码,代表 brent最低价和最高价
# }
# }
# push_data_value_list_data = {
# "funcModule": "数据表信息列表",
# "funcOperation": "新增",
# "data": [
# {"dataItemNo": "91230600716676129",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.11
# },
# {"dataItemNo": "91230600716676129P|ETHYL_BEN|CAPACITY",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.55
# },
# {"dataItemNo": "91230600716676129P|ETHYL_BEN|CAPACITY",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.55
# }
# ]
# }
# # 八大维度数据项编码
# bdwd_items = {
# 'ciri': 'yyycbdwdcr',
# 'benzhou': 'yyycbdwdbz',
# 'cizhou': 'yyycbdwdcz',
# 'gezhou': 'yyycbdwdgz',
# 'ciyue': 'yyycbdwdcy',
# 'cieryue': 'yyycbdwdcey',
# 'cisanyue': 'yyycbdwdcsy',
# 'cisiyue': 'yyycbdwdcsiy',
# }
# # 北京环境数据库
# host = '192.168.101.27'
# port = 3306
# dbusername = 'root'
# password = '123456'
# dbname = 'jingbo_test'
# table_name = 'v_tbl_crude_oil_warning'
# 开关
is_train = True # 是否训练
is_debug = False # 是否调试

View File

@ -89,22 +89,20 @@ data = {
ClassifyId = 1214
# 变量定义--测试环境
server_host = '192.168.100.53:8080' # 内网
# server_host = '183.242.74.28' # 外网
login_pushreport_url = f"http://{server_host}/jingbo-dev/api/server/login"
upload_url = f"http://{server_host}/jingbo-dev/api/analysis/reportInfo/researchUploadReportSave"
upload_warning_url = f"http://{server_host}/jingbo-dev/api/basicBuiness/crudeOilWarning/save"
query_data_list_item_nos_url = f"http://{server_host}/jingbo-dev/api/warehouse/dwDataItem/queryDataListItemNos"
################################################################################################################ 变量定义--线上环境
server_host = '10.200.32.39'
login_pushreport_url = "http://10.200.32.39/jingbo-api/api/server/login"
upload_url = "http://10.200.32.39/jingbo-api/api/analysis/reportInfo/researchUploadReportSave"
upload_warning_url = "http://10.200.32.39/jingbo-api/api/basicBuiness/crudeOilWarning/save"
query_data_list_item_nos_url = f"http://{server_host}/jingbo-api/api/warehouse/dwDataItem/queryDataListItemNos"
# 上传数据项值
push_data_value_list_url = f"http://{server_host}/jingbo-dev/api/dw/dataValue/pushDataValueList"
push_data_value_list_url = f"http://{server_host}/jingbo-api/api/dw/dataValue/pushDataValueList"
login_data = {
"data": {
"account": "api_test",
# "password": "MmVmNzNlOWI0MmY0ZDdjZGUwNzE3ZjFiMDJiZDZjZWU=", # Shihua@123456
"password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", # 123456
"account": "api_dev",
"password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=",
"tenantHashCode": "8a4577dbd919675758d57999a1e891fe",
"terminal": "API"
},
@ -112,43 +110,48 @@ login_data = {
"funcOperation": "获取token"
}
upload_data = {
"funcModule": '研究报告信息',
"funcOperation": '上传原油价格预测报告',
"data": {
"ownerAccount": 'arui', # 报告所属用户账号
"reportType": 'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
"fileName": '2000-40-5-50--100-原油指标数据.xlsx-Brent活跃合约--2024-09-06-15-01-29-预测报告.pdf', # 文件名称
"fileBase64": '', # 文件内容base64
"categoryNo": 'yyjgycbg', # 研究报告分类编码
"smartBusinessClassCode": 'YCJGYCBG', # 分析报告分类编码
"reportEmployeeCode": "E40116", # 报告人
"reportDeptCode": "D0044", # 报告部门
"productGroupCode": "RAW_MATERIAL" # 商品分类
}
"funcModule":'研究报告信息',
"funcOperation":'上传原油价格预测报告',
"data":{
"groupNo":'', # 用户组id
"ownerAccount":'27663', #报告所属用户账号 27663 - 刘小朋
"reportType":'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
"fileName": '', #文件名称
"fileBase64": '' ,#文件内容base64
"categoryNo":'yyjgycbg', # 研究报告分类编码
"smartBusinessClassCode":'YCJGYCBG', #分析报告分类编码
"reportEmployeeCode":"E40482" ,# 报告人 E40482 - 管理员 0000027663 - 刘小朋
"reportDeptCode" :"002000621000", # 报告部门 - 002000621000 SH期货研究部
"productGroupCode":"RAW_MATERIAL" # 商品分类
}
}
warning_data = {
"funcModule": '原油特征停更预警',
"funcOperation": '原油特征停更预警',
"data": {
'WARNING_TYPE_NAME': '特征数据停更预警',
'WARNING_CONTENT': '',
'WARNING_DATE': ''
}
"groupNo":'', # 用户组id
"funcModule":'原油特征停更预警',
"funcOperation":'原油特征停更预警',
"data":{
'WARNING_TYPE_NAME':'特征数据停更预警',
'WARNING_CONTENT':'',
'WARNING_DATE':''
}
}
query_data_list_item_nos_data = {
"funcModule": "数据项",
"funcOperation": "查询",
"funcModule": "数据项",
"funcOperation": "查询",
"data": {
"dateStart": "20200101",
"dateEnd": "20241231",
"dataItemNoList": ["Brentzdj", "Brentzgj"] # 数据项编码,代表 brent最低价和最高价
"dateStart":"20200101",
"dateEnd":"20241231",
"dataItemNoList":["Brentzdj","Brentzgj"] # 数据项编码,代表 brent最低价和最高价
}
}
push_data_value_list_data = {
"funcModule": "数据表信息列表",
"funcOperation": "新增",
@ -172,26 +175,132 @@ push_data_value_list_data = {
}
# 八大维度数据项编码
bdwd_items = {
'ciri': 'yyycbdwdcr',
'benzhou': 'yyycbdwdbz',
'cizhou': 'yyycbdwdcz',
'gezhou': 'yyycbdwdgz',
'ciyue': 'yyycbdwdcy',
'cieryue': 'yyycbdwdcey',
'cisanyue': 'yyycbdwdcsy',
'cisiyue': 'yyycbdwdcsiy',
'ciri': '原油大数据预测|FORECAST|PRICE|T',
'benzhou': '原油大数据预测|FORECAST|PRICE|W',
'cizhou': '原油大数据预测|FORECAST|PRICE|W_1',
'gezhou': '原油大数据预测|FORECAST|PRICE|W_2',
'ciyue': '原油大数据预测|FORECAST|PRICE|M_1',
'cieryue': '原油大数据预测|FORECAST|PRICE|M_2',
'cisanyue': '原油大数据预测|FORECAST|PRICE|M_3',
'cisiyue': '原油大数据预测|FORECAST|PRICE|M_4',
}
# 北京环境数据库
host = '192.168.101.27'
# 生产环境数据库
host = 'rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com'
port = 3306
dbusername = 'root'
password = '123456'
dbname = 'jingbo_test'
dbusername ='jingbo'
password = 'shihua@123'
dbname = 'jingbo'
table_name = 'v_tbl_crude_oil_warning'
# # 变量定义--测试环境
# server_host = '192.168.100.53:8080' # 内网
# # server_host = '183.242.74.28' # 外网
# login_pushreport_url = f"http://{server_host}/jingbo-dev/api/server/login"
# upload_url = f"http://{server_host}/jingbo-dev/api/analysis/reportInfo/researchUploadReportSave"
# upload_warning_url = f"http://{server_host}/jingbo-dev/api/basicBuiness/crudeOilWarning/save"
# query_data_list_item_nos_url = f"http://{server_host}/jingbo-dev/api/warehouse/dwDataItem/queryDataListItemNos"
# # 上传数据项值
# push_data_value_list_url = f"http://{server_host}/jingbo-dev/api/dw/dataValue/pushDataValueList"
# login_data = {
# "data": {
# "account": "api_test",
# # "password": "MmVmNzNlOWI0MmY0ZDdjZGUwNzE3ZjFiMDJiZDZjZWU=", # Shihua@123456
# "password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", # 123456
# "tenantHashCode": "8a4577dbd919675758d57999a1e891fe",
# "terminal": "API"
# },
# "funcModule": "API",
# "funcOperation": "获取token"
# }
# upload_data = {
# "funcModule": '研究报告信息',
# "funcOperation": '上传原油价格预测报告',
# "data": {
# "ownerAccount": 'arui', # 报告所属用户账号
# "reportType": 'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
# "fileName": '2000-40-5-50--100-原油指标数据.xlsx-Brent活跃合约--2024-09-06-15-01-29-预测报告.pdf', # 文件名称
# "fileBase64": '', # 文件内容base64
# "categoryNo": 'yyjgycbg', # 研究报告分类编码
# "smartBusinessClassCode": 'YCJGYCBG', # 分析报告分类编码
# "reportEmployeeCode": "E40116", # 报告人
# "reportDeptCode": "D0044", # 报告部门
# "productGroupCode": "RAW_MATERIAL" # 商品分类
# }
# }
# warning_data = {
# "funcModule": '原油特征停更预警',
# "funcOperation": '原油特征停更预警',
# "data": {
# 'WARNING_TYPE_NAME': '特征数据停更预警',
# 'WARNING_CONTENT': '',
# 'WARNING_DATE': ''
# }
# }
# query_data_list_item_nos_data = {
# "funcModule": "数据项",
# "funcOperation": "查询",
# "data": {
# "dateStart": "20200101",
# "dateEnd": "20241231",
# "dataItemNoList": ["Brentzdj", "Brentzgj"] # 数据项编码,代表 brent最低价和最高价
# }
# }
# push_data_value_list_data = {
# "funcModule": "数据表信息列表",
# "funcOperation": "新增",
# "data": [
# {"dataItemNo": "91230600716676129",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.11
# },
# {"dataItemNo": "91230600716676129P|ETHYL_BEN|CAPACITY",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.55
# },
# {"dataItemNo": "91230600716676129P|ETHYL_BEN|CAPACITY",
# "dataDate": "20230113",
# "dataStatus": "add",
# "dataValue": 100.55
# }
# ]
# }
# # 八大维度数据项编码
# bdwd_items = {
# 'ciri': 'yyycbdwdcr',
# 'benzhou': 'yyycbdwdbz',
# 'cizhou': 'yyycbdwdcz',
# 'gezhou': 'yyycbdwdgz',
# 'ciyue': 'yyycbdwdcy',
# 'cieryue': 'yyycbdwdcey',
# 'cisanyue': 'yyycbdwdcsy',
# 'cisiyue': 'yyycbdwdcsiy',
# }
# # 北京环境数据库
# host = '192.168.101.27'
# port = 3306
# dbusername = 'root'
# password = '123456'
# dbname = 'jingbo_test'
# table_name = 'v_tbl_crude_oil_warning'
# 开关
is_train = True # 是否训练
is_debug = False # 是否调试

View File

@ -2353,7 +2353,8 @@ def get_bdwd_predict_data():
df2['date'] = df2['date'].dt.strftime('%Y-%m-%d')
# df = pd.merge(df, df2, how='left', on='date')
# 更改列名:
df2.rename(columns={'yyycbdwdbz':'本周','yyycbdwdcey':'次二月','yyycbdwdcr':'次日','yyycbdwdcsiy':'次四月','yyycbdwdcsy':'次三月','yyycbdwdcy':'次月','yyycbdwdcz':'次周','yyycbdwdgz':'隔周',}, inplace=True)
# df2.rename(columns={'yyycbdwdbz':'本周','yyycbdwdcey':'次二月','yyycbdwdcr':'次日','yyycbdwdcsiy':'次四月','yyycbdwdcsy':'次三月','yyycbdwdcy':'次月','yyycbdwdcz':'次周','yyycbdwdgz':'隔周',}, inplace=True)
df2.rename(columns={'原油大数据预测|FORECAST|PRICE|W':'本周','原油大数据预测|FORECAST|PRICE|M_2':'次二月','原油大数据预测|FORECAST|PRICE|T':'次日','原油大数据预测|FORECAST|PRICE|M_4':'次四月','原油大数据预测|FORECAST|PRICE|M_3':'次三月','原油大数据预测|FORECAST|PRICE|M_1':'次月','原油大数据预测|FORECAST|PRICE|W_1':'次周','原油大数据预测|FORECAST|PRICE|W_2':'隔周',}, inplace=True)
# 更改显示顺序
df2 = df2[['date','次日','本周','次周','隔周','次月','次二月','次三月','次四月']]
print(df2)

View File

@ -51,6 +51,7 @@ global_config.update({
'login_pushreport_url': login_pushreport_url,
'login_data': login_data,
'upload_url': upload_url,
'upload_data': upload_data,
'upload_warning_url': upload_warning_url,
'warning_data': warning_data,
@ -99,6 +100,9 @@ def push_market_value():
# 取模型前十
top_models = top_models_df['模型(Model)'].head(10).tolist()
# 去掉FDBformer
if 'FEDformer' in top_models:
top_models.remove('FEDformer')
# 计算前十模型的均值
predictdata_df['top_models_mean'] = predictdata_df[top_models].mean(axis=1)
@ -449,3 +453,4 @@ if __name__ == '__main__':
# predict_main()
predict_main()
# push_market_value()

View File

@ -98,7 +98,9 @@ def push_market_value():
# 取模型前十
top_models = top_models_df['模型(Model)'].head(10).tolist()
# 去掉FDBformer
if 'FEDformer' in top_models:
top_models.remove('FEDformer')
# 计算前十模型的均值
predictdata_df['top_models_mean'] = predictdata_df[top_models].mean(axis=1)

View File

@ -97,7 +97,9 @@ def push_market_value():
# 取模型前十
top_models = top_models_df['模型(Model)'].head(10).tolist()
# 去掉FDBformer
if 'FEDformer' in top_models:
top_models.remove('FEDformer')
# 计算前十模型的均值
predictdata_df['top_models_mean'] = predictdata_df[top_models].mean(axis=1)

View File

@ -243,6 +243,8 @@ def ex_Model(df, horizon, input_size, train_steps, val_check_steps, early_stop_p
dates = df_predict['ds'].dt.strftime('%Y-%m-%d')
for m in modelsindex.keys():
if m == 'FEDformer':
continue
list = []
for date, value in zip(dates, df_predict[m].round(2)):
list.append({'Date': date, 'Value': value})
@ -2264,8 +2266,12 @@ def brent_export_pdf(num_indicators=475, num_models=21, num_dayindicator=202, in
config.dataset, 'model_evaluation.csv'), encoding='utf-8')
# 按评估指标排序,取前五
fivemodels_list = eval_df['模型(Model)'].values # 列表形式,后面当作列名索引使用
eval_models_list = fivemodels_list.tolist()
# 去掉FEDformer
if 'FEDformer' in eval_models_list:
eval_models_list.remove('FEDformer')
# 取 fivemodels_list 和 ds 列
df = df[['ds'] + fivemodels_list.tolist()]
df = df[['ds'] + eval_models_list]
# 拼接预测日期对应的真实值
df = pd.merge(df, df_true, on='ds', how='left')
# 删除全部为nan的列
@ -2496,16 +2502,16 @@ def brent_export_pdf(num_indicators=475, num_models=21, num_dayindicator=202, in
config.dataset, reportname), pagesize=letter)
doc.build(content)
# pdf 上传到数字化信息平台
# try:
# if config.is_update_report:
# with open(os.path.join(config.dataset, reportname), 'rb') as f:
# base64_data = base64.b64encode(f.read()).decode('utf-8')
# config.upload_data["data"]["fileBase64"] = base64_data
# config.upload_data["data"]["fileName"] = reportname
# token = get_head_auth_report()
# upload_report_data(token, config.upload_data)
# except TimeoutError as e:
# print(f"请求超时: {e}")
try:
if config.is_update_report:
with open(os.path.join(config.dataset, reportname), 'rb') as f:
base64_data = base64.b64encode(f.read()).decode('utf-8')
config.upload_data["data"]["fileBase64"] = base64_data
config.upload_data["data"]["fileName"] = reportname
token = get_head_auth_report()
upload_report_data(token, config.upload_data)
except TimeoutError as e:
print(f"请求超时: {e}")
@exception_logger