소스 검색

feat:添加rootsourceid字段

zhaohaipeng 1 개월 전
부모
커밋
0d4dbcc249

+ 1 - 1
recommend-server-client/pom.xml

@@ -10,7 +10,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>recommend-server-client</artifactId>
-    <version>1.1.5</version>
+    <version>1.1.6</version>
 
     <dependencies>
         <dependency>

+ 22 - 21
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/recommend/Recommend.java

@@ -56,7 +56,7 @@ public final class Recommend {
       "\n2com/tzld/piaoquan/recommend/server/rec" +
       "ommend.proto\032\031google/protobuf/any.proto\032" +
       "/com/tzld/piaoquan/recommend/server/comm" +
-      "on.proto\"\304\004\n\020RecommendRequest\022\022\n\nrequest" +
+      "on.proto\"\334\004\n\020RecommendRequest\022\022\n\nrequest" +
       "_id\030\001 \001(\t\022\013\n\003mid\030\002 \001(\t\022\013\n\003uid\030\003 \001(\t\022\014\n\004s" +
       "ize\030\004 \001(\005\022\020\n\010app_type\030\005 \001(\005\022\021\n\tcity_code" +
       "\030\006 \001(\t\022\025\n\rprovince_code\030\007 \001(\t\022\023\n\013ab_exp_" +
@@ -69,25 +69,26 @@ public final class Recommend {
       "ion_id\030\021 \001(\t\022\026\n\016sub_session_id\030\022 \001(\t\022\023\n\013" +
       "page_source\030\023 \001(\t\022\023\n\013category_id\030\024 \001(\t\022\026" +
       "\n\016hot_scene_type\030\025 \001(\003\022\021\n\tclient_ip\030\026 \001(" +
-      "\t\022\024\n\014version_code\030\027 \001(\005\032.\n\014EventIdEntry\022" +
-      "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\177\n\020Machi" +
-      "neInfoProto\022\r\n\005brand\030\001 \001(\t\022\r\n\005model\030\002 \001(" +
-      "\t\022\020\n\010platform\030\003 \001(\t\022\023\n\013sdk_version\030\004 \001(\t" +
-      "\022\016\n\006system\030\005 \001(\t\022\026\n\016wechat_version\030\006 \001(\t" +
-      "\"H\n\021RecommendResponse\022\027\n\006result\030\001 \001(\0132\007." +
-      "Result\022\032\n\005video\030\002 \003(\0132\013.VideoProto\"\336\001\n\nV" +
-      "ideoProto\022\020\n\010video_id\030\001 \001(\003\022\021\n\trov_score" +
-      "\030\002 \001(\001\022\021\n\tpush_from\030\003 \001(\t\022\017\n\007ab_code\030\004 \001" +
-      "(\t\022\022\n\nsort_score\030\005 \001(\001\022\020\n\010position\030\006 \001(\005" +
-      "\022\021\n\tflow_pool\030\007 \001(\t\022\027\n\017is_in_flow_pool\030\010" +
-      " \001(\005\022\014\n\004rand\030\t \001(\001\022\'\n\017push_from_index\030\n " +
-      "\003(\0132\016.PushFromIndex\"1\n\rPushFromIndex\022\021\n\t" +
-      "push_from\030\001 \001(\t\022\r\n\005index\030\002 \003(\t2\212\001\n\020Recom" +
-      "mendService\022:\n\021HomepageRecommend\022\021.Recom" +
-      "mendRequest\032\022.RecommendResponse\022:\n\021Relev" +
-      "antRecommend\022\021.RecommendRequest\032\022.Recomm" +
-      "endResponseB7\n0com.tzld.piaoquan.recomme" +
-      "nd.server.gen.recommendP\001\210\001\001b\006proto3"
+      "\t\022\024\n\014version_code\030\027 \001(\005\022\026\n\016root_source_i" +
+      "d\030\030 \001(\t\032.\n\014EventIdEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" +
+      "value\030\002 \001(\t:\0028\001\"\177\n\020MachineInfoProto\022\r\n\005b" +
+      "rand\030\001 \001(\t\022\r\n\005model\030\002 \001(\t\022\020\n\010platform\030\003 " +
+      "\001(\t\022\023\n\013sdk_version\030\004 \001(\t\022\016\n\006system\030\005 \001(\t" +
+      "\022\026\n\016wechat_version\030\006 \001(\t\"H\n\021RecommendRes" +
+      "ponse\022\027\n\006result\030\001 \001(\0132\007.Result\022\032\n\005video\030" +
+      "\002 \003(\0132\013.VideoProto\"\336\001\n\nVideoProto\022\020\n\010vid" +
+      "eo_id\030\001 \001(\003\022\021\n\trov_score\030\002 \001(\001\022\021\n\tpush_f" +
+      "rom\030\003 \001(\t\022\017\n\007ab_code\030\004 \001(\t\022\022\n\nsort_score" +
+      "\030\005 \001(\001\022\020\n\010position\030\006 \001(\005\022\021\n\tflow_pool\030\007 " +
+      "\001(\t\022\027\n\017is_in_flow_pool\030\010 \001(\005\022\014\n\004rand\030\t \001" +
+      "(\001\022\'\n\017push_from_index\030\n \003(\0132\016.PushFromIn" +
+      "dex\"1\n\rPushFromIndex\022\021\n\tpush_from\030\001 \001(\t\022" +
+      "\r\n\005index\030\002 \003(\t2\212\001\n\020RecommendService\022:\n\021H" +
+      "omepageRecommend\022\021.RecommendRequest\032\022.Re" +
+      "commendResponse\022:\n\021RelevantRecommend\022\021.R" +
+      "ecommendRequest\032\022.RecommendResponseB7\n0c" +
+      "om.tzld.piaoquan.recommend.server.gen.re" +
+      "commendP\001\210\001\001b\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -100,7 +101,7 @@ public final class Recommend {
     internal_static_RecommendRequest_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_RecommendRequest_descriptor,
-        new java.lang.String[] { "RequestId", "Mid", "Uid", "Size", "AppType", "CityCode", "ProvinceCode", "AbExpCode", "EventId", "VersionAuditStatus", "RecommendTraceId", "VideoId", "City", "Province", "MachineInfo", "NewExpGroup", "SessionId", "SubSessionId", "PageSource", "CategoryId", "HotSceneType", "ClientIp", "VersionCode", });
+        new java.lang.String[] { "RequestId", "Mid", "Uid", "Size", "AppType", "CityCode", "ProvinceCode", "AbExpCode", "EventId", "VersionAuditStatus", "RecommendTraceId", "VideoId", "City", "Province", "MachineInfo", "NewExpGroup", "SessionId", "SubSessionId", "PageSource", "CategoryId", "HotSceneType", "ClientIp", "VersionCode", "RootSourceId", });
     internal_static_RecommendRequest_EventIdEntry_descriptor =
       internal_static_RecommendRequest_descriptor.getNestedTypes().get(0);
     internal_static_RecommendRequest_EventIdEntry_fieldAccessorTable = new

