描述:生成学习思维导图,自动跟踪记录学习进度,记录用户的学习时间、知识点学习情况等信息,并通过数据可视化库将这些数据转化为进度条、饼图、学习日历等直观的展示形式,方便用户查看
根据您的需求,我们可以设计一个符合设计范式的Parse Schema,包括学习思维导图、学习进度跟踪等相关表。以下是各个表的设计及其字段名称,使用PlantUML类图表示。
objectId (String)
createdAt (String)
title (String) - 思维导图标题
description (String) - 思维导图描述
user (Pointer) - 创建者(用户)
knowledgePoints (Array) - 关联的知识点
objectId (String)
createdAt (String)
name (String) - 知识点名称
content (String) - 知识点内容
mindMap (Pointer) - 关联的思维导图
prerequisites (Array) - 先修知识点
objectId (String)
createdAt (String)
username (String) - 用户名
email (String) - 用户邮箱
learningProgress (Array) - 关联的学习进度
objectId (String)
createdAt (String)
user (Pointer) - 用户
knowledgePoint (Pointer) - 学习的知识点
studyTime (Number) - 学习时间(分钟)
completionStatus (Boolean) - 完成状态
date (Date) - 学习日期
objectId (String)
createdAt (String)
user (Pointer) - 用户
type (String) - 可视化类型(如:进度条、饼图、学习日历等)
data (JSON) - 可视化数据
以下是上述表的PlantUML类图表示:
@startuml
class MindMap {
+objectId: String
+createdAt: Date
+title: String
+description: String
+user: Pointer<User>
+knowledgePoints: Array<Pointer<KnowledgePoint>>
}
class KnowledgePoint {
+objectId: String
+createdAt: Date
+name: String
+content: String
+mindMap: Pointer<MindMap>
+prerequisites: Array<Pointer<KnowledgePoint>>
}
class User {
+objectId: String
+createdAt: Date
+username: String
+email: String
+learningProgress: Array<Pointer<LearningProgress>>
}
class LearningProgress {
+objectId: String
+createdAt: Date
+user: Pointer<User>
+knowledgePoint: Pointer<KnowledgePoint>
+studyTime: Number
+completionStatus: Boolean
+date: Date
}
class Visualization {
+objectId: String
+createdAt: Date
+user: Pointer<User>
+type: String
+data: JSON
}
MindMap "1" -- "*" KnowledgePoint : contains
User "1" -- "*" LearningProgress : tracks
LearningProgress "*" -- "1" KnowledgePoint : studies
User "1" -- "*" Visualization : generates
@enduml
1.每个表都有默认的 objectId 和 createdAt 字段。
2.表之间的关系通过Pointer表示,以确保数据的规范性和完整性。
3.设计遵循了数据库的规范化原则,避免了数据冗余。
课程学习的完整逻辑:
用户在APP内,通过文本生成学习流程后,再根据流程绘制思维导图完成整个学习计划
数据来源
用户输入:用户的学习需求等
文本生成
提示词:兴趣学习计划生成提示词
结果存储:StudyPlan
学习目标 knowledgePoints 知识点
计划详情 content 完整学习内容
根据学习计划结果,排期生成任务
生成结果:learningList
循环数组:向LearningProgress表逐个插入数据。
LearningProgress
表结构的 JSON 格式测试数据数组示例:[
{
"objectId": "lp1",
"createdAt": "2024-12-01T10:00:00Z",
"user": { "pointer": "user1" },
"knowledgePoint": { "pointer": "kp1" },
"studyTime": 120,
"completionStatus": true,
"date": "2024-12-01"
},
{
"objectId": "lp2",
"createdAt": "2024-12-02T10:00:00Z",
"user": { "pointer": "user1" },
"knowledgePoint": { "pointer": "kp2" },
"studyTime": 90,
"completionStatus": false,
"date": "2024-12-02"
},
{
"objectId": "lp3",
"createdAt": "2024-12-03T10:00:00Z",
"user": { "pointer": "user1" },
"knowledgePoint": { "pointer": "kp3" },
"studyTime": 150,
"completionStatus": true,
"date": "2024-12-03"
},
{
"objectId": "lp4",
"createdAt": "2024-12-04T10:00:00Z",
"user": { "pointer": "user1" },
"knowledgePoint": { "pointer": "kp4" },
"studyTime": 60,
"completionStatus": false,
"date": "2024-12-04"
},
{
"objectId": "lp5",
"createdAt": "2024-12-05T10:00:00Z",
"user": { "pointer": "user1" },
"knowledgePoint": { "pointer": "kp5" },
"studyTime": 180,
"completionStatus": true,
"date": "2024-12-05"
}
]
在这个示例中,user
字段指向一个用户(user1
),knowledgePoint
字段指向不同的知识点(kp1
, kp2
, kp3
, kp4
, kp5
),每个学习进度记录了学习时间、完成状态和日期。您可以根据实际需求调整这些数据。
@startuml
actor User
participant "学习需求输入" as Input
participant "文本生成模块" as TextGen
participant "学习计划存储" as StudyPlan
participant "思维导图生成" as MindMap
participant "任务排期生成" as TaskScheduler
participant "学习进度表" as LearningProgress
User -> Input : 输入学习需求
Input -> TextGen : 生成学习计划
TextGen -> StudyPlan : 存储学习计划
StudyPlan -> MindMap : 绘制思维导图
MindMap -> User : 提供思维导图
User -> TaskScheduler : 根据学习计划生成任务
TaskScheduler -> LearningProgress : 向学习进度表插入数据
@enduml
StudyPlan
中。LearningProgress
表中。