소스 검색

str rov model

丁云鹏 1 년 전
부모
커밋
dc9ec332cf

+ 1 - 1
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/client/ModelClient.java

@@ -18,7 +18,7 @@ public class ModelClient {
     @GrpcClient("recommend-server")
     private ModelServiceGrpc.ModelServiceBlockingStub client;
 
-    public Map<String, Double> getUserFeature(long videoId, String mid, String uid, String city, String province) {
+    public Map<String, Double> getScore(long videoId, String mid, String uid, String city, String province) {
         ScoreRequest request = ScoreRequest.newBuilder()
                 .setVideoId(videoId)
                 .setMid(mid)

+ 9 - 10
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/model/Model.java

@@ -40,16 +40,15 @@ public final class Model {
     java.lang.String[] descriptorData = {
       "\n.com/tzld/piaoquan/recommend/server/mod" +
       "el.proto\032/com/tzld/piaoquan/recommend/se" +
-      "rver/common.proto\"n\n\014ScoreRequest\022\020\n\010vid" +
+      "rver/common.proto\"Z\n\014ScoreRequest\022\020\n\010vid" +
       "eo_id\030\001 \001(\003\022\013\n\003mid\030\002 \001(\t\022\013\n\003uid\030\003 \001(\t\022\014\n" +
-      "\004city\030\004 \001(\t\022\020\n\010province\030\005 \001(\t\022\022\n\nmodel_t" +
-      "ype\030\006 \003(\t\"\200\001\n\rScoreResponse\022\027\n\006result\030\001 " +
-      "\001(\0132\007.Result\022(\n\005score\030\002 \003(\0132\031.ScoreRespo" +
-      "nse.ScoreEntry\032,\n\nScoreEntry\022\013\n\003key\030\001 \001(" +
-      "\t\022\r\n\005value\030\002 \001(\001:\0028\00126\n\014ModelService\022&\n\005" +
-      "Score\022\r.ScoreRequest\032\016.ScoreResponseB3\n," +
-      "com.tzld.piaoquan.recommend.server.gen.m" +
-      "odelP\001\210\001\001b\006proto3"
+      "\004city\030\004 \001(\t\022\020\n\010province\030\005 \001(\t\"\200\001\n\rScoreR" +
+      "esponse\022\027\n\006result\030\001 \001(\0132\007.Result\022(\n\005scor" +
+      "e\030\002 \003(\0132\031.ScoreResponse.ScoreEntry\032,\n\nSc" +
+      "oreEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\001:\0028\001" +
+      "26\n\014ModelService\022&\n\005Score\022\r.ScoreRequest" +
+      "\032\016.ScoreResponseB3\n,com.tzld.piaoquan.re" +
+      "commend.server.gen.modelP\001\210\001\001b\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -61,7 +60,7 @@ public final class Model {
     internal_static_ScoreRequest_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_ScoreRequest_descriptor,
-        new java.lang.String[] { "VideoId", "Mid", "Uid", "City", "Province", "ModelType", });
+        new java.lang.String[] { "VideoId", "Mid", "Uid", "City", "Province", });
     internal_static_ScoreResponse_descriptor =
       getDescriptor().getMessageTypes().get(1);
     internal_static_ScoreResponse_fieldAccessorTable = new

+ 0 - 195
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/model/ScoreRequest.java

@@ -20,7 +20,6 @@ private static final long serialVersionUID = 0L;
     uid_ = "";
     city_ = "";
     province_ = "";
-    modelType_ = com.google.protobuf.LazyStringArrayList.EMPTY;
   }
 
   @java.lang.Override
@@ -43,7 +42,6 @@ private static final long serialVersionUID = 0L;
     if (extensionRegistry == null) {
       throw new java.lang.NullPointerException();
     }
-    int mutable_bitField0_ = 0;
     com.google.protobuf.UnknownFieldSet.Builder unknownFields =
         com.google.protobuf.UnknownFieldSet.newBuilder();
     try {
@@ -83,15 +81,6 @@ private static final long serialVersionUID = 0L;
             province_ = s;
             break;
           }
-          case 50: {
-            java.lang.String s = input.readStringRequireUtf8();
-            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-              modelType_ = new com.google.protobuf.LazyStringArrayList();
-              mutable_bitField0_ |= 0x00000001;
-            }
-            modelType_.add(s);
-            break;
-          }
           default: {
             if (!parseUnknownField(
                 input, unknownFields, extensionRegistry, tag)) {
@@ -107,9 +96,6 @@ private static final long serialVersionUID = 0L;
       throw new com.google.protobuf.InvalidProtocolBufferException(
           e).setUnfinishedMessage(this);
     } finally {
-      if (((mutable_bitField0_ & 0x00000001) != 0)) {
-        modelType_ = modelType_.getUnmodifiableView();
-      }
       this.unknownFields = unknownFields.build();
       makeExtensionsImmutable();
     }
@@ -290,41 +276,6 @@ private static final long serialVersionUID = 0L;
     }
   }
 
-  public static final int MODEL_TYPE_FIELD_NUMBER = 6;
-  private com.google.protobuf.LazyStringList modelType_;
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @return A list containing the modelType.
-   */
-  public com.google.protobuf.ProtocolStringList
-      getModelTypeList() {
-    return modelType_;
-  }
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @return The count of modelType.
-   */
-  public int getModelTypeCount() {
-    return modelType_.size();
-  }
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @param index The index of the element to return.
-   * @return The modelType at the given index.
-   */
-  public java.lang.String getModelType(int index) {
-    return modelType_.get(index);
-  }
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @param index The index of the value to return.
-   * @return The bytes of the modelType at the given index.
-   */
-  public com.google.protobuf.ByteString
-      getModelTypeBytes(int index) {
-    return modelType_.getByteString(index);
-  }
-
   private byte memoizedIsInitialized = -1;
   @java.lang.Override
   public final boolean isInitialized() {
@@ -354,9 +305,6 @@ private static final long serialVersionUID = 0L;
     if (!getProvinceBytes().isEmpty()) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, province_);
     }
-    for (int i = 0; i < modelType_.size(); i++) {
-      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, modelType_.getRaw(i));
-    }
     unknownFields.writeTo(output);
   }
 
@@ -382,14 +330,6 @@ private static final long serialVersionUID = 0L;
     if (!getProvinceBytes().isEmpty()) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, province_);
     }
-    {
-      int dataSize = 0;
-      for (int i = 0; i < modelType_.size(); i++) {
-        dataSize += computeStringSizeNoTag(modelType_.getRaw(i));
-      }
-      size += dataSize;
-      size += 1 * getModelTypeList().size();
-    }
     size += unknownFields.getSerializedSize();
     memoizedSize = size;
     return size;
@@ -415,8 +355,6 @@ private static final long serialVersionUID = 0L;
         .equals(other.getCity())) return false;
     if (!getProvince()
         .equals(other.getProvince())) return false;
-    if (!getModelTypeList()
-        .equals(other.getModelTypeList())) return false;
     if (!unknownFields.equals(other.unknownFields)) return false;
     return true;
   }
@@ -439,10 +377,6 @@ private static final long serialVersionUID = 0L;
     hash = (53 * hash) + getCity().hashCode();
     hash = (37 * hash) + PROVINCE_FIELD_NUMBER;
     hash = (53 * hash) + getProvince().hashCode();
-    if (getModelTypeCount() > 0) {
-      hash = (37 * hash) + MODEL_TYPE_FIELD_NUMBER;
-      hash = (53 * hash) + getModelTypeList().hashCode();
-    }
     hash = (29 * hash) + unknownFields.hashCode();
     memoizedHashCode = hash;
     return hash;
@@ -586,8 +520,6 @@ private static final long serialVersionUID = 0L;
 
       province_ = "";
 
-      modelType_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-      bitField0_ = (bitField0_ & ~0x00000001);
       return this;
     }
 
@@ -614,17 +546,11 @@ private static final long serialVersionUID = 0L;
     @java.lang.Override
     public com.tzld.piaoquan.recommend.server.gen.model.ScoreRequest buildPartial() {
       com.tzld.piaoquan.recommend.server.gen.model.ScoreRequest result = new com.tzld.piaoquan.recommend.server.gen.model.ScoreRequest(this);
-      int from_bitField0_ = bitField0_;
       result.videoId_ = videoId_;
       result.mid_ = mid_;
       result.uid_ = uid_;
       result.city_ = city_;
       result.province_ = province_;
-      if (((bitField0_ & 0x00000001) != 0)) {
-        modelType_ = modelType_.getUnmodifiableView();
-        bitField0_ = (bitField0_ & ~0x00000001);
-      }
-      result.modelType_ = modelType_;
       onBuilt();
       return result;
     }
