|
@@ -74,27 +74,36 @@ def get_license_list():
|
|
|
|
|
|
|
|
def check_infringement(title, brandname):
|
|
def check_infringement(title, brandname):
|
|
|
""" 模拟侵权检测逻辑 """
|
|
""" 模拟侵权检测逻辑 """
|
|
|
|
|
+ record = products_dao.get_one_record_by_query({"title": title})
|
|
|
|
|
+ image_url = record["image"][0]
|
|
|
|
|
+
|
|
|
if brandname not in title:
|
|
if brandname not in title:
|
|
|
- record = products_dao.get_one_record_by_query({"title": title})
|
|
|
|
|
actual_brandname = record["brandName"]
|
|
actual_brandname = record["brandName"]
|
|
|
if actual_brandname not in brandname:
|
|
if actual_brandname not in brandname:
|
|
|
key_word_falg = True
|
|
key_word_falg = True
|
|
|
else:
|
|
else:
|
|
|
key_word_falg = False
|
|
key_word_falg = False
|
|
|
-
|
|
|
|
|
- key_word_judgement = json.loads(agent.brand_key_word_judgement(brandname, title))
|
|
|
|
|
|
|
|
|
|
- res = agent.license_product_judgement(title, license_list_str)
|
|
|
|
|
- print(res)
|
|
|
|
|
- license_judgement = json.loads(res)
|
|
|
|
|
|
|
+ key_word_judgement = json.loads(agent.brand_key_word_judgement(brandname, title))
|
|
|
|
|
+ license_judgement = json.loads(agent.license_product_judgement(title, license_list_str))
|
|
|
|
|
+ logo_judgement = json.loads(agent.image_logo_judgement("./logo/lining.jpg", image_url))
|
|
|
|
|
+
|
|
|
key_word_falg = key_word_judgement["key_word_flag"]
|
|
key_word_falg = key_word_judgement["key_word_flag"]
|
|
|
license_judgement_flag = license_judgement["in_list"]
|
|
license_judgement_flag = license_judgement["in_list"]
|
|
|
# license_flag = license_judgement["in_list"]
|
|
# license_flag = license_judgement["in_list"]
|
|
|
- print(license_judgement)
|
|
|
|
|
result = f"""
|
|
result = f"""
|
|
|
关键词引流: {key_word_falg}
|
|
关键词引流: {key_word_falg}
|
|
|
是否为授权生产产品: {license_judgement_flag}
|
|
是否为授权生产产品: {license_judgement_flag}
|
|
|
|
|
+
|
|
|
|
|
+ 产品LOGO图像判定:
|
|
|
|
|
+ 图像中是否包含logo: {logo_judgement["is_contain_logo"]}
|
|
|
"""
|
|
"""
|
|
|
|
|
+
|
|
|
|
|
+ if logo_judgement["is_contain_logo"]:
|
|
|
|
|
+ result +=
|
|
|
|
|
+ f"""是否是指定品牌LOGO: {logo_judgement["is_jugement_logo"]}
|
|
|
|
|
+ LOGO名称: {logo_judgement["brand_name"]}
|
|
|
|
|
+ """
|
|
|
return result
|
|
return result
|
|
|
|
|
|
|
|
def search_by_cust_id(cust_id):
|
|
def search_by_cust_id(cust_id):
|