海量数据处理

需求分析

1、数据预处理
–》 release_channel,device_id,city,device_id_type,app_ver_name 这几个字段如果缺失,则过滤
–》 将数据整成 字段,字段,字段,…… 这种形式
–》 在每条数据中添加一个字段:user_id(值就是device_id)

2、导入hive中的表的天分区

3、进行数据统计分析
每天的新增用户 –》 事实
维度 –》 各种组合

版本 渠道 城市 设备 新增用户数
所有 所有 所有 所有 21949382
所有 所有 所有 具体设备 xxx
所有 所有 具体城市 所有 yyyy
所有 具体渠道 所有 所有 yyyy
具体版本 所有 所有 所有 zzz
具体版本 具体渠道 所有 所有 zzz

数据预处理

  1. 原数据
    {
    “events”: “1473367236143\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000027\u0001\n1473367261933\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000028\u0001\n1473367280349\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000029\u0001\n1473367331326\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000030\u0001\n1473367353310\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000031\u0001\n1473367387087\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000032\u0001\n1473367402167\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000033\u0001\n1473367451994\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000034\u0001\n1473367474316\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000035\u0001\n1473367564181\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000036\u0001\n1473367589527\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000037\u0001\n1473367610310\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000038\u0001\n1473367624647\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000039\u0001\n1473368004298\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000040\u0001\n1473368017851\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000041\u0001\n1473369599067\u00010\u0001AppLaunch\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000042\u0001\n1473369622274\u00010\u0001connectByQRCode\u0001\u00010\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u00011609072239570000043\u0001\n”,
    “header”: {
    “cid_sn”: “1501004207EE98AA”,
    “mobile_data_type”: “”,
    “os_ver”: “9”,
    “mac”: “88:1f:a1:03:7d:a8”,
    “resolution”: “2560x1337”,
    “commit_time”: “1473399829041”,
    “sdk_ver”: “103”,
    “device_id_type”: “mac”,
    “city”: “江门市”,
    “android_id”: “”,
    “device_model”: “MacBookPro11,1”,
    “carrier”: “中国xx”,
    “promotion_channel”: “1”,
    “app_ver_name”: “1.7”,
    “imei”: “”,
    “app_ver_code”: “23”,
    “pid”: “pid”,
    “net_type”: “3”,
    “device_id”: “m.88:1f:a1:03:7d:a8”,
    “app_device_id”: “m.88:1f:a1:03:7d:a8”,
    “release_channel”: “appstore”,
    “country”: “CN”,
    “time_zone”: “28800000”,
    “os_name”: “ios”,
    “manufacture”: “apple”,
    “commit_id”: “fde7ee2e48494b24bf3599771d7c2a78”,
    “app_token”: “XIAONIU_I”,
    “account”: “none”,
    “app_id”: “com.appid.xiaoniu”,
    “build_num”: “YVF6R16303000403”,
    “language”: “zh”
    }
    }
  2. map逻辑

package hive.mapreduce;

import java.io.IOException;

import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;

public class HiveDriver3 {

    public static class HiveMapper3 extends Mapper<LongWritable, Text, NullWritable, Text> {
        ObjectMapper objectMapper = null;
        Text text = null;
        NullWritable nullWritable = NullWritable.get();
        @Override
        protected void setup(Mapper<LongWritable, Text, NullWritable, Text>.Context context)
                throws IOException, InterruptedException {
            // TODO Auto-generated method stub
            // 获取一个映射JSON格式数据的对象;
            objectMapper = new ObjectMapper();
            text = new Text();
        }

        @Override
        protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, NullWritable, Text>.Context context)
                throws IOException, InterruptedException {
            // TODO Auto-generated method stub
            // 获取json格式数据
            JsonNode readTree = objectMapper.readTree(value.toString());
            // 由key——header获得value
            JsonNode header = readTree.get("header");
            // release_channel,device_id,city,device_id_type,app_ver_name
            // 获取需要筛选的字段
            String release_channel = header.get("release_channel").getTextValue();
            String device_id = header.get("device_id").getTextValue();
            String city = header.get("city").getTextValue();
            String device_id_type = header.get("device_id_type").getTextValue();
            String app_ver_name = header.get("app_ver_name").getTextValue();
            String android_id = header.get("android_id").getTextValue();
            // 判断字段对应的value值是否存在
            if (StringUtils.isBlank(release_channel) || StringUtils.isBlank(device_id) || StringUtils.isBlank(city)
                    || StringUtils.isBlank(device_id_type) || StringUtils.isBlank(app_ver_name)) {
                return;
            }

            // 增加一个字段user_id
            String user_id;
            if ("android".equals(device_id_type)) {
                if (StringUtils.isNotBlank(android_id)) {
                    user_id = android_id;
                } else {
                    return;
                }
            } else {
                user_id = device_id;
            }

            StringBuilder sb = new StringBuilder();

            sb.append(header.get("cid_sn").getTextValue()).append(",");
            sb.append(header.get("mobile_data_type").getTextValue()).append(",");
            sb.append(header.get("os_ver").getTextValue()).append(",");
            sb.append(header.get("mac").getTextValue()).append(",");
            sb.append(header.get("resolution").getTextValue()).append(",");
            sb.append(header.get("commit_time").getTextValue()).append(",");
            sb.append(header.get("sdk_ver").getTextValue()).append(",");
            sb.append(header.get("device_id_type").getTextValue()).append(",");
            sb.append(header.get("city").getTextValue()).append(",");
            sb.append(header.get("android_id").getTextValue()).append(",");
            sb.append(header.get("device_model").getTextValue()).append(",");
            sb.append(header.get("carrier").getTextValue()).append(",");
            sb.append(header.get("promotion_channel").getTextValue()).append(",");
            sb.append(header.get("app_ver_name").getTextValue()).append(",");
            sb.append(header.get("imei").getTextValue()).append(",");
            sb.append(header.get("app_ver_code").getTextValue()).append(",");
            sb.append(header.get("pid").getTextValue()).append(",");
            sb.append(header.get("net_type").getTextValue()).append(",");
            sb.append(header.get("device_id").getTextValue()).append(",");
            sb.append(header.get("app_device_id").getTextValue()).append(",");
            sb.append(header.get("release_channel").getTextValue()).append(",");
            sb.append(header.get("country").getTextValue()).append(",");
            sb.append(header.get("time_zone").getTextValue()).append(",");
            sb.append(header.get("os_name").getTextValue()).append(",");
            sb.append(header.get("manufacture").getTextValue()).append(",");
            sb.append(header.get("commit_id").getTextValue()).append(",");
            sb.append(header.get("app_token").getTextValue()).append(",");
            sb.append(header.get("account").getTextValue()).append(",");
            sb.append(header.get("app_id").getTextValue()).append(",");
            sb.append(header.get("build_num").getTextValue()).append(",");
            sb.append(header.get("language").getTextValue()).append(",");
            sb.append(user_id);

            text.set(sb.toString());
            context.write(nullWritable, text);
        }
    }

    public static void main(String[] args) throws Exception {
        Configuration conf = new Configuration();
        conf.set("mapreduce.framework.name", "local");
        Job job = Job.getInstance(conf);

        job.setJarByClass(HiveDriver3.class);

        job.setMapperClass(HiveMapper3.class);


        job.setOutputKeyClass(NullWritable.class);
        job.setOutputValueClass(Text.class);

        FileInputFormat.setInputPaths(job, new Path("D:/join/input/20170101/"));
        FileOutputFormat.setOutputPath(job, new Path("D:/join/output/20170101/"));

        job.setNumReduceTasks(0);
        boolean res = job.waitForCompletion(true);
        if (res) {
            System.out.println("运行成功!!!!!!");
        } else {
            System.out.println("运行失败!!!!!!");
        }
    }
}

分布式并发运算

活跃用户查询 ——##

//建模
1.创建原始数据表
create table app.ods_applog(
cid_sn string
,mobile_data_type string
,os_ver string
,mac string
,resolution string
,commit_time string
,sdk_ver string
,device_id_type string
,city string
,android_id string
,device_model string
,carrier string
,promotion_channel string
,app_ver_name string
,imei string
,app_ver_code string
,pid string
,net_type string
,device_id string
,app_device_id string
,release_channel string
,country string
,time_zone string
,os_name string
,manufacture string
,commit_id string
,app_token string
,account string
,app_id string
,build_num string
,language string
,user_id string
)
partitioned by (day string)
row format delimited fields terminated by ‘\001’;

// 每日活跃用户信息表
//release_channel,,city,,app_ver_name,user_id
create table app.reg_user_data(
city string,
release_channel string,
user_id string,
app_ver_name string)
partitioned by (day string);

// 每日活跃用户维度统计报表

