This commit is contained in:
wyn
2026-05-26 18:01:32 +08:00
parent fa878334cd
commit 7a3a1ed8c9
651 changed files with 4599 additions and 32312 deletions

View File

@@ -0,0 +1,4 @@
-- 分节t_article_main引用校对总结果明细仍在 t_reference_check_result如 [70-73] 四条)
ALTER TABLE `t_article_main`
ADD COLUMN `ref_check_status` tinyint(1) NOT NULL DEFAULT 0
COMMENT '引用校对总结果: 0未检测 1通过 2未通过 3检测中' AFTER `content`;

View File

@@ -0,0 +1,28 @@
-- 单条引用检测结果(如 <blue>[70-73]</blue> 展开为 reference_no=70,71,72,73 共 4 行)
-- 分节是否通过见 t_article_main.ref_check_status
CREATE TABLE IF NOT EXISTS `t_reference_check_result` (
`check_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`article_id` int(11) NOT NULL DEFAULT 0 COMMENT 't_article.article_id',
`am_id` int(11) NOT NULL DEFAULT 0 COMMENT 't_article_main.am_id',
`p_article_id` int(11) NOT NULL DEFAULT 0,
`p_refer_id` int(11) NOT NULL DEFAULT 0 COMMENT 't_production_article_refer.p_refer_id',
`refer_index` int(11) NOT NULL DEFAULT 0 COMMENT 'refer.index正文序号=index+1',
`reference_no` int(11) NOT NULL DEFAULT 0 COMMENT 'blue 括号内序号 n对应 index=n-1',
`reference_raw` varchar(64) NOT NULL DEFAULT '' COMMENT '如 70-73',
`cite_tag_start` int(11) NOT NULL DEFAULT 0 COMMENT 'blue标签起始字节偏移',
`cite_tag_end` int(11) NOT NULL DEFAULT 0 COMMENT 'blue标签结束字节偏移',
`text_start` int(11) NOT NULL DEFAULT 0 COMMENT '引用句起始字节偏移',
`text_end` int(11) NOT NULL DEFAULT 0 COMMENT '引用句结束字节偏移',
`content_a` text COMMENT '引用处上下文(正文)',
`content_b` text COMMENT '参考文献条目文本',
`is_match` tinyint(1) NOT NULL DEFAULT 0,
`confidence` decimal(6,4) NOT NULL DEFAULT 0.0000,
`reason` varchar(512) NOT NULL DEFAULT '',
`status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0待处理 1完成 2失败',
`error_msg` varchar(512) NOT NULL DEFAULT '',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`check_id`),
KEY `idx_article_status` (`article_id`,`status`),
KEY `idx_p_refer` (`p_refer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='引用文献 LLM 校对结果';

View File

@@ -0,0 +1,7 @@
-- 为预览标记增加原文位置字段([70-73] 展开为 4 条时共用 cite_tag_* / text_*
ALTER TABLE `t_reference_check_result`
ADD COLUMN `cite_tag_start` int(11) NOT NULL DEFAULT 0 COMMENT 'blue标签起始字节偏移' AFTER `reference_raw`,
ADD COLUMN `cite_tag_end` int(11) NOT NULL DEFAULT 0 COMMENT 'blue标签结束字节偏移' AFTER `cite_tag_start`,
ADD COLUMN `text_start` int(11) NOT NULL DEFAULT 0 COMMENT '引用句起始字节偏移' AFTER `cite_tag_end`,
ADD COLUMN `text_end` int(11) NOT NULL DEFAULT 0 COMMENT '引用句结束字节偏移' AFTER `text_start`,
ADD KEY `idx_am_cite` (`am_id`,`cite_tag_start`,`reference_no`);

View File

@@ -0,0 +1,3 @@
-- 引用校对:是否能支撑(与 is_match 同步,便于前端单独展示)
ALTER TABLE `t_article_reference_check_result`
ADD COLUMN `can_support` tinyint(1) NOT NULL DEFAULT 0 COMMENT '文献能否支撑正文引用句 0否1是' AFTER `is_match`;