Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 闲时维护中,添加为数据库执行数据去重的选项与操作 #52

Open
Antonoko opened this issue Dec 1, 2023 · 2 comments
Labels
enhancement New feature or request P1 second priority

Comments

@Antonoko
Copy link
Collaborator

Antonoko commented Dec 1, 2023

1. 需求背景

当用户执行来回滚动或来回切换窗口的操作时,重复的内容数据会分散在不同时间的数据库条目中。如果能提供在闲时维护时自动为数据库条目去重,能够提效搜索筛选效率、降低搜索与录制时可能存在的信息爆炸负担;

2. 需求范围

在闲时维护时增加此步操作,需要注意对数据库的读写安全,闲时操作被打断时能记录与恢复进度;

3. 功能详细说明

  • 在设置选项中,提供一个用户是否可以决定数据去重的checkbox,勾选后将会在闲时进行逐一条目的数据比对去重;
  • 功能规则:
    • 数据去重比对的阈值需要设定在极高的状态,以确保去除的为几乎重复的画面内容;比对的内容为OCR索引到的文本;(此项参数在json中配置,不对用户设置界面透传)
    • 数据去重时,只保留最早的条目结果;
    • 当OCR索引到的文本少于20字时,跳过此条内容的比对;(跳过的字数阈值在json中配置,不对用户设置界面透传)
    • 数据比对的时间范围限制在一天内(或一天内连续的x小时?RFC),比如说在第一天的信息A与第二天的信息B几乎一致,由于跨越了一天、所以不进行去重;同样的,当第一天的信息A与第一天的信息C几乎一致时,移除信息C,只保留时间最早的条目A;(此项规则是否启用的参数在json中配置,不对用户设置界面透传)
    • 高级期望补充:如果条目B包含了大量条目A的内容,几乎为A⊆B,那么只保留B;此项可以去重打字创作等场景中冗余重复内容;
@Antonoko Antonoko added enhancement New feature or request P1 second priority P0 highest priority and removed P1 second priority P0 highest priority labels Dec 1, 2023
@Antonoko
Copy link
Collaborator Author

需要考虑数据库操作的时间(分批次操作,不一次更新完成)、与用户打断闲时后的可用性。

@Antonoko
Copy link
Collaborator Author

其实在ocr index之后,在dataframe写入前做下数据去重就可以了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 second priority
Projects
None yet
Development

No branches or pull requests

1 participant