create table app.dimensionality_user_data(
city string,
release_channel string,
app_ver_name string,
amount int)
partitioned by (day string,flag string);

// 2、每日加载预处理后的数据到ods_applog
load data local inpath ‘/root/applog/20170101/’ into table app.ods_applog partition(day=’20170101’);
load data local inpath ‘/root/applog/20170102/’ into table app.ods_applog partition(day=’20170102’);

查询
select * from app.ods_applog where day=20170101;
// 3、开始分析
3.1 统计当日活跃用户(当日出现过的用户)
最终统计目标:各维度组合下的活跃用户数

时间,城市,渠道,版本,活跃用户数
北京,appstore,3.2,89009

步骤:一般可以先抽取(ETL)出当日的活跃用户的信息
然后再统计需要的报表

步骤1:抽取活跃用户信息(对每个用户保留最早的一条数据,保留“城市、渠道、版本、user_id”)
// 2017-01-01

insert into table app.reg_user_data partition(day=’20170101’)
select city,release_channel,app_ver_name,user_id
from
(
select city,release_channel,app_ver_name,user_id,
row_number() over(partition by user_id order by commit_time) as rannk
from app.ods_applog where day=’20170101’
) d1
where d1.rannk=1;

步骤2:统计出活跃用户维度报表

时间, 城市, 渠道, 版本, 活跃用户数
20170101 0 0 0
20170101 0 0 1
20170101 0 1 0
20170101 0 1 1
20170101 1 0 0
20170101 1 0 1
20170101 1 1 0
20170101 1 1 1

// multiple insert 功能,多重插入:对同一张表进行多重查询并将结果插入到另一张表

from app.reg_user_data

insert into table dimensionality_user_data partition(day=’20170101’,flag=’000’)
select ‘all’,’all’,’all’,count(1)

insert into table dimensionality_user_data partition(day=’20170101’,flag=’001’)
select ‘all’,’all’,app_ver_name,count(1)
group by app_ver_name

insert into table dimensionality_user_data partition(day=’20170101’,flag=’010’)
select ‘all’,release_channel,’all’,count(1)
group by release_channel

insert into table dimensionality_user_data partition(day=’20170101’,flag=’011’)
select ‘all’,release_channel,app_ver_name,count(1)
group by release_channel,app_ver_name

insert into table dimensionality_user_data partition(day=’20170101’,flag=’100’)
select city,’all’,’all’,count(1)
group by city

insert into table dimensionality_user_data partition(day=’20170101’,flag=’101’)
select city,’all’,app_ver_name,count(1)
group by city,app_ver_name

insert into table dimensionality_user_data partition(day=’20170101’,flag=’110’)
select city,release_channel,’all’,count(1)
group by city,release_channel

insert into table dimensionality_user_data partition(day=’20170101’,flag=’111’)
select city,release_channel,app_ver_name,count(1)
group by city,release_channel,app_ver_name;

select * from dimensionality_user_data where day=’20170101’ and flag=’010’;
+——————————–+——————————————-+—————————————-+———————————-+——————————-+——————————–+–+
| dimensionality_user_data.city | dimensionality_user_data.release_channel | dimensionality_user_data.app_ver_name | dimensionality_user_data.amount | dimensionality_user_data.day | dimensionality_user_data.flag |
+——————————–+——————————————-+—————————————-+———————————-+——————————-+——————————–+–+
| all | 1003 | all | 10025 | 20170101 | 010 |
| all | 1006 | all | 9969 | 20170101 | 010 |
| all | 1007 | all | 10050 | 20170101 | 010 |
| all | 1009 | all | 10305 | 20170101 | 010 |
| all | appstore | all | 32799 | 20170101 | 010 |
+——————————–+——————————————-+—————————————-+———————————-+——————————-+——————————–+–+

新增用户查询 ——##

每日新用户统计:
//建模
// 每日新用户信息表(表结构与活跃用户信息表一致)
create table app.reg_user_new_data like app.reg_user_data;

// 历史用户表(之存储user_id)
create table app.reg_user_history_data(user_id string);

// 每日新用户维度统计报表
create table app.dim_user_new_data(
city string,
release_channel string,
app_ver_name string,
amount int)
partitioned by (day string,flag string);

思路:
1.抽取出当日的新用户信息(从当日活跃用户信息表etl_user_active_d中,抽取出新用户)
2.再做新用户的维度统计

步骤1.抽取新用户
// 1.将当日活跃用户比对历史表,得出当日新用户信息
// 2017-01-01

insert into table app.reg_user_new_data partition(day=’20170101’)
select city,release_channel,app_ver_name,user_id
from
(
select a.city,a.release_channel,a.app_ver_name,a.user_id,b.user_id as b_user_id
from app.reg_user_data a left join app.reg_user_history_data b
on a.user_id=b.user_id
where a.day=’20170101’
) t1
where b_user_id is null;

// 2017-01-02

insert into table app.reg_user_new_data partition(day=’20170102’)
select city,release_channel,app_ver_name,user_id
from
(
select a.city,a.release_channel,a.app_ver_name,a.user_id,b.user_id as b_user_id
from app.reg_user_data a left join app.reg_user_history_data b
on a.user_id=b.user_id
where a.day=’20170102’
) t1
where b_user_id is null;

// 2.将当日新用户的user_id插入历史用户表
// 2017-01-01
insert into table app.reg_user_history_data
select user_id from app.reg_user_new_data where day=’20170101’;

// 2017-01-02
insert into table app.reg_user_history_data
select user_id from app.reg_user_new_data where day=’20170102’;

// 步骤2:对新用户做维度统计报表
时间, 城市, 渠道, 版本, 新用户数
20170101 0 0 0
20170101 0 0 1
20170101 0 1 0
20170101 0 1 1
20170101 1 0 0
20170101 1 0 1
20170101 1 1 0
20170101 1 1 1

from app.reg_user_new_data

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’000’)
select ‘all’,’all’,’all’,count(1)

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’001’)
select ‘all’,’all’,app_ver_name,count(1)
group by app_ver_name

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’010’)
select ‘all’,release_channel,’all’,count(1)
group by release_channel

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’011’)
select ‘all’,release_channel,app_ver_name,count(1)
group by release_channel,app_ver_name

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’100’)
select city,’all’,’all’,count(1)
group by city

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’101’)
select city,’all’,app_ver_name,count(1)
group by city,app_ver_name

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’110’)
select city,release_channel,’all’,count(1)
group by city,release_channel

insert into table app.dim_user_new_data partition(day=’20170102’,flag=’111’)
select city,release_channel,app_ver_name,count(1)
group by city,release_channel,app_ver_name;

alter table app.dim_user_new_data drop partition(day=’20170102’);

select * from app.dim_user_new_data where day=’20170102’ and flag=’010’;

+————————+————————-+–+
| dim_user_new_data.city | dim_user_new_data.release_channel | dim_user_new_data.app_ver_name | dim_user_new_data.amount | dim_user_new_data.day | dim_user_new_data.flag |
+————————-+————————————+———————————+—————————+————————+————————-+–+
| all | 1003 | all | 28116 | 20170102 | 010 |
| all | 1006 | all | 28174 | 20170102 | 010 |
| all | 1007 | all | 28431 | 20170102 | 010 |
| all | 1009 | all | 28886 | 20170102 | 010 |
| all | appstore | all | 76865 | 20170102 | 010 |
+————————-+————————————+———————————+—————————+————————+————————-+–+

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
近几年,云计算产业飞速发展,大数据处理技术也在不断成熟。与此同时,国内移动互联网市场规模不断扩大,用户数量已经超过5亿,并带来了海量的移动互联网流量数据。在此背景下,如何基于云计算大数据处理技术来承载海量网络数据处理业务,是一个非常有研究价值的课题。从移动互联网的现状来看,一方面移动数据流量猛增,给运营商带来了巨大的运营压力,需要其投入更多的资金来进行网络建设与升级,另一方面由于移动数据业务增长,传统的语音短信等业务出现下滑,导致运营商出现增量不增收的现状。因此研究如何使用通过流量通道获取到的海量移动互联网数据流量资源,对于电信运营商有着十分重大的意义。针对移动互联网流量数据的特性,本文对基于Hadoop的海量网络数据处理平台的关键技术进行了深入研究。具体来说,本文的主要研究内容和创新点如下: 1.提出了一种针对移动互联网的海量数据处理架构针对移动互联网中海量网络数据处理业务的特点和存在的问题进行相关研究,提出了一种承载海量网络数据处理业务的分布式数据采集、存储和分析的安全云计算平台架构。整个平台包含数据采集,数据存储,数据处理及流量安全检测四个部分,可以完美解决移动互联网流量数据数据的采集到最后的数据处理这一业务流程,通过引入云计算技术实现了对海量数据的存储及高效的数据处理,并基于云计算技术进行快速的异常流量检测来提高该平台的安全性。通过实验和具体的实际应用证明了该架构的可行性,且优化技术的应用对于提高海量网络数据处理业务的服务质量和安全性都有着明显的效果,后续基于该平台架构对其中的关键技术进行深入研究。 2.提出了一种基于分布式故障检测机制的高可靠数据采集框架数据采集是海量网络数据处理业务的首要工作,只有保证采集数据的完整和可信,后续进行的数据处理工作结果才有意义和价值。因此本文首先针对当前移动互联网流量数据采集的技术特点和难点进行了详细分析,包括分布式、高动态性、采集终端多样性、节点异构等等,然后针对这些数据采集的难度问题,本文引入了分布式网络故障检测技术,设计了一种适合移动互联网网络流量数据采集机制的分布式节点监控框架,该框架中提出了应用于数据采集的节点故障检测与处理算法和节点负载均衡算法,实现对海量网络数据采集框架的节点进行实时监控,并提供快速高效的故障检测机制,避免数据丢失。同时,该算法还实现了对节点的负载进行动态均衡,防止某些节点出现负载过重的情况。实验结果表明,该分布式节点监控框架,能够实现采集节点故障检测的快速处理和节点负载的动态均衡,保障移动互联网流量数据采集的可靠性和完整性。 3.提出了一种异构环境下的高效数据存储机制针对当前基于Hadoop的海量网络数据处理平台中数据存储问题,本文对分布式数据存储技术进行深入研究,并结合服务器性能评估技术提出了一种适用于异构环境下的高效数据存储算法。该算法在存储数据时引入节点的性能参数,并将节点间的数据块分布与节点性能相关联。一方面,该算法可以提高大数据的读写效率,另一方面可以提高后续数据处理作业的运行速率,提高数据本地化的任务比率。最后实验证明,该算法可以有效地提高存储空间利用率和异构云计算集群的数据处理性能。 4.提出了一种基于节点动态性能推断的任务分配算法海量网络数据的处理分析是海量网络数据处理平台最为核心的功能,数据处理的效率关系到整个海量网络数据处理平台的性能,因此对于该平台数据处理性能的优化是本文需要考虑的关键问题。当前,在构建云平台时,需要根据需求对云平台的硬件进行逐步扩容和升级,因此集群往往存在着硬件异构的情况。默认的数据处理计算主要是针对同构集群设计,在异构集群中性能会有很大程度的降低。因此结合当前海量网络数据处理平台的集群现状,本文研究并设计一种基于节点动态性能推断的任务分配算法。首先该算法在主节点中引入了节点动态性能推断模块,该模块采用基于指数平滑预测法实现对该集群中运行的作业历史数据学习分析,从而计算出集群中各个节点的计算能力。然后本文结合集群节点的性能指标对Reduce任务分配算法和推测性任务执行机制进行改进,实现集群可以动态选择最佳节点来运行数据处理任务。实验结果表明该算法可以有效地提高异构集群数据处理性能和集群的稳定性,减少异构集群的计算资源浪费,提高了云计算平台的资源利用率。5.一种基于分类器联合的分布式异常流量检测算法海量网络数据处理平台中存在着大量的实时数据流,该数据具有价值高、流量大等特点。同时,云计算平台本身具有强大的计算能力和存储资源,极易成为黑客的攻击目标。而云计算的环境极其复杂和多样化,具有跨地域、异构化、虚拟化等特点,使用传统的网络安全防御技术已经无法满足云计算的信息安全防御需求。因此在传统网络安全防御技术的基础上,本文需要进一步加强云平台的安全保障。针对当前海量网络数据处理平台的业务特点,本文对异常流量检测技术和云计算技术的结合进行了相关研究,提出了一种基于云计算技术的分类器联合检测算法。该算法联合了无监督的模糊K-均值分类算法和有监督的朴素贝叶斯分类算法,有效地避免单一分类算法在检测大流量数据时的缺陷,更为全面地对网络流量进行异常检测。同时,本文基于Mahout技术实现了这两个分类算法在MapReduce框架上的海量数据流的分类计算,极大地提高了异常流量检测的效率。最后通过实验证明,基于分类器联合的分布式异常流量检测算法可以快速有效地对海量网络数据流进行检测,并保持较高的检测准确率和较低的误报率。该算法可以有效地提高云平台的安全性,是对云平台网络安全防御体系的有效补充。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值