Solutions

Services

Partnerships

About

Blog

Solutions

Services

Partnerships

About

Blog

Solutions

Services

Partnerships

About

Blog

Solutions

Services

Partnerships

About

Blog

Solutions

Services

Partnerships

About

Blog

Edge to Cloud: Harnessing IoT and Generative AI with AWS IoT Greengrass, AWS App...

Solutions

Services

Partnerships

About

Blog

Edge to Cloud: Harnessing IoT and Generative AI with AWS IoT Greengrass, AWS App...

Automotive

Logistics

Manufacturing

Utilities

Authors:

Authors:

Ranjan Moses, Sanchan Moses, Pablo Jimenes

Ranjan Moses, Sanchan Moses, Pablo Jimenes

Published:

Published:

Dec 13, 2024

Dec 13, 2024

Introduction

In an era dominated by data, the integration of the Internet of Things (IoT) and Generative Artificial Intelligence (Generative AI) stands as a beacon of innovation, driving transformative change across industries. The significance of IoT and Generative AI integration lies in their collective ability to convert raw data into actionable insights. The marriage of these technologies empowers enterprises to move beyond traditional analytics, tapping into the potential of real-time, data-driven decision-making. By seamlessly connecting devices and leveraging advanced AI capabilities, organizations can gain a competitive edge, enhance operational efficiency, and pave the way for predictive analytics.

For example, in the rapidly evolving landscape of the automotive industry, enterprises are increasingly recognizing the pivotal role of actionable insights in ensuring the seamless functioning and longevity of their fleets. Among the various facets of operational efficiency, predictive maintenance stands out as a critical area that demands attention. 

The Challenge

Historically, automotive maintenance has predominantly been reactive or scheduled, often resulting in inefficiencies, unexpected downtime, and increased operational costs. This conventional approach is no longer tenable due to the various challenges outlined below…

Reactive Maintenance Challenges:

Reactive maintenance, which involves responding to issues as they arise, poses significant challenges for automotive enterprises. Sudden breakdowns not only lead to unplanned downtime but can also result in cascading effects, affecting production schedules, customer satisfaction, and overall operational efficiency. The reactive model is not only cost-inefficient but also fails to leverage the vast amounts of data generated by modern vehicles.

Scheduled Maintenance Inefficiencies:

Scheduled maintenance, while more proactive than a purely reactive approach, is often inefficient. Regular maintenance intervals may result in unnecessary servicing of components that still have significant life left, leading to increased operational costs. Additionally, these scheduled downtimes can disrupt critical operations, impacting the productivity of the fleet.

The Impact of Unplanned Downtime:

Unplanned downtime is a significant concern for automotive enterprises, leading to revenue loss, increased maintenance costs, and potential damage to the brand's reputation. The inability to predict and prevent failures can create a domino effect, affecting supply chains, logistics, and customer satisfaction.

Data Overload and Underutilization:

Modern vehicles are equipped with a myriad of sensors and connected devices, generating an unprecedented volume of data. However, the challenge lies in converting this data into actionable insights. Without an intelligent system in place, automotive enterprises risk drowning in a sea of information, unable to extract meaningful patterns or anticipate maintenance needs.

Cost Pressures:

Traditional maintenance models can lead to inflated operational costs, as enterprises may overspend on unnecessary maintenance or bear the financial burden of unexpected breakdowns. In an industry where margins are often tight, cost-effective and efficient maintenance is imperative for sustained profitability.

The Growth of Automotive Enterprises

By 2025, an estimated 400 million connected vehicles are expected to be on the road.

The importance of a data-driven approach cannot be overstated. In order to provide data through the integration of connected vehicles, there needs to be seamless communication and synchronization of information between vehicles, mobile applications and cloud services. This is a critical component, but also challenging to develop and improve.

Using MongoDB building blocks with the AWS ecosystem helps solve this challenge and allows you to accelerate building next generation applications with ease.

In this blog, we will delve into the significance of predictive maintenance for automotive enterprises and explore how the integration of Generative AI and IoT, facilitated by AWS IoT Greengrass, MongoDB Realm, MongoDB Atlas, Amazon Bedrock, and Langchain, can allow organizations to harness the full potential of their data, drive innovation, and gain a competitive advantage in an increasingly data-centric business landscape.


High-Level Architecture

A simple use case where we ingest sensor data from the vehicle to predict if the vehicle will require maintenance or not. If it does require maintenance, a job is dispatched to a field technician who in turn is able to rectify the problem. The technician is further able to use a chatbot assistant to request information about the vehicle as well.

MongoDB Atlas Cloud Backend

MongoDB Atlas is a developer data platform and the perfect fit for developers looking to build the next generation of predictive analytics. With its robust cloud infrastructure powered by AWS including features such as globally distributed clusters, Atlas Triggers, Device Sync and Authentication, you can get quickly started on creating a connected data platform for Automotive fleet organizations. Once your MongoDB Atlas account is set up, you can spin up a MongoDB database cluster in a few clicks. This will act as the persistence layer for all your synchronized vehicle data and also the source and destination for your predictive maintenance activities.

Atlas App Services: Authentication / Authorization

We will begin by examining the authentication and authorization service, which is crucial when dealing with sensitive and highly private data in connected vehicles. It's imperative to have robust control mechanisms in place to regulate access to specific pieces of information, even down to the field level. Atlas App Services simplifies this process by enabling seamless integration with widely popular authentication providers like Google, Apple, and Facebook, or by facilitating integration with identity providers such as Amazon Cognito.

In our sample scenario, we opted to utilize the Email/Password authentication provider. This allows you to directly manage usernames and passwords within MongoDB Atlas.

Atlas App Services - Realm SDKs / Device Sync / AWS IoT Greengrass 

For our specific use case with predictive maintenance, we have built 3 separate applications leveraging three of our different Realm SDK’s. The Vehicle simulator uses the C++ Realm SDK, the field technical mobile application uses the React Native Realm SDK and the Fleet web portal uses the Realm Web SDK. 

The Realm SDKs contain the hugely popular Realm embedded database. This provides a sophisticated object-oriented API to persist objects directly to the file system with no need for additional frameworks such as ORMs. 

Realm SDKs use Atlas Device Sync to share data via the cloud backend with other applications also leveraging Realm SDKs. This data synchronization happens within milliseconds, making it easy to share for example a real time health representation of your vehicle state with applications.

The vehicle simulator application ingests data received from the vehicle sensors and stores the telemetry data for transmission back to the cloud backend using Atlas Device Sync. The Vehicle simulator applications are run on AWS IoT Greengrass which is an open-source edge runtime and cloud service for building, deploying and managing device software. The Vehicle simulator application is deployed as a component on a Greengrass Core device.

Other applications, like the Fleet web portal, receive the updates using the Realm Web SDK regarding the vehicle health, whether it requires maintenance, and the status of the jobs completed by the Field Technician on their mobile application.

The Field Technician mobile application receives the jobs created from the cloud backend when there is a vehicle to be inspected and serviced.

Wireless networks in distant areas may pose challenges due to their unreliability due to poor coverage, characterized by low bandwidth and high roaming costs. Atlas Device Sync alleviates this issue by minimizing data transfer, synchronizing only the changes or deltas, and transparently applying compression before transmitting data over the network. Simplifying the life of software developers, the synchronization protocol incorporates built-in deterministic conflict resolution. This proves beneficial in scenarios where multiple changes to the data have occurred while devices were offline and now require merging.

For comprehensive, step-by-step instructions on how to build the three applications, please refer to Link1, Link2, and Link3 within our GitHub repository.

Atlas App Services - Triggers / AWS Ecosystem Integration

