Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
middleware-automatic
Overview
Overview
Details
Activity
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
shenjunjie
middleware-automatic
Commits
ef608cce
Commit
ef608cce
authored
Jun 17, 2024
by
shentao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'master'
2024/06/17 ai标注接口 log日志修复、返回值为空修复 See merge request
!103
parents
ce81efc5
e87ed3e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
middleware-automatic-center-son/src/main/java/com/zhiwei/middleware/automatic/son/task/service/TaskServiceAiMark.java
+8
-4
No files found.
middleware-automatic-center-son/src/main/java/com/zhiwei/middleware/automatic/son/task/service/TaskServiceAiMark.java
View file @
ef608cce
...
...
@@ -13,6 +13,7 @@ import com.zhiwei.middleware.automatic.son.dao.AiApiResultDao;
import
com.zhiwei.middleware.automatic.son.dubbo.DubboHandler
;
import
com.zhiwei.middleware.automatic.son.util.MarkInfoUtil
;
import
com.zhiwei.middleware.automatic.son.util.OkHttpUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Qualifier
;
...
...
@@ -99,14 +100,14 @@ public class TaskServiceAiMark implements TaskService {
long
endTime
=
System
.
currentTimeMillis
()
-
now
;
AiApiResult
aiRes
=
aiApiResultConversion
(
s
);
if
(
Objects
.
isNull
(
aiRes
))
{
log
.
info
(
"数据url:{},耗时:{},ai接口返回信息不完整:{}"
,
param
.
getString
(
GenericAttribute
.
URL
),
endTime
,
s
);
log
.
info
(
"数据url:{},耗时:{},ai接口返回信息不完整:{}"
,
param
.
get
JSONObject
(
"data"
).
get
String
(
GenericAttribute
.
URL
),
endTime
,
s
);
return
null
;
}
log
.
info
(
"数据url:{},ai标签:{},耗时:{},具体数据:{}"
,
param
.
getString
(
GenericAttribute
.
URL
),
aiRes
.
getSent
(),
endTime
,
aiRes
.
getResult
());
log
.
info
(
"数据url:{},ai标签:{},耗时:{},具体数据:{}"
,
param
.
get
JSONObject
(
"data"
).
get
String
(
GenericAttribute
.
URL
),
aiRes
.
getSent
(),
endTime
,
aiRes
.
getResult
());
List
<
AIMark
.
TagRelation
>
tagRelations
=
aiParam
.
getAiMark
().
getTagRelations
();
AIMark
.
TagRelation
tagRelation
=
tagRelations
.
stream
().
filter
(
e
->
relateValueVerify
(
e
,
aiRes
)).
findFirst
().
orElse
(
null
);
if
(
Objects
.
isNull
(
tagRelation
))
{
log
.
info
(
"数据url:{},ai标签:{},没有绑定关系,以过滤"
,
param
.
getString
(
GenericAttribute
.
URL
),
aiRes
.
getSent
());
log
.
info
(
"数据url:{},ai标签:{},没有绑定关系,以过滤"
,
param
.
get
JSONObject
(
"data"
).
get
String
(
GenericAttribute
.
URL
),
aiRes
.
getSent
());
return
null
;
}
JSONObject
json
=
aiParam
.
getJson
();
...
...
@@ -116,7 +117,7 @@ public class TaskServiceAiMark implements TaskService {
json
.
put
(
GenericAttribute
.
ES_M_GROUP
,
aiParam
.
getAiMark
().
getProject
());
json
.
put
(
GenericAttribute
.
ES_M_GROUP_ID
,
aiParam
.
getAiMark
().
getProjectId
());
MarkInfo
markInfo
=
MarkInfoUtil
.
transformToMarkInfo
(
json
);
log
.
info
(
"数据url:{},ai标签:{},标注标签:{},成功标注"
,
param
.
getString
(
GenericAttribute
.
URL
),
aiRes
.
getSent
(),
tagRelation
.
getName
());
log
.
info
(
"数据url:{},ai标签:{},标注标签:{},成功标注"
,
param
.
get
JSONObject
(
"data"
).
get
String
(
GenericAttribute
.
URL
),
aiRes
.
getSent
(),
tagRelation
.
getName
());
return
markInfo
;
}
...
...
@@ -132,6 +133,9 @@ public class TaskServiceAiMark implements TaskService {
default
:
relateValue
=
""
;
break
;
}
if
(
StringUtils
.
isEmpty
(
relateValue
))
{
return
false
;
}
return
relateValue
.
equals
(
tagRelation
.
getRelateValue
());
}
...
...
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