使用 IoT 中心进行设备管理的概述Overview of device management with IoT Hub

Azure IoT 中心提供功能和可扩展性模型,使设备和后端开发人员可以构建功能强大的设备管理解决方案。Azure IoT Hub provides the features and an extensibility model that enable device and back-end developers to build robust device management solutions. 设备范围扩大,从受约束的传感器和单一用途微控制器变为功能强大的可路由设备组通信的网关。Devices range from constrained sensors and single purpose microcontrollers, to powerful gateways that route communications for groups of devices. 此外,在不同行业中,IoT 操作员的用例和要求也显著不同。In addition, the use cases and requirements for IoT operators vary significantly across industries. 尽管有此不同,但使用 IoT 中心进行设备管理提供了功能、模式和代码库,以满足不同设备和最终用户的需要。Despite this variation, device management with IoT Hub provides the capabilities, patterns, and code libraries to cater to a diverse set of devices and end users.

Note

本文中提到的某些功能(例如云到设备消息传递、设备孪生、设备管理)仅在 IoT 中心的标准层中提供。Some of the features mentioned in this article, like cloud-to-device messaging, device twins, and device management, are only available in the standard tier of IoT hub. 有关基本和标准 IoT 中心层的详细信息,请参阅如何选择合适的 IoT 中心层For more information about the basic and standard IoT Hub tiers, see How to choose the right IoT Hub tier.

创建成功的企业 IoT 解决方案的一个重要部分,是提供操作员如何处理其设备集合的日常管理的策略。A crucial part of creating a successful enterprise IoT solution is to provide a strategy for how operators handle the ongoing management of their collection of devices. IoT 操作员需要简单且可靠的工具和应用程序,使他们能够重点处理其工作的更具战略意义方面。IoT operators require simple and reliable tools and applications that enable them to focus on the more strategic aspects of their jobs. 本文提供:This article provides:

  • Azure IoT 中心设备管理方法的简要概述。A brief overview of Azure IoT Hub approach to device management.
  • 常见设备管理原则的说明。A description of common device management principles.
  • 设备生命周期的说明。A description of the device lifecycle.
  • 常见设备管理模式的概述。An overview of common device management patterns.

设备管理原则Device management principles

IoT 带来了一系列独特的设备管理难题,每个企业级解决方案必须满足以下原则:IoT brings with it a unique set of device management challenges and every enterprise-class solution must address the following principles:

设备管理原则图形

  • 规模和自动化:IoT 解决方案需要可以自动执行日常任务的简单工具,使相对数量少的操作人员可以管理数百万台设备。Scale and automation: IoT solutions require simple tools that can automate routine tasks and enable a relatively small operations staff to manage millions of devices. 每天,操作员希望远程批量处理设备操作,并且仅在出现需要直接干预的问题时才收到通知。Day-to-day, operators expect to handle device operations remotely, in bulk, and to only be alerted when issues arise that require their direct attention.

  • 开放性和兼容性:此设备生态系统的多样性超乎寻常。Openness and compatibility: The device ecosystem is extraordinarily diverse. 管理工具必须进行定制以适应多种设备类、平台和协议。Management tools must be tailored to accommodate a multitude of device classes, platforms, and protocols. 操作员必须能够支持许多类型的设备,从最受限制的嵌入式单进程芯片到功能强大且全功能的计算机。Operators must be able to support many types of devices, from the most constrained embedded single-process chips, to powerful and fully functional computers.

  • 上下文感知:IoT 环境是动态的,不断变化。Context awareness: IoT environments are dynamic and ever-changing. 服务可靠性极为重要。Service reliability is paramount. 设备管理操作必须考虑以下因素,确保进行维护性的停机时,不会影响关键业务运营,也不会产生危险的情况:Device management operations must take into account the following factors to ensure that maintenance downtime doesn't affect critical business operations or create dangerous conditions:

    • SLA 设备维护时段SLA maintenance windows
    • 网络和电源状态Network and power states
    • 使用条件In-use conditions
    • 设备地理位置Device geolocation
  • 为许多角色提供服务:必须为 IoT 操作角色的独特工作流和进程提供支持。Service many roles: Support for the unique workflows and processes of IoT operations roles is crucial. 操作人员必须与给定约束的内部 IT 部门协调工作。The operations staff must work harmoniously with the given constraints of internal IT departments. 他们还必须找到可持续方法将实时设备操作信息传递给主管和其他业务管理角色。They must also find sustainable ways to surface realtime device operations information to supervisors and other business managerial roles.

