<p>We present HIAPLLM, a privacy-preserving hybrid edge–cloud framework for real-time air-quality advisories tailored to the Indian context using Large Language Models (LLMs). At the network edge, a Raspberry Pi 4 B hosts a Gradio/Folium interface enabling users to input any Indian geocoordinates. Upon each request, the Pi issues a 5&#xa0;s-timeout call to the Open-Meteo application programming interface (API), retrieving <InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(\hbox {PM}_{2.5}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>PM</mtext> <mrow> <mn>2.5</mn> </mrow> </msub> </math></EquationSource> </InlineEquation> (5.2–82.9 <InlineEquation ID="IEq2"> <EquationSource Format="TEX">\({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi mathvariant="normal">μ</mi> <mtext>g</mtext> <mo stretchy="false">/</mo> <msup> <mrow> <mtext>m</mtext> </mrow> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>), <InlineEquation ID="IEq3"> <EquationSource Format="TEX">\(\hbox {PM}_{10}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>PM</mtext> <mn>10</mn> </msub> </math></EquationSource> </InlineEquation> (8.6–172.8 <InlineEquation ID="IEq4"> <EquationSource Format="TEX">\({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi mathvariant="normal">μ</mi> <mtext>g</mtext> <mo stretchy="false">/</mo> <msup> <mrow> <mtext>m</mtext> </mrow> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>), CO (0.10–0.80 <InlineEquation ID="IEq5"> <EquationSource Format="TEX">\(\hbox {mg/m}^{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <msup> <mtext>mg/m</mtext> <mn>3</mn> </msup> </math></EquationSource> </InlineEquation>), <InlineEquation ID="IEq6"> <EquationSource Format="TEX">\(\hbox {NO}_{2}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>NO</mtext> <mn>2</mn> </msub> </math></EquationSource> </InlineEquation> (3.6–46.5 <InlineEquation ID="IEq7"> <EquationSource Format="TEX">\({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi mathvariant="normal">μ</mi> <mtext>g</mtext> <mo stretchy="false">/</mo> <msup> <mrow> <mtext>m</mtext> </mrow> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>), <InlineEquation ID="IEq8"> <EquationSource Format="TEX">\(\hbox {SO}_{2}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>SO</mtext> <mn>2</mn> </msub> </math></EquationSource> </InlineEquation> (0.3–40.7 <InlineEquation ID="IEq9"> <EquationSource Format="TEX">\({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi mathvariant="normal">μ</mi> <mtext>g</mtext> <mo stretchy="false">/</mo> <msup> <mrow> <mtext>m</mtext> </mrow> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>), <InlineEquation ID="IEq10"> <EquationSource Format="TEX">\(\hbox {O}_{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>O</mtext> <mn>3</mn> </msub> </math></EquationSource> </InlineEquation> (35–160 <InlineEquation ID="IEq11"> <EquationSource Format="TEX">\({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi mathvariant="normal">μ</mi> <mtext>g</mtext> <mo stretchy="false">/</mo> <msup> <mrow> <mtext>m</mtext> </mrow> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>), aerosol optical depth (AOD: 0.14–1.10), dust loading (0–238 units), and <InlineEquation ID="IEq12"> <EquationSource Format="TEX">\(\hbox {CH}_{4}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>CH</mtext> <mn>4</mn> </msub> </math></EquationSource> </InlineEquation> (1 316–1 614 ppm). These concentrations are mapped via piecewise linear breakpoints into air quality index (AQI) sub-indices and qualitative bands. The Pi then constructs a structured LLM prompt (e.g., “<InlineEquation ID="IEq13"> <EquationSource Format="TEX">\(\hbox {PM}_{2.5}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>PM</mtext> <mrow> <mn>2.5</mn> </mrow> </msub> </math></EquationSource> </InlineEquation> = 82.9 <InlineEquation ID="IEq14"> <EquationSource Format="TEX">\({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi mathvariant="normal">μ</mi> <mtext>g</mtext> <mo stretchy="false">/</mo> <msup> <mrow> <mtext>m</mtext> </mrow> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>; Category: Poor”) and forwards it over LAN to a laptop running ten quantized LLMs (0.6–7 B parameters) under the Ollama engine, eliminating external cloud dependency and preserving raw location privacy. We profile model load times (0.80–2.46 s) and inference latencies (6.26–94.05 s), and find a strong inverse relationship between token throughput and total latency (slope −&#xa0;0.516 s per token/s, <InlineEquation ID="IEq15"> <EquationSource Format="TEX">\(R^2=0.552\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <msup> <mi>R</mi> <mn>2</mn> </msup> <mo>=</mo> <mn>0.552</mn> </mrow> </math></EquationSource> </InlineEquation>). Multivariate analyses (Principal Component Analysis (PCA) capturing 42 %/27 % variance on PC1/PC2; hierarchical clustering) and anomaly detection (Mahalanobis: Kota; Isolation Forest: Delhi, Ludhiana; Density-Based Spatial Clustering of Applications with Noise (DBSCAN) clusters: Hyderabad–Udaipur, Jhansi–Jamshedpur, Belagavi–Nellore) reveal distinct environmental–computational patterns across Indian cities. Variance Inflation Factors (<InlineEquation ID="IEq16"> <EquationSource Format="TEX">\(\hbox {PM}_{10}\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mtext>PM</mtext> <mn>10</mn> </msub> </math></EquationSource> </InlineEquation>: <InlineEquation ID="IEq17"> <EquationSource Format="TEX">\(8.75\times 10^3\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mn>8.75</mn> <mo>×</mo> <msup> <mn>10</mn> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>, dust: <InlineEquation ID="IEq18"> <EquationSource Format="TEX">\(3.66\times 10^3\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mn>3.66</mn> <mo>×</mo> <msup> <mn>10</mn> <mn>3</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>, total_duration_s: <InlineEquation ID="IEq19"> <EquationSource Format="TEX">\(3.84\times 10^{10}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mn>3.84</mn> <mo>×</mo> <msup> <mn>10</mn> <mn>10</mn> </msup> </mrow> </math></EquationSource> </InlineEquation>) expose extreme collinearity, addressed via dimension reduction. HIAPLLM’s runtime of <InlineEquation ID="IEq20"> <EquationSource Format="TEX">\(O(N+P)+T_{\textrm{LLM}}\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mrow> <mo stretchy="false">(</mo> <mi>N</mi> <mo>+</mo> <mi>P</mi> <mo stretchy="false">)</mo> </mrow> <mo>+</mo> <msub> <mi>T</mi> <mtext>LLM</mtext> </msub> </mrow> </math></EquationSource> </InlineEquation> and space <InlineEquation ID="IEq21"> <EquationSource Format="TEX">\(O(N+P+m)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mo stretchy="false">(</mo> <mi>N</mi> <mo>+</mo> <mi>P</mi> <mo>+</mo> <mi>m</mi> <mo stretchy="false">)</mo> </mrow> </math></EquationSource> </InlineEquation> ensures scalable, transparent, and low-cost deployment suitable for India’s connectivity-constrained, privacy-sensitive settings. Code and data are available at <a href="https://github.com/ParthaPRay/Air_Pollution_LLM_Advisor">https://github.com/ParthaPRay/Air_Pollution_LLM_Advisor</a>.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

