| 
														
															@@ -180,12 +180,12 @@ def update_video_w_h_rate(video_ids, key_name): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     info_data = {} 
														 | 
														
														 | 
														
															     info_data = {} 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     for video_id, width, height, rotate in data: 
														 | 
														
														 | 
														
															     for video_id, width, height, rotate in data: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         # rotate 字段值为 90或270时,width和height的值相反 
														 | 
														
														 | 
														
															         # rotate 字段值为 90或270时,width和height的值相反 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        if rotate in (90, 270): 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            w_h_rate = height / width 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if int(rotate) in (90, 270): 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            w_h_rate = int(height) / int(width) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         else: 
														 | 
														
														 | 
														
															         else: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            w_h_rate = width / height 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            w_h_rate = int(width) / int(height) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if w_h_rate > 1: 
														 | 
														
														 | 
														
															         if w_h_rate > 1: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            info_data[int(video_id)] = float(w_h_rate) 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            info_data[int(video_id)] = w_h_rate 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     redis_helper = RedisHelper() 
														 | 
														
														 | 
														
															     redis_helper = RedisHelper() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     # 删除旧数据 
														 | 
														
														 | 
														
															     # 删除旧数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     redis_helper.del_keys(key_name=key_name) 
														 | 
														
														 | 
														
															     redis_helper.del_keys(key_name=key_name) 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -198,6 +198,6 @@ if __name__ == '__main__': 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     # data_test = [9.20273281e+03, 7.00795065e+03, 5.54813112e+03, 9.97402494e-01, 9.96402495e-01, 9.96402494e-01] 
														 | 
														
														 | 
														
															     # data_test = [9.20273281e+03, 7.00795065e+03, 5.54813112e+03, 9.97402494e-01, 9.96402495e-01, 9.96402494e-01] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     # data_normalization(data_test) 
														 | 
														
														 | 
														
															     # data_normalization(data_test) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     # request_post(request_url=config_.NOTIFY_BACKEND_UPDATE_ROV_SCORE_URL, request_data={'videos': []}) 
														 | 
														
														 | 
														
															     # request_post(request_url=config_.NOTIFY_BACKEND_UPDATE_ROV_SCORE_URL, request_data={'videos': []}) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    video_ids = [110, 112, 113, 115, 116, 117, 118] 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    video_ids = [110, 112, 113, 115, 116, 117, 8289883] 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     update_video_w_h_rate(video_ids=video_ids, key_name='') 
														 | 
														
														 | 
														
															     update_video_w_h_rate(video_ids=video_ids, key_name='') 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |