Skip to Content
边缘AI
book

边缘AI

by Daniel Situnayake, Jenny Plunkett
May 2025
Beginner to intermediate
514 pages
5h 36m
Chinese
O'Reilly Media, Inc.
Content preview from 边缘AI

第 4 章 边缘人工智能算法 边缘人工智能算法

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

在边缘人工智能中,有两大类算法非常重要:特征工程和人工智能。这两类都有众多子类;在本章中,我们将对其中的一个横截面进行探讨。

目的是从工程角度概述每种算法类型,突出它们的典型用法、优缺点以及在边缘硬件上部署的适用性。这将为您规划实际项目提供一个起点,我们将在接下来的章节中介绍这些项目。

功能工程

在数据科学中,特征工程是将原始数据转化为我们用来描述和模拟情况和过程的统计工具可用输入的过程。特征工程包括利用您的领域专业知识来了解原始数据中哪些部分包含相关信息,然后从周围的噪音中提取信号。

从边缘人工智能的角度来看,特征工程就是将原始传感器数据转化为可用信息。特征工程做得越好,试图解释这些数据的人工智能算法就会越轻松。在处理传感器数据时,特征工程自然会用到数字信号处理算法。它还可以将数据切成易于管理的小块。

使用数据流

正如我们所见,大多数传感器都会产生时间序列数据。边缘人工智能应用的目标就是获取这些时间序列数据流并对其进行分析。

管理数据流最常用的方法是将时间序列切成若干块,通常称为 Windows,然后逐块进行分析。1这样就会产生一个时间序列结果,您可以对其进行解释,从而了解发生了什么。图 4-1显示了如何从数据流中提取窗口。

A diagram of a window being taken from a time series and processed into a result.
图 4-1. 时间序列通常被分成几块,称为 Windows,每次分析一块

处理一个数据块需要一定的时间,我们可以称之为系统的延迟。这就限制了我们采集和处理一个数据窗口的频率。我们采集和处理数据的速度被称为系统的帧频,通常用每秒可处理的窗口数来表示。帧可以是连续的,也可以是重叠的,如图 4-2 所示。

A diagram showing windows of a time series at two different frame rates, one sequential and one overlapping.
图 4-2 窗口重叠 根据帧频的不同,窗口可能会重叠;对于包含事件的数据来说,重叠是可取的,因为这样可以增加整个事件在窗口内发生的几率,而不是被截断

延迟越低,在给定时间内可分析的数据窗口就越多。分析的次数越多,结果就越可靠。例如,假设我们正在使用一个机器学习模型来识别一个命令。如果窗口之间相隔太远,我们可能会错过口语命令的关键部分而无法识别(见图 4-3)。

A diagram showing windows of a time series at a low frame rate, with some events being missed.
图 4-3 帧频 如果帧频过低,信号的某些部分将无法处理;如果您要检测的是短时事件,这可能意味着会遗漏某些事件。

窗口大小的选择非常重要。窗口越大,处理其中的数据所需的时间就越长。不过,较大的窗口包含更多的信号信息,这意味着它们可以让信号处理和人工智能算法的工作变得更轻松。窗口大小和帧频之间的权衡是开发系统时需要探索的重要问题。

正如我们稍后将看到的,人工智能算法有很多种--其中有些算法对窗口大小比其他算法更敏感。有些算法(通常是那些对信号中出现的内容保持内部记忆的算法)能够在窗口尺寸很小的情况下很好地工作,而其他算法则需要很大的窗口尺寸才能正确解析信号。算法的选择也会影响延迟,而延迟也会制约窗口大小。这是一个在窗口大小、延迟和算法选择之间进行权衡的复杂系统。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AI原生软件交付

AI原生软件交付

Nick Durkin, Eric Minick, Chinmay Gaikwad
图解大模型 : 生成式AI 原理与实战

图解大模型 : 生成式AI 原理与实战

Jay Alammar, Maarten Grootendorst

Publisher Resources

ISBN: 9798341657762