diff --git a/.gitignore b/.gitignore index 45018bda..c5550607 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,6 @@ logs/scdbserver.log *.mo *.pot -*.pyc \ No newline at end of file +*.pyc + +.venv diff --git a/cmd/docgen/main.go b/cmd/docgen/main.go index dbc763ef..0d345c6a 100644 --- a/cmd/docgen/main.go +++ b/cmd/docgen/main.go @@ -132,7 +132,7 @@ func main() { }).ParseFiles(fileName) check(err) - f, err := os.Create("docs/reference/scql_operators.md") + f, err := os.Create("docs/reference/operators.md") check(err) err = tmpl.Execute(f, filler) check(err) diff --git a/cmd/docgen/scql_operators.md.tmpl b/cmd/docgen/scql_operators.md.tmpl index 57d7863f..7dce8d32 100644 --- a/cmd/docgen/scql_operators.md.tmpl +++ b/cmd/docgen/scql_operators.md.tmpl @@ -1,3 +1,9 @@ +# SCQL Operators Specification + +This is a specification (not a kernel library) of SCQL operators, including operator signatures and semantics. + +## Op List + {{- /*gotype: github.com/secretflow/scql/cmd/docgen.OpDocFiller*/ -}} diff --git a/docs/conf.py b/docs/conf.py index 268b45bd..6ee88ee1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,7 +29,6 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) - # -- Project information ----------------------------------------------------- project = "SCQL" @@ -43,21 +42,20 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - "sphinx.ext.napoleon", - "sphinx.ext.autodoc", - "sphinx.ext.todo", - "sphinx.ext.viewcode", - "sphinx.ext.extlinks", - "sphinx.ext.autosectionlabel", "myst_parser", "nbsphinx", - "sphinxcontrib.actdiag", - "sphinxcontrib.blockdiag", - "sphinxcontrib.nwdiag", - "sphinxcontrib.packetdiag", - "sphinxcontrib.rackdiag", - "sphinxcontrib.seqdiag", + "secretflow_doctools", "sphinx_design", + "sphinx.ext.autodoc", + "sphinx.ext.autosectionlabel", + "sphinx.ext.extlinks", + "sphinx.ext.graphviz", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.napoleon", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + "sphinxcontrib.mermaid", ] # Make sure the target is unique @@ -77,6 +75,7 @@ locale_dirs = ["./locales/"] # path is example but recommended. gettext_compact = False # optional. gettext_uuid = False # optional. +gettext_allow_fuzzy_translations = True # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -87,6 +86,10 @@ # Enable TODO todo_include_todos = True +# The output format for Graphviz when building HTML files. This must be either +# 'png' or 'svg'; the default is 'png'. +graphviz_output_format = "svg" + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for @@ -139,19 +142,9 @@ "tasklist", ] -suppress_warnings = ["myst.header"] +suppress_warnings = ["autosectionlabel", "myst.header"] -myst_gfm_only = True -myst_heading_anchors = 1 -myst_title_to_header = True - - -# app setup hook -def setup(app): - app.add_config_value( - "recommonmark_config", - { - "auto_toc_tree_section": "Contents", - }, - True, - ) +# Enable all MyST features +myst_gfm_only = False +# Enable anchors for heading level h1 through h6 +myst_heading_anchors = 6 diff --git a/docs/development/index.rst b/docs/development/index.rst deleted file mode 100644 index 8502fe03..00000000 --- a/docs/development/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -Development -=========== - -.. toctree:: - :maxdepth: 2 - - scql_api - integrate_scql_system - scql_config_manual diff --git a/docs/getting_started/index.rst b/docs/getting_started/index.rst deleted file mode 100644 index 80be453b..00000000 --- a/docs/getting_started/index.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. _getting_started: - -Getting started -=============== - -New to SCQL? This is the Beginner's Guide. - -If you don't know anything about SCQL, please read :ref:`/getting_started/scql_intro.rst` first. - -After that, you can follow :ref:`/getting_started/quickstart.rst` to get started with SCQL. - -For all SCQL users, please check :ref:`/reference/index.rst` for details. - -For advanced users and contributors, we encourage you to investigate :ref:`/development/index.rst`. - -.. toctree:: - :maxdepth: 2 - - scql_intro - quickstart - how_to_set_ccl - deployment - how_to_use_scql \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index d553be75..b64c4c15 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,10 +9,75 @@ SCQL Documentation Secure Collaborative Query Language (SCQL) is a system that translates SQL statements into a hybrid MPC-plaintext execution graph and executes them on a federation of database systems. The MPC framework is powered by `SPU `_. +Getting started +--------------- + +Follow the :doc:`tutorial ` and try out SCQL on your machine! + + +SCQL Systems +------------ + +- **Overview**: + :doc:`System overview and architecture ` | + :doc:`Common usage ` + +- **Security**: + :doc:`Security overview ` + +- **Reference**: + :doc:`SCQL implementation status ` + + +The SCQL Language +----------------- + +- **Reference**: + :doc:`SCQL language manual ` | + :doc:`Compatibility with MySQL ` + + +Column Control List (CCL) +------------------------- + +- **Overview**: + :doc:`Introduction to CCL ` + +- **Guides**: + :doc:`Common usage and advice ` + +- **Reference**: + :ref:`GRANT and REVOKE ` | + :ref:`How CCL works ` + + +Clients +------- + +- :doc:`Overview of SCQL clients ` +- :doc:`HTTP API reference ` + + +Deployment +---------- + +- **Guides**: + :doc:`How to deploy an SCQL cluster ` + +- **Reference**: + :doc:`SCQL system config ` + + +For contributors +---------------- + +- **Reference**: + :doc:`SCQL operators ` + + .. toctree:: - :maxdepth: 2 - :hidden: - - getting_started/index - reference/index - development/index + :hidden: + + intro/index + topics/index + reference/index diff --git a/docs/intro/index.rst b/docs/intro/index.rst new file mode 100644 index 00000000..7792c30e --- /dev/null +++ b/docs/intro/index.rst @@ -0,0 +1,6 @@ +Introduction +============ + +.. toctree:: + + tutorial diff --git a/docs/getting_started/quickstart.rst b/docs/intro/tutorial.rst similarity index 97% rename from docs/getting_started/quickstart.rst rename to docs/intro/tutorial.rst index 2359d700..be5d49b1 100644 --- a/docs/getting_started/quickstart.rst +++ b/docs/intro/tutorial.rst @@ -1,5 +1,5 @@ -Quickstart -========== +Quickstart tutorial +=================== TL;DR ----- @@ -47,18 +47,18 @@ Generate PrivateKey and Exchange PublicKey bash examples/docker-compose/setup.sh .. note:: - The setup.sh script will generate private key for each party, and exchange public key with peers, add peers public key to authorized_profile.json configuration. + The setup.sh script will generate private key for each party, and exchange public key with peers, add peers public key to authorized_profile.json configuration. Start SCQL Service ------------------ You could start SCQL service via `docker-compose `_, it would deploy and start services as shown in the following figure, it contains a SCDBServer and two SCQLEngines from party ``alice``, ``bob``. -.. image:: ../imgs/scql_quickstart_deploy.png +.. image:: /imgs/scql_quickstart_deploy.png :alt: docker-compose deployment for quickstart example -.. note:: +.. note:: To demonstrate SCQL, we conducted the following simplified operations: 1. The SCDBServer and two other SCQLEngines use the same database server but are separated by distinct database names. @@ -81,7 +81,7 @@ SCDBServer is listening on ``http://localhost:8080``, you could send queries to Create database, user and tables -------------------------------- -.. code-block:: bash +.. code-block:: bash # use scdbclient to connect to scdbserver ./scdbclient prompt --host=http://localhost:8080 --usersConfFileName=examples/docker-compose/client/users.json --sync @@ -106,15 +106,15 @@ Create database, user and tables | demo | +----------+ # create user "alice" with password "some_password" for party "alice" - # note: if you want to use a custom password, + # note: if you want to use a custom password, # please ensure it is consistent with the one configured in `examples/docker-compose/client/users.json` - # + # # NOTE: please paste the create user statement generated by scqltool # ./scqltool genCreateUserStmt --user alice --passwd some_password --party alice --pem examples/docker-compose/engine/alice/conf/ed25519key.pem root> CREATE USER `alice` PARTY_CODE 'alice' IDENTIFIED BY 'some_password' WITH '2023-08-23T20:03:34.268353853+08:00' '/oWeDbslKFQaqM6aOumnQY56i6MQKNNz84v0nkdhniXS0eBNX/q3n4IYz2EkABgKD+nkIVFtBokQqx5fr29CBw==' 'MCowBQYDK2VwAyEAzvfiNl1c1TjcvaTQBAxpG93MzHRGwuUBrPI3qf5N2XQ=' [fetch] OK for DDL/DCL # create user "bob" with password "another_password" for party "bob" - # + # # NOTE: please paste the create user statement generated by scqltool # ./scqltool genCreateUserStmt --user bob --passwd another_password --party bob --pem examples/docker-compose/engine/bob/conf/ed25519key.pem root> CREATE USER `bob` PARTY_CODE 'bob' IDENTIFIED BY 'another_password' WITH '2023-08-23T20:05:30.707053037+08:00' 'M5if0LyzVcBuik1C1MEHw4uGIRI6bH42CMx+O+Zpwu4IplcrQ0om0uhE7JJW910k+IGErep3vZOV8i+Icg2uBg==' 'MCowBQYDK2VwAyEAxWpev3nDG+sp9r3xMJVuqzpmRmXFQNs3e0P1Dj9DRRM=' @@ -174,7 +174,7 @@ Register SCQLEngine Endpoints alice> switch bob bob> alter user bob with ENDPOINT 'engine_bob:8003' -Grant CCL +Grant CCL --------- .. code-block:: bash diff --git a/docs/locales/zh_CN/LC_MESSAGES/getting_started/index.po b/docs/locales/zh_CN/LC_MESSAGES/getting_started/index.po deleted file mode 100644 index 050f3a29..00000000 --- a/docs/locales/zh_CN/LC_MESSAGES/getting_started/index.po +++ /dev/null @@ -1,52 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2023 Ant Group Co., Ltd. -# This file is distributed under the same license as the SCQL package. -# FIRST AUTHOR , 2023. -# -msgid "" -msgstr "" -"Project-Id-Version: SCQL \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-30 20:12+0800\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language: zh_CN\n" -"Language-Team: zh_CN \n" -"Plural-Forms: nplurals=1; plural=0;\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" - -#: ../../getting_started/index.rst:4 -msgid "Getting started" -msgstr "Getting started" - -#: ../../getting_started/index.rst:6 -msgid "New to SCQL? This is the Beginner's Guide." -msgstr "本文档主要用于初学者指南" - -#: ../../getting_started/index.rst:8 -msgid "" -"If you don't know anything about SCQL, please read " -":ref:`/getting_started/scql_intro.rst` first." -msgstr "" -"如果你对 SCQL 系统不了解,请阅读 " -":ref:`/getting_started/scql_intro.rst`." - -#: ../../getting_started/index.rst:10 -msgid "" -"After that, you can follow :ref:`/getting_started/quickstart.rst` to get " -"started with SCQL." -msgstr "在了解完 SCQL 系统后,你可以按照 :ref:`/getting_started/quickstart.rst` 中的指南,快速上手 SCQL 系统" - -#: ../../getting_started/index.rst:12 -msgid "For all SCQL users, please check :ref:`/reference/index.rst` for details." -msgstr "你可以通过阅读 :ref:`/reference/index.rst` 以了解更多" - -#: ../../getting_started/index.rst:14 -msgid "" -"For advanced users and contributors, we encourage you to investigate " -":ref:`/development/index.rst`." -msgstr "对于高级用户和贡献者,我们推荐你阅读 :ref:`/development/index.rst` 以了解更多有关 SCQL 的设计。" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/index.po b/docs/locales/zh_CN/LC_MESSAGES/index.po index 6ac8806a..f128c62e 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/index.po +++ b/docs/locales/zh_CN/LC_MESSAGES/index.po @@ -5,18 +5,18 @@ # msgid "" msgstr "" -"Project-Id-Version: SCQL \n" +"Project-Id-Version: SCQL\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-03 10:11+0800\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2023-10-12 11:46+0800\n" +"PO-Revision-Date: 2023-10-11 20:47+0800\n" +"Last-Translator: \n" "Language: zh_CN\n" "Language-Team: zh_CN \n" "Plural-Forms: nplurals=1; plural=0;\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" #: ../../index.rst:7 msgid "SCQL Documentation" @@ -29,8 +29,106 @@ msgid "" "them on a federation of database systems. The MPC framework is powered by" " `SPU `_." msgstr "" -"Secure Collaborative Query Language (SCQL) 是一种能够将 SQL 语句转换为明密文混合执行图,并在联合数据库系统上执行的系统。" -"该系统的 MPC 框架由 `SPU `_ 提供支持。" -#~ msgid "Content" -#~ msgstr "目录" +"Secure Collaborative Query Language (SCQL) 是一种能够将 SQL " +"语句转换为明密文混合执行图,并在联合数据库系统上执行的系统。该系统的 MPC 框架由 `SPU " +"`_ 提供支持。" + +#: ../../index.rst:13 +msgid "Getting started" +msgstr "开始" + +#: ../../index.rst:15 +msgid "" +"Follow the :doc:`tutorial ` and try out SCQL on your " +"machine!" +msgstr "按照 :doc:`快速教程 ` 在本地尝试 SCQL!" + +#: ../../index.rst:19 +msgid "SCQL Systems" +msgstr "SCQL 系统" + +#: ../../index.rst:21 +msgid "" +"**Overview**: :doc:`System overview and architecture " +"` | :doc:`Common usage `" +msgstr "" +"**概述**::doc:`系统简介及架构设计 ` | :doc:`使用流程 " +"`" + +#: ../../index.rst:25 +msgid "**Security**: :doc:`Security overview `" +msgstr "**安全性**::doc:`安全性说明 `" + +#: ../../index.rst:28 +msgid "" +"**Reference**: :doc:`SCQL implementation status `" +msgstr "**参考**::doc:`SCQL 实现进度 `" + +#: ../../index.rst:33 +msgid "The SCQL Language" +msgstr "SCQL 方言" + +#: ../../index.rst:35 +msgid "" +"**Reference**: :doc:`SCQL language manual ` | " +":doc:`Compatibility with MySQL `" +msgstr "" +"**参考**::doc:`SCQL 方言手册 ` | :doc:`与 MySQL 兼容性 " +"`" + +#: ../../index.rst:41 +msgid "Column Control List (CCL)" +msgstr "" + +#: ../../index.rst:43 +msgid "**Overview**: :doc:`Introduction to CCL `" +msgstr "**概述**::doc:`CCL 机制简介 `" + +#: ../../index.rst:46 +msgid "**Guides**: :doc:`Common usage and advice `" +msgstr "**指南**::doc:`CCL 常见用法与建议 `" + +#: ../../index.rst:49 +msgid "" +"**Reference**: :ref:`GRANT and REVOKE ` | :ref:`How " +"CCL works `" +msgstr "" +"**参考**::ref:`GRANT/REVOKE 语句 ` | :ref:`如何工作 " +"`" + +#: ../../index.rst:55 +msgid "Clients" +msgstr "客户端" + +#: ../../index.rst:57 +msgid ":doc:`Overview of SCQL clients `" +msgstr ":doc:`关于 SCQL 客户端 `" + +#: ../../index.rst:58 +msgid ":doc:`HTTP API reference `" +msgstr ":doc:`HTTP API 参考 `" + +#: ../../index.rst:62 +msgid "Deployment" +msgstr "部署" + +#: ../../index.rst:64 +msgid "" +"**Guides**: :doc:`How to deploy an SCQL cluster `" +msgstr "**指南**::doc:`如何部署 SCQL 集群 `" + +#: ../../index.rst:67 +msgid "**Reference**: :doc:`SCQL system config `" +msgstr "**参考**::doc:`SCQL 系统配置 `" + +#: ../../index.rst:72 +msgid "For contributors" +msgstr "贡献者文档" + +#: ../../index.rst:74 +msgid "**Reference**: :doc:`SCQL operators `" +msgstr "**参考**::doc:`SCQL 算子规范 `" diff --git a/docs/locales/zh_CN/LC_MESSAGES/development/index.po b/docs/locales/zh_CN/LC_MESSAGES/intro/index.po similarity index 78% rename from docs/locales/zh_CN/LC_MESSAGES/development/index.po rename to docs/locales/zh_CN/LC_MESSAGES/intro/index.po index 5e390ca8..703f5fa7 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/development/index.po +++ b/docs/locales/zh_CN/LC_MESSAGES/intro/index.po @@ -3,12 +3,11 @@ # This file is distributed under the same license as the SCQL package. # FIRST AUTHOR , 2023. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-30 20:12+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -17,9 +16,9 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.0\n" -#: ../../development/index.rst:2 -msgid "Development" -msgstr "" +#: ../../intro/index.rst:2 +msgid "Introduction" +msgstr "介绍" diff --git a/docs/locales/zh_CN/LC_MESSAGES/getting_started/quickstart.po b/docs/locales/zh_CN/LC_MESSAGES/intro/tutorial.po similarity index 78% rename from docs/locales/zh_CN/LC_MESSAGES/getting_started/quickstart.po rename to docs/locales/zh_CN/LC_MESSAGES/intro/tutorial.po index 50128b01..748b18dd 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/getting_started/quickstart.po +++ b/docs/locales/zh_CN/LC_MESSAGES/intro/tutorial.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,60 +16,62 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../getting_started/quickstart.rst:2 -msgid "Quickstart" +#: ../../intro/tutorial.rst:2 +msgid "Quickstart tutorial" msgstr "快速开始" -#: ../../getting_started/quickstart.rst:5 +#: ../../intro/tutorial.rst:5 msgid "TL;DR" msgstr "摘要" -#: ../../getting_started/quickstart.rst:7 +#: ../../intro/tutorial.rst:7 msgid "" "Use ``docker-compose`` to deploy a standalone SCQL, then use scdbclient " "to query" msgstr "使用 ``docker-compose`` 来部署一个独立的 SCQL,然后使用 scdbclient 来查询" -#: ../../getting_started/quickstart.rst:11 +#: ../../intro/tutorial.rst:11 msgid "Prerequisites" msgstr "先决条件" -#: ../../getting_started/quickstart.rst:15 +#: ../../intro/tutorial.rst:15 msgid "Build scdbclient & scqltool" msgstr "构建 scdbclient & scqltool" -#: ../../getting_started/quickstart.rst:17 +#: ../../intro/tutorial.rst:17 msgid "" "``scdbclient`` is a command-line client for SCDBServer, we would use it " "to submit queries to SCDBServer and fetch the query results back." msgstr "``scdbclient`` 是 SCDBServer 的一个命令行客户端,我们将用它来向 SCDBServer 提交查询,并取回查询结果。" -#: ../../getting_started/quickstart.rst:30 +#: ../../intro/tutorial.rst:30 msgid "" "``scqltool`` is a command-line tool to help you generate create-user-" "statement query. Since create-user-statement query should contain message" " and its signature signed by party's private key, it is difficult to " "write by hand." -msgstr "``scqltool`` 是一个命令行工具,可以帮助您生成创建用户的 query 语句。由于创建用户的 query 语句应包含消息及其由当事人私钥加签的签名,因此很难手动编写。" +msgstr "" +"``scqltool`` 是一个命令行工具,可以帮助您生成创建用户的 query 语句。由于创建用户的 query " +"语句应包含消息及其由当事人私钥加签的签名,因此很难手动编写。" -#: ../../getting_started/quickstart.rst:43 +#: ../../intro/tutorial.rst:43 msgid "Generate PrivateKey and Exchange PublicKey" msgstr "生成私钥并交换公钥" -#: ../../getting_started/quickstart.rst:50 +#: ../../intro/tutorial.rst:50 msgid "" "The setup.sh script will generate private key for each party, and " "exchange public key with peers, add peers public key to " "authorized_profile.json configuration." msgstr "setup.sh 脚本将为各方生成私钥,并交换各参与方的公钥,将公钥添加到 authorized_profile.json 配置中。" -#: ../../getting_started/quickstart.rst:53 +#: ../../intro/tutorial.rst:53 msgid "Start SCQL Service" msgstr "启动 SCQL 服务" -#: ../../getting_started/quickstart.rst:55 +#: ../../intro/tutorial.rst:55 msgid "" "You could start SCQL service via `docker-compose " "`_," @@ -81,21 +83,21 @@ msgstr "" "来启动 SCQL 服务 ,它将部署和启动服务,如下图所示,它包含一个 SCDBServer 和两个分别来自参与方 ``alice`` 、 " "``bob`` 的 SCQLEngines 。" -#: ../../getting_started/quickstart.rst:-1 +#: ../../intro/tutorial.rst:-1 msgid "docker-compose deployment for quickstart example" msgstr "快速入门示例的 docker-compose 部署" -#: ../../getting_started/quickstart.rst:62 +#: ../../intro/tutorial.rst:62 msgid "To demonstrate SCQL, we conducted the following simplified operations:" msgstr "为了演示 SCQL,我们进行了以下简化操作:" -#: ../../getting_started/quickstart.rst:64 +#: ../../intro/tutorial.rst:64 msgid "" "The SCDBServer and two other SCQLEngines use the same database server but" " are separated by distinct database names." msgstr "SCDBServer 和另外两个 SCQLEngines 使用同一个数据库服务器,但是使用不同的数据库名称进行区分。" -#: ../../getting_started/quickstart.rst:65 +#: ../../intro/tutorial.rst:65 msgid "" "The SCDBServer is served through the HTTP protocol. However, for " "production environments, it is recommended to use HTTPS instead. Please " @@ -104,13 +106,13 @@ msgstr "" "SCDBServer 是通过 HTTP 协议提供服务的。然而,对于生产环境,建议使用 HTTPS 协议来代替。请查看 :ref:`TLS 配置 " "` 以了解详情。" -#: ../../getting_started/quickstart.rst:74 +#: ../../intro/tutorial.rst:74 msgid "" "SCDBServer is listening on ``http://localhost:8080``, you could send " "queries to it via scdbclient." msgstr "SCDBServer 监听 ``http://localhost:8080`` ,你可以通过 scdbclient 向它发送查询。" -#: ../../getting_started/quickstart.rst:77 +#: ../../intro/tutorial.rst:77 msgid "" "Please checkout `examples/docker-compose/README.md " "`_ 故障排除部分以获得帮助。" -#: ../../getting_started/quickstart.rst:82 +#: ../../intro/tutorial.rst:82 msgid "Create database, user and tables" msgstr "创建数据库、用户和数据表" -#: ../../getting_started/quickstart.rst:168 +#: ../../intro/tutorial.rst:168 msgid "Register SCQLEngine Endpoints" msgstr "注册 SCQLEngine Endpoints" -#: ../../getting_started/quickstart.rst:178 +#: ../../intro/tutorial.rst:178 msgid "Grant CCL" msgstr "授权 CCL" -#: ../../getting_started/quickstart.rst:229 +#: ../../intro/tutorial.rst:229 msgid "Do query" msgstr "查询" diff --git a/docs/locales/zh_CN/LC_MESSAGES/development/scql_config_manual.po b/docs/locales/zh_CN/LC_MESSAGES/reference/engine-config.po similarity index 99% rename from docs/locales/zh_CN/LC_MESSAGES/development/scql_config_manual.po rename to docs/locales/zh_CN/LC_MESSAGES/reference/engine-config.po index b22441bd..822698f4 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/development/scql_config_manual.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/engine-config.po @@ -19,8 +19,8 @@ msgstr "" "Generated-By: Babel 2.12.1\n" #: ../../development/scql_config_manual.rst:3 -msgid "SCQL Config Manual" -msgstr "SCQL 配置手册" +msgid "SCQL System Config" +msgstr "SCQL 系统配置" #: ../../development/scql_config_manual.rst:5 msgid "" diff --git a/docs/locales/zh_CN/LC_MESSAGES/development/scql_api.po b/docs/locales/zh_CN/LC_MESSAGES/reference/http-api.po similarity index 100% rename from docs/locales/zh_CN/LC_MESSAGES/development/scql_api.po rename to docs/locales/zh_CN/LC_MESSAGES/reference/http-api.po diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/implementation-status.po b/docs/locales/zh_CN/LC_MESSAGES/reference/implementation-status.po new file mode 100644 index 00000000..212f3172 --- /dev/null +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/implementation-status.po @@ -0,0 +1,227 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023 Ant Group Co., Ltd. +# This file is distributed under the same license as the SCQL package. +# FIRST AUTHOR , 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: SCQL \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-12 08:14+0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: zh_CN\n" +"Language-Team: zh_CN \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.0\n" + +#: ../../reference/implementation-status.rst:2 +msgid "SCQL Implementation Status" +msgstr "SCQL 实现进度" + +#: ../../reference/implementation-status.rst:5 +msgid "SELECT Statement" +msgstr "SELECT 语句" + +#: ../../reference/implementation-status.rst:8 +msgid "syntax" +msgstr "语法" + +#: ../../reference/implementation-status.rst:8 +#: ../../reference/implementation-status.rst:32 +#: ../../reference/implementation-status.rst:59 +msgid "supported(fully/partial/no)" +msgstr "支持程度(完全/部分/未支持)" + +#: ../../reference/implementation-status.rst:8 +#: ../../reference/implementation-status.rst:32 +#: ../../reference/implementation-status.rst:59 +msgid "notes" +msgstr "说明" + +#: ../../reference/implementation-status.rst:10 +msgid "join" +msgstr "join" + +#: ../../reference/implementation-status.rst:10 +#: ../../reference/implementation-status.rst:48 +#: ../../reference/implementation-status.rst:52 +#: ../../reference/implementation-status.rst:63 +#: ../../reference/implementation-status.rst:65 +msgid "partial" +msgstr "部分" + +#: ../../reference/implementation-status.rst:10 +msgid "keyword ``using`` is not supported yet" +msgstr "暂不支持关键字 ``using``" + +#: ../../reference/implementation-status.rst:12 +msgid "where clause" +msgstr "where 子句" + +#: ../../reference/implementation-status.rst:12 +#: ../../reference/implementation-status.rst:14 +#: ../../reference/implementation-status.rst:16 +#: ../../reference/implementation-status.rst:18 +#: ../../reference/implementation-status.rst:20 +#: ../../reference/implementation-status.rst:34 +#: ../../reference/implementation-status.rst:36 +#: ../../reference/implementation-status.rst:38 +#: ../../reference/implementation-status.rst:40 +#: ../../reference/implementation-status.rst:42 +#: ../../reference/implementation-status.rst:44 +#: ../../reference/implementation-status.rst:46 +#: ../../reference/implementation-status.rst:50 +#: ../../reference/implementation-status.rst:61 +msgid "fully" +msgstr "完全" + +#: ../../reference/implementation-status.rst:14 +msgid "group by clause" +msgstr "group by 子句" + +#: ../../reference/implementation-status.rst:16 +msgid "having clause" +msgstr "having 子句" + +#: ../../reference/implementation-status.rst:18 +msgid "union/union all clause" +msgstr "union/union all 子句" + +#: ../../reference/implementation-status.rst:20 +msgid "distinct clause" +msgstr "distinct 子句" + +#: ../../reference/implementation-status.rst:22 +msgid "limit clause" +msgstr "limit 子句" + +#: ../../reference/implementation-status.rst:22 +#: ../../reference/implementation-status.rst:24 +msgid "no" +msgstr "未支持" + +#: ../../reference/implementation-status.rst:24 +msgid "order by clause" +msgstr "order by 子句" + +#: ../../reference/implementation-status.rst:29 +#: ../../reference/implementation-status.rst:32 +msgid "Functions and Operators" +msgstr "函数和运算符" + +#: ../../reference/implementation-status.rst:32 +msgid "Category" +msgstr "类别" + +#: ../../reference/implementation-status.rst:34 +#: ../../reference/implementation-status.rst:36 +#: ../../reference/implementation-status.rst:38 +#: ../../reference/implementation-status.rst:40 +#: ../../reference/implementation-status.rst:42 +msgid "aggregation" +msgstr "聚合运算" + +#: ../../reference/implementation-status.rst:34 +msgid "sum" +msgstr "sum" + +#: ../../reference/implementation-status.rst:36 +msgid "count" +msgstr "count" + +#: ../../reference/implementation-status.rst:38 +msgid "avg" +msgstr "avg" + +#: ../../reference/implementation-status.rst:40 +msgid "min" +msgstr "min" + +#: ../../reference/implementation-status.rst:42 +msgid "max" +msgstr "max" + +#: ../../reference/implementation-status.rst:44 +msgid "arithmetic" +msgstr "算术运算" + +#: ../../reference/implementation-status.rst:44 +msgid "+,-,*,/,div" +msgstr "" + +#: ../../reference/implementation-status.rst:44 +msgid "div means ``integer division``" +msgstr "div: 整数除法" + +#: ../../reference/implementation-status.rst:46 +msgid "logical" +msgstr "逻辑运算" + +#: ../../reference/implementation-status.rst:46 +msgid "logical_and,logical_or,not" +msgstr "logical_and,logical_or,not" + +#: ../../reference/implementation-status.rst:48 +#: ../../reference/implementation-status.rst:50 +msgid "compare" +msgstr "比较运算" + +#: ../../reference/implementation-status.rst:48 +msgid "<,<=,>,>=" +msgstr "<,<=,>,>=" + +#: ../../reference/implementation-status.rst:48 +msgid "string data comparison is not supported" +msgstr "不支持字符串类型数据比较" + +#: ../../reference/implementation-status.rst:50 +msgid "=, !=" +msgstr "=, !=" + +#: ../../reference/implementation-status.rst:52 +msgid "in" +msgstr "in" + +#: ../../reference/implementation-status.rst:52 +msgid "in, not in" +msgstr "in, not in" + +#: ../../reference/implementation-status.rst:52 +msgid "all arguments should be of the same type" +msgstr "所有参数应为同一类型" + +#: ../../reference/implementation-status.rst:56 +msgid "Data Source" +msgstr "数据源" + +#: ../../reference/implementation-status.rst:59 +msgid "Database Type" +msgstr "数据库类型" + +#: ../../reference/implementation-status.rst:61 +msgid "MySQL" +msgstr "" + +#: ../../reference/implementation-status.rst:63 +msgid "PostgreSQL" +msgstr "" + +#: ../../reference/implementation-status.rst:65 +msgid "CSV" +msgstr "" + +#: ../../reference/implementation-status.rst:65 +msgid "Data stored in csv files" +msgstr "数据源为 CSV 文件" + +#: ../../reference/implementation-status.rst:69 +msgid "" +"SCQL supports different databases as data source, but there may be minor " +"differences in the results due to data type differences built in " +"databases. Please choose backend database with caution." +msgstr "SCQL 支持不同的数据库作为数据源,但由于数据库内置的数据类型差异,结果可能会存在细微差异。请谨慎选择后端数据库。" + diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/index.po b/docs/locales/zh_CN/LC_MESSAGES/reference/index.po index 2de917fc..62bfc9fe 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/index.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/index.po @@ -3,12 +3,11 @@ # This file is distributed under the same license as the SCQL package. # FIRST AUTHOR , 2023. # - msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-30 20:26+0800\n" +"POT-Creation-Date: 2023-10-12 08:10+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -17,9 +16,25 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.0\n" #: ../../reference/index.rst:4 +msgid "Language" +msgstr "语言" + +#: ../../reference/index.rst:11 +msgid "System" +msgstr "系统" + +#: ../../reference/index.rst:17 +msgid "Clients" +msgstr "客户端" + +#: ../../reference/index.rst:23 +msgid "Internal Reference" +msgstr "内部开发者参考" + +#: ../../reference/index.rst:2 msgid "Reference" -msgstr "Reference" +msgstr "参考文档" diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_status.po b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/implementation-status.po similarity index 98% rename from docs/locales/zh_CN/LC_MESSAGES/reference/scql_status.po rename to docs/locales/zh_CN/LC_MESSAGES/reference/lang/implementation-status.po index b662546e..3e97fa51 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_status.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/implementation-status.po @@ -19,8 +19,8 @@ msgstr "" "Generated-By: Babel 2.12.1\n" #: ../../reference/scql_status.rst:2 -msgid "SCQL Implementation Status" -msgstr "SCQL 实现进度" +msgid "SCQL Language Implementation Status" +msgstr "SCQL 方言实现进度" #: ../../reference/scql_status.rst:5 msgid "SELECT Statement" diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_manual.po b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/manual.po similarity index 65% rename from docs/locales/zh_CN/LC_MESSAGES/reference/scql_manual.po rename to docs/locales/zh_CN/LC_MESSAGES/reference/lang/manual.po index 34304275..0013f676 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_manual.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/manual.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,138 +16,139 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../reference/scql_manual.rst:2 -msgid "SCQL Manual" -msgstr "SCQL 指南" +#: ../../reference/lang/manual.rst:2 +msgid "SCQL Language Manual" +msgstr "SCQL 方言指南" -#: ../../reference/scql_manual.rst:8 +#: ../../reference/lang/manual.rst:8 msgid "SCQL Data Types" msgstr "SCQL 数据类型" -#: ../../reference/scql_manual.rst:10 +#: ../../reference/lang/manual.rst:10 msgid "" "SCQL supports frequently-used data types, as illustrated in the following" " table." msgstr "SCQL 支持常用的数据类型,如下表所示。" -#: ../../reference/scql_manual.rst:13 +#: ../../reference/lang/manual.rst:13 msgid "Data Type" msgstr "数据类型" -#: ../../reference/scql_manual.rst:13 +#: ../../reference/lang/manual.rst:13 msgid "Alias" msgstr "别名" -#: ../../reference/scql_manual.rst:13 +#: ../../reference/lang/manual.rst:13 msgid "Description" msgstr "描述" -#: ../../reference/scql_manual.rst:15 +#: ../../reference/lang/manual.rst:15 msgid "``integer``" msgstr "``integer``" -#: ../../reference/scql_manual.rst:15 +#: ../../reference/lang/manual.rst:15 msgid "``int``, ``long``, ``int64``" msgstr "``int``, ``long``, ``int64``" -#: ../../reference/scql_manual.rst:17 +#: ../../reference/lang/manual.rst:17 msgid "``float``" msgstr "``float``" -#: ../../reference/scql_manual.rst:17 +#: ../../reference/lang/manual.rst:17 msgid "``float32``" msgstr "``float32``" -#: ../../reference/scql_manual.rst:19 +#: ../../reference/lang/manual.rst:19 msgid "``double``" msgstr "``double``" -#: ../../reference/scql_manual.rst:19 +#: ../../reference/lang/manual.rst:19 msgid "``float64``" msgstr "``float64``" -#: ../../reference/scql_manual.rst:21 +#: ../../reference/lang/manual.rst:21 msgid "``string``" msgstr "``string``" -#: ../../reference/scql_manual.rst:21 +#: ../../reference/lang/manual.rst:21 msgid "``str``" msgstr "``str``" -#: ../../reference/scql_manual.rst:23 +#: ../../reference/lang/manual.rst:23 msgid "``datetime``" msgstr "``datetime``" -#: ../../reference/scql_manual.rst:23 ../../reference/scql_manual.rst:25 +#: ../../reference/lang/manual.rst:23 ../../reference/lang/manual.rst:25 msgid "not supported yet, coming soon" msgstr "暂不支持,即将推出" -#: ../../reference/scql_manual.rst:25 +#: ../../reference/lang/manual.rst:25 msgid "``timestamp``" msgstr "``timestamp``" -#: ../../reference/scql_manual.rst:31 +#: ../../reference/lang/manual.rst:32 msgid "SCQL Statements" msgstr "SCQL 语句" -#: ../../reference/scql_manual.rst:33 +#: ../../reference/lang/manual.rst:34 msgid "" "SCQL is compatible with most MySQL syntax, which makes it easy to use. " "For syntax differences between SCQL and MySQL, please read " -":doc:`mysql_compatibility`." +":doc:`/reference/lang/mysql-compatibility`." msgstr "" "SCQL 兼容大多数 MySQL 语法,这使得它易于使用。关于 SCQL 和 MySQL 之间的语法差异,请阅读 " -":doc:`mysql_compatibility` 。" +":doc:`/reference/lang/mysql-compatibility` 。" -#: ../../reference/scql_manual.rst:38 +#: ../../reference/lang/manual.rst:39 msgid "CREATE/DROP/ALTER USER Statement" msgstr "CREATE/DROP/ALTER USER 语句" -#: ../../reference/scql_manual.rst:61 ../../reference/scql_manual.rst:91 -#: ../../reference/scql_manual.rst:121 ../../reference/scql_manual.rst:161 +#: ../../reference/lang/manual.rst:62 ../../reference/lang/manual.rst:92 +#: ../../reference/lang/manual.rst:122 ../../reference/lang/manual.rst:162 msgid "Examples:" msgstr "样例:" -#: ../../reference/scql_manual.rst:82 +#: ../../reference/lang/manual.rst:83 msgid "CREATE/DROP DATABASE Statement" msgstr "CREATE/DROP DATABASE 语句" -#: ../../reference/scql_manual.rst:105 +#: ../../reference/lang/manual.rst:106 msgid "CREATE/DROP TABLE Statement" msgstr "CREATE/DROP TABLE 语句" -#: ../../reference/scql_manual.rst:118 +#: ../../reference/lang/manual.rst:119 msgid "" "Create table here means mapping 'tbl_name' to the existing physic table, " "which is specified by ``REF_TABLE`` option and located on the query " "issuer party. In SCQL, user runs queries on virtual table, which helps " "simplify privilege control and usage." msgstr "" -"此处创建表意味着将 'tbl_name' 映射到现有的物理表,该物理表由 ``REF_TABLE`` 选项指定并位于查询发出方。在 SCQL 中,用户在虚拟表上运行查询,这有助于简化权限控制和使用" +"此处创建表意味着将 'tbl_name' 映射到现有的物理表,该物理表由 ``REF_TABLE`` 选项指定并位于查询发出方。在 SCQL " +"中,用户在虚拟表上运行查询,这有助于简化权限控制和使用" -#: ../../reference/scql_manual.rst:140 +#: ../../reference/lang/manual.rst:141 msgid "GRANT/REVOKE Statement" msgstr "GRANT/REVOKE 语句" -#: ../../reference/scql_manual.rst:176 +#: ../../reference/lang/manual.rst:177 msgid "SHOW/DESCRIBE Statement" msgstr "SHOW/DESCRIBE 语句" -#: ../../reference/scql_manual.rst:190 +#: ../../reference/lang/manual.rst:191 msgid "SELECT Statement" msgstr "SELECT 语句" -#: ../../reference/scql_manual.rst:253 +#: ../../reference/lang/manual.rst:254 msgid "Functions and Operators" msgstr "函数与操作符" -#: ../../reference/scql_manual.rst:255 +#: ../../reference/lang/manual.rst:256 msgid "Todo" msgstr "待办" -#: ../../reference/scql_manual.rst:255 +#: ../../reference/lang/manual.rst:256 msgid "this part is not ready, please check later" msgstr "该部分尚未准备好,请之后查看" diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/mysql_compatibility.po b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/mysql-compatibility.po similarity index 66% rename from docs/locales/zh_CN/LC_MESSAGES/reference/mysql_compatibility.po rename to docs/locales/zh_CN/LC_MESSAGES/reference/lang/mysql-compatibility.po index 0982e540..fd0f8015 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/mysql_compatibility.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/mysql-compatibility.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-12 08:10+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,144 +16,149 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../reference/mysql_compatibility.rst:2 +#: ../../reference/lang/mysql-compatibility.rst:2 msgid "MySQL Compatibility" msgstr "与 MySQL 的兼容性" -#: ../../reference/mysql_compatibility.rst:4 +#: ../../reference/lang/mysql-compatibility.rst:4 msgid "" "SCQL is highly compatible with MySQL, but there are still some syntax " "differences." msgstr "SCQL 与 MySQL 高度兼容,但仍有一些语法差异。" -#: ../../reference/mysql_compatibility.rst:7 +#: ../../reference/lang/mysql-compatibility.rst:7 msgid "Unsupported Features" msgstr "不支持的功能" -#: ../../reference/mysql_compatibility.rst:9 +#: ../../reference/lang/mysql-compatibility.rst:9 msgid "Partition table" msgstr "分区表" -#: ../../reference/mysql_compatibility.rst:10 +#: ../../reference/lang/mysql-compatibility.rst:10 msgid "Character sets" msgstr "字符集" -#: ../../reference/mysql_compatibility.rst:11 +#: ../../reference/lang/mysql-compatibility.rst:11 msgid "User-defined functions" msgstr "用户自定义的函数" -#: ../../reference/mysql_compatibility.rst:12 +#: ../../reference/lang/mysql-compatibility.rst:12 msgid "TCL(Transaction Control Language)" msgstr "TCL(事务控制语言)" -#: ../../reference/mysql_compatibility.rst:13 +#: ../../reference/lang/mysql-compatibility.rst:13 msgid "DML(Data Manipulation Language)" msgstr "DML(数据操作语言)" -#: ../../reference/mysql_compatibility.rst:16 +#: ../../reference/lang/mysql-compatibility.rst:16 msgid "Features that are different from MySQL" msgstr "与 MySQL 存在语法差异的功能" -#: ../../reference/mysql_compatibility.rst:19 +#: ../../reference/lang/mysql-compatibility.rst:19 msgid "DDL(Data Definition Language)" msgstr "DDL(数据定义语言)" -#: ../../reference/mysql_compatibility.rst:22 +#: ../../reference/lang/mysql-compatibility.rst:22 msgid "CREATE Table" msgstr "创建表" -#: ../../reference/mysql_compatibility.rst:23 +#: ../../reference/lang/mysql-compatibility.rst:23 msgid "" "The Table created in SCQL is a virtual Table and needs to be mapped to " "the actual Table, so we extend the statement to transfer the mapping " -"information. For more information, please read :doc:`scql_manual`." -msgstr "SCQL 中创建的 Table 是一个虚拟 Table,需要映射到实际 Table,所以我们扩展该语句来传递映射信息。更多信息,请阅读 :doc:`scql_manual`。" +"information. For more information, please read " +":doc:`/reference/lang/manual`." +msgstr "" +"SCQL 中创建的 Table 是一个虚拟 Table,需要映射到实际 Table,所以我们扩展该语句来传递映射信息。更多信息,请阅读 " +":doc:`/reference/lang/manual`。" -#: ../../reference/mysql_compatibility.rst:27 +#: ../../reference/lang/mysql-compatibility.rst:27 msgid "DQL(Data Query Language)" msgstr "DQL(数据查询语言)" -#: ../../reference/mysql_compatibility.rst:29 -msgid "About implementation status, please read :doc:`scql_status`" -msgstr "关于实现的具体情况,请阅读 :doc:`scql_status`。" +#: ../../reference/lang/mysql-compatibility.rst:29 +msgid "" +"About implementation status, please read :doc:`/reference/implementation-" +"status`." +msgstr "关于实现的具体情况,请阅读 :doc:`/reference/implementation-status`。" -#: ../../reference/mysql_compatibility.rst:32 +#: ../../reference/lang/mysql-compatibility.rst:32 msgid "Type Null is unsupported in SCQL." msgstr "SCQL 不支持 Null 类型。" -#: ../../reference/mysql_compatibility.rst:35 +#: ../../reference/lang/mysql-compatibility.rst:35 msgid "Functions different from MySQL" msgstr "与 MySQL 的功能差异" -#: ../../reference/mysql_compatibility.rst:38 +#: ../../reference/lang/mysql-compatibility.rst:38 msgid "Function Name" msgstr "功能名称" -#: ../../reference/mysql_compatibility.rst:38 +#: ../../reference/lang/mysql-compatibility.rst:38 msgid "In SCQL" msgstr "SCQL 的方式" -#: ../../reference/mysql_compatibility.rst:38 +#: ../../reference/lang/mysql-compatibility.rst:38 msgid "In MySQL" msgstr "MySQL 的方式" -#: ../../reference/mysql_compatibility.rst:38 +#: ../../reference/lang/mysql-compatibility.rst:38 msgid "Note" msgstr "备注" -#: ../../reference/mysql_compatibility.rst:40 +#: ../../reference/lang/mysql-compatibility.rst:40 msgid "SUM(INT)" msgstr "SUM(INT) 整数求和" -#: ../../reference/mysql_compatibility.rst:40 +#: ../../reference/lang/mysql-compatibility.rst:40 msgid "returns int" msgstr "返回整型 int" -#: ../../reference/mysql_compatibility.rst:40 +#: ../../reference/lang/mysql-compatibility.rst:40 msgid "returns Decimal/Double" msgstr "返回小数 Decimal /双精度 Double" -#: ../../reference/mysql_compatibility.rst:42 +#: ../../reference/lang/mysql-compatibility.rst:42 msgid "Aggregation Functions With Group BY" msgstr "使用 Group BY 的聚合函数" -#: ../../reference/mysql_compatibility.rst:42 +#: ../../reference/lang/mysql-compatibility.rst:42 msgid "return groups which have more than three elements" msgstr "返回包含三个以上元素的组" -#: ../../reference/mysql_compatibility.rst:42 +#: ../../reference/lang/mysql-compatibility.rst:42 msgid "return all groups" msgstr "返回所有组" -#: ../../reference/mysql_compatibility.rst:42 +#: ../../reference/lang/mysql-compatibility.rst:42 msgid "for safety" msgstr "出于安全性考虑" -#: ../../reference/mysql_compatibility.rst:47 +#: ../../reference/lang/mysql-compatibility.rst:47 msgid "DCL(Data Control Language)" msgstr "DCL(数据控制语言)" -#: ../../reference/mysql_compatibility.rst:50 +#: ../../reference/lang/mysql-compatibility.rst:50 msgid "GRANT/REVOKE" msgstr "GRANT/REVOKE" -#: ../../reference/mysql_compatibility.rst:52 +#: ../../reference/lang/mysql-compatibility.rst:52 msgid "" "Except permissions same with mysql such as read/write/create/drop..., ccl" " settings are also required before executing a query. You can change CCL " "settings via GRANT/REVOKE. About GRANT/REVOKE in SCQL, please read " -":doc:`scql_manual`." +":doc:`/reference/lang/manual`." msgstr "" "除了读、写、创建表格、删除数据等与 mysql 相同的权限之外,在执行查询之前还需要设置 ccl。 可以通过 GRANT/REVOKE 更改 " -"CCL 的设置。 关于 SCQL 中的 GRANT/REVOKE 的操作,请阅读 :doc:`scql_manual`" +"CCL 的设置。 关于 SCQL 中的 GRANT/REVOKE 的操作,请阅读 :doc:`/reference/lang/manual`" -#: ../../reference/mysql_compatibility.rst:55 +#: ../../reference/lang/mysql-compatibility.rst:55 msgid "Type Conversion Rule" msgstr "类型转换规则" -#: ../../reference/mysql_compatibility.rst:57 +#: ../../reference/lang/mysql-compatibility.rst:57 msgid "" "Type conversion takes place when using an operator with operands of " "different types, to make them compatible. Some conversions occur " @@ -161,15 +166,15 @@ msgid "" "necessary" msgstr "考虑兼容性,当使用运算符操作不同类型的数据时,会发生类型转换。有些转换是隐式发生的。例如,SCQL 会根据需要自动将 int 转换为 float。" -#: ../../reference/mysql_compatibility.rst:71 +#: ../../reference/lang/mysql-compatibility.rst:71 msgid "The following rules describe how conversion occurs in SCQL." msgstr "以下规则描述了如何在 SCQL 中进行类型转换。" -#: ../../reference/mysql_compatibility.rst:76 +#: ../../reference/lang/mysql-compatibility.rst:76 msgid "single-party query" msgstr "单方查询" -#: ../../reference/mysql_compatibility.rst:77 +#: ../../reference/lang/mysql-compatibility.rst:77 msgid "" "If a query only involves one participant, SCQL will convert the query " "into a syntax that conforms to the participant's database (such as " @@ -180,61 +185,62 @@ msgstr "" "如果只有一方查询,SCQL 会将查询语句转换成符合参与者数据库(如 MySQL)的语法,然后直接分派到相应的数据库中执行。 " "因此对于单方查询,其类型转换规则一般与参与方使用的数据库类型一致。" -#: ../../reference/mysql_compatibility.rst:82 +#: ../../reference/lang/mysql-compatibility.rst:82 msgid "multi-party query" msgstr "多方查询" -#: ../../reference/mysql_compatibility.rst:83 +#: ../../reference/lang/mysql-compatibility.rst:83 msgid "" "If a query involves multiple participants, SCQL will execute type " "conversion by applying the following rules." msgstr "如果涉及多方查询,SCQL 将通过以下规则进行类型转换。" -#: ../../reference/mysql_compatibility.rst:86 +#: ../../reference/lang/mysql-compatibility.rst:86 msgid "Compare(>, <, <=, >=, <>, =, !=)" msgstr "比较运算 (>, <, <=, >=, <>, =, !=)" -#: ../../reference/mysql_compatibility.rst:87 +#: ../../reference/lang/mysql-compatibility.rst:87 msgid "Both arguments in a comparison operation shouldn't be string." msgstr "比较操作中的两个参数都不能是 string 类型。" -#: ../../reference/mysql_compatibility.rst:88 +#: ../../reference/lang/mysql-compatibility.rst:88 msgid "If both arguments are long, they are compared as long." msgstr "如果两个参数都是 long 类型,则它们将按照 long 类型进行比较。" -#: ../../reference/mysql_compatibility.rst:89 +#: ../../reference/lang/mysql-compatibility.rst:89 msgid "" "If one of the arguments is float or double, the other argument will be " "compared as double." msgstr "如果其中一个参数是 float 或者 double 类型,则会将另一个参数转换为 double 类型进行比较。" -#: ../../reference/mysql_compatibility.rst:92 +#: ../../reference/lang/mysql-compatibility.rst:92 msgid "Arithmetic(+, -, \\*, /, %)" msgstr "算术运算 (+, -, \\*, /, %)" -#: ../../reference/mysql_compatibility.rst:93 +#: ../../reference/lang/mysql-compatibility.rst:93 msgid "Both arguments in a arithmetic operation shouldn't be string." msgstr "算术运算中的两个参数都不能是 string 类型。" -#: ../../reference/mysql_compatibility.rst:94 +#: ../../reference/lang/mysql-compatibility.rst:94 msgid "If both arguments are long, they are calculated as long." msgstr "如果两个参数都是 long 类型,则它们将按照 long 类型进行计算。" -#: ../../reference/mysql_compatibility.rst:95 -#: ../../reference/mysql_compatibility.rst:101 +#: ../../reference/lang/mysql-compatibility.rst:95 +#: ../../reference/lang/mysql-compatibility.rst:101 msgid "" "If one of the arguments is float or double, the other argument will be " "calculated as double." msgstr "如果其中一个参数是 float 或者 double 类型,则会将另一个参数转换为 double 进行计算。" -#: ../../reference/mysql_compatibility.rst:98 +#: ../../reference/lang/mysql-compatibility.rst:98 msgid "Aggregation(sum, count, avg, min, max)" msgstr "聚合操作 (sum, count, avg, min, max)" -#: ../../reference/mysql_compatibility.rst:99 +#: ../../reference/lang/mysql-compatibility.rst:99 msgid "All arguments in a aggregation function shouldn't be string." msgstr "聚合操作中的所有参数都不能是 string 类型。" -#: ../../reference/mysql_compatibility.rst:100 +#: ../../reference/lang/mysql-compatibility.rst:100 msgid "If all arguments are long, they are calculated as long." msgstr "如果所有参数都是 long 类型,则它们将按照 long 类型进行计算。" + diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_operators.po b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/operators.po similarity index 99% rename from docs/locales/zh_CN/LC_MESSAGES/reference/scql_operators.po rename to docs/locales/zh_CN/LC_MESSAGES/reference/lang/operators.po index 50e8ec78..1003e0f8 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_operators.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/lang/operators.po @@ -3,7 +3,6 @@ # This file is distributed under the same license as the SCQL package. # FIRST AUTHOR , 2023. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: SCQL \n" diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_operators_doc.po b/docs/locales/zh_CN/LC_MESSAGES/reference/operators.po similarity index 52% rename from docs/locales/zh_CN/LC_MESSAGES/reference/scql_operators_doc.po rename to docs/locales/zh_CN/LC_MESSAGES/reference/operators.po index f618c58c..bfdd5420 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_operators_doc.po +++ b/docs/locales/zh_CN/LC_MESSAGES/reference/operators.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-12 08:14+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,345 +16,280 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../reference/scql_operators_doc.rst:2 +#: ../../reference/operators.md:1 msgid "SCQL Operators Specification" msgstr "SCQL 算子规范" -#: ../../reference/scql_operators_doc.rst:4 +#: ../../reference/operators.md:3 msgid "" "This is a specification (not a kernel library) of SCQL operators, " "including operator signatures and semantics." msgstr "本文将介绍 SCQL 支持的算子(不是内核库), 包括算子的签名和语义。" -#: ../../reference/scql_operators_doc.rst:7 +#: ../../reference/operators.md:5 msgid "Op List" msgstr "算子列表" -#: ../../reference/scql_operators.md:2 +#: ../../reference/operators.md:8 msgid "`Add`" msgstr "``Add``" -#: ../../reference/scql_operators.md:4 +#: ../../reference/operators.md:10 msgid "Definition: Out = Left `Add` Right" msgstr "定义:对两个 tensor 进行求和运算, Out = (Left + Right) 。" -#: ../../reference/scql_operators.md:6 ../../reference/scql_operators.md:44 -#: ../../reference/scql_operators.md:84 ../../reference/scql_operators.md:118 -#: ../../reference/scql_operators.md:149 ../../reference/scql_operators.md:194 -#: ../../reference/scql_operators.md:233 ../../reference/scql_operators.md:265 -#: ../../reference/scql_operators.md:295 ../../reference/scql_operators.md:327 -#: ../../reference/scql_operators.md:366 ../../reference/scql_operators.md:402 -#: ../../reference/scql_operators.md:428 ../../reference/scql_operators.md:458 -#: ../../reference/scql_operators.md:496 ../../reference/scql_operators.md:531 -#: ../../reference/scql_operators.md:568 ../../reference/scql_operators.md:605 -#: ../../reference/scql_operators.md:642 ../../reference/scql_operators.md:679 -#: ../../reference/scql_operators.md:722 ../../reference/scql_operators.md:759 -#: ../../reference/scql_operators.md:796 ../../reference/scql_operators.md:877 -#: ../../reference/scql_operators.md:922 ../../reference/scql_operators.md:978 -#: ../../reference/scql_operators.md:1023 -#: ../../reference/scql_operators.md:1053 -#: ../../reference/scql_operators.md:1091 -#: ../../reference/scql_operators.md:1123 -#: ../../reference/scql_operators.md:1153 -#: ../../reference/scql_operators.md:1183 -#: ../../reference/scql_operators.md:1215 -#: ../../reference/scql_operators.md:1241 -#: ../../reference/scql_operators.md:1267 -#: ../../reference/scql_operators.md:1297 -#: ../../reference/scql_operators.md:1327 -#: ../../reference/scql_operators.md:1357 -#: ../../reference/scql_operators.md:1381 -#: ../../reference/scql_operators.md:1419 -#: ../../reference/scql_operators.md:1453 -#: ../../reference/scql_operators.md:1489 -#: ../../reference/scql_operators.md:1521 -#: ../../reference/scql_operators.md:1555 -#: ../../reference/scql_operators.md:1589 -#: ../../reference/scql_operators.md:1615 -#: ../../reference/scql_operators.md:1649 -#: ../../reference/scql_operators.md:1680 -#: ../../reference/scql_operators.md:1711 -#: ../../reference/scql_operators.md:1742 -#: ../../reference/scql_operators.md:1766 -#: ../../reference/scql_operators.md:1805 -#: ../../reference/scql_operators.md:1851 -#: ../../reference/scql_operators.md:1883 -#: ../../reference/scql_operators.md:1929 +#: ../../reference/operators.md:12 ../../reference/operators.md:50 +#: ../../reference/operators.md:90 ../../reference/operators.md:124 +#: ../../reference/operators.md:155 ../../reference/operators.md:200 +#: ../../reference/operators.md:239 ../../reference/operators.md:271 +#: ../../reference/operators.md:301 ../../reference/operators.md:333 +#: ../../reference/operators.md:372 ../../reference/operators.md:408 +#: ../../reference/operators.md:434 ../../reference/operators.md:464 +#: ../../reference/operators.md:502 ../../reference/operators.md:537 +#: ../../reference/operators.md:574 ../../reference/operators.md:611 +#: ../../reference/operators.md:648 ../../reference/operators.md:685 +#: ../../reference/operators.md:728 ../../reference/operators.md:765 +#: ../../reference/operators.md:802 ../../reference/operators.md:883 +#: ../../reference/operators.md:928 ../../reference/operators.md:984 +#: ../../reference/operators.md:1029 ../../reference/operators.md:1059 +#: ../../reference/operators.md:1097 ../../reference/operators.md:1129 +#: ../../reference/operators.md:1159 ../../reference/operators.md:1189 +#: ../../reference/operators.md:1221 ../../reference/operators.md:1247 +#: ../../reference/operators.md:1273 ../../reference/operators.md:1303 +#: ../../reference/operators.md:1333 ../../reference/operators.md:1363 +#: ../../reference/operators.md:1387 ../../reference/operators.md:1425 +#: ../../reference/operators.md:1459 ../../reference/operators.md:1495 +#: ../../reference/operators.md:1527 ../../reference/operators.md:1561 +#: ../../reference/operators.md:1595 ../../reference/operators.md:1621 +#: ../../reference/operators.md:1655 ../../reference/operators.md:1686 +#: ../../reference/operators.md:1717 ../../reference/operators.md:1748 +#: ../../reference/operators.md:1772 ../../reference/operators.md:1811 +#: ../../reference/operators.md:1857 ../../reference/operators.md:1889 +#: ../../reference/operators.md:1935 msgid "**Inputs:**" msgstr "**输入:**" -#: ../../reference/scql_operators.md:8 ../../reference/scql_operators.md:267 -#: ../../reference/scql_operators.md:329 ../../reference/scql_operators.md:430 -#: ../../reference/scql_operators.md:460 ../../reference/scql_operators.md:924 -#: ../../reference/scql_operators.md:1025 -#: ../../reference/scql_operators.md:1055 -#: ../../reference/scql_operators.md:1125 -#: ../../reference/scql_operators.md:1155 -#: ../../reference/scql_operators.md:1269 -#: ../../reference/scql_operators.md:1299 -#: ../../reference/scql_operators.md:1329 -#: ../../reference/scql_operators.md:1383 +#: ../../reference/operators.md:14 ../../reference/operators.md:273 +#: ../../reference/operators.md:335 ../../reference/operators.md:436 +#: ../../reference/operators.md:466 ../../reference/operators.md:930 +#: ../../reference/operators.md:1031 ../../reference/operators.md:1061 +#: ../../reference/operators.md:1131 ../../reference/operators.md:1161 +#: ../../reference/operators.md:1275 ../../reference/operators.md:1305 +#: ../../reference/operators.md:1335 ../../reference/operators.md:1389 msgid "`Left`(variadic, T): First operand." msgstr "``Left`` (多列数组,类型为 T ): 第一个操作数。" -#: ../../reference/scql_operators.md:10 ../../reference/scql_operators.md:269 -#: ../../reference/scql_operators.md:331 ../../reference/scql_operators.md:432 -#: ../../reference/scql_operators.md:462 ../../reference/scql_operators.md:926 -#: ../../reference/scql_operators.md:1027 -#: ../../reference/scql_operators.md:1057 -#: ../../reference/scql_operators.md:1127 -#: ../../reference/scql_operators.md:1157 -#: ../../reference/scql_operators.md:1271 -#: ../../reference/scql_operators.md:1301 -#: ../../reference/scql_operators.md:1331 -#: ../../reference/scql_operators.md:1385 +#: ../../reference/operators.md:16 ../../reference/operators.md:275 +#: ../../reference/operators.md:337 ../../reference/operators.md:438 +#: ../../reference/operators.md:468 ../../reference/operators.md:932 +#: ../../reference/operators.md:1033 ../../reference/operators.md:1063 +#: ../../reference/operators.md:1133 ../../reference/operators.md:1163 +#: ../../reference/operators.md:1277 ../../reference/operators.md:1307 +#: ../../reference/operators.md:1337 ../../reference/operators.md:1391 msgid "`Right`(variadic, T1): Second operand." msgstr "``Right`` (多列数组,类型为 T1 ): 第二个操作数。" -#: ../../reference/scql_operators.md:13 ../../reference/scql_operators.md:51 -#: ../../reference/scql_operators.md:93 ../../reference/scql_operators.md:123 -#: ../../reference/scql_operators.md:154 ../../reference/scql_operators.md:199 -#: ../../reference/scql_operators.md:238 ../../reference/scql_operators.md:272 -#: ../../reference/scql_operators.md:300 ../../reference/scql_operators.md:334 -#: ../../reference/scql_operators.md:373 ../../reference/scql_operators.md:409 -#: ../../reference/scql_operators.md:435 ../../reference/scql_operators.md:465 -#: ../../reference/scql_operators.md:501 ../../reference/scql_operators.md:540 -#: ../../reference/scql_operators.md:577 ../../reference/scql_operators.md:614 -#: ../../reference/scql_operators.md:651 ../../reference/scql_operators.md:688 -#: ../../reference/scql_operators.md:731 ../../reference/scql_operators.md:768 -#: ../../reference/scql_operators.md:805 ../../reference/scql_operators.md:884 -#: ../../reference/scql_operators.md:929 ../../reference/scql_operators.md:985 -#: ../../reference/scql_operators.md:1030 -#: ../../reference/scql_operators.md:1060 -#: ../../reference/scql_operators.md:1096 -#: ../../reference/scql_operators.md:1130 -#: ../../reference/scql_operators.md:1160 -#: ../../reference/scql_operators.md:1188 -#: ../../reference/scql_operators.md:1220 -#: ../../reference/scql_operators.md:1246 -#: ../../reference/scql_operators.md:1274 -#: ../../reference/scql_operators.md:1304 -#: ../../reference/scql_operators.md:1334 -#: ../../reference/scql_operators.md:1362 -#: ../../reference/scql_operators.md:1388 -#: ../../reference/scql_operators.md:1426 -#: ../../reference/scql_operators.md:1460 -#: ../../reference/scql_operators.md:1494 -#: ../../reference/scql_operators.md:1528 -#: ../../reference/scql_operators.md:1562 -#: ../../reference/scql_operators.md:1596 -#: ../../reference/scql_operators.md:1620 -#: ../../reference/scql_operators.md:1654 -#: ../../reference/scql_operators.md:1685 -#: ../../reference/scql_operators.md:1716 -#: ../../reference/scql_operators.md:1747 -#: ../../reference/scql_operators.md:1771 -#: ../../reference/scql_operators.md:1810 -#: ../../reference/scql_operators.md:1856 -#: ../../reference/scql_operators.md:1890 -#: ../../reference/scql_operators.md:1934 +#: ../../reference/operators.md:19 ../../reference/operators.md:57 +#: ../../reference/operators.md:99 ../../reference/operators.md:129 +#: ../../reference/operators.md:160 ../../reference/operators.md:205 +#: ../../reference/operators.md:244 ../../reference/operators.md:278 +#: ../../reference/operators.md:306 ../../reference/operators.md:340 +#: ../../reference/operators.md:379 ../../reference/operators.md:415 +#: ../../reference/operators.md:441 ../../reference/operators.md:471 +#: ../../reference/operators.md:507 ../../reference/operators.md:546 +#: ../../reference/operators.md:583 ../../reference/operators.md:620 +#: ../../reference/operators.md:657 ../../reference/operators.md:694 +#: ../../reference/operators.md:737 ../../reference/operators.md:774 +#: ../../reference/operators.md:811 ../../reference/operators.md:890 +#: ../../reference/operators.md:935 ../../reference/operators.md:991 +#: ../../reference/operators.md:1036 ../../reference/operators.md:1066 +#: ../../reference/operators.md:1102 ../../reference/operators.md:1136 +#: ../../reference/operators.md:1166 ../../reference/operators.md:1194 +#: ../../reference/operators.md:1226 ../../reference/operators.md:1252 +#: ../../reference/operators.md:1280 ../../reference/operators.md:1310 +#: ../../reference/operators.md:1340 ../../reference/operators.md:1368 +#: ../../reference/operators.md:1394 ../../reference/operators.md:1432 +#: ../../reference/operators.md:1466 ../../reference/operators.md:1500 +#: ../../reference/operators.md:1534 ../../reference/operators.md:1568 +#: ../../reference/operators.md:1602 ../../reference/operators.md:1626 +#: ../../reference/operators.md:1660 ../../reference/operators.md:1691 +#: ../../reference/operators.md:1722 ../../reference/operators.md:1753 +#: ../../reference/operators.md:1777 ../../reference/operators.md:1816 +#: ../../reference/operators.md:1862 ../../reference/operators.md:1896 +#: ../../reference/operators.md:1940 msgid "**Outputs:**" msgstr "**输出:**" -#: ../../reference/scql_operators.md:15 ../../reference/scql_operators.md:274 -#: ../../reference/scql_operators.md:336 ../../reference/scql_operators.md:437 -#: ../../reference/scql_operators.md:467 ../../reference/scql_operators.md:931 -#: ../../reference/scql_operators.md:1032 -#: ../../reference/scql_operators.md:1062 -#: ../../reference/scql_operators.md:1132 -#: ../../reference/scql_operators.md:1162 -#: ../../reference/scql_operators.md:1276 -#: ../../reference/scql_operators.md:1306 -#: ../../reference/scql_operators.md:1336 -#: ../../reference/scql_operators.md:1390 +#: ../../reference/operators.md:21 ../../reference/operators.md:280 +#: ../../reference/operators.md:342 ../../reference/operators.md:443 +#: ../../reference/operators.md:473 ../../reference/operators.md:937 +#: ../../reference/operators.md:1038 ../../reference/operators.md:1068 +#: ../../reference/operators.md:1138 ../../reference/operators.md:1168 +#: ../../reference/operators.md:1282 ../../reference/operators.md:1312 +#: ../../reference/operators.md:1342 ../../reference/operators.md:1396 msgid "`Out`(variadic, T2): Output Tensor." msgstr "``Out`` (多列数组,类型为 T2 ):输出。 " -#: ../../reference/scql_operators.md:22 ../../reference/scql_operators.md:60 -#: ../../reference/scql_operators.md:102 ../../reference/scql_operators.md:132 -#: ../../reference/scql_operators.md:176 ../../reference/scql_operators.md:223 -#: ../../reference/scql_operators.md:255 ../../reference/scql_operators.md:281 -#: ../../reference/scql_operators.md:317 ../../reference/scql_operators.md:343 -#: ../../reference/scql_operators.md:382 ../../reference/scql_operators.md:418 -#: ../../reference/scql_operators.md:444 ../../reference/scql_operators.md:474 -#: ../../reference/scql_operators.md:512 ../../reference/scql_operators.md:549 -#: ../../reference/scql_operators.md:586 ../../reference/scql_operators.md:623 -#: ../../reference/scql_operators.md:660 ../../reference/scql_operators.md:703 -#: ../../reference/scql_operators.md:740 ../../reference/scql_operators.md:777 -#: ../../reference/scql_operators.md:814 ../../reference/scql_operators.md:910 -#: ../../reference/scql_operators.md:938 ../../reference/scql_operators.md:1011 -#: ../../reference/scql_operators.md:1039 -#: ../../reference/scql_operators.md:1069 -#: ../../reference/scql_operators.md:1113 -#: ../../reference/scql_operators.md:1139 -#: ../../reference/scql_operators.md:1169 -#: ../../reference/scql_operators.md:1203 -#: ../../reference/scql_operators.md:1229 -#: ../../reference/scql_operators.md:1255 -#: ../../reference/scql_operators.md:1283 -#: ../../reference/scql_operators.md:1313 -#: ../../reference/scql_operators.md:1343 -#: ../../reference/scql_operators.md:1371 -#: ../../reference/scql_operators.md:1397 -#: ../../reference/scql_operators.md:1435 -#: ../../reference/scql_operators.md:1469 -#: ../../reference/scql_operators.md:1503 -#: ../../reference/scql_operators.md:1537 -#: ../../reference/scql_operators.md:1571 -#: ../../reference/scql_operators.md:1605 -#: ../../reference/scql_operators.md:1629 -#: ../../reference/scql_operators.md:1663 -#: ../../reference/scql_operators.md:1694 -#: ../../reference/scql_operators.md:1725 -#: ../../reference/scql_operators.md:1756 -#: ../../reference/scql_operators.md:1788 -#: ../../reference/scql_operators.md:1832 -#: ../../reference/scql_operators.md:1865 -#: ../../reference/scql_operators.md:1912 -#: ../../reference/scql_operators.md:1943 +#: ../../reference/operators.md:28 ../../reference/operators.md:66 +#: ../../reference/operators.md:108 ../../reference/operators.md:138 +#: ../../reference/operators.md:182 ../../reference/operators.md:229 +#: ../../reference/operators.md:261 ../../reference/operators.md:287 +#: ../../reference/operators.md:323 ../../reference/operators.md:349 +#: ../../reference/operators.md:388 ../../reference/operators.md:424 +#: ../../reference/operators.md:450 ../../reference/operators.md:480 +#: ../../reference/operators.md:518 ../../reference/operators.md:555 +#: ../../reference/operators.md:592 ../../reference/operators.md:629 +#: ../../reference/operators.md:666 ../../reference/operators.md:709 +#: ../../reference/operators.md:746 ../../reference/operators.md:783 +#: ../../reference/operators.md:820 ../../reference/operators.md:916 +#: ../../reference/operators.md:944 ../../reference/operators.md:1017 +#: ../../reference/operators.md:1045 ../../reference/operators.md:1075 +#: ../../reference/operators.md:1119 ../../reference/operators.md:1145 +#: ../../reference/operators.md:1175 ../../reference/operators.md:1209 +#: ../../reference/operators.md:1235 ../../reference/operators.md:1261 +#: ../../reference/operators.md:1289 ../../reference/operators.md:1319 +#: ../../reference/operators.md:1349 ../../reference/operators.md:1377 +#: ../../reference/operators.md:1403 ../../reference/operators.md:1441 +#: ../../reference/operators.md:1475 ../../reference/operators.md:1509 +#: ../../reference/operators.md:1543 ../../reference/operators.md:1577 +#: ../../reference/operators.md:1611 ../../reference/operators.md:1635 +#: ../../reference/operators.md:1669 ../../reference/operators.md:1700 +#: ../../reference/operators.md:1731 ../../reference/operators.md:1762 +#: ../../reference/operators.md:1794 ../../reference/operators.md:1838 +#: ../../reference/operators.md:1871 ../../reference/operators.md:1918 +#: ../../reference/operators.md:1949 msgid "**TensorStatus(ShareType) Constraints:**" msgstr "**Tensor 类型约束:**" -#: ../../reference/scql_operators.md:24 ../../reference/scql_operators.md:104 -#: ../../reference/scql_operators.md:134 ../../reference/scql_operators.md:283 -#: ../../reference/scql_operators.md:345 ../../reference/scql_operators.md:446 -#: ../../reference/scql_operators.md:476 ../../reference/scql_operators.md:940 -#: ../../reference/scql_operators.md:1041 -#: ../../reference/scql_operators.md:1071 -#: ../../reference/scql_operators.md:1115 -#: ../../reference/scql_operators.md:1141 -#: ../../reference/scql_operators.md:1171 -#: ../../reference/scql_operators.md:1285 -#: ../../reference/scql_operators.md:1315 -#: ../../reference/scql_operators.md:1345 -#: ../../reference/scql_operators.md:1373 -#: ../../reference/scql_operators.md:1399 -#: ../../reference/scql_operators.md:1834 +#: ../../reference/operators.md:30 ../../reference/operators.md:110 +#: ../../reference/operators.md:140 ../../reference/operators.md:289 +#: ../../reference/operators.md:351 ../../reference/operators.md:452 +#: ../../reference/operators.md:482 ../../reference/operators.md:946 +#: ../../reference/operators.md:1047 ../../reference/operators.md:1077 +#: ../../reference/operators.md:1121 ../../reference/operators.md:1147 +#: ../../reference/operators.md:1177 ../../reference/operators.md:1291 +#: ../../reference/operators.md:1321 ../../reference/operators.md:1351 +#: ../../reference/operators.md:1379 ../../reference/operators.md:1405 +#: ../../reference/operators.md:1840 msgid "`T`: public,private,secret" msgstr "``T`` :公开,私有,密态" -#: ../../reference/scql_operators.md:26 ../../reference/scql_operators.md:64 -#: ../../reference/scql_operators.md:106 ../../reference/scql_operators.md:285 -#: ../../reference/scql_operators.md:347 ../../reference/scql_operators.md:448 -#: ../../reference/scql_operators.md:478 ../../reference/scql_operators.md:942 -#: ../../reference/scql_operators.md:1043 -#: ../../reference/scql_operators.md:1073 -#: ../../reference/scql_operators.md:1143 -#: ../../reference/scql_operators.md:1173 -#: ../../reference/scql_operators.md:1287 -#: ../../reference/scql_operators.md:1317 -#: ../../reference/scql_operators.md:1347 -#: ../../reference/scql_operators.md:1401 +#: ../../reference/operators.md:32 ../../reference/operators.md:70 +#: ../../reference/operators.md:112 ../../reference/operators.md:291 +#: ../../reference/operators.md:353 ../../reference/operators.md:454 +#: ../../reference/operators.md:484 ../../reference/operators.md:948 +#: ../../reference/operators.md:1049 ../../reference/operators.md:1079 +#: ../../reference/operators.md:1149 ../../reference/operators.md:1179 +#: ../../reference/operators.md:1293 ../../reference/operators.md:1323 +#: ../../reference/operators.md:1353 ../../reference/operators.md:1407 msgid "`T1`: public,private,secret" msgstr "``T1`` :公开,私有,密态" -#: ../../reference/scql_operators.md:28 ../../reference/scql_operators.md:287 -#: ../../reference/scql_operators.md:349 ../../reference/scql_operators.md:450 -#: ../../reference/scql_operators.md:480 ../../reference/scql_operators.md:944 -#: ../../reference/scql_operators.md:1045 -#: ../../reference/scql_operators.md:1075 -#: ../../reference/scql_operators.md:1145 -#: ../../reference/scql_operators.md:1175 -#: ../../reference/scql_operators.md:1289 -#: ../../reference/scql_operators.md:1319 -#: ../../reference/scql_operators.md:1349 -#: ../../reference/scql_operators.md:1403 +#: ../../reference/operators.md:34 ../../reference/operators.md:293 +#: ../../reference/operators.md:355 ../../reference/operators.md:456 +#: ../../reference/operators.md:486 ../../reference/operators.md:950 +#: ../../reference/operators.md:1051 ../../reference/operators.md:1081 +#: ../../reference/operators.md:1151 ../../reference/operators.md:1181 +#: ../../reference/operators.md:1295 ../../reference/operators.md:1325 +#: ../../reference/operators.md:1355 ../../reference/operators.md:1409 msgid "`T2`: private,secret" msgstr "``T2`` :公开,私有" -#: ../../reference/scql_operators.md:32 +#: ../../reference/operators.md:38 msgid "`BroadcastTo`" msgstr "`BroadcastTo`" -#: ../../reference/scql_operators.md:34 +#: ../../reference/operators.md:40 msgid "" "Definition: Broadcast Input tensor `In` to the same shape as " -"`ShapeRefTensor`. Example:" +"`ShapeRefTensor`. Example:" msgstr "定义:根据参考 tensor ``ShapeRefTensor`` 的大小, 对输入的 tensor ``In`` 进行扩展。例如:" -#: ../../reference/scql_operators.md:46 +#: ../../reference/operators.md:52 msgid "`In`(variadic, T): Input tensor" msgstr "``In`` (多列数组,类型为 T ):输入 tensor 。" -#: ../../reference/scql_operators.md:48 +#: ../../reference/operators.md:54 msgid "`ShapeRefTensor`(single, T1): Shape reference tensor" msgstr "``ShapeRefTensor`` (单列数组,类型为 T2 ):参考的 tensor 。" -#: ../../reference/scql_operators.md:53 +#: ../../reference/operators.md:59 msgid "`Out`(variadic, T2): Result tensor" msgstr "``Out`` (多列数组,类型为 T2 ): 输出结果。" -#: ../../reference/scql_operators.md:62 +#: ../../reference/operators.md:68 msgid "`T`: public" msgstr "``T`` :公开" -#: ../../reference/scql_operators.md:66 +#: ../../reference/operators.md:72 msgid "`T2`: public,private" msgstr "``T2`` :公开,私有" -#: ../../reference/scql_operators.md:70 +#: ../../reference/operators.md:76 msgid "`CaseWhen`" msgstr "``CaseWhen``" -#: ../../reference/scql_operators.md:72 +#: ../../reference/operators.md:78 msgid "" "The CaseWhen operator goes through conditions and returns a value when " "the first condition is met (like an if-then-else statement)" msgstr "CaseWhen 算子遍历 ``Condition`` 中的条件,并在遇到满足的第一个条件时返回对应值(类似于 if-then-else 语句)" -#: ../../reference/scql_operators.md:74 +#: ../../reference/operators.md:80 msgid "Example:" msgstr "例子:" -#: ../../reference/scql_operators.md:86 +#: ../../reference/operators.md:92 msgid "`Condition`(variadic, T): Condition tensor." msgstr "``Condition`` (多列数组,类型为 T ):条件 tensor 。" -#: ../../reference/scql_operators.md:88 +#: ../../reference/operators.md:94 msgid "" "`Value`(variadic, T1): Value if condition tensor is true and all previous" " conditions are false." -msgstr "``Value`` (多列数组,类型为 T1):如果 condition tensor 为真并且之前的所有 condition 都为假,则取该 Value 。" +msgstr "" +"``Value`` (多列数组,类型为 T1):如果 condition tensor 为真并且之前的所有 condition 都为假,则取该 " +"Value 。" -#: ../../reference/scql_operators.md:90 +#: ../../reference/operators.md:96 msgid "`ValueElse`(single, T2): Value if all condition tensors are false." msgstr "``ValueElse`` (单列数组,类型为 T2):当所有 condition tensors 都为假,则取 ValueElse 。" -#: ../../reference/scql_operators.md:95 +#: ../../reference/operators.md:101 msgid "`Out`(single, T3): Result tensor." msgstr "``Out`` (单列数组,类型为 T3 ):结果 tensor 。" -#: ../../reference/scql_operators.md:108 +#: ../../reference/operators.md:114 msgid "`T2`: public,private,secret" msgstr "``T2`` :公开,私有,密态" -#: ../../reference/scql_operators.md:110 +#: ../../reference/operators.md:116 msgid "`T3`: public,private,secret" msgstr "``T3`` :公开,私有,密态" -#: ../../reference/scql_operators.md:114 +#: ../../reference/operators.md:120 msgid "`Cast`" msgstr "``Cast``" -#: ../../reference/scql_operators.md:116 +#: ../../reference/operators.md:122 msgid "Definition: Cast Input tensor's data type to Output tensor's." msgstr "定义:将输入 tensor 的数据类型转换为输出 tensor 的数据类型。" -#: ../../reference/scql_operators.md:120 ../../reference/scql_operators.md:1359 +#: ../../reference/operators.md:126 ../../reference/operators.md:1365 msgid "`In`(single, T): Input tensor." msgstr "``In`` (单列数组,类型为 T ):输入 tensor 。" -#: ../../reference/scql_operators.md:125 ../../reference/scql_operators.md:1364 +#: ../../reference/operators.md:131 ../../reference/operators.md:1370 msgid "`Out`(single, T): Output tensor." msgstr "``Out`` (单列数组,类型为 T ):输出 tensor 。" -#: ../../reference/scql_operators.md:138 +#: ../../reference/operators.md:144 msgid "`Concat`" msgstr "``Concat``" -#: ../../reference/scql_operators.md:140 +#: ../../reference/operators.md:146 msgid "" "Definition: Given a number of tensors In (variadic, each tensor's shape " "must be the same in every dimension except for the axis), concat the In " @@ -363,173 +298,166 @@ msgstr "" "定义:给定一组 tensor ``In`` (多列数组,所有的 tensor 的大小在除了 axis 之外的所有维度上必须相同),将它们在 " "axis 所指定的维度上进行拼接。例如:" -#: ../../reference/scql_operators.md:151 +#: ../../reference/operators.md:157 msgid "`In`(variadic, T): Tensors to be concat." msgstr "``In`` (多列数组,类型为 T ):待拼接的 tensor 。" -#: ../../reference/scql_operators.md:156 +#: ../../reference/operators.md:162 msgid "`Out`(single, T): Concated Tensor." msgstr "``Out`` (单列数组,类型为 T ):拼接后的 tensor 。" -#: ../../reference/scql_operators.md:160 ../../reference/scql_operators.md:205 -#: ../../reference/scql_operators.md:244 ../../reference/scql_operators.md:306 -#: ../../reference/scql_operators.md:694 ../../reference/scql_operators.md:890 -#: ../../reference/scql_operators.md:993 ../../reference/scql_operators.md:1102 -#: ../../reference/scql_operators.md:1194 -#: ../../reference/scql_operators.md:1777 -#: ../../reference/scql_operators.md:1816 -#: ../../reference/scql_operators.md:1896 +#: ../../reference/operators.md:166 ../../reference/operators.md:211 +#: ../../reference/operators.md:250 ../../reference/operators.md:312 +#: ../../reference/operators.md:700 ../../reference/operators.md:896 +#: ../../reference/operators.md:999 ../../reference/operators.md:1108 +#: ../../reference/operators.md:1200 ../../reference/operators.md:1783 +#: ../../reference/operators.md:1822 ../../reference/operators.md:1902 msgid "**Attributes:**" msgstr "**属性:**" -#: ../../reference/scql_operators.md:162 +#: ../../reference/operators.md:168 msgid "`axis`: Int64. Dimension along which to concatenate." msgstr "``axis`` : Int64 类型,待拼接的维度。" -#: ../../reference/scql_operators.md:169 ../../reference/scql_operators.md:216 -#: ../../reference/scql_operators.md:903 ../../reference/scql_operators.md:1004 -#: ../../reference/scql_operators.md:1825 -#: ../../reference/scql_operators.md:1905 +#: ../../reference/operators.md:175 ../../reference/operators.md:222 +#: ../../reference/operators.md:909 ../../reference/operators.md:1010 +#: ../../reference/operators.md:1831 ../../reference/operators.md:1911 msgid "**Default Attribute Values:**" msgstr "**默认值:**" -#: ../../reference/scql_operators.md:171 +#: ../../reference/operators.md:177 msgid "`axis`: 0" msgstr "``axis`` : 0" -#: ../../reference/scql_operators.md:178 ../../reference/scql_operators.md:1437 -#: ../../reference/scql_operators.md:1471 -#: ../../reference/scql_operators.md:1539 -#: ../../reference/scql_operators.md:1573 -#: ../../reference/scql_operators.md:1607 -#: ../../reference/scql_operators.md:1867 +#: ../../reference/operators.md:184 ../../reference/operators.md:1443 +#: ../../reference/operators.md:1477 ../../reference/operators.md:1545 +#: ../../reference/operators.md:1579 ../../reference/operators.md:1613 +#: ../../reference/operators.md:1873 msgid "`T`: secret" msgstr "``T`` :私有" -#: ../../reference/scql_operators.md:182 +#: ../../reference/operators.md:188 msgid "`Constant`" msgstr "``Constant``" -#: ../../reference/scql_operators.md:184 +#: ../../reference/operators.md:190 msgid "Definition: Make constant from attribute. Example:" msgstr "定义:根据属性中的 ``scalar`` 和 ``to_status`` 参数生成对应的常量。例如:" -#: ../../reference/scql_operators.md:196 ../../reference/scql_operators.md:1768 +#: ../../reference/operators.md:202 ../../reference/operators.md:1774 msgid "No input parameter." msgstr "无输入参数。" -#: ../../reference/scql_operators.md:201 +#: ../../reference/operators.md:207 msgid "`Out`(single, T): output tensor(shape [M]) from constant." msgstr "``Out`` (单列数组,类型为 T ):生成的常量,大小为 [M] 。" -#: ../../reference/scql_operators.md:207 +#: ../../reference/operators.md:213 msgid "`scalar`: scalar attribute(with shape [M])" msgstr "``scalar`` :大小为 [M] 的标量。" -#: ../../reference/scql_operators.md:209 +#: ../../reference/operators.md:215 msgid "`to_status`: int64. to status, 0: to private, 1: to public." msgstr "``to_status`` : int64 类型,生成的常量的状态, 0:私有状态, 1:公开状态。" -#: ../../reference/scql_operators.md:218 +#: ../../reference/operators.md:224 msgid "`to_status`: 0" msgstr "``to_status`` : 0" -#: ../../reference/scql_operators.md:225 +#: ../../reference/operators.md:231 msgid "`T`: public,private" msgstr "``T`` :公共,私有" -#: ../../reference/scql_operators.md:229 +#: ../../reference/operators.md:235 msgid "`Copy`" msgstr "``Copy``" -#: ../../reference/scql_operators.md:231 +#: ../../reference/operators.md:237 msgid "" "Definition: Copy source tensor \"In\" to new tensor \"Out\" on target " "party" msgstr "定义:复制源 tensor 至目标 tensor 。" -#: ../../reference/scql_operators.md:235 +#: ../../reference/operators.md:241 msgid "`In`(single, T1): source tensor" msgstr "``In`` (单列数组,类型为 T1 ):源 tensor 。" -#: ../../reference/scql_operators.md:240 +#: ../../reference/operators.md:246 msgid "`Out`(single, T1): target tensor" msgstr "``Out`` (单列数组,类型为 T1 ):目标 tensor 。" -#: ../../reference/scql_operators.md:246 +#: ../../reference/operators.md:252 msgid "`input_party_codes`: Input tensor `In` belongs to" msgstr "``input_party_codes``:输入 tensor ``In`` 的所属方。" -#: ../../reference/scql_operators.md:248 +#: ../../reference/operators.md:254 msgid "`output_party_codes`: Output tensor `Out` belongs to" msgstr "``output_party_codes``:输出 tensor ``Out`` 的所属方。" -#: ../../reference/scql_operators.md:257 ../../reference/scql_operators.md:914 -#: ../../reference/scql_operators.md:1013 -#: ../../reference/scql_operators.md:1257 -#: ../../reference/scql_operators.md:1836 +#: ../../reference/operators.md:263 ../../reference/operators.md:920 +#: ../../reference/operators.md:1019 ../../reference/operators.md:1263 +#: ../../reference/operators.md:1842 msgid "`T1`: private" msgstr "``T1`` :私有" -#: ../../reference/scql_operators.md:261 +#: ../../reference/operators.md:267 msgid "`Div`" msgstr "``Div``" -#: ../../reference/scql_operators.md:263 +#: ../../reference/operators.md:269 msgid "Definition: Out = Left `Div` Right" msgstr "定义:对两个 tensor 进行除法运算, Out = (Left / Right) 。" -#: ../../reference/scql_operators.md:291 +#: ../../reference/operators.md:297 msgid "`DumpFile`" msgstr "`DumpFile`" -#: ../../reference/scql_operators.md:293 +#: ../../reference/operators.md:299 msgid "" "Definition: Dump the input tensor. Note: This op will change the affected" " rows in the session" msgstr "定义:将输入的 tensor 存储到文件中。此操作将更改会话中受影响的行。" -#: ../../reference/scql_operators.md:297 +#: ../../reference/operators.md:303 msgid "`In`(variadic, T): Tensors to be dumped." msgstr "``In`` (多列数组,类型为 T ):待存储的 tensor。" -#: ../../reference/scql_operators.md:302 +#: ../../reference/operators.md:308 msgid "`Out`(variadic, T): Tensors have been dumped." msgstr "``Out`` (多列数组,类型为 T ): 已存储的 tensor。" -#: ../../reference/scql_operators.md:308 +#: ../../reference/operators.md:314 msgid "`file_path`: String. Absolute file path to dump the tensors." msgstr "``file_path`` :字符串类型。用于存储 tensor 的绝对文件路径。" -#: ../../reference/scql_operators.md:310 +#: ../../reference/operators.md:316 msgid "`deliminator`: String. Column deliminator, e.g. comma `,`" msgstr "``deliminator`` :字符串类型。列分隔符,例如逗号。" -#: ../../reference/scql_operators.md:319 ../../reference/scql_operators.md:420 -#: ../../reference/scql_operators.md:514 ../../reference/scql_operators.md:551 -#: ../../reference/scql_operators.md:588 ../../reference/scql_operators.md:625 -#: ../../reference/scql_operators.md:662 ../../reference/scql_operators.md:705 -#: ../../reference/scql_operators.md:742 ../../reference/scql_operators.md:779 -#: ../../reference/scql_operators.md:816 ../../reference/scql_operators.md:912 -#: ../../reference/scql_operators.md:1631 -#: ../../reference/scql_operators.md:1790 -#: ../../reference/scql_operators.md:1945 +#: ../../reference/operators.md:325 ../../reference/operators.md:426 +#: ../../reference/operators.md:520 ../../reference/operators.md:557 +#: ../../reference/operators.md:594 ../../reference/operators.md:631 +#: ../../reference/operators.md:668 ../../reference/operators.md:711 +#: ../../reference/operators.md:748 ../../reference/operators.md:785 +#: ../../reference/operators.md:822 ../../reference/operators.md:918 +#: ../../reference/operators.md:1637 ../../reference/operators.md:1796 +#: ../../reference/operators.md:1951 msgid "`T`: private" msgstr "``T`` :私有" -#: ../../reference/scql_operators.md:323 +#: ../../reference/operators.md:329 msgid "`Equal`" msgstr "``Equal``" -#: ../../reference/scql_operators.md:325 +#: ../../reference/operators.md:331 msgid "Definition: Out = Left `Equal` Right" msgstr "定义:对两个 tensor 进行比较运算, Out = (Left == Right) 。" -#: ../../reference/scql_operators.md:353 +#: ../../reference/operators.md:359 msgid "`Filter`" msgstr "``Filter``" -#: ../../reference/scql_operators.md:355 +#: ../../reference/operators.md:361 msgid "" "Definition: Given a boolean tensor Filter (its shape is [M]), and a " "number of tensors In (variadic, each tensor's shape must be [M]), for i " @@ -539,125 +467,123 @@ msgstr "" "定义:给定一个布尔类型的 tensors ``Filter`` (其大小为 [M] ),以及一个输入 tensor ``In`` (多列数组,每个" " tensor 的大小均为 [M] )。仅当 Filter 中第 i 个元素为真时,保留 In 中第 i 个元素。例:" -#: ../../reference/scql_operators.md:368 +#: ../../reference/operators.md:374 msgid "`Filter`(single, T1): Filter tensor." msgstr "``Filter`` (单列数组,类型为 T1 ):用来做筛选的 tensor 。" -#: ../../reference/scql_operators.md:370 +#: ../../reference/operators.md:376 msgid "`In`(variadic, T): Tensors to be filtered." msgstr "``In`` (多列数组,类型为 T ):待筛选的 tensor 。" -#: ../../reference/scql_operators.md:375 ../../reference/scql_operators.md:1098 +#: ../../reference/operators.md:381 ../../reference/operators.md:1104 msgid "`Out`(variadic, T): Output tensor." msgstr "``Out`` (多列数组,类型为 T ):输出 tensor 。" -#: ../../reference/scql_operators.md:384 ../../reference/scql_operators.md:1505 -#: ../../reference/scql_operators.md:1665 -#: ../../reference/scql_operators.md:1696 -#: ../../reference/scql_operators.md:1727 -#: ../../reference/scql_operators.md:1758 -#: ../../reference/scql_operators.md:1914 +#: ../../reference/operators.md:390 ../../reference/operators.md:1511 +#: ../../reference/operators.md:1671 ../../reference/operators.md:1702 +#: ../../reference/operators.md:1733 ../../reference/operators.md:1764 +#: ../../reference/operators.md:1920 msgid "`T`: private,secret" msgstr "``T`` :私有,密态" -#: ../../reference/scql_operators.md:386 +#: ../../reference/operators.md:392 msgid "`T1`: public,private" msgstr "``T1`` :公开,私有" -#: ../../reference/scql_operators.md:390 +#: ../../reference/operators.md:396 msgid "`FilterByIndex`" msgstr "``FilterByIndex``" -#: ../../reference/scql_operators.md:392 +#: ../../reference/operators.md:398 msgid "Definition: Filter by rows index. Example:" msgstr "定义:按行索引筛选。例如:" -#: ../../reference/scql_operators.md:404 +#: ../../reference/operators.md:410 msgid "`RowsIndexFilter`(single, T): Rows index filter vector(shape [K][1])." msgstr "``RowsIndexFilter`` (单列数组,类型为 T ):用于筛选的索引 tensor (大小为 [K][1] )。" -#: ../../reference/scql_operators.md:406 +#: ../../reference/operators.md:412 msgid "`Data`(variadic, T): Input data tensor(shape [M][N])." msgstr "``Data`` (多列数组,类型为 T ):待筛选的 tensor (大小为 [M][N] )。" -#: ../../reference/scql_operators.md:411 +#: ../../reference/operators.md:417 msgid "`Out`(variadic, T): Output data tensor(shape [X][N])." msgstr "``Out`` (多列数组,类型为 T ):输出结果 tensor (大小为 [X][N] )。" -#: ../../reference/scql_operators.md:424 +#: ../../reference/operators.md:430 msgid "`Greater`" msgstr "`Greater`" -#: ../../reference/scql_operators.md:426 +#: ../../reference/operators.md:432 msgid "Definition: Out = Left `Greater` Right" msgstr "定义:对两个 tensor 进行比较运算, Out = (Left > Right) 。" -#: ../../reference/scql_operators.md:454 +#: ../../reference/operators.md:460 msgid "`GreaterEqual`" msgstr "`GreaterEqual`" -#: ../../reference/scql_operators.md:456 +#: ../../reference/operators.md:462 msgid "Definition: Out = Left `GreaterEqual` Right" msgstr "定义:对两个 tensor 进行比较运算, Out = (Left >= Right) 。" -#: ../../reference/scql_operators.md:484 +#: ../../reference/operators.md:490 msgid "`Group`" msgstr "`Group`" -#: ../../reference/scql_operators.md:486 +#: ../../reference/operators.md:492 msgid "" "Definition: Assign a group id(start from 0) for each input element. " "Example:" msgstr "定义:为每个输入元素分配一个group id (从0开始)。例如:" -#: ../../reference/scql_operators.md:498 +#: ../../reference/operators.md:504 msgid "`Key`(variadic, T): input key tensors(shape [M][1])." msgstr "``Key`` (多列数组,类型为 T ): group key (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:503 +#: ../../reference/operators.md:509 msgid "`GroupId`(single, T): group id vector(shape [M][1])." msgstr "``GroupId`` (单列数组,类型为 T ): group id (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:505 +#: ../../reference/operators.md:511 msgid "`GroupNum`(single, T): number of groups vector(shape [1][1])" msgstr "``GroupNum`` (单列数组,类型为 T ): group 的数量(大小为 [1][1] )。" -#: ../../reference/scql_operators.md:518 +#: ../../reference/operators.md:524 msgid "`GroupAvg`" msgstr "``GroupAvg``" -#: ../../reference/scql_operators.md:520 ../../reference/scql_operators.md:557 -#: ../../reference/scql_operators.md:594 ../../reference/scql_operators.md:631 -#: ../../reference/scql_operators.md:711 ../../reference/scql_operators.md:748 -#: ../../reference/scql_operators.md:785 +#: ../../reference/operators.md:526 ../../reference/operators.md:563 +#: ../../reference/operators.md:600 ../../reference/operators.md:637 +#: ../../reference/operators.md:717 ../../reference/operators.md:754 +#: ../../reference/operators.md:791 msgid "Definition: Aggregate `In` for each group. Example:" msgstr "定义:聚合每个 group 的 ``In`` 。例如:" -#: ../../reference/scql_operators.md:533 ../../reference/scql_operators.md:570 -#: ../../reference/scql_operators.md:607 ../../reference/scql_operators.md:644 -#: ../../reference/scql_operators.md:681 ../../reference/scql_operators.md:724 -#: ../../reference/scql_operators.md:761 ../../reference/scql_operators.md:798 +#: ../../reference/operators.md:539 ../../reference/operators.md:576 +#: ../../reference/operators.md:613 ../../reference/operators.md:650 +#: ../../reference/operators.md:687 ../../reference/operators.md:730 +#: ../../reference/operators.md:767 ../../reference/operators.md:804 msgid "`GroupId`(single, T): Input group id vector(shape [M][1])." msgstr "``GroupId`` (单列数组,类型为 T ): group id (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:535 ../../reference/scql_operators.md:572 -#: ../../reference/scql_operators.md:609 ../../reference/scql_operators.md:646 -#: ../../reference/scql_operators.md:683 ../../reference/scql_operators.md:726 -#: ../../reference/scql_operators.md:763 ../../reference/scql_operators.md:800 +#: ../../reference/operators.md:541 ../../reference/operators.md:578 +#: ../../reference/operators.md:615 ../../reference/operators.md:652 +#: ../../reference/operators.md:689 ../../reference/operators.md:732 +#: ../../reference/operators.md:769 ../../reference/operators.md:806 msgid "`GroupNum`(single, T): Input number of groups vector(shape [1][1])." msgstr "``GroupNum`` (单列数组,类型为 T ): group 的数量(大小为 [1][1] )。" -#: ../../reference/scql_operators.md:537 ../../reference/scql_operators.md:574 -#: ../../reference/scql_operators.md:611 ../../reference/scql_operators.md:648 -#: ../../reference/scql_operators.md:728 ../../reference/scql_operators.md:765 -#: ../../reference/scql_operators.md:802 +#: ../../reference/operators.md:543 ../../reference/operators.md:580 +#: ../../reference/operators.md:617 ../../reference/operators.md:654 +#: ../../reference/operators.md:734 ../../reference/operators.md:771 +#: ../../reference/operators.md:808 msgid "`In`(variadic, T): Input data tensor(shape [M][1])." msgstr "``In`` (单列数组,类型为 T ):输入数据 (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:542 ../../reference/scql_operators.md:579 -#: ../../reference/scql_operators.md:616 ../../reference/scql_operators.md:653 -#: ../../reference/scql_operators.md:733 ../../reference/scql_operators.md:770 -#: ../../reference/scql_operators.md:807 +#: ../../reference/operators.md:548 ../../reference/operators.md:585 +#: ../../reference/operators.md:622 ../../reference/operators.md:659 +#: ../../reference/operators.md:739 ../../reference/operators.md:776 +#: ../../reference/operators.md:813 msgid "" "`Out`(variadic, T): Output data tensors(shape [K][1], K equals to number " "of groups), Out[i] is the agg result for i-th group." @@ -665,31 +591,31 @@ msgstr "" "``Out`` (多列数组,类型为 T ):计算结果(大小为 [K][1] , K 等于 group 的个数), Out[i] 是第 i 个 " "group 的聚合结果。" -#: ../../reference/scql_operators.md:555 +#: ../../reference/operators.md:561 msgid "`GroupCount`" msgstr "``GroupCount``" -#: ../../reference/scql_operators.md:592 +#: ../../reference/operators.md:598 msgid "`GroupCountDistinct`" msgstr "``GroupCountDistinct``" -#: ../../reference/scql_operators.md:629 +#: ../../reference/operators.md:635 msgid "`GroupFirstOf`" msgstr "``GroupFirstOf``" -#: ../../reference/scql_operators.md:666 +#: ../../reference/operators.md:672 msgid "`GroupHeSum`" msgstr "``GroupHeSum``" -#: ../../reference/scql_operators.md:668 +#: ../../reference/operators.md:674 msgid "Definition: Using HE to sum 'In' for each group. Example:" msgstr "定义:使用同态加密对每个 group 进行求合。例如:" -#: ../../reference/scql_operators.md:685 +#: ../../reference/operators.md:691 msgid "`In`(single, T): Input data tensor(shape [M][1])." msgstr "``In`` (单列数组,类型为 T ):输入数据 (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:690 +#: ../../reference/operators.md:696 msgid "" "`Out`(single, T): Output data tensors(shape [K][1], K equals to number of" " groups), Out[i] is the agg result for i-th group." @@ -697,198 +623,197 @@ msgstr "" "``Out`` (多列数组,类型为 T ):计算结果(大小为 [K][1] , K 等于 group 的个数), Out[i] 是第 i 个 " "group 的聚合结果。" -#: ../../reference/scql_operators.md:696 +#: ../../reference/operators.md:702 msgid "" "`input_party_codes`: List of parties the inputs belong " "to([PartyCodeForGroupId/Num, PartyCodeForIn])." msgstr "``input_party_codes`` :join 操作的参与方列表。" -#: ../../reference/scql_operators.md:709 +#: ../../reference/operators.md:715 msgid "`GroupMax`" msgstr "`GroupMax`" -#: ../../reference/scql_operators.md:746 +#: ../../reference/operators.md:752 msgid "`GroupMin`" msgstr "`GroupMin`" -#: ../../reference/scql_operators.md:783 +#: ../../reference/operators.md:789 msgid "`GroupSum`" msgstr "`GroupSum`" -#: ../../reference/scql_operators.md:820 +#: ../../reference/operators.md:826 msgid "`If`" msgstr "`If`" -#: ../../reference/scql_operators.md:822 +#: ../../reference/operators.md:828 msgid "" "The IF operator returns a value if a condition is TRUE, or another value " "if a condition is FALSE." msgstr "如果条件为 TRUE ,则 IF 算子返回一个值;如果条件为 FALSE ,则返回另一个值。" -#: ../../reference/scql_operators.md:879 +#: ../../reference/operators.md:885 msgid "`Left`(single, T): First operand." msgstr "``Left`` (单列数组 , 类型为 T ): 第一个操作数。" -#: ../../reference/scql_operators.md:881 +#: ../../reference/operators.md:887 msgid "`Right`(single, T1): Second operand." msgstr "``Right`` (单列数组 , 类型为 T1 ): 第二个操作数。" -#: ../../reference/scql_operators.md:886 +#: ../../reference/operators.md:892 msgid "`Out`(single, T): Output Tensor." msgstr "``Out`` (单列数组 , 类型为 T ):输出结果,类型为布尔值。" -#: ../../reference/scql_operators.md:892 +#: ../../reference/operators.md:898 msgid "`algorithm`: Int64. Algorithm to use for the op. 1: PSI" msgstr "``algorithm`` : Int64 类型, 该操作所执行的算法,1表示使用PSI算法。" -#: ../../reference/scql_operators.md:894 +#: ../../reference/operators.md:900 msgid "" "`input_party_codes`: List of parties the inputs belong to. This attribute" " is required if algorithm = PSI." msgstr "``input_party_codes`` : 参与该操作的参与方的列表。如果采用 PSI 算法,则需要此属性。" -#: ../../reference/scql_operators.md:896 +#: ../../reference/operators.md:902 msgid "" "`reveal_to`: A party can see the result. This attribute is required if " "algorithm = PSI." msgstr "``reveal_to`` :可以看到结果的参与方。如果采用 PSI 算法,则需要此属性。" -#: ../../reference/scql_operators.md:905 +#: ../../reference/operators.md:911 msgid "`algorithm`: 0" msgstr "``algorithm`` : 0" -#: ../../reference/scql_operators.md:918 +#: ../../reference/operators.md:924 msgid "`IntDiv`" msgstr "`IntDiv`" -#: ../../reference/scql_operators.md:920 +#: ../../reference/operators.md:926 msgid "Definition: Out = Left `IntDiv` Right" msgstr "定义:对两个整数类型的 tensor 进行整形除法运算, Out = (Left / Right) 。" -#: ../../reference/scql_operators.md:948 +#: ../../reference/operators.md:954 msgid "`Join`" msgstr "`Join`" -#: ../../reference/scql_operators.md:950 +#: ../../reference/operators.md:956 msgid "" "Definition: Create Join Index based on EQ-Join, return result's " "corresponding rows index in the original input. Example:" msgstr "定义:基于 EQ-Join 对输入进行求交,返回回原始输入中与交集对应的索引值。例如:" -#: ../../reference/scql_operators.md:980 +#: ../../reference/operators.md:986 msgid "`Left`(single, T1): Left vector(shape [M][1])" msgstr "``Left`` (单列数组 , 类型为 T1 ):参与 join 操作的左侧输入(大小为 [M][1] )。" -#: ../../reference/scql_operators.md:982 +#: ../../reference/operators.md:988 msgid "`Right`(single, T1): Right vector(shape [N][1])" msgstr "``Right`` (单列数组 , 类型为 T1 ):参与 join 操作的右侧输入(大小为 [M][1] )。" -#: ../../reference/scql_operators.md:987 +#: ../../reference/operators.md:993 msgid "" "`LeftJoinIndex`(single, T2): Joined rows index for left vector(shape " "[K][1])" msgstr "``LeftJoinIndex`` (单列数组 , 类型为 T2 ):参与 join 操作的左侧输入的行索引。" -#: ../../reference/scql_operators.md:989 +#: ../../reference/operators.md:995 msgid "" "`RightJoinIndex`(single, T2): Joined rows index for right vector(shape " "[K][1])" msgstr "``RightJoinIndex`` (单列数组 , 类型为 T2 ):参与 join 操作的右侧输入的行索引。" -#: ../../reference/scql_operators.md:995 +#: ../../reference/operators.md:1001 msgid "" "`input_party_codes`: List of parties the inputs belong to([PartyCodeLeft," " PartyCodeRight])." msgstr "``input_party_codes`` :join 操作的参与方。" -#: ../../reference/scql_operators.md:997 +#: ../../reference/operators.md:1003 msgid "`join_type`: Int64. 0: inner join; 1: left join; 2: right join;" -msgstr "``join_type`` : Int64 类型,join 算子的类型。 0: inner join; 1: left join; 2: right join;" +msgstr "" +"``join_type`` : Int64 类型,join 算子的类型。 0: inner join; 1: left join; 2: " +"right join;" -#: ../../reference/scql_operators.md:1006 +#: ../../reference/operators.md:1012 msgid "`join_type`: 0" msgstr "``join_type`` : 0" -#: ../../reference/scql_operators.md:1015 -#: ../../reference/scql_operators.md:1207 +#: ../../reference/operators.md:1021 ../../reference/operators.md:1213 msgid "`T2`: private" msgstr "``T2`` :私有" -#: ../../reference/scql_operators.md:1019 +#: ../../reference/operators.md:1025 msgid "`Less`" msgstr "`Less`" -#: ../../reference/scql_operators.md:1021 +#: ../../reference/operators.md:1027 msgid "Definition: Out = Left `Less` Right" msgstr "定义:对两个 tensor 进行比较运算, Out = (Left < Right) 。" -#: ../../reference/scql_operators.md:1049 +#: ../../reference/operators.md:1055 msgid "`LessEqual`" msgstr "`LessEqual`" -#: ../../reference/scql_operators.md:1051 +#: ../../reference/operators.md:1057 msgid "Definition: Out = Left `LessEqual` Right" msgstr "定义:对两个 tensor 进行比较运算, Out = (Left <= Right) 。" -#: ../../reference/scql_operators.md:1079 +#: ../../reference/operators.md:1085 msgid "`Limit`" msgstr "``Limit``" -#: ../../reference/scql_operators.md:1081 +#: ../../reference/operators.md:1087 msgid "" "Limit return part of data, the amount of data depends on limit attr, the " "offset of data depends on offset attr. Example:" msgstr "Limit 算子返回部分数据,数据量取决于 limit attr ,数据的起始位置取决于 offset attr 。 例子:" -#: ../../reference/scql_operators.md:1093 +#: ../../reference/operators.md:1099 msgid "`In`(variadic, T): Tensors to be limited." msgstr "``In`` (多列数组,类型为 T ):待 limit 的 tensor 。" -#: ../../reference/scql_operators.md:1104 +#: ../../reference/operators.md:1110 msgid "`offset`: offset in limit" msgstr "`offset`: limit 结果的起始位置" -#: ../../reference/scql_operators.md:1106 +#: ../../reference/operators.md:1112 msgid "`count`: count in limit" msgstr "`count`: limit 结果的数据量" -#: ../../reference/scql_operators.md:1119 +#: ../../reference/operators.md:1125 msgid "`LogicalAnd`" msgstr "`LogicalAnd`" -#: ../../reference/scql_operators.md:1121 +#: ../../reference/operators.md:1127 msgid "Definition: Out = Left `LogicalAnd` Right" msgstr "定义:对两个 tensor 进行逻辑与运算, Out = (Left & Right) 。" -#: ../../reference/scql_operators.md:1149 +#: ../../reference/operators.md:1155 msgid "`LogicalOr`" msgstr "`LogicalOr`" -#: ../../reference/scql_operators.md:1151 +#: ../../reference/operators.md:1157 msgid "Definition: Out = Left `LogicalOr` Right" msgstr "定义:对两个 tensor 进行逻辑或运算, Out = (Left | Right) 。" -#: ../../reference/scql_operators.md:1179 +#: ../../reference/operators.md:1185 msgid "`MakePrivate`" msgstr "`MakePrivate`" -#: ../../reference/scql_operators.md:1181 +#: ../../reference/operators.md:1187 msgid "Definition: Convert In tensor from share status to private status." msgstr "定义:将 tensor 从秘态转换为私有状态。" -#: ../../reference/scql_operators.md:1185 -#: ../../reference/scql_operators.md:1217 -#: ../../reference/scql_operators.md:1243 +#: ../../reference/operators.md:1191 ../../reference/operators.md:1223 +#: ../../reference/operators.md:1249 msgid "`In`(variadic, T1): Input tensors." msgstr "``In`` (多列数组,类型为 T1 ):输入 tensor 。" -#: ../../reference/scql_operators.md:1190 -#: ../../reference/scql_operators.md:1222 -#: ../../reference/scql_operators.md:1248 +#: ../../reference/operators.md:1196 ../../reference/operators.md:1228 +#: ../../reference/operators.md:1254 msgid "`Out`(variadic, T2): Output tensors." msgstr "``Out`` (多列数组,类型为 T2 ):输出 tensor 。" -#: ../../reference/scql_operators.md:1196 +#: ../../reference/operators.md:1202 msgid "" "`reveal_to`: List of parties to see the private data. If it is revealed " "to one party only, the other party also needs to run the op, but does not" @@ -897,98 +822,93 @@ msgstr "" "``reveal_to`` :可以获取结果的参与方列表。如果只有一方能获取结果,那么另一方也需要运行 ``MakePrivate`` " "操作,但它无法获取结果。只有被指定为 reveal_to 的参与方才能获取结果。" -#: ../../reference/scql_operators.md:1205 +#: ../../reference/operators.md:1211 msgid "`T1`: secret,public" msgstr "``T1`` :秘态,公开" -#: ../../reference/scql_operators.md:1211 +#: ../../reference/operators.md:1217 msgid "`MakePublic`" msgstr "`MakePublic`" -#: ../../reference/scql_operators.md:1213 +#: ../../reference/operators.md:1219 msgid "Definition: Convert In tensor from share/private status to public status." msgstr "定义:将 tensor 从私有或者秘态转变为公开状态。" -#: ../../reference/scql_operators.md:1231 +#: ../../reference/operators.md:1237 msgid "`T1`: private,secret" msgstr "``T1`` :私有,密态" -#: ../../reference/scql_operators.md:1233 +#: ../../reference/operators.md:1239 msgid "`T2`: public" msgstr "`T2` :公开" -#: ../../reference/scql_operators.md:1237 +#: ../../reference/operators.md:1243 msgid "`MakeShare`" msgstr "`MakeShare`" -#: ../../reference/scql_operators.md:1239 +#: ../../reference/operators.md:1245 msgid "Definition: Convert In tensor from private status to share status." msgstr "定义:将 tensor 从私有态转变为秘态。" -#: ../../reference/scql_operators.md:1259 +#: ../../reference/operators.md:1265 msgid "`T2`: secret" msgstr "``T2`` : 密态" -#: ../../reference/scql_operators.md:1263 +#: ../../reference/operators.md:1269 msgid "`Minus`" msgstr "`Minus`" -#: ../../reference/scql_operators.md:1265 +#: ../../reference/operators.md:1271 msgid "Definition: Out = Left `Minus` Right" msgstr "定义:对两个 tensor 进行求最小值运算, Out = (Left ``Minus`` Right) 。" -#: ../../reference/scql_operators.md:1293 +#: ../../reference/operators.md:1299 msgid "`Mod`" msgstr "`Mod`" -#: ../../reference/scql_operators.md:1295 +#: ../../reference/operators.md:1301 msgid "Definition: Out = Left `Mod` Right" msgstr "定义:对两个 tensor 进行求余运算, Out = (Left % Right) 。" -#: ../../reference/scql_operators.md:1323 +#: ../../reference/operators.md:1329 msgid "`Mul`" msgstr "`Mul`" -#: ../../reference/scql_operators.md:1325 +#: ../../reference/operators.md:1331 msgid "Definition: Out = Left `Mul` Right" msgstr "定义:对两个 tensor 进行减法运算, Out = (Left - Right) 。" -#: ../../reference/scql_operators.md:1353 +#: ../../reference/operators.md:1359 msgid "`Not`" msgstr "`Not`" -#: ../../reference/scql_operators.md:1355 +#: ../../reference/operators.md:1361 msgid "Definition: Out = Not In" msgstr "定义:对 tensor 进行逻辑非运算, Out = !In 。" -#: ../../reference/scql_operators.md:1377 +#: ../../reference/operators.md:1383 msgid "`NotEqual`" msgstr "`NotEqual`" -#: ../../reference/scql_operators.md:1379 +#: ../../reference/operators.md:1385 msgid "Definition: Out = Left `NotEqual` Right" msgstr "定义:对两个 tensor 进行比较运算, Out = (Left != Right) 。" -#: ../../reference/scql_operators.md:1407 +#: ../../reference/operators.md:1413 msgid "`ObliviousGroupAvg`" msgstr "`ObliviousGroupAvg`" -#: ../../reference/scql_operators.md:1409 -#: ../../reference/scql_operators.md:1443 -#: ../../reference/scql_operators.md:1511 -#: ../../reference/scql_operators.md:1545 -#: ../../reference/scql_operators.md:1579 +#: ../../reference/operators.md:1415 ../../reference/operators.md:1449 +#: ../../reference/operators.md:1517 ../../reference/operators.md:1551 +#: ../../reference/operators.md:1585 msgid "" "Definition: partially aggregate `In` according to end of group indicator." " Example:" msgstr "定义:根据 group mask 来对输入进行分组聚合。" -#: ../../reference/scql_operators.md:1421 -#: ../../reference/scql_operators.md:1455 -#: ../../reference/scql_operators.md:1496 -#: ../../reference/scql_operators.md:1523 -#: ../../reference/scql_operators.md:1557 -#: ../../reference/scql_operators.md:1591 +#: ../../reference/operators.md:1427 ../../reference/operators.md:1461 +#: ../../reference/operators.md:1502 ../../reference/operators.md:1529 +#: ../../reference/operators.md:1563 ../../reference/operators.md:1597 msgid "" "`Group`(single, T): End of group indicator(shape [M][1]). Element 1 means" " the row is the last element of the group, 0 is not." @@ -996,169 +916,165 @@ msgstr "" "``Group`` (单列数组,类型为 T ): groupMark (大小为 [M][1] ),其中 1 " "表示该位置的输入对应的元素是该分组中的最后一元素,0 则表示不是最后一个元素。" -#: ../../reference/scql_operators.md:1423 -#: ../../reference/scql_operators.md:1457 -#: ../../reference/scql_operators.md:1525 -#: ../../reference/scql_operators.md:1559 -#: ../../reference/scql_operators.md:1593 +#: ../../reference/operators.md:1429 ../../reference/operators.md:1463 +#: ../../reference/operators.md:1531 ../../reference/operators.md:1565 +#: ../../reference/operators.md:1599 msgid "`In`(variadic, T): Values to be aggregated (shape [M][1])." msgstr "``In`` (多列数组,类型为 T ):待进行分组聚合的输入(大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1428 -#: ../../reference/scql_operators.md:1462 -#: ../../reference/scql_operators.md:1530 -#: ../../reference/scql_operators.md:1564 -#: ../../reference/scql_operators.md:1598 +#: ../../reference/operators.md:1434 ../../reference/operators.md:1468 +#: ../../reference/operators.md:1536 ../../reference/operators.md:1570 +#: ../../reference/operators.md:1604 msgid "`Out`(variadic, T): Partially aggregated values (shape [M][1])." msgstr "``Out`` (多列数组,类型为 T ):分组聚合的结果(大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1441 +#: ../../reference/operators.md:1447 msgid "`ObliviousGroupCount`" msgstr "`ObliviousGroupCount`" -#: ../../reference/scql_operators.md:1475 +#: ../../reference/operators.md:1481 msgid "`ObliviousGroupMark`" msgstr "`ObliviousGroupMark`" -#: ../../reference/scql_operators.md:1477 +#: ../../reference/operators.md:1483 msgid "" "Definition: generate end of group indicator `Group` based on `Key`. The " "operator calculates Group[i] = not_eq(Key[i+1], Key[i]). Example:" msgstr "定义:根据输入的 key 生成一个 group ,group 的计算规则为 Group[i] = (Key[i+1] != Key[i] )。例如:" -#: ../../reference/scql_operators.md:1491 +#: ../../reference/operators.md:1497 msgid "`Key`(variadic, T): Pre-sorted group keys (shape [M][1])." msgstr "``Key`` (多列数组,类型为 T ):排序过的 group key 。" -#: ../../reference/scql_operators.md:1509 +#: ../../reference/operators.md:1515 msgid "`ObliviousGroupMax`" msgstr "`ObliviousGroupMax`" -#: ../../reference/scql_operators.md:1543 +#: ../../reference/operators.md:1549 msgid "`ObliviousGroupMin`" msgstr "`ObliviousGroupMin`" -#: ../../reference/scql_operators.md:1577 +#: ../../reference/operators.md:1583 msgid "`ObliviousGroupSum`" msgstr "`ObliviousGroupSum`" -#: ../../reference/scql_operators.md:1611 +#: ../../reference/operators.md:1617 msgid "`Publish`" msgstr "`Publish`" -#: ../../reference/scql_operators.md:1613 +#: ../../reference/operators.md:1619 msgid "Definition: This operator publishes the DAG results." msgstr "定义:将输入的 tensor 进行披露。" -#: ../../reference/scql_operators.md:1617 +#: ../../reference/operators.md:1623 msgid "`In`(variadic, T): Tensors to be published." msgstr "``In`` (多列数组,类型为 T ):要披露的 Tensors 。" -#: ../../reference/scql_operators.md:1622 +#: ../../reference/operators.md:1628 msgid "" "`Out`(variadic, T): Result tensors of the publish op. Tensors are in " "TensorOption VALUE." msgstr "``Out`` (多列数组,类型为 T ):运算结果。" -#: ../../reference/scql_operators.md:1635 +#: ../../reference/operators.md:1641 msgid "`ReduceAvg`" msgstr "`ReduceAvg`" -#: ../../reference/scql_operators.md:1637 +#: ../../reference/operators.md:1643 msgid "" "Definition: Given a input tensor In, return the average of input tensor's" " elements. Example:" msgstr "定义:给定一个输入 tensor ,返回输入 tensor 元素的平均值。例如:" -#: ../../reference/scql_operators.md:1651 +#: ../../reference/operators.md:1657 msgid "`In`(single, T): Tensor to be reduced (shape [M])." msgstr "``In`` (单列数组 , 类型为 T ):需要求平均的输入(大小为 [M] )。" -#: ../../reference/scql_operators.md:1656 +#: ../../reference/operators.md:1662 msgid "`Out`(single, T): The average Tensor (shape [1])." msgstr "``Out`` (单列数组 , 类型为 T ):计算结果(大小为 [1] )。" -#: ../../reference/scql_operators.md:1669 +#: ../../reference/operators.md:1675 msgid "`ReduceMax`" msgstr "`ReduceMax`" -#: ../../reference/scql_operators.md:1671 +#: ../../reference/operators.md:1677 msgid "" "Definition: Given a input tensor In, return the max of input tensor's " "elements. Example:" msgstr "定义:给定一个输入 tensor ,返回输入 tensor 元素的最大值。例如:" -#: ../../reference/scql_operators.md:1682 +#: ../../reference/operators.md:1688 msgid "`In`(single, T): Tensor to be maxed (shape [M])." msgstr "``In`` (单列数组 , 类型为 T ):需要计算最大值的输入(大小为 [M] )。" -#: ../../reference/scql_operators.md:1687 +#: ../../reference/operators.md:1693 msgid "`Out`(single, T): The maxed Tensor (shape [1])." msgstr "``Out`` (单列数组 , 类型为 T ):计算结果(大小为 [1] )。" -#: ../../reference/scql_operators.md:1700 +#: ../../reference/operators.md:1706 msgid "`ReduceMin`" msgstr "`ReduceMin`" -#: ../../reference/scql_operators.md:1702 +#: ../../reference/operators.md:1708 msgid "" "Definition: Given a input tensor In, return the min of input tensor's " "elements. Example:" msgstr "定义:给定一个输入 tensor ,返回输入 tensor 元素的最小值。例如:" -#: ../../reference/scql_operators.md:1713 +#: ../../reference/operators.md:1719 msgid "`In`(single, T): Tensor to be mined (shape [M])." msgstr "``In`` (单列数组 , 类型为 T ):需要计算最小值的输入(大小为 [M] )。" -#: ../../reference/scql_operators.md:1718 +#: ../../reference/operators.md:1724 msgid "`Out`(single, T): The mined Tensor (shape [1])." msgstr "``Out`` (单列数组 , 类型为 T ):计算结果(大小为 [1] )。" -#: ../../reference/scql_operators.md:1731 +#: ../../reference/operators.md:1737 msgid "`ReduceSum`" msgstr "`ReduceSum`" -#: ../../reference/scql_operators.md:1733 +#: ../../reference/operators.md:1739 msgid "" "Definition: Given an input tensor In, return the sum of input tensor's " "elements. Example:" msgstr "定义:给定一个输入 tensor ,返回输入 tensor 元素的总和。例如:" -#: ../../reference/scql_operators.md:1744 +#: ../../reference/operators.md:1750 msgid "`In`(single, T): Tensor to be summed (shape [M])." msgstr "``In`` (单列数组 , 类型为 T ):要求和的输入(大小为 [M] )。" -#: ../../reference/scql_operators.md:1749 +#: ../../reference/operators.md:1755 msgid "`Out`(single, T): The summed Tensor (shape [1])." msgstr "``Out`` (单列数组 , 类型为 T ):计算结果(大小为 [1] )。" -#: ../../reference/scql_operators.md:1762 +#: ../../reference/operators.md:1768 msgid "`RunSQL`" msgstr "`RunSQL`" -#: ../../reference/scql_operators.md:1764 +#: ../../reference/operators.md:1770 msgid "" "Definition: Run a SQL statement and return a list of tensors in private " "status" msgstr "定义:运行 SQL 语句并返回私有态的结果" -#: ../../reference/scql_operators.md:1773 +#: ../../reference/operators.md:1779 msgid "`Out`(variadic, T): Result tensors of the SQL statement." msgstr "``Out`` (多列数组,类型为 T ): SQL 语句的执行结果。" -#: ../../reference/scql_operators.md:1779 +#: ../../reference/operators.md:1785 msgid "`sql`: SQL statement" msgstr "``sql`` :SQL 语句" -#: ../../reference/scql_operators.md:1781 +#: ../../reference/operators.md:1787 msgid "`table_refs`: tables referenced by query" msgstr "``table_refs`` :SQL 语句中所引用的表格。" -#: ../../reference/scql_operators.md:1794 +#: ../../reference/operators.md:1800 msgid "`Shape`" msgstr "`Shape`" -#: ../../reference/scql_operators.md:1796 +#: ../../reference/operators.md:1802 msgid "" "Definition: Given tensors In, return shapes of each tensor. Axis starts " "from 0. If axis is set, dimensions of each shape are returned. If axis is" @@ -1167,80 +1083,79 @@ msgstr "" "定义:从维度 0 开始计算 tensor 在各个维度的大小,如果设置了 Axis,则返回 Axis 所指定的维度上的大小,否则 ( Axis " "默认为 -1),则返回 tensor 在所有维度上的大小。例如:" -#: ../../reference/scql_operators.md:1807 +#: ../../reference/operators.md:1813 msgid "`In`(variadic, T): Input Tensors" msgstr "``In`` (多列数组,类型为 T ):输入 Tensor 。" -#: ../../reference/scql_operators.md:1812 +#: ../../reference/operators.md:1818 msgid "`Out`(variadic, T1): Shape Tensors" msgstr "``Out`` (多列数组,类型为 T1 ): Tensor 在各个维度上的大小。" -#: ../../reference/scql_operators.md:1818 +#: ../../reference/operators.md:1824 msgid "`axis`: Int64. Specific dimension of the shape." msgstr "``axis`` : Int64 类型,特定的维度。" -#: ../../reference/scql_operators.md:1827 +#: ../../reference/operators.md:1833 msgid "`axis`: -1" msgstr "``axis`` : -1" -#: ../../reference/scql_operators.md:1840 +#: ../../reference/operators.md:1846 msgid "`Shuffle`" msgstr "`Shuffle`" -#: ../../reference/scql_operators.md:1842 +#: ../../reference/operators.md:1848 msgid "Definition: Shuffle `In`. Example:" msgstr "定义:将输入 tensor 的顺序进行随机打乱。例如:" -#: ../../reference/scql_operators.md:1853 +#: ../../reference/operators.md:1859 msgid "`In`(variadic, T): Input Value(shape [M][1])." msgstr "``In`` (多列数组,类型为 T ):输入 Tensor (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1858 +#: ../../reference/operators.md:1864 msgid "`Out`(variadic, T): Output Value(shape [M][1])" msgstr "``Out`` (多列数组,类型为 T ):输出 Tensor (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1871 +#: ../../reference/operators.md:1877 msgid "`Sort`" msgstr "`Sort`" -#: ../../reference/scql_operators.md:1873 +#: ../../reference/operators.md:1879 msgid "Definition: sort `In` using `Key`. Example:" msgstr "定义:根据排序键 ``Key`` 对输入 ``In`` 中的元素进行排序。例如:" -#: ../../reference/scql_operators.md:1885 +#: ../../reference/operators.md:1891 msgid "`Key`(variadic, T): Sort Key(shape [M][1])." msgstr "``Key`` (多列数组,类型为 T ):排序键(大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1887 +#: ../../reference/operators.md:1893 msgid "`In`(variadic, T): Sort Value(shape [M][1])." msgstr "``In`` (多列数组,类型为 T ):所需排序的输入(大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1892 +#: ../../reference/operators.md:1898 msgid "`Out`(variadic, T): Sorted Value(shape [M][1])" msgstr "``Out`` (多列数组,类型为 T ):排序后的结果(大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1898 +#: ../../reference/operators.md:1904 msgid "`reverse`: Bool. If True, the sorted tensor in descending order." msgstr "``reverse`` : 布尔类型, 如果为 True ,则表示按照从大到小的顺序进行排序。" -#: ../../reference/scql_operators.md:1907 +#: ../../reference/operators.md:1913 msgid "`reverse`: false" msgstr "``reverse`` : false" -#: ../../reference/scql_operators.md:1918 +#: ../../reference/operators.md:1924 msgid "`Unique`" msgstr "``Unique``" -#: ../../reference/scql_operators.md:1920 +#: ../../reference/operators.md:1926 msgid "Definition: Unique of Key tensor. Example:" msgstr "定义:获取输入 tensor 中唯一元素。例如:" -#: ../../reference/scql_operators.md:1931 +#: ../../reference/operators.md:1937 msgid "`Key`(single, T): Input key tensors(shape [M][1])." msgstr "``Key`` (单列数组,类型为 T ):输入 tensor (大小为 [M][1] )。" -#: ../../reference/scql_operators.md:1936 +#: ../../reference/operators.md:1942 msgid "`UniqueKey`(single, T): Output unique key tensor(shape [K][1])." msgstr "``UniqueKey`` (单列数组,类型为 T ):输出结果(大小为 [K][1] )。" - diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_ccl_intro.po b/docs/locales/zh_CN/LC_MESSAGES/topics/ccl/intro.po similarity index 57% rename from docs/locales/zh_CN/LC_MESSAGES/reference/scql_ccl_intro.po rename to docs/locales/zh_CN/LC_MESSAGES/topics/ccl/intro.po index 21f15058..3a38fadc 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_ccl_intro.po +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/ccl/intro.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-30 20:26+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,22 +16,24 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.0\n" -#: ../../reference/scql_ccl_intro.rst:2 +#: ../../topics/ccl/intro.rst:2 msgid "SCQL CCL" msgstr "" -#: ../../reference/scql_ccl_intro.rst:4 +#: ../../topics/ccl/intro.rst:4 msgid "" "Due to the flexibility of the SCQL syntax, the query issuer may be able " "to infer some of the original data from the results using a delicately " "constructed query. Therefore, it is generally necessary to obtain " "permission from all data owners before executing a query submitted by the" " issuer." -msgstr "由于 SCQL 语法灵活多变,查询者可以通过精巧地构造 Query 以从结果中尽可能地推测原始数据敏感信息。因此,在执行查询者提交 Query 前,一般需要获得数据 owner 的审核授权。" +msgstr "" +"由于 SCQL 语法灵活多变,查询者可以通过精巧地构造 Query 以从结果中尽可能地推测原始数据敏感信息。因此,在执行查询者提交 Query " +"前,一般需要获得数据 owner 的审核授权。" -#: ../../reference/scql_ccl_intro.rst:6 +#: ../../topics/ccl/intro.rst:6 msgid "" "Manual review of queries allows data owners to confirm how the data is " "used and whether there is any leakage of sensitive information. However, " @@ -40,9 +42,13 @@ msgid "" "and be able to identify potential information leakage problems; 2. The " "waiting time for approval before execution is long. Authorizations from " "all data owners involved in the Query is required." -msgstr "人工审核 Query 的方式可以让数据 owner 对数据如何被使用以及结果中是否包含敏感信息泄露等问题进行人工确认。但人工审核方式有如下两方面的问题:1、对审核者有较高的要求,审核者需要具备 Query 分析能力,能够分析出潜在的信息泄露问题;2、执行前审批等待时间长,Query 执行前需要获得 Query 涉及的所有数据 owner 的授权。" +msgstr "" +"人工审核 Query 的方式可以让数据 owner " +"对数据如何被使用以及结果中是否包含敏感信息泄露等问题进行人工确认。但人工审核方式有如下两方面的问题:1、对审核者有较高的要求,审核者需要具备 " +"Query 分析能力,能够分析出潜在的信息泄露问题;2、执行前审批等待时间长,Query 执行前需要获得 Query 涉及的所有数据 owner " +"的授权。" -#: ../../reference/scql_ccl_intro.rst:8 +#: ../../topics/ccl/intro.rst:8 msgid "" "SCQL provides a Column Control List (CCL) mechanism that allows data " "owners to define data usage and disclosure restrictions. Queries that do " @@ -54,13 +60,17 @@ msgid "" " extent, it cannot completely eliminate the risk of inferring sensitive " "data from query results. It is recommended to combine it with pre-" "approval to reduce the risk of inferring results." -msgstr "SCQL 提供了 Column Control List(CCL) 机制,让数据 owner 可以定义数据的使用方式和披露限制,未通过 CCL 检查的 Query 不允许执行。对于通过 CCL 检查的 Query,审核人员可以在 CCL 的辅助下专注审核 Query 结果是否可以反推原始敏感数据的问题,从而降低审核负担,提高审核效率。需要注意的是,CCL 可以一定程度上缓解数据被滥用的问题,但无法杜绝从查询结果反推原始敏感数据的风险,建议结合事前审批一起,降低结果反推风险。" +msgstr "" +"SCQL 提供了 Column Control List(CCL) 机制,让数据 owner 可以定义数据的使用方式和披露限制,未通过 CCL " +"检查的 Query 不允许执行。对于通过 CCL 检查的 Query,审核人员可以在 CCL 的辅助下专注审核 Query " +"结果是否可以反推原始敏感数据的问题,从而降低审核负担,提高审核效率。需要注意的是,CCL " +"可以一定程度上缓解数据被滥用的问题,但无法杜绝从查询结果反推原始敏感数据的风险,建议结合事前审批一起,降低结果反推风险。" -#: ../../reference/scql_ccl_intro.rst:11 +#: ../../topics/ccl/intro.rst:11 msgid "What is CCL?" msgstr "" -#: ../../reference/scql_ccl_intro.rst:13 +#: ../../topics/ccl/intro.rst:13 msgid "" "The CCL (Column Control List) constrains the revelation policy and " "operations allowed to be performed on columns. SCQL promises to comply " @@ -69,39 +79,45 @@ msgid "" "revelation policy specified by CCL. CCL can be represented as a triplet " "````, which means the constraint type" " of src_column on dest_party." -msgstr "CCL(Column Control List) 限定了列的披露策略,以及允许在列上执行的操作。SCQL承诺遵守这些限定,拒绝执行不满足CCL要求的 query,并保证执行过程不会违背 CCL 规定的数据披露策略。CCL 可以表示为一个三元组 ,其含义为 src_column 对于 dest_party 的约束策略。" +msgstr "" +"CCL(Column Control List) " +"限定了列的披露策略,以及允许在列上执行的操作。SCQL承诺遵守这些限定,拒绝执行不满足CCL要求的 query,并保证执行过程不会违背 CCL " +"规定的数据披露策略。CCL 可以表示为一个三元组 ,其含义为 " +"src_column 对于 dest_party 的约束策略。" -#: ../../reference/scql_ccl_intro.rst:16 +#: ../../topics/ccl/intro.rst:16 msgid "" "Currently, only one CCL constraint can be set for a column on a given " "participant." msgstr "一列数据对于一个参与方当前只能设置一种 CCL constraint。" -#: ../../reference/scql_ccl_intro.rst:19 +#: ../../topics/ccl/intro.rst:19 msgid "Types of CCL Constraints" msgstr "" -#: ../../reference/scql_ccl_intro.rst:21 +#: ../../topics/ccl/intro.rst:21 msgid "" "CCL Constraints are currently divided into the following seven types. " "Among them, the first six constraints describe the circumstances under " "which data can be revealed" -msgstr "根据当前已经实现的语法,目前 CCL constraints 一共分为如下 7 个类型。其中前 6 个 constraints 说明数据在何种情况下可以披露出去。" +msgstr "" +"根据当前已经实现的语法,目前 CCL constraints 一共分为如下 7 个类型。其中前 6 个 constraints " +"说明数据在何种情况下可以披露出去。" -#: ../../reference/scql_ccl_intro.rst:23 +#: ../../topics/ccl/intro.rst:23 msgid "" "``PLAINTEXT``: Computation and revelation of data in any form, including " "clear text, is permitted without any restrictions on use. Typically used " "for non-sensitive data. ``PLAINTEXT`` needs to be used with caution." msgstr "``PLAINTEXT``: 允许以任何形式(包括明文)进行计算和披露,没有任何使用上的限制,通常用于非敏感数据,请谨慎使用。" -#: ../../reference/scql_ccl_intro.rst:24 +#: ../../topics/ccl/intro.rst:24 msgid "" "``PLAINTEXT_AFTER_JOIN``: The data is allowed to be used as the key of " "INNER JOIN, and can be revealed in plaintext after JOIN." msgstr "``PLAINTEXT_AFTER_JOIN``: 允许作为 INNER JOIN 的 key,经过 JOIN 后可以明文披露。" -#: ../../reference/scql_ccl_intro.rst:25 +#: ../../topics/ccl/intro.rst:25 msgid "" "``PLAINTEXT_AFTER_GROUP_BY``: When the constrained column is used as " "GROUP BY key, it can be revealed in plaintext after GROUP BY. CCL also " @@ -110,86 +126,102 @@ msgid "" "three." msgstr "``PLAINTEXT_AFTER_GROUP_BY``: 被约束的列经过 GROUP BY 分组后可以明文披露。" -#: ../../reference/scql_ccl_intro.rst:26 +#: ../../topics/ccl/intro.rst:26 msgid "" "``PLAINTEXT_AFTER_AGGREGATE``: When the constrained column is used as the" " input parameter of aggregation functions (such as SUM, AVG, MIN, MAX, " "COUNT), the calculated results can be revealed in plaintext." -msgstr "``PLAINTEXT_AFTER_AGGREGATE``: 被约束的列经过 Aggregation 操作(如:SUM、AVG、MIN、MAX、COUNT)后的结果可以明文披露。CCL 还限制了 GROUP BY 分组的结果行数,记录行数小于等于3的分组,会被过滤掉,不会出现在最终结果中。" +msgstr "" +"``PLAINTEXT_AFTER_AGGREGATE``: 被约束的列经过 Aggregation " +"操作(如:SUM、AVG、MIN、MAX、COUNT)后的结果可以明文披露。CCL 还限制了 GROUP BY " +"分组的结果行数,记录行数小于等于3的分组,会被过滤掉,不会出现在最终结果中。" -#: ../../reference/scql_ccl_intro.rst:27 +#: ../../topics/ccl/intro.rst:27 msgid "" "``PLAINTEXT_AFTER_COMPARE``: When the constrained column is used as an " "input parameter of Compare (such as <, >, >=, =, !=, etc.), the result " "obtained can be revealed in plaintext." -msgstr "``PLAINTEXT_AFTER_COMPARE``: 被约束的列经过 Compare 操作(如:<, >, >=, =, != 等等)后的结果可以明文披露。" +msgstr "" +"``PLAINTEXT_AFTER_COMPARE``: 被约束的列经过 Compare 操作(如:<, >, >=, =, != " +"等等)后的结果可以明文披露。" -#: ../../reference/scql_ccl_intro.rst:28 +#: ../../topics/ccl/intro.rst:28 msgid "" "``ENCRYPTED_ONLY``: Always compute in a secret state, used to mark very " "sensitive data. Except for count (SCQL does not protect the size of the " "calculation intermediate results), can't be revealed in any form." -msgstr "``ENCRYPTED_ONLY``: 始终以密态的形式参与计算,用于标记非常敏感数据,除了 COUNT 外(SCQL 不保护计算中间结果的size),不允许任何形式的披露。" +msgstr "" +"``ENCRYPTED_ONLY``: 始终以密态的形式参与计算,用于标记非常敏感数据,除了 COUNT 外(SCQL " +"不保护计算中间结果的size),不允许任何形式的披露。" -#: ../../reference/scql_ccl_intro.rst:29 +#: ../../topics/ccl/intro.rst:29 msgid "" "``UNKNOWN``: Not defined, currently refuses to be revealed in any form by" " default." msgstr "``UNKNOWN``: 未定义,目前默认拒绝以任何形式披露。" -#: ../../reference/scql_ccl_intro.rst:32 +#: ../../topics/ccl/intro.rst:32 msgid "" "User is advised to set the CCL according to the scenario and privacy " "protection needs. The attacker may construct a query that satisfies the " "CCL constraint, and infer the sensitive information of the original data " "from the result through complex query or multiple query methods. For " -"related risk descriptions and suggestions, see :ref:`SCQL Security " -"Statement `." -msgstr "请用户根据自己的场景需求和隐私保护需要设置 CCL。攻击者可能会构造满足 CCL 约束的 Query,通过复杂查询或者多次查询方式,从结果推测原始数据敏感信息,相关风险描述和建议见 :ref:`SCQL 安全声明 `。" +"related risk descriptions and suggestions, see :doc:`SCQL security " +"overview `." +msgstr "" +"请用户根据自己的场景需求和隐私保护需要设置 CCL。攻击者可能会构造满足 CCL 约束的 " +"Query,通过复杂查询或者多次查询方式,从结果推测原始数据敏感信息,相关风险描述和建议见 :doc:`SCQL 安全性说明 `." -#: ../../reference/scql_ccl_intro.rst:35 +#: ../../topics/ccl/intro.rst:35 msgid "Advantages of CCL" msgstr "" -#: ../../reference/scql_ccl_intro.rst:37 +#: ../../topics/ccl/intro.rst:37 msgid "" "The primary role of CCL is to provide data owners with the ability to " "restrict how their data is used. Another benefit brought by CCL is that " "it can provide hints for SCQL execution optimization." -msgstr "CCL 的首要作用是,给数据 OWNER 提供约束自己数据如何被使用的能力。CCL 带来的另外一个好处是,可以为 SCQL 执行优化提供 hints。" +msgstr "" +"CCL 的首要作用是,给数据 OWNER 提供约束自己数据如何被使用的能力。CCL 带来的另外一个好处是,可以为 SCQL 执行优化提供 " +"hints。" -#: ../../reference/scql_ccl_intro.rst:39 +#: ../../topics/ccl/intro.rst:39 msgid "" "For example, when the CCL constraint of the column is " "``PLAINTEXT_AFTER_AGGREGATE``, the result of the SUM of the column can " "participate in the next calculation in plaintext state, which can speed " "up the overall execution efficiency." -msgstr "比如当某一列的 CCL constraint 为 ``PLAINTEXT_AFTER_AGGREGATE`` 时,该列数据经过 SUM 聚合计算后,就可以以明文的状态参与接下里的计算,加快整体的执行效率。" +msgstr "" +"比如当某一列的 CCL constraint 为 ``PLAINTEXT_AFTER_AGGREGATE`` 时,该列数据经过 SUM " +"聚合计算后,就可以以明文的状态参与接下里的计算,加快整体的执行效率。" -#: ../../reference/scql_ccl_intro.rst:42 +#: ../../topics/ccl/intro.rst:44 msgid "How CCL Works?" msgstr "" -#: ../../reference/scql_ccl_intro.rst:44 +#: ../../topics/ccl/intro.rst:46 msgid "" "Translator takes the Logical Plan generated by the query and CCL settings" " as input, and then builds a Logical Plan with CCL. Translator will check" " the CCL of the the result contained in the root node, and only allow the" " query to execute if the CCL constraints of the result for the issuer is " "``PLAINTEXT``, otherwise, reject the query." -msgstr "Translator 把 query 翻译得到的 Logical Plan 和 CCL 作为输入,经过 CCL 推导构建出带 CCL 的 Logical Plan。Translator 将检查根节点即结果的CCL,仅当结果对 query 发起者的约束为 ``PLAINTEXT`` 时,才允许 query 继续执行,否则拒绝此 query 的执行。" +msgstr "" +"Translator 把 query 翻译得到的 Logical Plan 和 CCL 作为输入,经过 CCL 推导构建出带 CCL 的 " +"Logical Plan。Translator 将检查根节点即结果的CCL,仅当结果对 query 发起者的约束为 ``PLAINTEXT`` " +"时,才允许 query 继续执行,否则拒绝此 query 的执行。" -#: ../../reference/scql_ccl_intro.rst:-1 +#: ../../topics/ccl/intro.rst:-1 msgid "Logical Plan with CCL" msgstr "" -#: ../../reference/scql_ccl_intro.rst:49 +#: ../../topics/ccl/intro.rst:51 msgid "" "The following is a brief introduction and explanation of the derivation " "process and principle of CCL." msgstr "下面将对 CCL 的推导过程及原理进行简单介绍和说明。" -#: ../../reference/scql_ccl_intro.rst:51 +#: ../../topics/ccl/intro.rst:53 msgid "" "The derivation is based on the CCL set by the user. The derivation " "strategy is divided into two categories, one is the derivation of " @@ -197,177 +229,204 @@ msgid "" "functions; the other is the derivation of general expressions." msgstr "推导以用户设置的 CCL 为基础,推导方法分为两类,一类是特定操作的推导,比如关系代数操作、特定的函数;另一类是通用表达式推导。" -#: ../../reference/scql_ccl_intro.rst:54 +#: ../../topics/ccl/intro.rst:56 msgid "Specific Operators Derivation" msgstr "特定操作推导" -#: ../../reference/scql_ccl_intro.rst:56 +#: ../../topics/ccl/intro.rst:58 msgid "" "The following explains the derivation of specific operations, taking " "operations such as JOIN and GROUP BY as examples." msgstr "下面以 JOIN, GROUP BY 等操作为例,讲解特定操作的推导。" -#: ../../reference/scql_ccl_intro.rst:58 +#: ../../topics/ccl/intro.rst:60 msgid "**Join**" msgstr "" -#: ../../reference/scql_ccl_intro.rst:60 +#: ../../topics/ccl/intro.rst:62 msgid "" "When the CCL constraints of the JOIN keys are both " "``PLAINTEXT_AFTER_JOIN`` or ``PLAINTEXT``, the CCL constraint type of the" " intersection result is ``PLAINTEXT``." -msgstr "当 JOIN keys 的 CCL constraint 均为 ``PLAINTEXT_AFTER_JOIN`` 或 ``PLAINTEXT`` 时,则 JOIN keys 的交集的 CCL constraint 类型为 ``PLAINTEXT``。" +msgstr "" +"当 JOIN keys 的 CCL constraint 均为 ``PLAINTEXT_AFTER_JOIN`` 或 ``PLAINTEXT`` " +"时,则 JOIN keys 的交集的 CCL constraint 类型为 ``PLAINTEXT``。" -#: ../../reference/scql_ccl_intro.rst:62 +#: ../../topics/ccl/intro.rst:64 msgid "**Group By**" msgstr "" -#: ../../reference/scql_ccl_intro.rst:64 +#: ../../topics/ccl/intro.rst:66 msgid "" "When the CCL constraints of GROUP BY keys are " "``PLAINTEXT_AFTER_GROUP_BY`` or ``PLAINTEXT``, the CCL constraints of the" " group by keys after GROUP BY are ``PLAINTEXT``." -msgstr "当 GROUP BY key 的 CCL constraint 均为 ``PLAINTEXT_AFTER_GROUP_BY`` 或 ``PLAINTEXT`` 时,则 GROUP BY key 经过 GROUP BY 操作后的结果的 CCL constraint 为 ``PLAINTEXT``。" +msgstr "" +"当 GROUP BY key 的 CCL constraint 均为 ``PLAINTEXT_AFTER_GROUP_BY`` 或 " +"``PLAINTEXT`` 时,则 GROUP BY key 经过 GROUP BY 操作后的结果的 CCL constraint 为 " +"``PLAINTEXT``。" -#: ../../reference/scql_ccl_intro.rst:66 +#: ../../topics/ccl/intro.rst:68 msgid "**Aggregate**" msgstr "" -#: ../../reference/scql_ccl_intro.rst:68 +#: ../../topics/ccl/intro.rst:70 msgid "" "When the CCL constraints of the input parameters of the aggregation " "functions (such as SUM, AVG, MIN, MAX, COUNT) are " "``PLAINTEXT_AFTER_AGGREGATE`` or ``PLAINTEXT``, the CCL constraints of " "the results of the aggregation function are ``PLAINTEXT``" -msgstr "当 aggregation functions(如:SUM、AVG、MIN、MAX、COUNT)的入参 CCL constraint 为 ``PLAINTEXT_AFTER_AGGREGATE`` 或 ``PLAINTEXT`` 时,则 aggregation function 的 results 的 CCL constraint 为 ``PLAINTEXT``。" +msgstr "" +"当 aggregation functions(如:SUM、AVG、MIN、MAX、COUNT)的入参 CCL constraint 为 " +"``PLAINTEXT_AFTER_AGGREGATE`` 或 ``PLAINTEXT`` 时,则 aggregation function 的 " +"results 的 CCL constraint 为 ``PLAINTEXT``。" -#: ../../reference/scql_ccl_intro.rst:70 +#: ../../topics/ccl/intro.rst:72 msgid "**Compare**" msgstr "" -#: ../../reference/scql_ccl_intro.rst:72 +#: ../../topics/ccl/intro.rst:74 msgid "" "When the CCL constraints of the input parameters of the compare function " "(> < = >= <= !=) are set to ``PLAINTEXT_AFTER_COMPARE`` or ``PLAINTEXT``," " the CCL constraints of the results of the compare function will be set " "to ``PLAINTEXT``" -msgstr "当 compare function(> < = >= <= !=)的入参 CCL constraint 均为 ``PLAINTEXT_AFTER_COMPARE`` 或 ``PLAINTEXT`` 时,则 compare function 的 results 的 CCL constraint 为 ``PLAINTEXT``。" +msgstr "" +"当 compare function(> < = >= <= !=)的入参 CCL constraint 均为 " +"``PLAINTEXT_AFTER_COMPARE`` 或 ``PLAINTEXT`` 时,则 compare function 的 " +"results 的 CCL constraint 为 ``PLAINTEXT``。" -#: ../../reference/scql_ccl_intro.rst:75 +#: ../../topics/ccl/intro.rst:77 msgid "General Operators Derivation" msgstr "通用表达式推导" -#: ../../reference/scql_ccl_intro.rst:77 +#: ../../topics/ccl/intro.rst:79 msgid "" "For a general operator/function, CCL derives the CCL constraints of the " "results according to the CCL constraints of the input parameters. CCL " "derivation can be divided into the following situations (UNKNOWN " "indicates that the derivation process is abnormal, which will not be " "discussed here):" -msgstr "对于通用 operator/function,根据入参的 CCL constraint 推导其结果的 CCL constraint,可以分为以下几种情况( ``UNKNOWN`` 属于异常情况,不在此处讨论):" +msgstr "" +"对于通用 operator/function,根据入参的 CCL constraint 推导其结果的 CCL " +"constraint,可以分为以下几种情况( ``UNKNOWN`` 属于异常情况,不在此处讨论):" -#: ../../reference/scql_ccl_intro.rst:79 +#: ../../topics/ccl/intro.rst:81 msgid "" "When one of the input parameters' CCL constraint is ``PLAINTEXT``, the " "influence of this input parameter on the CCL constraint of the result can" " be ignored during the derivation of the CCL constraint." -msgstr "当其中一个入参的 CCL constraint 为 ``PLAINTEXT`` 时,在 CCL constraint 推导时可以忽略该参数不影响结果的 CCL constraint。" +msgstr "" +"当其中一个入参的 CCL constraint 为 ``PLAINTEXT`` 时,在 CCL constraint " +"推导时可以忽略该参数不影响结果的 CCL constraint。" -#: ../../reference/scql_ccl_intro.rst:80 +#: ../../topics/ccl/intro.rst:82 msgid "" "When one of the input parameters' CCL constraint is ``ENCRYPTED_ONLY``, " "the CCL constraint of the result is ``ENCRYPTED_ONLY``." -msgstr "当其中一个入参的 CCL constraint 为 ``ENCRYPTED_ONLY`` 时,则结果的 CCL constraint 为 ``ENCRYPTED_ONLY``。" +msgstr "" +"当其中一个入参的 CCL constraint 为 ``ENCRYPTED_ONLY`` 时,则结果的 CCL constraint 为 " +"``ENCRYPTED_ONLY``。" -#: ../../reference/scql_ccl_intro.rst:81 +#: ../../topics/ccl/intro.rst:83 msgid "" "When the CCL constraints of the input parameters are the same, return " "this CCL constraint." msgstr "当入参的 CCL constraint 相同时,返回这个 constraint。" -#: ../../reference/scql_ccl_intro.rst:82 +#: ../../topics/ccl/intro.rst:84 msgid "" "For operators without input parameters, such as CURDATE(), NOW() and " "other functions, the CCL constraint of the result is ``PLAINTEXT``." -msgstr "对于无入参的 operators,比如 CURDATE(), NOW() 等函数,结果的 CCL constraint 为 ``PLAINTEXT``。" +msgstr "" +"对于无入参的 operators,比如 CURDATE(), NOW() 等函数,结果的 CCL constraint 为 " +"``PLAINTEXT``。" -#: ../../reference/scql_ccl_intro.rst:84 +#: ../../topics/ccl/intro.rst:86 msgid "" "For the constants in the query, it can be considered that the CCL " "constraints for all parties are ``PLAINTEXT``." msgstr "对于 query 中的常量可以认为对所有参与方的 CCL constraint 为 ``PLAINTEXT``。" -#: ../../reference/scql_ccl_intro.rst:86 +#: ../../topics/ccl/intro.rst:88 msgid "" "For situations other than above, it is currently considered impossible to" " derive, and the CCL constraint of the result is ``UNKNOWN``." msgstr "对于不在上述情况的,目前认为无法进行推导,返回的结果的 CCL constraint 为 ``UNKNOWN``。" -#: ../../reference/scql_ccl_intro.rst:89 +#: ../../topics/ccl/intro.rst:91 msgid "Examples" msgstr "CCL 使用示例" -#: ../../reference/scql_ccl_intro.rst:91 +#: ../../topics/ccl/intro.rst:93 msgid "" "Assume that there are two parties, Alice and Bob. Alice holds the data " "table ta, while Bob holds the data table tb, and both of them collaborate" " to execute a query task. The table ta held by Alice contains the fields " "id and rank, and the table tb held by Bob contains the fields id and " "rank." -msgstr "假设当前有两个参与方 Alice 和 Bob,其中 Alice 持有数据 table ta,Bob 持有数据 table tb,两者共同执行一次 sql 查询任务。其中 Alice 持有的 table ta 包含字段 id 和 rank,Bob 持有的 table tb 包含字段 id 和 rank。" +msgstr "" +"假设当前有两个参与方 Alice 和 Bob,其中 Alice 持有数据 table ta,Bob 持有数据 table tb,两者共同执行一次 " +"sql 查询任务。其中 Alice 持有的 table ta 包含字段 id 和 rank,Bob 持有的 table tb 包含字段 id 和 " +"rank。" -#: ../../reference/scql_ccl_intro.rst:93 +#: ../../topics/ccl/intro.rst:95 msgid "CCL settings of table ta at Alice:" msgstr "Alice 设置 CCL 如下:" -#: ../../reference/scql_ccl_intro.rst:95 +#: ../../topics/ccl/intro.rst:97 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:96 +#: ../../topics/ccl/intro.rst:98 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:97 +#: ../../topics/ccl/intro.rst:99 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:98 +#: ../../topics/ccl/intro.rst:100 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:100 +#: ../../topics/ccl/intro.rst:102 msgid "CCL settings of table tb at Bob:" msgstr "Bob 设置 CCL 如下:" -#: ../../reference/scql_ccl_intro.rst:102 +#: ../../topics/ccl/intro.rst:104 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:103 +#: ../../topics/ccl/intro.rst:105 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:104 +#: ../../topics/ccl/intro.rst:106 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:105 +#: ../../topics/ccl/intro.rst:107 msgid "````" msgstr "" -#: ../../reference/scql_ccl_intro.rst:107 +#: ../../topics/ccl/intro.rst:109 msgid "" "When Alice executes query ``select tb.rank from ta join tb on ta.id = " "tb.id``, SCQL will verify the CCL and generate a verification failure " "error: tb.rank is not ``PLAINTEXT`` for Alice's CCL constraint." -msgstr "当 Alice 执行 query ``select tb.rank from ta join tb on ta.id = tb.id``,SCQL 会校验 CCL 失败产生并返回错误:tb.rank 对于 Alice 的 CCL constraint 不是 ``PLAINTEXT``。" +msgstr "" +"当 Alice 执行 query ``select tb.rank from ta join tb on ta.id = tb.id``,SCQL" +" 会校验 CCL 失败产生并返回错误:tb.rank 对于 Alice 的 CCL constraint 不是 ``PLAINTEXT``。" -#: ../../reference/scql_ccl_intro.rst:109 +#: ../../topics/ccl/intro.rst:111 msgid "" "When Alice executes query ``select ta.rank > tb.rank from ta join tb on " "ta.id = tb.id``, SCQL CCL verification passes, the query can be executed " "normally and the result can be obtained, since the CCL constraint of the " "result of ``ta.rank > tb.rank`` for Alice is ``PLAINTEXT``." -msgstr "而当 Alice 执行 query ``select ta.rank > tb.rank from ta join tb on ta.id = tb.id``,这时 CCL 推导得到 ta.rank > tb.rank 对于 Alice 的 CCL constraint 为 ``PLAINTEXT``,校验 CCL 通过,则 query 可以正常执行。" +msgstr "" +"而当 Alice 执行 query ``select ta.rank > tb.rank from ta join tb on ta.id = " +"tb.id``,这时 CCL 推导得到 ta.rank > tb.rank 对于 Alice 的 CCL constraint 为 " +"``PLAINTEXT``,校验 CCL 通过,则 query 可以正常执行。" diff --git a/docs/locales/zh_CN/LC_MESSAGES/getting_started/how_to_set_ccl.po b/docs/locales/zh_CN/LC_MESSAGES/topics/ccl/usage.po similarity index 55% rename from docs/locales/zh_CN/LC_MESSAGES/getting_started/how_to_set_ccl.po rename to docs/locales/zh_CN/LC_MESSAGES/topics/ccl/usage.po index a3864ea0..79790f24 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/getting_started/how_to_set_ccl.po +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/ccl/usage.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-30 20:12+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,309 +16,293 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.11.0\n" +"Generated-By: Babel 2.13.0\n" -#: ../../getting_started/how_to_set_ccl.rst:2 +#: ../../topics/ccl/usage.rst:2 msgid "CCL Setting Suggestions" msgstr "CCL 配置建议" -#: ../../getting_started/how_to_set_ccl.rst:4 +#: ../../topics/ccl/usage.rst:4 msgid "" "This document will give some examples on CCL settings in typical " "scenarios. You can set CCL according to your needs in practical " "scenarios." msgstr "本文档将给出一些典型场景下 CCL 配置示例。在实际场景中您可以根据您的需求进行 CCL 配置。" -#: ../../getting_started/how_to_set_ccl.rst:7 +#: ../../topics/ccl/usage.rst:7 msgid "Pre-knowledge" msgstr "预备知识" -#: ../../getting_started/how_to_set_ccl.rst:9 -msgid "What is SCQL CCL? Please read :ref:`/reference/scql_ccl_intro.rst`." -msgstr "什么是 SCQL CCL?请参阅 :ref:`/reference/scql_ccl_intro.rst`。" +#: ../../topics/ccl/usage.rst:9 +msgid "What is SCQL CCL? Please read :doc:`/topics/ccl/intro`." +msgstr "什么是 SCQL CCL?请参阅 :doc:`/topics/ccl/intro`。" -#: ../../getting_started/how_to_set_ccl.rst:11 +#: ../../topics/ccl/usage.rst:11 msgid "Grant CCL syntax, please read :ref:`Grant/Revoke CCL`." msgstr "Grant CCL 语法,请参阅 :ref:`Grant/Revoke CCL`。" -#: ../../getting_started/how_to_set_ccl.rst:14 +#: ../../topics/ccl/usage.rst:14 msgid "Examples" msgstr "示例" -#: ../../getting_started/how_to_set_ccl.rst:16 +#: ../../topics/ccl/usage.rst:16 msgid "" "This part will give suggestions for CCL settings based on different query" " scenario examples." msgstr "本小节将根据不同的查询场景示例给出 CCL 配置建议。" -#: ../../getting_started/how_to_set_ccl.rst:18 +#: ../../topics/ccl/usage.rst:18 msgid "" "Let's take the joint analysis between party Alice and Bob as examples to " "illustrate. Party Alice owns table ``t1`` which has fields ``id``, " "``credit_rank``, ``income``, ``join_date`` and ``age``. Party Bob owns " "table ``t2`` which has fields ``id``, ``age``, ``order_amount``, " "``is_active``, ``admin_date``, ``out_date``." -msgstr "下面以 Alice 和 Bob 的联合分析为例进行说明,参与方 Alice 拥有表 ``t1``,该表包含字段 ``id``,``credit_rank``,``income``,``join_date`` 和 ``age``。参与方 Bob 拥有表 ``t2``,该表包含字段 ``id``,``age``,``order_amount``,``is_active``,``admin_date``,``out_date``。" +msgstr "" +"下面以 Alice 和 Bob 的联合分析为例进行说明,参与方 Alice 拥有表 ``t1``,该表包含字段 " +"``id``,``credit_rank``,``income``,``join_date`` 和 ``age``。参与方 Bob 拥有表 " +"``t2``,该表包含字段 " +"``id``,``age``,``order_amount``,``is_active``,``admin_date``,``out_date``。" -#: ../../getting_started/how_to_set_ccl.rst:20 +#: ../../topics/ccl/usage.rst:20 msgid "We represent the CCL settings with a 3-tuple form as follows." msgstr "如下所示,我们以三元组的形式展示 CCL 配置。" -#: ../../getting_started/how_to_set_ccl.rst:22 +#: ../../topics/ccl/usage.rst:22 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:24 +#: ../../topics/ccl/usage.rst:24 msgid "" "It means ``src_column`` is accessible to ``dest_party`` with the " "``constraint``. If multiple columns have the same CCL for a party, it " "will be abbreviated as follows." -msgstr "这意味着 ``dest_party`` 对 ``src_column`` 的访问约束为 ``constraint``。若参与方存在多列相同的 CCL,它将缩写为如下形式。" +msgstr "" +"这意味着 ``dest_party`` 对 ``src_column`` 的访问约束为 ``constraint``。若参与方存在多列相同的 " +"CCL,它将缩写为如下形式。" -#: ../../getting_started/how_to_set_ccl.rst:27 +#: ../../topics/ccl/usage.rst:27 msgid "``<[src_column1,src_column2,...], dest_party, constraint>``." msgstr "``<[src_column1,src_column2,...], dest_party, constraint>``。" -#: ../../getting_started/how_to_set_ccl.rst:30 +#: ../../topics/ccl/usage.rst:30 msgid "Get Intersection Case" msgstr "求交场景" -#: ../../getting_started/how_to_set_ccl.rst:33 +#: ../../topics/ccl/usage.rst:33 msgid "Get the intersection of ids using join" msgstr "使用 join 获取 ids 的交集" -#: ../../getting_started/how_to_set_ccl.rst:37 -#: ../../getting_started/how_to_set_ccl.rst:53 -#: ../../getting_started/how_to_set_ccl.rst:71 -#: ../../getting_started/how_to_set_ccl.rst:92 -#: ../../getting_started/how_to_set_ccl.rst:114 -#: ../../getting_started/how_to_set_ccl.rst:129 -#: ../../getting_started/how_to_set_ccl.rst:156 -#: ../../getting_started/how_to_set_ccl.rst:177 -#: ../../getting_started/how_to_set_ccl.rst:198 -#: ../../getting_started/how_to_set_ccl.rst:222 +#: ../../topics/ccl/usage.rst:37 ../../topics/ccl/usage.rst:53 +#: ../../topics/ccl/usage.rst:71 ../../topics/ccl/usage.rst:92 +#: ../../topics/ccl/usage.rst:114 ../../topics/ccl/usage.rst:129 +#: ../../topics/ccl/usage.rst:156 ../../topics/ccl/usage.rst:177 +#: ../../topics/ccl/usage.rst:198 ../../topics/ccl/usage.rst:222 msgid "CCL settings of table t1 at Alice" msgstr "Alice 表 t1 的 CCL 配置" -#: ../../getting_started/how_to_set_ccl.rst:36 -#: ../../getting_started/how_to_set_ccl.rst:89 -#: ../../getting_started/how_to_set_ccl.rst:111 -#: ../../getting_started/how_to_set_ccl.rst:127 -#: ../../getting_started/how_to_set_ccl.rst:152 -#: ../../getting_started/how_to_set_ccl.rst:175 +#: ../../topics/ccl/usage.rst:36 ../../topics/ccl/usage.rst:89 +#: ../../topics/ccl/usage.rst:111 ../../topics/ccl/usage.rst:127 +#: ../../topics/ccl/usage.rst:152 ../../topics/ccl/usage.rst:175 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:37 -#: ../../getting_started/how_to_set_ccl.rst:53 -#: ../../getting_started/how_to_set_ccl.rst:71 +#: ../../topics/ccl/usage.rst:37 ../../topics/ccl/usage.rst:53 +#: ../../topics/ccl/usage.rst:71 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:41 -#: ../../getting_started/how_to_set_ccl.rst:57 -#: ../../getting_started/how_to_set_ccl.rst:75 -#: ../../getting_started/how_to_set_ccl.rst:98 -#: ../../getting_started/how_to_set_ccl.rst:134 -#: ../../getting_started/how_to_set_ccl.rst:163 -#: ../../getting_started/how_to_set_ccl.rst:183 -#: ../../getting_started/how_to_set_ccl.rst:202 -#: ../../getting_started/how_to_set_ccl.rst:226 +#: ../../topics/ccl/usage.rst:41 ../../topics/ccl/usage.rst:57 +#: ../../topics/ccl/usage.rst:75 ../../topics/ccl/usage.rst:98 +#: ../../topics/ccl/usage.rst:134 ../../topics/ccl/usage.rst:163 +#: ../../topics/ccl/usage.rst:183 ../../topics/ccl/usage.rst:202 +#: ../../topics/ccl/usage.rst:226 msgid "CCL settings of table t2 at Bob" msgstr "Bob 表 t2 的 CCL 配置" -#: ../../getting_started/how_to_set_ccl.rst:40 -#: ../../getting_started/how_to_set_ccl.rst:95 -#: ../../getting_started/how_to_set_ccl.rst:132 -#: ../../getting_started/how_to_set_ccl.rst:159 -#: ../../getting_started/how_to_set_ccl.rst:180 +#: ../../topics/ccl/usage.rst:40 ../../topics/ccl/usage.rst:95 +#: ../../topics/ccl/usage.rst:132 ../../topics/ccl/usage.rst:159 +#: ../../topics/ccl/usage.rst:180 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:41 -#: ../../getting_started/how_to_set_ccl.rst:57 -#: ../../getting_started/how_to_set_ccl.rst:75 +#: ../../topics/ccl/usage.rst:41 ../../topics/ccl/usage.rst:57 +#: ../../topics/ccl/usage.rst:75 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:49 +#: ../../topics/ccl/usage.rst:49 msgid "Get ids both in t1.id and in t2.id using in" msgstr "使用 in 获取 t1.id 和 t2.id 中均存在的 id" -#: ../../getting_started/how_to_set_ccl.rst:52 +#: ../../topics/ccl/usage.rst:52 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:56 -#: ../../getting_started/how_to_set_ccl.rst:74 +#: ../../topics/ccl/usage.rst:56 ../../topics/ccl/usage.rst:74 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:67 -#: ../../getting_started/how_to_set_ccl.rst:106 +#: ../../topics/ccl/usage.rst:67 ../../topics/ccl/usage.rst:106 msgid "**More restricted CCL**" msgstr "**更严格的 CCL**" -#: ../../getting_started/how_to_set_ccl.rst:70 +#: ../../topics/ccl/usage.rst:70 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:83 +#: ../../topics/ccl/usage.rst:83 msgid "Aggregation Case" msgstr "聚合场景" -#: ../../getting_started/how_to_set_ccl.rst:86 +#: ../../topics/ccl/usage.rst:86 msgid "Analyze data using aggregation functions with group by" msgstr "使用带有 group by 的聚合函数进行数据分析" -#: ../../getting_started/how_to_set_ccl.rst:90 -#: ../../getting_started/how_to_set_ccl.rst:112 -#: ../../getting_started/how_to_set_ccl.rst:153 -#: ../../getting_started/how_to_set_ccl.rst:197 -#: ../../getting_started/how_to_set_ccl.rst:221 +#: ../../topics/ccl/usage.rst:90 ../../topics/ccl/usage.rst:112 +#: ../../topics/ccl/usage.rst:153 ../../topics/ccl/usage.rst:197 +#: ../../topics/ccl/usage.rst:221 msgid "``<[id, age, income, credit_rank], Alice, PLAINTEXT>``" msgstr "``<[id, age, income, credit_rank], Alice, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:91 -#: ../../getting_started/how_to_set_ccl.rst:129 +#: ../../topics/ccl/usage.rst:91 ../../topics/ccl/usage.rst:129 msgid "``<[age, income], Bob, PLAINTEXT_AFTER_AGGREGATE>``" msgstr "``<[age, income], Bob, PLAINTEXT_AFTER_AGGREGATE>``" -#: ../../getting_started/how_to_set_ccl.rst:92 -#: ../../getting_started/how_to_set_ccl.rst:114 -#: ../../getting_started/how_to_set_ccl.rst:156 +#: ../../topics/ccl/usage.rst:92 ../../topics/ccl/usage.rst:114 +#: ../../topics/ccl/usage.rst:156 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:96 -#: ../../getting_started/how_to_set_ccl.rst:160 -#: ../../getting_started/how_to_set_ccl.rst:202 -#: ../../getting_started/how_to_set_ccl.rst:226 +#: ../../topics/ccl/usage.rst:96 ../../topics/ccl/usage.rst:160 +#: ../../topics/ccl/usage.rst:202 ../../topics/ccl/usage.rst:226 msgid "``<[id, age, order_amount, is_active], Bob, PLAINTEXT>``" msgstr "``<[id, age, order_amount, is_active], Bob, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:97 -#: ../../getting_started/how_to_set_ccl.rst:134 +#: ../../topics/ccl/usage.rst:97 ../../topics/ccl/usage.rst:134 msgid "``<[age, order_amount], Alice, PLAINTEXT_AFTER_AGGREGATE>``" msgstr "``<[age, order_amount], Alice, PLAINTEXT_AFTER_AGGREGATE>``" -#: ../../getting_started/how_to_set_ccl.rst:98 -#: ../../getting_started/how_to_set_ccl.rst:163 +#: ../../topics/ccl/usage.rst:98 ../../topics/ccl/usage.rst:163 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:108 +#: ../../topics/ccl/usage.rst:108 msgid "" "If Alice don't want to reveal age/income info to Bob, just set group " "keys' CCL constraint to ``ENCRYPTED_ONLY``. Bob's CCL settings remain the" " same as before, modify the CCL settings of Alice to the following " "configuration" -msgstr "如果 Alice 不希望将 age/income 信息泄露给 Bob,那么 Alice 仅需将 group by key 的 CCL 约束设置为 ``ENCRYPTED_ONLY``。Bob 的 CCL 配置与先前配置保持一致,并按照如下设定修改 Alice 的 CCL 配置即可。" +msgstr "" +"如果 Alice 不希望将 age/income 信息泄露给 Bob,那么 Alice 仅需将 group by key 的 CCL 约束设置为 " +"``ENCRYPTED_ONLY``。Bob 的 CCL 配置与先前配置保持一致,并按照如下设定修改 Alice 的 CCL 配置即可。" -#: ../../getting_started/how_to_set_ccl.rst:113 +#: ../../topics/ccl/usage.rst:113 msgid "``<[age, income], Bob, ENCRYPTED_ONLY>``" msgstr "``<[age, income], Bob, ENCRYPTED_ONLY>``" -#: ../../getting_started/how_to_set_ccl.rst:124 +#: ../../topics/ccl/usage.rst:124 msgid "Analyze data using aggregation functions without group by" msgstr "使用不带有 group by 的聚合函数进行数据分析" -#: ../../getting_started/how_to_set_ccl.rst:128 +#: ../../topics/ccl/usage.rst:128 msgid "``<[id, age, income], Alice, PLAINTEXT>``" msgstr "``<[id, age, income], Alice, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:133 +#: ../../topics/ccl/usage.rst:133 msgid "``<[id, age, order_amount], Bob, PLAINTEXT>``" msgstr "``<[id, age, order_amount], Bob, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:136 +#: ../../topics/ccl/usage.rst:136 msgid "**Queries without group by**" msgstr "**不使用 group by 的查询**" -#: ../../getting_started/how_to_set_ccl.rst:146 +#: ../../topics/ccl/usage.rst:146 msgid "Filter data before analyzing it" msgstr "在分析之前进行数据过滤" -#: ../../getting_started/how_to_set_ccl.rst:149 +#: ../../topics/ccl/usage.rst:149 msgid "Case 1: Filter data" msgstr "场景 1:数据过滤" -#: ../../getting_started/how_to_set_ccl.rst:154 +#: ../../topics/ccl/usage.rst:154 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:155 +#: ../../topics/ccl/usage.rst:155 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:161 +#: ../../topics/ccl/usage.rst:161 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:162 +#: ../../topics/ccl/usage.rst:162 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:172 +#: ../../topics/ccl/usage.rst:172 msgid "Case 2: Get the results of compare operators" msgstr "场景 2:获取比较运算操作的结果" -#: ../../getting_started/how_to_set_ccl.rst:176 +#: ../../topics/ccl/usage.rst:176 msgid "``<[id, income, join_date], Alice, PLAINTEXT>``" msgstr "``<[id, income, join_date], Alice, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:177 +#: ../../topics/ccl/usage.rst:177 msgid "``<[join_date, income], Bob, PLAINTEXT_AFTER_COMPARE>``" msgstr "``<[join_date, income], Bob, PLAINTEXT_AFTER_COMPARE>``" -#: ../../getting_started/how_to_set_ccl.rst:181 +#: ../../topics/ccl/usage.rst:181 msgid "``<[id, age, order_amount, admin_date, out_date], Bob, PLAINTEXT>``" msgstr "``<[id, age, order_amount, admin_date, out_date], Bob, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:182 +#: ../../topics/ccl/usage.rst:182 msgid "``<[age, admin_date, out_date], Alice, ENCRYPTED_ONLY>``" msgstr "``<[age, admin_date, out_date], Alice, ENCRYPTED_ONLY>``" -#: ../../getting_started/how_to_set_ccl.rst:183 +#: ../../topics/ccl/usage.rst:183 msgid "````" msgstr "````" -#: ../../getting_started/how_to_set_ccl.rst:192 +#: ../../topics/ccl/usage.rst:192 msgid "Data Insensitive Case/Test Case" msgstr "非敏感数据场景/测试场景" -#: ../../getting_started/how_to_set_ccl.rst:194 +#: ../../topics/ccl/usage.rst:194 msgid "" "If the data is not sensitive or test case, you can set all data to " "PLAINTEXT, then almost all queries will not be rejected by checking CCL. " "But you have to be careful, otherwise other users can easily select all " "your data." -msgstr "如果数据并非敏感或者仅是测试用例,您可以将所有数据设置为 PLAINTEXT,那么几乎所有的查询都不会被 CCL checking 所拒绝。但是进行这样的配置时应该格外小心,否则其他用户可以很容易选择到您的所有数据。" +msgstr "" +"如果数据并非敏感或者仅是测试用例,您可以将所有数据设置为 PLAINTEXT,那么几乎所有的查询都不会被 CCL checking " +"所拒绝。但是进行这样的配置时应该格外小心,否则其他用户可以很容易选择到您的所有数据。" -#: ../../getting_started/how_to_set_ccl.rst:198 +#: ../../topics/ccl/usage.rst:198 msgid "``<[id, age, income, credit_rank], Bob, PLAINTEXT>``" msgstr "``<[id, age, income, credit_rank], Bob, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:201 +#: ../../topics/ccl/usage.rst:201 msgid "``<[id, age, order_amount, is_active], Alice, PLAINTEXT>``" msgstr "``<[id, age, order_amount, is_active], Alice, PLAINTEXT>``" -#: ../../getting_started/how_to_set_ccl.rst:216 +#: ../../topics/ccl/usage.rst:216 msgid "Encrypt Case" msgstr "Encrypt CCL 场景" -#: ../../getting_started/how_to_set_ccl.rst:218 +#: ../../topics/ccl/usage.rst:218 msgid "" "If you think the data is very sensitive, then you can set them as " "``ENCRYPTED_ONLY``, then only aggregation function count can be " "performed." msgstr "如果您认为数据极度敏感,那么您应当将这些数据设置为 ``ENCRYPTED_ONLY``, 这样的设定下仅能执行聚合函数的 count 操作。" -#: ../../getting_started/how_to_set_ccl.rst:222 +#: ../../topics/ccl/usage.rst:222 msgid "``<[id, age, income, credit_rank], Bob, ENCRYPTED_ONLY>``" msgstr "``<[id, age, income, credit_rank], Bob, ENCRYPTED_ONLY>``" -#: ../../getting_started/how_to_set_ccl.rst:225 +#: ../../topics/ccl/usage.rst:225 msgid "``<[id, age, order_amount, is_active], Alice, ENCRYPTED_ONLY>``" msgstr "``<[id, age, order_amount, is_active], Alice, ENCRYPTED_ONLY>``" diff --git a/docs/locales/zh_CN/LC_MESSAGES/development/integrate_scql_system.po b/docs/locales/zh_CN/LC_MESSAGES/topics/clients/overview.po similarity index 75% rename from docs/locales/zh_CN/LC_MESSAGES/development/integrate_scql_system.po rename to docs/locales/zh_CN/LC_MESSAGES/topics/clients/overview.po index f73ab19c..ff1e02df 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/development/integrate_scql_system.po +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/clients/overview.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,53 +16,53 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../development/integrate_scql_system.rst:2 +#: ../../topics/clients/overview.rst:2 msgid "How To Integrate SCQL System" msgstr "如何集成 SCQL 系统" -#: ../../development/integrate_scql_system.rst:5 +#: ../../topics/clients/overview.rst:5 msgid "Overview" msgstr "概述" -#: ../../development/integrate_scql_system.rst:7 +#: ../../topics/clients/overview.rst:7 msgid "As shown in FIG, SCQL System needs to work with **Client**:" msgstr "如图所示,SCQL 系统需要与 **客户端(Client)** 配合工作:" -#: ../../development/integrate_scql_system.rst:9 +#: ../../topics/clients/overview.rst:9 msgid "Client: user interface designed for query submission and result retrieval." msgstr "客户端(Client):为提交查询、获取结果而设计的用户接口。" -#: ../../development/integrate_scql_system.rst:13 +#: ../../topics/clients/overview.rst:13 msgid "Therefore the platform should support Client to integrate SCQL System." msgstr "因此,平台应该提供客户端(Client)来集成 SCQL 系统。" -#: ../../development/integrate_scql_system.rst:15 +#: ../../topics/clients/overview.rst:15 msgid "Specifically, the Client interact with SCDB through Query API." msgstr "具体来说,客户端(Client)通过查询 API 与 SCDB 互动。" -#: ../../development/integrate_scql_system.rst:18 +#: ../../topics/clients/overview.rst:18 msgid "Query API" msgstr "查询 API" -#: ../../development/integrate_scql_system.rst:19 +#: ../../topics/clients/overview.rst:19 msgid "For SQL query, SCDB support services:" msgstr "对于 SQL 查询,SCDB 支持服务如下:" -#: ../../development/integrate_scql_system.rst:21 +#: ../../topics/clients/overview.rst:21 msgid "" "Submit: async API, just submit SQL query and return, server listen on " "``${SCDBHost}/public/submit_query``" msgstr "Submit:异步 API,用于提交 SQL 查询并返回,服务器监听 ``${SCDBHost}/public/submit_query``" -#: ../../development/integrate_scql_system.rst:22 +#: ../../topics/clients/overview.rst:22 msgid "" "Fetch: async API, try to get the result of a SQL query, server listen on " "``${SCDBHost}/public/fetch_result``" msgstr "Fetch:异步 API,尝试获取 SQL 查询的结果,服务器监听 ``${SCDBHost}/public/fetch_result``" -#: ../../development/integrate_scql_system.rst:23 +#: ../../topics/clients/overview.rst:23 msgid "" "SubmitAndGet: sync API, submit query and wait to get the query result, " "server listen on ``${SCDBHost}/public/submit_and_get``" @@ -70,24 +70,25 @@ msgstr "" "SubmitAndGet:同步 API,提交查询并等待获取查询结果,服务器监听 " "``${SCDBHost}/public/submit_and_get``" -#: ../../development/integrate_scql_system.rst:25 -msgid "Please refer to :doc:`../development/scql_api` for details." -msgstr "请参考 :doc:`../development/scql_api` 了解详情。" +#: ../../topics/clients/overview.rst:25 +msgid "Please refer to :doc:`/reference/http-api` for details." +msgstr "请参考 :doc:`/reference/http-api` 了解详情。" -#: ../../development/integrate_scql_system.rst:28 +#: ../../topics/clients/overview.rst:28 msgid "" "Client can choose to support either async or sync API according to " "business scenarios:" msgstr "客户端(Client)可以根据业务场景选择支持异步或同步 API:" -#: ../../development/integrate_scql_system.rst:30 +#: ../../topics/clients/overview.rst:30 msgid "" "If the SQL query task might take too much time, it is recommended to use " "the async API, otherwise use the sync API for simplicity." msgstr "如果 SQL 查询任务可能需要太多时间,建议使用异步 API,否则为了简单起见使用同步 API。" -#: ../../development/integrate_scql_system.rst:33 +#: ../../topics/clients/overview.rst:33 msgid "" "In a word, the custom Client should construct HTTP request for user's " "SQL, post to SCDB and parse the response from SCDB." msgstr "简单来说,自定义客户端(Custom Client)应该为用户的 SQL 构建 HTTP 请求,提交到 SCDB 并解析 SCDB 的响应。" + diff --git a/docs/locales/zh_CN/LC_MESSAGES/getting_started/deployment.po b/docs/locales/zh_CN/LC_MESSAGES/topics/deployment/how-to-deploy-a-cluster.po similarity index 76% rename from docs/locales/zh_CN/LC_MESSAGES/getting_started/deployment.po rename to docs/locales/zh_CN/LC_MESSAGES/topics/deployment/how-to-deploy-a-cluster.po index 04db2124..690d7dfc 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/getting_started/deployment.po +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/deployment/how-to-deploy-a-cluster.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,22 +16,22 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../getting_started/deployment.rst:3 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:3 msgid "Deployment" msgstr "部署" -#: ../../getting_started/deployment.rst:5 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:5 msgid "" "This document describes how to deploy a SCQL system with docker, and use " -"scdbclient to query, it's basically same with :doc:`quickstart`, but " -"deployed in multi-machine." +"scdbclient to query, it's basically same with :doc:`/intro/tutorial`, but" +" deployed in multi-machine." msgstr "" -"本文描述了如何使用 Docker 部署一个 SCQL 系统,并且使用 scdbclient 进行查询,它与 :doc:`quickstart` " +"本文描述了如何使用 Docker 部署一个 SCQL 系统,并且使用 scdbclient 进行查询,它与 :doc:`/intro/tutorial` " "基本相同,只不过是部署在多台机器上。" -#: ../../getting_started/deployment.rst:7 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:7 msgid "" "Before start this doc, we assume that the reader has some experience " "using the docker-compose utility. If you are new to Docker Compose, " @@ -43,11 +43,11 @@ msgstr "" "`Docker Compose 官方概述 `_,或者查看 `入门指南 " "`_。" -#: ../../getting_started/deployment.rst:10 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:10 msgid "Deployment Diagram" msgstr "部署图" -#: ../../getting_started/deployment.rst:12 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:12 msgid "" "The deployment diagram of the SCQL system that we plan to deploy is shown" " as the following figure, it involves a total of three party, including a" @@ -57,32 +57,32 @@ msgstr "" "SCQL 系统的部署图如下图所示,它涉及到三个参与方,包括一个可信的第三方和两个名为 ``Alice`` 和 ``Bob`` " "的数据提供方。我们使用三台机器来模拟不同的参与方。" -#: ../../getting_started/deployment.rst:17 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:17 msgid "" "The SCDB is served through the HTTP protocol. It is recommended to use " "HTTPS instead in production environments. Please check :ref:`TLS " "Configuration ` for details." msgstr "SCDB 使用 HTTP 协议提供服务。在生产环境建议使用 HTTPS。详情请查看 :ref:`配置 TLS `。" -#: ../../getting_started/deployment.rst:20 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:20 msgid "Step 1: Deploy SCQLEngine" msgstr "步骤一:部署 SCQLEngine" -#: ../../getting_started/deployment.rst:22 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:22 msgid "" "Here we displayed how to deploy engine in party Alice, it's same with " "party Bob." msgstr "在这里,我们将展示如何在参与方 Alice 中部署引擎,Bob 同理。" -#: ../../getting_started/deployment.rst:25 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:25 msgid "1.1 Create a Workspace" msgstr "1.1 创建工作区" -#: ../../getting_started/deployment.rst:33 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:33 msgid "1.2 Set Dataset" msgstr "1.2 设置数据集" -#: ../../getting_started/deployment.rst:35 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:35 msgid "" "The database in Engine is use to storage the origin data. In this " "document we will use MySQL as the database service, and simulate a " @@ -90,7 +90,7 @@ msgid "" "service." msgstr "引擎中的数据库用于存储原始数据。在本文档中我们将使用 MySQL 作为数据库服务并模拟一个数据集,当然,如果您愿意,也可以使用您喜欢的数据库服务。" -#: ../../getting_started/deployment.rst:37 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:37 msgid "" "To simulate a dataset, you need create a sql init file named " "alice_init.sql in your workspace, which corresponds to `alice_init.sql " @@ -105,29 +105,29 @@ msgstr "" "`_。" -#: ../../getting_started/deployment.rst:39 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:39 msgid "" "This file can also be obtained via the command-line with either curl, " "wget or another similar tool." msgstr "此文件也可以在命令行使用 curl、wget 或其它类似工具获取。" -#: ../../getting_started/deployment.rst:47 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:47 msgid "1.3 Set Engine Config" msgstr "1.3 配置引擎" -#: ../../getting_started/deployment.rst:49 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:49 msgid "" "Create a file called ``gflags.conf`` in your workspace and paste the " "following code in:" msgstr "在您的工作区中创建一个名为 ``gflags.conf`` 的文件,并粘贴以下代码:" -#: ../../getting_started/deployment.rst:62 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:62 msgid "" "See :ref:`Engine configuration options ` for more " "config information" msgstr "更多配置信息请查看 :ref:`引擎配置项 `" -#: ../../getting_started/deployment.rst:66 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:66 msgid "" "The ``connection_str`` specified in ``embed_router_conf`` is utilized to " "connect database named alice as set in `1.2 Set Dataset`_, For Bob it " @@ -136,7 +136,7 @@ msgstr "" "``embed_router_conf`` 中指定的 ``connection_str`` 用于连接 `1.2 设置数据集`_ 中设置的 " "alice 的数据库,对于 Bob,应该连接 bob 的数据库。" -#: ../../getting_started/deployment.rst:68 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:68 msgid "" "``__ALICE_CREDENTIAL__`` is used to authenticate SCDB, you need replace " "it with your own credential, same with Bob. In our example, we have " @@ -147,25 +147,25 @@ msgstr "" "同样如此。在我们的示例中,我们简单的将 Alice 的凭据设置为 ``credential_alice``,将 Bob 的凭据设置为 " "``credential_bob``。" -#: ../../getting_started/deployment.rst:72 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:72 msgid "1.4 Create docker-compose file" msgstr "1.4 创建 docker-compose 文件" -#: ../../getting_started/deployment.rst:74 -#: ../../getting_started/deployment.rst:207 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:74 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:207 msgid "" "Create a file called ``docker-compose.yaml`` in your workspace and paste " "the following code in:" msgstr "在您的工作区中创建一个名为 ``docker-compose.yaml`` 的文件,并粘贴以下代码:" -#: ../../getting_started/deployment.rst:114 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:114 msgid "" "``__ALICE_PORT__`` is the published port on the host machine which is " "used for engine service to listen on, you need to replace it with an " "accessible port number. In this case, we have designated it as ``8080``" msgstr "``__ALICE_PORT__`` 是 Engine 在宿主机上的监听端口,您需要替换为一个可访问的端口。这里我们将其指定为 8080" -#: ../../getting_started/deployment.rst:116 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:116 msgid "" "Container *mysql* is init by ``alice_init.sql`` as set in `1.2 Set " "Dataset`_ , it should be ``bob_init.sql`` for Bob. If you use your own " @@ -174,58 +174,58 @@ msgstr "" "*mysql* 容器通过 `1.2 设置数据集`_ 设置的 ``alice_init.sql`` 进行初始化,对于 Bob 应该使用 " "``bob_init.sql``。如果您有自己的数据库服务,可以删除 *mysql* 容器" -#: ../../getting_started/deployment.rst:120 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:120 msgid "1.5 Start Engine Service" msgstr "1.5 启动引擎" -#: ../../getting_started/deployment.rst:122 -#: ../../getting_started/deployment.rst:251 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:122 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:251 msgid "The file your workspace should be as follows:" msgstr "您工作区的文件应如下所示:" -#: ../../getting_started/deployment.rst:131 -#: ../../getting_started/deployment.rst:260 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:131 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:260 msgid "Then you can start engine service by running docker compose up" msgstr "然后您可以运行 docker compose up 来启动引擎服务" -#: ../../getting_started/deployment.rst:142 -#: ../../getting_started/deployment.rst:270 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:142 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:270 msgid "You can use docker logs to check whether engine works well" msgstr "您可以使用 docker logs 检查引擎是否正常工作" -#: ../../getting_started/deployment.rst:150 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:150 msgid "SCQLEngine is listening on ``8080``." msgstr "SCQLEngine 正在监听 ``8080``。" -#: ../../getting_started/deployment.rst:154 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:154 msgid "Step 2: Deploy SCDB" msgstr "步骤二:部署 SCDB" -#: ../../getting_started/deployment.rst:156 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:156 msgid "This chapter will demonstrate how to deploy SCDB in a Third-Party" msgstr "本章将演示如何在第三方部署 SCDB" -#: ../../getting_started/deployment.rst:159 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:159 msgid "2.1 Create a Workspace" msgstr "2.1 创建工作区" -#: ../../getting_started/deployment.rst:167 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:167 msgid "2.2 Set SCDB Config" msgstr "2.2 配置 SCDB" -#: ../../getting_started/deployment.rst:169 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:169 msgid "" "Create a file called ``config.yml`` in your workspace and paste the " "following code in:" msgstr "在您的工作区创建一个名为 ``config.yml`` 的文件,并将以下代码粘贴进去:" -#: ../../getting_started/deployment.rst:198 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:198 msgid "" "See :ref:`SCDB configuration options ` for more " "config information" msgstr "更多配置信息请查看 :ref:`SCDB 配置项 ` " -#: ../../getting_started/deployment.rst:202 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:202 msgid "" "``conn_str`` is utilized to connect database named scdb which will be " "deployed in next step, if you prefer, you can also use your own database " @@ -234,30 +234,30 @@ msgstr "" "``conn_str`` 用于连接一个名为 SCDB 的数据库,该数据库将在 2.4 节中通过 docker-compose " "完成部署。您也可以根据自己的需求来设置对应的数据库连接串" -#: ../../getting_started/deployment.rst:205 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:205 msgid "2.4 Create docker-compose file" msgstr "2.4 创建 docker-compose 文件" -#: ../../getting_started/deployment.rst:246 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:246 msgid "" "``__SCDB_PORT__`` is the published port on the host machine which is used" " for scdb service to listen on, you need to replace it with an accessible" " port number. Here, it's set as 8080" msgstr "``__SCDB_PORT__`` 是 SCDB 服务在宿主机上的监听端口。您需要用一个可访问的端口号替换它。这里设置为 8080。" -#: ../../getting_started/deployment.rst:249 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:249 msgid "2.5 Start SCDB Service" msgstr "2.5 启动 SCDB" -#: ../../getting_started/deployment.rst:278 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:278 msgid "SCDB is listening on ``8080``, waiting for connection" msgstr "SCDB 正在监听 ``8080``,等待连接。" -#: ../../getting_started/deployment.rst:282 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:282 msgid "Step 3: SCQL Test" msgstr "步骤三:测试 SCQL" -#: ../../getting_started/deployment.rst:284 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:284 msgid "" "Here we use scdbclient to submit a query to SCDB for testing, you can " "also submit queries directly to SCDB by sending a POST request. This step" @@ -266,7 +266,7 @@ msgstr "" "这里我们使用 scdbclient 向 SCDB 提交测试查询,您也可以通过发送 POST 请求直接向 SCDB 提交查询。此步骤可以在任何能访问" " SCDB 地址的机器上完成。" -#: ../../getting_started/deployment.rst:286 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:286 msgid "" "You can read `How to use SCDBClient " "`_" @@ -275,19 +275,19 @@ msgstr "" "关于 scdbclient 更多信息请阅读 `如何使用 SCDBClient " "`_" -#: ../../getting_started/deployment.rst:289 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:289 msgid "3.1 Build scdbclient" msgstr "3.1 构建 scdbclient" -#: ../../getting_started/deployment.rst:306 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:306 msgid "3.2 Set Client Config" msgstr "配置客户端" -#: ../../getting_started/deployment.rst:308 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:308 msgid "Create a json file named as ``users.json`` as follows:" msgstr "创建一个名为 ``users.json`` 的 JSON 文件,内容如下:" -#: ../../getting_started/deployment.rst:330 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:330 msgid "" "The ``root`` user is the admin user of SCDB which is init when scdb " "container set up, ``alice`` and ``bob`` are the user belong to party " @@ -296,26 +296,26 @@ msgstr "" "``root`` 用户是在 scdb 容器初始化时设置的 SCDB 管理员用户,``alice`` 和 ``bob`` 分别属于 Alice 和 " "Bob。" -#: ../../getting_started/deployment.rst:332 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:332 msgid "" "The user information for ``alice`` and ``bob`` should be same with the " "user information you will create." msgstr "``alice`` 和 ``bob`` 的用户信息应该与您将要创建的用户信息保持一致。" -#: ../../getting_started/deployment.rst:336 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:336 msgid "3.3 Submit Query" msgstr "3.3 提交查询" -#: ../../getting_started/deployment.rst:338 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:338 msgid "" "You can start to use scdbclient to submit queries to SCDBServer and fetch" " the query results back. it's same as what you can do in " -":doc:`quickstart`" +":doc:`/intro/tutorial`" msgstr "" -"您可以开始使用 scdbclient 向 SCDBServer 提交查询并获取查询结果。您可以与在 :doc:`quickstart` " +"您可以开始使用 scdbclient 向 SCDBServer 提交查询并获取查询结果。您可以与在 :doc:`/intro/tutorial` " "中执行的操作相同" -#: ../../getting_started/deployment.rst:359 +#: ../../topics/deployment/how-to-deploy-a-cluster.rst:359 msgid "" "``__SCDB_URL__`` is the url (eg:http://127.0.0.1:8080) where scdb service" " is listen on, you need to replace it with scdb service url." @@ -323,5 +323,3 @@ msgstr "" "``__SCDB_URL__`` 是 scdb 服务监听的 url(例如:http://127.0.0.1:8080),您需要用 scdb 服务的" " url 替换它。" - - diff --git a/docs/locales/zh_CN/LC_MESSAGES/topics/index.po b/docs/locales/zh_CN/LC_MESSAGES/topics/index.po new file mode 100644 index 00000000..3f15b775 --- /dev/null +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/index.po @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2023 Ant Group Co., Ltd. +# This file is distributed under the same license as the SCQL package. +# FIRST AUTHOR , 2023. +# +msgid "" +msgstr "" +"Project-Id-Version: SCQL \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: zh_CN\n" +"Language-Team: zh_CN \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.13.0\n" + +#: ../../topics/index.rst:4 +msgid "SCQL System" +msgstr "SCQL 系统" + +#: ../../topics/index.rst:11 +msgid "Security" +msgstr "安全性" + +#: ../../topics/index.rst:17 +msgid "CCL" +msgstr "CCL" + +#: ../../topics/index.rst:24 +msgid "Clients" +msgstr "客户端" + +#: ../../topics/index.rst:30 +msgid "Deployment" +msgstr "部署" + +#: ../../topics/index.rst:2 +msgid "Topics" +msgstr "主题" + diff --git a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_security_statement.po b/docs/locales/zh_CN/LC_MESSAGES/topics/security/overview.po similarity index 86% rename from docs/locales/zh_CN/LC_MESSAGES/reference/scql_security_statement.po rename to docs/locales/zh_CN/LC_MESSAGES/topics/security/overview.po index d2219964..8cc897f5 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/reference/scql_security_statement.po +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/security/overview.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -16,30 +16,30 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../reference/scql_security_statement.rst:2 -msgid "SCQL Security Statement" -msgstr "SCQL 安全声明" +#: ../../topics/security/overview.rst:2 +msgid "Security overview" +msgstr "安全性说明" -#: ../../reference/scql_security_statement.rst:5 +#: ../../topics/security/overview.rst:5 msgid "Security Guarantees and Threat Model" msgstr "安全保障和威胁模型" -#: ../../reference/scql_security_statement.rst:7 +#: ../../topics/security/overview.rst:7 msgid "" "For a single query, SCQL protects the confidentiality of data that meets " "the CCL permission requirements during the computation process." msgstr "对于单次查询,SCQL 在计算过程中提供满足 CCL 权限要求的数据机密性保护。" -#: ../../reference/scql_security_statement.rst:9 +#: ../../topics/security/overview.rst:9 msgid "" "SCQL does not protect queries as queries are designed to be public to all" " participants in SCQL. SCQL also does not protect the size (dimension) " "information of intermediate computation results." msgstr "SCQL 不保护查询语句,因为查询语句对 SCQL 所有的参与方公开。SCQL 也不保护中间计算结果的大小(维度)信息。" -#: ../../reference/scql_security_statement.rst:11 +#: ../../topics/security/overview.rst:11 msgid "" "SCQL is built on top of the MPC framework `secretflow/spu`_, using a " "semi-honest security model. The SCQL semi-honest model assumes that all " @@ -52,7 +52,7 @@ msgstr "" "honest 模型假设所有的参与方,包括查询者,数据拥有方(SCQLEngine 部署在数据拥有方) ,和 SCDB " "等都严格遵守协议,但有可能会尝试分析自己得到的中间信息以获得额外的其他参与方的隐私信息。" -#: ../../reference/scql_security_statement.rst:14 +#: ../../topics/security/overview.rst:14 msgid "" "If you select the SEMI2K as SCQL's underlying mpc protocol, please make " "sure to use the `TrustedThirdParty beaver provider`_ [#f1]_. The other " @@ -64,7 +64,7 @@ msgstr "" "provider`_ [#f1]_。请勿在生产环境使用 `TrustedFirstParty beaver " "provider`_,它可能会造成重大安全问题,建议只用于测试。" -#: ../../reference/scql_security_statement.rst:16 +#: ../../topics/security/overview.rst:16 msgid "" "Like all cryptography-based privacy-preserving computing systems, SCQL at" " this stage cannot solve the problem of deducing original privacy data " @@ -76,22 +76,21 @@ msgid "" "solve the problem of participants tampering with their original input to " "obtain other participants' private information." msgstr "" -"和所有基于密码学的隐私计算系统一样,现阶段 SCQL " -"无法解决建立在合法查询结果上的反推原始数据隐私的问题。目前学术界解决该问题的方案一般都是通过 DP 加噪音。虽然 CCL 机制可以让数据 owner " -"对自己的数据进行使用限制授权,能一定程度地缓解风险,但是不能完全杜绝风险。SCQL " +"和所有基于密码学的隐私计算系统一样,现阶段 SCQL 无法解决建立在合法查询结果上的反推原始数据隐私的问题。目前学术界解决该问题的方案一般都是通过" +" DP 加噪音。虽然 CCL 机制可以让数据 owner 对自己的数据进行使用限制授权,能一定程度地缓解风险,但是不能完全杜绝风险。SCQL " "也不解决参与方篡改自己原始输入从而得到其他参与方隐私信息的问题。" -#: ../../reference/scql_security_statement.rst:18 +#: ../../topics/security/overview.rst:18 msgid "" "The following chapters will describe possible attack methods for " "inferring data from results, and give corresponding suggestions." msgstr "下面的章节会介绍可能存在的结果反推攻击方法,并给出相应的建议。" -#: ../../reference/scql_security_statement.rst:22 +#: ../../topics/security/overview.rst:22 msgid "Suggestions on Deployment" msgstr "部署建议" -#: ../../reference/scql_security_statement.rst:24 +#: ../../topics/security/overview.rst:24 msgid "" "The SCDB Server serves as a central coordination component in the SCQL " "system, responsible for translating the query into a hybrid MPC-plaintext" @@ -105,22 +104,22 @@ msgstr "" "SCDB 是 SCQL 系统中的一个中心协调组件,负责将 query 转换成明密文混合的执行图,然后下发给部署在参与方的 SCQLEngines " "执行。SCDB 负责生成执行图,是不能作恶的。建议把 SCDB 部署在可信第三方,打消数据参与方对 SCDB 节点作恶的担忧。" -#: ../../reference/scql_security_statement.rst:28 +#: ../../topics/security/overview.rst:28 msgid "Risk Statement and Suggestion for SCQL Result Inversion Attack" msgstr "针对 SCQL 的结果反推攻击风险说明及建议" -#: ../../reference/scql_security_statement.rst:30 +#: ../../topics/security/overview.rst:30 msgid "" "The query of SCQL could be flexible, adversaries may construct adaptive " "attacks using multiple legit queries or one complex query to achieve the " "purpose of deriving the original data." msgstr "SCQL 的查询灵活多变,攻击者可以使用多次合法查询或一个复杂查询来构建自适应攻击,以达到反推原始数据的目的。" -#: ../../reference/scql_security_statement.rst:34 +#: ../../topics/security/overview.rst:34 msgid "Attack Method 1: Multi-query Attack" msgstr "攻击方法一:多次查询攻击" -#: ../../reference/scql_security_statement.rst:36 +#: ../../topics/security/overview.rst:36 msgid "" "The multi-query attack method includes two attack ways: (1) One way to " "obtain the other party's information is to tamper with the input content " @@ -141,11 +140,11 @@ msgstr "" "另一种方式是通过改写每次查询语句,对比多次查询结果来推测对方的隐私数据。比如攻击者可以利用 where 条件限制聚合函数的输入,第一次查询获得 N" " 条数据的聚合结果,第二次通过改变 where 条件,获得其中 N-1 条数据的聚合结果,对比结果可以获得其中 1 条记录的明文数据信息。" -#: ../../reference/scql_security_statement.rst:42 +#: ../../topics/security/overview.rst:42 msgid "Attack Method 2: Constructing Complex Query Attack" msgstr "攻击方法二:构造复杂查询攻击" -#: ../../reference/scql_security_statement.rst:44 +#: ../../topics/security/overview.rst:44 msgid "" "This attack method is similar to the multi-query attack method, and its " "core idea is to write multiple queries into one complex query. For " @@ -156,17 +155,17 @@ msgstr "" "该攻击方法和多次查询攻击方法类似,其核心思想是将多个查询语句写成一个复杂查询语句。 " "举个例子,攻击者可以在一个查询语句里对某一列进行多次比较,缩小数据范围来反推原始数据。" -#: ../../reference/scql_security_statement.rst:49 +#: ../../topics/security/overview.rst:49 msgid "Suggestions" msgstr "建议" -#: ../../reference/scql_security_statement.rst:51 +#: ../../topics/security/overview.rst:51 msgid "" "Each data owner is advised to give careful consideration when setting CCL" " for their own data." msgstr "数据拥有方在给自己数据设置 CCL 时要慎重考虑;" -#: ../../reference/scql_security_statement.rst:52 +#: ../../topics/security/overview.rst:52 msgid "" "When the upstream platform integrates the SCQL system, it's recommended " "to add an approval process before running the query. The query is " @@ -174,18 +173,17 @@ msgid "" "confirmed by all data owners." msgstr "上游平台在集成 SCQL 时,建议在执行查询前加一个人工审批流程。查询语句只有经过所有数据拥有方的审核确认后,才能提交到 SCQL 执行;" -#: ../../reference/scql_security_statement.rst:53 -#: ../../reference/scql_security_statement.rst:66 +#: ../../topics/security/overview.rst:53 ../../topics/security/overview.rst:66 msgid "" "It is recommended to add an audit mechanism, analyze historical queries, " "and track down information leakage issues." msgstr "建议集成事后审计机制,对历史查询的执行情况进行分析,使得可以追踪和发现敏感信息泄露问题。" -#: ../../reference/scql_security_statement.rst:57 +#: ../../topics/security/overview.rst:57 msgid "System Security Configuration Instructions" msgstr "系统安全配置说明" -#: ../../reference/scql_security_statement.rst:59 +#: ../../topics/security/overview.rst:59 msgid "" "SCQL supports HTTPS protocol, it is recommended to enable HTTPS by " "default. Please see :ref:`SCDB TLS Configuration ` and " @@ -195,24 +193,24 @@ msgstr "" "SCQL 支持 HTTPS 协议,建议默认开启。有关如何为 SCDB 和 SCQLEngine 启用 HTTPS 的方法详见 :ref:`SCDB" " TLS 配置 ` and :ref:`SCQLEngine TLS 配置 `。" -#: ../../reference/scql_security_statement.rst:63 +#: ../../topics/security/overview.rst:63 msgid "Suggestions for upstream integrators" msgstr "对上游集成方的建议" -#: ../../reference/scql_security_statement.rst:65 +#: ../../topics/security/overview.rst:65 msgid "" "It is recommended to add an approval process before submitting any " "queries to SCQL for execution." msgstr "在向 SCQL 提交查询前,增加数据参与方审批查询语句的流程。" -#: ../../reference/scql_security_statement.rst:67 +#: ../../topics/security/overview.rst:67 msgid "" "It is recommended to divide the use of SCQL into two stages: development " "stage and production stage, and to adopt different security control " "measures." msgstr "建议将 SCQL 的使用过程分为研发态和生产态,并采用不同的安全管控措施。" -#: ../../reference/scql_security_statement.rst:69 +#: ../../topics/security/overview.rst:69 msgid "" "The development stage refers to the stage where the query is under " "development iteration. The data samples used in the development stage " @@ -223,7 +221,7 @@ msgstr "" "研发态指 query " "处于迭代中的研发模式。研发态中使用的数据样本必须是经过脱敏、去标识化、匿名化、加噪等手段处理后的小规模数据集,旨在快速地构建数据分析处理流程。" -#: ../../reference/scql_security_statement.rst:70 +#: ../../topics/security/overview.rst:70 msgid "" "The production stage refers to the joint analysis of the query by " "multiple participating parties to ensure that the task is risk-free or " @@ -241,11 +239,11 @@ msgstr "" " 要变更,需要重新走多方审计评审。生产态使用的数据为真实数据,联合分析的多方需要进行:(1) 事前对任务评审与审批;(2) " "事中确保任务一致性,若有风险及时中止任务;(3) 事后进行审计,若发生恶意行为,确保可以发现和规避潜在的数据泄漏风险。" -#: ../../reference/scql_security_statement.rst:75 +#: ../../topics/security/overview.rst:75 msgid "Footnotes" msgstr "脚注" -#: ../../reference/scql_security_statement.rst:76 +#: ../../topics/security/overview.rst:76 msgid "" "SPU SEMI2K protocol adopts a trusted third party for generating Beaver " "triples for efficiency. In the future, we will consider adding a Beaver " @@ -261,3 +259,6 @@ msgstr "" #~ "static token leakage." #~ msgstr "实现 GRM 服务的时候,建议采用动态 token,避免静态 token 泄露导致的安全问题。" +#~ msgid "SCQL Security Statement" +#~ msgstr "SCQL 安全声明" + diff --git a/docs/locales/zh_CN/LC_MESSAGES/getting_started/scql_intro.po b/docs/locales/zh_CN/LC_MESSAGES/topics/system/intro.po similarity index 75% rename from docs/locales/zh_CN/LC_MESSAGES/getting_started/scql_intro.po rename to docs/locales/zh_CN/LC_MESSAGES/topics/system/intro.po index ce93f193..fddee0e7 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/getting_started/scql_intro.po +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/system/intro.po @@ -3,12 +3,11 @@ # This file is distributed under the same license as the SCQL package. # FIRST AUTHOR , 2023. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-05 11:26+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -17,17 +16,13 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../getting_started/scql_intro.rst:2 -msgid "SCQL Introduction" -msgstr "SCQL 介绍" +#: ../../topics/system/intro.rst:2 +msgid "SCQL System Overview" +msgstr "SCQL 系统概述" -#: ../../getting_started/scql_intro.rst:5 -msgid "Overview" -msgstr "概述" - -#: ../../getting_started/scql_intro.rst:7 +#: ../../topics/system/intro.rst:4 msgid "" "Secure Collaborative Query Language (SCQL) is a system that allows " "multiple distrusting parties to run joint analysis without revealing " @@ -36,56 +31,57 @@ msgstr "" "安全协作查询语言(Secure Collaborative Query Language, " "SCQL)是一个允许多个互不信任参与方在不泄露各自隐私数据的条件下进行联合数据分析的系统。" -#: ../../getting_started/scql_intro.rst:10 +#: ../../topics/system/intro.rst:7 msgid "Key Features" msgstr "关键特点" -#: ../../getting_started/scql_intro.rst:12 +#: ../../topics/system/intro.rst:9 msgid "Semi-honest security. SCQL assumes that all parties are semi-honest." msgstr "半诚实安全。SCQL 假设所有参与方都是半诚实的。" -#: ../../getting_started/scql_intro.rst:13 +#: ../../topics/system/intro.rst:10 msgid "Support multiple parties (N >= 2)." msgstr "支持多方(N>=2)。" -#: ../../getting_started/scql_intro.rst:14 +#: ../../topics/system/intro.rst:11 msgid "" "Support common SQL select syntax and functions to meet the needs of most " -"scenarios. Please check :ref:`/reference/scql_status.rst` for details." -msgstr "支持常见的 SQL select 语法和函数,满足大多数场景的需求。详情请查看 :ref:`/reference/scql_status.rst`。" +"scenarios. Please check :doc:`/reference/implementation-status` for " +"details." +msgstr "支持常见的 SQL select 语法和函数,满足大多数场景的需求。详情请查看 :doc:`/reference/implementation-status`。" -#: ../../getting_started/scql_intro.rst:15 +#: ../../topics/system/intro.rst:12 msgid "" "Practical performance. SCQL has multiple levels of performance " "optimization." msgstr "可实用的性能。SCQL 有多层次的性能优化。" -#: ../../getting_started/scql_intro.rst:16 +#: ../../topics/system/intro.rst:13 msgid "Easy to use. SCQL provides relation SQL-like interface." msgstr "易于使用。SCQL提供了类似于关系 SQL 的界面。" -#: ../../getting_started/scql_intro.rst:17 +#: ../../topics/system/intro.rst:14 msgid "" "Data usage authorization. SCQL provides a mechanism named CCL (Column " "Control List) for data owner to define their data usage restrictions." msgstr "数据使用授权。SCQL 为数据所有者提供了一个名为 CCL(Column Control List, 列控制列表)的机制,以定义他们的数据使用限制。" -#: ../../getting_started/scql_intro.rst:20 +#: ../../topics/system/intro.rst:17 msgid "Architecture" msgstr "架构" -#: ../../getting_started/scql_intro.rst:22 +#: ../../topics/system/intro.rst:19 msgid "An SCQL system consists of an SCDB server and multiple SCQLEngines." msgstr "一个 SCQL 系统由一个 SCDB 服务器和多个 SCQLEngines 组成。" -#: ../../getting_started/scql_intro.rst:24 +#: ../../topics/system/intro.rst:21 msgid "" "SCDB server is responsible for translating SQL query into a hybrid MPC-" "plaintext execution graph and dispatching the execution graph to " "SCQLEngine of participants." msgstr "SCDB 服务器负责将 SQL 查询翻译成明密文混合执行图,并将执行图下发给参与方的 SCQLEngine。" -#: ../../getting_started/scql_intro.rst:25 +#: ../../topics/system/intro.rst:22 msgid "" "SCQLEngine is a hybrid MPC-plaintext execution engine, which collaborates" " with peers to run the execution graph and reports the query result to " @@ -95,38 +91,37 @@ msgstr "" "SCQLEngine 是一个明密文混合执行引擎,它与参与方协作运行执行图并将查询结果报告给 SCDB 服务器。SCQLEngine 是在最先进的 " "MPC 框架 `secretflow/spu`_ 的基础上实现的。" -#: ../../getting_started/scql_intro.rst:-1 +#: ../../topics/system/intro.rst:-1 msgid "SCQL Architecture" msgstr "SCQL 架构" -#: ../../getting_started/scql_intro.rst:33 +#: ../../topics/system/intro.rst:30 msgid "How SCQL Works" msgstr "SCQL 如何工作" -#: ../../getting_started/scql_intro.rst:35 +#: ../../topics/system/intro.rst:32 msgid "" "We will show how SCQL works through the life of the following sample SCQL" " query Q." msgstr "我们将通过以下的 SCQL 查询样本 Q 的整个生命周期来展示 SCQL 是如何工作的。" -#: ../../getting_started/scql_intro.rst:37 +#: ../../topics/system/intro.rst:34 msgid "SCQL query Q" msgstr "SCQL 查询 Q" -#: ../../getting_started/scql_intro.rst:-1 -#: ../../getting_started/scql_intro.rst:47 +#: ../../topics/system/intro.rst:-1 ../../topics/system/intro.rst:44 msgid "Table schema" msgstr "表的结构" -#: ../../getting_started/scql_intro.rst:49 +#: ../../topics/system/intro.rst:46 msgid "Let's have a look at the schema of tables involved in the above query Q." msgstr "让我们来看看上面查询 Q 中涉及的表的结构。" -#: ../../getting_started/scql_intro.rst:54 +#: ../../topics/system/intro.rst:51 msgid "``bank_1``" msgstr "``bank_1``" -#: ../../getting_started/scql_intro.rst:55 +#: ../../topics/system/intro.rst:52 msgid "" "Party Bank1 owns the table ``bank_1`` in its local database ``DB1``, " "which has two columns ``customer_id`` and ``deposit``." @@ -134,11 +129,11 @@ msgstr "" "参与方 Bank1 在其本地数据库 ``DB1`` 中有张表 ``bank_1``,该数据表有两列分别是 ``customer_id`` 和 " "``deposit``。" -#: ../../getting_started/scql_intro.rst:58 +#: ../../topics/system/intro.rst:55 msgid "``bank_2``" msgstr "``bank_2``" -#: ../../getting_started/scql_intro.rst:57 +#: ../../topics/system/intro.rst:54 msgid "" "Party Bank2 owns the table ``bank_2`` in its local database ``DB2``, " "which has two columns ``customer_id`` and ``loan``." @@ -146,114 +141,112 @@ msgstr "" "参与方 Bank2 在其本地数据库 ``DB2`` 中有张表 ``bank_2``,该数据表有两列分别是 ``customer_id`` 和 " "``loan``。" -#: ../../getting_started/scql_intro.rst:61 +#: ../../topics/system/intro.rst:58 msgid "Column Control List (CCL)" msgstr "列控制列表(CCL)" -#: ../../getting_started/scql_intro.rst:63 +#: ../../topics/system/intro.rst:60 msgid "CCL Form: ````" msgstr "CCL 格式: ````" -#: ../../getting_started/scql_intro.rst:65 +#: ../../topics/system/intro.rst:62 msgid "" "It means ``src_column`` is accessible to ``dest_party`` with the " "``constraint``." msgstr "它表示 ``src_column`` 可以被 ``dest_party`` 在满足 ``constraint`` 的条件下访问。" -#: ../../getting_started/scql_intro.rst:67 +#: ../../topics/system/intro.rst:64 msgid "" "To make the query Q pass the CCL validation, data owner should grant the " "following CCL." msgstr "为了使查询 Q 通过 CCL 验证,数据所有者应该授予以下 CCL。" -#: ../../getting_started/scql_intro.rst:73 +#: ../../topics/system/intro.rst:70 msgid "Bank1" msgstr "Bank1" -#: ../../getting_started/scql_intro.rst:70 +#: ../../topics/system/intro.rst:67 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:71 +#: ../../topics/system/intro.rst:68 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:72 +#: ../../topics/system/intro.rst:69 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:73 +#: ../../topics/system/intro.rst:70 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:79 +#: ../../topics/system/intro.rst:76 msgid "Bank2" msgstr "Bank2" -#: ../../getting_started/scql_intro.rst:76 +#: ../../topics/system/intro.rst:73 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:77 +#: ../../topics/system/intro.rst:74 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:78 +#: ../../topics/system/intro.rst:75 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:79 +#: ../../topics/system/intro.rst:76 msgid "````" msgstr "````" -#: ../../getting_started/scql_intro.rst:82 -msgid "" -"To learn more about CCL, please read the doc " -":ref:`/reference/scql_ccl_intro.rst`." -msgstr "要了解更多关于 CCL 的信息,请阅读文档 :ref:`/reference/scql_ccl_intro.rst`。" +#: ../../topics/system/intro.rst:79 +msgid "To learn more about CCL, please read the doc :doc:`/topics/ccl/intro`." +msgstr "要了解更多关于 CCL 的信息,请阅读文档 :doc:`/topics/ccl/intro`。" -#: ../../getting_started/scql_intro.rst:87 +#: ../../topics/system/intro.rst:83 msgid "Lifetime of SCQL query" msgstr "SCQL 查询的生命周期" -#: ../../getting_started/scql_intro.rst:-1 +#: ../../topics/system/intro.rst:-1 msgid "SCQL Workflow" msgstr "SCQL 工作流" -#: ../../getting_started/scql_intro.rst:93 +#: ../../topics/system/intro.rst:89 msgid "Step1. Initialize a Session" msgstr "步骤1. 初始化会话" -#: ../../getting_started/scql_intro.rst:95 +#: ../../topics/system/intro.rst:91 msgid "" "SCDB creates a new session for the incoming query, and then authenticates" " the identity of the query issuer. It will reject the request if " "authentication fails." msgstr "SCDB 为传入的查询创建一个新的会话,然后验证查询发出者的身份。如果认证失败,它将拒绝该请求。" -#: ../../getting_started/scql_intro.rst:99 +#: ../../topics/system/intro.rst:95 msgid "Step2. Parse and Plan Q" msgstr "步骤2. 解析和规划 Q" -#: ../../getting_started/scql_intro.rst:101 +#: ../../topics/system/intro.rst:97 msgid "" "Parser will parse Q into an AST(Abstract Syntax Tree), and then Planner " "converts it into a Logical Plan." msgstr "Parser 将 Q 解析为 AST(抽象语法树),然后 Planner 将其转换为逻辑计划。" -#: ../../getting_started/scql_intro.rst:-1 +#: ../../topics/system/intro.rst:-1 msgid "Logical Plan for Q" msgstr "Q 的逻辑计划" -#: ../../getting_started/scql_intro.rst:108 +#: ../../topics/system/intro.rst:104 msgid "Step3. Translate" msgstr "步骤3. 翻译" -#: ../../getting_started/scql_intro.rst:111 +#: ../../topics/system/intro.rst:106 msgid "Step3.1 Build and Check CCL" msgstr "步骤3.1 建立和检查 CCL" -#: ../../getting_started/scql_intro.rst:113 +#: ../../topics/system/intro.rst:108 msgid "" "Translator needs to retrieve CCL from CCL manager, it will build CCL " "along the logical plan and verify the CCL of root node to ensure Q is " @@ -262,25 +255,25 @@ msgstr "" "Translator 需要从 CCL 管理器检索 CCL,它将根据逻辑计划构建 CCL,并验证根节点的 CCL,以确保 Q " "在数据所有者的约束下是合法的。" -#: ../../getting_started/scql_intro.rst:117 +#: ../../topics/system/intro.rst:111 msgid "Step3.2 Translate" msgstr "步骤3.2 翻译" -#: ../../getting_started/scql_intro.rst:119 +#: ../../topics/system/intro.rst:113 msgid "" "The translator takes the logical plan and CCL as inputs and generates an " "execution graph for the query Q as follows." msgstr "翻译器将逻辑计划和 CCL 作为输入,并生成查询 Q 的执行图,如下所示。" -#: ../../getting_started/scql_intro.rst:-1 +#: ../../topics/system/intro.rst:-1 msgid "Execution Graph for Q" msgstr "Q 的执行图" -#: ../../getting_started/scql_intro.rst:126 +#: ../../topics/system/intro.rst:120 msgid "Step4. Optimize and Split Graph" msgstr "步骤4. 图优化和拆分" -#: ../../getting_started/scql_intro.rst:128 +#: ../../topics/system/intro.rst:122 msgid "" "The graph optimizer will optimize the execution graph, such as node " "fusion and replicated node elimination. The optimized execution graph is " @@ -288,15 +281,15 @@ msgid "" "subgraphs based on the parties of the nodes." msgstr "图优化器将对执行图进行优化,如节点融合和重复节点的消除。优化后的执行图仍然是一张整图,图拆分器会根据节点的参与方信息将整图拆分为子图。" -#: ../../getting_started/scql_intro.rst:-1 +#: ../../topics/system/intro.rst:-1 msgid "subgraphs" msgstr "子图" -#: ../../getting_started/scql_intro.rst:136 +#: ../../topics/system/intro.rst:130 msgid "Step5. Execute" msgstr "步骤5. 执行" -#: ../../getting_started/scql_intro.rst:138 +#: ../../topics/system/intro.rst:132 msgid "" "SCDB sends the subgraphs to corresponding SCQLEngine nodes, SCQLEngine " "cooperates with peers to run the execution graph and reports the final " @@ -323,3 +316,9 @@ msgstr "SCDB 将子图发送到相应的 SCQLEngine 节点,SCQLEngine 与参 #~ "可以获取表结构并解析表引用。例如,SCDB 会将 ``table_1`` 解析为参与方 " #~ "Bank1 中的 ``DB1.bank_1``。" +#~ msgid "SCQL Introduction" +#~ msgstr "SCQL 介绍" + +#~ msgid "Overview" +#~ msgstr "概述" + diff --git a/docs/locales/zh_CN/LC_MESSAGES/getting_started/how_to_use_scql.po b/docs/locales/zh_CN/LC_MESSAGES/topics/system/usage.po similarity index 77% rename from docs/locales/zh_CN/LC_MESSAGES/getting_started/how_to_use_scql.po rename to docs/locales/zh_CN/LC_MESSAGES/topics/system/usage.po index 90c4ee69..5a34da1f 100644 --- a/docs/locales/zh_CN/LC_MESSAGES/getting_started/how_to_use_scql.po +++ b/docs/locales/zh_CN/LC_MESSAGES/topics/system/usage.po @@ -3,12 +3,11 @@ # This file is distributed under the same license as the SCQL package. # FIRST AUTHOR , 2023. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: SCQL \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-04 19:31+0800\n" +"POT-Creation-Date: 2023-10-11 20:36+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: zh_CN\n" @@ -17,13 +16,13 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.12.1\n" +"Generated-By: Babel 2.13.0\n" -#: ../../getting_started/how_to_use_scql.rst:2 +#: ../../topics/system/usage.rst:2 msgid "How To Use SCQL" -msgstr "" +msgstr "SCQL 使用流程" -#: ../../getting_started/how_to_use_scql.rst:4 +#: ../../topics/system/usage.rst:4 msgid "" "The flowchart shows how to use SCQL system, which contains two stages: " "prepare and query. In the prepare stage, the system is set up, and the " @@ -31,51 +30,51 @@ msgid "" " are submitted, processed, and results are returned." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:7 +#: ../../topics/system/usage.rst:7 msgid "" "All requests from user to SCDB can be submitted through :ref:`synchronous" " api` or :ref:`asynchronous api`." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:10 +#: ../../topics/system/usage.rst:10 msgid "Workflow" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:-1 +#: ../../topics/system/usage.rst:-1 msgid "how_to_use_scql" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:15 +#: ../../topics/system/usage.rst:15 msgid "Participants" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:17 +#: ../../topics/system/usage.rst:17 msgid "Alice: the user in party alice" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:18 +#: ../../topics/system/usage.rst:18 msgid "Bob: the user in party bob" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:19 +#: ../../topics/system/usage.rst:19 msgid "SCDB: the SCDB server" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:22 +#: ../../topics/system/usage.rst:22 msgid "" "Before the start of the project, Alice and Bob need to obtain the root " "user's username and password from the admin." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:25 +#: ../../topics/system/usage.rst:25 msgid "Prepare stage" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:28 +#: ../../topics/system/usage.rst:28 msgid "1.0 create database" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:28 +#: ../../topics/system/usage.rst:28 msgid "" "Alice or Bob creates a new database using the root user account through " ":ref:`CREATE DATABASE Statement `, which can be " @@ -83,98 +82,98 @@ msgid "" "simultaneously." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:31 +#: ../../topics/system/usage.rst:31 msgid "2.0 create and grant user" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:31 +#: ../../topics/system/usage.rst:31 msgid "" "Alice creates user account \"Alice\" in SCDB using the root user account " "by :ref:`CREATE USER Statement `, and grants access to " "the relevant database by :ref:`GRANT Statement `" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:34 +#: ../../topics/system/usage.rst:34 msgid "3.0 create and grant user" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:34 +#: ../../topics/system/usage.rst:34 msgid "" "Bob creates user account \"Bob\" in SCDB using the root user account by " ":ref:`CREATE USER Statement `, and grants access to the " "relevant database by :ref:`GRANT Statement `" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:37 +#: ../../topics/system/usage.rst:37 msgid "4.0 create table" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:37 +#: ../../topics/system/usage.rst:37 msgid "" "Alice creates table in SCDB using the account \"Alice\" by :ref:`CREATE " "TABLE Statement `." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:40 +#: ../../topics/system/usage.rst:40 msgid "5.0 create table" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:40 +#: ../../topics/system/usage.rst:40 msgid "" "Bob creates table in SCDB using the account \"Bob\" by :ref:`CREATE TABLE" " Statement `." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:43 +#: ../../topics/system/usage.rst:43 msgid "6.0 grant CCL" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:43 +#: ../../topics/system/usage.rst:43 msgid "" "Alice grants CCL about the table created by Alice for Alice and Bob in " -"SCDB using the account \"Alice\", see :ref:`CCL " -"` for more information." +"SCDB using the account \"Alice\", see :doc:`/topics/ccl/intro` for more " +"information." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:46 +#: ../../topics/system/usage.rst:46 msgid "7.0 grant CCL" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:46 +#: ../../topics/system/usage.rst:46 msgid "" "Bob grants CCL about the table created by Bob for Alice and Bob in SCDB " -"using the account \"Bob\", see :ref:`CCL `" -" for more information." +"using the account \"Bob\", see :doc:`/topics/ccl/intro` for more " +"information." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:49 +#: ../../topics/system/usage.rst:49 msgid "Execute stage" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:52 +#: ../../topics/system/usage.rst:52 msgid "8.0 submit a DQL" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:52 +#: ../../topics/system/usage.rst:52 msgid "" "Alice submits a DQL to SCDB through :ref:`public/submit_query " "` or :ref:`public/submit_and_get ` using " "the account \"Alice\"." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:55 +#: ../../topics/system/usage.rst:55 msgid "9.0 process query" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:55 +#: ../../topics/system/usage.rst:55 msgid "SCDB will check ccl and execute query with engines." msgstr "" -#: ../../getting_started/how_to_use_scql.rst:57 +#: ../../topics/system/usage.rst:57 msgid "10.0 return result" msgstr "" -#: ../../getting_started/how_to_use_scql.rst:58 +#: ../../topics/system/usage.rst:58 msgid "SCDB return the query result to Alice." msgstr "" @@ -314,3 +313,19 @@ msgstr "" #~ "through :ref:`GetEngines `." #~ msgstr "" +#~ msgid "" +#~ "Alice grants CCL about the table " +#~ "created by Alice for Alice and Bob" +#~ " in SCDB using the account \"Alice\"," +#~ " see :ref:`CCL ` " +#~ "for more information." +#~ msgstr "" + +#~ msgid "" +#~ "Bob grants CCL about the table " +#~ "created by Bob for Alice and Bob" +#~ " in SCDB using the account \"Bob\"," +#~ " see :ref:`CCL ` " +#~ "for more information." +#~ msgstr "" + diff --git a/docs/development/scql_config_manual.rst b/docs/reference/engine-config.rst similarity index 99% rename from docs/development/scql_config_manual.rst rename to docs/reference/engine-config.rst index 751b9a95..5bfa4c76 100644 --- a/docs/development/scql_config_manual.rst +++ b/docs/reference/engine-config.rst @@ -1,5 +1,5 @@ ================== -SCQL Config Manual +SCQL System Config ================== This configuration manual is designed to help users understand the various configuration options available for the SCQL system. It can be divided into two parts: SCDB configuration options and SCQLEngine configuration options. @@ -185,11 +185,11 @@ A typical config of storage can be like: Config for audit ^^^^^^^^^^^^^^^^ -Audit log are used to record the SCDB activities during query execution. It has two types: basic audit log and detail audit log. +Audit log are used to record the SCDB activities during query execution. It has two types: basic audit log and detail audit log. The basic audit log are used to record the basic information of a query, such as the result and user information, while the detail audit log records more detailed information such as execution plan and CCL details. you can see `scdb_audit `_ for more information. -When the audit log has reaches the maximum size ( set by ``audit_max_size``), SCDB will save the audit log as ``name-timestamp.ext``, where the `name` is the filename set in ``audit_log_file`` without the extension, `timestamp` is the time at which the log was rotated formatted with local time format of `2006-01-02T15-04-05.000`, +When the audit log has reaches the maximum size ( set by ``audit_max_size``), SCDB will save the audit log as ``name-timestamp.ext``, where the `name` is the filename set in ``audit_log_file`` without the extension, `timestamp` is the time at which the log was rotated formatted with local time format of `2006-01-02T15-04-05.000`, `ext` is the extension set in ``audit_log_file``. For example, if ``audit_log_file`` set as `audit/audit.log`, a backup created at 6:30pm on Nov 11 2016 would be saved to `./audit/audit-2016-11-04T18-30-00.000.log` @@ -442,7 +442,7 @@ If you want to enable SSL in SCQLEngine, add FLAGS as follows. Additionally, it Config for audit ^^^^^^^^^^^^^^^^ -The audit log in SCQLEngine is used to record the SCQLEngine activities during the execution of tasks from SCDB. Just like the audit in SCDB, it also can be divided into two types: common audit log and detail audit log. +The audit log in SCQLEngine is used to record the SCQLEngine activities during the execution of tasks from SCDB. Just like the audit in SCDB, it also can be divided into two types: common audit log and detail audit log. The common audit is used to record some basic information about a task, while the detail audit is used to record more detailed information of the task. See `engine_audit `_ for more information diff --git a/docs/development/scql_api.rst b/docs/reference/http-api.rst similarity index 100% rename from docs/development/scql_api.rst rename to docs/reference/http-api.rst diff --git a/docs/reference/scql_status.rst b/docs/reference/implementation-status.rst similarity index 99% rename from docs/reference/scql_status.rst rename to docs/reference/implementation-status.rst index 7bb81998..b7f4c243 100644 --- a/docs/reference/scql_status.rst +++ b/docs/reference/implementation-status.rst @@ -65,5 +65,5 @@ Data Source | CSV | partial | Data stored in csv files | +---------------+-----------------------------+--------------------------+ -.. warning:: +.. warning:: SCQL supports different databases as data source, but there may be minor differences in the results due to data type differences built in databases. Please choose backend database with caution. diff --git a/docs/reference/index.rst b/docs/reference/index.rst index dfdfcb11..0e500cbf 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -1,14 +1,32 @@ -.. _reference: - Reference ========= .. toctree:: - :maxdepth: 2 + :caption: Language + :maxdepth: 1 + + lang/manual + lang/mysql-compatibility + +.. toctree:: + :caption: System + :maxdepth: 1 + + engine-config + +.. toctree:: + :caption: Clients + :maxdepth: 1 + + http-api + +.. toctree:: + :caption: Internal Reference + :maxdepth: 1 + + operators + +.. toctree:: + :maxdepth: 1 - scql_manual - scql_operators_doc - scql_status - mysql_compatibility - scql_security_statement - scql_ccl_intro + implementation-status diff --git a/docs/reference/scql_manual.rst b/docs/reference/lang/manual.rst similarity index 94% rename from docs/reference/scql_manual.rst rename to docs/reference/lang/manual.rst index 16312abd..d231bf58 100644 --- a/docs/reference/scql_manual.rst +++ b/docs/reference/lang/manual.rst @@ -1,5 +1,5 @@ -SCQL Manual -=========== +SCQL Language Manual +==================== .. _scql_data_types: @@ -25,12 +25,13 @@ SCQL supports frequently-used data types, as illustrated in the following table. | ``timestamp`` | | not supported yet, coming soon | +---------------+------------------------------+--------------------------------+ - + +.. _scql_statements: SCQL Statements --------------- -SCQL is compatible with most MySQL syntax, which makes it easy to use. For syntax differences between SCQL and MySQL, please read :doc:`mysql_compatibility`. +SCQL is compatible with most MySQL syntax, which makes it easy to use. For syntax differences between SCQL and MySQL, please read :doc:`/reference/lang/mysql-compatibility`. .. _create_user_stm: @@ -43,13 +44,13 @@ CREATE/DROP/ALTER USER Statement with_opt: WITH auth_opt [endpoint_opt] - + auth_opt: (TOKEN token_str) | (message signature pub_key) - + endpoint_opt: ENDPOINT endpoint (, endpoint)+ - + DROP USER [IF EXISTS] user @@ -61,11 +62,11 @@ CREATE/DROP/ALTER USER Statement Examples: .. code-block:: SQL - - -- create an user named alice, - -- with password `alice123`, + + -- create an user named alice, + -- with password `alice123`, -- belongs to party `party_alice` with public key `MCowBQYDK2VwAyEAqhfJVWZX32aVh00fUqfrbrGkwboi8ZpTpybLQ4rbxoA=`. - -- the create user statement includes a timestamp message (in RFC 3339 formats), and signed by the party's private key. + -- the create user statement includes a timestamp message (in RFC 3339 formats), and signed by the party's private key. CREATE USER `alice` PARTY_CODE 'party_alice' IDENTIFIED BY 'alice123' WITH '2023-08-23T15:46:16.096262218+08:00' 'DK/V80pV8bsWkXwgyRBrca7P2V2O03nC1pEldnJF+1dUnnL2NoRGKhAjSMv0ubuflT4yUmoIPRzwOi/bOsf2BQ==' 'MCowBQYDK2VwAyEAqhfJVWZX32aVh00fUqfrbrGkwboi8ZpTpybLQ4rbxoA='; -- drop user alice @@ -122,8 +123,8 @@ Examples: .. code-block:: SQL - -- create a table `ta` in database `db_test` - -- the new table should have the same table schema with the table `db1.tbl_1` specified by + -- create a table `ta` in database `db_test` + -- the new table should have the same table schema with the table `db1.tbl_1` specified by -- REF_TABLE option, and the new table is a MySQL table. CREATE TABLE db_test.ta ( id string, @@ -252,4 +253,4 @@ SELECT Statement Functions and Operators ----------------------- -.. todo:: this part is not ready, please check later \ No newline at end of file +.. todo:: this part is not ready, please check later diff --git a/docs/reference/mysql_compatibility.rst b/docs/reference/lang/mysql-compatibility.rst similarity index 95% rename from docs/reference/mysql_compatibility.rst rename to docs/reference/lang/mysql-compatibility.rst index 0635d1c8..b9e59720 100644 --- a/docs/reference/mysql_compatibility.rst +++ b/docs/reference/lang/mysql-compatibility.rst @@ -20,13 +20,13 @@ DDL(Data Definition Language) CREATE Table ````````````` -The Table created in SCQL is a virtual Table and needs to be mapped to the actual Table, so we extend the statement to transfer the mapping information. For more information, please read :doc:`scql_manual`. +The Table created in SCQL is a virtual Table and needs to be mapped to the actual Table, so we extend the statement to transfer the mapping information. For more information, please read :doc:`/reference/lang/manual`. DQL(Data Query Language) ~~~~~~~~~~~~~~~~~~~~~~~~ -About implementation status, please read :doc:`scql_status` +About implementation status, please read :doc:`/reference/implementation-status`. .. note:: Type Null is unsupported in SCQL. @@ -49,7 +49,7 @@ DCL(Data Control Language) GRANT/REVOKE ```````````` -Except permissions same with mysql such as read/write/create/drop..., ccl settings are also required before executing a query. You can change CCL settings via GRANT/REVOKE. About GRANT/REVOKE in SCQL, please read :doc:`scql_manual`. +Except permissions same with mysql such as read/write/create/drop..., ccl settings are also required before executing a query. You can change CCL settings via GRANT/REVOKE. About GRANT/REVOKE in SCQL, please read :doc:`/reference/lang/manual`. Type Conversion Rule ~~~~~~~~~~~~~~~~~~~~ @@ -74,7 +74,7 @@ The following rules describe how conversion occurs in SCQL. single-party query `````````````````` -If a query only involves one participant, SCQL will convert the query into a syntax that conforms to the participant's database (such as MySQL), +If a query only involves one participant, SCQL will convert the query into a syntax that conforms to the participant's database (such as MySQL), and then dispatch it directly to the corresponding database for execution. Thus, for a single-party query, its type conversion rules are generally consistent with the database used by the participant. diff --git a/docs/reference/scql_operators.md b/docs/reference/operators.md similarity index 99% rename from docs/reference/scql_operators.md rename to docs/reference/operators.md index d6c59a44..dc8ae7b2 100644 --- a/docs/reference/scql_operators.md +++ b/docs/reference/operators.md @@ -1,3 +1,9 @@ +# SCQL Operators Specification + +This is a specification (not a kernel library) of SCQL operators, including operator signatures and semantics. + +## Op List + ### `Add` diff --git a/docs/reference/scql_operators_doc.rst b/docs/reference/scql_operators_doc.rst deleted file mode 100644 index 12683a93..00000000 --- a/docs/reference/scql_operators_doc.rst +++ /dev/null @@ -1,10 +0,0 @@ -SCQL Operators Specification -============================ - -This is a specification (not a kernel library) of SCQL operators, including operator signatures and semantics. - -Op List -~~~~~~~ - -.. include:: scql_operators.md - :parser: myst_parser.sphinx_ \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index fc9b4ecc..3b83b8c9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,15 +1,12 @@ -myst-parser==0.18.1 -rstcheck==6.1.1 -sphinx==5.3.0 +sphinx==6.2.1 nbsphinx==0.8.9 -sphinx-autobuild==2021.3.14 -pydata-sphinx-theme==0.10.1 -sphinx-markdown-parser==0.2.4 -sphinxcontrib-actdiag==3.0.0 -sphinxcontrib-blockdiag==3.0.0 -sphinxcontrib-nwdiag==2.0.0 -sphinxcontrib-seqdiag==3.0.0 -pytablewriter==0.64.2 -linkify-it-py==2.0.0 -sphinx_design==0.3.0 -sphinx-intl==2.0.1 \ No newline at end of file +# nbsphinx>0.9.1 has issues with MyST anchors +# nbsphinx>0.8.9 has issues with smart quotes in .po files +linkify-it-py +myst-parser +sphinx-intl +sphinx_design +sphinxcontrib-mermaid +secretflow-doctools +sphinx-autobuild +pydata-sphinx-theme diff --git a/docs/reference/scql_ccl_intro.rst b/docs/topics/ccl/intro.rst similarity index 98% rename from docs/reference/scql_ccl_intro.rst rename to docs/topics/ccl/intro.rst index c144cd70..f0d31ff8 100644 --- a/docs/reference/scql_ccl_intro.rst +++ b/docs/topics/ccl/intro.rst @@ -29,7 +29,7 @@ CCL Constraints are currently divided into the following seven types. Among them * ``UNKNOWN``: Not defined, currently refuses to be revealed in any form by default. .. note:: - User is advised to set the CCL according to the scenario and privacy protection needs. The attacker may construct a query that satisfies the CCL constraint, and infer the sensitive information of the original data from the result through complex query or multiple query methods. For related risk descriptions and suggestions, see :ref:`SCQL Security Statement `. + User is advised to set the CCL according to the scenario and privacy protection needs. The attacker may construct a query that satisfies the CCL constraint, and infer the sensitive information of the original data from the result through complex query or multiple query methods. For related risk descriptions and suggestions, see :doc:`SCQL security overview `. Advantages of CCL ^^^^^^^^^^^^^^^^^ @@ -38,12 +38,14 @@ The primary role of CCL is to provide data owners with the ability to restrict h For example, when the CCL constraint of the column is ``PLAINTEXT_AFTER_AGGREGATE``, the result of the SUM of the column can participate in the next calculation in plaintext state, which can speed up the overall execution efficiency. +.. _how_ccl_works: + How CCL Works? ^^^^^^^^^^^^^^ Translator takes the Logical Plan generated by the query and CCL settings as input, and then builds a Logical Plan with CCL. Translator will check the CCL of the the result contained in the root node, and only allow the query to execute if the CCL constraints of the result for the issuer is ``PLAINTEXT``, otherwise, reject the query. -.. image:: ../imgs/logical_plan_with_ccl.png +.. image:: /imgs/logical_plan_with_ccl.png :alt: Logical Plan with CCL The following is a brief introduction and explanation of the derivation process and principle of CCL. @@ -106,4 +108,4 @@ CCL settings of table tb at Bob: When Alice executes query ``select tb.rank from ta join tb on ta.id = tb.id``, SCQL will verify the CCL and generate a verification failure error: tb.rank is not ``PLAINTEXT`` for Alice's CCL constraint. -When Alice executes query ``select ta.rank > tb.rank from ta join tb on ta.id = tb.id``, SCQL CCL verification passes, the query can be executed normally and the result can be obtained, since the CCL constraint of the result of ``ta.rank > tb.rank`` for Alice is ``PLAINTEXT``. \ No newline at end of file +When Alice executes query ``select ta.rank > tb.rank from ta join tb on ta.id = tb.id``, SCQL CCL verification passes, the query can be executed normally and the result can be obtained, since the CCL constraint of the result of ``ta.rank > tb.rank`` for Alice is ``PLAINTEXT``. diff --git a/docs/getting_started/how_to_set_ccl.rst b/docs/topics/ccl/usage.rst similarity index 99% rename from docs/getting_started/how_to_set_ccl.rst rename to docs/topics/ccl/usage.rst index 726f1ac8..c1817311 100644 --- a/docs/getting_started/how_to_set_ccl.rst +++ b/docs/topics/ccl/usage.rst @@ -6,7 +6,7 @@ This document will give some examples on CCL settings in typical scenarios. You Pre-knowledge ------------- -What is SCQL CCL? Please read :ref:`/reference/scql_ccl_intro.rst`. +What is SCQL CCL? Please read :doc:`/topics/ccl/intro`. Grant CCL syntax, please read :ref:`Grant/Revoke CCL`. @@ -229,4 +229,4 @@ CCL settings of table t2 at Bob -- Query can be executed by user Alice/Bob and get the results select count(*) from t2; - select count(*) from t1; \ No newline at end of file + select count(*) from t1; diff --git a/docs/development/integrate_scql_system.rst b/docs/topics/clients/overview.rst similarity index 92% rename from docs/development/integrate_scql_system.rst rename to docs/topics/clients/overview.rst index f25a0a0f..ee5333d9 100644 --- a/docs/development/integrate_scql_system.rst +++ b/docs/topics/clients/overview.rst @@ -8,7 +8,7 @@ As shown in FIG, SCQL System needs to work with **Client**: * Client: user interface designed for query submission and result retrieval. -.. image:: ../imgs/scql_system.png +.. image:: /imgs/scql_system.png Therefore the platform should support Client to integrate SCQL System. @@ -22,7 +22,7 @@ For SQL query, SCDB support services: * Fetch: async API, try to get the result of a SQL query, server listen on ``${SCDBHost}/public/fetch_result`` * SubmitAndGet: sync API, submit query and wait to get the query result, server listen on ``${SCDBHost}/public/submit_and_get`` -Please refer to :doc:`../development/scql_api` for details. +Please refer to :doc:`/reference/http-api` for details. .. note:: * Client can choose to support either async or sync API according to business scenarios: diff --git a/docs/getting_started/deployment.rst b/docs/topics/deployment/how-to-deploy-a-cluster.rst similarity index 97% rename from docs/getting_started/deployment.rst rename to docs/topics/deployment/how-to-deploy-a-cluster.rst index 32057131..5cdb3306 100644 --- a/docs/getting_started/deployment.rst +++ b/docs/topics/deployment/how-to-deploy-a-cluster.rst @@ -2,7 +2,7 @@ Deployment ========== -This document describes how to deploy a SCQL system with docker, and use scdbclient to query, it's basically same with :doc:`quickstart`, but deployed in multi-machine. +This document describes how to deploy a SCQL system with docker, and use scdbclient to query, it's basically same with :doc:`/intro/tutorial`, but deployed in multi-machine. Before start this doc, we assume that the reader has some experience using the docker-compose utility. If you are new to Docker Compose, please consider reviewing the `official Docker Compose overview `_, or checking out the `Getting Started guide `_. @@ -11,7 +11,7 @@ Deployment Diagram The deployment diagram of the SCQL system that we plan to deploy is shown as the following figure, it involves a total of three party, including a trusted third-party and two data owner parties named ``Alice`` and ``Bob``. We use three machines to simulate different parties. -.. image:: ../imgs/deployment.png +.. image:: /imgs/deployment.png .. note:: 1. The SCDB is served through the HTTP protocol. It is recommended to use HTTPS instead in production environments. Please check :ref:`TLS Configuration ` for details. @@ -163,7 +163,7 @@ This chapter will demonstrate how to deploy SCDB in a Third-Party mkdir scdb cd scdb -2.2 Set SCDB Config +2.2 Set SCDB Config -------------------- Create a file called ``config.yml`` in your workspace and paste the following code in: @@ -252,7 +252,7 @@ The file your workspace should be as follows: .. code-block:: bash - └── scdb + └── scdb ├── scdb_init.sql ├── config.yml └── docker-compose.yaml @@ -281,7 +281,7 @@ SCDB is listening on ``8080``, waiting for connection Step 3: SCQL Test ================= -Here we use scdbclient to submit a query to SCDB for testing, you can also submit queries directly to SCDB by sending a POST request. This step can be completed on any machine that has access to the SCDB ip address. +Here we use scdbclient to submit a query to SCDB for testing, you can also submit queries directly to SCDB by sending a POST request. This step can be completed on any machine that has access to the SCDB ip address. You can read `How to use SCDBClient `_ for more information about scdbclient. @@ -330,12 +330,12 @@ Create a json file named as ``users.json`` as follows: The ``root`` user is the admin user of SCDB which is init when scdb container set up, ``alice`` and ``bob`` are the user belong to party Alice and Bob, The user information for ``alice`` and ``bob`` should be same with the user information you will create. - + 3.3 Submit Query ---------------- -You can start to use scdbclient to submit queries to SCDBServer and fetch the query results back. it's same as what you can do in :doc:`quickstart` +You can start to use scdbclient to submit queries to SCDBServer and fetch the query results back. it's same as what you can do in :doc:`/intro/tutorial` .. code-block:: bash @@ -356,4 +356,4 @@ You can start to use scdbclient to submit queries to SCDBServer and fetch the qu ... .. note:: - ``__SCDB_URL__`` is the url (eg:http://127.0.0.1:8080) where scdb service is listen on, you need to replace it with scdb service url. \ No newline at end of file + ``__SCDB_URL__`` is the url (eg:http://127.0.0.1:8080) where scdb service is listen on, you need to replace it with scdb service url. diff --git a/docs/topics/index.rst b/docs/topics/index.rst new file mode 100644 index 00000000..553f08fd --- /dev/null +++ b/docs/topics/index.rst @@ -0,0 +1,34 @@ +Topics +====== + +.. toctree:: + :maxdepth: 1 + :caption: SCQL System + + system/intro + system/usage + +.. toctree:: + :maxdepth: 1 + :caption: Security + + security/overview + +.. toctree:: + :maxdepth: 1 + :caption: CCL + + ccl/intro + ccl/usage + +.. toctree:: + :maxdepth: 1 + :caption: Clients + + clients/overview + +.. toctree:: + :maxdepth: 1 + :caption: Deployment + + deployment/how-to-deploy-a-cluster diff --git a/docs/reference/scql_security_statement.rst b/docs/topics/security/overview.rst similarity index 96% rename from docs/reference/scql_security_statement.rst rename to docs/topics/security/overview.rst index df4a70ad..4e28a390 100644 --- a/docs/reference/scql_security_statement.rst +++ b/docs/topics/security/overview.rst @@ -1,5 +1,5 @@ -SCQL Security Statement -======================= +Security overview +================= Security Guarantees and Threat Model ------------------------------------ @@ -8,9 +8,9 @@ For a single query, SCQL protects the confidentiality of data that meets the CCL SCQL does not protect queries as queries are designed to be public to all participants in SCQL. SCQL also does not protect the size (dimension) information of intermediate computation results. -SCQL is built on top of the MPC framework `secretflow/spu`_, using a semi-honest security model. The SCQL semi-honest model assumes that all participants, including the query issuer, the data owner (SCQLEngine is deployed on the data owner) and SCDB server, strictly abide by the protocol, but may try to learn others' private data from its legitimately received messages. +SCQL is built on top of the MPC framework `secretflow/spu`_, using a semi-honest security model. The SCQL semi-honest model assumes that all participants, including the query issuer, the data owner (SCQLEngine is deployed on the data owner) and SCDB server, strictly abide by the protocol, but may try to learn others' private data from its legitimately received messages. -.. warning:: +.. warning:: If you select the SEMI2K as SCQL's underlying mpc protocol, please make sure to use the `TrustedThirdParty beaver provider`_ [#f1]_. The other beaver provider mode `TrustedFirstParty beaver provider`_ should only be used for debugging and may incur significant security problem in the production environment. Like all cryptography-based privacy-preserving computing systems, SCQL at this stage cannot solve the problem of deducing original privacy data based on the results of legal queries. The current academic solution to this problem is generally to add noise into data through differential privacy mechanism. Although the CCL mechanism allows the data owners to restrict the use of their data, which can alleviate risks to a certain extent, it cannot completely eliminate the risks. SCQL also does not solve the problem of participants tampering with their original input to obtain other participants' private information. @@ -33,7 +33,7 @@ The query of SCQL could be flexible, adversaries may construct adaptive attacks Attack Method 1: Multi-query Attack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The multi-query attack method includes two attack ways: +The multi-query attack method includes two attack ways: (1) One way to obtain the other party's information is to tamper with the input content for each query, while keeping the query itself unchanged. For example, the attacker can obtain all the information of the other party's join key through multiple join queries and tampering with the content of his join key each time. (2) Another way is to infer the other party's private data by rewriting the query each time and comparing the results of multiple queries. For example, the attacker can use the where condition to limit the input of the aggregation function. The first time the query obtains the aggregation result of N pieces of data, the second time by changing the where condition, the aggregation result of N-1 pieces of data can be obtained, and then the attacker can obtain the original information of 1 piece of data by comparing results. @@ -57,16 +57,16 @@ System Security Configuration Instructions ------------------------------------------ 1. SCQL supports HTTPS protocol, it is recommended to enable HTTPS by default. Please see :ref:`SCDB TLS Configuration ` and :ref:`SCQLEngine TLS Configuration ` for details on how to enable HTTPS for SCDBServer and SCQLEngine. - + Suggestions for upstream integrators ------------------------------------ 1. It is recommended to add an approval process before submitting any queries to SCQL for execution. 2. It is recommended to add an audit mechanism, analyze historical queries, and track down information leakage issues. -3. It is recommended to divide the use of SCQL into two stages: development stage and production stage, and to adopt different security control measures. - - * The development stage refers to the stage where the query is under development iteration. The data samples used in the development stage must be small-scale data sets that have been desensitized, de-identified, anonymized, and added with noise, aiming to quickly build the data analysis processing flow. +3. It is recommended to divide the use of SCQL into two stages: development stage and production stage, and to adopt different security control measures. + + * The development stage refers to the stage where the query is under development iteration. The data samples used in the development stage must be small-scale data sets that have been desensitized, de-identified, anonymized, and added with noise, aiming to quickly build the data analysis processing flow. * The production stage refers to the joint analysis of the query by multiple participating parties to ensure that the task is risk-free or within the acceptance range of multiple participating parties, and is released for production operation. If the related query needs to be changed, it needs to go through multi-party audit and evaluation again. The production stage uses real data, and parties participating in the joint analysis need to: (1) conduct task evaluation and approval before the event; (2) ensure task consistency during the event, and suspend the task in a timely manner if there is any risk; (3) conduct audit after the event, and ensure that potential data leakage risks can be discovered and avoided in case of malicious behavior. diff --git a/docs/getting_started/scql_intro.rst b/docs/topics/system/intro.rst similarity index 81% rename from docs/getting_started/scql_intro.rst rename to docs/topics/system/intro.rst index 215fb14a..55951a7b 100644 --- a/docs/getting_started/scql_intro.rst +++ b/docs/topics/system/intro.rst @@ -1,17 +1,14 @@ -SCQL Introduction -================= - -Overview --------- +SCQL System Overview +==================== Secure Collaborative Query Language (SCQL) is a system that allows multiple distrusting parties to run joint analysis without revealing their private data. Key Features -^^^^^^^^^^^^ +------------ * Semi-honest security. SCQL assumes that all parties are semi-honest. -* Support multiple parties (N >= 2). -* Support common SQL select syntax and functions to meet the needs of most scenarios. Please check :ref:`/reference/scql_status.rst` for details. +* Support multiple parties (N >= 2). +* Support common SQL select syntax and functions to meet the needs of most scenarios. Please check :doc:`/reference/implementation-status` for details. * Practical performance. SCQL has multiple levels of performance optimization. * Easy to use. SCQL provides relation SQL-like interface. * Data usage authorization. SCQL provides a mechanism named CCL (Column Control List) for data owner to define their data usage restrictions. @@ -19,13 +16,13 @@ Key Features Architecture ------------ -An SCQL system consists of an SCDB server and multiple SCQLEngines. +An SCQL system consists of an SCDB server and multiple SCQLEngines. -- SCDB server is responsible for translating SQL query into a hybrid MPC-plaintext execution graph and dispatching the execution graph to SCQLEngine of participants. +- SCDB server is responsible for translating SQL query into a hybrid MPC-plaintext execution graph and dispatching the execution graph to SCQLEngine of participants. - SCQLEngine is a hybrid MPC-plaintext execution engine, which collaborates with peers to run the execution graph and reports the query result to SCDB server. SCQLEngine is implemented on top of state-of-the-art MPC framework `secretflow/spu`_. -.. image:: ../imgs/scql_architecture.png +.. image:: /imgs/scql_architecture.png :alt: SCQL Architecture @@ -34,7 +31,7 @@ How SCQL Works We will show how SCQL works through the life of the following sample SCQL query Q. -.. code-block:: SQL +.. code-block:: SQL :caption: SCQL query Q SELECT AVG(bank_1.deposit), AVG(bank_2.loan) @@ -48,10 +45,10 @@ Table schema Let's have a look at the schema of tables involved in the above query Q. -.. image:: ../imgs/the_life_of_scql_query_env.png +.. image:: /imgs/the_life_of_scql_query_env.png :alt: Table schema -- ``bank_1`` +- ``bank_1`` Party Bank1 owns the table ``bank_1`` in its local database ``DB1``, which has two columns ``customer_id`` and ``deposit``. - ``bank_2`` Party Bank2 owns the table ``bank_2`` in its local database ``DB2``, which has two columns ``customer_id`` and ``loan``. @@ -60,13 +57,13 @@ Let's have a look at the schema of tables involved in the above query Q. Column Control List (CCL) ^^^^^^^^^^^^^^^^^^^^^^^^^ -CCL Form: ```` +CCL Form: ```` It means ``src_column`` is accessible to ``dest_party`` with the ``constraint``. To make the query Q pass the CCL validation, data owner should grant the following CCL. -* Bank1 +* Bank1 * ```` * ```` * ```` @@ -79,61 +76,58 @@ To make the query Q pass the CCL validation, data owner should grant the followi * ```` .. note:: - To learn more about CCL, please read the doc :ref:`/reference/scql_ccl_intro.rst`. - + To learn more about CCL, please read the doc :doc:`/topics/ccl/intro`. Lifetime of SCQL query ^^^^^^^^^^^^^^^^^^^^^^ -.. image:: ../imgs/scql_workflow.png +.. image:: /imgs/scql_workflow.png :alt: SCQL Workflow Step1. Initialize a Session -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +""""""""""""""""""""""""""" SCDB creates a new session for the incoming query, and then authenticates the identity of the query issuer. It will reject the request if authentication fails. Step2. Parse and Plan Q -~~~~~~~~~~~~~~~~~~~~~~~ +""""""""""""""""""""""" Parser will parse Q into an AST(Abstract Syntax Tree), and then Planner converts it into a Logical Plan. -.. image:: ../imgs/logicalplan_for_Q.png +.. image:: /imgs/logicalplan_for_Q.png :alt: Logical Plan for Q Step3. Translate -~~~~~~~~~~~~~~~~ +"""""""""""""""" Step3.1 Build and Check CCL -*************************** Translator needs to retrieve CCL from CCL manager, it will build CCL along the logical plan and verify the CCL of root node to ensure Q is legal on data owners' constraints. Step3.2 Translate -***************** The translator takes the logical plan and CCL as inputs and generates an execution graph for the query Q as follows. -.. image:: ../imgs/exe_graph_for_Q.png +.. image:: /imgs/exe_graph_for_Q.png :alt: Execution Graph for Q Step4. Optimize and Split Graph -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +""""""""""""""""""""""""""""""" The graph optimizer will optimize the execution graph, such as node fusion and replicated node elimination. The optimized execution graph is still a whole graph, graph splitter will split the whole graph into subgraphs based on the parties of the nodes. -.. image:: ../imgs/subgraph_for_Q.png +.. image:: /imgs/subgraph_for_Q.png :alt: subgraphs Step5. Execute -~~~~~~~~~~~~~~ +"""""""""""""" SCDB sends the subgraphs to corresponding SCQLEngine nodes, SCQLEngine cooperates with peers to run the execution graph and reports the final result of Q to SCDB. diff --git a/docs/getting_started/how_to_use_scql.rst b/docs/topics/system/usage.rst similarity index 89% rename from docs/getting_started/how_to_use_scql.rst rename to docs/topics/system/usage.rst index f16f6211..ddd31bb5 100644 --- a/docs/getting_started/how_to_use_scql.rst +++ b/docs/topics/system/usage.rst @@ -8,7 +8,7 @@ The flowchart shows how to use SCQL system, which contains two stages: prepare a Workflow --------- -.. image:: ../imgs/how_to_use_scql.png +.. image:: /imgs/how_to_use_scql.png :alt: how_to_use_scql Participants @@ -40,10 +40,10 @@ Prepare stage Bob creates table in SCDB using the account "Bob" by :ref:`CREATE TABLE Statement `. 6.0 grant CCL - Alice grants CCL about the table created by Alice for Alice and Bob in SCDB using the account "Alice", see :ref:`CCL ` for more information. + Alice grants CCL about the table created by Alice for Alice and Bob in SCDB using the account "Alice", see :doc:`/topics/ccl/intro` for more information. 7.0 grant CCL - Bob grants CCL about the table created by Bob for Alice and Bob in SCDB using the account "Bob", see :ref:`CCL ` for more information. + Bob grants CCL about the table created by Bob for Alice and Bob in SCDB using the account "Bob", see :doc:`/topics/ccl/intro` for more information. Execute stage -------------