Skip to content

Commit 2e654c1

Browse files
margropclaude
andcommitted
feat: 照片自动分题支持「下一页接着这题」,跨页的题拼接后与下一页一起分题
预览页中标为可能被截断的题和每页最后一题新增「下一页接着这题」:拍或选下一页后, 把这道题在本页的区域按两页宽度之比缩放,放在下一页整页上方拼成一张图,新建自动分题批次。 - 新批次沿用本批的错题本、目标错题本与卷别;这道题从本批移出(可撤销),避免重复导入 - 预览页上方显示「第 N 页正在分题」及链接,可一页接一页继续 - 不改数据库与导入导出,每个批次仍只有一张整页图 - 未计入题目的内容拆为独立组件,预览编辑器保持在约 200 行内 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9168b9f commit 2e654c1

14 files changed

Lines changed: 291 additions & 43 deletions

‎README.en.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Practice statistics show total practice, accuracy and active months, with distri
136136
- **📷 Many ways to add questions**: upload images, paste from the clipboard (Ctrl/⌘+V), take a screenshot, or type the question (Markdown and LaTeX supported). Crop images (zoom with the mouse wheel, a pinch or the zoom buttons for precise selection), or select several questions on one image to import them in a batch.
137137
- **🤖 AI recognition and solving**: AI extracts the question text, answer, analysis, the student's wrong answer and the cause of the mistake, identifies the subject and picks tags from the knowledge library. Turn on "Review before importing" in **Settings → General** to check and edit results before saving.
138138
- **📷 Photo formats and compression**: the real format is detected from the file content (a wrong extension does not matter), with support for JPG, PNG, WebP and HEIC/HEIF. If the browser can decode HEIC (for example Safari) it is used directly; otherwise a decoder is loaded on demand, the photo is converted to JPEG and rotated upright before cropping, and a specific reason is shown if it still cannot be decoded. The crop preview uses a thumbnail while the final crop comes from the original. Output is limited by a 4096 px long edge, about 4.9 megapixels and 1.5 MB together; JPEG quality stays at 0.8 or above and the image is scaled down instead of compressed further, so small text and formulas stay sharp. The actual time of reading, converting, cropping and compressing, uploading, AI recognition and saving is shown, while percentages remain per-stage estimates.
139-
- **🧩 Multiple questions at once**: paste several questions into **AI solve** and they are split by their numbers (local rules, no AI call); options, sub-questions and reading passages stay with their question, while titles and name/date lines are left out. Numbers that look like sub-questions of one question are kept together by default, and unnumbered text can be split with **Split with AI**; when wrong numbers (such as OCR errors) make the local split go wrong, tap **Split wrong? Split with AI**. When one question spans several sheets, tap **Rest is on another sheet** while cropping a single question to save that part, then take the next photo and frame the next part; the parts are joined top to bottom into one image for recognition (up to 4 parts). For photos, choose **Auto split** and a model with image input finds every question and its position on the photo. You confirm the split on a preview page first: select or clear, edit, split at the cursor, merge, reorder, delete and undo, and adjust photo areas on the original image. For text questions, **AI fix text** removes scratch work and fixes OCR typos; every change is marked and only replaces the original after you accept it (results that change or add numbers are discarded). Only then is each question solved (photo questions are cropped by area and go through the same recognition as a single photo), then imported directly or reviewed one by one according to **Review before import**. The batch appears as "Batch of N questions" under Recognition tasks and survives refreshing, locking the phone or closing the page; failed questions can be retried on their own without repeating finished AI calls or imports.
139+
- **🧩 Multiple questions at once**: paste several questions into **AI solve** and they are split by their numbers (local rules, no AI call); options, sub-questions and reading passages stay with their question, while titles and name/date lines are left out. Numbers that look like sub-questions of one question are kept together by default, and unnumbered text can be split with **Split with AI**; when wrong numbers (such as OCR errors) make the local split go wrong, tap **Split wrong? Split with AI**. When one question spans several sheets, tap **Rest is on another sheet** while cropping a single question to save that part, then take the next photo and frame the next part; the parts are joined top to bottom into one image for recognition (up to 4 parts). For photos, choose **Auto split** and a model with image input finds every question and its position on the photo. You confirm the split on a preview page first: select or clear, edit, split at the cursor, merge, reorder, delete and undo, and adjust photo areas on the original image. When a question continues on the next page, tap **Continues on next page** on it (shown for questions marked as possibly cut off and for the last question on each page): its part on this page is placed above the next page in one image, which is auto split as the next batch, and the question is moved out of this batch. For text questions, **AI fix text** removes scratch work and fixes OCR typos; every change is marked and only replaces the original after you accept it (results that change or add numbers are discarded). Only then is each question solved (photo questions are cropped by area and go through the same recognition as a single photo), then imported directly or reviewed one by one according to **Review before import**. The batch appears as "Batch of N questions" under Recognition tasks and survives refreshing, locking the phone or closing the page; failed questions can be retried on their own without repeating finished AI calls or imports.
140140
- **📮 Recognition tasks**: photos and box-selected questions are recognized on the server after upload. Tasks and results are stored in the database and do not depend on the page that started them, so once the upload finishes you can leave the page, lock your phone or keep using the app. The **Recognition** entry in the header shows how many are running and any unread results, refreshes as soon as the app returns to the foreground, and lets you continue reviewing, open the saved question or retry a failed task. With "Review before importing" on, the result is kept as a draft awaiting review; with it off, the server saves the question directly using the same duplicate, grade and paper-group rules as a manual save. Repeated uploads or confirmations never save twice. After a server restart, finished results can still be opened and interrupted tasks show as failed so you can retry. Drafts and failed tasks are kept until you handle them; saved tasks are kept for 7 days.
141141
- **🎓 Grade rule for new questions**: choose a fixed grade or AI recognition per account under **Settings → General**. Fixed mode uses the selected grade and semester, falling back to the account's current grade if unset. AI infers the grade from the question and leaves it unset when uncertain. Applies to images, text, batch selection and Openclaw; manual choices take priority. Direct entry without a grade uses one short AI request, counted toward your daily limit; duplicates do not trigger it. Existing questions and restored grades are preserved.
142142
- **🔁 Duplicate detection**: on import, question text is compared by similarity. Above the threshold (90% by default, adjustable in settings) the question is not imported again; a new wrong attempt is recorded on the original instead.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
- **📷 多种录入方式**:上传图片、从剪贴板粘贴(Ctrl/⌘+V)、屏幕截图,或直接输入题目文字(支持 Markdown 和 LaTeX);图片可裁剪(支持滚轮、双指捏合或按钮缩放图片,方便精确框选),也可在一张图上框选多道题批量导入。
137137
- **🤖 AI 识别与解答**:识别题目文字、答案、解析、学生的错误解答和错因,判断学科,并从知识点库中选择标签。可在「设置 → 通用」中开启「导入前人工确认」,先在校对页修改再保存。
138138
- **📷 照片格式与压缩**:按文件内容识别真实格式(扩展名写错也能识别),支持 JPG、PNG、WebP、HEIC/HEIF。浏览器能解码 HEIC 时直接使用(如 Safari),不能时自动加载解码组件,在裁剪前转换为 JPEG 并按照片的旋转信息摆正;无法解码时提示具体原因。裁剪预览使用缩略图,最终从原图裁剪,输出按最长边 4096、约 490 万像素、1.5MB 共同限制,JPEG 质量不低于 0.8,体积超出时缩小尺寸而不是继续降低质量,避免题目小字和公式模糊。读取、转换、裁剪压缩、上传、AI 识别和保存各阶段显示实际用时,百分比为阶段估算。
139-
- **🧩 多题录入**:「手动输入」中一次粘贴多道题时,按题号自动分题(本地规则,不调用 AI),选项、小问和阅读材料留在所属题内,标题、姓名/日期栏等不计入题目;编号像同一道题的小问时默认按一道题处理,没有题号的多题可选「用 AI 分题」;题号有误(如 OCR 认错)导致本地分错时,也可点「分得不对?用 AI 分题」。一道题分在几张纸上时,单题裁剪中点「下一段在另一张」暂存这一段,再拍下一张接着框选,各段按顺序上下拼成一张图识别(最多 4 段)。拍照时选择「自动分题」,由支持图片输入的模型识别照片中的每道题及其在原图上的位置。分题结果先在预览页确认:可选择/取消、编辑、在光标处拆分、合并、调整顺序、删除、撤销,照片题可在原图上调整区域;文字题可点「AI 修正文字」删去混入的草稿、修正 OCR 错字,修正结果逐字标出删改,逐题接受后才替换原文(改动或新增数字的结果不采用);确认后才逐题解析(照片按区域裁剪后与单题拍照走同一识别流程),按「导入前人工确认」直接入库或逐题校对。整批在「识别任务」中显示为「一批 N 题」,刷新、锁屏或关闭页面后都能找回;失败的题可单独重试,已完成的不会重复调用 AI 或重复入库。
139+
- **🧩 多题录入**:「手动输入」中一次粘贴多道题时,按题号自动分题(本地规则,不调用 AI),选项、小问和阅读材料留在所属题内,标题、姓名/日期栏等不计入题目;编号像同一道题的小问时默认按一道题处理,没有题号的多题可选「用 AI 分题」;题号有误(如 OCR 认错)导致本地分错时,也可点「分得不对?用 AI 分题」。一道题分在几张纸上时,单题裁剪中点「下一段在另一张」暂存这一段,再拍下一张接着框选,各段按顺序上下拼成一张图识别(最多 4 段)。拍照时选择「自动分题」,由支持图片输入的模型识别照片中的每道题及其在原图上的位置。分题结果先在预览页确认:可选择/取消、编辑、在光标处拆分、合并、调整顺序、删除、撤销,照片题可在原图上调整区域;一道题接到下一页时,可在这道题(标为可能被截断的题和每页最后一题)上点「下一页接着这题」,拍下一页后把这道题在本页的部分放在下一页上方拼成一张图,再自动分题为下一批,本批移出这道题;文字题可点「AI 修正文字」删去混入的草稿、修正 OCR 错字,修正结果逐字标出删改,逐题接受后才替换原文(改动或新增数字的结果不采用);确认后才逐题解析(照片按区域裁剪后与单题拍照走同一识别流程),按「导入前人工确认」直接入库或逐题校对。整批在「识别任务」中显示为「一批 N 题」,刷新、锁屏或关闭页面后都能找回;失败的题可单独重试,已完成的不会重复调用 AI 或重复入库。
140140
- **📮 识别任务**:拍照或框选的题目上传后由服务器识别,任务和结果保存在数据库中,不依赖原页面连接。上传完成即可离开页面、锁屏或继续使用应用;页头「识别任务」入口显示识别中数量和未读结果,回到前台立即刷新,可继续校对、查看错题或重试失败任务。开启「导入前人工确认」时结果保存为待校对草稿,关闭时服务器识别后直接入库(判重、年级和卷别规则与手动保存一致),重复提交或重复确认不会重复入库。服务重启后已完成的结果仍可打开,处理中被中断的任务显示为失败并可重试;待校对和失败的任务会一直保留到处理,已保存的任务保留 7 天。
141141
- **🎓 录入年级规则**:在「设置 → 通用」按账户选择固定年级或 AI 识别。固定模式使用指定年级学期,未指定时沿用账户当前年级;AI 模式根据题目内容判断,无法确定时保持未设置。图片、文字、框选批量与 Openclaw 录入统一生效,手工选择优先。直接录入未填年级时会补充一次 AI 识别并计入每日用量,重复题不重复识别;已有题目和备份恢复的年级不受影响。
142142
- **🔁 重复题判定**:导入时比较题干相似度,超过阈值(默认 90%,可在设置中调整)的题目不会重复导入,而是在原题下记一次做错。