+ 138 - 0
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/recommend/RecommendRequest.java

@@ -31,6 +31,7 @@ private static final long serialVersionUID = 0L;
     pageSource_ = "";
     categoryId_ = "";
     clientIp_ = "";
+    rootSourceId_ = "";
   }
 
   @java.lang.Override
@@ -213,6 +214,12 @@ private static final long serialVersionUID = 0L;
             versionCode_ = input.readInt32();
             break;
           }
+          case 194: {
+            java.lang.String s = input.readStringRequireUtf8();
+
+            rootSourceId_ = s;
+            break;
+          }
           default: {
             if (!parseUnknownField(
                 input, unknownFields, extensionRegistry, tag)) {
@@ -1012,6 +1019,44 @@ private static final long serialVersionUID = 0L;
     return versionCode_;
   }
 
+  public static final int ROOT_SOURCE_ID_FIELD_NUMBER = 24;
+  private volatile java.lang.Object rootSourceId_;
+  /**
+   * <code>string root_source_id = 24;</code>
+   * @return The rootSourceId.
+   */
+  @java.lang.Override
+  public java.lang.String getRootSourceId() {
+    java.lang.Object ref = rootSourceId_;
+    if (ref instanceof java.lang.String) {
+      return (java.lang.String) ref;
+    } else {
+      com.google.protobuf.ByteString bs = 
+          (com.google.protobuf.ByteString) ref;
+      java.lang.String s = bs.toStringUtf8();
+      rootSourceId_ = s;
+      return s;
+    }
+  }
+  /**
+   * <code>string root_source_id = 24;</code>
+   * @return The bytes for rootSourceId.
+   */
+  @java.lang.Override
+  public com.google.protobuf.ByteString
+      getRootSourceIdBytes() {
+    java.lang.Object ref = rootSourceId_;
+    if (ref instanceof java.lang.String) {
+      com.google.protobuf.ByteString b = 
+          com.google.protobuf.ByteString.copyFromUtf8(
+              (java.lang.String) ref);
+      rootSourceId_ = b;
+      return b;
+    } else {
+      return (com.google.protobuf.ByteString) ref;
+    }
+  }
+
   private byte memoizedIsInitialized = -1;
   @java.lang.Override
   public final boolean isInitialized() {
@@ -1098,6 +1143,9 @@ private static final long serialVersionUID = 0L;
     if (versionCode_ != 0) {
       output.writeInt32(23, versionCode_);
     }
+    if (!getRootSourceIdBytes().isEmpty()) {
+      com.google.protobuf.GeneratedMessageV3.writeString(output, 24, rootSourceId_);
+    }
     unknownFields.writeTo(output);
   }
 
@@ -1195,6 +1243,9 @@ private static final long serialVersionUID = 0L;
       size += com.google.protobuf.CodedOutputStream
         .computeInt32Size(23, versionCode_);
     }
+    if (!getRootSourceIdBytes().isEmpty()) {
+      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, rootSourceId_);
+    }
     size += unknownFields.getSerializedSize();
     memoizedSize = size;
     return size;
@@ -1259,6 +1310,8 @@ private static final long serialVersionUID = 0L;
         .equals(other.getClientIp())) return false;
     if (getVersionCode()
         != other.getVersionCode()) return false;
+    if (!getRootSourceId()
+        .equals(other.getRootSourceId())) return false;
     if (!unknownFields.equals(other.unknownFields)) return false;
     return true;
   }
@@ -1324,6 +1377,8 @@ private static final long serialVersionUID = 0L;
     hash = (53 * hash) + getClientIp().hashCode();
     hash = (37 * hash) + VERSION_CODE_FIELD_NUMBER;
     hash = (53 * hash) + getVersionCode();
+    hash = (37 * hash) + ROOT_SOURCE_ID_FIELD_NUMBER;
+    hash = (53 * hash) + getRootSourceId().hashCode();
     hash = (29 * hash) + unknownFields.hashCode();
     memoizedHashCode = hash;
     return hash;
@@ -1528,6 +1583,8 @@ private static final long serialVersionUID = 0L;
 
       versionCode_ = 0;
 
+      rootSourceId_ = "";
+
       return this;
     }
 
@@ -1587,6 +1644,7 @@ private static final long serialVersionUID = 0L;
       result.hotSceneType_ = hotSceneType_;
       result.clientIp_ = clientIp_;
       result.versionCode_ = versionCode_;
+      result.rootSourceId_ = rootSourceId_;
       onBuilt();
       return result;
     }
@@ -1724,6 +1782,10 @@ private static final long serialVersionUID = 0L;
       if (other.getVersionCode() != 0) {
         setVersionCode(other.getVersionCode());
       }
+      if (!other.getRootSourceId().isEmpty()) {
+        rootSourceId_ = other.rootSourceId_;
+        onChanged();
+      }
       this.mergeUnknownFields(other.unknownFields);
       onChanged();
       return this;
@@ -3396,6 +3458,82 @@ private static final long serialVersionUID = 0L;
       onChanged();
       return this;
     }
