瀏覽代碼

fixed es search

zero 1 年之前
父節點
當前提交
4d32a1f157

+ 1 - 0
src/main/java/com/example/xiaoshiweixinback/business/exception/ExceptionEnum.java

@@ -15,6 +15,7 @@ public enum ExceptionEnum {
     CODE_WRONG("10002","验证码错误"),
     CODE_WRONG("10002","验证码错误"),
     INIT_GENERICITY_BEAN_ERROR("10003","泛型实例化异常"),
     INIT_GENERICITY_BEAN_ERROR("10003","泛型实例化异常"),
     THE_PHONE_CANNOT_BE_EXIST("10004","手机号已存在"),
     THE_PHONE_CANNOT_BE_EXIST("10004","手机号已存在"),
+    THE_LOG_OUT("10004","未登录"),
     THE_CODE_IS_NOT_NULL("10006","验证码不能为空");
     THE_CODE_IS_NOT_NULL("10006","验证码不能为空");
 
 
     private String code;// 异常代码
     private String code;// 异常代码

+ 6 - 1
src/main/java/com/example/xiaoshiweixinback/controller/LoginController.java

@@ -79,7 +79,12 @@ public class LoginController {
     @PostMapping("/selectPerson")
     @PostMapping("/selectPerson")
     @Operation(summary = "查询个人信息")
     @Operation(summary = "查询个人信息")
     public Response selectPerson(@RequestBody PersonIdDTO vo) throws Exception {
     public Response selectPerson(@RequestBody PersonIdDTO vo) throws Exception {
-        PersonVO personVO = loginService.selectPerson(vo);
+        PersonVO personVO = null;
+        try {
+            personVO = loginService.selectPerson(vo);
+        } catch (Exception e) {
+            return Response.unLogin(e.getMessage());
+        }
         return Response.success(personVO);
         return Response.success(personVO);
     }
     }
 
 

+ 9 - 0
src/main/java/com/example/xiaoshiweixinback/entity/dto/esPicture/EsPatentSearchDTO.java

@@ -0,0 +1,9 @@
+package com.example.xiaoshiweixinback.entity.dto.esPicture;
+
+import lombok.Data;
+
+@Data
+public class EsPatentSearchDTO {
+
+    private String key;
+}

+ 9 - 0
src/main/java/com/example/xiaoshiweixinback/entity/dto/esPicture/EsPictureNoDTO.java

@@ -0,0 +1,9 @@
+package com.example.xiaoshiweixinback.entity.dto.esPicture;
+
+import lombok.Data;
+
+@Data
+public class EsPictureNoDTO {
+
+    private String appNo;
+}

+ 13 - 0
src/main/java/com/example/xiaoshiweixinback/entity/dto/esPicture/EsPictureVectorDTO.java

@@ -0,0 +1,13 @@
+package com.example.xiaoshiweixinback.entity.dto.esPicture;
+
+import lombok.Data;
+
+import java.io.File;
+
+@Data
+public class EsPictureVectorDTO {
+
+    private File file;
+
+
+}

+ 13 - 0
src/main/java/com/example/xiaoshiweixinback/entity/vo/esPicture/EsPictureNoVo.java

@@ -0,0 +1,13 @@
+package com.example.xiaoshiweixinback.entity.vo.esPicture;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class EsPictureNoVo {
+
+    private String guid;
+
+    private Integer imageIndex;
+}

+ 24 - 0
src/main/java/com/example/xiaoshiweixinback/entity/vo/esPicture/EsPictureVectorVo.java

@@ -0,0 +1,24 @@
+package com.example.xiaoshiweixinback.entity.vo.esPicture;
+
+import com.example.xiaoshiweixinback.domain.es.PatentPerson;
+import com.example.xiaoshiweixinback.domain.es.Text;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class EsPictureVectorVo {
+
+    private String appNo;
+
+    private List<PatentPerson> rightHolder;
+
+    private Date publicDate;
+
+    private List<Text> title;
+
+    private Integer imageIndex;
+
+    private String guid;
+}

+ 14 - 9
src/main/java/com/example/xiaoshiweixinback/service/LoginService.java

@@ -25,6 +25,7 @@ import com.example.xiaoshiweixinback.mapper.PersonMapper;
 import com.example.xiaoshiweixinback.okhttp.ResponseManager;
 import com.example.xiaoshiweixinback.okhttp.ResponseManager;
 import com.example.xiaoshiweixinback.service.common.SmsService;
 import com.example.xiaoshiweixinback.service.common.SmsService;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -119,7 +120,7 @@ public class LoginService {
             BeanUtil.copy(person, loginVO);
             BeanUtil.copy(person, loginVO);
         }
         }
         loginVO.setToken(this.getToken());
         loginVO.setToken(this.getToken());
-        redisService.set(AppCacheKeyUtil.getUserIdToken(person.getId()), loginVO.getToken());
+        redisService.set(AppCacheKeyUtil.getTokenUserInfo(loginVO.getToken()), loginVO);
         LogHelper.log("登陆结束");
         LogHelper.log("登陆结束");
         return loginVO;
         return loginVO;
     }
     }
@@ -180,14 +181,14 @@ public class LoginService {
                     }
                     }
                     person.setCreateTime(new Date());
                     person.setCreateTime(new Date());
                     person.insert();
                     person.insert();