Once the data from the Vehicle Simulator reaches the MongoDB Atlas database, it becomes crucial for analysis purposes. Typically, MongoDB-stored data serves as input for machine learning (ML) platforms for both model training and inference. 

In this specific scenario, our aim is to transmit the data to Amazon SageMaker for thorough analysis. To achieve this, Atlas triggers are employed in conjunction with S3 to facilitate the necessary data transfer. We establish execution criteria for the trigger, leveraging a JavaScript function executed based on a predefined schedule.

For a comprehensive understanding of how this integration is achieved, please refer to our GitHub Link.

The data stored in S3 is then utilized by Amazon SageMaker, where it undergoes processing to determine whether the vehicle requires maintenance. The inference results are subsequently fed back into a MongoDB Collection through an AWS Lambda function. This information is utilized to generate a maintenance job for the field technician and is recorded in a specifically synchronized collection.

For detailed instructions on setting up SageMaker, please visit our GitHub Link for step-by-step guidance.

Atlas Vector Search & AWS Bedrock

The chat assistant within the field technician mobile application is powered by a combination of Atlas Vector Search, MongoDB, Amazon Bedrock, and LangChain. In this specific application scenario, it enables technicians to easily retrieve vehicle information.

Atlas Vector Search facilitates the exploration of unstructured data by allowing the creation of vector embeddings through machine learning models. These embeddings are stored and indexed in MongoDB Atlas, supporting functionalities such as retrieval augmented generation (RAG), semantic search, recommendation engines, dynamic personalization, and various other applications.

Amazon Bedrock is a fully managed service offering a selection of high-performing foundation models (FMs) from prominent AI companies and Amazon through a unified API. It provides a comprehensive set of capabilities for constructing generative AI applications with a focus on security, privacy, and responsible AI. Being serverless, Amazon Bedrock eliminates the need for infrastructure management, allowing seamless integration and deployment of generative AI features into applications using familiar AWS services.

LangChain is a framework designed to simplify the development of applications utilizing large language models like Titan, while Atlas Vector Search aids in indexing and querying the associated data.

In our use case, we employ two models, namely Titan Embeddings G1 for generating embeddings and Titan Text G1 - Lite for responding to queries. MongoDB Atlas serves as the repository for the vehicle knowledge base and functions as a vector store for embeddings generated by Titan. The integration of LangChain and Atlas Vector Search ties all components together.

A lambda function hosts the LangChain app, providing a user interface for field technicians to pose questions through the mobile application. When a question is submitted, the lambda function processes the message, utilizing Atlas Vector Search in conjunction with Titan to provide an answer.

For detailed instructions on setting up Bedrock, Atlas Vector Search, and Lambda, please refer to our GitHub link for step-by-step guidance.

Business Use Cases

Numerous organizations recognize the value of integrating business intelligence into their daily operations to enhance customer satisfaction and overall business efficiencies. Industries like Retail, Manufacturing, and Telecommunications leverage operational analytics as a strategic advantage.

In the Retail sector, predictive analytics plays a pivotal role in anticipating customer demand, suggesting products during online shopping, optimizing omni-channel distribution, and efficiently managing warehouse inventory levels.

Manufacturing relies extensively on sensors to analyze production process efficiency. With the complexity of modern supply chains, companies scrutinize data from sensors to address geopolitical and environmental concerns, ultimately reducing downtime, managing defects, and increasing overall yield. Basic dashboards are no longer sufficient; advanced analytics, including custom-built models, enable predictive maintenance to mitigate equipment failures.

The automotive industry is rapidly advancing to provide a myriad of services to car owners and passengers. Modern cars are equipped with an extensive array of sensors that store and analyze data locally and remotely. Predictive analytics in car maintenance proactively detects problems with various components.

Conclusion

In this blog post, we delved into the intricacies of implementing predictive maintenance for automotive enterprises using MongoDB and AWS. Yet, the most effective way to grasp new technologies and concepts is through hands-on experience. We suggest thoroughly exploring the GitHub repository, following the steps sequentially, and running the demo environment.

