Browse Source

add:向量数据

zhongwei
luyie 2 months ago
parent
commit
36548a5ea9
  1. 23
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java
  2. 6
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/KnowledgeData.java
  3. 6
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/entity/AgentLogEntity.java
  4. 1
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/KnowledgeFileInfoService.java
  5. 4
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/impl/KnowledgeFileInfoServiceImpl.java

23
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/business/vo/DeviceModelData.java

@ -1,7 +1,6 @@
package com.hnac.gglm.bigmodel.business.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelAttrVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelEventVO;
import com.hnac.hzinfo.sdk.v5.model.vo.ModelFuncVO;
@ -17,6 +16,7 @@ public class DeviceModelData {
/**
* 模型id
*/
@JsonProperty("model_id")
private Long modelId;
/**
@ -32,23 +32,25 @@ public class DeviceModelData {
/**
* 数据类型
*/
@JsonProperty("data_type")
private String dbType;
/**
* 字段长度
*/
@JsonProperty("field_length")
private String fieldLength;
/**
* 保留位数
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@JsonProperty("keep_figures")
private Integer keepFigures;
/**
* 取数规则 0 平均值1 最大值2 最小值3 最后值4 最早值5 和值6 差值
*/
@JsonSerialize(nullsUsing = NullSerializer.class)
@JsonProperty("access_rules")
private Integer accessRules;
/**
@ -59,6 +61,7 @@ public class DeviceModelData {
/**
* 模型分类id
*/
@JsonProperty("model_classify_id")
private Long modelClassifyId;
/**
@ -74,61 +77,73 @@ public class DeviceModelData {
/**
* 参数名称
*/
@JsonProperty("parameter_name")
private String parameterName;
/**
* 参数标识
*/
@JsonProperty("parameter_tag")
private String parameterTag;
/**
* 单点控制状态0:1:
*/
@JsonProperty("control_status")
private Integer controlStatus;
/**
* 是否弹窗
*/
@JsonProperty("is_popup")
private Integer isPopup;
/**
* 是否反校
*/
@JsonProperty("is_check")
private Integer isCheck;
/**
* 参数来源0:默认1:属性值
*/
@JsonProperty("parameter_source")
private Integer parameterSource;
/**
* 来源属性标识
*/
@JsonProperty("source_attr_signage")
private String sourceAttrSignage;
/**
* 控制参数0:/1:退/2:停止/启动
*/
@JsonProperty("control_parameter")
private Integer controlParameter;
/**
* 参数json
*/
@JsonProperty("parameter_json")
private String parameterJson;
/**
* 间隔时长
*/
@JsonProperty("interval_length")
private Integer intervalLength;
/**
* 参数范围最小值
*/
@JsonProperty("min_value")
private Integer minValue;
/**
* 参数范围最大值
*/
@JsonProperty("max_value")
private Integer maxValue;
/**

6
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/dto/KnowledgeData.java

@ -1,6 +1,7 @@
package com.hnac.gglm.bigmodel.maintenance.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -14,23 +15,28 @@ import lombok.Data;
public class KnowledgeData {
@ApiModelProperty("文档ID")
@TableField("DOC_ID")
@JsonProperty("doc_id")
private Long docId;
@ApiModelProperty("文档问题")
@TableField("DOC_QS")
@JsonProperty("doc_qs")
private String docQs;
@ApiModelProperty("文档内容")
@TableField("DOC_CONTENT")
@JsonProperty("doc_content")
private String docContent;
@ApiModelProperty("文档页码")
@TableField("DOC_PAGE_INDEX")
@JsonProperty("doc_page_index")
private Integer docPageIndex;
@ApiModelProperty("知识库领域")
private String area;
@ApiModelProperty("等级")
@JsonProperty("doc_level")
private Integer level;
}

6
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/entity/AgentLogEntity.java

@ -65,17 +65,17 @@ public class AgentLogEntity extends TenantEntity implements Serializable {
@ApiModelProperty("用户结论,0为错误,1为正确")
@QueryField(condition = SqlCondition.EQUAL)
@TableField("user_conclusion")
private int userConclusion;
private Integer userConclusion;
@ApiModelProperty("标注状态,0为未标注,1为已标注")
@QueryField(condition = SqlCondition.EQUAL)
@TableField("label_status")
private int labelStatus;
private Integer labelStatus;
@ApiModelProperty("标注结果,0为错误,1为正确")
@QueryField(condition = SqlCondition.EQUAL)
@TableField("label_result")
private int labelResult;
private Integer labelResult;
@ApiModelProperty("标注内容,json字符串,答案类型不一样格式不一样")
@QueryField(condition = SqlCondition.LIKE)

1
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/KnowledgeFileInfoService.java

@ -17,7 +17,6 @@ import java.util.List;
*/
public interface KnowledgeFileInfoService extends IService<KnowledgeFileInfo> {
String SEGMENT_URL = "/kn/doc_segment";
String VICTOR_DATABASE_NAME = "knowledge_data";
Boolean store(IdRequest req);

4
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/impl/KnowledgeFileInfoServiceImpl.java

@ -47,7 +47,6 @@ public class KnowledgeFileInfoServiceImpl extends ServiceImpl<KnowledgeFileInfoM
private final KnowledgeFileInfoMapper knowledgeFileInfoMapper;
private final KnowledgeFileFragmentService fileFragmentService;
private final IOssClient ossClient;
private final BigModelInvokeApi invokeApi;
@Value("${gglm.url}")
private String interactionUrl;
@ -122,9 +121,6 @@ public class KnowledgeFileInfoServiceImpl extends ServiceImpl<KnowledgeFileInfoM
Boolean result = removeByIds(idsList);
if (result) {
fileFragmentService.remove(Wrappers.<KnowledgeFileFragment>lambdaQuery().in(KnowledgeFileFragment::getDocId, idsList));
Map<String, String> deleteTableParams = new HashMap<>(1);
deleteTableParams.put("table_name", VICTOR_DATABASE_NAME);
RequestClientUtil.postCall(interactionUrl + invokeApi.getDeleteTable(), deleteTableParams);
}
return result;
}

Loading…
Cancel
Save