1688图搜+关键词搜索商品API:从入门到实战,让你效率翻倍

电商数据驱动运营:店透视插件实战指南 在电商运营中,数据驱动的决策是提升竞争力的关键。通过分析价格策略、销量数据和流量来源等信息,商家可以优化运营策略。传统的数据收集方法效率低下且成本高昂,而店透视插件提供了高效的解决方案。该插件能够实时监控竞品价格变动、解密真实销量数据,并分析流量来源,帮助商家快速响应市场变化。在实战中,插件支持选品决策、动态定价和活动复盘等场景,显著提升运营效率。合理使用这类工具,结合商业洞察,可以构建数据驱动的运营体系,实现业绩增长。 阅读详情

一、概述

1688作为国内最大的B2B批发采购平台,拥有海量商品数据。对于电商开发者、选品工具和供应链系统而言,图片搜索(图搜/拍立淘)和关键词搜索是两种最高效的找货方式。本文将带你从0到1掌握1688图搜API和关键词搜索API的完整调用流程,附赠实战代码,让你的开发效率翻倍。


二、准备工作:账号与权限

2.1 注册1688开放平台账号

1688开放平台主要面向企业开发者,个人开发者权限受限。

  1. 访问1688官网

  2. 使用企业支付宝账号注册并完成企业实名认证

  3. 提交营业执照、法人身份证等资质

2.2 创建应用获取凭证

在控制台创建应用后,你将获得:

  • App Key:应用唯一标识

  • App Secret:签名密钥(严格保密)

2.3 申请API权限

根据业务需求申请对应接口权限:表格

接口类型接口名称功能描述
图搜APIalibaba.image.search上传图片搜索相似商品
关键词搜索com.alibaba.product.search / alibaba.wholesale.goods.search按关键词搜索商品列表
商品详情alibaba.product.get获取商品详细信息
店铺商品alibaba.product.getSellerProductList获取指定店铺全部商品

⚠️ 注意:部分接口需要通过OAuth2.0授权获取 access_token,特别是涉及店铺数据的操作。


三、签名生成机制

1688开放平台采用 HMAC-SHA1 或 MD5 签名算法,所有请求参数必须按规则生成签名。

3.1 签名规则

  1. 排序:将所有参数(除 sign 外)按参数名 ASCII 码升序排列

  2. 拼接:格式为 appSecret + key1value1 + key2value2 + ... + appSecret

  3. 加密:使用 MD5 加密,结果转大写

3.2 Python签名工具类

import hashlib
import hmac
import time
import urllib.parse
from datetime import datetime

class AlibabaApiSigner:
    """1688开放平台API签名工具类"""
    
    def __init__(self, app_key: str, app_secret: str):
        self.app_key = app_key
        self.app_secret = app_secret
        self.base_url = "https://api.1688.com/router/rest"
    
    def generate_md5_sign(self, params: dict) -> str:
        """
        生成MD5签名(适用于大多数1688接口)
        """
        # 过滤空值和sign参数
        filtered = {k: v for k, v in params.items() 
                   if v is not None and k != 'sign'}
        
        # 按key升序排列
        sorted_items = sorted(filtered.items(), key=lambda x: x[0])
        
        # 拼接字符串
        sign_content = self.app_secret
        for key, value in sorted_items:
            sign_content += f"{key}{value}"
        sign_content += self.app_secret
        
        # MD5加密并转大写
        return hashlib.md5(sign_content.encode('utf-8')).hexdigest().upper()
    
    def generate_hmac_sign(self, params: dict) -> str:
        """
        生成HMAC-SHA1签名(部分接口使用)
        """
        filtered = {k: v for k, v in params.items() 
                   if v is not None and k != 'sign'}
        sorted_items = sorted(filtered.items(), key=lambda x: x[0])
        
        sign_content = self.app_secret
        for key, value in sorted_items:
            sign_content += f"{key}{value}"
        sign_content += self.app_secret
        
        # HMAC-SHA1加密
        sign = hmac.new(
            self.app_secret.encode('utf-8'),
            sign_content.encode('utf-8'),
            hashlib.sha1
        ).hexdigest().upper()
        return sign
    
    def build_base_params(self) -> dict:
        """构建基础请求参数"""
        return {
            'app_key': self.app_key,
            'timestamp': datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
            'format': 'json',
            'v': '2.0',
            'sign_method': 'md5'
        }

四、关键词搜索商品API实战

4.1 接口概述

关键词搜索是1688最核心的找货方式,支持按关键词、价格区间、类目、排序等多维度筛选。

接口地址:https://api.1688.com/router/rest
请求方式:POST
数据格式:application/x-www-form-urlencoded

4.2 核心参数说明

参数名类型必选说明
methodString是接口方法名,如 com.alibaba.product.search
app_keyString是应用Key
signString是签名
timestampString是时间戳
q / keywordString是搜索关键词
page / page_noNumber否页码,默认1
pageSize / page_sizeNumber否每页数量,默认20
priceStartNumber否价格区间起始
priceEndNumber否价格区间结束
categoryIdNumber否类目ID过滤
sortString否排序方式:price_asc/price_desc/sale

4.3 完整调用代码

import requests
import json
import time
from typing import List, Dict, Optional

class AlibabaKeywordSearch:
    """1688关键词搜索商品API封装"""
    
    def __init__(self, app_key: str, app_secret: str):
        self.signer = AlibabaApiSigner(app_key, app_secret)
        self.api_url = "https://api.1688.com/router/rest"
    
    def search_products(
        self,
        keyword: str,
        page: int = 1,
        page_size: int = 20,
        price_start: Optional[float] = None,
        price_end: Optional[float] = None,
        category_id: Optional[int] = None,
        sort: str = "default"
    ) -> Dict:
        """
        关键词搜索商品
        
        :param keyword: 搜索关键词,如"无线蓝牙耳机"
        :param page: 页码
        :param page_size: 每页数量(建议不超过50)
        :param price_start: 最低价格
        :param price_end: 最高价格
        :param category_id: 类目ID过滤
        :param sort: 排序方式
        :return: 搜索结果字典
        """
        # 构建基础参数
        params = self.signer.build_base_params()
        params['method'] = 'com.alibaba.product.search'  # 或 alibaba.wholesale.goods.search
        
        # 业务参数
        params['q'] = keyword
        params['page'] = page
        params['pageSize'] = page_size
        
        if price_start is not None:
            params['priceStart'] = price_start
        if price_end is not None:
            params['priceEnd'] = price_end
        if category_id is not None:
            params['categoryId'] = category_id
        if sort != "default":
            params['sort'] = sort
        
        # 生成签名
        params['sign'] = self.signer.generate_md5_sign(params)
        
        # 发送请求
        try:
            response = requests.post(
                self.api_url,
                data=params,
                headers={'Content-Type': 'application/x-www-form-urlencoded'},
                timeout=30
            )
            response.raise_for_status()
            return response.json()
        except requests.RequestException as e:
            print(f"请求异常: {e}")
            return {"error": str(e)}
    
    def parse_search_results(self, response: Dict) -> List[Dict]:
        """
        解析搜索结果,提取关键字段
        """
        results = []
        
        # 根据实际返回结构解析(不同接口返回结构可能不同)
        if 'result' in response:
            products = response['result'].get('result', [])
        elif 'productSearchResponse' in response:
            products = response['productSearchResponse'].get('products', [])
        else:
            # 适配不同返回结构
            products = response.get('products', [])
        
        for product in products:
            item = {
                'product_id': product.get('productId') or product.get('offerId'),
                'title': product.get('subject') or product.get('title'),
                'price': product.get('price') or product.get('salePrice'),
                'image_url': product.get('imageUrl') or product.get('mainImage'),
                'supplier_name': product.get('companyName') or product.get('supplier'),
                'min_order': product.get('minOrderQuantity', 1),
                'sale_count': product.get('saleCount', 0),
                'detail_url': product.get('detailUrl', ''),
                'location': product.get('location', '')
            }
            results.append(item)
        
        return results
    
    def batch_search(
        self,
        keywords: List[str],
        pages: int = 3,
        delay: float = 1.5
    ) -> Dict[str, List[Dict]]:
        """
        批量关键词搜索(带限流控制)
        
        :param keywords: 关键词列表
        :param pages: 每个关键词搜索页数
        :param delay: 请求间隔(秒)
        :return: {keyword: [products]}
        """
        all_results = {}
        
        for keyword in keywords:
            print(f"🔍 正在搜索: {keyword}")
            keyword_results = []
            
            for page in range(1, pages + 1):
                response = self.search_products(
                    keyword=keyword,
                    page=page,
                    page_size=50
                )
                
                products = self.parse_search_results(response)
                if not products:
                    break
                    
                keyword_results.extend(products)
                print(f"  第{page}页获取 {len(products)} 条数据")
                
                # 限流:避免触发QPS限制
                if page < pages:
                    time.sleep(delay)
            
            all_results[keyword] = keyword_results
            print(f"✅ {keyword} 共获取 {len(keyword_results)} 条数据\n")
        
        return all_results


# ========== 实战演示 ==========
if __name__ == '__main__':
    APP_KEY = 'your_app_key'
    APP_SECRET = 'your_app_secret'
    
    searcher = AlibabaKeywordSearch(APP_KEY, APP_SECRET)
    
    # 单关键词搜索
    print("=" * 60)
    print("【单关键词搜索示例】")
    print("=" * 60)
    
    result = searcher.search_products(
        keyword="无线蓝牙耳机",
        page=1,
        page_size=10,
        price_start=10,
        price_end=100,
        sort="price_asc"
    )
    
    products = searcher.parse_search_results(result)
    for i, p in enumerate(products[:5], 1):
        print(f"{i}. {p['title'][:30]}... | ¥{p['price']} | 销量:{p['sale_count']}")
    
    # 批量关键词搜索
    print("\n" + "=" * 60)
    print("【批量关键词搜索示例】")
    print("=" * 60)
    
    keywords = ["T恤批发", "手机壳", "数据线", "保温杯"]
    batch_results = searcher.batch_search(keywords, pages=2, delay=2)
    
    for kw, items in batch_results.items():
        print(f"📦 {kw}: {len(items)} 条商品")

五、图搜(以图搜货/拍立淘)API实战

5.1 接口概述

1688图搜API(拍立淘/以图搜货)是官方图像搜品接口,支持通过图片URL或Base64编码输入图片,秒级返回同款/相似商品的结构化数据。

核心能力:

  • 上传商品图片 → 返回同款/相似商品

  • 返回商品ID、标题、价格、供应商等结构化数据

  • 支持图片URL或Base64两种输入方式

5.2 核心参数说明

参数名类型必选说明
methodString是接口方法名,如 alibaba.image.search
image_urlString条件图片网络URL(与image_content二选一)
image_contentString条件图片Base64编码(与image_url二选一)
category_idNumber否指定搜索类目,提高精准度
keywordString否配合图片的关键词辅助搜索

5.3 完整调用代码

import base64
import requests
from typing import Optional

class AlibabaImageSearch:
    """1688图搜(拍立淘)API封装"""
    
    def __init__(self, app_key: str, app_secret: str):
        self.signer = AlibabaApiSigner(app_key, app_secret)
        self.api_url = "https://api.1688.com/router/rest"
    
    def search_by_url(
        self,
        image_url: str,
        category_id: Optional[int] = None,
        keyword: Optional[str] = None
    ) -> dict:
        """
        通过图片URL搜索商品
        
        :param image_url: 图片的网络地址
        :param category_id: 指定类目ID(可选)
        :param keyword: 辅助关键词(可选)
        :return: 搜索结果
        """
        params = self.signer.build_base_params()
        params['method'] = 'alibaba.image.search'
        params['image_url'] = image_url
        
        if category_id:
            params['category_id'] = category_id
        if keyword:
            params['keyword'] = keyword
        
        params['sign'] = self.signer.generate_md5_sign(params)
        
        try:
            response = requests.post(
                self.api_url,
                data=params,
                timeout=30
            )
            return response.json()
        except Exception as e:
            return {"error": str(e)}
    
    def search_by_file(
        self,
        image_path: str,
        category_id: Optional[int] = None,
        keyword: Optional[str] = None
    ) -> dict:
        """
        通过本地图片文件搜索商品(Base64编码上传)
        
        :param image_path: 本地图片路径
        :param category_id: 指定类目ID
        :param keyword: 辅助关键词
        :return: 搜索结果
        """
        # 读取图片并Base64编码
        try:
            with open(image_path, 'rb') as f:
                image_bytes = f.read()
                image_base64 = base64.b64encode(image_bytes).decode('utf-8')
        except Exception as e:
            return {"error": f"图片读取失败: {e}"}
        
        params = self.signer.build_base_params()
        params['method'] = 'alibaba.image.search'
        params['image_content'] = image_base64
        
        if category_id:
            params['category_id'] = category_id
        if keyword:
            params['keyword'] = keyword
        
        params['sign'] = self.signer.generate_md5_sign(params)
        
        try:
            response = requests.post(
                self.api_url,
                data=params,
                timeout=60  # 图搜可能需要更长时间
            )
            return response.json()
        except Exception as e:
            return {"error": str(e)}
    
    def parse_image_results(self, response: dict) -> list:
        """
        解析图搜结果
        """
        results = []
        
        # 适配不同返回结构
        if 'imageSearchResponse' in response:
            items = response['imageSearchResponse'].get('items', [])
        elif 'result' in response:
            items = response['result'].get('items', [])
        else:
            items = response.get('items', [])
        
        for item in items:
            result = {
                'product_id': item.get('productId') or item.get('offerId'),
                'title': item.get('subject') or item.get('title'),
                'price': item.get('price'),
                'image_url': item.get('imageUrl') or item.get('mainImage'),
                'similarity': item.get('similarity', 0),  # 相似度分数
                'supplier': item.get('companyName') or item.get('supplier'),
                'detail_url': item.get('detailUrl', ''),
                'min_order': item.get('minOrderQuantity', 1)
            }
            results.append(result)
        
        return results