-
+                    wxVO.setId(person.getId());
                     wxVO.setIfFirst(true);
                     wxVO.setIfFirst(true);
                 }
                 }
                 wxVO.setPhoneNum(phoneNumber);
                 wxVO.setPhoneNum(phoneNumber);
             }
             }
             wxVO.setToken(this.getToken());
             wxVO.setToken(this.getToken());
             wxVO.setOpenId(jscode2SessionWo.getOpenid());
             wxVO.setOpenId(jscode2SessionWo.getOpenid());
-            redisService.set(AppCacheKeyUtil.getUserIdToken(wxVO.getId()), wxVO.getToken());
+            redisService.set(AppCacheKeyUtil.getTokenUserInfo(wxVO.getToken()), wxVO);
         }
         }
         return wxVO;
         return wxVO;
     }
     }
@@ -252,6 +253,14 @@ public class LoginService {
      * @return
      * @return
      */
      */
     public PersonVO selectPerson(PersonIdDTO vo) {
     public PersonVO selectPerson(PersonIdDTO vo) {
+        String token = LoginUtils.getToken();
+        if (ToolUtil.isEmpty(token)) {
+            throw new BusinessException(ExceptionEnum.THE_LOG_OUT);
+        }
+        Object obj = redisService.get(AppCacheKeyUtil.getTokenUserInfo(token));
+        if (ToolUtil.isEmpty(obj)) {
+            throw new BusinessException(ExceptionEnum.THE_LOG_OUT);
+        }
         Person person = personMapper.selectById(vo.getId());
         Person person = personMapper.selectById(vo.getId());
         PersonVO personVO = new PersonVO();
         PersonVO personVO = new PersonVO();
         BeanUtil.copy(person, personVO);
         BeanUtil.copy(person, personVO);
@@ -288,12 +297,8 @@ public class LoginService {
      * @author: gck
      * @author: gck
      */
      */
     public boolean logout(PersonIdDTO dto) {
     public boolean logout(PersonIdDTO dto) {
-        //获取token
-        Object obj = redisService.get(AppCacheKeyUtil.getUserIdToken(dto.getId()));
-        if (ToolUtil.isNotEmpty(obj)) {
-//            redisService.delete(AppCacheKeyUtil.getTokenUserInfo(obj.toString()));
-            redisService.delete(AppCacheKeyUtil.getUserIdToken(dto.getId()));
-        }
+        String token = LoginUtils.getToken();
+        redisService.delete(AppCacheKeyUtil.getTokenUserInfo(token));
         return true;
         return true;
     }
     }
 
 

+ 55 - 14
src/main/java/com/example/xiaoshiweixinback/service/common/EsDenseVectorService.java

@@ -9,10 +9,18 @@ import co.elastic.clients.elasticsearch.core.SearchRequest;
 import co.elastic.clients.elasticsearch.core.SearchResponse;
 import co.elastic.clients.elasticsearch.core.SearchResponse;
 import co.elastic.clients.elasticsearch.core.search.Hit;
 import co.elastic.clients.elasticsearch.core.search.Hit;
 import co.elastic.clients.json.JsonData;
 import co.elastic.clients.json.JsonData;
+import com.example.xiaoshiweixinback.business.utils.BeanUtil;
+import com.example.xiaoshiweixinback.domain.es.PatentVector;
+import com.example.xiaoshiweixinback.entity.dto.esPicture.EsPictureNoDTO;
+import com.example.xiaoshiweixinback.entity.vo.esPicture.EsPictureNoVo;
+import com.example.xiaoshiweixinback.entity.vo.esPicture.EsPictureVectorVo;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.io.File;
 import java.io.IOException;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
@@ -23,29 +31,62 @@ public class EsDenseVectorService {
 
 
     private final ElasticsearchClient client;
     private final ElasticsearchClient client;
 
 
-    public List<Integer> getTenderList(List<Float> imageList) throws IOException {
-        List<Integer> list = new ArrayList<>();
+    @Autowired
+    private GetVectorService getVectorService;
+
+
+
+    public List<EsPictureVectorVo> getPatentVectorSort(File file, String description) throws IOException {
+        List<Float> imageList = new ArrayList<>();
+        List<String> stringList = new ArrayList<>();
+        if (file != null) {
+            stringList = getVectorService.getVectorByFile(file);
+        } else if (StringUtils.isNotEmpty(description)) {
+            stringList = getVectorService.getVectorByText(description);
+        }
+        stringList.forEach(item -> {
+            Float a = Float.parseFloat(item);
+            imageList.add(a);
+        });
+
+        List<EsPictureVectorVo> list = new ArrayList<>();
         SearchRequest.Builder builder = new SearchRequest.Builder();
         SearchRequest.Builder builder = new SearchRequest.Builder();
         //设置查询索引
         //设置查询索引
-        builder.index("wxpatent");
-
+        builder.index("patent_vector");
         String source = "cosineSimilarity(params.queryVector, 'my_vector') + 1.0";
         String source = "cosineSimilarity(params.queryVector, 'my_vector') + 1.0";
         InlineScript inlineScript = InlineScript.of(i -> i.lang("painless").params("queryVector", JsonData.of(imageList)).source(source));
         InlineScript inlineScript = InlineScript.of(i -> i.lang("painless").params("queryVector", JsonData.of(imageList)).source(source));
         Script script = Script.of(i -> i.inline(inlineScript));
         Script script = Script.of(i -> i.inline(inlineScript));
         Query query = QueryBuilders.scriptScore(i -> i.script(script).query(org.springframework.data.elasticsearch.client.elc.QueryBuilders.matchAllQueryAsQuery()));
         Query query = QueryBuilders.scriptScore(i -> i.script(script).query(org.springframework.data.elasticsearch.client.elc.QueryBuilders.matchAllQueryAsQuery()));
         builder.query(query);
         builder.query(query);
-        builder.size(10);
-        SearchResponse<Integer> response = client.search(builder.build(), Integer.class);
-        List<Hit<Integer>> hits = response.hits().hits();
-        double scoreThreshold = 1.95;
-        for (Hit<Integer> hit : hits) {
-            Double score = hit.score();
-            Integer tender = hit.source();
-            if (score > scoreThreshold) {
-                list.add(tender);
-            }
+        builder.size(100);
+        SearchResponse<PatentVector> response = client.search(builder.build(), PatentVector.class);
+        List<Hit<PatentVector>> hits = response.hits().hits();
+        for (Hit<PatentVector> hit : hits) {
+            PatentVector vector = hit.source();
+            EsPictureVectorVo vectorVo = new EsPictureVectorVo();
+            BeanUtil.copy(vector,vectorVo);
+            list.add(vectorVo);
         }
         }
         return list;
         return list;
     }
     }
 
 
+    public List<EsPictureNoVo> getPictureByNo(EsPictureNoDTO noDTO) throws IOException {
+        List<EsPictureNoVo> pictureNoVos = new ArrayList<>();
+        SearchRequest.Builder builder = new SearchRequest.Builder();
+        //设置查询索引
+        builder.index("patent_vector");
+        Query query = QueryBuilders.term(i -> i.field("app_no.keyword").value(noDTO.getAppNo()));
+        builder.query(query);
+        builder.size(100);
+        SearchResponse<PatentVector> response = client.search(builder.build(), PatentVector.class);
+        List<Hit<PatentVector>> hits = response.hits().hits();
+        for (Hit<PatentVector> hit : hits) {
+            PatentVector vector = hit.source();
+            EsPictureNoVo noVo = new EsPictureNoVo();
+            noVo.setGuid(vector.getGuid());
+            noVo.setImageIndex(vector.getImageIndex());
+            pictureNoVos.add(noVo);
+        }
+        return pictureNoVos;
+    }
 }
 }

+ 17 - 7
src/main/java/com/example/xiaoshiweixinback/service/common/GetVectorService.java

@@ -23,13 +23,17 @@ import static cn.hutool.core.io.FileUtil.getMimeType;
 @Slf4j
 @Slf4j
 @Service
 @Service
 public class GetVectorService {
 public class GetVectorService {
+
+    @Value("${VectorUrl}")
+    private String vectorUrl;
+
     /**
     /**
-     * 调用文件系统上传文件接口
+     * 根据图片获取图片特征向量
      *
      *
-     * @param multipartFiles 文件
+     * @param file
+     * @return
+     * @throws IOException
      */
      */
-    @Value("${VectorUrl}")
-    private String vectorUrl;
     public List<String> getVectorByFile(File file) throws IOException {
     public List<String> getVectorByFile(File file) throws IOException {
 
 
         MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder()
         MultipartBody.Builder multipartBodyBuilder = new MultipartBody.Builder()
@@ -57,13 +61,19 @@ public class GetVectorService {
         return stringList;
         return stringList;
     }
     }
 
 
-
-    public List<String> getVectorByText(String key) throws IOException {
+    /**
+     * 根据图片描述获取图片特征向量
+     *
+     * @param description
+     * @return
+     * @throws IOException
+     */
+    public List<String> getVectorByText(String description) throws IOException {
 
 
         OkHttpClient okHttpClient = new OkHttpClient();
         OkHttpClient okHttpClient = new OkHttpClient();
 
 
         Request request = new Request.Builder()
         Request request = new Request.Builder()
-                .url(vectorUrl + "/getVectorByText?keyword="+key)
+                .url(vectorUrl + "/getVectorByText?keyword=" + description)
                 .get()
                 .get()
                 .build();
                 .build();
         Response response = null;
         Response response = null;

+ 4 - 5
src/main/java/com/example/xiaoshiweixinback/service/importPatent/GetPatentPictureFromWebService.java

@@ -41,11 +41,10 @@ public class GetPatentPictureFromWebService {
                 patentVector.setRightHolder(patent.getRightHolder());
                 patentVector.setRightHolder(patent.getRightHolder());
                 patentVector.setImageIndex(0);
                 patentVector.setImageIndex(0);
                 List<String> stringList = getVectorService.getVectorByFile(file);
                 List<String> stringList = getVectorService.getVectorByFile(file);
-                List<Float> floats =new ArrayList<>();
-                stringList.forEach(item->{
-                    Float a =Float.parseFloat(item);
-                  floats.add(a);
-
+                List<Float> floats = new ArrayList<>();
+                stringList.forEach(item -> {
+                    Float a = Float.parseFloat(item);
+                    floats.add(a);
                 });
                 });
                 org.apache.commons.io.FileUtils.deleteQuietly(file);
                 org.apache.commons.io.FileUtils.deleteQuietly(file);
                 patentVector.setMyVector(floats);
                 patentVector.setMyVector(floats);

+ 8 - 526
src/test/java/com/example/xiaoshiweixinback/XiaoshiWeixinbackApplicationTests.java

@@ -1,14 +1,18 @@
 package com.example.xiaoshiweixinback;
 package com.example.xiaoshiweixinback;
 
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
+import com.example.xiaoshiweixinback.domain.es.PatentVector;
 import com.example.xiaoshiweixinback.entity.dto.person.PersonPhoneDTO;
 import com.example.xiaoshiweixinback.entity.dto.person.PersonPhoneDTO;
 import com.example.xiaoshiweixinback.entity.dto.person.SendCodeDTO;
 import com.example.xiaoshiweixinback.entity.dto.person.SendCodeDTO;
+import com.example.xiaoshiweixinback.entity.vo.esPicture.EsPictureVectorVo;
 import com.example.xiaoshiweixinback.service.LoginService;
 import com.example.xiaoshiweixinback.service.LoginService;
+import com.example.xiaoshiweixinback.service.common.EsDenseVectorService;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.context.annotation.Lazy;
 
 
+import java.io.IOException;
 import java.util.Arrays;
 import java.util.Arrays;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -18,537 +22,15 @@ class XiaoshiWeixinbackApplicationTests {
 
 
     @Autowired
     @Autowired
     @Lazy
     @Lazy
-    private LoginService loginService;
+    private EsDenseVectorService denseVectorService;
 
 
     @Test
     @Test
     void contextLoads() {
     void contextLoads() {
     }
     }
 
 
     @Test
     @Test
-    public void test() {
-//        PersonPhoneDTO dto = new PersonPhoneDTO();
-//        dto.setPhoneNum("123456789");
-//        Map<String, String> map = loginService.verifyCode(dto);
-//        System.out.println(map);
-//        SendCodeDTO dto = new SendCodeDTO();
-//        dto.setPhoneNum("15705220533");
-//        boolean send = loginService.send(dto);
-//        System.out.println(send);
-
-        String s = "\"" +
-                "  -0.43104565143585205,\n" +
-                "  -0.5174650549888611,\n" +
-                "  -0.2149243950843811,\n" +
-                "  -0.41307300329208374,\n" +
-                "  0.33717718720436096,\n" +
-                "  -0.4122418165206909,\n" +
-                "  -0.10073207318782806,\n" +
-                "  0.8990738391876221,\n" +
-                "  0.2938253879547119,\n" +
-                "  0.15962588787078857,\n" +
-                "  0.07490569353103638,\n" +
-                "  0.015168831683695316,\n" +
-                "  0.7117551565170288,\n" +
-                "  0.20649850368499756,\n" +
-                "  0.00492202490568161,\n" +
-                "  -0.3063884675502777,\n" +
-                "  -0.09571979939937592,\n" +
-                "  -0.06397294998168945,\n" +
-                "  -0.2555930018424988,\n" +
-                "  0.3156653046607971,\n" +
-                "  -0.6173087954521179,\n" +
-                "  -0.09985126554965973,\n" +
-                "  0.2674689292907715,\n" +
-                "  -0.0568261593580246,\n" +
-                "  -0.09287881851196289,\n" +
-                "  -0.10219928622245789,\n" +
-                "  -0.04920598864555359,\n" +
-                "  -0.3122442364692688,\n" +
-                "  -0.058546021580696106,\n" +
-                "  0.05023355782032013,\n" +
-                "  -0.2052859365940094,\n" +
-                "  0.03210242837667465,\n" +
-                "  -0.01743297278881073,\n" +
-                "  0.4844779372215271,\n" +
-                "  -0.621017575263977,\n" +
-                "  -0.12284699082374573,\n" +
-                "  0.3427127003669739,\n" +
-                "  -0.03558463230729103,\n" +
-                "  -0.06305825710296631,\n" +
-                "  -0.9444432854652405,\n" +
-                "  -0.16140100359916687,\n" +
-                "  -0.060797180980443954,\n" +
-                "  -0.05767505615949631,\n" +
-                "  0.0010891705751419067,\n" +
-                "  -0.23530007898807526,\n" +
-                "  -0.2653476595878601,\n" +
-                "  -0.4238918721675873,\n" +
-                "  0.0334915816783905,\n" +
-                "  -0.42220649123191833,\n" +
-                "  -0.1422613263130188,\n" +
-                "  0.11282847076654434,\n" +
-                "  -0.1965130716562271,\n" +
-                "  -0.24236483871936798,\n" +
-                "  -0.15939763188362122,\n" +
-                "  0.004429027438163757,\n" +
-                "  -0.04000389575958252,\n" +
-                "  0.18624305725097656,\n" +
-                "  -0.20168577134609222,\n" +
-                "  0.08920460939407349,\n" +
-                "  0.3156498670578003,\n" +
-                "  0.4573097229003906,\n" +
-                "  -0.392400860786438,\n" +
-                "  0.08116964250802994,\n" +
-                "  -0.18996715545654297,\n" +
-                "  -0.01169702410697937,\n" +
-                "  -0.16127005219459534,\n" +
-                "  0.7318961024284363,\n" +
-                "  0.16215404868125916,\n" +
-                "  -0.06464187800884247,\n" +
-                "  0.12966163456439972,\n" +
-                "  -0.6570093631744385,\n" +
-                "  -0.23499099910259247,\n" +
-                "  -0.07537676393985748,\n" +
-                "  0.38073819875717163,\n" +
-                "  0.2937473654747009,\n" +
-                "  -0.1984231173992157,\n" +
-                "  0.10365790128707886,\n" +
-                "  -0.29997140169143677,\n" +
-                "  -0.09984797984361649,\n" +
-                "  0.00755426287651062,\n" +
-                "  0.09685152024030685,\n" +
-                "  -0.1377292424440384,\n" +
-                "  0.021001748740673065,\n" +
-                "  0.6029696464538574,\n" +
-                "  0.05080830305814743,\n" +
-                "  -0.09060272574424744,\n" +
-                "  0.40772029757499695,\n" +
-                "  -0.09505730122327805,\n" +
-                "  -0.05455566942691803,\n" +
-                "  -0.29869967699050903,\n" +
-                "  -0.054645538330078125,\n" +
-                "  -0.2818771302700043,\n" +
-                "  -7.972299575805664,\n" +
-                "  1.594887137413025,\n" +
-                "  -0.27918753027915955,\n" +
-                "  0.1012020856142044,\n" +
-                "  0.3057509660720825,\n" +
-                "  0.014297470450401306,\n" +
-                "  0.2715816795825958,\n" +
-                "  0.2381725013256073,\n" +
-                "  0.06819632649421692,\n" +
-                "  0.0489702969789505,\n" +
-                "  -0.1641303300857544,\n" +
-                "  -0.1084078699350357,\n" +
-                "  0.1188381016254425,\n" +
-                "  -0.29626673460006714,\n" +
-                "  -3.4667415618896484,\n" +
-                "  0.41730180382728577,\n" +
-                "  0.39382749795913696,\n" +
-                "  -0.0679512470960617,\n" +
-                "  0.19178995490074158,\n" +
-                "  -0.6033183932304382,\n" +
-                "  -0.052560463547706604,\n" +
-                "  0.4198887348175049,\n" +
-                "  -0.02734776958823204,\n" +
-                "  -0.48307502269744873,\n" +
-                "  0.07171829044818878,\n" +
-                "  -0.4070138931274414,\n" +
-                "  -0.11798611283302307,\n" +
-                "  0.27966728806495667,\n" +
-                "  -0.5075569152832031,\n" +
-                "  0.6828979849815369,\n" +
-                "  -0.1324898600578308,\n" +
-                "  0.3194037079811096,\n" +
-                "  0.09830759465694427,\n" +
-                "  -0.08246639370918274,\n" +
-                "  -0.0783839225769043,\n" +
-                "  -0.07903331518173218,\n" +
-                "  0.16915661096572876,\n" +
-                "  0.21139909327030182,\n" +
-                "  0.19305340945720673,\n" +
-                "  0.5255670547485352,\n" +
-                "  -0.15476123988628387,\n" +
-                "  0.9363498687744141,\n" +
-                "  0.05482716113328934,\n" +
-                "  -0.2774311900138855,\n" +
-                "  -0.34266209602355957,\n" +
-                "  -0.42955800890922546,\n" +
-                "  -0.6351125240325928,\n" +
-                "  -0.4563421308994293,\n" +
-                "  0.20771488547325134,\n" +
-                "  -0.08270931243896484,\n" +
-                "  -0.1300777792930603,\n" +
-                "  0.09531296789646149,\n" +
-                "  -0.72136390209198,\n" +
-                "  0.3517090976238251,\n" +
-                "  0.03142721951007843,\n" +
-                "  0.004673510789871216,\n" +
-                "  -0.40440210700035095,\n" +
-                "  0.09886397421360016,\n" +
-                "  -0.09198453277349472,\n" +
-                "  0.37061771750450134,\n" +
-                "  -0.07958219200372696,\n" +
-                "  -0.21704158186912537,\n" +
-                "  -0.1832444816827774,\n" +
-                "  0.17178627848625183,\n" +
-                "  -0.3310597538948059,\n" +
-                "  -0.1795501410961151,\n" +
-                "  0.21323290467262268,\n" +
-                "  -0.0770866647362709,\n" +
-                "  -0.00037901103496551514,\n" +
-                "  0.0660974308848381,\n" +
-                "  0.10238930583000183,\n" +
-                "  -0.06077095866203308,\n" +
-                "  -0.10594264417886734,\n" +
-                "  -0.18683038651943207,\n" +
-                "  0.20321524143218994,\n" +
-                "  0.36864036321640015,\n" +
-                "  -0.16162171959877014,\n" +
-                "  -0.12744686007499695,\n" +
-                "  -0.42373770475387573,\n" +
-                "  0.2272757738828659,\n" +
-                "  -0.17044681310653687,\n" +
-                "  0.08889009058475494,\n" +
-                "  -0.016556911170482635,\n" +
-                "  -0.326185941696167,\n" +
-                "  -0.06728824973106384,\n" +
-                "  -0.2064031958580017,\n" +
-                "  0.06609776616096497,\n" +
-                "  0.1906692534685135,\n" +
-                "  -0.5341193675994873,\n" +
-                "  -0.07126845419406891,\n" +
-                "  -0.2783043682575226,\n" +
-                "  -0.10398821532726288,\n" +
-                "  -0.1723007708787918,\n" +
-                "  -0.25305402278900146,\n" +
-                "  0.40613800287246704,\n" +
-                "  0.0732945054769516,\n" +
-                "  -0.2203199863433838,\n" +
-                "  0.14576727151870728,\n" +
-                "  0.15503567457199097,\n" +
-                "  -0.009210973978042603,\n" +
-                "  -0.20183685421943665,\n" +
-                "  0.3028118312358856,\n" +
-                "  -0.3066505193710327,\n" +
-                "  0.3887465000152588,\n" +
-                "  0.19712799787521362,\n" +
-                "  0.36405104398727417,\n" +
-                "  -0.03938812389969826,\n" +
-                "  0.6184861063957214,\n" +
-                "  0.011722996830940247,\n" +
-                "  0.13787129521369934,\n" +
-                "  -0.0960576981306076,\n" +
-                "  -0.4716346263885498,\n" +
-                "  -0.45463263988494873,\n" +
-                "  -0.2159414291381836,\n" +
-                "  -0.09910790622234344,\n" +
-                "  -0.13406133651733398,\n" +
-                "  -0.3185977637767792,\n" +
-                "  0.13862985372543335,\n" +
-                "  0.3938766419887543,\n" +
-                "  -0.07366828620433807,\n" +
-                "  0.08985570818185806,\n" +
-                "  0.22664476931095123,\n" +
-                "  -0.08873455226421356,\n" +
-                "  -0.17400918900966644,\n" +
-                "  0.053254880011081696,\n" +
-                "  0.11168800294399261,\n" +
-                "  -0.5366578102111816,\n" +
-                "  0.10118700563907623,\n" +
-                "  0.1827230304479599,\n" +
-                "  -0.4744732677936554,\n" +
-                "  0.20448333024978638,\n" +
-                "  -0.026072606444358826,\n" +
-                "  -0.34367719292640686,\n" +
-                "  0.4178789556026459,\n" +
-                "  -0.1383686661720276,\n" +
-                "  -0.06868205219507217,\n" +
-                "  0.04774346947669983,\n" +
-                "  -0.20923110842704773,\n" +
-                "  0.2263452261686325,\n" +
-                "  0.21730774641036987,\n" +
-                "  0.0010698586702346802,\n" +
-                "  0.05457471311092377,\n" +
-                "  0.40554380416870117,\n" +
-                "  0.5056960582733154,\n" +
-                "  -0.027282580733299255,\n" +
-                "  -0.5211331248283386,\n" +
-                "  -0.39231207966804504,\n" +
-                "  -0.39876946806907654,\n" +
-                "  0.10888379067182541,\n" +
-                "  -0.0755651593208313,\n" +
-                "  0.0507970005273819,\n" +
-                "  0.04452098160982132,\n" +
-                "  -0.41173410415649414,\n" +
-                "  -0.0418677031993866,\n" +
-                "  -0.003041345626115799,\n" +
-                "  0.1826772391796112,\n" +
-                "  0.1450490951538086,\n" +
-                "  0.3830234408378601,\n" +
-                "  -0.003193587064743042,\n" +
-                "  -0.2726131081581116,\n" +
-                "  0.3601018786430359,\n" +
-                "  0.5272528529167175,\n" +
-                "  -0.07475632429122925,\n" +
-                "  0.18786969780921936,\n" +
-                "  0.0028927549719810486,\n" +
-                "  -0.035576231777668,\n" +
-                "  0.7334576845169067,\n" +
-                "  0.02747926115989685,\n" +
-                "  0.13495147228240967,\n" +
-                "  0.16010069847106934,\n" +
-                "  0.19516289234161377,\n" +
-                "  0.4050833582878113,\n" +
-                "  -0.36571741104125977,\n" +
-                "  -0.04826915264129639,\n" +
-                "  0.12123829126358032,\n" +
-                "  -0.29513272643089294,\n" +
-                "  -0.10261483490467072,\n" +
-                "  -0.10557376593351364,\n" +
-                "  0.26259905099868774,\n" +
-                "  0.33260688185691833,\n" +
-                "  -0.12890076637268066,\n" +
-                "  0.3525870740413666,\n" +
-                "  -0.0271192267537117,\n" +
-                "  -0.032377056777477264,\n" +
-                "  0.14405684173107147,\n" +
-                "  -0.232418492436409,\n" +
-                "  -0.1066998541355133,\n" +
-                "  0.08321140706539154,\n" +
-                "  0.4352346658706665,\n" +
-                "  -0.288862407207489,\n" +
-                "  -0.6276355385780334,\n" +
-                "  -0.06491145491600037,\n" +
-                "  -0.20944485068321228,\n" +
-                "  0.12362077832221985,\n" +
-                "  0.47717827558517456,\n" +
-                "  -0.012167178094387054,\n" +
-                "  0.06673938035964966,\n" +
-                "  0.17786787450313568,\n" +
-                "  0.7896139621734619,\n" +
-                "  0.03647494316101074,\n" +
-                "  -0.23887138068675995,\n" +
-                "  0.289887934923172,\n" +
-                "  -0.11306026577949524,\n" +
-                "  0.09389196336269379,\n" +
-                "  -0.3060562014579773,\n" +
-                "  0.013977117836475372,\n" +
-                "  -0.15545639395713806,\n" +
-                "  0.06666401028633118,\n" +
-                "  0.3026837706565857,\n" +
-                "  -0.3160085380077362,\n" +
-                "  -0.04955947399139404,\n" +
-                "  -0.0007518231868743896,\n" +
-                "  0.21104300022125244,\n" +
-                "  -0.5660488605499268,\n" +
-                "  -0.27207762002944946,\n" +
-                "  0.05650728940963745,\n" +
-                "  0.19105133414268494,\n" +
-                "  0.32923591136932373,\n" +
-                "  0.018958397209644318,\n" +
-                "  0.16541166603565216,\n" +
-                "  0.9371109008789062,\n" +
-                "  -0.17414633929729462,\n" +
-                "  -0.19418443739414215,\n" +
-                "  0.30502375960350037,\n" +
-                "  0.6452566981315613,\n" +
-                "  -0.4946202039718628,\n" +
-                "  0.12415440380573273,\n" +
-                "  -0.2740612328052521,\n" +
-                "  0.24090537428855896,\n" +
-                "  1.2112586498260498,\n" +
-                "  -0.2004469931125641,\n" +
-                "  0.19456474483013153,\n" +
-                "  -0.07129184901714325,\n" +
-                "  -0.2652958929538727,\n" +
-                "  -0.4771229922771454,\n" +
-                "  0.06906124949455261,\n" +
-                "  -0.19536174833774567,\n" +
-                "  0.42340266704559326,\n" +
-                "  0.3490642309188843,\n" +
-                "  0.1533818542957306,\n" +
-                "  -0.002619698643684387,\n" +
-                "  -0.7674639225006104,\n" +
-                "  -0.41130632162094116,\n" +
-                "  0.28423255681991577,\n" +
-                "  0.02326872944831848,\n" +
-                "  -0.0033740997314453125,\n" +
-                "  -0.03309548646211624,\n" +
-                "  0.5123624801635742,\n" +
-                "  -0.3206082582473755,\n" +
-                "  -0.017632998526096344,\n" +
-                "  0.507940948009491,\n" +
-                "  0.06964299082756042,\n" +
-                "  0.1992568075656891,\n" +
-                "  0.08371978998184204,\n" +
-                "  -0.2124290019273758,\n" +
-                "  -0.05792833864688873,\n" +
-                "  0.3172972500324249,\n" +
-                "  0.10649973154067993,\n" +
-                "  0.2177993655204773,\n" +
-                "  -0.5670945644378662,\n" +
-                "  -0.2091679871082306,\n" +
-                "  0.27361616492271423,\n" +
-                "  -0.28316181898117065,\n" +
-                "  -0.4587651789188385,\n" +
-                "  -0.14226603507995605,\n" +
-                "  0.3579331338405609,\n" +
-                "  -0.04957467317581177,\n" +
-                "  0.3441537022590637,\n" +
-                "  -0.4265733063220978,\n" +
-                "  0.3376060426235199,\n" +
-                "  -0.18330684304237366,\n" +
-                "  0.24171751737594604,\n" +
-                "  -0.7516365051269531,\n" +
-                "  -0.0953027606010437,\n" +
-                "  0.06649346649646759,\n" +
-                "  -0.023136164993047714,\n" +
-                "  -0.0029480531811714172,\n" +
-                "  -0.1198638528585434,\n" +
-                "  -0.08051956444978714,\n" +
-                "  -0.40153074264526367,\n" +
-                "  0.0019767582416534424,\n" +
-                "  0.0030095279216766357,\n" +
-                "  0.2259364128112793,\n" +
-                "  0.06676347553730011,\n" +
-                "  -0.6066460013389587,\n" +
-                "  -0.1975584775209427,\n" +
-                "  -0.4331360459327698,\n" +
-                "  -0.003943219780921936,\n" +
-                "  -0.4438878893852234,\n" +
-                "  -0.4397556185722351,\n" +
-                "  -0.10185614228248596,\n" +
-                "  -0.015234231948852539,\n" +
-                "  -0.06340392678976059,\n" +
-                "  -0.23084059357643127,\n" +
-                "  -0.013163983821868896,\n" +
-                "  -0.2071400284767151,\n" +
-                "  -0.030840158462524414,\n" +
-                "  0.80415940284729,\n" +
-                "  -0.580469012260437,\n" +
-                "  0.14882954955101013,\n" +
-                "  0.24830004572868347,\n" +
-                "  -0.40925201773643494,\n" +
-                "  -0.1407734453678131,\n" +
-                "  0.23014745116233826,\n" +
-                "  -0.0823458805680275,\n" +
-                "  0.007828965783119202,\n" +
-                "  0.02996101975440979,\n" +
-                "  0.010555922985076904,\n" +
-                "  0.15066708624362946,\n" +
-                "  0.287901908159256,\n" +
-                "  0.5406299829483032,\n" +
-                "  -0.0061859264969825745,\n" +
-                "  -0.18341150879859924,\n" +
-                "  -0.37757888436317444,\n" +
-                "  0.12247267365455627,\n" +
-                "  0.3016035854816437,\n" +
-                "  0.5941266417503357,\n" +
-                "  -0.01705111563205719,\n" +
-                "  -0.7482421398162842,\n" +
-                "  0.2194576859474182,\n" +
-                "  0.2829921841621399,\n" +
-                "  0.329537957906723,\n" +
-                "  0.34207436442375183,\n" +
-                "  0.24207574129104614,\n" +
-                "  0.2152753323316574,\n" +
-                "  -0.4948556125164032,\n" +
-                "  -0.21106621623039246,\n" +
-                "  0.2197628617286682,\n" +
-                "  0.021849922835826874,\n" +
-                "  -0.15778842568397522,\n" +
-                "  0.5366860628128052,\n" +
-                "  -0.3348696231842041,\n" +
-                "  0.01650083065032959,\n" +
-                "  0.047065336257219315,\n" +
-                "  -0.4570930600166321,\n" +
-                "  -0.2960754930973053,\n" +
-                "  -1.4024643898010254,\n" +
-                "  0.1697397381067276,\n" +
-                "  -0.19636468589305878,\n" +
-                "  -0.3684859275817871,\n" +
-                "  -0.3888061046600342,\n" +
-                "  0.12527327239513397,\n" +
-                "  -0.4199543297290802,\n" +
-                "  -0.24464133381843567,\n" +
-                "  -0.20547638833522797,\n" +
-                "  -0.02873031049966812,\n" +
-                "  0.04006829857826233,\n" +
-                "  -0.013615094125270844,\n" +
-                "  -0.38151949644088745,\n" +
-                "  0.07635307312011719,\n" +
-                "  -0.2532101273536682,\n" +
-                "  -0.12779554724693298,\n" +
-                "  0.33027273416519165,\n" +
-                "  -0.15510135889053345,\n" +
-                "  -0.35100120306015015,\n" +
-                "  -0.5484926700592041,\n" +
-                "  -0.23958733677864075,\n" +
-                "  0.07633547484874725,\n" +
-                "  0.012362942099571228,\n" +
-                "  -0.25504401326179504,\n" +
-                "  -0.2392117977142334,\n" +
-                "  0.07403606176376343,\n" +
-                "  0.07280385494232178,\n" +
-                "  -0.2516927719116211,\n" +
-                "  -0.145125612616539,\n" +
-                "  0.3015434145927429,\n" +
-                "  -0.06891579926013947,\n" +
-                "  0.156633198261261,\n" +
-                "  0.04245932027697563,\n" +
-                "  -0.488684743642807,\n" +
-                "  0.290077269077301,\n" +
-                "  0.06895345449447632,\n" +
-                "  0.061262570321559906,\n" +
-                "  0.3415754735469818,\n" +
-                "  0.44531649351119995,\n" +
-                "  -0.1993744820356369,\n" +
-                "  -0.49592965841293335,\n" +
-                "  -0.229221373796463,\n" +
-                "  0.1547122597694397,\n" +
-                "  0.3082579970359802,\n" +
-                "  0.1941603720188141,\n" +
-                "  -0.07362228631973267,\n" +
-                "  -0.15126489102840424,\n" +
-                "  -0.06226333975791931,\n" +
-                "  -0.052758291363716125,\n" +
-                "  -0.09666634351015091,\n" +
-                "  0.029960323125123978,\n" +
-                "  -0.07342107594013214,\n" +
-                "  -0.028656944632530212,\n" +
-                "  -0.44580066204071045,\n" +
-                "  0.1984643042087555,\n" +
-                "  0.3391294777393341,\n" +
-                "  0.055216170847415924,\n" +
-                "  0.5317773818969727,\n" +
-                "  0.27008047699928284,\n" +
-                "  -0.20487630367279053,\n" +
-                "  0.20794649422168732,\n" +
-                "  -0.21459823846817017,\n" +
-                "  0.07720515131950378,\n" +
-                "  0.11551633477210999,\n" +
-                "  0.17852582037448883,\n" +
-                "  -0.05072091519832611,\n" +
-                "  -0.18453016877174377,\n" +
-                "  -0.20271456241607666,\n" +
-                "  0.1535874903202057,\n" +
-                "  -0.011345595121383667,\n" +
-                "  -0.024836257100105286,\n" +
-                "  0.13989995419979095,\n" +
-                "  -0.6433340311050415,\n" +
-                "  -0.2115182876586914,\n" +
-                "  0.21272718906402588,\n" +
-                "  0.4063172936439514,\n" +
-                "  0.648801863193512,\n" +
-                "  0.4203355014324188,\n" +
-                "  0.018419981002807617,\n" +
-                "  -0.3565654158592224,\n" +
-                "  -0.17074896395206451,\n" +
-                "  0.8897092342376709,\n" +
-                "  -0.09069225192070007,\n" +
-                "  -0.24005284905433655\n" + "\"";
-        List<String> list = JSON.parseArray(s, String.class);
-        System.out.println(list.size());
+    public void test() throws IOException {
+        List<EsPictureVectorVo> list = denseVectorService.getPatentVectorSort(null, "大大的原型");
+        System.out.println(list);
     }
     }
 }
 }