Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
A
aidso-data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yaowentong
aidso-data
Commits
d9c9e149
Commit
d9c9e149
authored
Jun 10, 2026
by
Yaowentong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9e2baa4f
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
847 additions
and
440 deletions
+847
-440
base_config.py
aidso_geo/config/base_config.py
+46
-3
down_load_bot.py
aidso_geo/core/down_load_bot.py
+98
-22
feishu_snipaste.py
aidso_geo/core/feishu_snipaste.py
+5
-3
hua.py
aidso_geo/core/hua.py
+290
-387
feishu_interface.py
aidso_geo/core/routes/feishu_interface.py
+379
-0
doubao_data_process.py
aidso_geo/models/doubao_data_process.py
+3
-1
process.py
aidso_geo/models/process.py
+23
-11
yuanbao_data_process.py
aidso_geo/models/yuanbao_data_process.py
+1
-2
ai_interface.py
aidso_geo/utils/ai_interface.py
+2
-11
No files found.
aidso_geo/config/base_config.py
View file @
d9c9e149
...
@@ -136,6 +136,35 @@ class BaseConfig:
...
@@ -136,6 +136,35 @@ class BaseConfig:
}
}
}
}
def
get_sec_id
(
user_id
):
import
requests
url
=
f
"https://api.douchacha.com/open/d/hx/user/user_info?user_id={user_id}"
payload
=
{}
headers
=
{
'Authorization'
:
'eyJhbGciOiJIUzI1NiJ9.eyJ0eXBlIjoiUEMiLCJ1c2VySWQiOjEzOTE2OTMxOTU3NTQyMjU2NjQsImNyZWF0ZURhdGUiOiIyMDI2LTA2LTAzIDE3OjE4OjEzIiwiZXhwIjoxNzgzMDcwMjkzfQ.S12OckXnT7PZot-dnQHPFoFmL3GTZ8M1IDL6x2aWeKU'
}
response
=
requests
.
request
(
"GET"
,
url
,
headers
=
headers
,
data
=
payload
)
return
response
.
json
()
.
get
(
'data'
)
.
get
(
'sec_uid'
)
def
get_user_info
(
secUid
):
import
requests
url
=
f
"http://172.16.1.37:8873/collect_user_info?secUid={secUid}"
payload
=
{}
headers
=
{}
response
=
requests
.
request
(
"GET"
,
url
,
headers
=
headers
,
data
=
payload
)
print
(
response
.
text
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
key_list
=
[
'BDAI:geo:stream_batch:list'
,
key_list
=
[
'BDAI:geo:stream_batch:list'
,
'BDAI:geo:batch:list'
,
'BDAI:geo:batch:list'
,
...
@@ -163,11 +192,25 @@ if __name__ == '__main__':
...
@@ -163,11 +192,25 @@ if __name__ == '__main__':
'WXYY:geo:batch:list'
,
'WXYY:geo:batch:list'
,
'geo:task_commit:list'
]
'geo:task_commit:list'
]
t
=
init_redis
()
t
=
init_redis
()
# # print(t.scard('mt_third_task'))
# aa = list(aa)
# for a in aa:
# sec_uid = get_sec_id(a)
# get_user_info(sec_uid)
# print(t.scard('third_hx_user_id'))
while
1
:
while
1
:
for
k
in
key_list
:
for
k
in
key_list
:
print
(
f
"{k}----{t.llen(k)}"
)
print
(
f
"{k}----{t.llen(k)}"
)
time
.
sleep
(
10
)
time
.
sleep
(
10
)
# key = "third_cx_user_id"
#
#
# print(len(t.smembers(key)))
# print(len(t.smembers(key)))
\ No newline at end of file
aidso_geo/core/down_load_bot.py
View file @
d9c9e149
This diff is collapsed.
Click to expand it.
aidso_geo/core/feishu_snipaste.py
View file @
d9c9e149
...
@@ -141,6 +141,8 @@ def send_message(message):
...
@@ -141,6 +141,8 @@ def send_message(message):
def
get_task
():
def
get_task
():
all_items
=
[]
all_items
=
[]
page_token
=
None
page_token
=
None
...
@@ -818,7 +820,7 @@ def runner_thread():
...
@@ -818,7 +820,7 @@ def runner_thread():
for
cn
in
(
0
,
1
,
2
):
for
cn
in
(
0
,
1
,
2
):
try
:
try
:
rows
=
bh_utils
.
query_data
(
rows
=
bh_utils
.
query_data
(
f
"select reqId,prompt,rank from geo_third_task_log where cn = {cn} and pt = {pt_today}"
f
"select reqId,prompt,rank
,pt
from geo_third_task_log where cn = {cn} and pt = {pt_today}"
)
or
[]
)
or
[]
for
row
in
rows
:
for
row
in
rows
:
row
[
"thinking_enabled"
]
=
"1"
row
[
"thinking_enabled"
]
=
"1"
...
@@ -1076,8 +1078,8 @@ def webhook_snipaste(promp_list):
...
@@ -1076,8 +1078,8 @@ def webhook_snipaste(promp_list):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
#
t1 = threading.Thread(target=scheduler_thread, daemon=True)
t1
=
threading
.
Thread
(
target
=
scheduler_thread
,
daemon
=
True
)
#
t2 = threading.Thread(target=runner_thread, daemon=True)
t2
=
threading
.
Thread
(
target
=
runner_thread
,
daemon
=
True
)
# t1.start()
# t1.start()
# t2.start()
# t2.start()
# t1.join()
# t1.join()
...
...
aidso_geo/core/hua.py
View file @
d9c9e149
This diff is collapsed.
Click to expand it.
aidso_geo/core/routes/feishu_interface.py
View file @
d9c9e149
This diff is collapsed.
Click to expand it.
aidso_geo/models/doubao_data_process.py
View file @
d9c9e149
import
json
import
json
import
traceback
from
aidso_geo.models
import
spider_save_tos
from
aidso_geo.models
import
spider_save_tos
from
aidso_geo.utils
import
robot_utils
,
tos_utils
,
bh_utils
from
aidso_geo.utils
import
robot_utils
,
tos_utils
,
bh_utils
...
@@ -137,6 +138,7 @@ def doubao_process_original_data(file_path):
...
@@ -137,6 +138,7 @@ def doubao_process_original_data(file_path):
suggestions
,
rich_media_block
)
suggestions
,
rich_media_block
)
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
except
Exception
as
e
:
except
Exception
as
e
:
traceback
.
print_exc
()
parts
=
file_path
.
split
(
'/'
)
parts
=
file_path
.
split
(
'/'
)
platform
=
parts
[
2
]
platform
=
parts
[
2
]
task_id
=
parts
[
1
]
task_id
=
parts
[
1
]
...
@@ -162,7 +164,7 @@ def doubao_process_original_data(file_path):
...
@@ -162,7 +164,7 @@ def doubao_process_original_data(file_path):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
file_path
=
'geo/
21430906-2656-4ba4-b884-5f937745734c
/DB/original.text'
file_path
=
'geo/
50adc4fd-40de-4352-bb63-649207718036
/DB/original.text'
doubao_process_original_data
(
file_path
)
doubao_process_original_data
(
file_path
)
...
...
aidso_geo/models/process.py
View file @
d9c9e149
import
json
import
json
import
traceback
import
aidso_geo.utils.bh_utils
as
bh_utils
import
aidso_geo.utils.bh_utils
as
bh_utils
import
time
import
time
...
@@ -1084,6 +1085,10 @@ def mark_source_mentioned(source_list, word_list):
...
@@ -1084,6 +1085,10 @@ def mark_source_mentioned(source_list, word_list):
return
result
return
result
def
norm_source_id
(
v
):
if
v
is
None
:
return
""
return
str
(
v
)
.
strip
()
def
merge_mentioned
(
snippet_mention
,
quotes
):
def
merge_mentioned
(
snippet_mention
,
quotes
):
mentioned_map
=
{
item
[
"sourceId"
]:
item
[
"hasBrand"
]
for
item
in
snippet_mention
}
mentioned_map
=
{
item
[
"sourceId"
]:
item
[
"hasBrand"
]
for
item
in
snippet_mention
}
...
@@ -1093,9 +1098,11 @@ def merge_mentioned(snippet_mention, quotes):
...
@@ -1093,9 +1098,11 @@ def merge_mentioned(snippet_mention, quotes):
def
merge_sentiment
(
snippet_mention
,
quotes
):
def
merge_sentiment
(
snippet_mention
,
quotes
):
mentioned_map
=
{
item
[
"sourceId"
]:
item
[
"sentiment"
]
for
item
in
snippet_mention
}
mentioned_map
=
{
norm_source_id
(
item
.
get
(
"sourceId"
)):
item
.
get
(
"sentiment"
,
"NEUTRAL"
)
for
item
in
snippet_mention
}
for
item
in
quotes
:
for
item
in
quotes
:
item
[
"sentiment"
]
=
mentioned_map
.
get
(
item
[
"sourceId"
],
"NEUTRAL"
)
sid
=
norm_source_id
(
item
.
get
(
"sourceId"
))
item
[
"sentiment"
]
=
mentioned_map
.
get
(
sid
,
"NEUTRAL"
)
return
quotes
return
quotes
...
@@ -1629,6 +1636,7 @@ def platform_process(data):
...
@@ -1629,6 +1636,7 @@ def platform_process(data):
return
True
return
True
except
Exception
as
e
:
except
Exception
as
e
:
traceback
.
print_exc
()
logger
.
exception
(
logger
.
exception
(
f
"{data['reqId']}--{data['platform']}--{data['prompt']}--PROCESS_FAIL"
f
"{data['reqId']}--{data['platform']}--{data['prompt']}--PROCESS_FAIL"
)
)
...
@@ -1838,21 +1846,25 @@ if __name__ == '__main__':
...
@@ -1838,21 +1846,25 @@ if __name__ == '__main__':
from
concurrent.futures
import
ThreadPoolExecutor
,
as_completed
from
concurrent.futures
import
ThreadPoolExecutor
,
as_completed
#
#
# begin = '2026-05-2
3
'
# begin = '2026-05-2
8
'
# end = '2026-0
5-29
'
# end = '2026-0
6-04
'
# req_list = get_req_id(1
5100000026
,begin,end)
# req_list = get_req_id(1
8900000004
,begin,end)
#
#
b = "开云集团"
# req_ids = []
# req_ids = []
# for item in req_list:
# for item in req_list:
# req_id = item.get("req_id")
# if item.get('brand_name') == b:
# req_ids.append(req_id)
# req_id = item.get("req_id")
# req_ids.append(req_id)
# req_id_sql = ",".join([f"'{req_id}'" for req_id in req_ids])
# req_id_sql = ",".join([f"'{req_id}'" for req_id in req_ids])
# print(req_id_sql)
# # print(len(req_ids))
query_sql
=
f
"select * from geo_commit_task where reqId in ('e436cdd6-9342-4c67-b894-82bc8dc337a5')"
query_sql
=
f
"select * from geo_commit_task where type = 'stream_batch' and status != 'SUCCESS'"
data_list
=
bh_utils
.
query_data
(
query_sql
)
# print(len(data_list))
# print(len(data_list))
#
#
# data_list = bh_utils.query_data(f"select * from geo_commit_task where status !='SUCCESS' and type = 'stream_batch' ")
# data_list = bh_utils.query_data(f"select * from geo_commit_task where status ='ING' and type = 'stream_batch' ")
data_list
=
bh_utils
.
query_data
(
query_sql
)
# print(data_list)
# # #
# # #
# # #
# # #
# # # # #
# # # # #
...
...
aidso_geo/models/yuanbao_data_process.py
View file @
d9c9e149
...
@@ -29,7 +29,6 @@ def yuanbao_process_original_data(file_path):
...
@@ -29,7 +29,6 @@ def yuanbao_process_original_data(file_path):
# 提取并解析JSON数据
# 提取并解析JSON数据
data_str
=
i
.
split
(
"data: "
)[
1
]
data_str
=
i
.
split
(
"data: "
)[
1
]
json_data
=
json
.
loads
(
data_str
)
json_data
=
json
.
loads
(
data_str
)
except
(
IndexError
,
json
.
JSONDecodeError
):
except
(
IndexError
,
json
.
JSONDecodeError
):
continue
# 跳过格式错误的数据
continue
# 跳过格式错误的数据
...
@@ -75,6 +74,6 @@ def yuanbao_process_original_data(file_path):
...
@@ -75,6 +74,6 @@ def yuanbao_process_original_data(file_path):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# https://tcdn.aidso.com/geo/c7581554-435b-47ca-a2e5-d52bea763b8a/DOUBA/search_keyword.txt?secret=11049cbfb1c7018597a2085455505304520f0507080c0c4b514e09
# https://tcdn.aidso.com/geo/c7581554-435b-47ca-a2e5-d52bea763b8a/DOUBA/search_keyword.txt?secret=11049cbfb1c7018597a2085455505304520f0507080c0c4b514e09
file_path
=
'geo/
5582d220-f032-4095-ad39-1dbc33a536c3
/TXYB/original.text'
file_path
=
'geo/
b55be837-48a9-476a-8290-1339ea2ce3f9
/TXYB/original.text'
yuanbao_process_original_data
(
file_path
)
yuanbao_process_original_data
(
file_path
)
aidso_geo/utils/ai_interface.py
View file @
d9c9e149
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment