GenericAdvancedSearch - 增强版搜索API(待上线)

更新时间:2025-04-14 03:35:30

本文介绍通过阿里云OpenAPI SDK调用通用增强搜索接口(GenericAdvancedSearch)的方法以及参数说明。GenericAdvancedSearch相较于GenericSearch提供了更好的权威网页、多样性网页召回,召回网页数量更多。不同query召回网页数量有波动(20~80), 平均召回数量会达到50条。

重要

GenericAdvancedSearch 待上线,敬请期待

接口调用

请求结构体

参数

类型

是否可空

说明

约束

参数

类型

是否可空

说明

约束

query

String

不可空

搜索问题

长度:>=1 and <=100

timeRange

String

可空

查询的时间范围

支持可选值:

  • OneDay:1天内

  • OneWeek:1周内

  • OneMonth:1月内

  • OneYear:1年内

  • NoLimit:无限制(默认值)

industry

String

可空

行业搜索,指定后只返回行业站点的搜索结果,多个行业使用逗号分隔

支持可选值:

  • finance:金融

  • law:法律

  • medical:医疗

  • internet:互联网(精选)

  • tax:税务

  • news_province:新闻省级

  • news_center:新闻中央

安装SDK

Java SDK
Python SDK
Go sdk
C++ SDK
前提条件

已安装Java8或以上版本。

Maven依赖
<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>iqs20241111</artifactId>
    <version>1.1.6</version>
</dependency>
调用代码
package com.aliyun.iqs.example;

import com.alibaba.fastjson.JSON;
import com.aliyun.iqs20241111.Client;
import com.aliyun.iqs20241111.models.GenericAdvancedSearchRequest;
import com.aliyun.iqs20241111.models.GenericAdvancedSearchResponse;
import com.aliyun.iqs20241111.models.GenericSearchResult;
import com.aliyun.teaopenapi.models.Config;
import darabonba.core.exception.TeaException;

public class GenericAdvancedSearchMain {
    public static void main(String[] args) throws Exception {
        Client client = initClient();
        invoke(client,"维特根斯坦", "NoLimit");
    }

    private static Client initClient() throws Exception {
       // TODO: 使用您的AK/SK进行替换
        String accessKeyId = "YOUR_ACCESS_KEY";
        String accessKeySecret = "YOUR_ACCESS_SECRET";
        
       // TODO: 或者通过环境变量加载(建议)
       // String accessKeyId = System.getenv("ACCESS_KEY");
       // String accessKeySecret = System.getenv("ACCESS_SECRET");
        Config config = new Config()
            .setAccessKeyId(accessKeyId)
            .setAccessKeySecret(accessKeySecret);
        config.setEndpoint("iqs.cn-zhangjiakou.aliyuncs.com");
        return new Client(config);
    }

    private static void invoke(Client client, String query, String timeRange)  {
        GenericAdvancedSearchRequest request = new GenericAdvancedSearchRequest();
        request.setQuery(query);
        request.setTimeRange(timeRange);
        try {
            GenericAdvancedSearchResponse response = client.genericAdvancedSearch(request);
            GenericSearchResult result = response.getBody();
            System.out.println(JSON.toJSONString(result));
        } catch (TeaException e) {
            e.printStackTrace();
            System.out.println(e.getMessage());
        }catch (Exception e) {
            e.printStackTrace();
            System.out.println(e.getMessage());
        }
    }
}
前提条件

您需要确保已安装Python3.8或以上版本。

安装SDK
pip3 install alibabacloud_iqs20241111==1.1.6
调用代码
import os
import uuid

from Tea.exceptions import TeaException
from alibabacloud_iqs20241111 import models
from alibabacloud_iqs20241111.client import Client
from alibabacloud_tea_openapi import models as open_api_models


class Sample:
    def __init__(self):
        pass

    @staticmethod
    def create_client() -> Client:
        config = open_api_models.Config(
            # TODO: 使用您的AK/SK进行替换
            access_key_id='YOUR_ACCESS_KEY',
            access_key_secret='YOUR_ACCESS_SECRET'     
            # TODO: 或者通过环境变量加载(建议)
            # access_key_id=os.environ.get('ACCESS_KEY'),
            # access_key_secret=os.environ.get('ACCESS_SECRET')
        )
        config.endpoint = f'iqs.cn-zhangjiakou.aliyuncs.com'
        return Client(config)

    @staticmethod
    def main() -> None:
        client = Sample.create_client()
        run_instances_request = models.GenericAdvancedSearchRequest(
            query='杭州美食',
            time_range="NoLimit",
            session_id=str(uuid.uuid4())
        )
        try:
            response = client.generic_advanced_search(run_instances_request)
            print(f"api success, requestId:{response.body.request_id}, size :{len(response.body.page_items)}")
        except TeaException as e:
            code = e.code
            request_id = e.data.get("requestId")
            message = e.data.get("message")
            print(f"api exception, requestId:{request_id}, code:{code}, message:{message}")


if __name__ == '__main__':
    Sample.main()
前提条件

Go 环境版本必须不低于 1.10.x

安装SDK
require (
  github.com/alibabacloud-go/iqs-20241111 v1.1.6
  github.com/alibabacloud-go/darabonba-openapi/v2 v2.0.10
)
调用代码
package main

import (
	"fmt"
	"log"
	"os"

	openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
	iqs20241111 "github.com/alibabacloud-go/iqs-20241111/client"
	util "github.com/alibabacloud-go/tea-utils/v2/service"
	"github.com/alibabacloud-go/tea/tea"
)

const endpointURL = "iqs.cn-zhangjiakou.aliyuncs.com"

func createClient() (*iqs20241111.Client, error) {
	// TODO: 使用您的AK/SK进行替换
        accessKeyID := "YOUR_ACCESS_KEY"
	accessKeySecret := "YOUR_ACCESS_SECRET"
        // TODO: 或者通过环境变量加载(建议)
	//accessKeyID := os.Getenv("ACCESS_KEY")
	//accessKeySecret := os.Getenv("ACCESS_SECRET")

	if accessKeyID == "" || accessKeySecret == "" {
		return nil, fmt.Errorf("ACCESS_KEY or ACCESS_SECRET environment variable is not set")
	}

	config := &openapi.Config{
		AccessKeyId:     tea.String(accessKeyID),
		AccessKeySecret: tea.String(accessKeySecret),
		Endpoint:        tea.String(endpointURL),
	}

	return iqs20241111.NewClient(config)
}

func runGenericSearch(client *iqs20241111.Client) error {
	request := &iqs20241111.GenericAdvancedSearchRequest{
		Query:     tea.String("杭州美食"),
		TimeRange: tea.String("NoLimit"),
	}
	runtime := &util.RuntimeOptions{}

	resp, err := client.GenericAdvancedSearchWithOptions(request, nil, runtime)
	if err != nil {
		return fmt.Errorf("generic advanced search failed: %w", err)
	}

	fmt.Printf("[%s] response: %s\n", *resp.Body.RequestId, resp.Body)
	return nil
}

func main() {
	client, err := createClient()
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}

	if err := runGenericSearch(client); err != nil {
		log.Fatalf("Error running generic search: %v", err)
	}
}
前提条件
  1. 需要支持C++ 11环境:Windows: Visual Studio 2015或以上版本。Linux: GCC 4.9或以上版本

  2. CMake 3.0以上版本

安装
  1. 下载核心类库代码:git clone https://github.com/aliyun/aliyun-openapi-cpp-sdk.git

  2. 替换/aliyun-openapi-cpp-sdk/core/src/CommonClient.cc内容为以下代码。

/*
 * Copyright 1999-2019 Alibaba Cloud All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <algorithm>
#include <alibabacloud/core/AlibabaCloud.h>
#include <alibabacloud/core/CommonClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
#include <alibabacloud/core/location/LocationClient.h>
#include <ctime>
#include <iomanip>
#include <sstream>

#include <alibabacloud/core/Utils.h>

namespace AlibabaCloud {

namespace {
const std::string SERVICE_NAME = "Common";
}

CommonClient::CommonClient(const Credentials &credentials,
                           const ClientConfiguration &configuration)
    : CoreClient(SERVICE_NAME, configuration),
      credentialsProvider_(
          std::make_shared<SimpleCredentialsProvider>(credentials)),
      signer_(std::make_shared<HmacSha1Signer>()) {}

CommonClient::CommonClient(
    const std::shared_ptr<CredentialsProvider> &credentialsProvider,
    const ClientConfiguration &configuration)
    : CoreClient(SERVICE_NAME, configuration),
      credentialsProvider_(credentialsProvider),
      signer_(std::make_shared<HmacSha1Signer>()) {}

CommonClient::CommonClient(const std::string &accessKeyId,
                           const std::string &accessKeySecret,
                           const ClientConfiguration &configuration)
    : CoreClient(SERVICE_NAME, configuration),
      credentialsProvider_(std::make_shared<SimpleCredentialsProvider>(
          accessKeyId, accessKeySecret)),
      signer_(std::make_shared<HmacSha1Signer>()) {}

CommonClient::~CommonClient() {}

CommonClient::JsonOutcome
CommonClient::makeRequest(const std::string &endpoint, const CommonRequest &msg,
                          HttpRequest::Method method) const {
  auto outcome = AttemptRequest(endpoint, msg, method);
  if (outcome.isSuccess())
    return JsonOutcome(
        std::string(outcome.result().body(), outcome.result().bodySize()));
  else
    return JsonOutcome(outcome.error());
}

CommonClient::CommonResponseOutcome
CommonClient::commonResponse(const CommonRequest &request) const {
  auto outcome = makeRequest(request.domain(), request, request.httpMethod());
  if (outcome.isSuccess())
    return CommonResponseOutcome(CommonResponse(outcome.result()));
  else
    return CommonResponseOutcome(Error(outcome.error()));
}

void CommonClient::commonResponseAsync(
    const CommonRequest &request, const CommonResponseAsyncHandler &handler,
    const std::shared_ptr<const AsyncCallerContext> &context) const {
  auto fn = [this, request, handler, context]() {
    handler(this, request, commonResponse(request), context);
  };

  asyncExecute(new Runnable(fn));
}

CommonClient::CommonResponseOutcomeCallable
CommonClient::commonResponseCallable(const CommonRequest &request) const {
  auto task = std::make_shared<std::packaged_task<CommonResponseOutcome()>>(
      [this, request]() { return this->commonResponse(request); });

  asyncExecute(new Runnable([task]() { (*task)(); }));
  return task->get_future();
}

HttpRequest CommonClient::buildHttpRequest(const std::string &endpoint,
                                           const ServiceRequest &msg,
                                           HttpRequest::Method method) const {
  return buildHttpRequest(endpoint, dynamic_cast<const CommonRequest &>(msg),
                          method);
}

HttpRequest CommonClient::buildHttpRequest(const std::string &endpoint,
                                           const CommonRequest &msg,
                                           HttpRequest::Method method) const {
  if (msg.requestPattern() == CommonRequest::RpcPattern)
    return buildRpcHttpRequest(endpoint, msg, method);
  else
    return buildRoaHttpRequest(endpoint, msg, method);
}

std::string url_encode(const std::string &value) {
    std::ostringstream escaped;
    escaped.fill('0');
    escaped << std::hex;
    
    for (char c : value) {
        if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
            escaped << c;
        } else {
            escaped << '%' << std::setw(2) << int((unsigned char) c);
        }
    }
    
    return escaped.str();
}

HttpRequest
CommonClient::buildRoaHttpRequest(const std::string &endpoint,
                                  const CommonRequest &msg,
                                  HttpRequest::Method method) const {
  const Credentials credentials = credentialsProvider_->getCredentials();

  Url url;
  if (msg.scheme().empty()) {
    url.setScheme("https");
  } else {
    url.setScheme(msg.scheme());
  }
  url.setHost(endpoint);
  url.setPath(msg.resourcePath());

  auto params = msg.queryParameters();
  std::map<std::string, std::string> queryParams;
  for (const auto &p : params) {
    if (!p.second.empty())
      queryParams[p.first] = p.second;
  }

  if (!queryParams.empty()) {
    std::stringstream queryString;
    for (const auto &p : queryParams) {
      if (p.second.empty())
        queryString << "&" << p.first;
      else
        queryString << "&" << p.first << "=" << url_encode(p.second);
    }
    url.setQuery(queryString.str().substr(1));
  }

  HttpRequest request(url);
  request.setMethod(method);

  if (msg.connectTimeout() != kInvalidTimeout) {
    request.setConnectTimeout(msg.connectTimeout());
  } else {
    request.setConnectTimeout(configuration().connectTimeout());
  }

  if (msg.readTimeout() != kInvalidTimeout) {
    request.setReadTimeout(msg.readTimeout());
  } else {
    request.setReadTimeout(configuration().readTimeout());
  }

  if (msg.headerParameter("Accept").empty()) {
    request.setHeader("Accept", "application/json");
  } else {
    request.setHeader("Accept", msg.headerParameter("Accept"));
  }

  std::stringstream ss;
  ss << msg.contentSize();
  request.setHeader("Content-Length", ss.str());
  if (msg.headerParameter("Content-Type").empty()) {
    request.setHeader("Content-Type", "application/octet-stream");
  } else {
    request.setHeader("Content-Type", msg.headerParameter("Content-Type"));
  }
  request.setHeader("Content-MD5",
                    ComputeContentMD5(msg.content(), msg.contentSize()));
  request.setBody(msg.content(), msg.contentSize());

  std::time_t t = std::time(nullptr);
  std::stringstream date;
#if defined(__GNUG__) && __GNUC__ < 5
  char tmbuff[26];
  strftime(tmbuff, 26, "%a, %d %b %Y %T", std::gmtime(&t));
  date << tmbuff << " GMT";
#else
  date << std::put_time(std::gmtime(&t), "%a, %d %b %Y %T GMT");
#endif
  request.setHeader("Date", date.str());
  request.setHeader("Host", url.host());
  request.setHeader("x-sdk-client",
                    std::string("CPP/").append(ALIBABACLOUD_VERSION_STR));
  request.setHeader("x-acs-region-id", configuration().regionId());
  if (!credentials.sessionToken().empty())
    request.setHeader("x-acs-security-token", credentials.sessionToken());
  request.setHeader("x-acs-signature-method", signer_->name());
  request.setHeader("x-acs-signature-nonce", GenerateUuid());
  request.setHeader("x-acs-signature-version", signer_->version());
  request.setHeader("x-acs-version", msg.version());

  std::stringstream plaintext;
  plaintext << HttpMethodToString(method) << "\n"
            << request.header("Accept") << "\n"
            << request.header("Content-MD5") << "\n"
            << request.header("Content-Type") << "\n"
            << request.header("Date") << "\n"
            << canonicalizedHeaders(request.headers());
  if (!queryParams.empty()) {
    std::stringstream queryString;
    for (const auto &p : queryParams) {
      if (p.second.empty())
        queryString << "&" << p.first;
      else
        queryString << "&" << p.first << "=" << p.second;
    }
    url.setQuery(queryString.str().substr(1));
  }
  if (!url.hasQuery())
    plaintext << url.path();
  else
    plaintext << url.path() << "?" << url.query();

  std::stringstream sign;
  sign << "acs " << credentials.accessKeyId() << ":"
       << signer_->generate(plaintext.str(), credentials.accessKeySecret());
  request.setHeader("Authorization", sign.str());
  return request;
}

HttpRequest
CommonClient::buildRpcHttpRequest(const std::string &endpoint,
                                  const CommonRequest &msg,
                                  HttpRequest::Method method) const {
  const Credentials credentials = credentialsProvider_->getCredentials();

  Url url;
  if (msg.scheme().empty()) {
    url.setScheme("https");
  } else {
    url.setScheme(msg.scheme());
  }
  url.setHost(endpoint);
  url.setPath(msg.resourcePath());

  auto params = msg.queryParameters();
  std::map<std::string, std::string> queryParams;
  for (const auto &p : params) {
    if (!p.second.empty())
      queryParams[p.first] = p.second;
  }

  queryParams["AccessKeyId"] = credentials.accessKeyId();
  queryParams["Format"] = "JSON";
  queryParams["RegionId"] = configuration().regionId();
  queryParams["SecurityToken"] = credentials.sessionToken();
  queryParams["SignatureMethod"] = signer_->name();
  queryParams["SignatureNonce"] = GenerateUuid();
  queryParams["SignatureVersion"] = signer_->version();
  std::time_t t = std::time(nullptr);
  std::stringstream ss;
#if defined(__GNUG__) && __GNUC__ < 5
  char tmbuff[26];
  strftime(tmbuff, 26, "%FT%TZ", std::gmtime(&t));
  ss << tmbuff;
#else
  ss << std::put_time(std::gmtime(&t), "%FT%TZ");
#endif
  queryParams["Timestamp"] = ss.str();
  queryParams["Version"] = msg.version();

  std::string bodyParamString;
  auto signParams = queryParams;
  auto bodyParams = msg.bodyParameters();
  for (const auto &p : bodyParams) {
    bodyParamString += "&";
    bodyParamString += (p.first + "=" + UrlEncode(p.second));
    signParams[p.first] = p.second;
  }

  std::stringstream plaintext;
  plaintext << HttpMethodToString(method) << "&" << UrlEncode(url.path()) << "&"
            << UrlEncode(canonicalizedQuery(signParams));
  queryParams["Signature"] =
      signer_->generate(plaintext.str(), credentials.accessKeySecret() + "&");

  std::stringstream queryString;
  for (const auto &p : queryParams)
    queryString << "&" << p.first << "=" << UrlEncode(p.second);
  url.setQuery(queryString.str().substr(1));

  HttpRequest request(url);
  if (msg.connectTimeout() != kInvalidTimeout) {
    request.setConnectTimeout(msg.connectTimeout());
  } else {
    request.setConnectTimeout(configuration().connectTimeout());
  }

  if (msg.readTimeout() != kInvalidTimeout) {
    request.setReadTimeout(msg.readTimeout());
  } else {
    request.setReadTimeout(configuration().readTimeout());
  }

  request.setMethod(method);
  request.setHeader("Host", url.host());
  request.setHeader("x-sdk-client",
                    std::string("CPP/").append(ALIBABACLOUD_VERSION_STR));

  if (!bodyParamString.empty()) {
    request.setBody(bodyParamString.c_str() + 1, bodyParamString.size() - 1);
  }
  return request;
}

} // namespace AlibabaCloud
  1. Linux安装相关依赖:必须安装依赖的外部库文件 libcurl、libopenssl、libuuid、libjsoncpp。

  • 对于 Redhat / Fedora 的系统上安装这些软件包。

# use yum
yum install jsoncpp-devel openssl-devel libuuid-devel libcurl-devel

# use dnf
sudo dnf install libcurl-devel openssl-devel libuuid-devel libjsoncpp-devel
  • 对于 Debian/Ubuntu 的系统。

sudo apt-get install libcurl4-openssl-dev libssl-dev uuid-dev libjsoncpp-dev
  1. 对核心依赖库进行编译:在SDK根目录(aliyun-openapi-cpp-sdk)下执行sudo sh easyinstall.sh core。

调用代码
#include <cstdlib>
#include <iostream>
#include <string>
#include <alibabacloud/core/AlibabaCloud.h>
#include <alibabacloud/core/CommonRequest.h>
#include <alibabacloud/core/CommonClient.h>
#include <alibabacloud/core/CommonResponse.h>

using namespace std;
using namespace AlibabaCloud;

int main(int argc, char** argv)
{
    AlibabaCloud::ClientConfiguration configuration("cn-zhangjiakou");
    // specify timeout when create client.
    configuration.setConnectTimeout(10000);
    configuration.setReadTimeout(10000);
    AlibabaCloud::Credentials credential("your ak", "your sk" );

    AlibabaCloud::CommonClient client(credential, configuration);
    AlibabaCloud::CommonRequest request(AlibabaCloud::CommonRequest::RequestPattern::RoaPattern);
    request.setHttpMethod(AlibabaCloud::HttpRequest::Method::Get);
    request.setDomain("iqs.cn-zhangjiakou.aliyuncs.com");
    request.setVersion("2024-11-11");
    request.setQueryParameter("query", "黑神话");
    request.setQueryParameter("timeRange", "NoLimit");
    request.setResourcePath("/linked-retrieval/linked-retrieval-entry/v2/linkedRetrieval/commands/genericAdvancedSearch");
    request.setRequestPattern(AlibabaCloud::CommonRequest::RequestPattern::RoaPattern);

    request.setHeaderParameter("Content-Type", "application/json");
    auto response = client.commonResponse(request);
    if (response.isSuccess()) {
        printf("request success.\n");
        printf("result: %s\n", response.result().payload().c_str());
    }
    else {
        printf("error: %s\n", response.error().detail().c_str());
    }
    AlibabaCloud::ShutdownSdk();
    return 0;
}

返回结构体

字段

字段类型

是否可空

字段说明

样例

字段

字段类型

是否可空

字段说明

样例

requestId

string

不可空

请求RequestId, 排查问题时可以提供此信息

pageItems[]

cardType

string

不可空

卡片类型,目前支持

  • structure_web_info,标准网页结构;占召回结果的90%以上

  • baike_sc/baike,百科

  • news_uchq,UC新闻

  • wenda_selected,问答

structure_web_info

title

string

不可空

网站标题

2024五一劳动节放假调休时间表(附放假日历)

htmlTitle

string

不可空

网站标题,html内容

<em>2024五一</em>劳动节<em>放假</em>调休<em>时间表</em>(附放假日历)-本地宝

link

string

可空

网站地址,极少量搜索卡片会为空

http://m.sh.bendibao.com/tour/278811.html

displayLink

string

可空

可读的网站地址,极少量搜索卡片会为空

m.sh.bendibao.com

snippet

string

不可空

网页动态摘要,匹配到关键字的部分内容,纯文本格式

2024五一劳动节放假安排:51日至5日放假调休,共5天。428日(星期日)、511日(星期六)上班。

htmlSnippet

string

不可空

网页动态摘要,匹配到关键字的部分内容,最长250字符,html格式

说明

此字段可以作为RAG场景的召回context,如果需要更全的网站正文,可以使用mainText

<em>2024五一</em>劳动节<em>放假安排</em>:51日至5日<em>放假</em>调休,共5天。428日(星期日)、511日(星期六)上班。

publishTime

int64

不可空

发布时间,单位(毫秒),对于部分没有发布时间的网站会使用默认值:0

1714123620000

score

double

不可空

相关度分数

mainText

string

可空

网页正文,默认正文前500字符。如需长正文(前3000字符)请联系您的阿里云客户经理进行开通。

重要

目前已支持structure_web_info、news_uchq等高频召回结果正文解析。

部分节假日安排的通知\n国办发明电〔2023〕7号\n各省、自治区、直辖市人民政府,国务院各部委、各直属机构:\n经国务院批准,现将2024年元旦、春节、清明节、劳动节、端午节、中秋节和国庆节放假调休日期的具体安排通知如下。\n一、元旦: 11日放假,与周末连休。\n二、春节: 210日至17日放假调休,共8天。24日(星期日)、218日(星期日)上班。鼓励各单位结合带薪年休假等制度落实,安排职工在除夕(29日)休息。\n三、清明节: 44日至6日放假调休,共3天。47日(星期日)上班。\n四、劳动节: 51日至5日放假调休,共5天。428日(星期日)、511日(星期六)上班。\n五、端午节: 610日放假,与周末连休。\n六、中秋节: 915日至17日放假调休,共3天。914日(星期六)上班。\n七、国庆节: 101日至7日放假调休,共7天。929日(星期日)、1012日(星期六)上班。\n节假日期间,各地区、各部门要妥善安排好值班和安全、保卫、疫情防控等工作,遇有重大突发事件,要按规定及时报告并妥善处置,确保人民群众祥和平安度过节日假期。\n国务院办公厅      \n20231025日     

markdownText

string

可空

网页内容的markdown格式。

# 国务院办公厅关于2024年部分节假日安排的通知_国务院文件_中国政府网\n\nurl: https://www.gov.cn/govweb/zhengce/zhengceku/202310/content_6911528.htm\n\narticle_title: \n\ntime: \n\n---\n\n<table>\n<tbody>\n<tr>\n<td>\n<table>\n<tbody>\n<tr>\n<td><b>索 引 号:</b></td>\n<td>000014349/2023-00063</td>\n<td><b>主题分类:</b></td>\n<td>综合政务\\其他</td>\n</tr>\n<tr>\n<td><b>发文机关:</b></td>\n<td>国务院办公厅</td>\n<td><b>成文日期:</b></td>\n<td>20231025日</td>\n</tr>\n<tr>\n<td><b>标  题:</b></td>\n<td colspan=\"3\">国务院办公厅关于2024年部分节假日安排的通知</td>\n</tr>\n<tr>\n<td><b>发文字号:</b></td>\n<td>国办发明电〔2023〕7号</td>\n<td><b>发布日期:</b></td>\n<td>20231025日</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>\n\n<table>\n<tbody>\n<tr>\n<td>\n<table>\n<tbody>\n<tr>\n<td>\n<div>\n<div>\n<p><strong>国务院办公厅关于2024年</strong></p>\n<p><strong>部分节假日安排的通知</strong></p>\n<p><span>国办发明电〔2023〕7号</span></p>\n<p>各省、自治区、直辖市人民政府,国务院各部委、各直属机构:</p>\n<p>经国务院批准,现将2024年元旦、春节、清明节、劳动节、端午节、中秋节和国庆节放假调休日期的具体安排通知如下。</p>\n<p><strong>一、元旦:</strong>11日放假,与周末连休。</p>\n<p><strong>二、春节:</strong>210日至17日放假调休,共8天。24日(星期日)、218日(星期日)上班。鼓励各单位结合带薪年休假等制度落实,安排职工在除夕(29日)休息。</p>\n<p><strong>三、清明节:</strong>44日至6日放假调休,共3天。47日(星期日)上班。</p>\n<p><strong>四、劳动节:</strong>51日至5日放假调休,共5天。428日(星期日)、511日(星期六)上班。</p>\n<p><strong>五、端午节:</strong>610日放假,与周末连休。</p>\n<p><strong>六、中秋节:</strong>915日至17日放假调休,共3天。914日(星期六)上班。</p>\n<p><strong>七、国庆节:</strong>101日至7日放假调休,共7天。929日(星期日)、1012日(星期六)上班。</p>\n<p>节假日期间,各地区、各部门要妥善安排好值班和安全、保卫、疫情防控等工作,遇有重大突发事件,要按规定及时报告并妥善处置,确保人民群众祥和平安度过节日假期。</p>\n<p>国务院办公厅      </p>\n<p>20231025日     </p>\n</div>\n</div>\n</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n</tbody>\n</table>

images[]

imageLink

string

可空

图片地址

https://imgbdb4.bendibao.com/shbdb/news/202310/26/20231026112304_25716.jpg

width

int32

可空

宽度:像素

864

height

int32

可空

高度:像素

1704

pageMap

htmlSnippetTruncate

string

可空

网页动态摘要是否被截断,超出长度时会被截断

  • 0:未截断

  • 1:截断

0

mainTextTruncate

string

可空

网页正文是否被截断,超出长度时会被截断

  • 0:未截断

  • 1:截断

  • 2:正文不可用(如mainText空值)

1

hostname

string

可空

站点名

新华网

hostLogo

string

可空

站点的logo

https://s2.zimgs.cn/ims?kt=url&at=smstruct&key=aHR0cHM6Ly9ndy5hbGljZG4uY29tL0wxLzcyMy8xNTY1MjU2NjAwLzJhL2YwL2I0LzJhZjBiNDQxMGI5YmVlMDVjOGVlNGJmODk3MTNkNTFjLnBuZw==&sign=yx:CUlNNQVJQjFrk3Kxt2F3KWhTOFU=&tv=400_400

siteLabel

string

可空

站点标签,当前支持:

  • 权威媒体

  • 党政机关

说明

此字段可以辅助进行权威性判定,为政府认定媒体,故召回率不高。

权威媒体

sceneItems[]

可空

type

string

不可空

类型,支持的类型请见[概览]场景化API召回SceneItem

time

detail

string

不可空

详细信息,结构体请见[概览]场景化API召回SceneItem

{

"title": "东京时间",

"targetTimeZone": "Asia/Tokyo",

"targetTimeMillisecond": "1733999009797",

"targetTime": "2024-12-12 18:23:29",

"beijingTimeZone": "PRC",

"beijingTimeMillisecond": "1733995409797"

queryContext

originalQuery

query

string

不可空

原始请求:query

最近比亚迪的销量如何

timeRange

string

可空

原始请求:timeRange

NoLimit

industry

string

可空

原始请求:industry

page

string

可空

原始请求:page

1

rewrite

enabled

boolean

不可空

改写对本次请求是否开启。会自动评估是否开启(客户维度改写比例>5%时会自动开启)

true

timeRange

string

可空

改写后的timeRange,只有改写后的值与原始timeRange不一致时,才会返回

重要

当客户指定timeRange为非NoLimit值时,timeRange改写会被关闭

OneMonth

searchInformation

total

int64

不可空

总条数

8230595

searchTime

int64

不可空

搜索耗时

1441

错误码

接口错误码

Status

错误码

错误信息

处理方案

Status

错误码

错误信息

处理方案

404

InvalidAccessKeyId.NotFound

Specified access key is not found.

检查并确保AccessKey/Secret正确。

403

Retrieval.NotActivate

Please activate AI search service

请下单或联系您的客户经理进行开通。

403

Retrieval.Arrears

Please recharge first.

账户金额不足,请充值

403

Retrieval.NotAuthorised

Please authorize the AliyunIQSFullAccess privilege to the sub-account.

子账号没有进行授权,参考RAM子用户授权

403

Retrieval.TestUserPeriodExpired

The test period has expired.

测试已到期(自下单后15天有效),可以联系阿里云客户经理转正式

429

Retrieval.Throttling.User

Request was denied due to user flow control.

超出限流规格,可联系阿里云客户经理进行升配

429

Retrieval.TestUserQueryPerDayExceeded

The query per day exceed the limit.

测试超出日限额(1000次/天),可以联系阿里云客户经理转正式

403

Retrieval.AdvancedSearchAccessDenied

Access to the GenericAdvancedSearch API is not authorized.

GenericAdvancedSearch需要单独开通,需要联系阿里云客户经理

  • 本页导读
  • 接口调用
  • 请求结构体
  • 安装SDK
  • 返回结构体
  • 错误码
  • 接口错误码