Skip to content

Implementação de RFID com Inteligencia Artificial na Indústria de Logística com Oracle Cloud

Notifications You must be signed in to change notification settings

RodrigoDiasDeOliveira/OCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

image

Overview This project aims to optimize inventory tracking and management for 'LogiCorp' through an RFID solution integrated with Oracle Cloud, leveraging AI for predictive analysis. The solution provides real-time tracking and demand insights, resulting in a more efficient and agile operation.

Project Structure The implementation is divided into the following modules:

  1. Backend (Java Spring Boot) Manages RFID tracking and authentication, with APIs for tag reading and updates.
  • RfidTag: RFID entity.
  • RfidTagService and RfidTagController: CRUD services for tags.
  • PredictionController and PredictionService: Predictive analysis using AI.
  1. Frontend (React) Provides an interface for viewing and updating tracking information.
  2. Cloud Infrastructure (Terraform)
  • oracle.tf: Oracle Cloud integration.
  • azure.tf: SQL database setup on Azure.
  1. Microservices and Containerization
  • Docker: Containerization of the backend.
  • Kubernetes: Microservices management with load balancing. Setup and Deployment To run the application:
  1. Backend Run the following commands to build and start the backend:
mvn clean install
java -jar target/ocl-backend.jar
  1. Frontend Run the following commands to start the frontend:
npm install
npm start

Expected Results

  • Accuracy: 30% increase in tracking accuracy.
  • Real-Time Visibility: Enhanced stock control.
  • Operational Efficiency: 40% reduction in operation time. OCL - Oracle Cloud Logistics To improve efficiency and meet the growing market demand, LogiCorp decided to implement an RFID solution integrated with Oracle Cloud and use artificial intelligence for optimization. Challenges • Inefficient Tracking: Manual tracking of products resulted in errors and losses, increasing operational costs. • Limited Visibility: The lack of real-time visibility on inventory made it difficult to make quick decisions. • Data Analysis: The company needed insights to predict demand and optimize inventory levels. Proposed Solution

Implementation of an RFID solution integrated with Oracle Cloud and artificial intelligence, using the following steps: • RFID Infrastructure: Installation of RFID tags on all products. RFID readers are positioned at strategic points, such as warehouse entry and exit points. • Integration with Oracle Cloud: o Use of Oracle IoT Cloud to connect RFID readers to the cloud, allowing real-time data collection on tracking. o Implementation of Oracle Analytics for data analysis and reporting on product movement. • Artificial Intelligence: o Development of machine learning models for predictive analysis, using historical sales data and trends to forecast future demand. o Application of learning algorithms to identify consumption patterns, enabling automated restocking and optimization of inventory levels. Application Development Creation of a custom application on the Oracle Cloud platform, allowing the logistics team to monitor inventory, forecast needs, and identify consumption patterns. Predictive Analysis Utilization of machine learning algorithms to forecast demand based on historical data, allowing inventory management adjustments and improving operational efficiency. Results • Increased Accuracy: The implementation of RFID resulted in a 30% increase in product tracking accuracy, reducing losses and improving operational efficiency. • Real-Time Visibility: Integration with Oracle Cloud provided real-time visibility of inventory levels, enabling quick and informed decisions. • Operational Efficiency: Automation of the tracking process and demand forecasting reduced operational time by 40%, allowing the team to focus on more strategic tasks. • Improved Forecasting: Predictive analytics enabled LogiCorp to forecast inventory needs with greater accuracy, resulting in a 25% reduction in storage costs. • Enhanced Decision-Making: Artificial intelligence provided valuable insights, enabling more informed and proactive decisions. Conclusion The implementation of the RFID solution integrated with Oracle Cloud, combined with artificial intelligence, transformed LogiCorp's operations. The approach not only solved critical challenges but also improved efficiency and accuracy in inventory management, providing a competitive edge in the market. RFID Tracking Project with Cloud Integration and Artificial Intelligence This project covers the implementation of an RFID tracking solution integrated with Oracle Cloud and artificial intelligence. It includes the setup of a backend in Java Spring Boot with authentication, a frontend in React, integration with databases using Oracle Cloud and Azure Cloud, and the use of Docker and Kubernetes for microservices management. /projeto-rfid |-- /backend | |-- /src | | |-- /main | | | |-- /java | | | | |-- /com | | | | |-- /exemplo | | | | |-- RfidTag.java | | | | |-- RfidTagController.java | | | | |-- RfidTagService.java | | | | |-- SecurityConfig.java | | | | |-- PredictionController.java | | | | |-- PredictionService.java | | | |-- /resources | | | |-- application.properties | |-- pom.xml |-- /frontend | |-- /src | | |-- App.js | |-- package.json |-- /terraform | |-- oracle.tf | |-- azure.tf |-- /docker | |-- Dockerfile |-- /kubernetes | |-- deployment.yaml | |-- service.yaml

  1. Configuration of Backend (Spring Boot) Dependêncies for pom.xml xml org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-security org.springframework.boot spring-boot-starter-data-jpa com.oracle.database.jdbc ojdbc8 org.springframework.boot spring-boot-starter-validation Model RFID java import javax.persistence.*; import javax.validation.constraints.NotNull; import java.time.LocalDateTime; @Entity public class RfidTag { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotNull private String tagId;

@NotNull private String productName;

@NotNull private String location;

private LocalDateTime lastScanned;

// Getters and Setters } Repository RFID java import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface RfidTagRepository extends JpaRepository<RfidTag, Long> { List findByLocation(String location); } Serviço RFID java Copiar código import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class RfidTagService { @Autowired private RfidTagRepository rfidTagRepository; public List getAllTags() { return rfidTagRepository.findAll(); }

public RfidTag updateTag(RfidTag tag) { return rfidTagRepository.save(tag); } }