‎doc/wiki/User-Guide.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535

3636
预览页显示「识别出 N 题 · 已选 N 题」。每道题默认折叠,点开后可编辑、在光标处拆分、与上一题合并、上下移动或删除,顶部可全选和撤销。照片题可在原图上看到编号框,点「调整区域」重新框选(一题可有多个区域,例如跨栏的题干和配图);照片题显示的文字只用于辨认,开始后会按区域重新识别。
3737

38+
一道题从这一页接到下一页时,在这道题上点「下一页接着这题」(标为「题目可能被截断」的题和每页最后一题会显示),拍摄或选择下一页。应用把这道题在本页的部分按两页的宽度比例缩放,放在下一页整页的上方拼成一张图,交给 AI 自动分题,生成下一批;这道题从本批移出(可撤销),在下一批中作为一道完整的题出现。预览页上方会出现「第 2 页正在分题」及链接;本批其余的题照常解析导入后,再打开下一批确认。下一批的最后一题如果又接到下一页,可以继续这样做。下一批沿用本批的错题本,分题计一次 AI 次数。万一下一批把这道题分成了两题,可用「向上合并」合回一题。
39+
3840
文字题的内容来自 OCR 或混有草稿时,可点顶部的「AI 修正文字(N 题)」修正已选的题,或在展开的题目中点「AI 修正文字」只修这一题。AI 只删去混入的草稿、演算和涂改,修正形近字、标点等 OCR 错字,数字、算式、单位和题号保持原样,不补写内容;拿不准的片段会列在「拿不准、已保留原样」中。结果显示为「AI 修正建议」:删去的内容带删除线,改动的内容高亮,点「接受修正」才替换题目文字,点「保留原文」放弃;多题可点「全部接受」。改动或新增数字的结果不会采用,这些题保留原文。建议随预览自动保存;手工改过题目文字后,原建议作废。还有未接受的建议时,开始解析会提示,这些题按原文解析。修正每次计一次 AI 次数。修改会自动保存到服务器,刷新、锁屏或换设备打开都是同一份;在两处同时修改时,后保存的一方会提示并载入最新内容。
3941

