Exemple #1
0
        //分析每天的上网时段:每天的起始上网时间在哪个时段 (一天分析一次即可)
        public static void AnalysisONB_StartTime()
        {
            //计算当天的开始浏览网络的时段
            string   strMinDateTime = dic_Url_FirstTime.First().Value; //网络浏览的开启时间
            DateTime BeginningDate  = DateTime.Parse(strMinDateTime);  //转化为DateTime类型
            int      iHour          = BeginningDate.Hour;

            if (iHour < 9)
            {
                BehaviorFeatureAnalysis.UpdateBehaviorFeature_ONB_StartTime(RadioSelectionCategory.RadioSelected_A);
            }
            else if ((iHour >= 9) && (iHour < 12))
            {
                BehaviorFeatureAnalysis.UpdateBehaviorFeature_ONB_StartTime(RadioSelectionCategory.RadioSelected_B);
            }
            else if ((iHour >= 12) && (iHour < 14))
            {
                BehaviorFeatureAnalysis.UpdateBehaviorFeature_ONB_StartTime(RadioSelectionCategory.RadioSelected_C);
            }
            else if ((iHour >= 14) && (iHour < 18))
            {
                BehaviorFeatureAnalysis.UpdateBehaviorFeature_ONB_StartTime(RadioSelectionCategory.RadioSelected_D);
            }
            else if ((iHour >= 18) && (iHour < 19))
            {
                BehaviorFeatureAnalysis.UpdateBehaviorFeature_ONB_StartTime(RadioSelectionCategory.RadioSelected_E);
            }
            else if ((iHour >= 19) && (iHour < 23))
            {
                BehaviorFeatureAnalysis.UpdateBehaviorFeature_ONB_StartTime(RadioSelectionCategory.RadioSelected_F);
            }
            else if ((iHour >= 23) && (iHour < 24))
            {
                BehaviorFeatureAnalysis.UpdateBehaviorFeature_ONB_StartTime(RadioSelectionCategory.RadioSelected_G);
            }
        }