|
|
@@ -109,12 +109,13 @@ public class RankStrategy4RegionMergeModelV565 extends RankStrategy4RegionMergeM
|
|
|
|
|
|
// 4. 排序模型计算
|
|
|
Map<String, Float> sceneFeatureMap = new HashMap<>(0);
|
|
|
- List<RankItem> items = ScorerUtils.getScorerPipeline("feeds_score_config_fm_xgb_20250729.conf").scoring(sceneFeatureMap, userFeatureMap, userFeatureMap, rankItems);
|
|
|
+ List<RankItem> items = ScorerUtils.getScorerPipeline("feeds_score_config_fm_xgb_20260116.conf").scoring(sceneFeatureMap, userFeatureMap, userFeatureMap, rankItems);
|
|
|
|
|
|
// 5. 排序公式特征
|
|
|
double xgbRovNegRate = mergeWeight.getOrDefault("xgbRovNegRate", 0.059);
|
|
|
double xgbNorPowerWeight = mergeWeight.getOrDefault("xgbNorPowerWeight", 1.22);
|
|
|
double xgbNorPowerExp = mergeWeight.getOrDefault("xgbNorPowerExp", 1.15);
|
|
|
+ double rosMinusAlpha = mergeWeight.getOrDefault("rosMinusAlpha", 1.1);
|
|
|
Map<String, Map<String, String>> vid2MapFeature = this.getVideoRedisFeature(vids, "redis:vid_hasreturn_vor:");
|
|
|
|
|
|
// 获取权重
|
|
|
@@ -132,29 +133,25 @@ public class RankStrategy4RegionMergeModelV565 extends RankStrategy4RegionMergeM
|
|
|
|
|
|
List<Video> result = new ArrayList<>();
|
|
|
for (RankItem item : items) {
|
|
|
- String vidMergeCate2 = this.findVideoMergeCate2(videoBaseInfoMap, String.valueOf(item.getVideoId()));
|
|
|
- double strPlusCalibrationCoefficient = this.calcStrPlusCalibrationCoefficientByMergeCate2(vidMergeCate2);
|
|
|
-
|
|
|
double score;
|
|
|
double fmRovOrigin = item.getScoreRov();
|
|
|
item.getScoresMap().put("fmRovOrigin", fmRovOrigin);
|
|
|
- double fmRovCoefficientBefore = restoreScore(fmRovOrigin, xgbRovNegRate);
|
|
|
- item.getScoresMap().put("fmRovCoefficientBefore", fmRovCoefficientBefore);
|
|
|
- double fmRov = fmRovCoefficientBefore * strPlusCalibrationCoefficient;
|
|
|
+ double fmRov = restoreScore(fmRovOrigin, xgbRovNegRate);
|
|
|
item.getScoresMap().put("fmRov", fmRov);
|
|
|
- item.getScoresMap().put("strPlusCalibrationCoefficient", strPlusCalibrationCoefficient);
|
|
|
double hasReturnRovScore = Double.parseDouble(vid2MapFeature.getOrDefault(item.getVideoId() + "", new HashMap<>()).getOrDefault("rov", "0"));
|
|
|
+ double newRosMinusScore = scalaRosMinusScore(hasReturnRovScore, rosMinusAlpha);
|
|
|
item.getScoresMap().put("hasReturnRovScore", hasReturnRovScore);
|
|
|
double norXGBScore = item.getScoresMap().getOrDefault("NorXGBScore", 0d);
|
|
|
double newNorXGBScore = norPowerCalibration(xgbNorPowerWeight, xgbNorPowerExp, norXGBScore);
|
|
|
double vor = Double.parseDouble(vid2MapFeature.getOrDefault(item.getVideoId() + "", new HashMap<>()).getOrDefault("vor", "0"));
|
|
|
item.getScoresMap().put("vor", vor);
|
|
|
|
|
|
+ String vidMergeCate2 = this.findVideoMergeCate2(videoBaseInfoMap, String.valueOf(item.getVideoId()));
|
|
|
Double scoreCoefficient = cate2Coefficient.getOrDefault(vidMergeCate2, 0d);
|
|
|
item.getScoresMap().put("scoreCoefficient", scoreCoefficient);
|
|
|
item.getScoresMap().put("cate2CoefficientDenominator", cate2CoefficientDenominator);
|
|
|
|
|
|
- score = fmRov * (0.1 + newNorXGBScore) * (0.1 + vor) * (1 + scoreCoefficient / cate2CoefficientDenominator);
|
|
|
+ score = fmRov * (0.1 + newRosMinusScore) * (0.1 + vor) * (1 + scoreCoefficient / cate2CoefficientDenominator);
|
|
|
|
|
|
Video video = item.getVideo();
|
|
|
video.setScore(score);
|
|
|
@@ -342,6 +339,13 @@ public class RankStrategy4RegionMergeModelV565 extends RankStrategy4RegionMergeM
|
|
|
return baseInfo;
|
|
|
}
|
|
|
|
|
|
+ private double scalaRosMinusScore(double rosMinusScore, double alpha) {
|
|
|
+ if (rosMinusScore > 0) {
|
|
|
+ return Math.pow(rosMinusScore, alpha);
|
|
|
+ }
|
|
|
+ return rosMinusScore;
|
|
|
+ }
|
|
|
+
|
|
|
private double norPowerCalibration(double weight, double exp, double score) {
|
|
|
double newScore = weight * Math.pow(score, exp);
|
|
|
if (newScore > 100) {
|