For those eager to gain further insights into seamlessly addressing challenges using MongoDB and AWS, don't hesitate to reach out at: partners@mongodb.com.

Introduction

In an era dominated by data, the integration of the Internet of Things (IoT) and Generative Artificial Intelligence (Generative AI) stands as a beacon of innovation, driving transformative change across industries. The significance of IoT and Generative AI integration lies in their collective ability to convert raw data into actionable insights. The marriage of these technologies empowers enterprises to move beyond traditional analytics, tapping into the potential of real-time, data-driven decision-making. By seamlessly connecting devices and leveraging advanced AI capabilities, organizations can gain a competitive edge, enhance operational efficiency, and pave the way for predictive analytics.

For example, in the rapidly evolving landscape of the automotive industry, enterprises are increasingly recognizing the pivotal role of actionable insights in ensuring the seamless functioning and longevity of their fleets. Among the various facets of operational efficiency, predictive maintenance stands out as a critical area that demands attention. 

The Challenge

Historically, automotive maintenance has predominantly been reactive or scheduled, often resulting in inefficiencies, unexpected downtime, and increased operational costs. This conventional approach is no longer tenable due to the various challenges outlined below…

Reactive Maintenance Challenges:

Reactive maintenance, which involves responding to issues as they arise, poses significant challenges for automotive enterprises. Sudden breakdowns not only lead to unplanned downtime but can also result in cascading effects, affecting production schedules, customer satisfaction, and overall operational efficiency. The reactive model is not only cost-inefficient but also fails to leverage the vast amounts of data generated by modern vehicles.

Scheduled Maintenance Inefficiencies:

Scheduled maintenance, while more proactive than a purely reactive approach, is often inefficient. Regular maintenance intervals may result in unnecessary servicing of components that still have significant life left, leading to increased operational costs. Additionally, these scheduled downtimes can disrupt critical operations, impacting the productivity of the fleet.

The Impact of Unplanned Downtime:

Unplanned downtime is a significant concern for automotive enterprises, leading to revenue loss, increased maintenance costs, and potential damage to the brand's reputation. The inability to predict and prevent failures can create a domino effect, affecting supply chains, logistics, and customer satisfaction.

Data Overload and Underutilization:

Modern vehicles are equipped with a myriad of sensors and connected devices, generating an unprecedented volume of data. However, the challenge lies in converting this data into actionable insights. Without an intelligent system in place, automotive enterprises risk drowning in a sea of information, unable to extract meaningful patterns or anticipate maintenance needs.

Cost Pressures:

Traditional maintenance models can lead to inflated operational costs, as enterprises may overspend on unnecessary maintenance or bear the financial burden of unexpected breakdowns. In an industry where margins are often tight, cost-effective and efficient maintenance is imperative for sustained profitability.

The Growth of Automotive Enterprises

By 2025, an estimated 400 million connected vehicles are expected to be on the road.

The importance of a data-driven approach cannot be overstated. In order to provide data through the integration of connected vehicles, there needs to be seamless communication and synchronization of information between vehicles, mobile applications and cloud services. This is a critical component, but also challenging to develop and improve.

Using MongoDB building blocks with the AWS ecosystem helps solve this challenge and allows you to accelerate building next generation applications with ease.

In this blog, we will delve into the significance of predictive maintenance for automotive enterprises and explore how the integration of Generative AI and IoT, facilitated by AWS IoT Greengrass, MongoDB Realm, MongoDB Atlas, Amazon Bedrock, and Langchain, can allow organizations to harness the full potential of their data, drive innovation, and gain a competitive advantage in an increasingly data-centric business landscape.


High-Level Architecture

A simple use case where we ingest sensor data from the vehicle to predict if the vehicle will require maintenance or not. If it does require maintenance, a job is dispatched to a field technician who in turn is able to rectify the problem. The technician is further able to use a chatbot assistant to request information about the vehicle as well.

