ingyroscopeevent.pitchanglechangesin??180180.??γ:WhenthedevicerotatesalongtheY-axisusu-allyparalleltothelongersideofthescreenγrollanglechangesin??9090.OnAndroidanapplicationreadsthemotiondatabyregisteringamotionsensoreventlistenersomotiondatadoesnotarriveataconstantinterval.BothAndroidandiOSprovidethreeaccuracylevelsbasedoneventfre-quencies.Theintervalsofthemotiondataalsodependonthehardware.ForexampleatthehighestaccuracyleveltheaverageintervalofdeviceorientationeventsonanHTCEvo4Gphoneisabout30mswhilethatonaMotorolaDroidphoneisabout110ms.3Inferringkeystrokesviadeviceorienta-tionWedesignedandimplementedTouchLoggeranAndroidtooltoinferkeystrokesonthesoftkeyboardofsmart-phonesfromthedeviceorientation.MorepreciselyTouchLoggerinfersthelandinglocationsofthetypingngerbasedonthedeviceorientationandthenlooksupthecorrespondingkeysbasedonthecurrentsoftkey-boardconguration.3.1SetupTouchLoggercollectsdeviceorientationdatawhenusertypesonthesoftkeyboard.Therawdeviceorientationdataconsistsoftuplestiα′iβ′iγ′ii1...Nwheretiisthetimeoftheorientationeventandα′iβ′iandγ′iaretheazimathpitchandrollanglesofthedeviceandNisthenumberoforientationeventsintheentiretypingsession.Fortrainingandtestingwealsodevelopedanappli-cationtocollectkeytouchevents.TheyconsistoftuplesLitsiteii1...MwhereLiisthelabelofthekeytsiandteiarethestartingandendingtimeofthetoucheventrespectivelyandMisthenumberofkeystrokesinthesession.3.2PreprocessingTouchLoggerpreprocessestherawdeviceorientationdatabeforeitinferskeystrokes.Firstitdiscardstheaz-imathangleαsincerotationcausedbytypingmainlyaffectspitchβandrollγangles.Seconditnormal-izestheanglesbyeliminatingtheaverageangleswhichrepresenttheinitialorientationofthedeviceandarethereforeirrelevanttothekeystrokes.FinallytoidentifythestartingandendingtimeofkeystrokesTouchLog-gercalculatesthePeak-to-Averageratiosoftheβand2γanglesastheseratiosaremuchlargerduringtyping.ThenduringeachkeystrokeTouchLoggerdetectsthedurationofeachkeystrokebasedonorientationeventsratherthankeystrokeeventsTouchLoggerconvertstherawdeviceorientationdataintotoaseriesoftuplestiβiβ′i????β′iγiγ′i????γ′i.Wecalleachtuplethemo-tionsignalofakeystroke.3.3BasicfeatureextractionTouchLoggerinferskeystrokesbasedonfeaturesinmo-tionsignals.Agoodfeatureshouldbeconsistentamongmotionsignalscausedbythesamekeystrokewhilebe-ingdistinctivebetweenmotionsignalscausedbydiffer-entkeystrokes.Becauseweobservedthatkeystrokesaffecttherota-tionangleofthescreenanaivefeaturewouldbetheratioofmaximumpitchangleoverthemaximumrollan-glemaxβ/maxγ.Howeverourexperimentsshowedthatthisfeatureisinconsistentamongmotionsignalsforthesamekeystroke.Wefoundthatpitchangleandrollangledonotreachtheirpeakssimultaneously.Figure1illustratesthepathsofthepitchandrollanglesasthede-vicevibratesduringtyping.Eachpathexhibitsapatternwithtwolobeseachononesideofthehorizontalaxis.Duringakeystrokethepitchandrollanglesmovefromthecenterofthepatterntothevertexmaxβ2γ2ontheupperlobeβgt0throughonepathandthentothevertexonthelowerlobeβlt0viaanotherpathandnallybacktothecenterofthepattern.Weobservedthatthelobesofthepatternsproducedbythesamekeypointtosimilardirectionswhiletheanglesofthelobesvaryfordifferentkeys.Figure1showsthattheupperlobesofthepatternspointtoupleftforkeys14and7tostraightupforkeys25and8andtouprightforkeys36and9.Thisobservationisconsis-tentwiththepositionofthesekeysonthesoftkeyboardFigure3.Thedirectionsofthelowerlobesalsodemon-stratesimilarpatterns.Thereforeweuselobedirectionasthefeatureforinferringkeystrokes.Eachlobeconsistsoftwopathsegmentsonefromthehorizontalaxisuptothevertexandtheotheronefromthevertexdowntothehorizontalaxis.TomeasurethedirectionofalobeTouchLoggersearchesforthedom-inatingedgeoneachpathandthedirectionofthelobeisthebisectoroftheanglebetweenthetwodominatingedges.Foreachpatternweextracttwofeatures:theanglebetweenthedirectionoftheupperlobeandthex-axisAUBorAngleofUpperBisectorandtheanglebe-tweenthedirectionofthelowerlobeandthex-axisALBorAngleofLowerBisectorasshowninFigure1.3.4ClassicationWeusesupervisedlearningtoinferkeystrokesfromfea-turesextractedinSection3.3.TrainingDuringthetrainingphaseweprovideTouchLoggerwithadatasetthatconsistsofmotionsig-nalswiththeircorrespondingkeys.AssumingthatthefeaturesofthesamekeyhaveaGaussiandistributionTouchLoggercalculatesthemean??kAUB??kALBandstan-darddeviationσkAUBσkALBforeachkeyk.ClassicationDuringclassicationTouchLoggerex-tractsAUBandALBfromeachmotionsignalandcalcu-latestheprobabilitiesthatthesignalcorrespondstoeachkeyusingtheprobabilitydensityfunctionforGaussiandistribution:pkAUB1σkAUB√2πexp??AUB????kAUB22σkAUB21pkALB1σkALB√2πexp??ALB????kALB22σkALB22pkpkAUB×pkALB3TouchLoggerdeterminesthekeyasargmaxkpk.Ourevaluationshowsanaccuracyrateof50.6.3.5AdvancedfeatureextractionBesidelobedirectionweobservedthatthewidthofthelobescanalsobeusedtodistinguishkeystrokes.There-foreweaddedtwomorepairsoffeaturestoimprovethekeystrokeinference.Therstpairoffeaturesaretheanglesofthetwodom-inatingedgesAUandALinFigure1.Wecalculatethemeans??kAU??kALandstandarddeviationsσiAUσkALinthetrainingphase.DuringclassicationTouchLoggerde-terminesthekeyasargmaxkPkwherePkpkAUB×pkALB×pkAU×pkAL4Ourevaluationshowsthatthesefeaturesimprovetheclassicationaccuracyto64.8.Thesecondpairoffeaturesaretheaveragewidthoftheupperandlowerlobedenedastheareaofthepolygonformedbytheupperandlowerlobesandthehorizontalaxisdividedbythepitchangleyaxisvalueoftheupperorlowervertex.CombiningallthesethreepairsoffeaturestwofromthissectionandonefromSec-tion3.3TouchLoggersuccessfullyinferred71.5ofallkeystrokes.3Figure1:Typicalpatternsofpatchanglesandrollangleswhendifferentdigitkeysarepressed.Weextractfeaturesfromthesepatterns.Figure2showsthemeansandstandarddeviationsofallthreepairsoffeatures.Thexaxisrepresentsfeaturesassociatedwiththeupperlobewhiletheyaxisrepresentsfeaturesassociatedwiththelowerlobe.Theboxesrepre-senttherangeoffeaturesinthetrainingdat
上一篇:
论文 基于Android的移动公交查询系统设计与实现
下一篇:
国家教育公平政策的思路、问题与对策