1
0
This commit is contained in:
2025-12-17 20:52:11 +08:00
parent 06bc8c183d
commit f4ae656234
30 changed files with 181 additions and 181 deletions

View File

@@ -42,13 +42,13 @@ class SM2Algorithm(BaseAlgorithm):
quality (int): 记忆保留率量化参数
"""
logger.debug(
"SM2.revisor 开始feedback: %d, is_new_activation: %s",
"SM2.revisor 开始, feedback: %d, is_new_activation: %s",
feedback,
is_new_activation,
)
if feedback == -1:
logger.debug("feedback 为 -1跳过更新")
logger.debug("feedback 为 -1, 跳过更新")
return
algodata[cls.algo_name]["efactor"] = algodata[cls.algo_name]["efactor"] + (
@@ -62,7 +62,7 @@ class SM2Algorithm(BaseAlgorithm):
if feedback < 3:
algodata[cls.algo_name]["rept"] = 0
algodata[cls.algo_name]["interval"] = 0
logger.debug("feedback < 3重置 rept 和 interval")
logger.debug("feedback < 3, 重置 rept 和 interval")
else:
algodata[cls.algo_name]["rept"] += 1
logger.debug("递增 rept: %d", algodata[cls.algo_name]["rept"])
@@ -73,20 +73,20 @@ class SM2Algorithm(BaseAlgorithm):
if is_new_activation:
algodata[cls.algo_name]["rept"] = 0
algodata[cls.algo_name]["efactor"] = 2.5
logger.debug("新激活重置 rept 和 efactor")
logger.debug("新激活, 重置 rept 和 efactor")
if algodata[cls.algo_name]["rept"] == 0:
algodata[cls.algo_name]["interval"] = 1
logger.debug("rept=0设置 interval=1")
logger.debug("rept=0, 设置 interval=1")
elif algodata[cls.algo_name]["rept"] == 1:
algodata[cls.algo_name]["interval"] = 6
logger.debug("rept=1设置 interval=6")
logger.debug("rept=1, 设置 interval=6")
else:
algodata[cls.algo_name]["interval"] = round(
algodata[cls.algo_name]["interval"] * algodata[cls.algo_name]["efactor"]
)
logger.debug(
"rept>1计算 interval: %d", algodata[cls.algo_name]["interval"]
"rept>1, 计算 interval: %d", algodata[cls.algo_name]["interval"]
)
algodata[cls.algo_name]["last_date"] = timer.get_daystamp()