1. 站立分析

对帕金森病人的站立行为进行分析。

POST:http://api.hannm.com/parstand

字段名 字段位置 字段类型 字段说明 举例 必选
apiv head string api版本,默认是1.0.0 1.0.0 可选
authorization head string 客户端保存的鉴权token authorization字符串 必选
datas body string 由加速度传感器采集到的三轴空间加速度计算得到的综合加速度 每项综合加速度为浮点型,如"9.844848964777322,10.098043919503889,9.99823044538949,9.77082804716528,9.692361060774806,9.690657244063432,9.758696099450848,9.804135466866596,9.824426844371272,9.972158272964226" 必选
freq body int 采样频率 32hz 必选
type body string datas的类型,格式 必选
type字段 描述 举例
acca 综合加速度数据,加速度之间由逗号隔开 如"9.844848964777322,10.098043919503889,9.99823044538949,9.77082804716528,9.692361060774806,9.690657244063432,9.758696099450848,9.804135466866596,9.824426844371272,9.972158272964226"
ictparfile ICT文件格式 参考ICTparfile文件格式

返回数据

{ 
    "error": 0,
    "reason": 'Success',
    "result":{ 
        "score" : 1

}

成功返回

字段名 字段类型 字段说明 举例
score int 患者站立行为的得分,由stand_l或stand_r模型分析综合加速度的统计量(平均值,方差,最大值,最小值,极差,偏度,峰度)得到 1: ,2: ,3: ,4: ,5:
lot int 整个识别过程的时长

feature

特征必须严格按照如下方式从0开始排列。

字段名 字段类型 字段说明
accmean float 综合加速度的平均值
accmedian float 综合加速度的中位数
accvar float 综合加速度的方差
accskew float 综合加速度的偏度,即表征概率分布密度曲线相对于平均值不对称程度的特征数
acckurt float 综合加速度的峰度,即表征概率密度在均值处峰值高低的特征
accptp float 综合加速度的极差
accmax float 综合加速度的最大值
accmin float 综合加速度的最小值

以下为特征字段命名参考

字段名 字段类型 字段说明
accmean float 综合加速度的平均值
accmedian float 综合加速度的中位数
accstd float 综合加速度的标准差
accvar float 综合加速度的方差
accskew float 综合加速度的偏度,即表征概率分布密度曲线相对于平均值不对称程度的特征数
acckurt float 综合加速度的峰度,即表征概率密度在均值处峰值高低的特征
accptp float 综合加速度的极差
accmax float 综合加速度的最大值
accmin float 综合加速度的最小值
accidxmax float 综合加速度的最大值索引
accq1 float 综合加速度的四分位数,即该样本中所有数值由小到大排列后第25%的数字
acciqr float 综合加速度的四分位距,即第三四分位数(该样本中所有数值由小到大排列后第75%的数字)与第一四分位数的差距,用来表示数据的分散情形
accmad float 综合加速度的平均绝对偏差
acent float 综合加速度的熵,用来度量数据的不确定性
accmr float 综合加速度的过均值率
acrms float 综合加速度的均方根,计算方法为将所有值平方求和,求其均值,再开平方
accenergy float 综合加速度的时域能量,根据帕斯瓦尔定理,信号的时域能量等于其时域能量,所以feature里只提取时域能量
fmean float 综合加速度fft结果的平均值
fmedian float 综合加速度fft结果的中位数
fvar float 综合加速度fft结果的方差
fstd float 综合加速度fft结果的标准差
fskew float 综合加速度fft结果的偏度
fkurt float 综合加速度fft结果的最小值峰度
fptp float 综合加速度fft结果的极差
fmax float 综合加速度fft结果的最大值
fmin float 综合加速度fft结果的最小值
fidxmax float 综合加速度fft结果的最大值的索引
fq1 float 综合加速度fft结果的四分位数
fiqr float 综合加速度fft结果的四分位距
fmad float 综合加速度fft结果的平均绝对偏差
fent float 综合加速度fft结果的熵
fcmr float 综合加速度fft结果的过均值率
frms float 综合加速度fft结果的均方根

失败返回

{
    "error": 1,
    "reason": "失败原因",
    "result": {"失败的参考数据"},
}

1.1. 错误码

错误码来自于error字段

1.2. Browser SDK调用示例代码

const hannm = require('../lib/hannm')
async function test_addParStand() {
    const ham = await hannm({
        APP_KEY: "aHEVYhE1",
        APP_SECRET: "f34b127abc7cca1862dac91db6256190",
    })

    const res = await ham.addParStand({
        type    :"acca",
        freq    :32,
        datas   :"9.512733250236462, 9.542970478688723, 9.608663858412879, 9.765704891132192, 9.934364315441544, 10.0230297654335, 9.949282672363182, 9.790996656708778, 9.690102242545167, 9.638943380564239, 9.640340834374035, 9.652275095455698, 9.845394522444913, 10.03640823907093, 9.992435884578024, 9.899079473976963, 9.82829597149129, 9.74901663088625, 9.668182991538055, 9.637020236167077, 9.770546741887095, 9.940597732370168, 9.960789798862319, 9.882262303167618, 9.71343654227139, 9.599390615971997, 9.52522183000063, 9.475639996045992, 9.606649655341846, 9.80891085826566, 10.031508069412705, 10.193693175627207, 10.20210294571964, 9.91463198634375, 9.583825805442057, 9.557111182020057, 9.769418887375792, 9.96010009489157, 9.90987607669905, 9.848689536166408, 9.961502510794158, 9.878090854739149, 9.51455439002037, 9.616975606104702, 9.9508389620683, 10.007529267174048, 9.79165985210151, 9.531944801292855, 9.499929870782463, 9.779778553213339, 10.01862536385755, 9.944282919779983, 9.73776467559646, 9.603351662022112, 9.599492325333578, 9.704890471430648, 9.962700259029356, 10.002545716184802, 9.817558505439298, 9.668275148145945, 9.651468372709656, 9.71802488358921, 9.804783983852076, 9.787063843111193, 9.868662188638503, 9.890031766902299, 9.719546756848356, 9.616367763222517, 9.647401590628501, 9.829610873758153, 9.842464678026902, 9.857543053853568, 9.988768188525103, 9.958127446140963, 9.768132434209024, 9.644326085463126, 9.755146379603104, 9.905594442395657, 9.678230002109375, 9.584040809717731, 9.587029349681973, 9.634456324301613, 9.727742746394334, 9.764206978576425, 9.843188269257853, 9.94313448858688, 9.89332854803256, 9.797360154732624, 9.828228117530996, 9.898759138243825, 9.868805478784536, 9.693639836438647, 9.583757718815805, 9.610522015840612, 9.621173712345401, 9.791029846380683, 9.983307300333346, 9.955416694763835, 9.794110738283301, 9.72216861397719, 9.747012511456782, 9.816906753344812, 9.860689557527495, 9.848064757199026, 9.894799103605274, 9.854131449915416, 9.714096864188383, 9.540905639667976, 9.426594918237354, 9.486542428875287, 9.730722310534327, 10.059548001368615, 9.992701009967606, 9.90990452255095, 9.89528809625068, 9.889227646176161, 9.889698162764816, 9.954270126541418, 9.894607857159187, 9.690499574911316, 9.564872119058334, 9.558730438387183, 9.698497299454385, 9.945389403750898, 10.193876238664068, 10.117830297130254, 9.954399030449661, 9.773537417467832, 9.536639445980514, 9.352910050576876, 9.42387037466377, 9.710180265413802, 10.010280841280922, 10.075854831388442, 9.924052058142777, 9.832986448273749, 9.772268534265516, 9.655557851299731, 9.635578735882632, 9.727241786576917, 9.816607023514521, 9.87476064183189, 9.841197592578945, 9.760885422831269, 9.743424766308923, 9.903908290200722, 10.037934282995533, 9.903407186644154, 9.732625700736815, 9.618307750426855, 9.485855060764555, 9.539291144050962, 9.707010767082217, 9.932701288137737, 10.031191203494025, 10.022886888466292, 9.825748655161412, 9.639505158753764, 9.80237114416191, 10.017086981036467, 9.916228981371063, 9.750263578266043, 9.645999252878498, 9.627693500887078, 9.613882522409686, 9.678530268041442, 9.791949027177331, 9.918142676165328, 9.862761994952626, 9.727747490107424, 9.684138564649105, 9.72237153882412, 9.823278551824341, 9.916807666095078, 9.926696304929731, 9.828930882892385, 9.665127840674517, 9.669675624115634, 9.703187910337263, 9.790381378813219, 9.93658635274218, 9.901887272771587, 9.781786011525615, 9.697354332596465, 9.70194466818287, 9.785352406357353, 9.900975892266766, 9.854959452152722, 9.714756142604681, 9.65805031117581, 9.687513929624835, 9.696446147598145, 9.759666691824714, 9.957507987047773, 9.676490833527753, 9.578522032307808, 9.698079249902237, 9.81231958977375, 9.776688241785141, 9.75737319131758, 9.824372098986235, 9.953884517599532, 9.968124563178163, 9.93428495737422, 9.886384565027868, 9.778925283376854, 9.710464308888954, 9.703484755795275, 9.766692240905689, 9.742819769749213, 9.583684936080472, 9.565651230096783, 9.681887790069029, 10.00608667827473, 10.137779193031458, 9.885904700826108, 9.689838124686325, 9.570400412799435, 9.68116371098229, 9.844039264604062, 9.92548549505971, 9.877701163410478, 9.691323718801502, 9.46009466448393, 9.451336050749287, 9.653687191090551, 9.888580336244898, 10.03151561717643, 9.99349044701969, 9.815346891376239, 9.678060106654586, 9.663749756860298, 9.70098355058163, 9.797907745986862, 9.834702033874647, 9.882596041695614, 9.932934798248896, 9.844642347538858, 9.675484792786825, 9.500520174537897, 9.443754203624692, 9.70320390978423, 10.042387146286686, 10.06647171955999, 9.831883336648222, 9.611281209460843, 9.506599936012973, 9.794192937282471, 10.132564942232307, 9.992434035287564, 9.828013660925555, 9.704939587362505, 9.539236815916341, 9.529148765929223, 9.721269006498003, 9.915026115867143, 10.044617404383983, 10.094637095324543, 9.968821328822015, 9.723308836332917, 9.519912536289315, 9.472381061975982, 9.706840595886217, 9.926985408558098, 9.966018057563401, 9.782201033248311, 9.566644882518839, 9.548311288601015, 9.713881359338478, 9.805659888741195, 9.913029763778109, 9.925333231760902, 9.78053901605856, 9.739550924822924, 9.807678931901824, 9.822652617152983, 9.778302481257793, 9.746337353126659, 9.689538392125497, 9.626264483647587, 9.618265748230781, 9.781099330100542, 10.081643700419601, 10.054594036472794, 9.874888213189031, 9.811987841989193, 9.709396870931837, 9.654358052320738, 9.712532868207578, 9.697781942075201, 9.69012167645395, 9.71659606343437, 9.736466213041606, 9.77822897155829, 9.830572181527305, 9.918422235231333, 9.960529466399342, 9.90412183878449, 9.744278448752992, 9.715703389711617, 9.795510071479931, 9.821510890630252, 9.703761819824233, 9.706928367106212, 9.838319314298172, 9.927437845116717, 10.0119275436096, 9.891943989168889, 9.823958476732809, 9.790278706912567, 9.71463329826171, 9.76195993835715, 9.791589423095544, 9.755959850657169, 9.693808405324116, 9.568489257727695, 9.698199429005289, 9.894730051133422, 9.785794729799527, 9.618840349010377, 9.715298134178775, 9.758667178280772, 9.836852000145182, 9.945785600691915, 9.997863403910989, 10.008611568287968, 9.778749588296018, 9.590776779960024, 9.57954269366077, 9.699562809324156, 9.760038096003568, 9.7494697857528, 9.713482117912797, 9.753731818940258, 9.85394600570762, 9.939715416893309, 9.847282551564826, 9.686691924649477, 9.637882607653408, 9.727481112422165, 9.810252661468793, 9.857120582416096, 9.878312296322498, 9.77364083152487, 9.595659850743472, 9.509301238066481, 9.637347238173115, 9.793057139293728, 9.849109690165026, 9.78731220317201",
    })
    api_name = "站立平衡";
    console.log(res);
    if(res.error == 0){
        got_ugrp_id = res.result.id;
        console.log(api_name+"成功 "+got_ugrp_id);
    }else{
        got_ugrp_id = res.result.id;
        console.log(api_name+"失败 "+res.reason);
    }
}

results matching ""

    No results matching ""