# ========== 图搜实战演示 ==========
if __name__ == '__main__':
    APP_KEY = 'your_app_key'
    APP_SECRET = 'your_app_secret'
    
    image_searcher = AlibabaImageSearch(APP_KEY, APP_SECRET)
    
    print("=" * 60)
    print("【图搜实战:通过图片URL搜索】")
    print("=" * 60)
    
    # 方式1:通过图片URL搜索
    image_url = "https://example.com/your-product-image.jpg"
    result = image_searcher.search_by_url(
        image_url=image_url,
        category_id=1512,  # 可选:限定在手机数码类目
        keyword="蓝牙耳机"
    )
    
    items = image_searcher.parse_image_results(result)
    print(f"找到 {len(items)} 个相似商品:")
    for i, item in enumerate(items[:5], 1):
        print(f"{i}. {item['title'][:35]}... | ¥{item['price']} | 相似度:{item['similarity']}%")
    
    # 方式2:通过本地文件搜索
    print("\n" + "=" * 60)
    print("【图搜实战:通过本地图片文件搜索】")
    print("=" * 60)
    
    # result = image_searcher.search_by_file(
    #     image_path="/path/to/your/image.jpg",
    #     keyword="手机壳"
    # )
    # items = image_searcher.parse_image_results(result)

六、高级实战:关键词+图搜组合策略

6.1 组合搜索场景

在实际业务中,单一搜索方式往往不够精准。以下是几种高效的组合策略:

场景策略效果
找同款货源先关键词搜索 → 用图搜验证精准定位源头工厂
竞品分析图搜找到竞品 → 关键词搜索同类全面了解市场行情
价格监控图搜锁定商品 → 定期关键词比价实时跟踪价格波动
选品拓展关键词发现趋势 → 图搜找相似款快速扩展产品线

6.2 组合搜索实战代码测试获取key