MongoDB Atlas Cloud Backend

MongoDB Atlas is a developer data platform and the perfect fit for developers looking to build the next generation of predictive analytics. With its robust cloud infrastructure powered by AWS including features such as globally distributed clusters, Atlas Triggers, Device Sync and Authentication, you can get quickly started on creating a connected data platform for Automotive fleet organizations. Once your MongoDB Atlas account is set up, you can spin up a MongoDB database cluster in a few clicks. This will act as the persistence layer for all your synchronized vehicle data and also the source and destination for your predictive maintenance activities.

Atlas App Services: Authentication / Authorization

We will begin by examining the authentication and authorization service, which is crucial when dealing with sensitive and highly private data in connected vehicles. It's imperative to have robust control mechanisms in place to regulate access to specific pieces of information, even down to the field level. Atlas App Services simplifies this process by enabling seamless integration with widely popular authentication providers like Google, Apple, and Facebook, or by facilitating integration with identity providers such as Amazon Cognito.

In our sample scenario, we opted to utilize the Email/Password authentication provider. This allows you to directly manage usernames and passwords within MongoDB Atlas.

Atlas App Services - Realm SDKs / Device Sync / AWS IoT Greengrass 

For our specific use case with predictive maintenance, we have built 3 separate applications leveraging three of our different Realm SDK’s. The Vehicle simulator uses the C++ Realm SDK, the field technical mobile application uses the React Native Realm SDK and the Fleet web portal uses the Realm Web SDK. 

The Realm SDKs contain the hugely popular Realm embedded database. This provides a sophisticated object-oriented API to persist objects directly to the file system with no need for additional frameworks such as ORMs. 

Realm SDKs use Atlas Device Sync to share data via the cloud backend with other applications also leveraging Realm SDKs. This data synchronization happens within milliseconds, making it easy to share for example a real time health representation of your vehicle state with applications.

The vehicle simulator application ingests data received from the vehicle sensors and stores the telemetry data for transmission back to the cloud backend using Atlas Device Sync. The Vehicle simulator applications are run on AWS IoT Greengrass which is an open-source edge runtime and cloud service for building, deploying and managing device software. The Vehicle simulator application is deployed as a component on a Greengrass Core device.

Other applications, like the Fleet web portal, receive the updates using the Realm Web SDK regarding the vehicle health, whether it requires maintenance, and the status of the jobs completed by the Field Technician on their mobile application.

The Field Technician mobile application receives the jobs created from the cloud backend when there is a vehicle to be inspected and serviced.

Wireless networks in distant areas may pose challenges due to their unreliability due to poor coverage, characterized by low bandwidth and high roaming costs. Atlas Device Sync alleviates this issue by minimizing data transfer, synchronizing only the changes or deltas, and transparently applying compression before transmitting data over the network. Simplifying the life of software developers, the synchronization protocol incorporates built-in deterministic conflict resolution. This proves beneficial in scenarios where multiple changes to the data have occurred while devices were offline and now require merging.

For comprehensive, step-by-step instructions on how to build the three applications, please refer to Link1, Link2, and Link3 within our GitHub repository.

Atlas App Services - Triggers / AWS Ecosystem Integration

Once the data from the Vehicle Simulator reaches the MongoDB Atlas database, it becomes crucial for analysis purposes. Typically, MongoDB-stored data serves as input for machine learning (ML) platforms for both model training and inference. 

In this specific scenario, our aim is to transmit the data to Amazon SageMaker for thorough analysis. To achieve this, Atlas triggers are employed in conjunction with S3 to facilitate the necessary data transfer. We establish execution criteria for the trigger, leveraging a JavaScript function executed based on a predefined schedule.

For a comprehensive understanding of how this integration is achieved, please refer to our GitHub Link.

The data stored in S3 is then utilized by Amazon SageMaker, where it undergoes processing to determine whether the vehicle requires maintenance. The inference results are subsequently fed back into a MongoDB Collection through an AWS Lambda function. This information is utilized to generate a maintenance job for the field technician and is recorded in a specifically synchronized collection.