4042
确认后点底部按钮开始:关闭「导入前人工确认」时为「解析并导入 N 题」,逐题解析后直接入库;开启时为「解析 N 题,稍后逐题校对」,逐题点「校对」,保存后回到本批,也可点「按识别结果导入其余 N 题」。整批在「识别任务」中显示为「一批 N 题」,显示已导入、重复、待校对、失败的数量;百分比按阶段估算。失败的题可单独或批量重试,已完成的题不会重复调用 AI 或重复入库。

‎doc/wiki/en/User-Guide-en.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ You do not need to paste or crop questions one at a time:
3939

4040
The preview shows "N questions found · N selected". Each question starts collapsed; open it to edit, split at the cursor, merge with the previous question, move it or delete it, with select-all and undo at the top. Photo questions are outlined with numbered boxes on the original; use **Adjust area** to reframe one (a question can have several areas, such as a stem and a figure in different columns). The text shown for photo questions only helps you recognize them; each question is recognized again from its area after you start.
4141

42+
When a question continues from this page onto the next, tap **Continues on next page** on it (shown for questions marked as possibly cut off and for the last question on each page) and take or choose the next page. The app scales this question's part of the page to match the next page's width, places it above the whole next page in one image and sends it to AI auto split as the next batch; the question is moved out of this batch (you can undo) and appears whole in the next batch. A "Page 2 is being split" notice with a link appears at the top; solve and import the rest of this batch as usual, then open the next batch to confirm. If the last question of the next batch continues again, repeat. The next batch uses the same notebook, and the split counts as one AI use. If the next batch splits the question in two, use **Merge with previous** to join them.
43+
4244
When text questions come from OCR or contain scratch work, tap **AI fix text (N)** at the top to fix the selected questions, or **AI fix text** inside an opened question to fix just that one. The AI only removes scratch work, working and crossed-out text and fixes OCR typos such as look-alike characters and punctuation; numbers, formulas, units and question numbers stay as they are, and nothing is added. Parts it is unsure about are listed under **Not sure, kept as is**. Each result appears as an **AI suggested fix** with removed text struck out and changes highlighted; **Accept fix** replaces the question text and **Keep original** discards the suggestion, or use **Accept all** for several questions. Results that change or add numbers are discarded and those questions keep their original text. Suggestions are saved with the preview; editing the question text by hand discards its suggestion. If suggestions are still pending when you start, you are reminded and those questions are solved with their original text. Each fix request counts as one AI use. Changes are saved to the server automatically, so refreshing, locking the phone or opening it on another device shows the same preview; if two pages edit at once, the later save is told and loads the latest version.
4345

4446
Start with the button at the bottom: with **Review before import** off it reads **Solve and import N questions** and saves each question when solved; with it on it reads **Solve N questions, review later**, and you **Review** each one (saving returns to the batch) or choose **Import the other N as recognized**. The batch appears as "Batch of N questions" under Recognition tasks with counts of imported, duplicate, to-review and failed questions; percentages are stage estimates. Failed questions can be retried individually or together; finished questions are never solved or imported twice.

0 commit comments

Comments
 (0)