HIAPLLM: IoT-Enabled Hybrid Edge–Cloud LLM for Real-Time, Privacy-Preserving Air Quality Advisories in India

  • Partha Pratim Ray,
  • Mohan Pratap Pradhan

摘要

We present HIAPLLM, a privacy-preserving hybrid edge–cloud framework for real-time air-quality advisories tailored to the Indian context using Large Language Models (LLMs). At the network edge, a Raspberry Pi 4 B hosts a Gradio/Folium interface enabling users to input any Indian geocoordinates. Upon each request, the Pi issues a 5 s-timeout call to the Open-Meteo application programming interface (API), retrieving \(\hbox {PM}_{2.5}\) PM 2.5 (5.2–82.9 \({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\) μ g / m 3 ), \(\hbox {PM}_{10}\) PM 10 (8.6–172.8 \({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\) μ g / m 3 ), CO (0.10–0.80 \(\hbox {mg/m}^{3}\) mg/m 3 ), \(\hbox {NO}_{2}\) NO 2 (3.6–46.5 \({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\) μ g / m 3 ), \(\hbox {SO}_{2}\) SO 2 (0.3–40.7 \({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\) μ g / m 3 ), \(\hbox {O}_{3}\) O 3 (35–160 \({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\) μ g / m 3 ), aerosol optical depth (AOD: 0.14–1.10), dust loading (0–238 units), and \(\hbox {CH}_{4}\) CH 4 (1 316–1 614 ppm). These concentrations are mapped via piecewise linear breakpoints into air quality index (AQI) sub-indices and qualitative bands. The Pi then constructs a structured LLM prompt (e.g., “ \(\hbox {PM}_{2.5}\) PM 2.5 = 82.9 \({\upmu }{\textrm{g}}/{\textrm{m}}^{3}\) μ g / m 3 ; Category: Poor”) and forwards it over LAN to a laptop running ten quantized LLMs (0.6–7 B parameters) under the Ollama engine, eliminating external cloud dependency and preserving raw location privacy. We profile model load times (0.80–2.46 s) and inference latencies (6.26–94.05 s), and find a strong inverse relationship between token throughput and total latency (slope − 0.516 s per token/s, \(R^2=0.552\) R 2 = 0.552 ). Multivariate analyses (Principal Component Analysis (PCA) capturing 42 %/27 % variance on PC1/PC2; hierarchical clustering) and anomaly detection (Mahalanobis: Kota; Isolation Forest: Delhi, Ludhiana; Density-Based Spatial Clustering of Applications with Noise (DBSCAN) clusters: Hyderabad–Udaipur, Jhansi–Jamshedpur, Belagavi–Nellore) reveal distinct environmental–computational patterns across Indian cities. Variance Inflation Factors ( \(\hbox {PM}_{10}\) PM 10 : \(8.75\times 10^3\) 8.75 × 10 3 , dust: \(3.66\times 10^3\) 3.66 × 10 3 , total_duration_s: \(3.84\times 10^{10}\) 3.84 × 10 10 ) expose extreme collinearity, addressed via dimension reduction. HIAPLLM’s runtime of \(O(N+P)+T_{\textrm{LLM}}\) O ( N + P ) + T LLM and space \(O(N+P+m)\) O ( N + P + m ) ensures scalable, transparent, and low-cost deployment suitable for India’s connectivity-constrained, privacy-sensitive settings. Code and data are available at https://github.com/ParthaPRay/Air_Pollution_LLM_Advisor.