feat(resm): 对接材料前沿简报补充期刊/关键词监控

按《全球材料前沿动态简报》三、前沿科技检索清单, 新增 8 本期刊
(Nature Materials/Communications/Reviews Materials、Communications
Materials、Science Advances、Scientific Reports、Engineering Structures、
Materials Today)与 6 个低碳建材关键词监控, 复用每天 05:00 的
monitor_papers 周期任务。简报已列且 0009 已收录的期刊不重复添加。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
caoqianming 2026-06-29 13:22:23 +08:00
parent 2d6df68135
commit 70bac5c22c
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,87 @@
"""种子数据:对接《全球材料前沿动态简报》三、前沿科技 检索清单,补充期刊 / 关键词监控。
简报已列但 0009 已收录的期刊(Ceramics International / CCR / CCC / Construction and
Building Materials)不重复添加;此处只补简报新增项:
- 一级检索源(Nature/Science 系顶刊):Nature MaterialsNature Communications
Communications MaterialsScience AdvancesNature Reviews MaterialsScientific Reports
- 二级检索源补充(建材 TOP):Engineering StructuresMaterials Today
- 统一检索关键词(简报第三节):低碳水泥 / 储能建材 / 碳化机理 / 固废基胶凝 / 建材碳捕集
(OpenAlex 语料为英文, value 用英文搜索词,name 标中文)
期刊监控只按 ISSN 过滤不带主题词,Nature Communications / Scientific Reports 等综合性
大刊会拉入非建材论文;简报要求的"建材主题 + TOP5 筛选"需在下游按关键词二次筛选,本表不承担
全部复用每天 05:00 monitor_papers 周期任务(0009 已注册),无需新增调度
get_or_create 保证迁移可安全重跑
"""
from django.db import migrations
from apps.utils.snowflake import idWorker
# 一级检索源:Nature/Science 系材料类顶刊(简报「前沿科技」一级)
JOURNALS_TIER1 = [
("1476-1122", "Nature Materials"),
("2041-1723", "Nature Communications"),
("2662-4443", "Communications Materials"),
("2375-2548", "Science Advances"),
("2058-8437", "Nature Reviews Materials"),
("2045-2322", "Scientific Reports"),
]
NOTE_TIER1 = "前沿顶刊"
# 二级检索源补充:建材 / 无机非金属国际 TOP(简报已列、0009 未收录的)
JOURNALS_TIER2 = [
("0141-0296", "Engineering Structures"),
("1369-7021", "Materials Today"),
]
NOTE_TIER2 = "建材TOP顶刊"
# 统一检索关键词(简报第三节,英文搜索词 + 中文名)
SEARCHES = [
("low carbon cement", "低碳水泥"),
("energy storage building material", "储能建筑材料"),
("concrete carbonation", "混凝土碳化机理"),
("geopolymer", "工业固废基地聚物"),
("supplementary cementitious material", "固废基胶凝材料"),
("carbon capture cement", "建材碳捕集"),
]
NOTE_SEARCH = "低碳建材前沿"
def seed(apps, schema_editor):
PaperMonitor = apps.get_model("resm", "PaperMonitor")
for issn, name in JOURNALS_TIER1:
PaperMonitor.objects.get_or_create(
type="journal", value=issn,
defaults={"id": idWorker.get_id(), "name": name, "note": NOTE_TIER1,
"is_active": True, "days": 7},
)
for issn, name in JOURNALS_TIER2:
PaperMonitor.objects.get_or_create(
type="journal", value=issn,
defaults={"id": idWorker.get_id(), "name": name, "note": NOTE_TIER2,
"is_active": True, "days": 7},
)
for term, name in SEARCHES:
PaperMonitor.objects.get_or_create(
type="search", value=term,
defaults={"id": idWorker.get_id(), "name": name, "note": NOTE_SEARCH,
"is_active": True, "days": 7},
)
def unseed(apps, schema_editor):
PaperMonitor = apps.get_model("resm", "PaperMonitor")
journals = [i for i, _ in JOURNALS_TIER1] + [i for i, _ in JOURNALS_TIER2]
PaperMonitor.objects.filter(type="journal", value__in=journals).delete()
PaperMonitor.objects.filter(type="search", value__in=[t for t, _ in SEARCHES]).delete()
class Migration(migrations.Migration):
dependencies = [
("resm", "0010_seed_ensure_fetch_running"),
]
operations = [
migrations.RunPython(seed, unseed),
]

Binary file not shown.