Docs 菜单
Docs 主页
/

RFID:实时产品跟踪

Enhance retail inventory management with RFID. Technology and MongoDB Atlas for real-time tracking, improved accuracy, and data-driven insights across your supply chain.

使用案例: 目录个性化

行业: 零售

产品: MongoDB Atlas

合作伙伴: Zebra Technologies 123RFID app, Zebra RFID readers/scanners

零售商必须确保在多个渠道中保持库存信息的准确和一致,同时处理大量数据。然而,传统方法难以跟上当今动态市场的需求。

RFID technology offers a solution to this scenario. Retailers can gain real-time visibility into inventory levels by automatically tracking tagged items with electromagnetic fields. This implementation optimizes stock management, reduces labor costs, and elevates customer satisfaction.

To harness the full potential of RFID technology, MongoDB Atlas provides a robust platform for capturing, processing, and analyzing the massive datasets it generates.

You can efficiently manage product information and gain key advantages by integrating RFID technology with a robust database solution. The benefits include:

  • Improve inventory accuracy: Eliminate stock discrepancies and reduce out-of-stocks, ensuring products are where customers expect them to be.

  • Boost operational efficiency: Streamline processes like receiving, picking, and packing, leading to faster turnaround times and cost savings.

  • Enhance customer experience: Fulfill orders accurately and quickly, boosting customer satisfaction and loyalty.

  • Gain data-driven insights: Leverage detailed product and sales data to make informed business decisions and optimize product assortment.

By attaching RFID tags to your products and setting up a network of readers, you can track items from the manufacturing floor to the end consumer. Examine the general architecture of a RFID system and a specific example with Zebra Technologies below.

This architecture shows a comprehensive system with RFID technology to monitor product movement through the supply chain. MongoDB Atlas serves as the underlying data layer to manage and analyze RFID data.

端到端供应链 RFID 追踪架构

图 1.端到端供应链 RFID 追踪架构

This architecture consists of the following key components:

  • RFID data collection: RFID tags attached to products using RFID capture information.

  • 数据管理:MongoDB Atlas 存储和处理收集的 RFID 数据。

  • 数据分析:该系统利用 MongoDB Atlas 通过数据清洗、转换和分析,从数据中提取有价值的见解。

The RFID product tracking architecture diagram explains how to connect the Zebra Technologies 123RFID app to MongoDB Atlas using an API gateway. This setup enables real-time inventory management and ensures data accuracy.

Atlas 和 Zebra Technologies 的 RFID 产品架构示例

图2.基于 Zebra Technologies 与 MongoDB Atlas 集成的 RFID 产品追踪架构示例

This architecture consists of the following key components:

  • RFID 数据采集:Zebra Technologies 123RFID 应用程序通过 RFID 标签收集产品信息。

  • 数据集成:API 网关无缝地将 RFID 数据从应用传输到 MongoDB Atlas。

  • 数据存储和分析:MongoDB Atlas 作为 RFID 数据的中央存储库,支持全面的数据分析。

The following guide explains how you can integrate a retail RFID product tracking application with MongoDB Atlas. It shows how to use this application for efficient inventory checks.

1

集群设置

  • 选择一个云提供商。

  • 选择区域。

  • 配置集群规格(例如,实例大小、存储)。

网络安全

  • 配置网络访问。

  • 识别边缘设备和应用程序服务器的 IP 访问列表。

  • Use user authentication.

  • 创建一个具有读取和写入权限的库存数据库用户。

连接

  • Obtain a connection string from MongoDB Atlas.

  • Use your connection string to connect your application to the cluster.

2

项目设置

  • Open the 123RFID project in Xcode, or open the project using the name you assigned.

  • Configure your project settings.

  • Add the required frameworks and libraries from the Zebra SDK.

  • Configure build settings, including library and framework search paths.

设备配对

  • 在 iOS 设备上启用蓝牙功能。

  • Pair the RFID reader using the 123RFID app.

运行该应用程序

  • Connect your iOS device to Mac.

  • Select the device as target in Xcode.

  • 运行应用程序。

3

The getMatchingTagList method in Objective-C compares RFID tags from the current physical inventory with a predefined list of tags, and updates the user interface accordingly. This procedure works as follows:

  • Retrieves the current inventory and the predefined tag list.

  • 将库存标签与标签列表进行比较,找出匹配的标签。

  • 从缺失的标签列表中删除匹配的标签。

  • Updates the UI with counts of unique and total tags.

  • Stops the inventory operation and confirms a complete match if all tags are accounted for.

4

The sendUrlRequestToFlag method sends a POST request to a specified URL to indicate the result of the inventory check. This process works as follows:

  • Initializes a POST request to the target URL.

  • Sets the JSON content type header.

  • Prepares a JSON payload with inventory check results.

  • Sends a POST request and logs the results.

  • 根据库存检查结果,系统会显示警告信息。

5

Leverage MongoDB Change Streams for instant notifications and visualize the data using MongoDB Atlas Charts. The code sets up a change stream to monitor new inventory checks in a collection named inventoryCheck.

Below set ChartsEmbedSDK as a variable.

Below set pushToast as a variable.

Verify that real-time notifications and dashboard updates work properly.

终结点设置

  • Use MongoDB Change Streams to monitor changes in the inventoryCheck collection.

const startWatchInventoryCheck = async (dashboard, addAlert, utils) => {
console.log("Start watching stream");
const runs = await getMongoCollection(utils.dbInfo.dbName, "inventoryCheck");
const filter = {
filter: {
operationType: "insert"
}
};
const stream = runs.watch(filter);
const closeStreamInventoryCheck = () => {
console.log("Closing stream");
stream.return();
};
try {
for await (const change of stream) {
console.log(change.fullDocument);
addAlert(change.fullDocument.checkResult);
dashboard.refresh();
}
} catch (error) {
console.error("Error watching stream:", error);
}
};

嵌入仪表盘

  • 使用 MongoDB Charts 嵌入 SDK 将仪表盘集成到网络应用程序。

  • 导入必要的库和上下文。

  • Create an instance of ChartsEmbedSDK with your base URL.

  • 定义仪表板属性并将其渲染到指定的 div 容器中。

  • 启动变更流并处理带实时警报的数据更新。

实现实时警报功能

  • Display success or error alerts based on the inventory check results using pushToast.

确保集成性

  • 验证实时通知和仪表盘更新是否能够无缝工作。

  • 保持准确的库存数据,并对差异迅速做出响应。

  • Provide real-time inventory management: Leverage RFID technology and MongoDB Atlas to achieve accurate and up-to-date inventory data.

  • Improve efficiency: Streamline inventory processes, reduce stockouts, and optimize operations through data-driven insights.

  • 数据驱动的决策制定:使用MongoDB Atlas Charts进行实时可视化,支持做出明智的商业决策。

  • Francesco Baldissera, MongoDB

  • Pedro Bereilh, MongoDB

  • Rami Pinto,MongoDB

  • Sebastian Rojas Arbulu, MongoDB

  • Mehar Grewal,MongoDB

  • Prashant Juttukonda, MongoDB

  • AI 驱动的零售:个性化和准确性

  • 事件驱动的库存管理系统

  • 使用 MongoDB 和 Dataworkz 启动 Agentic RAG 聊天机器人

后退

数字收据

在此页面上