diff --git a/README.md b/README.md index 9a299784f5..a4f7d306f7 100644 --- a/README.md +++ b/README.md @@ -73,13 +73,13 @@ Slack (For developer quick communication): DingTalk Group (For general technical discussion) -![alert](./doc/doc_images/dingtalk.png) +![alert](./doc/images/dingtalk.png) WeChat Group (For general technical discussion) -![alert](./doc/doc_images/wechat_tech.png) +![alert](./doc/images/wechat_tech.png) WeChat Official Account (For announcement) -![alert](./doc/doc_images/wechat.png) +![alert](./doc/images/wechat.png) diff --git a/README_CN.md b/README_CN.md index 5948788767..8d3251cc3c 100644 --- a/README_CN.md +++ b/README_CN.md @@ -68,13 +68,13 @@ Slack (在线开发沟通): 钉钉群 (技术交流) -![alert](./doc/doc_images/dingtalk.png) +![alert](./doc/images/dingtalk.png) 微信群 (技术交流) -![alert](./doc/doc_images/wechat_tech.png) +![alert](./doc/images/wechat_tech.png) 微信公众号 (信息发布) -![alert](./doc/doc_images/wechat.png) +![alert](./doc/images/wechat.png) diff --git a/ci/github_ci.sh b/ci/github_ci.sh index aded5865f8..eae43459dc 100644 --- a/ci/github_ci.sh +++ b/ci/github_ci.sh @@ -32,11 +32,11 @@ cd $WORKSPACE/build/output OMP_NUM_THREADS=8 ./unit_test --gtest_output=xml:$WORKSPACE/testresult/gtest/ rm -rf testdb* .import_tmp -cd $WORKSPACE/src/client/python/TuGraphClient +#cd $WORKSPACE/src/client/python/TuGraphClient # install TuGraphClient -python3 setup.py install +#python3 setup.py install # run TuGraphClient unit_tests -python3 setup.py test +#python3 setup.py test # integrate tests cd $WORKSPACE/build/output diff --git a/deps/tiny-process-library b/deps/tiny-process-library index e52aef70a5..a6773276ef 160000 --- a/deps/tiny-process-library +++ b/deps/tiny-process-library @@ -1 +1 @@ -Subproject commit e52aef70a5ecd59950e0571741f6402ef2d5c63b +Subproject commit a6773276efdbc322f1abb0159301f5502647eb52 diff --git a/doc/doc_images/cloud-deployment-8.png b/doc/doc_images/cloud-deployment-8.png deleted file mode 100644 index ca06f72292..0000000000 Binary files a/doc/doc_images/cloud-deployment-8.png and /dev/null differ diff --git a/doc/doc_images/cloud-deployment-9.png b/doc/doc_images/cloud-deployment-9.png deleted file mode 100644 index 9f79b5d3bf..0000000000 Binary files a/doc/doc_images/cloud-deployment-9.png and /dev/null differ diff --git a/doc/doc_images/three-body-cypher1.png b/doc/doc_images/three-body-cypher1.png deleted file mode 100644 index 50af33bfd0..0000000000 Binary files a/doc/doc_images/three-body-cypher1.png and /dev/null differ diff --git a/doc/doc_images/three-body-cypher2.png b/doc/doc_images/three-body-cypher2.png deleted file mode 100644 index c75724a053..0000000000 Binary files a/doc/doc_images/three-body-cypher2.png and /dev/null differ diff --git a/doc/doc_images/three-body-data.png b/doc/doc_images/three-body-data.png deleted file mode 100644 index b39d4001df..0000000000 Binary files a/doc/doc_images/three-body-data.png and /dev/null differ diff --git a/doc/doc_images/three-kingdoms-cypher1.png b/doc/doc_images/three-kingdoms-cypher1.png deleted file mode 100644 index 37c075c387..0000000000 Binary files a/doc/doc_images/three-kingdoms-cypher1.png and /dev/null differ diff --git a/doc/doc_images/three-kingdoms-cypher2.png b/doc/doc_images/three-kingdoms-cypher2.png deleted file mode 100644 index c23bb5a069..0000000000 Binary files a/doc/doc_images/three-kingdoms-cypher2.png and /dev/null differ diff --git a/doc/doc_images/three-kingdoms-cypher3.png b/doc/doc_images/three-kingdoms-cypher3.png deleted file mode 100644 index 4b0a0c0e4b..0000000000 Binary files a/doc/doc_images/three-kingdoms-cypher3.png and /dev/null differ diff --git a/doc/doc_images/three-kingdoms-cypher4.png b/doc/doc_images/three-kingdoms-cypher4.png deleted file mode 100644 index 1c11179f9b..0000000000 Binary files a/doc/doc_images/three-kingdoms-cypher4.png and /dev/null differ diff --git a/doc/doc_images/three-kingdoms-cypher5.png b/doc/doc_images/three-kingdoms-cypher5.png deleted file mode 100644 index d5feab6c05..0000000000 Binary files a/doc/doc_images/three-kingdoms-cypher5.png and /dev/null differ diff --git a/doc/doc_images/wandering-earth-1.png b/doc/doc_images/wandering-earth-1.png deleted file mode 100644 index 15a5f3146f..0000000000 Binary files a/doc/doc_images/wandering-earth-1.png and /dev/null differ diff --git a/doc/doc_images/wandering-earth-2.png b/doc/doc_images/wandering-earth-2.png deleted file mode 100644 index 4efe6f73ac..0000000000 Binary files a/doc/doc_images/wandering-earth-2.png and /dev/null differ diff --git a/doc/doc_images/wandering-earth-3.png b/doc/doc_images/wandering-earth-3.png deleted file mode 100644 index 15f0aa17f4..0000000000 Binary files a/doc/doc_images/wandering-earth-3.png and /dev/null differ diff --git a/doc/en-US/images b/doc/en-US/images deleted file mode 120000 index b7d78680d5..0000000000 --- a/doc/en-US/images +++ /dev/null @@ -1 +0,0 @@ -../doc_images \ No newline at end of file diff --git a/doc/en-US/source/2.introduction/4.charactristics/2.multi-level-Interfaces.md b/doc/en-US/source/2.introduction/4.charactristics/2.multi-level-Interfaces.md index 632d1b4a3b..c60df29973 100644 --- a/doc/en-US/source/2.introduction/4.charactristics/2.multi-level-Interfaces.md +++ b/doc/en-US/source/2.introduction/4.charactristics/2.multi-level-Interfaces.md @@ -10,7 +10,7 @@ Interfaces can be roughly divided into client interfaces and server interfaces. The server interfaces are all at the calculation layer and are logically separated from the graph data storage by a Core API layer. -![Multi Level Interfaces](../../../../doc_images/multi-level-Interfaces-en.png) +![Multi Level Interfaces](../../../../images/multi-level-Interfaces-en.png) ### 1.1.Client Interface @@ -30,4 +30,4 @@ The server interface includes Cypher, Procedure API, OLAP API, and GNN PI, which > __GNN API__ mainly provides the interfaces needed for graph neural network applications and can be integrated with machine learning frameworks such as PyTorch. TuGraph's GNN PI mainly integrates DGL and completes the entire process from graph storage to graph neural network application in the Python language environment. -Except for Cypher's interpretive execution, all other server interfaces are compiled and executed, meaning that the corresponding code needs to be sent to the server and compiled (which may take some time) before execution on the server. Therefore, it is usually necessary to load the program first, then find it in the list of loaded applications, and execute it after passing in the input parameters. \ No newline at end of file +Except for Cypher's interpretive execution, all other server interfaces are compiled and executed, meaning that the corresponding code needs to be sent to the server and compiled (which may take some time) before execution on the server. Therefore, it is usually necessary to load the program first, then find it in the list of loaded applications, and execute it after passing in the input parameters. diff --git a/doc/en-US/source/2.introduction/4.charactristics/3.htap.md b/doc/en-US/source/2.introduction/4.charactristics/3.htap.md index d8b0e4fc91..080cc02e48 100644 --- a/doc/en-US/source/2.introduction/4.charactristics/3.htap.md +++ b/doc/en-US/source/2.introduction/4.charactristics/3.htap.md @@ -4,7 +4,7 @@ ## 1.Introduction -![htap](../../../../doc_images/htap-en.png) +![htap](../../../../images/htap-en.png) There are different ways to implement HTAP in architecture: one is to use two different copies to handle OLTP and OLAP tasks separately, with the core being data consistency synchronization and additional resource overhead; the other is to use the same data storage at all times, but this implementation has memory bloat in its data structure and needs further work for industrialization. In TuGraph's design, simple OLAP and OLTP operations share the same data, while complex OLAP operations are exported and handled separately as snapshots. @@ -33,4 +33,4 @@ Corresponding to the calculation interface and storage, there are four operating - Embed mode, which has the same interface as Plugin mode but the graph database service does not need to be started and can directly call the data in the database through the interface. This mode is usually used for debugging Procedure API and OLAP API code, and the debugging information and operation steps are more friendly than Plugin mode. - Standalone mode, which maximally separates from the graph database, is more direct when only using the graph analysis engine for data analysis. Standalone mode will directly use the data of the external storage. -The use of the graph neural network engine is similar to the 'complex graph analysis operation', which calls part of the OLAP API and GNN API at the same time, which is not elaborated here. \ No newline at end of file +The use of the graph neural network engine is similar to the 'complex graph analysis operation', which calls part of the OLAP API and GNN API at the same time, which is not elaborated here. diff --git a/doc/en-US/source/2.introduction/6.functionality.md b/doc/en-US/source/2.introduction/6.functionality.md index 830ef23029..73c340d5d0 100644 --- a/doc/en-US/source/2.introduction/6.functionality.md +++ b/doc/en-US/source/2.introduction/6.functionality.md @@ -84,7 +84,7 @@ Ecological tools are a crucial component of enterprise-level databases, and a ri ### 6.1.TuGraph DataX -![导入导出](../../images/tugraph-datax.png) +![导入导出](../../../images/tugraph-datax.png) TuGraph's core supports importing and exporting CSV and JSON data, offering both full database and incremental importing modes. In practice, there may be a need to import from multiple data sources such as MySQL, Kafka, and Hive, and TuGraph connects to these sources using DataX. Due to the differences between relational and graph models, data cleaning processes can be quickly processed using SparkSQL. TuGraph focuses only on the reliability and performance of simple CSV and JSON scenario imports. @@ -98,4 +98,4 @@ TuGraph Explorer targets graph business users and focuses more on business logic TuGraph uses the Prometheus + Grafana monitoring framework in a loosely coupled manner. Prometheus obtains monitoring information from TuGraph's monitoring interface, stores it in a local time-series database, and then displays it interactively on the web using Grafana. -The monitoring states provided by TuGraph include the state of the graph database and the state of the server. The former includes the database-side status such as read/write load and number of vertices/edges, while the latter includes the real-time status of the server's memory, CPU, and hard disk. If some monitoring state exceeds the expected threshold, proactive alerts are necessary, usually requiring integration with other operations and control systems such as group messaging and email alerts. \ No newline at end of file +The monitoring states provided by TuGraph include the state of the graph database and the state of the server. The former includes the database-side status such as read/write load and number of vertices/edges, while the latter includes the real-time status of the server's memory, CPU, and hard disk. If some monitoring state exceeds the expected threshold, proactive alerts are necessary, usually requiring integration with other operations and control systems such as group messaging and email alerts. diff --git a/doc/en-US/source/4.user-guide/1.tugraph-browser.md b/doc/en-US/source/4.user-guide/1.tugraph-browser.md index 4cfc186e22..3b8cf977c1 100644 --- a/doc/en-US/source/4.user-guide/1.tugraph-browser.md +++ b/doc/en-US/source/4.user-guide/1.tugraph-browser.md @@ -30,7 +30,7 @@ For first-time users of TuGraph, you can quickly build a graph project with the #### 2.3.1.Creating a Graph Project -In the `Graph Management` homepage tab, click `Create New Graph Project` to create a new graph project. +In the `Graph Project` homepage tab, click `Create New Graph Project` to create a new graph project. ![quickstart-creategraph](../../../images/browser/quickstart-creategraph.png) @@ -44,7 +44,7 @@ In the Fill in Configurations interface, enter the graph project information. Si #### 2.3.2.Starting a Graph Project -After creating a graph project with demo data, you can find the corresponding graph project in the `Graph Management` tab, and then click `Graph Query` to query graph data. +After creating a graph project with demo data, you can find the corresponding graph project in the `Graph Project` tab, and then click `Graph Query` to query graph data. ![quickstart-graphtab](../../../images/browser/quickstart-graphtab.png) @@ -54,19 +54,19 @@ Execute the default query statement to browse the graph data in the demo. For more quick start documents, please visit the[Quick Start Documents](../3.quick-start/1.preparation.md) -### 2.4.Graph Management +### 2.4.Graph Project -`Graph Management` provides visualized graph project management and graph data development functions, providing users with a series of convenient graph data visualization operations, including graph project creation, modification, deletion, and other management operations, as well as graph data queries, vertex-edge statistics, and other operations. In addition, it also supports graph model management, making it more convenient for users to manage and maintain graph data. +`Graph Project` provides visualized graph project management and graph data development functions, providing users with a series of convenient graph data visualization operations, including graph project creation, modification, deletion, and other management operations, as well as graph data queries, vertex-edge statistics, and other operations. In addition, it also supports graph model management, making it more convenient for users to manage and maintain graph data. #### 2.4.1.Graph Project Management -On the `Graph Management` page, you can see the graph projects in the current graph database. +On the `Graph Project` page, you can see the graph projects in the current graph database. ![graphmanagement-homepage](../../../images/browser/graphmanagement-homepage.png) ##### 2.4.1.1.Creating a Graph Project -On the `Graph Management` page, click the `Create New Graph Project` button to create a new graph project. +On the `Graph Project` page, click the `Create New Graph Project` button to create a new graph project. ![graphmanagement-creategraph](../../../images/browser/graphmanagement-creategraph.png) @@ -85,11 +85,11 @@ Creating a new graph project requires completing the creation of the graph proje ![graphmanagement-configure](../../../images/browser/graphmanagement-configure.png) -After creation, the graph project can be viewed in the graph project tab on the `Graph Management` page. +After creation, the graph project can be viewed in the graph project tab on the `Graph Project` page. ##### 2.4.1.2.Editing a Graph Project -On the `Graph Management` page, click the `Edit button` (pencil icon) in the graph project tab to edit the basic information of the corresponding graph project. +On the `Graph Project` page, click the `Edit button` (pencil icon) in the graph project tab to edit the basic information of the corresponding graph project. ![graphmanagement-editgraph-button](../../../images/browser/graphmanagement-editgraph-button.png) @@ -99,7 +99,7 @@ graphmanagement-editgraph-button ##### 2.4.1.3.Deleting a Graph Project -On the `Graph Management` page, click the `Delete` button (trash can icon) in the graph project tab to delete the corresponding graph project. +On the `Graph Project` page, click the `Delete` button (trash can icon) in the graph project tab to delete the corresponding graph project. ![graphmanagement-deletegraph-button](../../../images/browser/graphmanagement-deletegraph-button.png) @@ -107,7 +107,7 @@ _Note: Graph projects cannot be restored after deletion._ ##### 2.4.1.4.Vertex-Edge Statistics -On the `Graph Management` page, click the `Vertex-Edge Statistics` button (line graph icon or refresh icon) in the graph project tab to count the number of vertexs and edges in the corresponding graph project. +On the `Graph Project` page, click the `Vertex-Edge Statistics` button (line graph icon or refresh icon) in the graph project tab to count the number of vertexs and edges in the corresponding graph project. ![graphmanagement-statistics-button](../../../images/browser/graphmanagement-statistics-button.png) @@ -119,7 +119,7 @@ The statistical results will be displayed on the graph project tab. Graph projec #### 2.4.2.Graph Building -The `Graph Building` function in Browser is mainly used for graph project model definition and data import. On the `Graph Management` page, click the `Graph Building` button in the graph project tab. +The `Graph Building` function in Browser is mainly used for graph project model definition and data import. On the `Graph Project` page, click the `Graph Building` button in the graph project tab. ![graphbuild-button](../../../images/browser/graphbuild-button.png) @@ -268,7 +268,7 @@ After the file is successfully uploaded, you can click the `Continue Import` but #### 2.4.3.Graph Query -Click the `Graph Query` button in the `graph project tab` on the `Graph Management` page to query and access graph data in the graph project. The product provides multiple modes for querying graph data, such as Statement Query, Path Query, and Vertex Query, and supports switching between graph projects and query result display. +Click the `Graph Query` button in the `graph project tab` on the `Graph Project` page to query and access graph data in the graph project. The product provides multiple modes for querying graph data, such as Statement Query, Path Query, and Vertex Query, and supports switching between graph projects and query result display. ![query-button](../../../images/browser/query-button.png) diff --git a/doc/en-US/source/5.developer-manual/1.installation/1.cloud-deployment.md b/doc/en-US/source/5.developer-manual/1.installation/1.cloud-deployment.md index 45b69541ec..12cc666b6b 100644 --- a/doc/en-US/source/5.developer-manual/1.installation/1.cloud-deployment.md +++ b/doc/en-US/source/5.developer-manual/1.installation/1.cloud-deployment.md @@ -36,7 +36,7 @@ Before starting to use, you need an Alibaba Cloud account to access and create r |AliyunComputeNestUserFullAccess|Permissions for managing ComputeNest services (ComputeNest) on the user side| |AliyunCloudMonitorFullAccess|Permissions for managing Alibaba Cloud Monitor (CloudMonitor)| -![同意授权并创建关联角色](../../../../images/cloud-deployment-1.png) +![Cloud Deployment](../../../../images/cloud-deployment-1.png) ### 3.2.Deployment Entrance @@ -75,37 +75,37 @@ The creation of the service is carried out according to the following steps, ref - Create an instance name, such as "test" in the figure below - Select the region, such as "China East 1 (Hangzhou)" in the figure below -![Create Instance](../../../images/cloud-deployment-3.png) +![Create Instance](../../../../images/cloud-deployment-3.png) - Select the deployment area, such as "Availability Zone I" in the figure below - Select the instance type, currently supports ecs.r6.xlarge and ecs.r7a.xlarge specifications. If there is no model available in the list, try selecting other deployment areas. - Select the model - Configure the password for the instance -![Select Region](../../../images/cloud-deployment-4.png) +![Select Region](../../../../images/cloud-deployment-4.png) - Click next to enter the order confirmation page - Check the checkboxes for "Permission Confirmation" and "Service Terms" - Click the green "Start Free Trial" button in the lower left corner to create a service instance -![Confirmation](../../../images/cloud-deployment-5.png) +![Confirmation](../../../../images/cloud-deployment-5.png) ### 3.5.Start TuGraph Service - View the service instance: After the service instance is created successfully, it takes about 2 minutes for deployment. After the deployment is complete, you can see the corresponding service instance on the page, as shown in the figure below. -![View Instance](../../../images/cloud-deployment-6.png) +![View Instance](../../../../images/cloud-deployment-6.png) - Click the service instance to access TuGraph. After entering the corresponding service instance, you can get 3 ways to use it on the page: web, rpc, ssh. -![Access Method](../../../images/cloud-deployment-7.png) +![Access Method](../../../../images/cloud-deployment-7.png) - Click the link of web to jump to the deployed TuGraph Web. It is recommended that novice users first use the demo to quickly get started with TuGraph. - First, on the TuGraph Web login page, enter the default username (admin) and default password (73@TuGraph) to log in, as shown in the figure below. - After the login is completed, click "New Instance" -> "Create Instance" in sequence, wait for the creation to be completed, and the steps in 3 will change to green in turn, and it will automatically switch to the subgraph MovieDemo1, as shown in the figure below. -![Login](../../../images/cloud-deployment-8.png) -![Create Demo](../../../images/cloud-deployment-9.png) +![Login](../../../../images/cloud-deployment-8.png) +![Create Demo](../../../../images/cloud-deployment-9.png) ## 4.Common FAQs @@ -113,6 +113,6 @@ The creation of the service is carried out according to the following steps, ref Sometimes, the selected deployment area (such as Availability Zone G) does not have available resources for the selected package, and an error will be reported as shown in the figure below. -![Deployment Error](/doc/images/cloud-deployment-10.png) +![Deployment Error](../../../../images/cloud-deployment-10.png) -__Solution__:Try selecting other regions, such as Availability Zone I \ No newline at end of file +__Solution__:Try selecting other regions, such as Availability Zone I diff --git a/doc/en-US/source/9.contacts.md b/doc/en-US/source/9.contacts.md index 2e9fc73d56..2019a8b998 100644 --- a/doc/en-US/source/9.contacts.md +++ b/doc/en-US/source/9.contacts.md @@ -15,14 +15,14 @@ Slack: Dingtalk Group Chat (Discussions): -![alert](../images/dingtalk.png) +![alert](../../images/dingtalk.png) WeChat Group Chat (Discussions): -![alert](../images/wechat_tech.png) +![alert](../../images/wechat_tech.png) Official Accounts (Information Release): -![alert](../images/wechat.png) +![alert](../../images/wechat.png) -Email(Enterprise version consultation): tugraph@service.alipay.com \ No newline at end of file +Email(Enterprise version consultation): tugraph@service.alipay.com diff --git a/doc/en-US/source/conf.py b/doc/en-US/source/conf.py new file mode 100644 index 0000000000..1a026acc6b --- /dev/null +++ b/doc/en-US/source/conf.py @@ -0,0 +1,31 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'TuGraph' +copyright = '2023, Ant Group' +author = 'Ant Group' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = ['myst_parser', + 'sphinx_panels', + 'sphinx.ext.autodoc', + 'sphinx.ext.napoleon', + 'sphinx.ext.viewcode'] + +templates_path = ['../../_templates'] +exclude_patterns = [] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'sphinx_rtd_theme' +html_static_path = ['../../_static'] diff --git a/doc/doc_images/architecture-en.png b/doc/images/architecture-en.png similarity index 100% rename from doc/doc_images/architecture-en.png rename to doc/images/architecture-en.png diff --git a/doc/doc_images/architecture.png b/doc/images/architecture.png similarity index 100% rename from doc/doc_images/architecture.png rename to doc/images/architecture.png diff --git a/doc/images/browser/account-add-button.png b/doc/images/browser/account-add-button.png index 904246c2b9..5b9c7e9378 100644 Binary files a/doc/images/browser/account-add-button.png and b/doc/images/browser/account-add-button.png differ diff --git a/doc/images/browser/graphbuild-addedge.png b/doc/images/browser/graphbuild-addedge.png index e53467c458..39eca4a772 100644 Binary files a/doc/images/browser/graphbuild-addedge.png and b/doc/images/browser/graphbuild-addedge.png differ diff --git a/doc/images/browser/graphbuild-editedge.png b/doc/images/browser/graphbuild-editedge.png index 2899ea9dcb..eb7206b771 100644 Binary files a/doc/images/browser/graphbuild-editedge.png and b/doc/images/browser/graphbuild-editedge.png differ diff --git a/doc/images/browser/graphbuild.png b/doc/images/browser/graphbuild.png index 6dcf24e1bf..cd1f0bda1c 100644 Binary files a/doc/images/browser/graphbuild.png and b/doc/images/browser/graphbuild.png differ diff --git a/doc/images/browser/graphmanagement-creategraph.png b/doc/images/browser/graphmanagement-creategraph.png index 6b8cb4be87..4343dd4c9a 100644 Binary files a/doc/images/browser/graphmanagement-creategraph.png and b/doc/images/browser/graphmanagement-creategraph.png differ diff --git a/doc/images/browser/pathquery-result.png b/doc/images/browser/pathquery-result.png index e2a0d8ce85..0cd90cad46 100644 Binary files a/doc/images/browser/pathquery-result.png and b/doc/images/browser/pathquery-result.png differ diff --git a/doc/images/browser/pathquery-select.png b/doc/images/browser/pathquery-select.png index 6542dea1e0..3c5d0f7751 100644 Binary files a/doc/images/browser/pathquery-select.png and b/doc/images/browser/pathquery-select.png differ diff --git a/doc/images/browser/query-view.png b/doc/images/browser/query-view.png index 6e1b7e650c..8d1884ad82 100644 Binary files a/doc/images/browser/query-view.png and b/doc/images/browser/query-view.png differ diff --git a/doc/images/browser/quickstart-creategraph.png b/doc/images/browser/quickstart-creategraph.png index 6b8cb4be87..4343dd4c9a 100644 Binary files a/doc/images/browser/quickstart-creategraph.png and b/doc/images/browser/quickstart-creategraph.png differ diff --git a/doc/images/browser/role-add-button.png b/doc/images/browser/role-add-button.png index 9f89c80b77..a4590ac431 100644 Binary files a/doc/images/browser/role-add-button.png and b/doc/images/browser/role-add-button.png differ diff --git a/doc/images/browser/vertexquery-criteria.png b/doc/images/browser/vertexquery-criteria.png index b458a4782f..b5f95c3d83 100644 Binary files a/doc/images/browser/vertexquery-criteria.png and b/doc/images/browser/vertexquery-criteria.png differ diff --git a/doc/images/browser/vertexquery.png b/doc/images/browser/vertexquery.png index bc752d3677..97aa28122b 100644 Binary files a/doc/images/browser/vertexquery.png and b/doc/images/browser/vertexquery.png differ diff --git a/doc/doc_images/cloud-deployment-1.png b/doc/images/cloud-deployment-1.png similarity index 100% rename from doc/doc_images/cloud-deployment-1.png rename to doc/images/cloud-deployment-1.png diff --git a/doc/doc_images/cloud-deployment-10.png b/doc/images/cloud-deployment-10.png similarity index 100% rename from doc/doc_images/cloud-deployment-10.png rename to doc/images/cloud-deployment-10.png diff --git a/doc/doc_images/cloud-deployment-2.png b/doc/images/cloud-deployment-2.png similarity index 100% rename from doc/doc_images/cloud-deployment-2.png rename to doc/images/cloud-deployment-2.png diff --git a/doc/doc_images/cloud-deployment-3.png b/doc/images/cloud-deployment-3.png similarity index 100% rename from doc/doc_images/cloud-deployment-3.png rename to doc/images/cloud-deployment-3.png diff --git a/doc/doc_images/cloud-deployment-4.png b/doc/images/cloud-deployment-4.png similarity index 100% rename from doc/doc_images/cloud-deployment-4.png rename to doc/images/cloud-deployment-4.png diff --git a/doc/doc_images/cloud-deployment-5.png b/doc/images/cloud-deployment-5.png similarity index 100% rename from doc/doc_images/cloud-deployment-5.png rename to doc/images/cloud-deployment-5.png diff --git a/doc/doc_images/cloud-deployment-6.png b/doc/images/cloud-deployment-6.png similarity index 100% rename from doc/doc_images/cloud-deployment-6.png rename to doc/images/cloud-deployment-6.png diff --git a/doc/doc_images/cloud-deployment-7.png b/doc/images/cloud-deployment-7.png similarity index 100% rename from doc/doc_images/cloud-deployment-7.png rename to doc/images/cloud-deployment-7.png diff --git a/doc/images/cloud-deployment-8.png b/doc/images/cloud-deployment-8.png new file mode 100644 index 0000000000..5beb0628b3 Binary files /dev/null and b/doc/images/cloud-deployment-8.png differ diff --git a/doc/images/cloud-deployment-9.png b/doc/images/cloud-deployment-9.png new file mode 100644 index 0000000000..d04282d95a Binary files /dev/null and b/doc/images/cloud-deployment-9.png differ diff --git a/doc/doc_images/dingtalk.png b/doc/images/dingtalk.png similarity index 100% rename from doc/doc_images/dingtalk.png rename to doc/images/dingtalk.png diff --git a/doc/images/htap-en.png b/doc/images/htap-en.png new file mode 100644 index 0000000000..85479ac1e1 Binary files /dev/null and b/doc/images/htap-en.png differ diff --git a/doc/doc_images/htap.png b/doc/images/htap.png similarity index 100% rename from doc/doc_images/htap.png rename to doc/images/htap.png diff --git a/doc/images/multi-level-Interfaces-en.png b/doc/images/multi-level-Interfaces-en.png new file mode 100644 index 0000000000..b7de07422c Binary files /dev/null and b/doc/images/multi-level-Interfaces-en.png differ diff --git a/doc/doc_images/multi-level-Interfaces.png b/doc/images/multi-level-Interfaces.png similarity index 100% rename from doc/doc_images/multi-level-Interfaces.png rename to doc/images/multi-level-Interfaces.png diff --git a/doc/images/three-body-cypher1.png b/doc/images/three-body-cypher1.png new file mode 100644 index 0000000000..3f85fd8412 Binary files /dev/null and b/doc/images/three-body-cypher1.png differ diff --git a/doc/images/three-body-cypher2.png b/doc/images/three-body-cypher2.png new file mode 100644 index 0000000000..41f0f914cc Binary files /dev/null and b/doc/images/three-body-cypher2.png differ diff --git a/doc/images/three-body-cypher3.png b/doc/images/three-body-cypher3.png new file mode 100644 index 0000000000..4776f26d77 Binary files /dev/null and b/doc/images/three-body-cypher3.png differ diff --git a/doc/images/three-body-data.png b/doc/images/three-body-data.png new file mode 100644 index 0000000000..1913b39cbc Binary files /dev/null and b/doc/images/three-body-data.png differ diff --git a/doc/images/three-kingdoms-cypher1.png b/doc/images/three-kingdoms-cypher1.png new file mode 100644 index 0000000000..4b5745b96d Binary files /dev/null and b/doc/images/three-kingdoms-cypher1.png differ diff --git a/doc/images/three-kingdoms-cypher2.png b/doc/images/three-kingdoms-cypher2.png new file mode 100644 index 0000000000..fef4592cf3 Binary files /dev/null and b/doc/images/three-kingdoms-cypher2.png differ diff --git a/doc/images/three-kingdoms-cypher3.png b/doc/images/three-kingdoms-cypher3.png new file mode 100644 index 0000000000..c0790d5d7e Binary files /dev/null and b/doc/images/three-kingdoms-cypher3.png differ diff --git a/doc/images/three-kingdoms-cypher4.png b/doc/images/three-kingdoms-cypher4.png new file mode 100644 index 0000000000..49a6498d4a Binary files /dev/null and b/doc/images/three-kingdoms-cypher4.png differ diff --git a/doc/images/three-kingdoms-cypher5.png b/doc/images/three-kingdoms-cypher5.png new file mode 100644 index 0000000000..5d3cc55cdf Binary files /dev/null and b/doc/images/three-kingdoms-cypher5.png differ diff --git a/doc/doc_images/three-kingdoms-schema.png b/doc/images/three-kingdoms-schema.png similarity index 100% rename from doc/doc_images/three-kingdoms-schema.png rename to doc/images/three-kingdoms-schema.png diff --git a/doc/doc_images/tugraph-datax.png b/doc/images/tugraph-datax.png similarity index 100% rename from doc/doc_images/tugraph-datax.png rename to doc/images/tugraph-datax.png diff --git a/doc/images/wandering-earth-1.png b/doc/images/wandering-earth-1.png new file mode 100644 index 0000000000..955c565303 Binary files /dev/null and b/doc/images/wandering-earth-1.png differ diff --git a/doc/images/wandering-earth-2.png b/doc/images/wandering-earth-2.png new file mode 100644 index 0000000000..9cb17764ed Binary files /dev/null and b/doc/images/wandering-earth-2.png differ diff --git a/doc/images/wandering-earth-3.png b/doc/images/wandering-earth-3.png new file mode 100644 index 0000000000..c6dabbec97 Binary files /dev/null and b/doc/images/wandering-earth-3.png differ diff --git a/doc/doc_images/wechat.png b/doc/images/wechat.png similarity index 100% rename from doc/doc_images/wechat.png rename to doc/images/wechat.png diff --git a/doc/doc_images/wechat_tech.png b/doc/images/wechat_tech.png similarity index 100% rename from doc/doc_images/wechat_tech.png rename to doc/images/wechat_tech.png diff --git a/doc/doc_images/what-is-graph-en.png b/doc/images/what-is-graph-en.png similarity index 100% rename from doc/doc_images/what-is-graph-en.png rename to doc/images/what-is-graph-en.png diff --git a/doc/doc_images/what-is-graph.png b/doc/images/what-is-graph.png similarity index 100% rename from doc/doc_images/what-is-graph.png rename to doc/images/what-is-graph.png diff --git a/doc/zh-CN/images b/doc/zh-CN/images deleted file mode 120000 index ef1b80bc6b..0000000000 --- a/doc/zh-CN/images +++ /dev/null @@ -1 +0,0 @@ -../doc_images/ \ No newline at end of file diff --git a/doc/zh-CN/source/1.guide.md b/doc/zh-CN/source/1.guide.md index 0f23a45366..5d825058ac 100644 --- a/doc/zh-CN/source/1.guide.md +++ b/doc/zh-CN/source/1.guide.md @@ -6,7 +6,7 @@ > 了解图技术和TuGraph:[什么是图](./2.introduction/1.what-is-graph.md)、[什么是图数据库](./2.introduction/2.what-is-gdbms.md)、[什么是TuGraph](./2.introduction/3.what-is-tugraph.md)、[TuGraph产品架构](./2.introduction/5.architecture.md)。 -> 快速开始体验TuGraph:[快速上手](./3.quick-start/1.preparation.md)、[影视DEMO](./3.quick-start/2.demo/1.movie.md)、[可视化操作手册](./4.user-guide/1.tugraph-browser.md)。 +> 快速开始体验TuGraph:[快速上手](./3.quick-start/1.preparation.md)、[影视场景Demo](./3.quick-start/2.demo/1.movie.md)、[可视化操作手册](./4.user-guide/1.tugraph-browser.md)。 > 安装部署TuGraph:[云部署](./5.developer-manual/1.installation/1.cloud-deployment.md)、[Docker部署](./5.developer-manual/1.installation/2.docker-deployment.md)、[本地包部署](./5.developer-manual/1.installation/3.local-package-deployment.md)。 @@ -18,7 +18,7 @@ > 生态工具:[运维监控](./5.developer-manual/5.ecosystem-tools/1.monitoring.md)、[TuGraph-DataX](./5.developer-manual/5.ecosystem-tools/2.tugraph-datax.md)、[TuGraph-Explore](./5.developer-manual/5.ecosystem-tools/3.tugraph-explore.md)。 -> 接口文档:[Cypher API](./5.developer-manual/6.interface/1.cypher.md)、[OLAP API](./5.developer-manual/6.interface/2.olap/1.tutorial.md)、[Procedure API](./5.developer-manual/6.interface/3.procedure.md)、[RESTful API](./5.developer-manual/6.interface/4.protocol/1.restful-api.md)、[RPC API](./5.developer-manual/6.interface/4.protocol/2.rpc-api.md)。 +> 接口文档:[Cypher API](./5.developer-manual/6.interface/1.cypher.md)、[OLAP API](./5.developer-manual/6.interface/2.olap/1.tutorial.md)、[Procedure API (POG API)](./5.developer-manual/6.interface/3.procedure/1.procedure.md)、[RESTful API](./5.developer-manual/6.interface/4.protocol/1.restful-api.md)、[RPC API](./5.developer-manual/6.interface/4.protocol/2.rpc-api.md)。 ## 社区贡献 @@ -32,4 +32,4 @@ > [TuGraph技术分享集合](https://space.bilibili.com/1196053065/channel/seriesdetail?sid=3009777) -> [3分钟读懂图计算](https://www.bilibili.com/video/BV15U4y1r7AW/?spm_id_from=333.999.0.0) \ No newline at end of file +> [3分钟读懂图计算](https://www.bilibili.com/video/BV15U4y1r7AW/) diff --git a/doc/zh-CN/source/2.introduction/1.what-is-graph.md b/doc/zh-CN/source/2.introduction/1.what-is-graph.md index 4389c93d17..e55d44155b 100644 --- a/doc/zh-CN/source/2.introduction/1.what-is-graph.md +++ b/doc/zh-CN/source/2.introduction/1.what-is-graph.md @@ -1,13 +1,13 @@ # 什么是图 -我们今天介绍的图,是图论中点边表示的图(Graph),而不是图像的图(Image)。 +我们今天介绍的图,是图论中使用点和边表示的图(Graph),而非图像的图(Image)。 -![alt what is graph](../../images/what-is-graph.png) +![alt what is graph](../../../images/what-is-graph.png) -图的基本元素是点和边,点就是表示这个事物,表示这个实体,而边就表示他们之间有一定的关系。 +图的基本元素是点和边,其中点表示事物或实体,边表示点之间的关系。 -我们看到上边这张图的左侧,它的点有公司,有员工,还有项目。它们的边是什么呢?公司和员工之间是雇佣关系,员工和员工之间可以有好友关系,项目和员工之间也可以有参与关系。也就是说我们可以用图的方式来把事物和它们的关系抽象出来。 +如上图左侧所示,点表示的有公司、员工、项目。边表示的是他们之间的关系,包括:公司和员工之间是雇佣关系,员工和员工之间有好友关系,项目和员工之间有参与关系。也就是说,我们可以用图的方式来抽象表示事物和它们的关系。 -上边这张图的右侧是一个金融交易示意。我们每个人都有银行账号,我们的银行账号做一笔消费或者做一笔转账的时候,这个账号就是图上的点,而这个边呢,可以表示我们之间有这样一种转账关系。 +上图右侧是一个金融交易示意图。我们每个人都有银行账号,当我们用银行账号做消费或转账时,账号就是图中的点,而边则表示不同账号之间的转账关系。 -从这个例子我们也可以看到,边可以附着信息,点也可以附着信息。点上可以附着这个账号在哪个银行,账号是什么。边上可以附着交易的金额,很多时候,如果你的交易金额很大,表示需要特别的关注。这个边上可能不一定是某一次转账的金额,可能是一段时间内累计的金额等等。图其实可以有非常丰富的表达能力。另外,像金融场景下的图,它的规模可能会非常的大。可能会有超过 10 亿个点,有千亿甚至万亿边这样一个巨大的图。可以想象,要真正处理这些图数据,其实还是很有挑战的。 +从这个例子我们还可以看出,边和点都可以附加信息。点可以附加账号所在银行和账号信息。边可以附加交易金额。很多时候,如果交易金额很大,就需要特别关注。边上的信息不一定是某一次转账的金额,也可以是一段时间内的累计金额。因此,图有非常丰富的表达能力。另外,像金融场景中图,其规模可能非常大——超过十亿个点、千亿甚至万亿条边。处理这些图数据,需要应对巨大的挑战。 diff --git a/doc/zh-CN/source/2.introduction/2.what-is-gdbms.md b/doc/zh-CN/source/2.introduction/2.what-is-gdbms.md index 99cc7604aa..eeb4dfd11f 100644 --- a/doc/zh-CN/source/2.introduction/2.what-is-gdbms.md +++ b/doc/zh-CN/source/2.introduction/2.what-is-gdbms.md @@ -1,34 +1,34 @@ # 什么是图数据库 -此文档主要介绍了什么是图数据库,图数据库对比关系型数据库的优势,以及图数据库与关系型数据库对比 +> 本文主要介绍什么是图数据库,图数据库相比于关系型数据库的优势,以及两者特点的对比。 -## 1.图数据库介绍 +## 1. 图数据库介绍 -图数据库是基于图模型的数据库。相比较于关系型数据库,图数据库是真正注重“关系”的数据库。图数据库的主要职能是管理图数据,因此需要支持高效的对点/边的查询与更新;为了方便用户的使用,通常还需要增加对事务(transaction)的支持,从而保证并发操作下的正常运作。 +图数据库是基于图模型的数据库。与关系型数据库相比,图数据库真正注重“关系”。图数据库的主要功能是管理图数据,因此需要支持高效的点、边查询和更新;为方便用户使用,通常还需要增加对事务(transaction)的支持,以确保并发操作下的正常运行。 -## 2.图数据库相比较于关系型数据库的优势 +## 2. 图数据库相比较于关系型数据库的优势 -图数据库的功能是传统关系型数据库的一个拓展,相比较关系型数据库仅支持表结构,图数据支持的图结构更为灵活。图数据库在基于图的数据增加、删除、查询、修改等方面做了不同于其他数据库的设计。在图数据的操作抽象上,采用基于点的视角,比如点通过其所有出边访问其邻接点,这一类的操作也是图数据库系统设计的核心。 +图数据库的功能是传统关系型数据库的扩展。与关系型数据库仅支持的“表结构”相比,图数据库所支持的“图结构”更为灵活。图数据库在基于图的增加、删除、查询和修改方面采用不同于其他数据库的设计。在图数据操作抽象上,采用基于点的视角,例如点通过其所有“出边”(从一个点出发,连接到其他点的边)访问其邻接点。这是图数据库系统设计的核心。 -图数据库的独特性可以体现为以下三个方面: +图数据库的独特性体现在以下三个方面: -### 2.1.性能 +### 2.1. 性能 -在关联关系的处理上,用关系型数据库处理不可避免要用到表的 JOIN 操作,对性能的影响较大;而图数据库则是类指针直接跳转访问,更高效的操作关联数据,比关系型数据库有 2 到 4 个数量级的性能提升。 +在关联关系处理上,使用关系型数据库不可避免地要使用表的JOIN操作,这会对性能产生较大影响;而图数据库则直接跳转访问类指针,操作关联数据的效率更高,比关系型数据库提高2到4个数量级的性能。 -### 2.2.兼容性 +### 2.2. 兼容性 -现实中,项目的进程往往是不断演进的。数据的内容甚至数据格式也会不断发生变化。在关系型数据库中,这意味着表结构的变化,或者多个新表的建立,对源数据的改动非常大。而在图数据库里,仅需添加新的点、边、属性,设置为对应的类型即可。从本质上说,一个表代表一个类型的数据,一个点代表一个特定的数据,意味着关系数据库更关注数据的类型,而图数据库更关注数据的个体,识别其关联关系。 +现实中,项目进程通常不断演变,数据的内容甚至数据格式也在不断变化。在关系型数据库中,这意味着表结构的变化或建立多个新表,对源数据的修改非常大。而在图数据库中,仅需添加新的点、边和属性,并将其设置为对应的类型即可。从本质上说,一个表代表一种类型的数据,一个点代表一个特定的数据。这意味着关系型数据库更关注数据类型,而图数据库更关注数据个体及其关联关系。 -### 2.3.直观性 +### 2.3. 直观性 -使用图的方式来表达现实世界的关系更加直接、自然,在万物互联的物联网时代尤为突出。如果采用关系型数据,先将人物建表,再将关系建表,最后将数据进行映射,需要高度的抽象思维。在图数据上进行分析查询时,也可以直观地通过点边连接的拓扑,交互式找到想要的数据,不需要具备任何的专业知识。 +使用图的方式表达现实世界的关系更直接和自然,在万物互联的时代尤为突出。如果使用关系型数据,先建立实体表,再建立关系表,最后映射数据,需要高度的抽象思维。在图数据上进行分析查询时,可以直观地通过点边连接的拓扑结构找到所需数据,无需任何专业知识。 -## 3.图数据库与关系型数据库对比 +## 3. 图数据库与关系型数据库对比 | 分类 | 模型 | 优势 | 劣势 | 举例 | | ------------ | ------ | -------------------------------------- | ---------------------------------------- | -------------- | | 关系型数据库 | 表结构 | 数据高度结构化,一致性强,软件成熟度高 | 面向多跳的关联关系查询低效或不支持 | MySQL、Oracle | -| 图数据库 | 图结构 | 针对关联关系的建模、操作非常高效 | 高度结构化的数据处理能力不及关系型数据库 | Neo4j、TuGraph | +| 图数据库 | 图结构 | 针对关联关系的建模建模和操作效率非常高 | 高度结构化的数据处理能力不及关系型数据库 | Neo4j、TuGraph | -总而言之,面对海量数据的存储和处理问题,传统的关系数据库已经无法满足大部分的日常数据储存的需求。图数据库技术可以将关系信息储存为实体、灵活拓展数据模型。由于提供了对关联数据最直接的表达,以及图模型对异构数据天然的包容力。未来,图数据库技术必将成为最为热点的技术之一,为企业存储和分析大规模图数据提供强有力的支持。 +总之,面对海量数据的存储和处理问题,传统的关系数据库已经无法满足大部分的日常数据存储需求。图数据库技术可以将关系信息存储为实体,灵活拓展数据模型。由于提供了对关联数据最直接的表达方式和图模型对异构数据的天然包容性,图数据库技术必将成为未来最热点的技术之一,为企业提供存储和分析大规模图数据的有力支持。 \ No newline at end of file diff --git a/doc/zh-CN/source/2.introduction/3.what-is-tugraph.md b/doc/zh-CN/source/2.introduction/3.what-is-tugraph.md index bf584a2998..329faca87d 100644 --- a/doc/zh-CN/source/2.introduction/3.what-is-tugraph.md +++ b/doc/zh-CN/source/2.introduction/3.what-is-tugraph.md @@ -1,83 +1,86 @@ # 什么是TuGraph -> 此文档主要介绍 TuGraph 社区版的主要功能、特性,以及 TuGraph 的企业版和社区版差异。 +> 本文主要介绍TuGraph社区版的主要功能和特性,以及TuGraph企业版和社区版的差异。 -## 1.简介 +## 1. 简介 -图数据库是按点和边存储数据的非关系型数据库,可用于存储复杂的数据网络模型,如社交网络和事务网络等。TuGraph 是由蚂蚁集团开发的图数据库,本手册介绍了 TuGraph 的功能及使用方法。 +TuGraph图数据库由蚂蚁集团与清华大学联合研发,构建了一套包含图存储、图计算、图学习、图研发平台的完善的图技术体系,拥有业界领先规模的图集群,解决了图数据分析面临的大数据量、高吞吐率和低延迟等重大挑战,是蚂蚁集团金融风控能力的重要基础设施,显著提升了欺诈洗钱等金融风险的实时识别能力和审理分析效率,并面向金融、工业、政务服务等行业客户。 -## 2.TuGraph 社区版 +## 2. TuGraph社区版 -社区版是 TuGraph 的全部基本功能版本,适用于单实例部署。它提供了完备的图数据库基础基础功能,例如 ACID 兼容的事务,编程 API,配套的相关工具等。它是学习 TuGraph 和实现小型项目的理想选择。 +2022年9月,TuGraph单机版开源,提供了完备的图数据库基础功能和成熟的产品设计,支持TB级别的数据规模,为用户管理和分析复杂关联数据提供了高效、易用、可靠的平台。 -## 3.TuGraph 特性 +TuGraph社区版于2022年9月开源,提供了完整的图数据库基础功能和成熟的产品设计(如ACID兼容的事务、编程API和配套工具等),适用于单实例部署。社区版支持TB级别的数据规模,为用户管理和分析复杂关联数据提供了高效、易用、可靠的平台,是学习TuGraph和实现小型项目的理想选择。 -TuGraph 是支持大数据容量、低延迟查找和快速图分析功能的高效图数据库。同时 TuGraph 也是基于磁盘的数据库,支持存储多达数十 TB 的数据。TuGraph 具有多种 API,使用户能够轻松构建应用程序,同时保持其应用程序的可优化性。 +## 3. TuGraph特性 -它有如下功能特征: +TuGraph是支持大数据量、低延迟查找和快速图分析功能的高效图数据库。TuGraph也是基于磁盘的数据库,支持存储多达数十TB的数据。TuGraph提供多种API,使用户能够轻松构建应用程序,并使其易于扩展和优化。 -- 属性图模型,支持多图 -- 完善的 ACID 事务处理,隔离级别为可串行化(serializable) -- HTAP,支持图查询、图分析、图学习 -- OpenCypher / ISO GQL (2023.9) 图查询语言 -- 支持 OLAP API,内置 34 种图分析算法 -- 基于 C++/Python 的存储过程,含事务内并行化的 Traversal API +它具有如下功能特征: + +- 属性图模型 +- 实时增删查改 +- 多重图(点间允许多重边) +- 多图(大图与多个子图) +- 完善的ACID事务处理,隔离级别为可串行化(serializable) +- 点边索引、全文索引 +- 混合事务和分析处理(HTAP),支持图查询、图分析、图学习 +- 主流图查询语言(OpenCypher、ISO GQL等) +- 支持OLAP API,内置30多种图分析算法 +- 基于C++/Python的存储过程,含事务内并行Traversal API - 提供图可视化工具 -性能和可扩展性: +在性能和可扩展性方面的支持: -- TB 级大容量 - 千万点/秒的高吞吐率 -- 高可用性支持(企业版) +- TB级大容量 +- 高可用性支持 - 高性能批量导入 -- 在线/离线备份 - -## 4.数据模型 +- 在线/离线的备份恢复 -### 4.1.图模型 +## 4. 数据模型 -TuGraph 是一个具备多图能力的强模式属性图数据库。其支持最多一万亿点的有向图构建。 +### 4.1. 图模型 -- 多图:在 TuGraph 中,每个数据库服务器可以承载多个图模型,每个图模型可以有自己的访问控制配置,数据库管理员可以创建或删除指定图模型。 -- 属性图:TuGraph 中的点和边可以具有与其关联的属性,每个属性可以有不同的类型。 -- 强模式:每个点和边必须有一个标签,且创建标签后,属性数量及类型较难被修改。 -- 有向边:TuGraph 中的边为有向边,若要模拟无向边,用户可以创建两个方向相反的边。 +TuGraph是一个具备多图能力的强模式属性图数据库,支持最多一万亿点的有向图构建。 -### 4.2.数据类型 +- 多图:每个数据库服务器可以承载多个图模型,每个图模型可以有自己的访问控制配置,数据库管理员可以创建或删除指定图模型。 +- 属性图:点和边可以具有与其关联的属性,每个属性可以有不同的类型。 +- 强模式:每个点和边必须有一个标签,创建标签后,属性数量及类型较难被修改。 +- 有向边:边为有向边。若要模拟无向边,用户可以创建两个方向相反的边。 -TuGraph 支持多种可用作属性的数据类型,具体支持的数据类型如下所示: +### 4.2. 数据类型 -表 1. TuGraph 所支持的数据类型 +TuGraph支持多种可用于属性的数据类型。具体支持的数据类型如下: | **数据类型** | **最小值** | **最大值** | **描述** | | ------------ | ------------------- | ------------------- | ----------------------------------- | | BOOL | false | true | 布尔值 | -| INT8 | -128 | 127 | 8-bit 整型 | -| INT16 | -32768 | 32767 | 16-bit 整型 | -| INT32 | - 2^31 | 2^31 - 1 | 32-bit 整型 | -| INT64 | - 2^63 | 2^63 - 1 | 64-bit 整型 | +| INT8 | -128 | 127 | 8位整型 | +| INT16 | -32768 | 32767 | 16位整型 | +| INT32 | - 2^31 | 2^31 - 1 | 32位整型 | +| INT64 | - 2^63 | 2^63 - 1 | 64位整型 | | DATE | 0000-00-00 | 9999-12-31 | "YYYY-MM-DD" 格式的日期 | -| DATETIME | 0000-00-00 00:00:00 | 9999-12-31 23:59:59 | "YYYY-MM-DD hh:mm:ss"格式的时间日期 | -| FLOAT | | | 32-bit 浮点数 | -| DOUBLE | | | 64-bit 浮点数 | -| STRING | | | 长度不定的字符串 | -| BLOB | | | 二进制数据 | +| DATETIME | 0000-00-00 00:00:00 | 9999-12-31 23:59:59 | "YYYY-MM-DD HH:mm:ss" 格式的日期时间 | +| FLOAT | | | 32位浮点数 | +| DOUBLE | | | 64位浮点数 | +| STRING | | | 不定长度的字符串 | +| BLOB | | | 二进制数据(在输入输出时使用Base64编码) | + +### 4.3. 索引 + +TuGraph支持对点的字段进行索引。索引可以是唯一或非唯一索引。如果为点标签创建了唯一索引,在修改该标签的点时,会先执行数据完整性检查,以确保该索引的唯一性。 -_BLOB 类型的数据在输入输出时使用 BASE64 编码_ +每个索引都基于一个标签的一个字段构建。可以使用同一标签对多个字段进行索引。 -### 4.3.索引 +BLOB类型的字段不能建立索引。 -TuGraph 支持对点字段进行索引。 -索引可以是唯一索引或非唯一索引。如果为点标签创建了唯一索引,则 TuGraph 将在修改该标签的点时会先执行数据完整性检查,以确保该索引的唯一性。 -每个索引都基于一个标签的一个字段构建,可以使用同一标签对多个字段进行索引。 -BLOB 类型的字段不能建立索引。 +## 5. TuGraph企业版 -## 5.TuGraph 企业版 +企业版对商业化功能支持更加完善,包括分布式集群架构,覆盖探索、研发、服务、运维管理全生命周期的一站式图平台,在线、近线、离线的图计算引擎,支持流式、大数据类数据源,多地多中心的部署形态,以及专家支持服务等。企业版是商业化解决方案的理想选择。 -企业版本对商业化功能支持更加完善,包括分布式集群架构,覆盖探索、研发、服务、运维全生命周期的一站式图平台,在线、近线、离线的图计算引擎,支持流式、大数据类数据源,多地多中心的部署形态等,是商业化解决方案的理想选择。 +如需商业支持,请联系我们: -```txt - 如需实现生产级高可用集群架构、运维等企业级服务,请联系我们获得商业支持: - 咨询邮箱: tugraph@service.alipay.com - 咨询电话: 0571-85022088,转分机号 83789993# -``` \ No newline at end of file +- 电话:400-903-0809 +- 邮件:tugraph@service.alipay.com +- 官网:https://tugraph.antgroup.com \ No newline at end of file diff --git a/doc/zh-CN/source/2.introduction/4.characteristics/2.multi-level-Interfaces.md b/doc/zh-CN/source/2.introduction/4.characteristics/2.multi-level-Interfaces.md index dcbf58d421..0e4b70768c 100644 --- a/doc/zh-CN/source/2.introduction/4.characteristics/2.multi-level-Interfaces.md +++ b/doc/zh-CN/source/2.introduction/4.characteristics/2.multi-level-Interfaces.md @@ -11,7 +11,7 @@ 服务端接口均处在计算层,和图数据存储间用一层 Core API 在逻辑上隔开。 -![多层级接口架构](../../../images/multi-level-Interfaces.png) +![多层级接口架构](../../../../images/multi-level-Interfaces.png) ### 1.1.客户端接口 @@ -31,4 +31,4 @@ > __图神经网络编程框架__ 主要提供了图神经网络应用编程所需要的接口,能够对接PyTorch 等机器学习框架。TuGraph 的图神经网络编程框架主要集成了 DGL,在 Python 的语言环境中完成从图存储到图神经网络应用的完整流程。 -除了 Cypher 是解释执行外,其余服务端接口都是编译执行,即需要将对应代码传到服务端后,进行编译(可能会有时间开销),再在服务端执行。所以通常需要先加载,然后再已加载的应用列表中找到程序,传输入参数后执行 \ No newline at end of file +除了 Cypher 是解释执行外,其余服务端接口都是编译执行,即需要将对应代码传到服务端后,进行编译(可能会有时间开销),再在服务端执行。所以通常需要先加载,然后再已加载的应用列表中找到程序,传输入参数后执行 diff --git a/doc/zh-CN/source/2.introduction/4.characteristics/3.htap.md b/doc/zh-CN/source/2.introduction/4.characteristics/3.htap.md index a3d6e54aa7..16eff8e94f 100644 --- a/doc/zh-CN/source/2.introduction/4.characteristics/3.htap.md +++ b/doc/zh-CN/source/2.introduction/4.characteristics/3.htap.md @@ -4,7 +4,7 @@ ## 1.简介 -![htap架构](../../../images/htap.png) +![htap架构](../../../../images/htap.png) HTAP 的实现在架构上有多种不同的方式:一是用两个不同的副本来分别处理 OLTP 和 OLAP 的任务,核心是数据的一致性同步和额外的资源开销;二是在任何时候都使用同一份数据存储,该实现的数据结构存在内存膨胀,在工业化落地还需要进一步工作。在 TuGraph 的设计中,简单的 OLAP 操作和 OLTP 操作共用一份数据,而复杂的 OLAP 操作则单独导出快照处理。 @@ -33,4 +33,4 @@ OLAP API 的快照可以从外部存储创建,即将边表数据构成件 CSR - Embed 模式,和 Plugin 模式的使用接口一致,区别是图数据库服务不需要起来,就可以直接用接口调用数据库中的数据,通常用于调试 Procedure API 和OLAP API 的代码,调试信息和操作步骤比 Plugin 模式更加友好。 - Standalone 模式,最大程度剥离与图数据库的关系,仅想用图分析引擎做数据分析时,该模式会比较直接。Standalone 模式会直接使用外部存储的数据。 -图神经网络引擎的使用方式和 ‘复杂图分析操作’ 类似,会同时调用部分 OLAP API 和 GNN API,不在这里展开。 \ No newline at end of file +图神经网络引擎的使用方式和 ‘复杂图分析操作’ 类似,会同时调用部分 OLAP API 和 GNN API,不在这里展开。 diff --git a/doc/zh-CN/source/2.introduction/5.architecture.md b/doc/zh-CN/source/2.introduction/5.architecture.md index ac749e8d7c..cf901d31cb 100644 --- a/doc/zh-CN/source/2.introduction/5.architecture.md +++ b/doc/zh-CN/source/2.introduction/5.architecture.md @@ -1,4 +1,4 @@ -# 产品架构 +# TuGraph产品架构 > 此文档主要介绍 TuGraph 的产品架构。 @@ -12,4 +12,4 @@ - 存储层,包括 KV 存储层和图存储层。存储层需要支持计算层所需的各个功能。 - 计算层。计算层应包括图事务引擎、图分析引擎和图神经网络引擎,也包含了服务端提供的多种编程接口,包括描述式查询语言 Cypher,存储过程等。 - 客户端。客户端 SDK 应支持 Java、Python、C++ 等多种语言,也支持命令行的交互方式。Browser 和 Explorer 通过网页端交互的方式,降低了图数据库的使用门槛。 -- 在生态工具方面,覆盖了企业级图数据库的开发、运维、管理等链路,提升可用性。 \ No newline at end of file +- 在生态工具方面,覆盖了企业级图数据库的开发、运维、管理等链路,提升可用性。 diff --git a/doc/zh-CN/source/2.introduction/6.functionality.md b/doc/zh-CN/source/2.introduction/6.functionality.md index 0ed06033e9..05f7ede0bd 100644 --- a/doc/zh-CN/source/2.introduction/6.functionality.md +++ b/doc/zh-CN/source/2.introduction/6.functionality.md @@ -40,7 +40,7 @@ TuGraph测试过基于X86和ARM的CPU,包括Intel、AMD、Kunpeng、Hygon、 ### 4.1.查询语言 -TuGraph 提供 cypher 图查询语言,遵循OpenCypher标准。 +TuGraph 提供 Cypher 图查询语言,遵循OpenCypher标准。 - __支持Procedure嵌入__ - __可插拔优化框架__ 各类优化功能 @@ -49,7 +49,17 @@ TuGraph 提供 cypher 图查询语言,遵循OpenCypher标准。 ### 4.2.存储过程 -当用户需要表达的查询/更新逻辑较为复杂(例如 Cypher 无法描述,或是对性能要求较高)时,相比调用多个 REST 请求并在客户端完成整个处理流程的方式,TuGraph 提供的存储过程(Procedure)是更简洁和高效的选择。 +当用户需要表达的查询/更新逻辑较为复杂(例如 Cypher 无法描述,或是对性能要求较高)时,相比调用多个 REST 请求并在客户端完成整个 +处理流程的方式,TuGraph 提供的存储过程(Procedure)是更简洁和高效的选择。 + +从 3.5 版本开始,TuGraph 重新设计了新的存储过程编程范式,支持定义标准的签名和结果,支持POG编程。 + +TuGraph 支持 POG (Procedres on Graph Query Languages) 编程和 POG 库,其中“Graph Query Languages”包含 Cypher 以及 +制定中的 ISO GQL 等图查询语言。POG 库提供在查询语言中对用户定义的存储过程的访问,打破了查询语言和存储过程之间的界限,扩展了查询 +语言的使用范围。 + +> 这个文档描述了 [新的 Procedure 编程范式以及 POG](../5.developer-manual/6.interface/3.procedure/1.procedure.md)。 +> 推荐使用新的 procedure 编程范式,遗留的 procedure 编程范式参考 [Legacy Procedure](../5.developer-manual/6.interface/3.procedure/2.legacy.md)。 ### 4.3.数据导入导出 @@ -86,7 +96,7 @@ OGM(Object Graph Mapping)为面向 TuGraph 的图对象映射工具,支持将 ### 6.1.TuGraph DataX -![导入导出](../../images/tugraph-datax.png) +![导入导出](../../../images/tugraph-datax.png) TuGraph 核心支持 CSV 和 JSON 合适的导入导出,提供空库导入和增量导入的模式。实际中会存在 MySQL、Kafka、Hive 等多数据源导入的需求,TuGraph 通过 DataX 做多数据源的对接。由于关系模型和图模型存在的差异,数据清洗的流程可以使用 SparkSQL 快速处理,TuGraph 本身仅关注 CSV 和 JSON 的简单场景导入可靠性和性能。 diff --git a/doc/zh-CN/source/2.introduction/7.scenarios.md b/doc/zh-CN/source/2.introduction/7.scenarios.md index 6d6e6252a3..4cc5c0c10a 100644 --- a/doc/zh-CN/source/2.introduction/7.scenarios.md +++ b/doc/zh-CN/source/2.introduction/7.scenarios.md @@ -2,9 +2,9 @@ > 此文档主要介绍图数据库适用的应用场景。 -## 1.金融领域 +## 1. 金融领域 -金融领域的实体主要涉及人、公司、账户、产品等,它们之间的关系包括交易关系、登录关系、股权关系、雇佣关系等。这些实体就构成了一张金融图数据网络。应用图数据库,我们可以从金融图数据网络里面发掘出大量有用信息,帮助我们做出更准确的金融决策。 +金融领域的实体主要涉及人、公司、账户、产品等,它们之间的关系包括交易关系、登录关系、股权关系、雇佣关系等。这些实体构成了一张金融图数据网络。应用图数据库,我们可以从金融图数据网络里发掘出大量有用信息,帮助我们做出更准确的金融决策。 | **场景** | **描述** | |-----------------| -----------------------| @@ -16,46 +16,46 @@ |反洗钱|通过交易网络和介质网络,找出疑似洗钱的行为和链路。洗钱是一个复杂的多方参与的过程,通过在交易和社交网络中进行图分析,我们可以更精准的检测出洗钱行为。| |车险反欺诈|针对有修理厂参与的骗保行为,通过分析被保人、案件地点和修理厂之间的关系,可以更精准的识别出骗保行为,减少经济损失。| -## 2.工业领域 +## 2. 工业领域 -在生产和制造业过程中会产生大量异构数据,如何有效的组织和管理这些数据是工业大数据中最重要的问题之一。这些数据包括设计文档、设备数据、仿真方案和结果、实验结果、经验文档等等。这些数据之间关系错综复杂,传统的数据管理系统只能累积数据,而需要查找相关材料时则往往力不从心。使用图模型,将这些不同类型的数据组织成一张网络,就可以方便的浏览和查找数据。 +在生产和制造过程中会产生大量异构数据,如何有效的组织和管理这些数据是工业大数据中最重要的问题之一。这些数据包括设计文档、设备数据、仿真方案和结果、实验结果、经验文档等,关系错综复杂。传统的数据管理系统只能累积数据,而查找相关材料则往往力不从心。使用图模型,将这些不同类型的数据组织成一张网络,就可以方便地浏览和查找数据。 | **场景** | **描述** | |-----------------| -----------------------| -|供应链管理|供应链数据主要关心产品--部件--零件的对应关系,零件与供应商的对应关系,零件中的敏感成分。相比于传统的BOM 系统,使用图数据库的方案可以更方便的维护多个部件层次,多个供应商级别的复杂网络,从而为穿透式供应链提供基础支持。| -|文档管理|使用图数据库可以将不同类型的文档按不同的关系有机的组织在一起。例如将部件设计文档,部件--零件关系,部件测试文档,相关经验文档等组织起来,在需要查找时就可以方便的获取该部件的所有相关信息。| -|研发过程管理|产品研发和验证过程中需要进行大量仿真,试验和测试。每一个测试流程都会涉及大量不同的步骤,步骤之间的连接关系,每个步骤中使用的数据版本,算法版本等等就构成了一张复杂的关系网络。使用图数据库可以更好的管理这个关系网络,从而为研发过程中的数据复用,流程改进提供良好基础。| -|设备信息管理|制造业需要管理大量设备,设备之间又互相关联(供电关系,供料关系,空间关系),从而形成了一张复杂的网络。传统的数据库很难体现这种复杂关系。而使用图数据 库则可以很方便的表示这些关系,从而更好的管理设备信息。| +|供应链管理|供应链数据主要关心产品—部件—零件的对应关系、零件与供应商的对应关系、零件中的敏感成分等。相比于传统的物料管理(BOM)系统,使用图数据库的方案可以更方便地维护多个部件层次、多个供应商级别的复杂网络,从而为穿透式供应链提供基础支持。| +|文档管理|使用图数据库可以将不同类型的文档按不同关系有机地组织在一起。例如将部件设计文档、部件—零件关系、部件测试文档、相关经验文档等组织起来,在需要查找时就可以方便获取该部件的所有相关信息。| +|研发过程管理|产品研发和验证过程中需要进行大量仿真、试验和测试,每一个测试流程都会涉及大量不同的步骤。步骤之间的连接关系、每个步骤中使用的数据版本、算法版本等就构成了一张复杂的关系网络。使用图数据库可以更好管理这个关系网络,从而为研发过程中的数据复用、流程改进提供良好基础。| +|设备信息管理|制造业需要管理大量设备,设备之间又互相关联(供电关系、供料关系、空间关系),从而形成了一张复杂的网络。传统的数据库很难体现这种复杂关系。而使用图数据库则可以便捷表示这些关系,从而更好的管理设备信息。| -## 3.智慧城市 +## 3. 智慧城市 -随着科技的发展,城市的智能化管理已成为一个大趋势。智能化 管理需要建立在良好的信息管理平台之上,因此需要强大的系统软件做支撑。在智能化城市管理系统中,智能化决策系统需要基于大量 不同信息做出决策,这些信息包括各种拓扑信息(道路,管线等),供求信息(电力输送,饮用水供应,污水排放等),环境信息(温度,湿度,雨量等)等等。要将这些复杂的 异构数据有机的管理起来,并基于它们做出决策,就需要一个成熟的系统。传统的数据管理系统基于关系数据模型,并不适合管理这种复杂异构数据。而使用图模型就可以很好的解决这一问题。如果我们将这些不同的数据利用图数据库进行管理,就可以实现很多复杂的智能管理场景。 +随着科技的发展,城市的智能化管理已成为一个大趋势。智能化管理需要建立在良好的信息管理平台之上,因此需要强大的系统软件做支撑。在智能化城市管理系统中,智能化决策系统需要基于大量不同信息做出决策,这些信息包括各种拓扑信息(道路、管线),供求信息(电力输送、饮用水供应、污水排放),环境信息(温度、湿度、雨量)等。要将这些复杂的异构数据有机管理起来,并基于它们做出决策,就需要一个成熟的系统。传统的数据管理系统基于关系数据模型,并不适合管理这种复杂异构数据。而使用图模型就可以很好的解决这一问题。如果我们将这些不同的数据利用图数据库进行管理,就可以实现很多复杂的智能管理场景。 | **场景** | **描述** | |-----------------| -----------------------| -|智能交通|基于道路拓扑,道路容量及当前流量,可以进行智能信号灯调度,从而提高通行效率。| +|智能交通|基于道路拓扑、道路容量及当前流量,可以进行智能信号灯调度,从而提高通行效率。| |智能排水|基于排水系统信息及当前雨量,可以对排水系统进行调度,从而减少内涝的产生。| -|管线管理|将管线的生产、安装、拓扑信息、以及历史状态信息有机组织起来,可以帮助我们对管线进行全周期管理,包括故障排查,寿命评估等。| -|人群疏散|大量人群需要疏散时,需要考虑公交、地铁、的士、共享单车等多种交通方式,同时还需要考虑道路承载量。使用图数据库将这些信息有机整合在一起,可以帮助我 们更好的做出决策,以便为大型公共活动提供更好的支持。| +|管线管理|将管线的生产、安装、拓扑信息,以及历史状态信息有机组织起来,可以帮助我们对管线进行全周期管理,包括故障排查、寿命评估等。| +|人群疏散|大量人群需要疏散时,需要考虑公交、地铁、出租车、共享单车等多种交通方式,同时还需要考虑道路承载量。使用图数据库将这些信息有机整合在一起,可以帮助我们更好的做出决策,以便为大型公共活动提供更好的支持。| -## 4.社会治理 +## 4. 社会治理 -社会治理包括公共安全、法律事务、舆论、网络安全等多方面。社会治理是一个综合性的,多系统联动问题。它需要综合大量数据,全局考量才能做出更好的决策。在这种多维度复杂数据问题上,图数据模型可以提供更好的适应性,从而为智能化的社会治理决策平台提供坚实的基础。 +社会治理包括公共安全、法律事务、舆论、网络安全等多方面。社会治理是一个综合性的、多系统联动问题。它需要综合大量数据、全局考量才能做出更好的决策。在这种多维度复杂数据问题上,图数据模型可以提供更好的适应性,从而为智能化的社会治理决策平台提供坚实的基础。 | **场景** | **描述** | |-----------------| -----------------------| |犯罪团伙发现|合谋团伙必然会通过某些方式产生联系,这种联系包括面谈(出现在同一地点)、电话联系、或者互联网联系,他们还可能有经济往来。如果我们将这些数据统一存放在一张图中,我们就可以通过图分析算法查找出联系紧密的群体,从而发现和识别整个犯罪团伙。| -|涉众案件调查|涉众案件,特别是涉众经济案件往往涉及大量的人员和要素(货币,地点,事件等)。如何有效的组织这些资料,从而为办案提供证据支持是涉众案件调查的一个难点。使用图数据库来存储和分析这些资料,可以让我们快速定位资料,分析人员构成,为案件调查提供更好的技术支持。| -|违法网站甄别|违法网站、钓鱼网站、黄色网站等往往通过使用不同的域名和IP来避免被封杀。基于黑名单的过滤方法只能封禁已知的违法网站,无法对新出现的域名和IP进行有效甄别。基于IP-域名网络的映射关系,我们可以建立一张图,然后通过图计算建立起域名和IP的“可信度”模型,利用该模型来判断网站是否属于违法网站。| -|法院卷宗管理|卷宗往往错综复杂,不同的案件之间可能通过当事人产生联系,也可能通过案发地,案件性质,审判人员等产生联系。这些联系构成了一张复杂的网络。使用图数据库我们可以更方便的管理这些复杂关系,提高办案和查询效率。| +|涉众案件调查|涉众案件,特别是涉众经济案件往往涉及大量的人员和要素(货币、地点、事件等)。如何有效的组织这些资料,从而为办案提供证据支持是涉众案件调查的一个难点。使用图数据库来存储和分析这些资料,可以让我们快速定位资料、分析人员构成、为案件调查提供更好的技术支持。| +|违法网站甄别|违法网站、钓鱼网站、黄色网站等往往通过使用不同的域名和IP来避免被封杀。基于黑名单的过滤方法只能封禁已知的违法网站,无法对新出现的域名和IP进行有效甄别。基于IP—域名网络的映射关系,我们可以建立一张图,然后通过图计算建立起域名和IP的“可信度”模型,利用该模型来判断网站是否属于违法网站。| +|法院卷宗管理|卷宗往往错综复杂,不同的案件之间可能通过当事人产生联系,也可能通过案发地、案件性质、审判人员等产生联系。这些联系构成了一张复杂的网络。使用图数据库我们可以更方便的管理这些复杂关系,提高办案和查询效率。| -## 5.互联网 +## 5. 互联网 -社交网络,人-商品购买关系都能构成一张网络。通过分析这些网络数据,我们可以为用户提供更优质的服务,包括相关推荐,用户信息归集,重要用户识别,垃圾用户识别等等。 +人—人关系的社交网络、人—商品的购买关系都能构成图。通过分析这些网络数据,我们可以为用户提供更优质的服务,包括相关推荐、用户信息归集、重要用户识别、垃圾用户识别等。 | **场景** | **描述** | |-----------------| -----------------------| -|ID-Mapping|图数据库可以将用户相关的所有信息,包括用户之间的关系统一存储在一个数据库中,同时还能通过这些关系来找出疑似单人多号和多人一号的情况,从而为后期的风控、推荐等业务提供决策支持。| +|ID映射|图数据库可以将用户相关的所有信息,包括用户之间的关系统一存储在一个数据库中,同时还能通过这些关系来找出疑似单人多号和多人一号的情况,从而为后期的风控、推荐等业务提供决策支持。| |好友推荐|基于分析社交网络,我们可以提供“好友的好友”,“共同好友”等好友推荐。| -|商品推荐|基于用户-商品关系图,我们可以找出兴趣爱好类似的用户,向他们推荐类似用户选择的其他商品。| -|垃圾用户识别|传统的垃圾用户识别主要基于用户账号本身的信息,如期注册信息,发帖信息等,但是这些信息都比较容易伪造。而基于网络的信息则不存在这个问题:它们很难被伪造。因此基于网络信息的垃圾用户识别可以更加精准和高效。| \ No newline at end of file +|商品推荐|基于用户—商品关系图,我们可以找出兴趣爱好类似的用户,向他们推荐类似用户选择的其他商品。| +|垃圾用户识别|传统的垃圾用户识别主要基于用户账号本身的信息,如注册信息、发帖信息等,但是这些信息都比较容易伪造。而基于网络的信息则不存在这个问题:它们很难被伪造。因此基于网络信息的垃圾用户识别可以更加精准和高效。| \ No newline at end of file diff --git a/doc/zh-CN/source/3.quick-start/2.demo/1.movie.md b/doc/zh-CN/source/3.quick-start/2.demo/1.movie.md index c37d97c488..d8caa2a534 100644 --- a/doc/zh-CN/source/3.quick-start/2.demo/1.movie.md +++ b/doc/zh-CN/source/3.quick-start/2.demo/1.movie.md @@ -1,10 +1,10 @@ -# 场景:影视 +# 影视场景Demo -> 此文档主要介绍 影视 demo的使用方法。 +> 此文档主要介绍 影视场景Demo 的使用方法。 ## 1.建模和数据导入 -完成登录后,点击“`帮助`”,点击“`快速上手`”,点击“`一键创建模型`”,点击“`一键创建数据`”,完成数据的 Movie 场景图创建。 +完成登录后,点击`新建图项目`,选择movie数据,填写图项目配置,系统会自动完成Movie场景图项目创建。或者直接使用产品自带的movie图项目。 Movie 场景图: diff --git a/doc/zh-CN/source/3.quick-start/2.demo/2.wandering-earth.md b/doc/zh-CN/source/3.quick-start/2.demo/2.wandering-earth.md index dac9e1a349..77f120059a 100644 --- a/doc/zh-CN/source/3.quick-start/2.demo/2.wandering-earth.md +++ b/doc/zh-CN/source/3.quick-start/2.demo/2.wandering-earth.md @@ -23,10 +23,14 @@ Demo背景基于流浪地球1、流浪地球2的故事背景进行设计 ## 4.数据导入 -- 根据数据存放目录对应修改import.json里面的DATA_PATH -- 参考control.sh中的load函数,加载数据 -- 参考control.sh中的start函数,启动TuGraph服务 -- 启动TuGraph服务后,访问${HOST_IP}:7071,打开web页面,确认数据是否导入成功 +- 手动导入 + - 根据数据存放目录对应修改import.json里面的DATA_PATH。 + - 参考control.sh中的load函数,加载数据。 + - 参考control.sh中的start函数,启动TuGraph服务。 + - 启动TuGraph服务后,访问${HOST_IP}:7071,打开web页面,确认数据是否导入成功。 +- 自动创建 + - 点击`新建图项目`,选择流浪地球数据,填写图项目配置,系统会自动完成流浪地球场景图项目创建。 + - 或者直接使用产品自带的流浪地球图项目。 ## 5.Cypher查询 @@ -36,13 +40,23 @@ Demo背景基于流浪地球1、流浪地球2的故事背景进行设计 ### 6.1.数据导入的展示 -![数据导入展示](../../../images/wandering-earth-1.png) +![数据导入展示](../../../../images/wandering-earth-1.png) ### 6.2.查询展示 查询木星危机的所有事件经过 -![数据导入展示](../../../images/wandering-earth-2.png) +```cypher +MATCH (n)-[e:事件关系]-(m) where e.title='木星危机' RETURN n,e +``` + +![数据导入展示](../../../../images/wandering-earth-2.png) 查询所以危机的相关事件经过 -![数据导入展示](../../../images/wandering-earth-3.png) \ No newline at end of file +```cypher +MATCH (n)-[e1]-(m)-[e2]-(p) +where e1.title REGEXP ".*危机" and e2.title REGEXP ".*危机" and e1.title <> e2.title +RETURN n,e1,e2,p +``` + +![数据导入展示](../../../../images/wandering-earth-3.png) \ No newline at end of file diff --git a/doc/zh-CN/source/3.quick-start/2.demo/3.the-three-body.md b/doc/zh-CN/source/3.quick-start/2.demo/3.the-three-body.md index 2383660442..524d268e04 100644 --- a/doc/zh-CN/source/3.quick-start/2.demo/3.the-three-body.md +++ b/doc/zh-CN/source/3.quick-start/2.demo/3.the-three-body.md @@ -1,50 +1,89 @@ -## 关于 -这是一个tugraph的Demo,背景是刘慈欣老师的作品《三体》 +# 场景:三体 -关键词:tugraph demo、三体 +> 此文档主要介绍 三体 demo的使用方法。 -## Demo场景设计 +## 1.Demo场景设计 Demo背景基于三体1、三体2、三体3的故事背景进行设计 根据三体故事的设定,我们设计了4类点和6类边,点包括“人物”、“组织”、“计划”、“时间线”,边包括“人物-人物关系”、“人物-计划关系”、“人物-组织关系”、“组织-计划关系”、“组织-组织关系”。 根据剧情准备了对应Schema的数据 准备了一些query,提出一些关于剧情的问题 -## 目录结构 +## 2.目录结构 rawdata: 原始剧情数据和schema定义文件 case.cypher: 查询相关的Cypher语句 control.sh: 控制TuGraph Server启动停止的脚本 lgraph_standalone.json: TuGraph Server启动的配置文件 -## 使用说明 +## 3.使用说明 + 前置条件:TuGraph已安装 -### 数据导入 +### 4.数据导入 -- 根据数据存放目录对应修改import.json里面的DATA_PATH -- 参考control.sh中的load函数,加载数据 -- 参考control.sh中的start函数,启动TuGraph服务 -- 启动TuGraph服务后,访问${HOST_IP}:7071,打开web页面,确认数据是否导入成功 +- 手动导入 + - 根据数据存放目录对应修改import.json里面的DATA_PATH。 + - 参考control.sh中的load函数,加载数据。 + - 参考control.sh中的start函数,启动TuGraph服务。 + - 启动TuGraph服务后,访问${HOST_IP}:7071,打开web页面,确认数据是否导入成功。 +- 自动创建 + - 点击`新建图项目`,选择三体数据,填写图项目配置,系统会自动完成三体场景图项目创建。 + - 或者直接使用产品自带的三体图项目。 -### Cypher查询 +### 5.Cypher查询 参考TuGraph文档,在TuGraph的Web页面前端输入Cypher进行查询 -## 使用展示 +## 6.使用展示 + +### 6.1.数据导入的展示 + +![data](../../../../images/three-body-data.png) + +### 7.查询展示 + +#### 7.1.人物关系查询 +三体一剧情中,一开始全世界各地发生了大量科学家自杀事件,引起了警方重视,查案过程根据人物关系线索一步步排查,就如上面的图所示,随着线索越来越多,背后的真相逐步浮出水面。史强和汪淼发现大多数人都和叶文洁有着直接或者间接的联系,并派汪淼卧底,最终发现叶文洁的最终统帅身份。在图中也可以看出,叶文洁顶点周围有很多边关系(一度或二度邻居很多)。 + +```cypher +MATCH (n)-[e:person_person]-(m) RETURN n,e,m +``` + +![data](../../../../images/three-body-cypher1.png) + +#### 7.2.邻域顶点分析 +三体中的各种计划比较多,有的时候可能会被绕晕,这时候我们可以通过图的邻居顶点查询来查看该计划的相关人物和组织等。如"面壁计划"中,我们可以看到有四位人物与之相关,这四位也是被世人所寄予厚望的“面壁者”。 + +```cypher +MATCH (p:plan {name: "面壁计划"})-[e]-(neighbor:person) +RETURN neighbor,p,e +``` -### 数据导入的展示 +![data](../../../../images/three-body-cypher2.png) -![data](../../../images/three-body-data.png) +#### 7.3.查询a节点和b节点的共同邻居 +我们往往希望知道两个人物之间的共同关联的人物都有谁,这样就能很快的掌握这两个人物之间的关系,在大数据量的情况下,使用cypher进行图关系分析就很方便! +```cypher +MATCH (a:person {name: "叶文洁"})-[e1:person_person]->(n)<-[e2:person_person]-(b:person {name: "汪淼"}) +RETURN a,b,n,e1,e2 +``` -### 查询展示 +![data](../../../../images/three-body-cypher3.png) -#### 人物关系查询 -三体一剧情中,一开始全世界各地发生了大量科学家自杀事件,引起了警方重视,查案过程根据人物关系线索一步步排查,就如上面的图所示,随着线索越来越多,背后的真相逐步浮出水面。史强和汪淼发现大多数人都和叶文洁有着直接或者间接的联系,并派汪淼卧底,最终发现叶文洁的最终统帅身份。在图中也可以看出,叶文洁顶点周围有很多边关系(一度或二度邻居很多) +#### 7.4.设置/更改属性 +随着剧情推进,我们逐步了解了"叶文洁"身上的多个标签,那么我们也可以将这些标签更新至“叶文洁”节点上: -![data](../../..//images/three-body-cypher1.png) +```cypher +MATCH (p:person {name: "叶文洁"}) +SET p.introduce = "清华大学教授、ETO精神领袖、首位和三体人交流的人" +RETURN p +``` -#### 邻域顶点分析 -三体中的各种计划比较多,有的时候可能会被绕晕,这时候我们可以通过图的邻居顶点查询来查看该计划的相关人物和组织等。如"面壁计划"中,我们可以看到有四位人物与之相关,这四位也是被世人所寄予厚望的“面壁者” +#### 7.5.增加/删除节点 +后续我们了解到了罗辑、程心等等人物和PIA、星环集团等组织,希望把这些作为节点添加至图中: -![data](../../..//images/three-body-cypher2.png) +```cypher +CREATE (a:person {introduce: "物理学教授", name: "bbb"}) +RETURN a +``` \ No newline at end of file diff --git a/doc/zh-CN/source/3.quick-start/2.demo/4.three-kingdoms.md b/doc/zh-CN/source/3.quick-start/2.demo/4.three-kingdoms.md index 4a16e5a2d3..7b2dbb0446 100644 --- a/doc/zh-CN/source/3.quick-start/2.demo/4.three-kingdoms.md +++ b/doc/zh-CN/source/3.quick-start/2.demo/4.three-kingdoms.md @@ -1,60 +1,69 @@ -# 1. 简介 +# 场景:三国 + +> 此文档主要介绍 三国 demo的使用方法。 + +## 1. 简介 由于史料的缺失,一些即使为人们熟知的历史事件也往往存在着很多未解之谜。以三国历史为例,诸葛亮为什么出山帮助当时势力弱小的刘备,同为天下英雄的曹操和刘备为什么成就差距巨大等等。以往学者往往采用二维关系分析历史,这样得出的结论往往比较片面。使用TuGraph将三国的历史人物和事件导入图模型中,使用图计算方式进行分析,能够帮助我们从有限的信息中获得更有价值的知识,是一种非常有意义的跨学科尝试。 -# 2. 数据建模 +## 2. 数据建模 我们设计了5类顶点和5类边,点包括“主公”,“州”,“文臣”,“武将”,“战役”,边包括“父亲”,“兄长”,“隶属”,“籍贯”,“参战”。其具体建模信息如下所示: -![image.png](../../../images/three-kingdoms-schema.png) -# 3. 数据导入 -向TuGraph导入数据,既可以使用TuGraph的`lgraph_import`工具离线导入,也可以使用页面导入。lgraph_import导入命令如下所示 +![image.png](../../../../images/three-kingdoms-schema.png) +## 3. 数据导入 +- 手动导入 + - 向TuGraph导入数据,既可以使用TuGraph的`lgraph_import`工具离线导入。lgraph_import导入命令如下所示 ```shell lgraph_import -c import.json --overwrite true --continue_on_error true ``` -# 4. Cypher分析 -## 4.1. 诸葛亮为什么选择刘备 +- 自动创建 + - 点击`新建图项目`,选择三国数据,填写图项目配置,系统会自动完成三国场景图项目创建。 + - 或者直接使用产品自带的三国图项目。 +## 4. Cypher分析 +### 4.1. 诸葛亮为什么选择刘备 通过如下cypher命令可以查看诸葛亮和曹操、刘备之间的关系 ```cypher MATCH p = (cc:主公 {name: '曹操'})-[*1..3]-(zgl:文臣 {name: '诸葛亮'}) RETURN p ``` 得到的查询结果如下图所示 -![image.png](../../../images/three-kingdoms-cypher1.png) +![image.png](../../../../images/three-kingdoms-cypher1.png) 从图中可以很直观的看出,曹操和诸葛亮之间的最短路径之一包含徐州之战,曹操曾经因父亲被杀对徐州进行过屠城,而诸葛亮是徐州琅琊郡人,任何人都断然不会选择一个屠杀过自己家乡的军阀作为主公。而相反,刘备曾经在徐州之战中阻止过曹操的暴行,这应当是诸葛亮对刘备好感的原因之一。 -## 4.2. 曹操为什么成就比刘备高 +### 4.2. 曹操为什么成就比刘备高 通过如下cypher命令可以查看家族对曹操创业的助力 ```cypher -MATCH (cc:主公{name:"曹操"})<-[r:隶属]-(wj:武将) WHERE wj.name REGEXP "曹.*" OR wj.name REGEXP "夏侯.*" return cc,wj +MATCH (cc:主公{name:"曹操"})<-[r:隶属]-(wj:武将) WHERE wj.name REGEXP "曹.*" OR wj.name REGEXP "夏侯.*" return cc,wj,r ``` 得到的查询结果如下图所示 -![image.png](../../../images/three-kingdoms-cypher2.png) +![image.png](../../../../images/three-kingdoms-cypher2.png) 平定天下最重要的就是军事人才,曹操其父本姓夏侯,过继于曹氏,曹氏和夏侯氏在谯县都属于地方大族,在曹操创业初期提供了夏侯惇,夏侯渊,曹仁,曹洪在内大量的军事人才。而刘备其父早丧,没有家族助力,年过50才凑齐了自己的五虎上将,而这时已经过了天下大乱争夺地盘的最佳时机,曹操已经天下九州居其六了。 -## 4.3. 三国中最强大的魏国为何最先灭亡 +### 4.3. 三国中最强大的魏国为何最先灭亡 通过如下cypher命令可以查看曹操集团的重要文官组成 ```cypher -MATCH (cc:主公)<-[r:隶属]-(wc) WHERE cc.name REGEXP "曹.*" AND (label(wc) = "文臣" OR label(wc) = "主公") return cc,wc +MATCH (cc:主公)<-[r:隶属]-(wc) WHERE cc.name REGEXP "曹.*" AND (label(wc) = "文臣" OR label(wc) = "主公") return cc,wc,r ``` 得到的查询结果如下图所示 -![image.png](../../../images/three-kingdoms-cypher3.png) +![image.png](../../../../images/three-kingdoms-cypher3.png) 曹魏事实上于249年灭亡于高平陵之变,立国29年,少于蜀汉(43年)和东吴(51年)。三国中实力最强大的魏国最先灭亡的原因就在于曹魏的文官制度(九品中正制)使得权力很容易集中在世家大族手中。从图中可以看出,曹操曹丕父子两代的重要文臣几乎都是世家大族,颍川荀氏,颍川钟氏,颍川陈氏,武威贾氏等,甚至还出现了地区化趋势,集中于颍川,最终政权也为和颍川荀氏关系密切的河内司马氏所篡夺。 -## 4.4. 三国各自的实力究竟如何 +### 4.4. 三国各自的实力究竟如何 通过如下cypher命令可以查看三国各集团的人口实力 ```cypher MATCH (p) WHERE (label(p)="主公" OR label(p)="文臣" OR label(p)="武将") AND p.hometown IN ["幽州","冀州","青州","并州","凉州","司州","豫州","兖州","徐州"] WITH COUNT(p) AS w MATCH (p) WHERE (label(p)="主公" OR label(p)="文臣" OR label(p)="武将") AND p.hometown IN ["益州"] WITH COUNT(p) AS s,w -MATCH (p) WHERE (label(p)="主公" OR label(p)="文臣" OR label(p)="武将") AND p.hometown IN ["扬州","荆州","交州"] RETURN "魏",w,"蜀",s,"吴",count(p) +MATCH (p) WHERE (label(p)="主公" OR label(p)="文臣" OR label(p)="武将") AND p.hometown IN ["扬州","荆州","交州"] +RETURN w as 魏人口,s as 蜀人口,count(p) as 吴人口 ``` 得到的查询结果如下表所示 -![image.png](../../../images/three-kingdoms-cypher4.png) +![image.png](../../../../images/three-kingdoms-cypher4.png) 古代社会衡量一个国家实力的重要指标是人口数量,由于人口数据缺失,我们使用三国所有主公和文臣武将的籍贯数据估计每个州的人口数量。发现三国主要人物中,按籍贯有60个属于魏国,有23个属于吴国,仅有2个属于蜀国,证明魏国确实是三国中最强大的国家。 -## 4.5. 曹操的军事能力如何评价 +### 4.5. 曹操的军事能力如何评价 通过如下cypher命令可以查看曹操参与的主要战役 ```cypher -MATCH (cc:主公{name:"曹操"})-[]-(zy:战役) RETURN cc,zy +MATCH (cc:主公{name:"曹操"})-[e]-(zy:战役) RETURN cc,zy,e ``` 得到的查询结果如下图所示 -![image.png](../../../images/three-kingdoms-cypher5.png) +![image.png](../../../../images/three-kingdoms-cypher5.png) 从图中可以看出,曹操在三国主要的15场战役中参加了8场,出场率比较高。但是曹操只获胜了徐州之战、兖州之战、官渡之战和襄樊之战,汉中之战、宛城之战、群雄讨董和赤壁之战都失败了,综合胜率50%,证明曹操并不算一个非常优秀的军事家。 -# 5. 备注 -更多的分析有待大家积极补充和尝试! +## 5. 备注 +更多的分析有待大家积极补充和尝试! \ No newline at end of file diff --git a/doc/zh-CN/source/3.quick-start/index.rst b/doc/zh-CN/source/3.quick-start/index.rst index 8e5e94b514..26d7d66cb1 100644 --- a/doc/zh-CN/source/3.quick-start/index.rst +++ b/doc/zh-CN/source/3.quick-start/index.rst @@ -5,7 +5,9 @@ :maxdepth: 2 :caption: Contents: :glob: - - 1.preparation.md - 2.demo/1.movie.md - 2.demo/2.wandering-earth.md \ No newline at end of file + + 1.preparation.md + 2.demo/1.movie.md + 2.demo/2.wandering-earth.md + 2.demo/3.the-three-body.md + 2.demo/4.three-kingdoms.md \ No newline at end of file diff --git a/doc/zh-CN/source/4.user-guide/1.tugraph-browser.md b/doc/zh-CN/source/4.user-guide/1.tugraph-browser.md index 4d128e6fbc..d8c0b6f681 100644 --- a/doc/zh-CN/source/4.user-guide/1.tugraph-browser.md +++ b/doc/zh-CN/source/4.user-guide/1.tugraph-browser.md @@ -30,7 +30,7 @@ TuGraph Browser(以下简称Browser)是一款功能强大的产品可视化 #### 2.3.1.创建图项目 -在`图管理`首页的选项卡中,点击`新建图项目`创建新的图项目。 +在`图项目`首页的选项卡中,点击`新建图项目`创建新的图项目。 ![快速上手-新建图项目](../../../images/browser/quickstart-creategraph.png) @@ -44,7 +44,7 @@ TuGraph Browser(以下简称Browser)是一款功能强大的产品可视化 #### 2.3.2.开始图项目 -demo数据的图项目创建完成后,可以在`图管理`的选项卡中找到相应的图项目,可以点击`图查询`查询图数据。 +demo数据的图项目创建完成后,可以在`图项目`的选项卡中找到相应的图项目,可以点击`图查询`查询图数据。 ![快速上手-图项目选项卡](../../../images/browser/quickstart-graphtab.png) @@ -54,21 +54,21 @@ demo数据的图项目创建完成后,可以在`图管理`的选项卡中找 更多快速上手文档请浏览[快速上手文档](../3.quick-start/1.preparation.md) -### 2.4.图管理 +### 2.4.图项目 -`图管理`提供可视化的图项目管理和图数据研发功能,它为用户提供了一系列便捷的图数据可视化操作,包括图项目的创建、修改、删除等管理操作,以及图数据的查询、点边统计等操作。此外,它也支持图模型的管理,使用户可以更加方便地进行图数据的管理和维护。 +`图项目`提供可视化的图项目管理和图数据研发功能,它为用户提供了一系列便捷的图数据可视化操作,包括图项目的创建、修改、删除等管理操作,以及图数据的查询、点边统计等操作。此外,它也支持图模型的管理,使用户可以更加方便地进行图数据的管理和维护。 #### 2.4.1.图项目管理 -在`图管理`界面,可以看到当前图数据库中的图项目。 +在`图项目`界面,可以看到当前图数据库中的图项目。 -![图管理-首页](../../../images/browser/graphmanagement-homepage.png) +![图项目-首页](../../../images/browser/graphmanagement-homepage.png) ##### 2.4.1.1.新建图项目 -在`图管理`界面,点击`新建图项目`按钮创建一个新的图项目。 +在`图项目`界面,点击`新建图项目`按钮创建一个新的图项目。 -![图管理-新建图项目按钮](../../../images/browser/graphmanagement-creategraph.png) +![图项目-新建图项目按钮](../../../images/browser/graphmanagement-creategraph.png) 新建图项目需要通过`选择模板`和`填写配置`两个页面完成图项目的创建。 @@ -76,50 +76,50 @@ demo数据的图项目创建完成后,可以在`图管理`的选项卡中找 - 空模板:全新的图项目,用户需要自己创建图模型和导入图数据,一般用于正式项目开发。 - demo模板:产品内置的demo数据,图项目创建成功后,系统会自动创建demo图模型并导入demo图数据,一般用于试用和学习。 -![图管理-选择模板](../../../images/browser/graphmanagement-selecttemplate.png) +![图项目-选择模板](../../../images/browser/graphmanagement-selecttemplate.png) - __填写配置__:用户需要填写图项目基本信息,并点击`创建`按钮创建图项目。 - 图名称:新建图项目的名称,同时作为该图项目的唯一主键。支持中文、字母、数字以及下划线,不支持空格以及其他特殊符号。 - 图描述:新建图项目的描述,可用于详细说明该项目的背景和目标。 - 高级配置-最大存储空间:设置图项目最大可占用的存储空间,实际并不会提前占用物理存储空间,实际数据量达到最大存储空间阈值后不可再写入数据。 -![图管理-填写配置](../../../images/browser/graphmanagement-configure.png) +![图项目-填写配置](../../../images/browser/graphmanagement-configure.png) -创建成功后,可在`图管理`页面的图项目选项卡中查看。 +创建成功后,可在`图项目`页面的图项目选项卡中查看。 ##### 2.4.1.2.编辑图项目 -在`图管理`界面,点击图项目选项卡中的`编辑`按钮(笔形图标),编辑对应图项目的基础信息。 +在`图项目`界面,点击图项目选项卡中的`编辑`按钮(笔形图标),编辑对应图项目的基础信息。 -![图管理-编辑图项目按钮](../../../images/browser/graphmanagement-editgraph-button.png) +![图项目-编辑图项目按钮](../../../images/browser/graphmanagement-editgraph-button.png) 编辑图项目功能可以修改`图名称`和`图描述`。 -![图管理-编辑图项目](../../../images/browser/graphmanagement-editgraph.png) +![图项目-编辑图项目](../../../images/browser/graphmanagement-editgraph.png) ##### 2.4.1.3.删除图项目 -在`图管理`界面,点击图项目选项卡中的`删除`按钮(垃圾桶图标),删除对应的图项目。 +在`图项目`界面,点击图项目选项卡中的`删除`按钮(垃圾桶图标),删除对应的图项目。 -![图管理-删除图项目按钮](../../../images/browser/graphmanagement-deletegraph-button.png) +![图项目-删除图项目按钮](../../../images/browser/graphmanagement-deletegraph-button.png) _需要注意:图项目删除后无法恢复_。 ##### 2.4.1.4.点边统计 -在`图管理`界面,点击图项目选项卡中的`点边统计`按钮(折线图标或刷新图标),统计对应图项目的点边数量。 +在`图项目`界面,点击图项目选项卡中的`点边统计`按钮(折线图标或刷新图标),统计对应图项目的点边数量。 -![图管理-点边统计按钮](../../../images/browser/graphmanagement-statistics-button.png) +![图项目-点边统计按钮](../../../images/browser/graphmanagement-statistics-button.png) 统计结果将展示展示图项目选项卡上,未进行过点边统计的图项目会显示`暂无点边数据`,已经统计过点边数据的图项目再次统计需要点击`刷新`按钮。 -![图管理-点边统计](../../../images/browser/graphmanagement-statistics.png) +![图项目-点边统计](../../../images/browser/graphmanagement-statistics.png) -![图管理-刷新点边统计按钮](../../../images/browser/graphmanagement-statistics-refresh-button.png) +![图项目-刷新点边统计按钮](../../../images/browser/graphmanagement-statistics-refresh-button.png) #### 2.4.2.图构建 -Browser的`图构建`功能主要用于图项目的模型定义和数据导入。在`图管理`页面中,点击图项目选项卡中的`图构建`按钮。 +Browser的`图构建`功能主要用于图项目的模型定义和数据导入。在`图项目`页面中,点击图项目选项卡中的`图构建`按钮。 ![图构建-按钮](../../../images/browser/graphbuild-button.png) @@ -135,7 +135,7 @@ Browser提供可视化的方式创建和维护图模型。 ![图构建-浏览图模型](../../../images/browser/graphbuild.png) -- 支持列表查看点类型和边类型 +- 支持列表查看点类型和边类型。 - 支持点类型和边类型的个数展示,在点类型或边类型页签中展示对应的点或边数量。 - 支持点类型和边类型的名称关键字搜索,在`搜索框`输入关键字可展示对应的点或边。 @@ -146,8 +146,8 @@ Browser提供可视化的方式创建和维护图模型。 - 支持点类型和边类型的删除,点击`删除`按钮可以删除对应的点或边。 ![图构建-浏览图模型-删除](../../../images/browser/graphbuild-list-delete.png) -- 支持画布方式查看点类型和边类型 -- 在列表或画布中点击相应的点类型或边类型,可以展示模型详情 +- 支持画布方式查看点类型和边类型。 +- 在列表或画布中点击相应的点类型或边类型,可以展示模型详情。 ![图构建-浏览图模型-删除](../../../images/browser/graphbuild-select.png) ###### b.添加点 @@ -162,10 +162,10 @@ Browser提供可视化的方式创建和维护图模型。 - 数据类型:属性字段的数据类型,支持INT、STRING、DOUBLE、DATE、DATETIME、BLOB、BOOL等类型。 - 选填:该属性是否可以为空值。 - 删除:在创建点时可以任意删除属性。 -- 索引:点的索引属性,需要先创建属性再设置该属性为索引。 +- 索引:点的索引属性,需要先创建属性再设置该属性为索引,索引创建成功后无法修改。 - 属性:需要配置索引的属性。 - 唯一:设置该属性字段为唯一值。 - - 主键:对应属性是否为主键,选择`是`后`唯一`选项必须为`是` + - 主键:对应属性是否为主键,选择`是`后`唯一`选项必须为`是`。 - 删除:在创建点时可以任意删除索引。 ![图构建-添加点按钮](../../../images/browser/graphbuild-addvertex.png) @@ -197,7 +197,7 @@ _注:主键字段的属性创建后无修改_ - 编辑边:可以增加边的属性和修改已有属性的数据类型。需要对每个新增或修改的属性点击`保存`按钮才可以生效。 -![图构建-编辑边](../../../images/browser/graphbuild-addedge.png) +![图构建-编辑边](../../../images/browser/graphbuild-editedge.png) ###### d.导入模型 @@ -268,7 +268,7 @@ _注:主键字段的属性创建后无修改_ #### 2.4.3.图查询 -在`图管理`界面点击图项目选项卡中的`图查询`按钮,可以查询和访问图项目中的图数据,产品提供`语句查询`、`路径查询`、`点查询`等多种模式查询图数据,支持切换图项目和查询结果展示。 +在`图项目`界面点击图项目选项卡中的`图查询`按钮,可以查询和访问图项目中的图数据,产品提供`语句查询`、`路径查询`、`点查询`等多种模式查询图数据,支持切换图项目和查询结果展示。 ![图查询-按钮](../../../images/browser/query-button.png) @@ -411,10 +411,11 @@ Browser提供全屏方式展示图查询结果,点击`全屏显示`按钮全 在`账户管理`界面点击`添加`按钮创建新的账户,用户需要输入账户名称、账户描述、账户密码以及相关角色。 +![账户管理-添加账户按钮](../../../images/browser/account-add-button.png) + - 账户名称:支持中文、字母、数字以及下划线,不支持空格以及其他特殊符号。 - 相关角色:新建账户时必须要选择一个角色,在账户添加成功后,系统会自动生成一个与账户名称一样的角色。 -![账户管理-添加账户按钮](../../../images/browser/account-add-button.png) ![账户管理-添加账户](../../../images/browser/account-add.png) ##### 2.5.1.1.2.编辑账户 diff --git a/doc/zh-CN/source/5.developer-manual/1.installation/1.cloud-deployment.md b/doc/zh-CN/source/5.developer-manual/1.installation/1.cloud-deployment.md index f69b25bf5e..5397bf180a 100644 --- a/doc/zh-CN/source/5.developer-manual/1.installation/1.cloud-deployment.md +++ b/doc/zh-CN/source/5.developer-manual/1.installation/1.cloud-deployment.md @@ -36,7 +36,7 @@ TuGraph部署的为社区开源版本,源码参考Github Repo,目前可以 |AliyunComputeNestUserFullAccess|管理计算巢服务(ComputeNest)的用户侧权限| |AliyunCloudMonitorFullAccess|管理云监控(CloudMonitor)的权限| -![同意授权并创建关联角色](../../../images/cloud-deployment-1.png) +![同意授权并创建关联角色](../../../../images/cloud-deployment-1.png) ### 3.2.部署入口 @@ -48,7 +48,7 @@ TuGraph部署的为社区开源版本,源码参考Github Repo,目前可以 在正式试用前,需要申请试用,按照提示填写信息,在审核通过后就可以创建TuGraph服务。 -![申请试用](../../../images/cloud-deployment-2.png) +![申请试用](../../../../images/cloud-deployment-2.png) ### 3.4.创建TuGraph服务 @@ -74,37 +74,37 @@ TuGraph部署的为社区开源版本,源码参考Github Repo,目前可以 - 创建实例名称,如下图中“test” - 选择地域,如下图中“华东1(杭州)” -![创建实例](../../../images/cloud-deployment-3.png) +![创建实例](../../../../images/cloud-deployment-3.png) - 选择部署区域,如下图中“可用区I” - 选择实例类型,当前支持ecs.r6.xlarge和ecs.r7a.xlarge规格。如果列表中无机型可选,请尝试选择其他的部署区域 - 选中机型 - 配置实例的密码 -![选择区域](../../../images/cloud-deployment-4.png) +![选择区域](../../../../images/cloud-deployment-4.png) - 点击下一步,进入订单确认页面 - 勾选“权限确认”和“服务条款”中的复选框 - 点击左下角绿色背景的开始免费试用,即可创建服务实例 -![确认](../../../images/cloud-deployment-5.png) +![确认](../../../../images/cloud-deployment-5.png) ### 3.5.启动TuGraph服务 - 查看服务实例:服务实例创建成功后,部署时间大约需要2分钟。部署完成后,页面上可以看到对应的服务实例,如下图 -![查看实例](../../../images/cloud-deployment-6.png) +![查看实例](../../../../images/cloud-deployment-6.png) - 点击该服务实例访问TuGraph。进入到对应的服务实例后,可以在页面上获取到web、rpc、ssh共3种使用方式。 -![访问方式](../../../images/cloud-deployment-7.png) +![访问方式](../../../../images/cloud-deployment-7.png) - 点击web的链接,即可跳转访问已经部署好的TuGraph Web。建议新手先通过TuGraph Web,快速使用demo上手。 - 首先在TuGraph Web的登录页面上,输入默认用户名(admin)和默认密码(73@TuGraph)进行登录,参考下图 - - 登录完成后,依次点击“新建示例”、“创建示例”,等待创建完成后,3中的步骤会依次变成绿色,会默认切换到子图MovieDemo1,参考下图 + - 登录完成后,选择任意一个带有官方图表的图项目,其中内置了demo数据,开启图数据的探索和发现! -![登录](../../../images/cloud-deployment-8.png) -![创建demo](../../../images/cloud-deployment-9.png) +![登录](../../../../images/cloud-deployment-8.png) +![创建demo](../../../../images/cloud-deployment-9.png) ## 4.常见FAQ @@ -112,6 +112,6 @@ TuGraph部署的为社区开源版本,源码参考Github Repo,目前可以 有时,所选部署区域(如可用区G)没有所选套餐的可用资源,会报错如下图所示 -![部署区域错误](../../../images/cloud-deployment-10.png) +![部署区域错误](../../../../images/cloud-deployment-10.png) -__解决办法__:尝试选择其他区域,如可用区I等 \ No newline at end of file +__解决办法__:尝试选择其他区域,如可用区I等 diff --git a/doc/zh-CN/source/5.developer-manual/1.installation/2.docker-deployment.md b/doc/zh-CN/source/5.developer-manual/1.installation/2.docker-deployment.md index f3bd963e1e..70c28d5251 100644 --- a/doc/zh-CN/source/5.developer-manual/1.installation/2.docker-deployment.md +++ b/doc/zh-CN/source/5.developer-manual/1.installation/2.docker-deployment.md @@ -74,4 +74,4 @@ docker save ${image_name}:${image_tag} | gzip > lgraph_latest.tar.gz docker load --input lgraph_latest.tar.gz ``` -其他Docker操作请参考[docker官方文档](https://docs.docker.com/engine/reference/commandline/cli ) \ No newline at end of file +其他Docker操作请参考[docker官方文档](https://docs.docker.com/engine/reference/commandline/cli ) diff --git a/doc/zh-CN/source/5.developer-manual/1.installation/3.local-package-deployment.md b/doc/zh-CN/source/5.developer-manual/1.installation/3.local-package-deployment.md index 569063803a..aa5b129ad3 100644 --- a/doc/zh-CN/source/5.developer-manual/1.installation/3.local-package-deployment.md +++ b/doc/zh-CN/source/5.developer-manual/1.installation/3.local-package-deployment.md @@ -19,7 +19,7 @@ _目前我们建议用户使用 NVMe SSD 配合较大的内存配置以获取最 ## 3.安装包下载 -请访问官网进行下载:[TuGraph DownLoad](https://www.tugraph.org/download) +请访问官网进行下载:[TuGraph Download](https://www.tugraph.org/download) ## 4.Ubuntu 下的安装方法 @@ -43,4 +43,4 @@ $ sudo dpkg -i tugraph-x.y.z.deb $ rpm -ivh tugraph-x.y.z.rpm ``` -用户也可以通过指定`--prefix`选项指定安装目录。 \ No newline at end of file +用户也可以通过指定`--prefix`选项指定安装目录。 diff --git a/doc/zh-CN/source/5.developer-manual/5.ecosystem-tools/2.tugraph-datax.md b/doc/zh-CN/source/5.developer-manual/5.ecosystem-tools/2.tugraph-datax.md index a35d709004..6091df21fc 100644 --- a/doc/zh-CN/source/5.developer-manual/5.ecosystem-tools/2.tugraph-datax.md +++ b/doc/zh-CN/source/5.developer-manual/5.ecosystem-tools/2.tugraph-datax.md @@ -11,7 +11,7 @@ DataX 介绍参考 [https://github.com/alibaba/DataX](https://github.com/alibaba - 从 MySQL、SQL Server、Oracle、PostgreSQL、HDFS、Hive、HBase、OTS、ODPS、Kafka 等各种异构数据源导入 TuGraph - 将 TuGraph 导入相应的目标源 (待开发) -![导入导出](../../../images/tugraph-datax.png) +![导入导出](../../../../images/tugraph-datax.png) ## 2.编译安装 diff --git a/doc/zh-CN/source/5.developer-manual/6.interface/1.cypher.md b/doc/zh-CN/source/5.developer-manual/6.interface/1.cypher.md index 03cd41858c..5df3a90940 100644 --- a/doc/zh-CN/source/5.developer-manual/6.interface/1.cypher.md +++ b/doc/zh-CN/source/5.developer-manual/6.interface/1.cypher.md @@ -2,39 +2,6 @@ > 此文档主要介绍了TuGraph-Cypher的详细使用说明 -## 目录 - -- [1.operators](#1operators) - - [1.1.summary](#11summary) - - [1.2.general-operators](#12general-operators) - - [1.3.mathematical-operators](#13mathematical-operators) - - [1.4.comparison-operators](#14comparison-operators) - - [1.5.string-specific-comparison-operators](#15string-specific-comparison-operators) - - [1.6.boolean-operators](#16boolean-operators) - - [1.7.string-operators](#17string-operators) - - [1.8.list-operators](#18list-operators) -- [2.clauses](#2clauses) - - [2.1.summary](#21summary) - - [2.2.match](#22match) - - [2.3.return](#23return) - - [2.4.where](#24where) - - [2.5.skip](#25skip) - - [2.6.limit](#26limit) - - [2.7.create](#27create) - - [2.8.callyield](#28callyield) - - [2.9.union](#29union) -- [3.functions](#3functions) - - [3.1.whole-list-of-functions](#31whole-list-of-functions) - - [3.2.predicate-functions](#32predicate-functions) - - [3.3.scalar-functions](#33scalar-functions) - - [3.4.aggregating-functions](#34aggregating-functions) - - [3.5.list-funtions](#35list-funtions) - - [3.6.mathematical-functions](#36mathematical-functions) -- [4.附录1-语法扩充及不同](#4附录1-语法扩充及不同) -- [5.附录2-内置procedures列表](#5附录2-内置procedures列表) - - [5.1.procedures样例](#51procedures样例) - - [5.2.内置procedures完整列表](#52内置procedures完整列表) - ## 1.Operators ### 1.1.Summary @@ -2346,4 +2313,4 @@ TuGraph查询语言与OpenCypher的不同点如下: | db.fullTextIndexes | 查看全文索引 | db.fullTextIndexes() :: (is_vertex::BOOLEAN, label::STRING, field::STRING) | | dbms.task.listTasks | 查询正在执行的任务 | dbms.task.listTasks()::(tasks::LIST) | | dbms.task.terminateTask | 中止任务 | dbms.task.terminateTask(task_id::STRING)::(::VOID) | -| db.dropDB | 清空数据库 | db.dropDB() :: (::VOID) | \ No newline at end of file +| db.dropDB | 清空数据库 | db.dropDB() :: (::VOID) | diff --git a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/1.tutorial.md b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/1.tutorial.md index b3dd39bf75..24e1aab9ed 100644 --- a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/1.tutorial.md +++ b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/1.tutorial.md @@ -1,15 +1,8 @@ -# 引导程序 +# OLAP API -> 本文档是为 TuGraph 的用户设计的引导程序,用户在阅读详细的文档之前,应该首先阅读该文档,对 TuGraph 的图计算运行流程有一个大致的了解,之后再阅读详细文档会更加方便。引导程序是基于 Tugraph 的一个简单的[bfs(宽度优先搜索)](https://en.wikipedia.org/wiki/Breadth-first_search "wikipedia")程序实例,我们将重点介绍其使用方式。 +> 本文档是为TuGraph的用户设计的引导程序,用户在阅读详细的文档之前,应该首先阅读该文档,对TuGraph的图计算运行流程有一个大致的了解,之后再阅读详细文档会更加方便。引导程序是基于Tugraph的一个简单的[BFS(宽度优先搜索)](https://en.wikipedia.org/wiki/Breadth-first_search "wikipedia")程序实例,我们将重点介绍其使用方式。 -## 目录 - -- [1. TuGraph-图分析引擎介绍](#1-tugraph-图分析引擎介绍) -- [2. Procedure 编译与运行](#2-procedure-编译与运行) -- [3. Embed 编译及运行](#3-embed文件编译及运行) -- [4. Standalone 编译与运行](#4-standalone-编译与运行) - -## 1. TuGraph-图分析引擎介绍 +## 1. TuGraph 图分析引擎介绍 TuGraph的图分析引擎,面向的场景主要是全图/全量数据分析类的任务。借助TuGraph的 C++ / Python 图分析引擎 API ,用户可以对不同数据来源的图数据快速导出一个待处理的复杂子图,然后在该子图上运行诸如PageRank、LPA、WCC等迭代式图算法,最后根据运行结果做出相应的对策。 @@ -19,24 +12,24 @@ TuGraph图计算系统社区版内置6个算法,商业版内置了25种算法 根据数据来源及实现不同,可分为Procedure、Embed和Standalone三种运行方式,均继承于OlapBase API,OlapBase API接口文档可参考olapbase-api.md。 -其中Procedure和Embed的数据来源是图数据库中预加载的db数据,可以分别编译生成TuGraph-Web加载使用的.so文件和后台终端使用的embed文件,输入的图数据均通过db的加载形式,其接口文档可参考olapondb-api.md。 +其中Procedure和Embed的数据来源是图数据库中预加载的db数据,可以分别编译生成tugraph-web加载使用的.so文件和后台终端使用的embed文件,输入的图数据均通过db的加载形式,其接口文档可参考olapondb-api.md。 Standalone用于编译生成standalone文件,区别于前者,该文件的输入图数据通过txt、二进制、ODPS文件的形式加载,其接口文档可参考olapondisk-api.md。 ## 2. Procedure 编译与运行 -该种方式主要用于TuGraph-web界面进行可视化加载及运行。使用方法如下: +该种方式主要用于tugraph-web界面进行可视化加载及运行。使用方法如下: ### C++: -在TuGraph/plugins目录下执行 bash make_so.sh bfs 即可在TuGraph/plugins目录下得到bfs.so文件,将该文件以插件形式上传至TuGraph-web,输入参数后即可执行。 +在tugraph-db/plugins目录下执行`bash make_so.sh bfs`即可在tugraph-db/plugins目录下得到bfs.so文件,将该文件以插件形式上传至tugraph-web,输入参数后即可执行。 ### Python: -在TuGraph-web的前端将python文件以插件形式上传,输入参数后即可执行。 +在tugraph-web的前端将python文件以插件形式上传,输入参数后即可执行。 示例: -在TuGraph/plugins编译.so算法文件 +在tugraph-db/plugins编译.so算法文件 `bash make_so.sh bfs` -将bfs.so(或TuGraph/plugins/cython/bfs.py)文件以插件形式加载至TuGraph-web后,输入如下json参数: +将bfs.so(或tugraph-db/plugins/cython/bfs.py)文件以插件形式加载至tugraph-web后,输入如下json参数: ```json { @@ -47,29 +40,33 @@ Standalone用于编译生成standalone文件,区别于前者,该文件的输 ``` 即可得到返回结果如下。 -result:"{"core_cost":0.013641119003295898, - "found_vertices":3829, - "num_edges":88234, - "num_vertices":4039, - "output_cost":8.821487426757813e-06, - "prepare_cost":0.03479194641113281, - "total_cost":0.04844188690185547}" +```json +{ + "core_cost": 0.013641119003295898, + "found_vertices": 3829, + "num_edges": 88234, + "num_vertices": 4039, + "output_cost": 8.821487426757813e-06, + "prepare_cost": 0.03479194641113281, + "total_cost": 0.04844188690185547 +} +``` 输出内容解释如下: -- num_edges: 表示该图数据的边数量 -- num_vertices: 表示该图数据点的数量 -- prepare_cost: 表示预处理阶段所需要的时间。预处理阶段的工作:加载参数、图数据加载、索引初始化等。 - core_cost: 表示算法运行所需要的时间。 - found_vertices: 表示查找到点的个数。 +- num_edges: 表示该图数据的边数量。 +- num_vertices: 表示该图数据点的数量。 - output_cost: 表示算法结果写回db所需要的时间。 +- prepare_cost: 表示预处理阶段所需要的时间。预处理阶段的工作:加载参数、图数据加载、索引初始化等。 - total_cost: 表示执行该算法整体运行时间。 -make_so.sh文件介绍:该文件用于将TuGraph-OLAP所涉及到的图算法文件编译成一个可供TuGraph-web使用的.so文件。 +make_so.sh文件介绍:该文件用于将TuGraph-OLAP所涉及到的图算法文件编译成一个可供tugraph-web使用的.so文件。 -## 3. Embed 编译及运行 +## 3. Embed 编译与运行 该种方式主要用于TuGraph在后台程序中对预加载的db图数据进行算法分析。其使用方法如下: -在TuGraph/plugins目录下对embed_main.cpp文件完善,补充数据名称、输入参数、数据路径等信息,示例如下: +在tugraph-db/plugins目录下对embed_main.cpp文件完善,补充数据名称、输入参数、数据路径等信息,示例如下: ### C++: @@ -98,34 +95,33 @@ int main(int argc, char **argv) { return 0; } ``` -保存后在TuGraph/plugins目录下执行 bash make_so.sh bfs 即可在TuGraph/plugins/cpp目录下的到bfs_procedure文件, -`bash make_embed.sh bfs` +保存后在tugraph-db/plugins目录下执行`bash make_embed.sh bfs`即可在tugraph-db/plugins/cpp目录下得到bfs_procedure文件。 -在TuGraph/plugins文件夹下执行 -`./cpp/bfs_procedure` -即可得到返回结果。 +在tugraph-db/plugins文件夹下执行`./cpp/bfs_procedure` 即可得到返回结果: -Input: {"root_id":"0", "label":"node","field":"id"} -found_vertices = 3829 -{"core_cost":0.025603055953979492, -"found_vertices":3829, -"num_edges":88234, -"num_vertices":4039, -"output_cost":9.059906005859375e-06, -"prepare_cost":0.056738853454589844, -"total_cost":0.0823509693145752} +```json +{ + "core_cost":0.025603055953979492, + "found_vertices":3829, + "num_edges":88234, + "num_vertices":4039, + "output_cost":9.059906005859375e-06, + "prepare_cost":0.056738853454589844, + "total_cost":0.0823509693145752 +} +``` -其中Input表示输入的参数,其余参数解释同上。 +参数解释同上。 ### Python: -在TuGraph/plugins文件夹下执行 +在tugraph-db/plugins文件夹下执行 `bash make_cython_so.sh bfs` -或在TuGraph/plugins/cython文件夹下执行 +或在tugraph-db/plugins/cython文件夹下执行 `python3 setup.py build_ext -i` -得到bfs.so后,在Python中import bfs可使用,如TuGraph/plugins/embed_main.py所示 +得到bfs.so后,在Python中import bfs可使用,如tugraph-db/plugins/embed_main.py所示 ```python -# TuGraph/plugins/embed_main.py +# tugraph-db/plugins/embed_main.py from lgraph_db_python import * import bfs as python_plugin @@ -138,18 +134,21 @@ if __name__ == "__main__": print(res) del db del galaxy +``` +通过如下命令执行 -# shell +```bash python3 embed_main.py ``` + 输出结果与C++相同。 ## 4. Standalone 编译与运行 该文件主要用于在终端处直接加载图数据,并运行打印输出结果。使用方法如下: -在TuGraph/build目录下执行 make bfs_standalone (需要在g++默认include路径中包含boost/sort/sort.hpp)即可得到bfs_standalone文件,该文件生成于TuGraph/build/output/algo文件夹下。 -运行:在TuGraph/build目录下执行./output/algo/bfs_standalone -–type [type] –-input_dir [input_dir] --id_mapping [id_mapping] -–vertices [vertices] --root [root] –-output_dir [output_dir] -即可运行。 +在tugraph-db/build目录下执行`make bfs_standalone` (需要在g++默认include路径中包含boost/sort/sort.hpp)即可得到bfs_standalone文件,该文件生成于tugraph-db/build/output/algo文件夹下。 +运行方式:在tugraph-db/build目录下执行`./output/algo/bfs_standalone -–type [type] –-input_dir [input_dir] --id_mapping [id_mapping] -–vertices [vertices] --root [root] –-output_dir [output_dir]`即可运行。 + - `[type]`:表示输入图文件的类型来源,包含text文本文件、BINARY_FILE二进制文件和ODPS源。 - `[input_dir]`:表示输入图文件的文件夹路径,文件夹下可包含一个或多个输入文件。TuGraph在读取输入文件时会读取[input_dir]下的所有文件,要求[input_dir]下只能包含输入文件,不能包含其它文件。参数不可省略。 - `[id_mapping]`:当读入边表时,是否对输入数据做id映射,使达到符合算法运行的形式。1为需要做id映射,0为不需要做。该过程会消耗一定时间。参数可省略,默认值为0。 @@ -160,21 +159,21 @@ python3 embed_main.py 示例: ### C++: -在TuGraph/build编译standalone算法程序 +在tugraph-db/build编译standalone算法程序 -```leaf +```bash make bfs_standalone ``` -在TuGraph/build/output目录下运行text源文件 +在tugraph-db/build/output目录下运行text源文件 -``` - ./output/algo/bfs_standalone --type text --input_dir ../test/integration/data/algo/fb_unweighted --root 0 +```bash +./output/algo/bfs_standalone --type text --input_dir ../test/integration/data/algo/fb_unweighted --root 0 ``` 得到运行结果: -``` +```txt prepare_cost = 0.10(s) core_cost = 0.02(s) found_vertices = 3829 @@ -190,15 +189,18 @@ DONE. ### Python: Python语言的bfs拓展编译过程与embed模式无区别,在运行时通过`Standalone`接口调用,示例如下: ```python -# TuGraph/plugins/standalone_main.py +# tugraph-db/plugins/standalone_main.py import bfs as python_plugin if __name__ == "__main__": python_plugin.Standalone(input_dir= "../test/integration/data/algo/fb_unweighted", root=0) +``` + +通过如下命令执行 -# shell +```bash python3 standalone_main.py ``` diff --git a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/2.olap-base-api.md b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/2.olap-base-api.md index 3c1c95386e..79692f147e 100644 --- a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/2.olap-base-api.md +++ b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/2.olap-base-api.md @@ -2,25 +2,6 @@ > 此文档主要详细介绍了OlapBase API的使用说明 -## 目录 - - -- [1. 概述](#1-概述) -- [2. 配置要求](#2-配置要求) -- [3. 原子操作](#3-原子操作) -- [4. 点集合类ParallelBitset](#4-点集合类parallelbitset) - - [4.1 ParallelBitset类成员](#41-parallelbitset类成员) -- [5. 点数组类ParallelVector](#5-点数组类parallelvector) - - [5.1 ParallelVector类成员](#51-parallelvector类成员) -- [6. 自定义数据结构](#6-自定义数据结构) - - [6.1 基本数据类型](#61-基本数据类型) - - [6.2 组合数据结构](#62-组合数据结构) -- [7. 图类OlapBase](#7-图类olapbase) - - [7.1 基本信息](#71-基本信息) - - [7.2 点集和边集及其相关操作](#72-点集和边集及其相关操作) - - [7.3 锁机制](#73-锁机制) - - [7.4 批处理操作](#74-批处理操作) - ## 1. 概述 @@ -30,8 +11,8 @@ 如果要使用TuGraph图计算编写以及编译自己的应用程序,需要的配置要求为: -- linux操作系统,目前在Ubuntu16.04.2和Centos7系统上可成功运行。 -- 支持C++14的编译器,要求GCC版本为5.4.1或更新的版本。 +- linux操作系统,目前在Ubuntu16.04, Ubuntu18.04, Ubuntu20.04和Centos7, Centos8系统上可成功运行。 +- 支持C++17的编译器,要求GCC版本为8.4.0或更新的版本。 ## 3. 原子操作 diff --git a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/3.olap-on-db-api.md b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/3.olap-on-db-api.md index b604c4b7bc..f94a5e42db 100644 --- a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/3.olap-on-db-api.md +++ b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/3.olap-on-db-api.md @@ -2,26 +2,6 @@ > 此文档主要详细介绍了OlapOnDB API的使用说明 -## 目录 - -- [1. 简介](#1-简介) -- [2. 模型](#2-模型) - - [2.1 基于快照的存储结构](#21-基于快照的存储结构) - - [2.2 BSP计算模型](#22-bsp计算模型) -- [3. 算法举例](#3-算法举例) - - [3.1 主函数](#31-主函数) - - [3.2 PageRank算法流程](#32-pagerank算法流程) -- [4. 其他常用函数功能描述](#4-其他常用函数功能描述) - - [4.1 事务的创建](#41-事务的创建) - - [4.2 并行化创建有向图](#42并行化创建有向图) - - [4.3 并行化创建无向图](#43-并行化创建无向图) - - [4.4 获取出度](#44-获取出度) - - [4.5 获取入度](#45-获取入度) - - [4.6 获取出边集合](#46-获取出边集合) - - [4.7 获取入边集合](#47-获取入边集合) - - [4.8 获取TuGraph中节点对应OlapOnDB的节点编号](#48-获取tugraph中节点对应olapondb的节点编号) - - [4.9 获取OlapOnDB中节点对应TuGraph的节点编号](#49-获取olapondb中节点对应tugraph的节点编号) - - [4.10 活跃点的描述](#410-活跃点的描述) ### 1. 简介 diff --git a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/4.olap-on-disk-api.md b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/4.olap-on-disk-api.md index 554de43fa4..48ff618569 100644 --- a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/4.olap-on-disk-api.md +++ b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/4.olap-on-disk-api.md @@ -2,18 +2,6 @@ > 此文档主要详细介绍了OlapOnDisk API的使用说明 -## 目录 - -- [1. 简介](#1-简介) -- [2. 算法举例](#2-算法举例) - - [2.1 头文件](#21-头文件) - - [2.2 配置类MyConfig](#22-配置类MyConfig) - - [2.3 主函数](#23-主函数) - - [2.4 bfs算法流程](#24-bfs算法流程) -- [3. 其他常用函数功能描述](#3-其他常用函数功能描述) - - [3.1 图加载](#31-图加载) - - [3.2 图写入](#32-图写入) - - [3.3 图解析函数](#33-图解析函数) ### 1. 简介 diff --git a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/5.python-api.md b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/5.python-api.md index 26227dc990..1681de3e44 100644 --- a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/5.python-api.md +++ b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/5.python-api.md @@ -2,20 +2,6 @@ > 本文档主要介绍 OlapBase OlapOnDB 和 OlapOnDisk 在Python中的API用法 -## 目录 -- [1.概述](#1-概述) -- [2.配置要求](#2-配置要求) -- [3.Cython](#3-cython) -- [4.Olap API](#4-olap-api) - - [4.1.原子操作](#原子操作) - - [4.2.点集合类ParallelBitset](#点集合类ParallelBitset) - - [4.3.点数组类ParallelVector](#点数组类ParallelVector) - - [4.4.自定义数据结构](#自定义数据结构) - - [4.5.图类OlapBase](#图类OlapBase) - - [4.6.图类OlapOnDB](#图类OlapOnDB) - - [4.7.图类OlapOnDisk](#图类OlapOnDisk) -- [5.lgraph DB API](#5-lgraph_db-api) -- [6.算法插件示例](#6-算法插件示例) ## 1. 概述 @@ -25,8 +11,8 @@ 如果要使用TuGraph图计算编写以及编译自己的应用程序,需要的配置要求为: -- linux操作系统,目前在Ubuntu16.04.2和Centos7系统上可成功运行。 -- 支持C++17的编译器,要求GCC版本为5.4.1或更新的版本。 +- linux操作系统,目前在Ubuntu16.04, Ubuntu18.04, Ubuntu20.04和Centos7, Centos8系统上可成功运行。 +- 支持C++17的编译器,要求GCC版本为8.4.0或更新的版本。 - Cython,版本要求3.0.0以上,已测试可运行版本为3.0.0a11 ## 3. Cython @@ -439,4 +425,4 @@ def Process(db: lgraph_db_python.PyGraphDB, inp: bytes): request, response) return (True, json.dumps(response)) -``` \ No newline at end of file +``` diff --git a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/6.algorithms.md b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/6.algorithms.md index 646e2fe48e..bc0fdb0e62 100644 --- a/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/6.algorithms.md +++ b/doc/zh-CN/source/5.developer-manual/6.interface/2.olap/6.algorithms.md @@ -2,48 +2,6 @@ > 此文档主要详细介绍了TuGraph内置的算法程序,社区版6种算法可参考基础算法报 -## 目录 - -- [TuGraph 内置算法说明](#TuGraph-内置算法说明) -- [基础算法包](#基础算法包) - - [广度优先搜索(bfs)](#广度优先搜索) - - [网页排序(pagerank)](#网页排序) - - [单源最短路径(sssp)](#单源最短路径) - - [弱连通分量(wcc)](#弱连通分量) - - [平均集聚系数(lcc)](#平均集聚系数) - - [标签传播(lpa)](#标签传播算法) -- [扩展算法包](#扩展算法包) - - [全对最短路径(apsp)](#全对最短路径) - - [介数中心度(bc)](#介数中心度) - - [置信度传播(bp)](#置信度传播) - - [距离中心度(cc)](#距离中心度) - - [共同邻居(cn)](#共同邻居) - - [度数关联度(dc)](#度数关联度) - - [直径估计(de)](#直径估计) - - [EgoNet算法(en)](#EgoNet算法) - - [超链接主题搜索(hits)](#超链接主题搜索) - - [杰卡德系数(ji)](#杰卡德系数) - - [k核算法(kcore)](#k核算法) - - [鲁汶社区发现(louvain)](#鲁汶社区发现) - - [多源最短路径(mssp)](#多源最短路径) - - [个性化网页排序算法(ppr)](#个性化网页排序算法) - - [强连通分量(scc)](#强连通分量) - - [监听标签传播(slpa)](#监听标签传播) - - [两点间最短路径(spsp)](#两点间最短路径) - - [三角计数(triangle)](#三角计数) - - [信任指数排名(trustrank)](#信任指数排名) - - [带权重的标签传播(wlpa)](#带权重的标签传播) - - [带权重的网页排序(wpagerank)](#带权重的网页排序) - - [最大独立集算法(mis)](#最大独立集算法) - - [Sybil检测算法(sybilrank)](#Sybil检测算法) - - [子图匹配算法(subgraph_isomorphism)](#子图匹配算法) - - [模式匹配算法(motif)](#模式匹配算法) - - [莱顿算法(Leiden)](#莱顿算法) - - [k阶团计数算法](#k阶团计数算法) - - [k阶桁架计数算法](#k阶桁架计数算法) - - - ## 简介 TuGraph目前包含以下6个基础算法28种扩展算法,共34个图算法: diff --git a/doc/zh-CN/source/5.developer-manual/7.quality/2.integration-testing.md b/doc/zh-CN/source/5.developer-manual/7.quality/2.integration-testing.md index ef1b78a69a..e1fcd2a58e 100644 --- a/doc/zh-CN/source/5.developer-manual/7.quality/2.integration-testing.md +++ b/doc/zh-CN/source/5.developer-manual/7.quality/2.integration-testing.md @@ -396,4 +396,4 @@ def test_export_default(self, importor, exportor, importor_1, server, client): ``` #### 2.3.4.其他测试 -更多用例请参考集成测试代码 [https://github.com/TuGraph-db/tugraph-db/tree/master/test/integration](https://github.com/TuGraph-db/tugraph-db/tree/master/test/integration) +更多用例请参考集成测试代码 [https://github.com/TuGraph-family/tugraph-db/tree/master/test/integration](https://github.com/TuGraph-family/tugraph-db/tree/master/test/integration) diff --git a/doc/zh-CN/source/6.community-manual/1.contributing.md b/doc/zh-CN/source/6.community-manual/1.contributing.md index 13b23fbe3e..797919b273 100644 --- a/doc/zh-CN/source/6.community-manual/1.contributing.md +++ b/doc/zh-CN/source/6.community-manual/1.contributing.md @@ -5,9 +5,9 @@ 在贡献代码之前,请您稍微花一些时间了解为TuGraph贡献代码的流程,并阅读《贡献者许可协议》,参与贡献则视为同意上述协议。 -个人贡献者许可协议:[Individual_CLA](4.individual_cla.md) +[个人贡献者许可协议](3.individual-cla.md) -公司贡献者许可协议:[Corporate_CLA](5.corporate_cla.md) +[公司贡献者许可协议](4.corporate-cla.md) ## 1. 贡献什么 我们随时都欢迎任何贡献,无论是简单的错别字修正,BUG 修复还是增加新功能。请踊跃提出问题或发起 PR。我们同样重视文档以及与其它开源项目的整合,欢迎在这方面做出贡献。 diff --git a/doc/zh-CN/source/6.community-manual/4.corporate_cla.md b/doc/zh-CN/source/6.community-manual/4.corporate-cla.md similarity index 100% rename from doc/zh-CN/source/6.community-manual/4.corporate_cla.md rename to doc/zh-CN/source/6.community-manual/4.corporate-cla.md diff --git a/doc/zh-CN/source/8.faq.md b/doc/zh-CN/source/8.faq.md index 6d391a5101..61069859ad 100644 --- a/doc/zh-CN/source/8.faq.md +++ b/doc/zh-CN/source/8.faq.md @@ -1,54 +1,54 @@ # FAQ -在 TuGraph 使用的过程中,如果遇到问题请优先查看[用户文档](https://github.com/TuGraph-db/tugraph-db/tree/master/doc/zh-CN) 。其次,请查看如下 FAQ 列表是否能够匹配您的问题。 +在 TuGraph 使用过程中,如果遇到问题可优先查看[用户文档](https://github.com/TuGraph-family/tugraph-db/tree/master/doc/zh-CN) 。其次,请查看如下 FAQ 列表是否能够匹配您的问题。 -1. **[内核引擎 QA 汇总](https://github.com/TuGraph-db/tugraph-db/discussions/113#discussion-4575385)** +1. **[内核引擎 QA 汇总](https://github.com/TuGraph-family/tugraph-db/discussions/113#discussion-4575385)** - 1.1 [TuGraph 的边是否支持索引?](https://github.com/TuGraph-db/tugraph-db/discussions/113#discussioncomment-4165379) + 1.1 [TuGraph 的边是否支持索引?](https://github.com/TuGraph-family/tugraph-db/discussions/113#discussioncomment-4165379) - 1.2 [TuGraph 单机的 QPS 是多少?](https://github.com/TuGraph-db/tugraph-db/discussions/113#discussioncomment-4165388) -2. **[TuGraph Browser QA 汇总](https://github.com/TuGraph-db/tugraph-db/discussions/111#discussion-4575381)** + 1.2 [TuGraph 单机的 QPS 是多少?](https://github.com/TuGraph-family/tugraph-db/discussions/113#discussioncomment-4165388) +2. **[TuGraph Browser QA 汇总](https://github.com/TuGraph-family/tugraph-db/discussions/111#discussion-4575381)** - 2.1 [可视化文件 build 后如何更新到 TuGraph 服务?](https://github.com/TuGraph-db/tugraph-db/discussions/111#discussioncomment-4165364) + 2.1 [可视化文件 build 后如何更新到 TuGraph 服务?](https://github.com/TuGraph-family/tugraph-db/discussions/111#discussioncomment-4165364) - 2.2 [如何通过 npm run dev,连接到已有的 TuGraph 服务?](https://github.com/TuGraph-db/tugraph-db/discussions/111#discussioncomment-4165366) + 2.2 [如何通过 npm run dev,连接已有的 TuGraph 服务?](https://github.com/TuGraph-family/tugraph-db/discussions/111#discussioncomment-4165366) - 2.3 [3.3.0 版本 TuGraph Browser 删除 node label 失败?](https://github.com/TuGraph-db/tugraph-db/discussions/82#discussion-4465791) -3. **[客户端 QA 汇总](https://github.com/TuGraph-db/tugraph-db/discussions/109#discussion-4575378)** + 2.3 [3.3.0 版本 TuGraph Browser 删除 node label 失败?](https://github.com/TuGraph-family/tugraph-db/discussions/82#discussion-4465791) +3. **[客户端 QA 汇总](https://github.com/TuGraph-family/tugraph-db/discussions/109#discussion-4575378)** - 3.1 [Client 目前有哪些编程语言,是否支持 Node.js?](https://github.com/TuGraph-db/tugraph-db/discussions/109#discussioncomment-4165351) + 3.1 [Client 目前有哪些编程语言,是否支持 Node.js?](https://github.com/TuGraph-family/tugraph-db/discussions/109#discussioncomment-4165351) - 3.2 [Python Client 是否支持 pip install?Client 在哪里进行引用?](https://github.com/TuGraph-db/tugraph-db/discussions/109#discussioncomment-4165353) + 3.2 [Python Client 是否支持 pip install?Client 在哪里进行引用?](https://github.com/TuGraph-family/tugraph-db/discussions/109#discussioncomment-4165353) -4. **[数据导入 QA 汇总](https://github.com/TuGraph-db/tugraph-db/discussions/107#discussion-4575373)** +4. **[数据导入 QA 汇总](https://github.com/TuGraph-family/tugraph-db/discussions/107#discussion-4575373)** - 4.1 [TuGraph 可以对接哪些常用数据库?](https://github.com/TuGraph-db/tugraph-db/discussions/107#discussioncomment-4165335) + 4.1 [TuGraph 可以对接哪些常用数据库?](https://github.com/TuGraph-family/tugraph-db/discussions/107#discussioncomment-4165335) - 4.2 [如何进行数据导入?](https://github.com/TuGraph-db/tugraph-db/discussions/107#discussioncomment-4165336) -5. **[存储过程 QA 汇总](https://github.com/TuGraph-db/tugraph-db/discussions/105#discussion-4575369)** + 4.2 [如何进行数据导入?](https://github.com/TuGraph-family/tugraph-db/discussions/107#discussioncomment-4165336) +5. **[存储过程 QA 汇总](https://github.com/TuGraph-family/tugraph-db/discussions/105#discussion-4575369)** - 5.1 [如何加载存储过程或算法包?](https://github.com/TuGraph-db/tugraph-db/discussions/105#discussioncomment-4165313) + 5.1 [如何加载存储过程或算法包?](https://github.com/TuGraph-family/tugraph-db/discussions/105#discussioncomment-4165313) - 5.2 [如何调用或执行存储过程?](https://github.com/TuGraph-db/tugraph-db/discussions/105#discussioncomment-4165317) + 5.2 [如何调用或执行存储过程?](https://github.com/TuGraph-family/tugraph-db/discussions/105#discussioncomment-4165317) - 5.3 [开源内置的算法包在哪里?](https://github.com/TuGraph-db/tugraph-db/discussions/105#discussioncomment-4165322) -6. **[安装部署 QA 汇总](https://github.com/TuGraph-db/tugraph-db/discussions/103#discussion-4575364)** + 5.3 [开源内置的算法包在哪里?](https://github.com/TuGraph-family/tugraph-db/discussions/105#discussioncomment-4165322) +6. **[安装部署 QA 汇总](https://github.com/TuGraph-family/tugraph-db/discussions/103#discussion-4575364)** - 6.1 [如何使用 docker 镜像安装?](https://github.com/TuGraph-db/tugraph-db/discussions/103#discussioncomment-4165287) + 6.1 [如何使用 docker 镜像安装?](https://github.com/TuGraph-family/tugraph-db/discussions/103#discussioncomment-4165287) - 6.2 [rpm 包和 deb 包安装后,启动 lgraph_server 服务,提示缺少'liblgraph.so'报错?](https://github.com/TuGraph-db/tugraph-db/discussions/103#discussioncomment-4165289) + 6.2 [rpm 包和 deb 包安装后,启动 lgraph_server 服务,提示缺少'liblgraph.so'报错?](https://github.com/TuGraph-family/tugraph-db/discussions/103#discussioncomment-4165289) - 6.3 [如何在 Mac 的 M1 芯片上编译 TuGraph?](https://github.com/TuGraph-db/tugraph-db/discussions/47#discussion-4393165) -7. **[Cypher QA 汇总](https://github.com/TuGraph-db/tugraph-db/discussions/102#discussion-4575018)** + 6.3 [如何在 Mac 的 M1 芯片上编译 TuGraph?](https://github.com/TuGraph-family/tugraph-db/discussions/47#discussion-4393165) +7. **[Cypher QA 汇总](https://github.com/TuGraph-family/tugraph-db/discussions/102#discussion-4575018)** - 7.1 [是否支持不定长边的条件查询?](https://github.com/TuGraph-db/tugraph-db/discussions/102#discussioncomment-4165252) + 7.1 [是否支持不定长边的条件查询?](https://github.com/TuGraph-family/tugraph-db/discussions/102#discussioncomment-4165252) - 7.2 [如何查询最短路径,shortestPath 函数如何使用?](https://github.com/TuGraph-db/tugraph-db/discussions/102#discussioncomment-4165256) + 7.2 [如何查询最短路径,shortestPath 函数如何使用?](https://github.com/TuGraph-family/tugraph-db/discussions/102#discussioncomment-4165256) - 7.3 [查询语句 Where 后使用 and 进行拼接查询速度较慢,语句应如何优化改进?](https://github.com/TuGraph-db/tugraph-db/discussions/102#discussioncomment-4165260) + 7.3 [查询语句 Where 后使用 and 进行拼接查询速度较慢,语句应如何优化改进?](https://github.com/TuGraph-family/tugraph-db/discussions/102#discussioncomment-4165260) - 7.4 [如何查询任意跳的边?](https://github.com/TuGraph-db/tugraph-db/discussions/102#discussioncomment-4165262) + 7.4 [如何查询任意跳的边?](https://github.com/TuGraph-family/tugraph-db/discussions/102#discussioncomment-4165262) - 7.5 [Cypher 是否 date()函数?](https://github.com/TuGraph-db/tugraph-db/discussions/91#discussion-4482858) + 7.5 [Cypher 是否 date()函数?](https://github.com/TuGraph-family/tugraph-db/discussions/91#discussion-4482858) -如果问题仍然无法得到解决,我们推荐您在[Discussions](https://github.com/TuGraph-family/tugraph-db/discussions)跟帖或发起新贴来描述您的问题。同时 TuGraph QA 大汇总也会根据大家在讨论区发起的帖子,进行定期的更新。 \ No newline at end of file +如果问题仍然无法得到解决,我们推荐您在[Discussions](https://github.com/TuGraph-family/tugraph-db/discussions)跟帖或发起新贴来描述您的问题。同时 TuGraph QA 大汇总也会根据大家在讨论区发起的帖子,进行定期的更新。 diff --git a/doc/zh-CN/source/9.contacts.md b/doc/zh-CN/source/9.contacts.md index 0636a0a9fe..8537a0f979 100644 --- a/doc/zh-CN/source/9.contacts.md +++ b/doc/zh-CN/source/9.contacts.md @@ -15,14 +15,14 @@ Slack (在线开发沟通): 钉钉群 (技术交流) -![alert](../images/dingtalk.png) +![alert](../../images/dingtalk.png) 微信群 (技术交流) -![alert](../images/wechat_tech.png) +![alert](../../images/wechat_tech.png) 微信公众号 (信息发布) -![alert](../images/wechat.png) +![alert](../../images/wechat.png) -邮箱(商务沟通等其他问题): tugraph@service.alipay.com \ No newline at end of file +邮箱(商务沟通等其他问题): tugraph@service.alipay.com