For detailed instructions on setting up SageMaker, please visit our GitHub Link for step-by-step guidance.

Atlas Vector Search & AWS Bedrock

The chat assistant within the field technician mobile application is powered by a combination of Atlas Vector Search, MongoDB, Amazon Bedrock, and LangChain. In this specific application scenario, it enables technicians to easily retrieve vehicle information.

Atlas Vector Search facilitates the exploration of unstructured data by allowing the creation of vector embeddings through machine learning models. These embeddings are stored and indexed in MongoDB Atlas, supporting functionalities such as retrieval augmented generation (RAG), semantic search, recommendation engines, dynamic personalization, and various other applications.

Amazon Bedrock is a fully managed service offering a selection of high-performing foundation models (FMs) from prominent AI companies and Amazon through a unified API. It provides a comprehensive set of capabilities for constructing generative AI applications with a focus on security, privacy, and responsible AI. Being serverless, Amazon Bedrock eliminates the need for infrastructure management, allowing seamless integration and deployment of generative AI features into applications using familiar AWS services.

LangChain is a framework designed to simplify the development of applications utilizing large language models like Titan, while Atlas Vector Search aids in indexing and querying the associated data.

In our use case, we employ two models, namely Titan Embeddings G1 for generating embeddings and Titan Text G1 - Lite for responding to queries. MongoDB Atlas serves as the repository for the vehicle knowledge base and functions as a vector store for embeddings generated by Titan. The integration of LangChain and Atlas Vector Search ties all components together.

A lambda function hosts the LangChain app, providing a user interface for field technicians to pose questions through the mobile application. When a question is submitted, the lambda function processes the message, utilizing Atlas Vector Search in conjunction with Titan to provide an answer.

For detailed instructions on setting up Bedrock, Atlas Vector Search, and Lambda, please refer to our GitHub link for step-by-step guidance.

Business Use Cases

Numerous organizations recognize the value of integrating business intelligence into their daily operations to enhance customer satisfaction and overall business efficiencies. Industries like Retail, Manufacturing, and Telecommunications leverage operational analytics as a strategic advantage.

In the Retail sector, predictive analytics plays a pivotal role in anticipating customer demand, suggesting products during online shopping, optimizing omni-channel distribution, and efficiently managing warehouse inventory levels.

Manufacturing relies extensively on sensors to analyze production process efficiency. With the complexity of modern supply chains, companies scrutinize data from sensors to address geopolitical and environmental concerns, ultimately reducing downtime, managing defects, and increasing overall yield. Basic dashboards are no longer sufficient; advanced analytics, including custom-built models, enable predictive maintenance to mitigate equipment failures.

The automotive industry is rapidly advancing to provide a myriad of services to car owners and passengers. Modern cars are equipped with an extensive array of sensors that store and analyze data locally and remotely. Predictive analytics in car maintenance proactively detects problems with various components.

Conclusion

In this blog post, we delved into the intricacies of implementing predictive maintenance for automotive enterprises using MongoDB and AWS. Yet, the most effective way to grasp new technologies and concepts is through hands-on experience. We suggest thoroughly exploring the GitHub repository, following the steps sequentially, and running the demo environment.

For those eager to gain further insights into seamlessly addressing challenges using MongoDB and AWS, don't hesitate to reach out at: partners@mongodb.com.

Dive deeper on software development trends, emerging technologies and useful tools.

Dive deeper on software development trends, emerging technologies and useful tools.

© Wekan Enterprise Solutions · All rights reserved · 14 NE 1st avenue, Miami 33132 FL

© Wekan Enterprise Solutions · All rights reserved · 14 NE 1st avenue, Miami 33132 FL

© Wekan Enterprise Solutions · All rights reserved · 14 NE 1st avenue, Miami 33132 FL