The development of micro message message interface public platform (32) air qual

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Micro message public platform for the development of micro message public platform developer micro message public platform development model of air quality index PM2.5 
Author: Fang times studio  
text;:


One, get the original data

Environmental monitoring station in China can be found throughout the city air quality real-time platform , The address is http://113.108.142.147:20035/emcpublish/
The platform shall be borne by the Zhongshan University research center of intelligent transportation system, The attached press:
Beginning in January 1, 2013, By the Zhongshan University research center of intelligent transportation system, bearing research and development of the country's air quality in the city live release platform used on-line environmental monitoring station in China. The platform in accordance with the "ambient air quality standard" (GB3095-2012) (“ air quality standards &rdquo requirements;), Real time publishing in Beijing Tianjin Hebei region, the Yangtze River Delta, Pearl River Delta and other key regions and municipalities directly under the central government, provincial capital city a total of 74 City, 496 of sulfur dioxide monitoring site (SO2), nitrogen dioxide (NO2), inhalable particulate matter (PM10), ozone (O3), carbon monoxide (CO) and fine particles (PM2.5 the 6 basic project) real-time monitoring data and the AQI index information.
News sources:

Download began to look how to grab the site data:

directly using the Wireshark packet filtering conditions: ip.dst_host matches "113.108.142.147" || ip.src_host matches "113.108.142.147"

Get all of the TCP package?

Open a packet content to look at, is the format of html/xml soap package,

HTTP/1.1 200 OK
Content-Length: 499
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Thu, 30 May 2013 04:52:19 GMT

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><GetCityNameByPIDResponse xmlns="http://tempuri.org/"><GetCityNameByPIDResult xmlns:a="http://schemas.datacontract.org/2004/07/EnvCriteria.Model" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:CityInfo><a:CityCode>110100</a:CityCode><a:CityJC>BJS</a:CityJC><a:CityName></a:CityName><a:ID>1</a:ID><a:ProvinceId>1</a:ProvinceId></a:CityInfo></GetCityNameByPIDResult></GetCityNameByPIDResponse></s:Body></s:Envelope>

It seems that SOAP has not been identified, the 20035 port is added in the WireShark, enter

Edit -> Preferences -> Protocols -> HTTP -> TCP Ports

20035 added

 At this time, you can see the recognition of html/xml protocol.

At the same time, you can find the WebService interface

The official interface address:

http://113.108.142.147:20035/EnvPubServiceSSL/EnvAQIServeice.svc

Everything seems to be going well, victory is in sight.


Another open look at the soap package contents

Out to analyze:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <GetAllHistoryByNameAndTime0320Response xmlns="http://tempuri.org/">
            <GetAllHistoryByNameAndTime0320Result>T/eoSkC02T908BICNUxbXN6bZIWdBhoF45S5uNRQBDFc1RdekG4UNYP9Y1HAr9ZvbVYf0YYIp6Cmr6aHQmgpELOnK7hWUe0K5vDoKEb/BRPSrKEcM7zC7qc6lD5qiPrlIBeH4Dw20pt1aBj9c0t7CYRwforg3E4882URyEOS+zMo0oEewUB7Vza/zT3iWRJ9TsU3CSBCCW0wur6AySyw4O2TgoSb+0CMbtRaC+MPeKBFUtSeGY6JRKljcT+LkSmZqT2XEsJhLfbM1Pidxbh7416VgAI/6n/HwLxjaMBc2k+Sy3IljoVoZfJP9prSbtUqkWJ1eRRqSlIjCgvuonx0hcqDHkQvBIcB/3ifTwI7YB2xs26IDLEjkXvSuMBB3PZnjLMQDMn4Gp1TAcUZLImCv8huYdnqfGzmHf8Khm3MCXnrhCZUoX8tO9H+KEg/8bHOO7gMGXGV+yP8WMHvazZVLRO+OXK0rG4jlYnC0RluUNpC/mOketcu3jPlFS4dQ7qPnn8iN03pF+aeVLVrvmyU5m0IbuTf23VaxEy4/wCtW4WW5Im8kiojWs9Ocm+eYg7WQAn0PjHGMF8tPUBNYHSW/m7tm3H7jXqFXGDTdYHEvW0u1XjGSyHMXaLyrqqEI9v+sBoQ89Vzl+M1d/VnhaxFyPiGzW22Jddqg9EQ5YD+pFI=
            </GetAllHistoryByNameAndTime0320Result>
        </GetAllHistoryByNameAndTime0320Response>
    </s:Body>
</s:Envelope>

This GetAllHistoryByNameAndTime0320Result this value to decrypt? ?  

The data cannot be decrypted, no longer study down, are interested in the study can be see  ;


Two, the use of third.

PM25.in is the BestApp studio in Guangzhou developed an air quality monitoring data products. A collection of 74 city nationwide, real time data of nearly 500 monitoring points (each hour update). The data source to public data on National Environmental Protection Bureau and local environmental protection agency. The development team will be all collected data for unified treatment, and then through the API way out. Interface address:

Data format: 
The PM25.in website provides air quality index real-time data from the Ministry of environmental protection, the API returns the data include the following contents: 
FieldThe field description
aqi Air quality index (AQI), air quality index, is a dimensionless index to quantitatively describe the situation of air quality
area The name of the city
position_name Monitoring point name
station_code Monitoring point code
so2 Sulfur dioxide on average 1 hours
so2_24h Sulfur dioxide 24 hour moving average
no2 Nitrogen dioxide on average 1 hours
no2_24h Nitrogen 24 hour moving average
pm10 Particles (diameter less than or equal to 10μ m) 1 hour average
pm10_24h Particles (diameter less than or equal to 10μ m) 24 hour moving average
co Carbon monoxide 1 hour average
co_24h Carbon monoxide 24 hour moving average
o3 1 hour average ozone
o3_24h Ozone 24 hour moving average
o3_8h Ozone 8 hour moving average
o3_8h_24h Ozone 8 hour moving average 24 hours mean
pm2_5 Particles (diameter less than or equal to 2.5μ m) 1 hour average
pm2_5_24h Particles (diameter less than or equal to 2.5μ m) 24 hour moving average
primary_pollutant Primary pollutant
quality The air quality index categories, “ excellent, good, slight pollution, moderate pollution, serious pollution, serious pollution of ” 6
time_point Data released by the time

Using the interface

1.12,Obtain detailed data of all city air quality

Address of the http://www.pm25.in/api/querys/all_cities.json method for GET parameter * no return

An array, which contains detailed information on 77 city currently has the support of all monitoring points, a total of 507, in which each information
* aqi
* area
* co
* co_24h
* no2
* no2_24h
* o3
* o3_24h
* o3_8h
* o3_8h_24h
* pm10
* pm10_24h
* pm2_5
* pm2_5_24h
* position_name
* primary_pollutant
* quality
* so2
* so2_24h
* station_code
* time_point

The best way is to synchronize this interface once every hour, the data stored in the local database, and then analysis.


Three, the effect of presentation

Hongkong air pollution index HongKong Air Pollution Index  




=============================================================

Attention to bean cubic (ID BeanCube) methods:
1. in order to enter the following paths: friends — > add friends — > search number, enter the beancube, case insensitive search, click, and then click attention.
2. scan two-dimensional code




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Pearl at October 27, 2013 - 6:28 PM