class AlibabaSearchCombo:
    """1688组合搜索策略:关键词+图搜联动"""
    
    def __init__(self, app_key: str, app_secret: str):
        self.keyword_searcher = AlibabaKeywordSearch(app_key, app_secret)
        self.image_searcher = AlibabaImageSearch(app_key, app_secret)
    
    def find_source_factory(self, product_title: str) -> list:
        """
        找同款货源:先关键词搜索,再用图搜验证
        
        :param product_title: 商品标题
        :return: 源头工厂列表
        """
        print(f"🔍 步骤1:关键词搜索 '{product_title}'")
        
        # 第一步:关键词搜索获取候选商品
        kw_result = self.keyword_searcher.search_products(
            keyword=product_title,
            page=1,
            page_size=10,
            sort="sale"  # 按销量排序
        )
        candidates = self.keyword_searcher.parse_search_results(kw_result)
        
        if not candidates:
            return []
        
        # 取第一个商品的图片进行图搜
        first_product = candidates[0]
        image_url = first_product.get('image_url')
        
        if not image_url:
            return candidates
        
        print(f"🖼️ 步骤2:用图搜验证 '{first_product['title'][:20]}...'")
        
        # 第二步:图搜找同款
        img_result = self.image_searcher.search_by_url(
            image_url=image_url,
            keyword=product_title.split()[0]  # 取第一个词作为辅助关键词
        )
        similar_items = self.image_searcher.parse_image_results(img_result)
        
        # 合并结果,去重
        all_items = candidates + similar_items
        seen_ids = set()
        unique_items = []
        
        for item in all_items:
            pid = item.get('product_id')
            if pid and pid not in seen_ids:
                seen_ids.add(pid)
                unique_items.append(item)
        
        # 按价格升序排列(找最便宜的源头)
        unique_items.sort(key=lambda x: float(x.get('price', 0) or 0))
        
        return unique_items
    
    def price_comparison(self, image_url: str, keyword: str) -> dict:
        """
        价格监控:图搜锁定商品 + 关键词搜索比价
        
        :param image_url: 商品图片URL
        :param keyword: 商品关键词
        :return: 比价结果
        """
        # 图搜获取同款
        img_result = self.image_searcher.search_by_url(image_url, keyword=keyword)
        image_items = self.image_searcher.parse_image_results(img_result)
        
        # 关键词搜索获取同类
        kw_result = self.keyword_searcher.search_products(
            keyword=keyword,
            page=1,
            page_size=50
        )
        keyword_items = self.keyword_searcher.parse_search_results(kw_result)
        
        # 价格分析
        all_prices = []
        for item in image_items + keyword_items:
            price = item.get('price')
            if price and isinstance(price, (int, float)):
                all_prices.append(float(price))
        
        if not all_prices:
            return {"error": "未获取到价格数据"}
        
        return {
            "image_search_count": len(image_items),
            "keyword_search_count": len(keyword_items),
            "min_price": min(all_prices),
            "max_price": max(all_prices),
            "avg_price": round(sum(all_prices) / len(all_prices), 2),
            "median_price": round(sorted(all_prices)[len(all_prices)//2], 2),
            "cheapest_item": min(image_items + keyword_items, 
                                key=lambda x: float(x.get('price', float('inf')) or float('inf')))
        }


# ========== 组合搜索实战 ==========
if __name__ == '__main__':
    APP_KEY = 'your_app_key'
    APP_SECRET = 'your_app_secret'
    
    combo = AlibabaSearchCombo(APP_KEY, APP_SECRET)
    
    # 实战1:找同款货源
    print("=" * 60)
    print("【实战1:找同款货源】")
    print("=" * 60)
    
    sources = combo.find_source_factory("无线蓝牙耳机 降噪")
    print(f"找到 {len(sources)} 个源头:")
    for i, s in enumerate(sources[:5], 1):
        print(f"{i}. {s['title'][:30]}... | ¥{s['price']} | {s['supplier']}")
    
    # 实战2:价格监控
    print("\n" + "=" * 60)
    print("【实战2:价格监控】")
    print("=" * 60)
    
    # price_analysis = combo.price_comparison(
    #     image_url="https://example.com/product.jpg",
    #     keyword="蓝牙耳机"
    # )
    # print(f"最低价格: ¥{price_analysis['min_price']}")
    # print(f"平均价格: ¥{price_analysis['avg_price']}")
    # print(f"最便宜的商品: {price_analysis['cheapest_item']['title']}")

七、性能优化与效率翻倍技巧

7.1 分页与批量处理

class BatchProcessor:
    """批量处理优化"""
    
    def __init__(self, searcher: AlibabaKeywordSearch):
        self.searcher = searcher
    
    def fetch_all_pages(
        self,
        keyword: str,
        max_pages: int = 10,
        page_size: int = 50,
        delay: float = 1.2
    ) -> list:
        """
        获取关键词的所有分页数据
        
        :param max_pages: 最大页数
        :param delay: 请求间隔(遵守QPS限制)
        """
        all_products = []
        
        for page in range(1, max_pages + 1):
            result = self.searcher.search_products(
                keyword=keyword,
                page=page,
                page_size=page_size
            )
            products = self.searcher.parse_search_results(result)
            
            if not products:
                break
            
            all_products.extend(products)
            print(f"  第{page}页: {len(products)}条,累计:{len(all_products)}条")
            
            # 智能延时:根据返回数据量调整
            time.sleep(delay)
        
        return all_products

7.2 缓存策略

import json
from functools import lru_cache

class CachedSearcher(AlibabaKeywordSearch):
    """带缓存的搜索器"""
    
    def __init__(self, app_key: str, app_secret: str, cache_file: str = "search_cache.json"):
        super().__init__(app_key, app_secret)
        self.cache_file = cache_file
        self._load_cache()
    
    def _load_cache(self):
        try:
            with open(self.cache_file, 'r', encoding='utf-8') as f:
                self.cache = json.load(f)
        except FileNotFoundError:
            self.cache = {}
    
    def _save_cache(self):
        with open(self.cache_file, 'w', encoding='utf-8') as f:
            json.dump(self.cache, f, ensure_ascii=False, indent=2)
    
    def search_products(self, **kwargs):
        cache_key = json.dumps(kwargs, sort_keys=True)
        
        if cache_key in self.cache:
            print("📦 命中缓存")
            return self.cache[cache_key]
        
        result = super().search_products(**kwargs)
        self.cache[cache_key] = result
        self._save_cache()
        return result

7.3 并发请求(注意QPS限制)

from concurrent.futures import ThreadPoolExecutor, as_completed

def parallel_search(searcher, keywords: list, max_workers: int = 3) -> dict:
    """
    并发搜索多个关键词(需确保不超过QPS限制)
    
    :param max_workers: 并发数,建议不超过3
    """
    results = {}
    
    with ThreadPoolExecutor(max_workers=max_workers) as executor:
        future_to_kw = {
            executor.submit(searcher.search_products, kw, page=1, page_size=20): kw 
            for kw in keywords
        }
        
        for future in as_completed(future_to_kw):
            kw = future_to_kw[future]
            try:
                result = future.result()
                results[kw] = searcher.parse_search_results(result)
            except Exception as e:
                results[kw] = {"error": str(e)}
    
    return results

八、错误处理与常见问题

8.1 常见错误码

错误码说明解决方案
isv.invalid-parameter参数错误检查必填参数和格式
isv.permission-api-forbiddenAPI权限不足申请对应接口权限
isv.permission-ip-limitIP受限配置服务器IP白名单
isp.call-limited调用频率超限降低QPS,增加延时
isv.invalid-signature签名错误检查签名算法和参数排序
isv.item-not-exist商品不存在检查商品ID是否有效

8.2 完整错误处理封装

class ApiErrorHandler:
    """API错误处理工具"""
    
    @staticmethod
    def handle_response(response: dict) -> dict:
        """
        统一处理API响应
        """
        if 'error_response' in response:
            error = response['error_response']
            code = error.get('code', 'unknown')
            msg = error.get('msg', '未知错误')
            
            error_map = {
                'isv.invalid-signature': "签名错误,请检查App Secret和签名算法",
                'isv.permission-api-forbidden': "API权限不足,请在开放平台申请权限",
                'isp.call-limited': "调用频率超限,请降低请求频率",
                'isv.invalid-parameter': f"参数错误: {msg}",
            }
            
            return {
                'success': False,
                'error_code': code,
                'error_msg': error_map.get(code, msg),
                'raw': response
            }
        
        return {'success': True, 'data': response}

九、总结

能力关键词搜索图搜(拍立淘)
输入方式文字关键词图片URL/Base64
适用场景批量找货、市场分析找同款、竞品追踪
精准度依赖关键词质量图像匹配,更精准
返回速度快(秒级)稍慢(需图像处理)
最佳实践组合使用,先用关键词筛选,再用图搜验证

【AI应用进阶之旅】LangChain大语言模型LLM面试题:LangChain 基础知识 本文梳理了LangChain基础面试题,涵盖核心组件(如ChatModel、PromptTemplate、OutputParser、Runnable等)、模型调用、提示词管理、消息类型及流式/异步调用机制。通过代码示例解析了从模型调用到流程编排的完整开发流程,强调LCEL与Runnable在现代LangChain应用中的核心地位,助力开发者掌握RAG、Agent等进阶技术的基础能力。 阅读详情

相关推荐

LiveGBS流媒体平台GB/T28181实战指南:海康NVR物联网卡摄像头注册失败全链路排查与抓包技巧

本文详细解析了LiveGBS流媒体平台中海康NVR物联网卡摄像头注册失败的常见问题及解决方案。通过全链路排查与抓包技巧,包括物联网卡配置、多网卡冲突处理、防火墙设置等,帮助用户快速定位并解决GB/T28181协议下的设备注册难题,提升流媒体平台部署效率。

weixin_29290947的博客 495

1688关键词搜索api(附可用)

1688接口

ocean_hhn的博客 958

Yolov5s可视化网络结构图

Yolov5共有四种网络结构,每种网络深度和宽度上都不相同。 (1) Yolov5s可视化网络结构图:点击查看 (2) Yolov5m可视化网络结构图:点击查看 (3) Yolov5l可视化网络结构图:点击查看 (4) Yolov5x可视化网络结构图:点击查看 ...

江南研习社 15万+

一键抓取电商平台数据API1688接口API按关键词搜索商品接入演示

4.运行代码,将会输出包含关键词“手机”的商品列表信息。你可以根据需要对返回的数据进行进一步处理和展示。2.编写Python代码,调用API接口进行关键词搜索商品。为你在开放平台上创建的应用的Api Key和Api Secret。,创建一个应用并获取Api Key和Api Secret。接口请求代码响应示例。

2301_78159247的博客 709

华为BEM战略解码体系完整版(85页PPT)(文末有下载方式)

在部门层面,战略解码的核心是将公司战略逐层分解到部门,确保部门目标能够有效支撑公司战略。战略解码的关键原则包括:对公司战略和业务目标的支撑、指标选取考虑部门责任特色、对公司业务流程的支撑、战略解码,华为公司实现了从战略制定到执行的闭环管理,确保了战略目标能够通过可衡量的。战略解码,华为公司实现了从战略制定到执行的闭环管理,确保了战略目标能够通过可衡量的。战略解码体系的核心目标是将公司战略逐层分解,确保战略目标能够通过可衡量的。在公司层面,战略解码的第一步是战略澄清,明确公司的使命、愿景、战略目标及。

AI_data_cloud的博客 2415

莫兰指数stata命令_一文读懂16个sp系列stata空间计量命令及应用

spcompress:Compress Stata-format shapefile压缩数据成stata格式的shapefile2、Looking at data/观测数据2、Looking at data/观测数据grmap:Graph choropleth maps绘制等值区域图spdistance:Calculator for distance between places计算区域之间距离3...

weixin_39719989的博客 823

1688 以图搜货 API(item_search_img)开发

本贴只展示部分结构,「 技术、数据、接口、系统问题欢迎留言私信获取系统演示和API调用 」在电商选品、比价、货源溯源、跨境铺货等实际业务中,已经成为刚需能力。相比关键词搜索,图片搜索不受标题、语种、类目限制,能直接匹配同款 / 相似货源,是 1688 找货最高效的方式之一。1688 官方图片搜索能力封装为API,基于深度学习图像特征匹配,支持传入图片 URL 检索相似商品,并返回结构化商品数据。本文从出发,去掉 AI 式套话,补充技术细节、修复代码问题,提供可直接上线使用的调用方案与最佳实践。

2601_95706522的博客 701

nnDetection实战:手把手教你用Python在自家电脑上跑通第一个肺结节检测模型

本文详细介绍了如何使用nnDetection框架在普通电脑上实现肺结节检测模型的搭建与运行。从环境配置、数据预处理到模型训练与推理,手把手教你完成医学图像检测的全流程,特别适合初学者入门医学AI领域。

weixin_32377497的博客 334

1688关键字搜索商品

简要描述 搜索商品 请求URL http://xxx.xxx.xxx.xxx:xxxx/offer_search 请求方式 get 请求Query参数 参数名 示例值 必选 类型 说明 keywords 裙子 是 string 关键词 token admin.api 是 string 权限token pageIndex 1 是 string 页 成功返回示例 复制{ "data":

m0_56355683的博客 2000

七星棋牌顶级运营产品全开源修复版源码教程:6端支持,200+子游戏玩法,完整搭建指南(含代码解析)

让您从源码下载到本地运行一步到位!此外,文中还将附带详细代码解析与操作步骤,即便没有开发经验,也能轻松完成二开与定制。数据库是棋牌游戏中极为关键的组成部分,用于存储用户信息、乐豆余额、游戏记录、提现申请等数据。以下是部分核心数据表结构示例,便于存储用户信息与游戏记录。AI模块能够控制游戏中的胜率,常用于调节玩家体验。防沉迷功能旨在限制未成年人游戏时间。的完整搭建流程,特别适合。首先,获取七星棋牌源码。本教程将为您详细讲解。

aa2031171的博客 7850

TI 实时操作系统SYS/BIOS使用总结

1:概述: SYS/BIOS 是一个可扩展的实时的操作系统。具有非常快速的响应时间(在中断和任务切换时达到较短的延迟),响应时间的确定性,强壮的抢占系统,优化的内存分配和堆栈管理(尽量少的消耗和碎片)。能够实现系统的模块化并可裁剪。 最大的特点就是:实时。 2:XDCtools: XDCtools 是SYS/BIOS引用的一种实时的软件组件技术(RTSC),它包括一些有用的工具,标准的AP

带头奋青的博客 5万+

1688关键词搜索api item_search_suggest - 获得搜索词推荐

! 1688api item_search_suggest - 获得搜索词推荐 返回值说明: 返回数据: Result Object: { “items”: { “result”: [ [ “_女装% 夏季” ], [ “_女装% 欧美” ], [ “_女装%t恤短袖2019夏季新款” ], [ “_女装% 韩版” ], [ “_女装% 中老年” ], [ “_女装% 跨境” ], [ “_女装% 时尚” ], [ “_女装% 棉麻” ], [ “_女装% 夏季新款” ], [ “_女装% 新款” ] ]

weixin_44353800的博客 545

JEDEC 标准半导体功率循环热阻测试(JESD51 系列)

【代码】JEDEC 标准半导体功率循环热阻测试(JESD51 系列)

专注于前沿技术的探索与实践,热衷于从代码逻辑、架构设计到行业应用等多维度深挖技术本质。期待在技术之路上与你共同成长~ 482

电商效率翻倍:Open Claw 快速对接 1688 接口,实现全自动监控选品(附实战教程)

现在电商竞争,本质是效率竞争。谁能更快找到好货、更低成本拿货、更稳监控市场,谁就能赚到钱。Open Claw 对接 1688 接口这套方案,把选品、搜款、监控、比价全流程自动化,不管是个人兼职还是团队放大,都能快速落地、马上提升效率。

APItesterCris的博客 517

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

电商效率翻倍:用 AI 对接1688商品,抓取商品全量信息

返回:商品 ID、标题、价格、主图、销量等,批量导出 ID 列表。代表:八爪鱼 RPA、影刀、妙手 ERP。,AI 自动清洗结构化,直接用于铺货。

2503_93443381的博客 542

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

阿里巴巴拍立淘API返回值解析与商品信息优化指南

通过以上策略,商家可充分利用拍立淘API返回的数据,实现商品信息的精准优化,提升搜索排名和转化率。

z1205338073的博客 1025

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

电商运营效率翻倍指南:从选品到客服,用桌面自动化工具一站式管店

多一个店多十件事,多十个店不是多一百件事,是多一千件事。规模增长带来的管理成本是指数级的。光靠加班和堆人解决不了这个问题。桌面自动化工具的价值不在于它做了什么创造性的工作,而在于它承担了所有重复性、机械性的劳动——客服回复、数据汇总、竞品监控、报表生成。你只需要在关键节点做决策。即可下载进行尝试一个人管三个店可能很累。但一个人+工具管三个店,刚刚好。文中所提及的操作指令基于当前自动化桌面工具通用能力编写,各工具具体命令格式可能略有差异,请以实际使用版本为准。

2401_89926894的博客 31

反向海淘系统全栈设计,从架构到代码的完整实现

海外用户 → 选购中国商品 → 平台代购 / 代付 → 国内集运 → 跨境物流 → 海外签收。它不是简单的代购工具,而是一套完整的跨境交易体系。多语言 + 多货币国际化支持英、西、泰、越、阿拉伯等主流语言,实时汇率换算,支持信用卡、PayPal、本地电子钱包。商品聚合与电商 API 对接通过官方 / 合规 API 对接淘宝、1688、拼多多、京东,实时同步商品标题、图片、价格、库存、SKU,自动过滤违禁品、仿牌、敏感品。集运仓与智能合单。

2601_95706522的博客 736

跨境代购代采系统“四步法”:中小型企业出海如何降本30%、增速翻倍?

例如,某东南亚家居用品电商平台接入代采系统后,订单处理速度提升50%,客户满意度提高25%,物流成本降低22%,利润率提升18%。通过多语言支持,中小型企业可打破文化壁垒,提升用户体验。例如,某主营时尚服装的企业通过1688代采系统,实现选品效率提升80%,系统自动筛选符合欧洲市场审美的服装款式,并同步多语言商品信息,助力企业快速打开欧洲市场。未来,随着技术的持续迭代与市场需求的深化,代购代采系统将成为中小型企业拓展海外市场、提升竞争力的关键工具,为全球消费者与中国商家之间搭建起更加便捷、高效的贸易桥梁。

Joe13265449558的博客 551

GLM-5.3-CYBERSECURITY-FP8本地量化[3]:工程环境

GLM-5.3-CYBERSECURITY-FP8本地量化[3]:工程环境

缘友一世的博客 410

边缘计算实战:在无外网环境下,如何实现本地 Web 大屏渲染与实时联动?

工业现场断网,大屏瞬间变黑砖?传统拉HDMI线成本高、易受干扰。本文分享一种“去中心化”落地方案:将轻量级Web服务直接下沉至边缘计算网关。详解HTTP分发与原生Socket广播核心代码,手把手教你用极低资源消耗,实现复杂场景下的断网本地自治与实时渲染。

qq_42364035的博客 348

我开源了一个屏幕录 GIF 工具:框选任意区域直接出图,只有 2 个依赖(Python)

仓库直达:[github.com/yund229/RectGif](https://github.com/yund229/RectGif) · exe 在 [Releases](https://github.com/yund229/RectGif/releases)

w_2345678的博客 500

第十八届蓝桥杯青少组图形化真题:校园卡丁车竞速赛解析(全国青少年信息素养大赛·电子学会Scratch考级同源考点)

备考季正酣,几大标志性赛事的时间节点都已经摆上台面。(原蓝桥杯青少组)省级活动 2026 年 10—12 月正在全国铺开,8 座城市的省级线下测评定档在 11 月 7 日至 12 月 26 日,本届主题是"星际拓荒纪元",程序设计组别里的图形化创意编程按初级(U10)、中级(U14)、高级分组,统一 90 分钟现场上机、个人独立完成;

IT_Scratch的博客 257

bool-hybrid-array 的 GPU_opt 与 cjx:一个没显卡就报错的开关,一个把 800 字压到 96 字节的编码

# 十六、把这轮的复现命令贴出来我这轮所有数字都来自下面这一套,别人要复现,照着跑就行:```bashpython3 -m venv /tmp/bha_r16/tmp/bha_r16/bin/pip install “bool-hybrid-array==9.13.12” numpy/tmp/bha_r16/bin/python /tmp/pr17.py/tmp/bha_r16/bin/python /tmp/pr17b.py````pr17.py。文档给的是名字,代码给的是边界,两边都得看。

BKsell的博客 320
上一篇: 调用淘宝API接口获取商品类目:完整开发指南
下一篇: 一文通,第三方接口如何实现批量上货,主流平台[淘宝|京东|1688|抖音)和跨境平台
APIshop
博客等级 码龄1年 109粉丝 175原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址