+
+    private java.lang.Object rootSourceId_ = "";
+    /**
+     * <code>string root_source_id = 24;</code>
+     * @return The rootSourceId.
+     */
+    public java.lang.String getRootSourceId() {
+      java.lang.Object ref = rootSourceId_;
+      if (!(ref instanceof java.lang.String)) {
+        com.google.protobuf.ByteString bs =
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        rootSourceId_ = s;
+        return s;
+      } else {
+        return (java.lang.String) ref;
+      }
+    }
+    /**
+     * <code>string root_source_id = 24;</code>
+     * @return The bytes for rootSourceId.
+     */
+    public com.google.protobuf.ByteString
+        getRootSourceIdBytes() {
+      java.lang.Object ref = rootSourceId_;
+      if (ref instanceof String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        rootSourceId_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+    /**
+     * <code>string root_source_id = 24;</code>
+     * @param value The rootSourceId to set.
+     * @return This builder for chaining.
+     */
+    public Builder setRootSourceId(
+        java.lang.String value) {
+      if (value == null) {
+    throw new NullPointerException();
+  }
+  
+      rootSourceId_ = value;
+      onChanged();
+      return this;
+    }
+    /**
+     * <code>string root_source_id = 24;</code>
+     * @return This builder for chaining.
+     */
+    public Builder clearRootSourceId() {
+      
+      rootSourceId_ = getDefaultInstance().getRootSourceId();
+      onChanged();
+      return this;
+    }
+    /**
+     * <code>string root_source_id = 24;</code>
+     * @param value The bytes for rootSourceId to set.
+     * @return This builder for chaining.
+     */
+    public Builder setRootSourceIdBytes(
+        com.google.protobuf.ByteString value) {
+      if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+      
+      rootSourceId_ = value;
+      onChanged();
+      return this;
+    }
     @java.lang.Override
     public final Builder setUnknownFields(
         final com.google.protobuf.UnknownFieldSet unknownFields) {

+ 12 - 0
recommend-server-client/src/main/java/com/tzld/piaoquan/recommend/server/gen/recommend/RecommendRequestOrBuilder.java

@@ -296,4 +296,16 @@ public interface RecommendRequestOrBuilder extends
    * @return The versionCode.
    */
   int getVersionCode();
+
+  /**
+   * <code>string root_source_id = 24;</code>
+   * @return The rootSourceId.
+   */
+  java.lang.String getRootSourceId();
+  /**
+   * <code>string root_source_id = 24;</code>
+   * @return The bytes for rootSourceId.
+   */
+  com.google.protobuf.ByteString
+      getRootSourceIdBytes();
 }

+ 1 - 0
recommend-server-client/src/main/proto/com/tzld/piaoquan/recommend/server/recommend.proto

@@ -32,6 +32,7 @@ message RecommendRequest {
   int64 hot_scene_type = 21;
   string client_ip = 22;
   int32 version_code = 23;
+  string root_source_id = 24;
 }
 
 message MachineInfoProto {

+ 2 - 2
recommend-server-service/pom.xml

@@ -175,7 +175,7 @@
         <dependency>
             <groupId>com.tzld.piaoquan</groupId>
             <artifactId>recommend-server-client</artifactId>
-            <version>1.1.5</version>
+            <version>1.1.6</version>
         </dependency>
         <dependency>
             <groupId>com.tzld.piaoquan</groupId>
@@ -252,7 +252,7 @@
         <dependency>
             <groupId>ml.dmlc</groupId>
             <artifactId>xgboost4j-spark_2.12</artifactId>
-            <version>1.7.6</version>
+            <version>2.0.1</version>
             <exclusions>
                 <exclusion>
                     <artifactId>scala-library</artifactId>

+ 2 - 0
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/model/RecommendParam.java

@@ -42,5 +42,7 @@ public class RecommendParam {
     private String clientIp;
 
     private Integer versionCode;
+
+    private String rootSourceId;
 }
 

+ 1 - 0
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/RecommendService.java

@@ -352,6 +352,7 @@ public class RecommendService {
         param.setHotSceneType(request.getHotSceneType());
         param.setClientIp(request.getClientIp());
         param.setVersionCode(request.getVersionCode());
+        param.setRootSourceId(request.getRootSourceId());
 
         return param;
     }