Selaa lähdekoodia

Merge branch 'test' of https://git.yishihui.com/algorithm/rov-offline into test

caida 1 vuosi sitten
vanhempi
commit
615469f7c9
2 muutettua tiedostoa jossa 30 lisäystä ja 25 poistoa
  1. 5 0
      ad_threshold_auto_update.py
  2. 25 25
      config.py

+ 5 - 0
ad_threshold_auto_update.py

@@ -302,6 +302,11 @@ def timer_check():
         now_min = datetime.datetime.now().minute
         log_.info(f"now_date: {datetime.datetime.strftime(now_date, '%Y%m%d%H')}")
 
+        # 00:00 - 08:00 不做阈值参数调整
+        if 0 <= now_h < 8:
+            log_.info(f"00:00 - 08:00 不做阈值参数调整")
+            return
+
         # 管理后台获取开启自动调整阈值开关的目标uv值
         ad_target_uv = get_ad_target_uv(now_h=now_h)
         log_.info(f"ad_target_uv: {ad_target_uv}")

+ 25 - 25
config.py

@@ -1596,15 +1596,15 @@ class BaseConfig(object):
             # 调整步长
             'threshold_update': {
                 'ab0': 1 / 48,
-                'ab1': 1 / 288,
-                'ab2': 1 / 288,
-                'ab3': 1 / 288,
-                'ab4': 1 / 288,
-                'ab5': 1 / 288,
-                'ab6': 1 / 288,
-                'ab7': 1 / 288,
-                'ab8': 1 / 288,
-                'ab9': 1 / 288,
+                'ab1': 1 / 432,
+                'ab2': 1 / 432,
+                'ab3': 1 / 432,
+                'ab4': 1 / 432,
+                'ab5': 1 / 432,
+                'ab6': 1 / 432,
+                'ab7': 1 / 432,
+                'ab8': 1 / 432,
+                'ab9': 1 / 432,
             },
             # 分时段控制目标uv参数
             'target_uv_param': {
@@ -1744,15 +1744,15 @@ class BaseConfig(object):
             'gradient': 0.07,
             'max_update_step': 3,
             'threshold_update': {
-                'ab0': 1 / 96,
+                'ab0': 1 / 288,
                 'ab1': 1 / 96,
                 'ab2': 1 / 96,
-                'ab3': 1 / 96,
-                'ab4': 1 / 96,
-                'ab5': 1 / 96,
+                'ab3': 1 / 288,
+                'ab4': 1 / 288,
+                'ab5': 1 / 288,
                 'ab6': 1 / 288,
-                'ab7': 1 / 96,
-                'ab8': 1 / 96,
+                'ab7': 1 / 288,
+                'ab8': 1 / 288,
                 'ab9': 1 / 96,
             },
             # 分时段控制目标uv参数
@@ -1789,8 +1789,8 @@ class BaseConfig(object):
                 },  # 0-7点,uv控制在0%
                 'ab6': {
                     'update_hours': list(range(7)), 'update_param': 0,
-                    'special_update_config': {'special_hours': [0, 7], 'special_gradient': 0.01,
-                                              'special_max_update_step': 53}
+                    'special_update_config': {'special_hours': [0, 7], 'special_gradient': 0.005,
+                                              'special_max_update_step': 71}
                 },  # 0-7点,uv控制在0%
                 'ab7': {
                     'update_hours': list(range(7)), 'update_param': 0,
@@ -1816,15 +1816,15 @@ class BaseConfig(object):
             'gradient': 0.05,
             'max_update_step': 5,
             'threshold_update': {
-                'ab0': 1 / 96,
+                'ab0': 1 / 288,
                 'ab1': 1 / 96,
                 'ab2': 1 / 96,
-                'ab3': 1 / 96,
-                'ab4': 1 / 96,
-                'ab5': 1 / 96,
+                'ab3': 1 / 288,
+                'ab4': 1 / 288,
+                'ab5': 1 / 288,
                 'ab6': 1 / 288,
-                'ab7': 1 / 96,
-                'ab8': 1 / 96,
+                'ab7': 1 / 288,
+                'ab8': 1 / 288,
                 'ab9': 1 / 96,
             },
             # 分时段控制目标uv参数
@@ -1861,8 +1861,8 @@ class BaseConfig(object):
                 },  # 0-7点,uv控制在0%
                 'ab6': {
                     'update_hours': list(range(7)), 'update_param': 0,
-                    'special_update_config': {'special_hours': [0, 1, 7, 8], 'special_gradient': 0.01,
-                                              'special_max_update_step': 29}
+                    'special_update_config': {'special_hours': [0, 1, 7, 8], 'special_gradient': 0.005,
+                                              'special_max_update_step': 71}
                 },  # 0-7点,uv控制在0%
                 'ab7': {
                     'update_hours': list(range(7)), 'update_param': 0,