黃蘭情
摘要:當今大數(shù)據(jù)、互聯(lián)網(wǎng)、AI、圖形處理等技術(shù)日益成熟,網(wǎng)絡通信技術(shù)日益成熟,智能化生活已經(jīng)逐漸從科幻電影的世界走入人們的生活。而本文介紹的此系統(tǒng)將獲取大量位置信息進行數(shù)據(jù)分析,測繪出一個個用戶的行為軌跡,將行為軌跡的信息進行挖掘研究,分析出潛在的信息。這些信息,對城市規(guī)劃和公共安全有著重要的意義。行為軌跡的分析以已經(jīng)大量用戶的信息前提,位置信息皆以志愿者提供。
關(guān)鍵詞:行為軌跡;Android;生活;科技
中圖分類號:TP311.52 文獻標識碼:A 文章編號:1007-9416(2018)12-0164-01
0 引言
隨著科學技術(shù)的發(fā)展和社會的進步,智能手機已經(jīng)成為了生活中不可分割的一部分?;贕PS的應用和智能手機的普及,利用GPS的定位功能實現(xiàn)行為軌跡的預測成為可能。用戶的位置信息構(gòu)成的行為軌跡中蘊含了大量的信息。行為軌跡的預測可將用戶進行目標人群定位,行為軌跡的預測不僅具有不可估量的商業(yè)價值,還有重要的公共安全和城市規(guī)劃的意義。通過分析大量的用戶的軌跡在路徑的重疊性和頻繁度來規(guī)劃,可以在用于重疊度高和頻繁度高的進行適合的整改。人們的位置信息構(gòu)成的行為軌跡有著大量信息可以來挖掘研究,利用好這些信息可以為我們的生活帶來更多的便利,這些信息也會為未來的無人車“暢通無阻”的在城市中穿梭提供有用的數(shù)據(jù)信息。
1 軌跡挖掘
現(xiàn)在的anroid手機中都帶有GPS芯片,只要在app中開啟Service服務,使用百度提供的百度地圖SDK就可以進行全球定位,能夠精確的獲得經(jīng)緯度和位置信息。然后將數(shù)據(jù)保存在數(shù)據(jù)庫中。
定位代碼:
public class MainActivity extends Activity {
private BDLocationListener? local_listener;
private LocationClient local_client;
private final String str = "Main_Activity";
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
local_client = new LocationClient(getApplicationContext());
local_listener = new MyBDLocationListener();
local_client.registerLocationListener(local_listener);
}
public void getLocation(View view) {? ?//獲取經(jīng)緯度
LocationClientOption local = new LocationClientOption();
local.setLocationMode(LocationMode.Hight_Accuracy);
local.setCoorType("bd09ll"); //返回的坐標類型
local.setIsNeedAddress(true);// 設(shè)置定位結(jié)果包含地址信息
local.setNeedDeviceDirect(true);// 設(shè)置定位結(jié)果包含手機機頭的方向
local.setScanSpan(2000);// 設(shè)置獲取定位請求的時間間隔
mLocationClient.setLocOption(local);
mLocationClient.start();? ?// 開始定位
}
protected void onDestroy() {
super.onDestroy();
if (local_client!= null) {
local_client.unRegisterLocationListener(local_listener);
}
}
private class MyBDLocationListener implements BDLocationListener {
public void onReceiveLocation(BDLocation location) {
if (location != null) {
double lat = location.getLatitude();? //獲取緯度
double lon = location.getLongitude();? //獲取經(jīng)度
String address = location.getAddrStr();
Log.i(str, "位置信息:" + address + "緯度 :" + lat
+ "經(jīng)度 :" + lon );
if (mLocationClient.isStarted()) {
mLocationClient.stop();
}
}
}
}
}? 預測機制
用戶在智能手機中開啟app,通過app將獲取的信息傳遞給服務器,在服務器中進行信息匹配,目的是將時間空間進行整合用來推算出用戶的現(xiàn)實情境。然后進行軌跡計算,將位置信息測繪出路線的網(wǎng)狀結(jié)構(gòu),比例越高的路線越粗。最后將信息匹配后的數(shù)據(jù)和物理軌跡進行數(shù)據(jù)分析,用來推斷出用戶的行為軌跡。
2 結(jié)語
通過智能手機能力來對獲取和記錄用戶的位置信息等,并結(jié)合大數(shù)據(jù)分析的手段對用戶的行為軌跡進行挖掘。智能手機的普遍性為數(shù)據(jù)的獲取帶來了很大的便利,只要在開發(fā)中實現(xiàn)這些功能然后安裝在手機即可。
參考文獻
[1]明日科技著.Android開發(fā)從入門到精通[M].北京:清華大學出版社,2017.
[2]Murat Yener,Onur Dundar.Andorid studio高級編程[M].北京:清華大學出版社,2017.
[3]王曉東.算法設(shè)計與分析[M].北京:清華大學出版社,2014.
[4]王珊,薩師煊.數(shù)據(jù)庫系統(tǒng)概述[M].北京:高等教育出版社,2014.
[5]軟件開發(fā)聯(lián)盟.Java開發(fā)實例大全[M].北京:清華大學出版社,2016.
Research and System Development of User Behavior Trajectory Based on Android
HUANG Lan-qing
(School of Mathematics and Computer Science, Northwest University for Nationalities,Lanzhou? Gansu 730030)
Abstract:Nowadays, big data, Internet,AI, graphics processing and other technologies are becoming more and more mature, network communication technology is becoming more and more mature, intelligent life has gradually gone from the world of sci-fi movies into people's lives. The system introduced in this paper will obtain a lot of location information for data analysis, map out the behavior trajectory of individual users, carry out the information of behavior trajectory mining research, and analyze the potential information. This information is of great significance to urban planning and public safety. The analysis of behavior trajectory is premised on the information of a large number of users, and the location information is provided by volunteers.
Key words:behavior trajectory;Android; life; technology