2024-10-23 08:03:27 +08:00
|
|
|
|
/*==============================================================*/
|
2024-10-23 14:47:33 +08:00
|
|
|
|
/* Table: ai_annotation_task */
|
2024-10-23 08:03:27 +08:00
|
|
|
|
/*==============================================================*/
|
2024-10-23 14:47:33 +08:00
|
|
|
|
drop table if exists ai_annotation_task;
|
|
|
|
|
|
create table ai_annotation_task
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-11-25 18:10:02 +08:00
|
|
|
|
task_id bigint(20) not null auto_increment comment '任务id',
|
|
|
|
|
|
dataset_id bigint(20) not null comment '数据集id',
|
|
|
|
|
|
task_name varchar(64) comment '任务名称',
|
|
|
|
|
|
task_uuid varchar(64) comment '任务唯一标识id',
|
|
|
|
|
|
description varchar(500) default '' comment '描述',
|
2024-11-27 12:19:34 +08:00
|
|
|
|
annotation_scene char(1) default '0' comment '标注场景(对应数据集的数据类型)',
|
|
|
|
|
|
annotation_type char(2) default '0' comment '标注类型(不同数据类型有不同的标注类型,如图片:图像分类,物体检测等)',
|
2024-11-25 18:10:02 +08:00
|
|
|
|
labels varchar(200) comment '允许的标签集',
|
2024-11-27 12:19:34 +08:00
|
|
|
|
is_annotation_team char(1) default '0' comment '标注团队id(0未启用,1启用团队)',
|
2024-11-25 18:10:02 +08:00
|
|
|
|
annotation_status char(1) default '0' comment '0未标注,1正在标注,2已标注,3正在审核,4已审核',
|
|
|
|
|
|
label_studio_project_id bigint(20) comment "label studio 对应的projectId"
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
2024-11-27 16:25:18 +08:00
|
|
|
|
start_time datetime default null comment '任务开始时间',
|
|
|
|
|
|
end_time datetime default null comment '任务结束时间',
|
2024-11-25 18:10:02 +08:00
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
primary key (task_id)
|
|
|
|
|
|
)engine=innodb comment = '标注任务';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_annotation_task_annotator_map */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_annotation_task_annotator_map;
|
|
|
|
|
|
create table ai_annotation_task_annotator_map
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
annotator_id bigint(20) not null comment '标注人员',
|
|
|
|
|
|
reviewer_id bigint(20) not null comment '审核人员',
|
|
|
|
|
|
task_id bigint(20) not null comment '任务id',
|
|
|
|
|
|
file_id bigint(20) not null comment '文件id',
|
2024-11-25 18:10:02 +08:00
|
|
|
|
file_url varchar(200) default '' comment '文件网络路径',
|
|
|
|
|
|
label_studio_task_id bigint(20) comment "label studio 对应的taskId"
|
2024-10-29 14:30:46 +08:00
|
|
|
|
description varchar(500) default '' comment '描述',
|
2024-11-27 12:19:34 +08:00
|
|
|
|
annotation_status char(1) default '0' comment '0未标注,1已标注,2已审核,3 审核驳回',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
annotation_result text comment '标注结果(json串)',
|
2024-11-27 12:19:34 +08:00
|
|
|
|
annotation_resource char(1) default '0' comment '0人工标注,1智能标注',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
annotation_time datetime default null comment '标注时间',
|
|
|
|
|
|
review_time datetime default null comment '审核时间',
|
2024-10-29 14:30:46 +08:00
|
|
|
|
audit_failed_reason varchar(200) default '' comment '审核驳回原因',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
primary key (annotator_id, reviewer_id, task_id, file_id)
|
|
|
|
|
|
)engine=innodb comment = '标注人员、审核人员和任务和基础文件的关联关系';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_annotation_team_member */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_annotation_team_member;
|
|
|
|
|
|
create table ai_annotation_team_member
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
member_id bigint(20) not null comment '成员id',
|
|
|
|
|
|
role_id char(1) not null comment '角色标志(0 标注,1审核,2管理)',
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
primary key (member_id, role_id)
|
2024-10-25 11:01:19 +08:00
|
|
|
|
)engine=innodb comment = '标注人员和角色关联表';
|
2024-10-23 08:03:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
2024-10-23 14:47:33 +08:00
|
|
|
|
/* Table: ai_basic_file */
|
2024-10-23 08:03:27 +08:00
|
|
|
|
/*==============================================================*/
|
2024-10-23 14:47:33 +08:00
|
|
|
|
drop table if exists ai_basic_file;
|
|
|
|
|
|
create table ai_basic_file
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
file_id bigint(20) not null auto_increment comment '文件id',
|
|
|
|
|
|
parent_id bigint(20) not null default 0 comment '父节点id',
|
|
|
|
|
|
ancestors varchar(200) comment '祖级列表',
|
|
|
|
|
|
file_name varchar(200) comment '文件名',
|
|
|
|
|
|
file_url varchar(200) comment '文件网络路径',
|
2024-11-20 14:07:37 +08:00
|
|
|
|
file_size bigint comment '文件大小',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
file_last_modifytime datetime default null comment '文件最后修改时间',
|
|
|
|
|
|
upload_time datetime default null comment '上传时间',
|
2024-11-27 12:19:34 +08:00
|
|
|
|
is_directory char(1) default '0' comment '是否文件夹',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
is_public char(1) default '0' comment '0 no, 1 yes',
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
create_time datetime default null comment '记录的插入时间',
|
|
|
|
|
|
update_by varchar(64) default '' comment '记录的更新时间',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
primary key(file_id)
|
|
|
|
|
|
)
|
|
|
|
|
|
engine=innodb comment = '文件基础表';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_dataset */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_dataset;
|
|
|
|
|
|
create table ai_dataset
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
dataset_id bigint(20) not null auto_increment comment '数据集id',
|
2024-10-29 14:30:46 +08:00
|
|
|
|
dataset_uuid varchar(64) comment '数据集唯一标识id',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
dataset_name varchar(200) comment '数据集名称',
|
2024-10-29 14:30:46 +08:00
|
|
|
|
description varchar(500) default '' comment '描述',
|
2024-11-27 12:19:34 +08:00
|
|
|
|
data_type char(1) default '0' comment '数据类型',
|
|
|
|
|
|
data_source char(1) default '0' comment '数据来源(0:local,1:obs)',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
input_path varchar(200) comment '输入路径',
|
|
|
|
|
|
output_path varchar(200) comment '输入路径',
|
2024-11-26 12:44:17 +08:00
|
|
|
|
input_id bigint(20) comment '输入文件夹id',
|
|
|
|
|
|
output_id bigint(20) comment '输出文件夹id'
|
2024-10-23 14:47:33 +08:00
|
|
|
|
annotation_status char(1) comment '标注状态(0no, 1 yes)',
|
|
|
|
|
|
is_public char(1) default '0' comment '0 no, 1 yes',
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
primary key(dataset_id)
|
|
|
|
|
|
)
|
|
|
|
|
|
engine=innodb comment = '数据集表';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_dataset_file_map */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_dataset_file_map;
|
|
|
|
|
|
create table ai_dataset_file_map
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
file_id bigint(20) not null comment '文件id',
|
|
|
|
|
|
dataset_id bigint(20) not null comment '数据集id',
|
|
|
|
|
|
description varchar(500) comment '描述',
|
2024-10-25 11:01:19 +08:00
|
|
|
|
is_annotated char(1) default '0' comment '关联数据集时是否已标注(0代表未标注,1代表已标注)',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
primary key(file_id, dataset_id)
|
|
|
|
|
|
)
|
|
|
|
|
|
engine=innodb comment = '数据集和文件关联关系表';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_dataset_log */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_dataset_log;
|
|
|
|
|
|
create table ai_dataset_log
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
log_id bigint(20) not null auto_increment comment '日志id',
|
|
|
|
|
|
task_id bigint(20) comment '任务id',
|
|
|
|
|
|
dataset_id bigint(20),
|
|
|
|
|
|
file_id bigint(20),
|
|
|
|
|
|
operation_type varchar(64) comment '操作类型(0代表标注,1代表审核)',
|
|
|
|
|
|
operation_by varchar(64) default '' comment '操作人',
|
|
|
|
|
|
operation_time datetime default NULL comment '操作时间',
|
2024-11-27 12:19:34 +08:00
|
|
|
|
operation_result char(1) default '0' comment '操作结果(如审核通过,审核不通过)',
|
2024-10-23 14:47:33 +08:00
|
|
|
|
operation_reason varchar(500) comment '操作原因(如不通过原因)',
|
|
|
|
|
|
value_before text comment '操作之前的值',
|
|
|
|
|
|
value_after text comment '操作之后的值',
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
primary key(log_id)
|
|
|
|
|
|
)
|
|
|
|
|
|
engine=innodb comment = '数据集日志表';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_dataset_version */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_dataset_version;
|
|
|
|
|
|
create table ai_dataset_version
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
version_id bigint(20) not null comment '版本id',
|
|
|
|
|
|
version_name text comment '版本名称',
|
|
|
|
|
|
version_description varchar(200) not null comment '版本描述',
|
|
|
|
|
|
dataset_id bigint(20) not null comment '数据集id',
|
|
|
|
|
|
task_id bigint(20) not null comment '任务id',
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
primary key(version_id)
|
|
|
|
|
|
)engine=innodb comment = '数据集版本表';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_file_label_map */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_file_label_map;
|
|
|
|
|
|
create table ai_file_label_map
|
2024-10-23 08:03:27 +08:00
|
|
|
|
(
|
2024-10-23 14:47:33 +08:00
|
|
|
|
file_id bigint(20) not null comment '文件id',
|
|
|
|
|
|
label_id bigint(20) not null comment '标签id',
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
primary key (file_id, label_id)
|
|
|
|
|
|
)
|
|
|
|
|
|
engine=innodb comment = '文件和标签关联表';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_labels */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_labels;
|
|
|
|
|
|
create table ai_labels
|
|
|
|
|
|
(
|
|
|
|
|
|
label_id bigint(20) not null auto_increment comment '标签id',
|
|
|
|
|
|
ancestors varchar(200) comment '祖级列表',
|
|
|
|
|
|
parent_id bigint(20) not null default 0 comment '父节点id',
|
|
|
|
|
|
label_name bigint(20) comment '标签名称',
|
|
|
|
|
|
del_flag char(1) default '0' comment '是否删除(0代表存在,1代表删除)',
|
|
|
|
|
|
create_by varchar(64) default '' comment '创建者',
|
|
|
|
|
|
update_by varchar(64) default '' comment '更新者',
|
|
|
|
|
|
update_time datetime default null comment '更新时间',
|
|
|
|
|
|
create_time datetime default null comment '创建时间',
|
|
|
|
|
|
primary key (label_id)
|
|
|
|
|
|
)engine=innodb comment = '标签表';
|
|
|
|
|
|
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
/* Table: ai_version_file_map */
|
|
|
|
|
|
/*==============================================================*/
|
|
|
|
|
|
drop table if exists ai_version_file_map;
|
|
|
|
|
|
create table ai_version_file_map
|
|
|
|
|
|
(
|
|
|
|
|
|
version_id bigint(20) not null comment '版本id',
|
|
|
|
|
|
file_id bigint(20) not null comment '文件id',
|
|
|
|
|
|
annotation_result text comment '标注结果(json串)',
|
|
|
|
|
|
primary key(version_id, file_id)
|
|
|
|
|
|
)engine=innodb comment = '版本和文件关联表';
|
2024-10-23 08:03:27 +08:00
|
|
|
|
|
|
|
|
|
|
|