Controller RFID java import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/api/rfid") public class RfidTagController { @Autowired private RfidTagService rfidTagService; @GetMapping public List getAllTags() { return rfidTagService.getAllTags(); }

@PostMapping("/update") public RfidTag updateTag(@RequestBody RfidTag tag) { return rfidTagService.updateTag(tag); } } Configuration of security layer
import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .authorizeRequests() .antMatchers("/api/rfid/**").authenticated() .and() .httpBasic(); } } 2. Configuration of Frontend (React) Component Principal jsx 3. import React, { useEffect, useState } from 'react'; import axios from 'axios'; function App() { const [tags, setTags] = useState([]); useEffect(() => { fetchTags(); }, []);

const fetchTags = async () => { const response = await axios.get('/api/rfid'); setTags(response.data); };

const handleUpdate = async (tag) => { await axios.post('/api/rfid/update', tag); fetchTags(); };

return (

Rastreamento RFID

    {tags.map(tag => (
  • {tag.productName} - {tag.location} <button onClick={() => handleUpdate({ ...tag, location: "Novo Local" })}>Atualizar Local
  • ))}
); } export default App; 3. Integração com Oracle Cloud usando Terraform Script Terraform para Oracle Cloud hcl Copiar código provider "oci" { region = "us-phoenix-1" } resource "oci_database_db_system" "example" { Configuration of DB System from Oracle } resource "oci_database_database" "example" { Configuration of DataBankk on Instance } 4. Microservices with Docker Dockerfile dockerfile FROM openjdk:11-jre-slim COPY target/myapp.jar app.jar ENTRYPOINT ["java", "-jar", "/app.jar"] 5. Kubernetes para Gerenciamento Configuração do Deployment yaml Copiar código apiVersion: apps/v1 kind: Deployment metadata: name: rfid-service spec: replicas: 3 selector: matchLabels: app: rfid-service template: metadata: labels: app: rfid-service spec: containers: - name: rfid-service image: mydockerhub/rfid-service:latest ports: - containerPort: 8080 6. Load Balancer yaml Copiar código apiVersion: v1 kind: Service metadata: name: rfid-service spec: type: LoadBalancer ports: • port: 80 targetPort: 8080 selector: app: rfid-service 7. Configuration of databank on Azure with Terraform hcl 8. provider "azurerm" { features {} } resource "azurerm_sql_server" "example" { Configuration of Azure SQL Server } resource "azurerm_sql_database" "example" { DataBank Configuration } 8. Integration with Artificial Inteligence, Exemple of predictive Analisys import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api/predict") public class PredictionController { @Autowired private PredictionService predictionService; @GetMapping("/demand") public PredictionResult predictDemand(@RequestParam String productId) { return predictionService.predictDemand(productId); } } Prediction Services import org.springframework.stereotype.Service; @Service public class PredictionService { public PredictionResult predictDemand(String productId) { //Implement of predicition logicusing one exemple of ML return new PredictionResult(...); } }

About

Implementação de RFID com Inteligencia Artificial na Indústria de Logística com Oracle Cloud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published