设备生命周期Device lifecycle

有一组所有企业 IoT 项目通用的常规设备管理阶段。There is a set of general device management stages that are common to all enterprise IoT projects. 在 Azure IoT 中,设备生命周期有五个阶段:In Azure IoT, there are five stages within the device lifecycle:

Azure IoT 设备生命周期的五个阶段:计划、预配、配置、监视、停用

在上述五个阶段的每个阶段中,都有几项应满足以提供完整解决方案的设备操作员要求:Within each of these five stages, there are several device operator requirements that should be fulfilled to provide a complete solution:

设备管理模式Device management patterns

IoT 中心启用以下设备管理模式集。IoT Hub enables the following set of device management patterns. 设备管理教程更详细地介绍如何扩展这些模式以适合具体方案,以及如何基于这些核心模板设计新模式。The device management tutorials show you in more detail how to extend these patterns to fit your exact scenario and how to design new patterns based on these core templates.

  • 重启:后端应用通过直接方法通知设备它已开始重启。Reboot: The back-end app informs the device through a direct method that it has initiated a reboot. 设备使用报告属性来更新设备的重新启动状态。The device uses the reported properties to update the reboot status of the device.

    设备管理重新启动模式图形

  • 恢复出厂设置:后端应用通过直接方法通知设备它已开始恢复出厂设置。Factory Reset: The back-end app informs the device through a direct method that it has initiated a factory reset. 设备使用报告属性来更新设备的恢复出厂设置状态。The device uses the reported properties to update the factory reset status of the device.

    设备管理恢复出厂设置模式图形

  • 配置:后端应用使用所需属性来配置设备上运行的软件。Configuration: The back-end app uses the desired properties to configure software running on the device. 设备使用报告属性来更新设备的配置状态。The device uses the reported properties to update configuration status of the device.

    设备管理配置模式图形

  • 固件更新:后端应用根据自动设备管理配置来选择接收更新的设备、指示设备在哪里查找更新,以及监视更新过程。Firmware Update: The back-end app uses an automatic device management configuration to select the devices to receive the update, to tell the devices where to find the update, and to monitor the update process. 设备启动多步骤过程,用于下载、验证和应用固件映像,然后在重新连接到 IoT 中心服务前重启设备。The device initiates a multistep process to download, verify, and apply the firmware image, and then reboot the device before reconnecting to the IoT Hub service. 在整个多步骤过程中,设备使用报告属性来更新设备的进度和状态。Throughout the multistep process, the device uses the reported properties to update the progress and status of the device.

    设备管理固件更新模式图形

  • 报告进度和状态:解决方案后端在一组设备上运行设备孪生查询,报告设备上运行的操作的状态和进度。Reporting progress and status: The solution back end runs device twin queries, across a set of devices, to report on the status and progress of actions running on the devices.

    设备管理报告进度和状态模式图形

后续步骤Next Steps

可以使用 IoT 中心设备管理提供的功能、模式和代码库,在每个设备生命周期阶段创建满足企业 IoT 操作员需求的 IoT 应用程序。The capabilities, patterns, and code libraries that IoT Hub provides for device management, enable you to create IoT applications that fulfill enterprise IoT operator requirements within each device lifecycle stage.

若要继续了解 IoT 中心设备管理功能,请参阅设备管理入门教程。To continue learning about the device management features in IoT Hub, see the Get started with device management tutorial.