不回。刚上号那一段时间,还是比较在乎每个上号人的。就像新店开业,对每一个顾客都很热情。当时一天上午,一个叫“夏日暖阳阳的”,突然就加了微信,说上号。我说好好好,赶紧准备好窗口,以最快的速度,把码发给她,结果没音了,我发微信也不回了,那一天,我每隔一两小时给她微一次,本来晚上21点离开图书馆,我等到了22点,还是不回,我失落的回去了。过了一周,我刚到图书馆楼下,她说:现在有时间了,上号。我非常兴奋,摩托车没停稳,倒了,来不及扶,卡卡跑到楼上,打开电脑,发码让她扫,又没音了。等了五个小时,我彻底怒了,这是溜我玩的吗,你就是真急事了,也说一声啊。果断拉黑,逼自己忘记这个人这件事。对于不讲礼貌的人,没必要在乎她,再也不见了您。
[200+100]-------->底部有张生活照片(头条号运营:大家想全托管上号的联系我哦,每天让你得个早餐钱,微信号: qhz_toutiao)
【关键词】python、ragflow、宠物档案、脏数据
描述:现在需要把宠物档案加入用户问题,减少基础问询的提问问题数量。
开工:
20250509时间段:12:06-13:00看下前端把当前宠物信息传过来没有,在新建会话时。
在新建会话时,宠物档案是传进来的,如下:

图7a-1
注:接下来,先把这个信息存到一张动物表里。
20250510时间段:01:46-02:00先建一张表,按照上面截图中的字段,如下:
CREATE TABLE `animal` (
`id` varchar(32) NOT NULL,
`create_time` bigint DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`update_time` bigint DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`animal_id` int(11) DEFAULT 0,
`animal` varchar(50) DEFAULT NULL,
`animal_type` varchar(100) DEFAULT NULL,
`avatar` varchar(100) DEFAULT NULL,
`birthday` varchar(50) DEFAULT NULL,
`conversation_id` varchar(32) DEFAULT NULL,
`dialog_id` varchar(32) DEFAULT NULL,
`is_choosed` tinyint(1) DEFAULT 0,
`is_deleted` tinyint(1) DEFAULT 0,
`neuter` tinyint(1) DEFAULT 0,
`nick` varchar(50) DEFAULT NULL,
`openid` varchar(50) DEFAULT NULL,
`sex` varchar(5) DEFAULT NULL,
`speical_time` varchar(50) DEFAULT NULL,
`vaccination` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `animal_create_time` (`create_time`),
KEY `animal_create_date` (`create_date`),
KEY `animal_update_time` (`update_time`),
KEY `animal_update_date` (`update_date`),
KEY `animal_dialog_id` (`dialog_id`),
KEY `animal_conversation_id` (`conversation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
注:运行一下试试。效果如下:

图7a-2
注:接下来,就是保存宠物档案信息到表,有就更新,没有就增加。
20250510时间段:02:05-04:00写程序如下:
###保存宠物档案信息
if 'id' in req and req["id"]:
save_data = {
"id": get_uuid(),
"animal_id": req["id"],
"animal": req["animal"],
"animal_type": req["animal_type"],
"avatar": req["avatar"],
"birthday": req["birthday"],
"conversation_id": req["conversation_id"],
"dialog_id": req["dialog_id"],
"is_choosed": req["is_choosed"],
"is_deleted": req["is_deleted"],
"neuter": req["neuter"],
"nick": req["nick"],
"openid": req["openid"],
"sex": req["sex"],
"speical_time": req["speical_time"],
"vaccination": req["vaccination"]
}
AnimalService.save(**save_data)
注:这个通过接口模拟来做,但这个涉及到登录验证,看下能不能攻破。
20250512时间段:16:52-17:00先搞一下数据出来,如下:
{
"add_time": "2025-05-09 12:30:13",
"animal": "狗狗",
"animal_type": "澳大利亚牧牛犬",
"avatar": "",
"birthday": "2025-05-09",
"conversation_id": "b1210beb53d245199e3f9a8a93641237",
"dialog_id": "9cf3d9eaf77c11ef8dc500e003c42347",
"enable_search": false,
"id": "38",
"is_choosed": "0",
"is_deleted": "0",
"message": [
{
"role": "assistant",
"content": "你好"
}
],
"modify_time": "2025-05-09 12:30:13",
"name": "你好",
"neuter": "0",
"nick": "土豆",
"openid": "oi87O6xKvGO_LwalOFaXmJ8Yswi8",
"sex": "男",
"speical_time": "非特殊时期",
"vaccination": "已接种"
}
注:接下来,写个测试用例,如下:
def test_set_conversation(client):
log.info("test_expert_diagnosis")
'''
测试 设置会话时保存宠物档案信息
'''
json_data = {
"add_time": "2025-05-09 12:30:13",
"animal": "狗狗",
"animal_type": "澳大利亚牧牛犬",
"avatar": "",
"birthday": "2025-05-09",
"conversation_id": "b1210beb53d245199e3f9a8a93641237",
"dialog_id": "9cf3d9eaf77c11ef8dc500e003c42347",
"enable_search": false,
"id": "38",
"is_choosed": "0",
"is_deleted": "0",
"message": [
{
"role": "assistant",
"content": "你好"
}
],
"modify_time": "2025-05-09 12:30:13",
"name": "你好",
"neuter": "0",
"nick": "土豆",
"openid": "oi87O6xKvGO_LwalOFaXmJ8Yswi8",
"sex": "男",
"speical_time": "非特殊时期",
"vaccination": "已接种",
}
url = f"/v1/conversation/set"
resp = client.post(
url,
json=json_data,
headers={
"Content-type": "application/json",
"Authorization": "Bearer ragflow-UxOGYzZjUwYjMwOTExZWZiODc0MDI0Mm"
}
)
if not 200 <= resp.status_code < 300:
raise Exception(f"GET {url} status_code {resp.status_code}.")
# received_data = []
for chunk in resp.iter_encoded():
answer = chunk.decode('utf-8').strip()
log.info(f"\n\n answer: {answer} \n\n")
注:运行下试试。
描述:现在查看历史记录有脏数据,截图如下:

图7b-1
注:这个问题需要处理一下。
开工:
20250509周五时间段:16:48-17:00可能是专家诊断里,没有去除系统消息,打断点看一下。
这个已经处理,是由于专家诊断里,没有删除系统消息,导致存到数据库里了。
测试还可以
描述:现在集群莫名的丢失索引,需要配置审计日志,以便下次索引被删除知道原因。
开工:
20250511周日时间段:23:27-01:00Docker环境下Elasticsearch审计日志配置
在Docker环境中配置Elasticsearch审计日志需要注意一些特殊事项。以下是针对Docker部署的修改建议和完整配置方案:
关键修改点
Docker容器内的路径需要特别注意,建议使用环境变量覆盖:
xpack.security.audit.logfile.path: /usr/share/elasticsearch/logs/audit.log必须将日志目录挂载到宿主机,否则容器重启后日志会丢失:
docker run -d \
-v /path/on/host/logs:/usr/share/elasticsearch/logs \
-v /path/on/host/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
elasticsearch:8.12.0
注:接下来,看下完整的Docker配置方案。
xpack.security.enabled: true
xpack.security.audit.enabled: true
xpack.security.audit.logfile.events.include: index_event,create_index,delete_index
xpack.security.audit.logfile.path: /usr/share/elasticsearch/logs/audit.log
docker run -d \
--name elasticsearch \
-p 9200:9200 -p 9300:9300 \
-v ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml \
-v ./es-logs:/usr/share/elasticsearch/logs \
-e "discovery.type=single-node" \
elasticsearch:8.12.0
注:现在还不行,先把配置审计日志注释掉,索引恢复后再打开。
20250512周一时间段:10:03-11:00现在日志如下:
ess.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.771Z", "log.level": "INFO", "message":"loaded module [ingest-geoip]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [x-pack-write-load-forecaster]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [inference]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [search-business-rules]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [wildcard]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [ingest-attachment]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [x-pack-sql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [unsigned-long]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.772Z", "log.level": "INFO", "message":"loaded module [x-pack-async]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.773Z", "log.level": "INFO", "message":"loaded module [runtime-fields-common]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.773Z", "log.level": "INFO", "message":"loaded module [vector-tile]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.773Z", "log.level": "INFO", "message":"loaded module [lang-expression]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
{"@timestamp":"2025-05-12T02:21:47.773Z", "log.level": "INFO", "message":"loaded module [x-pack-eql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"zero4","elasticsearch.cluster.name":"ragflow-cluster"}
注:这个配置还是有点问题,先把保存宠物档案做一下,以免影响用户使用。之后,晚上的时候再做这个。
昨日数据来啦,昨日总收入:807.24,昨日总播放:911.8万,软件截图如下:

图7d-1
注:想要全脱管运营头条号的联系我,你出账号,我来运营,保你天天有钱花,咨询电话: 17701328814(微信同号),也可以加群先了解一下。

图7d-2
注:个人微信如下,欢迎骚扰。

图7d-3
拍摄于2026年2月1日,10:49:12,带二宝去看花,二宝当时三岁四个月。把那个女孩拉黑后,我在脑补那个女孩的出生环境,应该是家里比较富裕,独生子女,被惯着长大的,对别人没礼貌,不在乎,但社会不会惯着啊,别人又不是女孩爸妈,对家人不客气,对社会人需要客气吧。就像之前在六道口上班时,有一天去图书部,一个黄头发的库管和一个女销售吵起来了,库管:我TM在地铁上,你就说要医学综合,到工位上还一直催催催,我说好,我来找,我把大综合,小综合还有附加卷给你配好了,问你要哪一种,你就不回了,把我晾在仓库,前后也就五分钟,等了你一天你都没回,你是被车撞死了吗,站在我面前的是鬼魂吗,你有礼貌吗,你父母教你做人了吗。销售姑娘把书一摔,愤愤离去。我说:怎么了,兄弟,吃枪药了。库管:你不知道,那天,我没睡醒就催,在地铁上还催,到楼上了,我说我现在给你找书,大概五分钟,我全扒拉出来了,问她要大综合,小缩合,要不要附加卷,她没音了,等了她一上午也没回,领导来了,说书那么乱,还把我熊一顿。库管做的不对,不应该对小姑娘那样,缺少怜香惜玉之心,但小姑娘也有错,你好歹回一句啊,害得库管被骂,都有问题,各打五十大板吧。

图7e-1
《本文完》