Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a1c53cf6
authored
Apr 19, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修正
1 parent
6a0f781c
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
97 additions
and
54 deletions
pom.xml
src/main/java/com/viontech/match/config/Constant.java
src/main/java/com/viontech/match/controller/MainController.java
src/main/java/com/viontech/match/entity/PoolInfo.java
src/main/java/com/viontech/match/entity/vo/RequestVo.java
src/main/java/com/viontech/match/entity/vo/ResponseVo.java
src/main/java/com/viontech/match/enumeration/CommandEnum.java
src/main/java/com/viontech/match/service/PersonService.java
src/main/java/com/viontech/match/service/PoolService.java
src/main/java/com/viontech/match/util/Utils.java
src/test/java/com/viontech/match/Test0.java
src/test/java/com/viontech/match/util/UtilsTest.java
pom.xml
View file @
a1c53cf
...
...
@@ -38,7 +38,7 @@
<dependency>
<groupId>
com.viontech.keliu
</groupId>
<artifactId>
keliu-base
</artifactId>
<version>
6.0.
8-SNAPSHOT
</version>
<version>
6.0.
9
</version>
<exclusions>
<exclusion>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
...
...
@@ -63,7 +63,7 @@
<dependency>
<groupId>
com.viontech.keliu
</groupId>
<artifactId>
AlgApiClient
</artifactId>
<version>
6.0.5
-SNAPSHOT
</version>
<version>
6.0.5
</version>
<exclusions>
<exclusion>
<groupId>
javax
</groupId>
...
...
@@ -82,6 +82,24 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>
vionmaven
</id>
<name>
vion maven
</name>
<url>
http://maven.vionyun.com:8081/nexus/content/repositories/releases/
</url>
</repository>
<snapshotRepository>
<id>
vionmaven
</id>
<name>
vion maven
</name>
<url>
http://maven.vionyun.com:8081/nexus/content/repositories/snapshots/
</url>
</snapshotRepository>
</distributionManagement>
<scm>
<developerConnection>
scm:git:http://git.keliuyun.com:55676/xmh/matchPerson
</developerConnection>
<tag>
HEAD
</tag>
</scm>
<build>
<finalName>
VVAS-Match
</finalName>
<plugins>
...
...
@@ -98,6 +116,35 @@
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
<encoding>
UTF-8
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
versions-maven-plugin
</artifactId>
<version>
2.3
</version>
<configuration>
<generateBackupPoms>
false
</generateBackupPoms>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-release-plugin
</artifactId>
<version>
2.5.3
</version>
<configuration>
<tagNameFormat>
V@{project.version}
</tagNameFormat>
<autoVersionSubmodules>
true
</autoVersionSubmodules>
<username>
xmh
</username>
<password>
hbr25hYQDwhJ
</password>
<branchName>
develop
</branchName>
<tagBase>
http://git.keliuyun.com:55676/chenjm/DataServer/tags
</tagBase>
</configuration>
</plugin>
</plugins>
</build>
...
...
src/main/java/com/viontech/match/config/Constant.java
View file @
a1c53cf
package
com
.
viontech
.
match
.
config
;
/**
*
.
*
常量
*
* @author 谢明辉
* @
date 2020/12/2
* @
version 0.0.1
*/
public
class
Constant
{
...
...
src/main/java/com/viontech/match/controller/MainController.java
View file @
a1c53cf
package
com
.
viontech
.
match
.
controller
;
import
com.viontech.keliu.model.FaceFeature
;
import
com.viontech.keliu.model.Person
;
import
com.viontech.match.entity.vo.RequestVo
;
import
com.viontech.match.entity.vo.ResponseVo
;
import
com.viontech.match.service.PersonService
;
...
...
@@ -11,16 +9,12 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.concurrent.TimeUnit
;
/**
* .
*
* @author 谢明辉
* @
date 2020/11/23
* @
version 0.0.1
*/
@RestController
@RequestMapping
(
"/alg"
)
...
...
src/main/java/com/viontech/match/entity/PoolInfo.java
View file @
a1c53cf
...
...
@@ -7,7 +7,7 @@ import lombok.Setter;
* .
*
* @author 谢明辉
* @
date 2020/11/27
* @
version 0.0.1
*/
@Getter
@Setter
...
...
src/main/java/com/viontech/match/entity/vo/RequestVo.java
View file @
a1c53cf
...
...
@@ -13,7 +13,7 @@ import java.util.List;
* .
*
* @author 谢明辉
* @
date 2020/11/27
* @
version 0.0.1
*/
@Getter
...
...
src/main/java/com/viontech/match/entity/vo/ResponseVo.java
View file @
a1c53cf
...
...
@@ -13,7 +13,7 @@ import java.util.List;
* .
*
* @author 谢明辉
* @
date 2020/11/27
* @
version 0.0.1
*/
@Getter
...
...
src/main/java/com/viontech/match/enumeration/CommandEnum.java
View file @
a1c53cf
...
...
@@ -4,7 +4,7 @@ package com.viontech.match.enumeration;
* .
*
* @author 谢明辉
* @
date 2020/11/27
* @
version 0.0.1
*/
public
enum
CommandEnum
{
/** 命令 */
...
...
src/main/java/com/viontech/match/service/PersonService.java
View file @
a1c53cf
...
...
@@ -42,7 +42,7 @@ import java.util.stream.Stream;
* .
*
* @author 谢明辉
* @
date 2020/11/27
* @
version 0.0.1
*/
@Service
...
...
@@ -57,6 +57,11 @@ public class PersonService {
/**
* 人员比对
*
* @param requestVo rid,personPoolId,unionPersonPoolId,person
*
* @return ResponseVo
* @throws Exception --
*/
public
ResponseVo
matchPerson
(
RequestVo
requestVo
)
throws
Exception
{
String
rid
=
requestVo
.
getRid
();
...
...
@@ -120,6 +125,10 @@ public class PersonService {
/**
* 修改人员特征
*
* @param requestVo rid,person, poolId,
*
* @return ResponseVo
*/
public
ResponseVo
updatePerson
(
RequestVo
requestVo
)
{
String
rid
=
requestVo
.
getRid
();
...
...
@@ -141,6 +150,12 @@ public class PersonService {
/**
* 添加人员
*
* @param poolId 特征池Id
* @param personPool 要添加的人员列表
*
* @return 批量添加的结果
* @throws IOException elasticsearch 所产生的异常
*/
public
BulkResponse
addPerson
(
String
poolId
,
List
<
Person
>
personPool
)
throws
IOException
{
BulkRequest
bulkRequest
=
new
BulkRequest
(
poolId
);
...
...
@@ -196,6 +211,10 @@ public class PersonService {
/**
* 删除人员
* @param poolId 特征池Id
* @param personId 人员Id,对应数据库personUnid
* @return 删除结果
* @throws IOException elasticsearch 所产生的异常
*/
public
BulkByScrollResponse
deletePerson
(
String
poolId
,
String
personId
)
throws
IOException
{
DeleteByQueryRequest
deleteByQueryRequest
=
new
DeleteByQueryRequest
(
poolId
)
...
...
src/main/java/com/viontech/match/service/PoolService.java
View file @
a1c53cf
...
...
@@ -36,7 +36,7 @@ import java.util.Map;
* .
*
* @author 谢明辉
* @
date 2020/11/27
* @
version 0.0.1
*/
@Service
@Slf4j
...
...
@@ -50,6 +50,11 @@ public class PoolService {
/**
* 添加特征池
*
* @param requestVo rid,poolId,personPool
*
* @return ResponseVo
* @throws Exception --
*/
public
ResponseVo
createPool
(
RequestVo
requestVo
)
throws
Exception
{
String
rid
=
requestVo
.
getRid
();
...
...
@@ -87,6 +92,11 @@ public class PoolService {
/**
* 删除特征池
*
* @param requestVo rid,flushPool,poolId,personIds,
*
* @return ResponseVo
* @throws Exception --
*/
public
ResponseVo
deletePool
(
RequestVo
requestVo
)
throws
Exception
{
String
rid
=
requestVo
.
getRid
();
...
...
@@ -118,6 +128,11 @@ public class PoolService {
/**
* 修改特征池(添加人员)
*
* @param requestVo rid,poolId,personPool,updateType
*
* @return ResponseVo
* @throws Exception --
*/
public
ResponseVo
modifyPool
(
RequestVo
requestVo
)
throws
Exception
{
String
rid
=
requestVo
.
getRid
();
...
...
@@ -144,6 +159,9 @@ public class PoolService {
/**
* 查询特征池信息
* @param requestVo rid,listAll,poolId
* @return ResponseVo
* @throws Exception --
*/
public
ResponseVo
queryPool
(
RequestVo
requestVo
)
throws
Exception
{
String
rid
=
requestVo
.
getRid
();
...
...
src/main/java/com/viontech/match/util/Utils.java
View file @
a1c53cf
...
...
@@ -8,7 +8,7 @@ import java.util.Arrays;
* .
*
* @author 谢明辉
* @
date 2020/11/23
* @
version 0.0.1
*/
@Slf4j
@SuppressWarnings
(
"ALL"
)
...
...
src/test/java/com/viontech/match/Test0.java
View file @
a1c53cf
...
...
@@ -7,7 +7,6 @@ import org.elasticsearch.client.Request;
import
org.elasticsearch.client.Response
;
import
org.elasticsearch.client.RestClient
;
import
org.elasticsearch.client.RestHighLevelClient
;
import
org.json.JSONException
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
...
...
@@ -38,7 +37,7 @@ public class Test0 {
@Test
public
void
ttt
()
throws
IOException
,
JSONException
{
public
void
ttt
()
throws
IOException
{
LinkedList
<
PoolInfo
>
poolInfos
=
new
LinkedList
<>();
RestClient
lowLevelClient
=
client
.
getLowLevelClient
();
...
...
src/test/java/com/viontech/match/util/UtilsTest.java
deleted
100644 → 0
View file @
6a0f781
package
com
.
viontech
.
match
.
util
;
import
com.viontech.keliu.utils.JsonUtil
;
import
org.json.JSONArray
;
import
org.json.JSONObject
;
import
org.junit.jupiter.api.Test
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* .
*
* @author 谢明辉
* @date 2021/4/6
*/
class
UtilsTest
{
@Test
void
transferBodyFeature
()
throws
Exception
{
List
<
String
>
strings
=
Files
.
readAllLines
(
Paths
.
get
(
"C:\\Users\\vion\\Desktop\\body.feature"
));
String
s
=
strings
.
get
(
0
);
JSONObject
jsonObject
=
JsonUtil
.
toObject
(
s
);
JSONArray
datas
=
jsonObject
.
getJSONArray
(
"datas"
);
JSONObject
obj
=
datas
.
getJSONObject
(
0
);
JSONArray
data
=
obj
.
getJSONArray
(
"data"
);
List
<
Object
>
objects
=
data
.
toList
();
Double
[]
feature
=
objects
.
toArray
(
new
Double
[]{});
Double
[]
doubles
=
Utils
.
transferBodyFeature
(
feature
);
System
.
out
.
println
(
Arrays
.
toString
(
doubles
));
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment