UiPath Documentation
document-understanding
latest
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Document Understanding 用户指南

上次更新日期 2026年4月23日

在不同环境中使用模型

When using Document UnderstandingTM modern projects, you need to configure an external application to access models across various tenants and organizations.

本流程全面介绍了如何通过外部应用程序访问部署在不同环境中的模型。内容包括分步指导:配置外部应用程序访问权限、设置 Studio 工作流以调用这些模型,以及建立生产工作流。

This functionality also allows you to use models in hybrid deployment environments. In this case, Document Understanding projects are configured on Automation CloudTM, while Orchestrator and Robots are deployed on-premises.

备注:

Units consumption in cross-tenant scenarios

When a Document Understanding project is hosted in a different tenant than the automation calling it, units are charged to the project tenant — the tenant where the model is hosted — not the automation tenant. Enforcement settings configured at the automation tenant level do not affect Document Understanding units consumption.

  1. 配置外部应用
  2. 配置 UiPath Studio 工作流
  3. 将模型版本配置为参数
  4. Document Understanding 流程模板

配置外部应用

  1. 导航到您的 Automation Cloud 租户。

  2. Go to the Administration page and select your organization.

  3. Go to the External applications page.

    “外部应用程序”按钮的屏幕截图。

  4. Select Add Application from the External applications page.

    提示:

    For more information on adding an external application, check the Managing external OAuth applications page.

  5. Type in a unique name for the application in the Application Name field.

  6. Select an application type from the Application type section:

    • Confidential application: suitable for storing the App Secret securely. Use this for high-security requirements.
    • Non-Confidential application: use this option only when secure storage for the App Secret is not required.

    “应用程序类型”界面的屏幕截图。

  7. 界定外部应用的访问作用域。

    1. Select Add Scopes from the Resources section.
    2. Select Document Understanding from the Resource drop-down list.
    3. Configure User scope(s) to grant permissions within a user context.

    Select the checkboxes corresponding to the logical API permissions you want to grant as per your requirement in the User scope(s) tab. If you grant permissions under user scope, it is implied that the external application can access those resources within a user context. Therefore, a user with the corresponding permissions must be logged in.

    1. Configure Application scope(s) to provide application-level access for broader automation needs.

    If you are using a confidential application, navigate to the Application scope(s) tab to allocate application-level permissions for the chosen resource as required. By delegating permissions under the application scope, the external application can access data across the selected scopes without any user interaction.

    非机密应用程序无法访问应用程序的作用域。

    “应用程序作用域”界面的屏幕截图。

    1. 选择“保存”
      备注:

      If you have registered the external application with user scopes, add a Redirect URL. This URL will receive the authorization response. However, if you selected only application scopes, providing a redirect URL is optional.

  8. 选择“添加”以创建注册。

此时将显示确认消息。 对于机密应用,此消息包含应用程序密码。注册的外部应用程序可以使用此密码请求授权。 请务必将应用程序密码保存在安全位置,因为您将无法再次查看此密码。

“已成功添加应用程序消息”的屏幕截图。

配置 UiPath Studio 工作流

开始之前,请确保满足以下先决条件:

  • Use a compatible Windows Project version.
  • Make sure that the IntelligentOCR activity package is installed. The IntelligentOCR.Activities package supports the consumption of Document Understanding modern projects starting with v6.22.1.
    提示:

    For a more detailed understanding of the differences between the DocumentUnderstanding.Activities and IntelligentOCR.Activities packages, as well as guidance on when to use each of them, check the Automations in Document Understanding page.

  1. Open your UiPath Studio project.

  2. 对分类进行界定。

    1. Open Taxonomy Manager to define relevant document types and fields for your automation.

    Your project taxonomy should encompass each document type and the necessary fields. The taxonomy you create in Studio can contain additional document types and fields that are not part of the Document Understanding modern projects. If you wish to use additional extractors like the Form Extractor or the Regex Extractor for various document types, this step will be necessary.

    “文档类型”界面的屏幕截图。

  3. Install the IntelligentOCR.Activities package to use activities such as Document Understanding Project Extractor and Document Understanding Project Classifier.

    1. Add the Data Extraction Scope activity to configure extraction models and include the Document Understanding Project Extractor activity.

    “数据提取作用域”活动的屏幕截图。

    1. Add the Classify Document Scope activity to configure classification models and include the Document Understanding Project Classifier activity.
  4. 配置设计时凭据。

    1. Open the Get Capabilities wizard from the activity scope.

    The wizard is displayed when you include the Document Understanding Project activities within that scope. This wizard allows you to configure design-time credentials needed to map the taxonomy fields of a modern project.

    1. 填写以下信息:
      • App ID and App Secret from the external application.
      • Tenant URL for the target environment.
    2. Select Get Projects and choose the needed project and version.
    3. 关闭向导。

    “获取功能”界面的屏幕截图。

  5. 映射分类。

    1. Select Configure Extractors within the Data Extraction Scope activity.
    2. 为每个文档类型创建项目分类到模型分类的映射。

    要执行此步骤,请从分类中选择一个文档类型,并将此文档类型中的每个字段与为 Document Understanding 项目设计的模型中的相应字段对齐。

    “配置提取程序”界面的屏幕截图。

  6. 将运行时凭据保存为 Orchestrator 资产。

    1. 导航到您的 Automation Cloud 租户。
    2. 转到 Orchestrator
    3. 选择您的自动化文件夹。
    4. Go to the Assets tab.
    5. Select Add asset and choose Create a new asset from the drop-down list.
    6. Type in a name in the Asset name field.
    7. Select Credential from the Type drop-down list.
    8. Use the previously created App ID and App Secret as the Username and Password.

    “添加资产”界面的屏幕截图。

  7. 在 Studio 中配置运行时凭据。

    1. 导航到您的 Studio 项目。
    2. 转到数据提取作用域活动。
    3. Configure the Runtime Credentials Asset property.

    当机器人连接到本地 Orchestrator 或来自其他租户时,使用此字段访问“Document Understanding”新式项目资源。您可以选择通过以下方式之一输入凭据资产,以进行身份验证:

    • 从下拉列表中选择机器人连接到 Orchestrator 所需的凭据资产。
    • 输入您用于存储访问项目所需外部应用凭据的 Orchestrator 凭据资产的路径。路径必须采用如下格式:<OrchestratorFolderName>/<AssetName>
    1. Configure the Runtime Tenant Url property.

    Use this field together with the Runtime Credentials Asset property. Enter the URL of the tenant to which the robot will connect to execute the extraction. The URL must have the following format: https://<baseURL>/<OrganizationName>/<TenantName>.

外部应用程序提供对租户中所有 Document Understanding 项目的访问权限。您不需要为每个项目单独配置访问权限。

将模型版本配置为参数

如果将项目版本配置为参数,您可以更新适用于新项目版本的自动化工作流,无需调整工作流代码。

  1. 导航到您的 Automation Cloud 租户。

  2. 转到 Orchestrator

  3. 选择您的自动化文件夹。

  4. Go to the Assets tab.

  5. Select Add asset and choose Create a new asset from the drop-down list.

  6. Type in a name in the Asset name field.

  7. Select Text from the Type drop-down list.

  8. Type in a name in the Text field to define a version-specific asset.

    “添加资产”界面的屏幕截图。

  9. 选择“创建”

这样,您就可以更新适用于新项目版本的自动化工作流,无需更改工作流代码。将自动化部署到指定文件夹时,模型版本会根据 Orchestrator 中的资产进行设置。这一流程与将外部应用凭据保存为资产类似。

  1. 导航到您的 Studio 项目。

  2. Add a Get Asset activity in your workflow to retrieve the version asset.

  3. Pass the retrieved value as an input variable to the Document Understanding Project activities.

    UiPath Studio 中“获取资产”活动的截图。

Document Understanding 流程模板

Document Understanding Process is a fully functional UiPath® Studio project template based on a document processing flowchart. You can use it to get started with working on either a demo, or a large-scale implementation of Document UnderstandingTM.

该流程提供日志记录、异常处理、重试机制以及应在“Document Understanding”工作流中使用的所有方法,且开箱即用。

For more information, check the Document Understanding Process template page.

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新