You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
hbyd_ueba_fe/src/app/routes/config/layout/manage/manage.component.ts

1062 lines
36 KiB

import { Component, OnInit,Injectable } from '@angular/core';
import { NzMessageService } from 'ng-zorro-antd';
import { NoticeService } from '../../service/https/notice.service';
import { CacheService } from '../../service/cache/cache.service';
import { PathComponent } from './path/path.component';
import { ProcessComponent } from './process/process.component';
import { Subscription } from 'rxjs';
import * as XLSX from 'xlsx';
import { saveAs } from 'file-saver';
const EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';
const EXCEL_EXTENSION = '.xlsx';
// data mapping
// IP
const ipKeyMaps = {
'company': '归属单位',
'req_frequency': '访问频次',
'frequency_rate': '频次占比',
'ip_count': 'IP计数',
'ip_rate': 'IP占比',
'ip_avg': 'IP均值',
'trend': '访问趋势',
};
const accountKeyMaps = {
'company': '归属单位',
'req_frequency': '访问频次',
'frequency_rate': '频次占比',
'account_count': 'IP计数',
'account_rate': 'IP占比',
'account_avg': 'IP均值',
'trend': '访问趋势',
};
const interfaceKeyMaps = {
'interface_addr': '接口地址',
'req_frequency': '访问频次',
'frequency_rate': '频次占比',
'frequency_avg': '频次均值',
'trend': '访问趋势',
};
const menuKeyMaps = {
'menu_name': '菜单名称',
'req_frequency': '访问频次',
'frequency_rate': '频次占比',
'frequency_avg': '频次均值',
'trend': '访问趋势',
};
@Component({
selector: 'app-manage',
templateUrl: './manage.component.html',
styleUrls: ['./manage.component.styl']
})
@Injectable({
providedIn: 'root'
})
export class ManageComponent implements OnInit {
summary_detal_data :any;
tableisShow :any;
dateFormat = 'yyyy/MM/dd HH:mm:ss'
submitLoading = false;
logLoading = false;
dateRange = []
listOfData = []
iphead = []
dimension = '1'
isVisible = false
detail_data : any;
destroySubscriptions: Subscription[] = [];
constructor(
private noticeService: NoticeService,
public message: NzMessageService,
public cache: CacheService
) { }
exportAsExcelFile(json: any[], excelFileName: string): void {
const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
const workbook: XLSX.WorkBook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };
const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
this.saveAsExcelFile(excelBuffer, excelFileName);
}
private saveAsExcelFile(buffer: any, fileName: string): void {
const data: Blob = new Blob([buffer], {
type: EXCEL_TYPE
});
saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);
}
onSubmit(){
// 日期校验
this.submitLoading = true;
this.tableisShow = this.dimension;
if (this.dateRange.length === 2) {
const startDate = this.dateRange[0];
const endDate = this.dateRange[1];
console.log(startDate);
//alert(`Selected Date Range: ${startDate.toLocaleDateString()} - ${endDate.toLocaleDateString()}`);
} else {
alert('Please select a date range.');
}
// 获取es的查询最大日期范围
// this.noticeService.getQueryRange().subscribe(resp => {
// if (resp.status === 200) {
// console.log(resp.data);
// } else {
// this.message.error(resp.msg);
// }
// },
// error => {
// this.message.error('服务器错误');
// })
// 获取es数据 暂时mock数据
this.summary_detal_data = this.mockData
this.listOfData=[]
if (this.summary_detal_data.code === 0) {
switch(this.dimension.toString()){
case "1":
this.listOfData = this.summary_detal_data.data.summary.ip;
console.log("1"+this.dimension.toString())
break;
case "2":
this.listOfData = this.summary_detal_data.data.summary.account;
console.log("2"+this.dimension.toString())
break;
case "3":
this.listOfData = this.summary_detal_data.data.summary.interface;
console.log("3"+this.dimension.toString())
break;
case "4":
this.listOfData = this.summary_detal_data.data.summary.menu;
console.log("4"+this.dimension.toString())
break;
}
} else {
this.message.error("error");
}
// this.listOfData = resp.data.summary.ip;
// this.noticeService.getUebaResult({"type":eventVal}).subscribe(resp => {
// if (resp.code === 200) {
// switch(this.dimension.toString()){
// case "1":
// this.listOfData = resp.summary.ip;
// case "2":
// this.listOfData = resp.summary.account;
// case "3":
// this.listOfData = resp.summary.interface;
// case "4":
// this.listOfData = resp.summary.menu;
// }
// } else {
// this.message.error(resp.msg);
// }
// },
// error => {
// this.message.error('服务器错误');
// })
}
ngOnInit() {
const now = new Date();
const oneWeekAgo = new Date();
oneWeekAgo.setDate(now.getDate() - 7);
this.dateRange = [oneWeekAgo, now];
this.onSubmit()
}
getMenuItem(e) {
console.log(e.el.dataset.id);
// this.key = e.el.dataset.id;
}
exportExcel(){
var keysMap :any;
var fileName = "";
switch(this.dimension){
case "1":
keysMap= ipKeyMaps;
fileName="ip维度"
break;
case "2":
keysMap= accountKeyMaps;
fileName="账号维度"
break;
case "3":
keysMap= interfaceKeyMaps;
fileName="接口维度"
break;
case "4":
keysMap= menuKeyMaps;
fileName="菜单维度"
break;
}
console.log(JSON.stringify(keysMap));
var data =this.convertKeys(this.listOfData,keysMap)
this.exportAsExcelFile(data,fileName);
}
showModel(data){
var tmpdata :any;
switch(data.type){
case 1:
tmpdata=this.summary_detal_data.data.detail.ip[data.key];
break;
case 2 :
tmpdata=this.summary_detal_data.data.detail.account[data.key];
break;
case 3 :
tmpdata=this.summary_detal_data.data.detail.interface[data.key];
break;
case 4 :
tmpdata=this.summary_detal_data.data.detail.menu[data.key];
break;
}
var diagData = {
"type": data.type,
[data.key]: tmpdata
}
this.detail_data =diagData;
console.log(JSON.stringify(this.detail_data));
this.isVisible=true;
}
cancelSearch(): void {
this.submitLoading = false;
this.logLoading = false;
this.destroySubscriptions.forEach(subscription => {
if (subscription) {
subscription.unsubscribe();
}
});
}
convertKeys<Raw = any, Target = any>(excelData: Raw[], keysMap: Record<string, string>): Target[] {
return excelData.map(excelItem => {
const reorderedItem: any = {};
// 按照keysMap中定义的顺序重建对象
Object.entries(keysMap).forEach(([originalKey, newKey]) => {
if (excelItem.hasOwnProperty(originalKey)) {
reorderedItem[newKey] = excelItem[originalKey];
}
});
return reorderedItem;
});
}
mockData={
"message": "success",
"code": 0,
"data": {
"detail": {
"interface": {
"http://190.89.233.2:8909/getUser": [
{
"req_ip": "192.156.3.12",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 54411,
"req_frequency": 23,
"req_account": "zhangq"
},
{
"req_ip": "192.156.3.12",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 54412,
"req_frequency": 24,
"req_account": "huqx"
},
{
"req_ip": "192.156.3.13",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 54413,
"req_frequency": 25,
"req_account": "zhangsf"
},
{
"req_ip": "192.156.3.14",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 54414,
"req_frequency": 26,
"req_account": "zhaoj"
},
{
"req_ip": "192.156.3.15",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 54415,
"req_frequency": 27,
"req_account": "sangdq"
},
{
"req_ip": "192.156.3.16",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 54416,
"req_frequency": 28,
"req_account": "hujt"
},
{
"req_ip": "192.156.3.17",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 43325,
"req_frequency": 29,
"req_account": "zhangs"
},
{
"req_ip": "192.156.3.18",
"interface_addr": "http://190.89.233.2:8909/getUser",
"req_jobnum": 43326,
"req_frequency": 30,
"req_account": "lin"
}
],
"http://190.89.233.2:8909/update/sysconfig": [
{
"req_ip": "192.106.3.35",
"interface_addr": "http://190.89.233.2:8909/update/sysconfig",
"req_jobnum": 54415,
"req_frequency": 34,
"req_account": "zhangsf"
},
{
"req_ip": "192.106.3.36",
"interface_addr": "http://190.89.233.2:8909/update/sysconfig",
"req_jobnum": 54416,
"req_frequency": 23,
"req_account": "zhaoj"
},
{
"req_ip": "192.106.3.37",
"interface_addr": "http://190.89.233.2:8909/update/sysconfig",
"req_jobnum": 43325,
"req_frequency": 78,
"req_account": "sangdq"
},
{
"req_ip": "192.146.3.38",
"interface_addr": "http://190.89.233.2:8910/update/sysconfig",
"req_jobnum": 43326,
"req_frequency": 79,
"req_account": "hujt"
},
{
"req_ip": "192.146.3.39",
"interface_addr": "http://190.89.233.2:8911/update/sysconfig",
"req_jobnum": 43327,
"req_frequency": 80,
"req_account": "zhangs"
},
{
"req_ip": "192.146.3.40",
"interface_addr": "http://190.89.233.2:8912/update/sysconfig",
"req_jobnum": 43328,
"req_frequency": 81,
"req_account": "lin"
},
{
"req_ip": "192.146.3.41",
"interface_addr": "http://190.89.233.2:8913/update/sysconfig",
"req_jobnum": 65341,
"req_frequency": 82,
"req_account": "liuhr"
},
{
"req_ip": "192.146.3.42",
"interface_addr": "http://190.89.233.2:8914/update/sysconfig",
"req_jobnum": 65342,
"req_frequency": 83,
"req_account": "sunxq01"
},
{
"req_ip": "192.146.3.43",
"interface_addr": "http://190.89.233.2:8915/update/sysconfig",
"req_jobnum": 65343,
"req_frequency": 84,
"req_account": "xiaod01"
},
{
"req_ip": "192.146.3.44",
"interface_addr": "http://190.89.233.2:8916/update/sysconfig",
"req_jobnum": 98761,
"req_frequency": 85,
"req_account": "qingsx"
},
{
"req_ip": "192.146.3.45",
"interface_addr": "http://190.89.233.2:8917/update/sysconfig",
"req_jobnum": 98761,
"req_frequency": 86,
"req_account": "guobg"
},
{
"req_ip": "192.146.3.46",
"interface_addr": "http://190.89.233.2:8918/update/sysconfig",
"req_jobnum": 98761,
"req_frequency": 87,
"req_account": "zhangq"
}
],
"http://190.89.233.2:8909/getpublicconfig": [
{
"req_ip": "192.156.3.12",
"interface_addr": "http://190.89.233.2:8909/getpublicconfig",
"req_jobnum": 43327,
"req_frequency": 43,
"req_account": "liuhr"
},
{
"req_ip": "192.156.3.12",
"interface_addr": "http://190.89.233.2:8909/getpublicconfig",
"req_jobnum": 43328,
"req_frequency": 44,
"req_account": "sunxq01"
},
{
"req_ip": "192.156.3.18",
"interface_addr": "http://190.89.233.2:8909/getpublicconfig",
"req_jobnum": 65341,
"req_frequency": 45,
"req_account": "shicl"
},
{
"req_ip": "192.106.3.33",
"interface_addr": "http://190.89.233.2:8909/getpublicconfig",
"req_jobnum": 65342,
"req_frequency": 46,
"req_account": "gongxs"
},
{
"req_ip": "192.106.3.34",
"interface_addr": "http://190.89.233.2:8909/getpublicconfig",
"req_jobnum": 65343,
"req_frequency": 47,
"req_account": "sunzs"
}
]
},
"ip": {
"省公司": [
{
"req_ip": "192.146.3.38",
"req_frequency": 123
},
{
"req_ip": "192.146.3.39",
"req_frequency": 124
},
{
"req_ip": "192.146.3.40",
"req_frequency": 125
},
{
"req_ip": "192.146.3.41",
"req_frequency": 126
},
{
"req_ip": "192.146.3.42",
"req_frequency": 127
},
{
"req_ip": "192.146.3.43",
"req_frequency": 128
},
{
"req_ip": "192.146.3.44",
"req_frequency": 129
},
{
"req_ip": "192.146.3.45",
"req_frequency": 130
},
{
"req_ip": "192.146.3.46",
"req_frequency": 131
},
{
"req_ip": "192.146.3.47",
"req_frequency": 132
}
],
"孝感分公司": [
{
"req_ip": "192.126.3.24",
"req_frequency": 54
},
{
"req_ip": "192.126.3.25",
"req_frequency": 55
},
{
"req_ip": "192.126.3.26",
"req_frequency": 56
},
{
"req_ip": "192.126.3.27",
"req_frequency": 57
},
{
"req_ip": "192.126.3.28",
"req_frequency": 58
},
{
"req_ip": "192.126.3.29",
"req_frequency": 59
},
{
"req_ip": "192.106.3.30",
"req_frequency": 60
}
],
"黄冈分公司": [
{
"req_ip": "192.106.3.30",
"req_frequency": 51
},
{
"req_ip": "192.106.3.31",
"req_frequency": 52
},
{
"req_ip": "192.106.3.32",
"req_frequency": 53
},
{
"req_ip": "192.106.3.33",
"req_frequency": 54
},
{
"req_ip": "192.106.3.34",
"req_frequency": 55
},
{
"req_ip": "192.106.3.35",
"req_frequency": 56
},
{
"req_ip": "192.106.3.36",
"req_frequency": 57
},
{
"req_ip": "192.106.3.37",
"req_frequency": 58
},
{
"req_ip": "192.106.3.38",
"req_frequency": 59
}
],
"随州分公司": [
{
"req_ip": "192.116.3.24",
"req_frequency": 44
},
{
"req_ip": "192.116.3.25",
"req_frequency": 45
},
{
"req_ip": "192.116.3.26",
"req_frequency": 46
},
{
"req_ip": "192.116.3.27",
"req_frequency": 47
},
{
"req_ip": "192.116.3.28",
"req_frequency": 48
},
{
"req_ip": "192.116.3.29",
"req_frequency": 49
},
{
"req_ip": "192.116.3.30",
"req_frequency": 50
}
],
"宜昌分公司": [
{
"req_ip": "192.156.3.11",
"req_frequency": 22
},
{
"req_ip": "192.156.3.12",
"req_frequency": 12
},
{
"req_ip": "192.156.3.19",
"req_frequency": 78
},
{
"req_ip": "192.156.3.20",
"req_frequency": 79
},
{
"req_ip": "192.156.3.21",
"req_frequency": 80
},
{
"req_ip": "192.156.3.22",
"req_frequency": 81
},
{
"req_ip": "192.156.3.23",
"req_frequency": 82
},
{
"req_ip": "192.156.3.24",
"req_frequency": 83
}
]
},
"account": {
"省公司": [
{
"req_jobnum": 98761,
"req_frequency": 37,
"req_account": "maoxt"
},
{
"req_jobnum": 98761,
"req_frequency": 29,
"req_account": "xiaod01"
},
{
"req_jobnum": 98761,
"req_frequency": 71,
"req_account": "qingsx"
},
{
"req_jobnum": 98761,
"req_frequency": 79,
"req_account": "guobg"
}
],
"孝感分公司": [
{
"req_jobnum": 43325,
"req_frequency": 98,
"req_account": "zhangs"
},
{
"req_jobnum": 43326,
"req_frequency": 43,
"req_account": "lin"
},
{
"req_jobnum": 43327,
"req_frequency": 33,
"req_account": "liuhr"
},
{
"req_jobnum": 43328,
"req_frequency": 51,
"req_account": "sunxq01"
}
],
"黄冈分公司": [
{
"req_jobnum": 65341,
"req_frequency": 47,
"req_account": "shicl"
},
{
"req_jobnum": 65342,
"req_frequency": 65,
"req_account": "gongxs"
},
{
"req_jobnum": 65343,
"req_frequency": 54,
"req_account": "sunzs"
}
],
"随州分公司": [
{
"req_jobnum": 54415,
"req_frequency": 36,
"req_account": "sangdq"
},
{
"req_jobnum": 54416,
"req_frequency": 37,
"req_account": "hujt"
}
],
"宜昌分公司": [
{
"req_jobnum": 54412,
"req_frequency": 33,
"req_account": "huqx"
},
{
"req_jobnum": 54413,
"req_frequency": 34,
"req_account": "zhangsf"
},
{
"req_jobnum": 54414,
"req_frequency": 35,
"req_account": "zhaoj"
}
]
},
"menu": {
"菜单1": [
{
"menu_name": "菜单1",
"req_ip": "192.106.3.32",
"req_jobnum": "43326",
"req_frequency": 53,
"req_account": "lin"
},
{
"menu_name": "菜单1",
"req_ip": "192.106.3.33",
"req_jobnum": "43327",
"req_frequency": 54,
"req_account": "liuhr"
},
{
"menu_name": "菜单1",
"req_ip": "192.106.3.34",
"req_jobnum": "43328",
"req_frequency": 55,
"req_account": "sunxq01"
},
{
"menu_name": "菜单1",
"req_ip": "192.106.3.35",
"req_jobnum": "65341",
"req_frequency": 56,
"req_account": "shicl"
},
{
"menu_name": "菜单1",
"req_ip": "192.106.3.36",
"req_jobnum": "65342",
"req_frequency": 57,
"req_account": "gongxs"
},
{
"menu_name": "菜单1",
"req_ip": "192.106.3.37",
"req_jobnum": "65343",
"req_frequency": 58,
"req_account": "sunzs"
}
],
"菜单2": [
{
"menu_name": "菜单2",
"req_ip": "192.156.3.12",
"req_jobnum": "54411",
"req_frequency": 31,
"req_account": "zhangq"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.12",
"req_jobnum": "54412",
"req_frequency": 32,
"req_account": "huqx"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.13",
"req_jobnum": "54413",
"req_frequency": 33,
"req_account": "zhangsf"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.14",
"req_jobnum": "54414",
"req_frequency": 34,
"req_account": "zhaoj"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.15",
"req_jobnum": "54415",
"req_frequency": 35,
"req_account": "sangdq"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.16",
"req_jobnum": "54416",
"req_frequency": 36,
"req_account": "hujt"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.17",
"req_jobnum": "43325",
"req_frequency": 37,
"req_account": "zhangs"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.18",
"req_jobnum": "43326",
"req_frequency": 38,
"req_account": "lin"
},
{
"menu_name": "菜单2",
"req_ip": "192.156.3.12",
"req_jobnum": "43327",
"req_frequency": 39,
"req_account": "liuhr"
}
],
"菜单3": [
{
"menu_name": "菜单3",
"req_ip": "192.106.3.33",
"req_jobnum": "65342",
"req_frequency": 51,
"req_account": "gongxs"
},
{
"menu_name": "菜单3",
"req_ip": "192.106.3.34",
"req_jobnum": "65343",
"req_frequency": 52,
"req_account": "sunzs"
},
{
"menu_name": "菜单3",
"req_ip": "192.106.3.35",
"req_jobnum": "54415",
"req_frequency": 53,
"req_account": "zhangsf"
},
{
"menu_name": "菜单3",
"req_ip": "192.106.3.36",
"req_jobnum": "54416",
"req_frequency": 54,
"req_account": "zhaoj"
},
{
"menu_name": "菜单3",
"req_ip": "192.106.3.37",
"req_jobnum": "43325",
"req_frequency": 55,
"req_account": "sangdq"
},
{
"menu_name": "菜单3",
"req_ip": "192.146.3.38",
"req_jobnum": "43326",
"req_frequency": 56,
"req_account": "hujt"
},
{
"menu_name": "菜单3",
"req_ip": "192.146.3.39",
"req_jobnum": "43327",
"req_frequency": 57,
"req_account": "zhangs"
},
{
"menu_name": "菜单3",
"req_ip": "192.146.3.40",
"req_jobnum": "43328",
"req_frequency": 58,
"req_account": "lin"
},
{
"menu_name": "菜单3",
"req_ip": "192.146.3.41",
"req_jobnum": "65341",
"req_frequency": 59,
"req_account": "liuhr"
},
{
"menu_name": "菜单3",
"req_ip": "192.146.3.42",
"req_jobnum": "65342",
"req_frequency": 60,
"req_account": "sunxq01"
},
{
"menu_name": "菜单3",
"req_ip": "192.146.3.43",
"req_jobnum": "65343",
"req_frequency": 61,
"req_account": "xiaod01"
}
]
}
},
"summary": {
"interface": [
{
"trend": 0.07,
"frequency_avg": 0,
"interface_addr": "http://190.89.233.2:8909/getUser",
"frequency_rate": 0.160727824109174,
"req_frequency": 212
},
{
"trend": 0.02,
"frequency_avg": 0,
"interface_addr": "http://190.89.233.2:8909/getpublicconfig",
"frequency_rate": 0.170583775587566,
"req_frequency": 225
},
{
"trend": -0.09,
"frequency_avg": 0,
"interface_addr": "http://190.89.233.2:8909/update/sysconfig",
"frequency_rate": 0.66868840030326,
"req_frequency": 882
}
],
"ip": [
{
"trend": 0.09,
"company": "宜昌分公司",
"ip_rate": 0.195121951219512,
"ip_count": 8,
"ip_avg": 2.14344941956882,
"req_frequency": 517,
"frequency_rate": 17.1475953565506
},
{
"trend": 0.1,
"company": "随州分公司",
"ip_rate": 0.170731707317073,
"ip_count": 7,
"ip_avg": 1.55887230514096,
"req_frequency": 329,
"frequency_rate": 10.9121061359867
},
{
"trend": -0.07,
"company": "孝感分公司",
"ip_rate": 0.170731707317073,
"ip_count": 7,
"ip_avg": 1.89054726368159,
"req_frequency": 399,
"frequency_rate": 13.2338308457711
},
{
"trend": -0.02,
"company": "黄冈分公司",
"ip_rate": 0.219512195121951,
"ip_count": 9,
"ip_avg": 1.82421227197347,
"req_frequency": 495,
"frequency_rate": 16.4179104477612
},
{
"trend": 0.1,
"company": "省公司",
"ip_rate": 0.24390243902439,
"ip_count": 10,
"ip_avg": 4.22885572139304,
"req_frequency": 1275,
"frequency_rate": 42.2885572139304
}
],
"account": [
{
"account_rate": 0.242424242424242,
"account_avg": 2.46323529411765,
"trend": 0.09,
"company": "宜昌分公司",
"req_frequency": 134,
"account_count": 8,
"frequency_rate": 19.7058823529412
},
{
"account_rate": 0.212121212121212,
"account_avg": 1.53361344537815,
"trend": 0.1,
"company": "随州分公司",
"req_frequency": 73,
"account_count": 7,
"frequency_rate": 10.7352941176471
},
{
"account_rate": 0.212121212121212,
"account_avg": 4.72689075630252,
"trend": -0.07,
"company": "孝感分公司",
"req_frequency": 225,
"account_count": 7,
"frequency_rate": 33.0882352941176
},
{
"account_rate": 0.272727272727273,
"account_avg": 2.71241830065359,
"trend": -0.02,
"company": "黄冈分公司",
"req_frequency": 166,
"account_count": 9,
"frequency_rate": 24.4117647058824
},
{
"account_rate": 0.303030303030303,
"account_avg": 3.17647058823529,
"trend": 0.1,
"company": "省公司",
"req_frequency": 216,
"account_count": 10,
"frequency_rate": 31.7647058823529
}
],
"menu": [
{
"menu_name": "菜单1",
"trend": 0.09,
"frequency_avg": 111,
"frequency_rate": 0.263449367088608,
"req_frequency": 333
},
{
"menu_name": "菜单2",
"trend": -0.01,
"frequency_avg": 105,
"frequency_rate": 0.249208860759494,
"req_frequency": 315
},
{
"menu_name": "菜单3",
"trend": 0.02,
"frequency_avg": 205.333333333333,
"frequency_rate": 0.487341772151899,
"req_frequency": 616
}
]
}
}
}
}