@@ -692,16 +618,6 @@ private static final long serialVersionUID = 0L;
         province_ = other.province_;
         onChanged();
       }
-      if (!other.modelType_.isEmpty()) {
-        if (modelType_.isEmpty()) {
-          modelType_ = other.modelType_;
-          bitField0_ = (bitField0_ & ~0x00000001);
-        } else {
-          ensureModelTypeIsMutable();
-          modelType_.addAll(other.modelType_);
-        }
-        onChanged();
-      }
       this.mergeUnknownFields(other.unknownFields);
       onChanged();
       return this;
@@ -730,7 +646,6 @@ private static final long serialVersionUID = 0L;
       }
       return this;
     }
-    private int bitField0_;
 
     private long videoId_ ;
     /**
@@ -1066,116 +981,6 @@ private static final long serialVersionUID = 0L;
       onChanged();
       return this;
     }
-
-    private com.google.protobuf.LazyStringList modelType_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-    private void ensureModelTypeIsMutable() {
-      if (!((bitField0_ & 0x00000001) != 0)) {
-        modelType_ = new com.google.protobuf.LazyStringArrayList(modelType_);
-        bitField0_ |= 0x00000001;
-       }
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @return A list containing the modelType.
-     */
-    public com.google.protobuf.ProtocolStringList
-        getModelTypeList() {
-      return modelType_.getUnmodifiableView();
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @return The count of modelType.
-     */
-    public int getModelTypeCount() {
-      return modelType_.size();
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @param index The index of the element to return.
-     * @return The modelType at the given index.
-     */
-    public java.lang.String getModelType(int index) {
-      return modelType_.get(index);
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @param index The index of the value to return.
-     * @return The bytes of the modelType at the given index.
-     */
-    public com.google.protobuf.ByteString
-        getModelTypeBytes(int index) {
-      return modelType_.getByteString(index);
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @param index The index to set the value at.
-     * @param value The modelType to set.
-     * @return This builder for chaining.
-     */
-    public Builder setModelType(
-        int index, java.lang.String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureModelTypeIsMutable();
-      modelType_.set(index, value);
-      onChanged();
-      return this;
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @param value The modelType to add.
-     * @return This builder for chaining.
-     */
-    public Builder addModelType(
-        java.lang.String value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureModelTypeIsMutable();
-      modelType_.add(value);
-      onChanged();
-      return this;
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @param values The modelType to add.
-     * @return This builder for chaining.
-     */
-    public Builder addAllModelType(
-        java.lang.Iterable<java.lang.String> values) {
-      ensureModelTypeIsMutable();
-      com.google.protobuf.AbstractMessageLite.Builder.addAll(
-          values, modelType_);
-      onChanged();
-      return this;
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @return This builder for chaining.
-     */
-    public Builder clearModelType() {
-      modelType_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-      bitField0_ = (bitField0_ & ~0x00000001);
-      onChanged();
-      return this;
-    }
-    /**
-     * <code>repeated string model_type = 6;</code>
-     * @param value The bytes of the modelType to add.
-     * @return This builder for chaining.
-     */
-    public Builder addModelTypeBytes(
-        com.google.protobuf.ByteString value) {
-      if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-      ensureModelTypeIsMutable();
-      modelType_.add(value);
-      onChanged();
-      return this;
-    }
     @java.lang.Override
     public final Builder setUnknownFields(
         final com.google.protobuf.UnknownFieldSet unknownFields) {

+ 0 - 25
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/model/ScoreRequestOrBuilder.java

@@ -60,29 +60,4 @@ public interface ScoreRequestOrBuilder extends
    */
   com.google.protobuf.ByteString
       getProvinceBytes();
-
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @return A list containing the modelType.
-   */
-  java.util.List<java.lang.String>
-      getModelTypeList();
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @return The count of modelType.
-   */
-  int getModelTypeCount();
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @param index The index of the element to return.
-   * @return The modelType at the given index.
-   */
-  java.lang.String getModelType(int index);
-  /**
-   * <code>repeated string model_type = 6;</code>
-   * @param index The index of the value to return.
-   * @return The bytes of the modelType at the given index.
-   */
-  com.google.protobuf.ByteString
-      getModelTypeBytes(int index);
 }