From d6e649d6623433f3b4f6f68715e8f37ecb7f96f0 Mon Sep 17 00:00:00 2001 From: langxm Date: Wed, 14 Oct 2026 07:49:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(T4):=20AP=20CSA=20CED=20=E7=9F=A5=E8=AF=86?= =?UTF-8?q?=E5=9B=BE=E8=B0=B1=20v1=EF=BC=8814=E8=AE=AD=E7=BB=83=E2=86=9210?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=98=A0=E5=B0=84=20+=20=E6=96=87=E6=A1=A3?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/data/kg_ap_csa.json | 135 +++++++++++++++++++++++++++++++++ docs/AP-CSA-CED知识图谱.md | 49 ++++++++++++ 2 files changed, 184 insertions(+) create mode 100644 backend/data/kg_ap_csa.json create mode 100644 docs/AP-CSA-CED知识图谱.md diff --git a/backend/data/kg_ap_csa.json b/backend/data/kg_ap_csa.json new file mode 100644 index 0000000..119fa6a --- /dev/null +++ b/backend/data/kg_ap_csa.json @@ -0,0 +1,135 @@ +{ + "course": "ap-csa", + "course_name": "AP Computer Science A", + "kg_source": "AP CSA Course and Exam Description (2020), 官方单元/知识点编码", + "version": "v1.0", + "note": "映射基于训练标题与教学内容推断;与 Kiki 录题网站 CED 标签的精确编码对齐待用户提供录题平台格式后校准。", + "units": [ + { + "id": "u1", "code": "U1", "name": "Primitive Types", + "topics": [ + {"code": "1.1", "name": "Why Programming? Why Java?"}, + {"code": "1.2", "name": "Variables and Data Types"}, + {"code": "1.3", "name": "Expressions and Assignment Statements"}, + {"code": "1.4", "name": "Compound Assignment Operators"}, + {"code": "1.5", "name": "Casting and Ranges of Variables"} + ] + }, + { + "id": "u2", "code": "U2", "name": "Using Objects", + "topics": [ + {"code": "2.1", "name": "Objects: Instances of Classes"}, + {"code": "2.2", "name": "Creating and Initializing Objects: Constructors"}, + {"code": "2.3", "name": "Calling Methods Without Parameters"}, + {"code": "2.4", "name": "Calling Methods With Parameters"}, + {"code": "2.5", "name": "Calling Methods That Return Values"}, + {"code": "2.6", "name": "String Objects: Concatenation, Literals, and More"}, + {"code": "2.7", "name": "String Methods"}, + {"code": "2.8", "name": "String Iteration"}, + {"code": "2.9", "name": "Creating Objects & Calling Methods with Class Libraries"} + ] + }, + { + "id": "u3", "code": "U3", "name": "Boolean Expressions and if Statements", + "topics": [ + {"code": "3.1", "name": "Boolean Expressions"}, + {"code": "3.2", "name": "if Statements and Control Flow"}, + {"code": "3.3", "name": "if-else Statements"}, + {"code": "3.4", "name": "else if Statements"}, + {"code": "3.5", "name": "Compound Boolean Expressions"}, + {"code": "3.6", "name": "Equivalent Boolean Expressions"}, + {"code": "3.7", "name": "Comparing Objects"} + ] + }, + { + "id": "u4", "code": "U4", "name": "Iteration", + "topics": [ + {"code": "4.1", "name": "while Loops"}, + {"code": "4.2", "name": "for Loops"}, + {"code": "4.3", "name": "Developing Algorithms Using Strings"}, + {"code": "4.4", "name": "Nested Iteration"}, + {"code": "4.5", "name": "Informal Code Analysis"} + ] + }, + { + "id": "u5", "code": "U5", "name": "Writing Classes", + "topics": [ + {"code": "5.1", "name": "Anatomy of a Class"}, + {"code": "5.2", "name": "Constructors"}, + {"code": "5.3", "name": "Documentation with Comments"}, + {"code": "5.4", "name": "Accessor Methods"}, + {"code": "5.5", "name": "Mutator Methods"}, + {"code": "5.6", "name": "Writing Methods"}, + {"code": "5.7", "name": "Static Variables and Methods"}, + {"code": "5.8", "name": "Scope and Access"}, + {"code": "5.9", "name": "this Keyword"}, + {"code": "5.10", "name": "Ethical and Social Implications of Computing Systems"} + ] + }, + { + "id": "u6", "code": "U6", "name": "Array", + "topics": [ + {"code": "6.1", "name": "Array Creation and Access"}, + {"code": "6.2", "name": "Traversing Arrays"}, + {"code": "6.3", "name": "Enhanced for Loop for Arrays"}, + {"code": "6.4", "name": "Developing Algorithms Using Arrays"} + ] + }, + { + "id": "u7", "code": "U7", "name": "ArrayList", + "topics": [ + {"code": "7.1", "name": "Introduction to ArrayList"}, + {"code": "7.2", "name": "ArrayList Methods"}, + {"code": "7.3", "name": "Traversing ArrayLists"}, + {"code": "7.4", "name": "Developing Algorithms Using ArrayLists"}, + {"code": "7.5", "name": "Searching"}, + {"code": "7.6", "name": "Sorting"}, + {"code": "7.7", "name": "Ethical Issues Around Data Collection"} + ] + }, + { + "id": "u8", "code": "U8", "name": "2D Array", + "topics": [ + {"code": "8.1", "name": "2D Arrays"}, + {"code": "8.2", "name": "Traversing 2D Arrays"} + ] + }, + { + "id": "u9", "code": "U9", "name": "Inheritance", + "topics": [ + {"code": "9.1", "name": "Creating Superclasses and Subclasses"}, + {"code": "9.2", "name": "Writing Constructors for Subclasses"}, + {"code": "9.3", "name": "Overriding Methods"}, + {"code": "9.4", "name": "Super Keyword"}, + {"code": "9.5", "name": "Creating References Using Inheritance Hierarchies"}, + {"code": "9.6", "name": "Polymorphism"}, + {"code": "9.7", "name": "Object Superclass"} + ] + }, + { + "id": "u10", "code": "U10", "name": "Recursion", + "topics": [ + {"code": "10.1", "name": "Recursion"}, + {"code": "10.2", "name": "Recursive Searching and Sorting"} + ] + } + ], + "trainings": [ + {"hid": "65c30801d882facec87e2f60", "title": "Scanner 基础", "stage": 1, "units": ["u1", "u2"], "topics": ["1.2", "2.1", "2.2", "2.3", "2.9"]}, + {"hid": "65c308fbd882facec87e2f67", "title": "if 语句", "stage": 2, "units": ["u3"], "topics": ["3.1", "3.2", "3.3", "3.4", "3.5"]}, + {"hid": "65c30923d882facec87e2f68", "title": "while 循环", "stage": 3, "units": ["u4"], "topics": ["4.1"]}, + {"hid": "65c3095ed882facec87e2f6a", "title": "for 循环", "stage": 4, "units": ["u4"], "topics": ["4.2", "4.4"]}, + {"hid": "65c30981d882facec87e2f6d", "title": "方法", "stage": 5, "units": ["u5"], "topics": ["5.4", "5.5", "5.6"]}, + {"hid": "65c309a8d882facec87e2f8f", "title": "ArrayList", "stage": 6, "units": ["u7"], "topics": ["7.1", "7.2", "7.3", "7.4"]}, + {"hid": "65c309c1d882facec87e2f90", "title": "数组", "stage": 7, "units": ["u6"], "topics": ["6.1", "6.2"]}, + {"hid": "65c309d2d882facec87e2f92", "title": "类", "stage": 8, "units": ["u5"], "topics": ["5.1", "5.2"]}, + {"hid": "65c309f5d882facec87e2f95", "title": "数组算法", "stage": 9, "units": ["u6"], "topics": ["6.3", "6.4"]}, + {"hid": "65c30a0cd882facec87e2f96", "title": "插入(查找与排序)", "stage": 10, "units": ["u7"], "topics": ["7.5", "7.6"]}, + {"hid": "65c30a83d882facec87e2fab", "title": "图像二维数组", "stage": 11, "units": ["u8"], "topics": ["8.1", "8.2"]}, + {"hid": "676c26b39f70aa133878c7ec", "title": "运算符", "stage": 12, "units": ["u1"], "topics": ["1.3", "1.4", "1.5"]}, + {"hid": "676d74189f70aa133878fa3b", "title": "String", "stage": 13, "units": ["u2"], "topics": ["2.6", "2.7", "2.8"]}, + {"hid": "67a9dc772772ea16704fd352", "title": "冲刺班(综合)", "stage": 14, "units": ["u1", "u2", "u3", "u4", "u5", "u6", "u7", "u8", "u9", "u10"], "topics": ["1.1", "1.2", "1.3", "1.4", "1.5", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "3.1", "3.2", "3.3", "3.4", "3.5", "3.6", "3.7", "4.1", "4.2", "4.3", "4.4", "4.5", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6", "5.7", "5.8", "5.9", "6.1", "6.2", "6.3", "6.4", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6", "8.1", "8.2", "9.1", "9.2", "9.3", "9.4", "9.5", "9.6", "9.7", "10.1", "10.2"]}, + {"hid": "", "title": "U9 Inheritance 预留", "stage": 15, "units": ["u9"], "topics": ["9.1", "9.2", "9.3", "9.4", "9.5", "9.6", "9.7"], "note": "现有训练未覆盖,CED 知识图谱预留;后续题库题自带 CED 标签可补齐"}, + {"hid": "", "title": "U10 Recursion 预留", "stage": 16, "units": ["u10"], "topics": ["10.1", "10.2"], "note": "现有训练未覆盖,预留"} + ] +} diff --git a/docs/AP-CSA-CED知识图谱.md b/docs/AP-CSA-CED知识图谱.md new file mode 100644 index 0000000..8515804 --- /dev/null +++ b/docs/AP-CSA-CED知识图谱.md @@ -0,0 +1,49 @@ +# AP CSA · CED 知识图谱 v1(T4) + +> 2026-10-14 · 数据文件:`backend/data/kg_ap_csa.json` · 供 T5 薄弱点诊断 / 自动出题(P7.2)使用 + +## 一、来源与口径 +- **知识图谱依据**:AP CSA Course and Exam Description(2020 官方),10 个单元 + 官方知识点编码 +- **映射对象**:现有 14 个 Hydro 教学训练(id 见 problem_route) +- **备注**:用户提到"Kiki 录题网站有 CED 标签"——录题平台需邮箱验证码登录(暂无法访问),本 v1 按官方 CED 结构先行映射;待用户提供录题平台标签格式后校准对齐。用户已确认:**后续题库题本身自带 CED 映射**,fluent-learn 只需读取。 + +## 二、14 训练 → CED 映射表 + +| # | 训练 | 单元 | CED 知识点 | 阶段 | +|---|---|---|---|---| +| 1 | Scanner 基础 | U1/U2 | 1.2, 2.1, 2.2, 2.3, 2.9 | 1 | +| 2 | if 语句 | U3 | 3.1-3.5 | 2 | +| 3 | while 循环 | U4 | 4.1 | 3 | +| 4 | for 循环 | U4 | 4.2, 4.4 | 4 | +| 5 | 方法 | U5 | 5.4, 5.5, 5.6 | 5 | +| 6 | ArrayList | U7 | 7.1-7.4 | 6 | +| 7 | 数组 | U6 | 6.1, 6.2 | 7 | +| 8 | 类 | U5 | 5.1, 5.2 | 8 | +| 9 | 数组算法 | U6 | 6.3, 6.4 | 9 | +| 10 | 插入(查找/排序) | U7 | 7.5, 7.6 | 10 | +| 11 | 图像二维数组 | U8 | 8.1, 8.2 | 11 | +| 12 | 运算符 | U1 | 1.3, 1.4, 1.5 | 12 | +| 13 | String | U2 | 2.6, 2.7, 2.8 | 13 | +| 14 | 冲刺班(综合) | 全 10 单元 | 全知识点 | 14 | + +**未覆盖预留**:U9 Inheritance(9.1-9.7)、U10 Recursion(10.1-10.2)——现有训练无,图谱已建节点,等题库题自带 CED 标签补齐。 + +## 三、数据结构(kg_ap_csa.json) +```json +{ + "course": "ap-csa", + "units": [ { "id":"u1", "code":"U1", "name":"Primitive Types", + "topics":[ {"code":"1.1","name":"Why Programming? Why Java?"}, ... ] }, ... ], + "trainings": [ { "hid":"65c30801...", "title":"Scanner 基础", "stage":1, + "units":["u1","u2"], "topics":["1.2","2.1","2.2","2.3","2.9"] }, ... ] +} +``` + +## 四、后续使用 +- **T5 薄弱点诊断**:做题记录(submissions)→ 按题目所在训练的 topics 映射 → 知识点掌握度加权(正确率×尝试×最近权重)→ 薄弱点输出 +- **自动出题(P7.2)**:学生自报不熟点 → topics 定位 → 在映射到该 topic 的训练中选题 / AI 生成 +- **题库接入后**:题目自带 CED 标签 → 直接索引到 topics,无需人工再挂 + +## 五、待办 +- [ ] 用户提供 Kiki 录题平台 CED 标签格式 → 校准本映射(如编码不同) +- [ ] 后续题库题(CE 标签选择题)接入时,验证 CED 编码一致性