Project

General

Profile

Actions

Activity #2507

closed

Feature #3752: Design of the web framework for Data Centre Software

Feature #1850: Design and Development for web based ANRS

Module #2237: Development for Dashboard APIs

Sub module #2240: Dashboard 1 APIs

Modify accoustic noise plot APIs

Added by Thara S Pillai over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
04/22/2024
Due date:
04/22/2024
% Done:

100%

Estimated time:
Planned Due Date:

Description

  • to read accoustic file from NAS
  • convert .wav file to JSON
  • return JSON
  • Integrate and Test from grafana
    Develop code
  • Read file from NAS
    Explore on fs, smb2-client node packages to access and read file from access controlled NAS using username and password
    The wave files kept at NAS location \\10.176.15.5\wsi\ANRS
  • Convert wave file to JSON
    https://huggingface.co/docs/transformers.js/en/guides/node-audio-processing; by using a nodejs package wavefile extracting data from .wav file.
    See whether data extracted can be shown as json shared by SEG for noise accoustic panel.
    Also talk with SEG team whether they have an implementation for the same.

May implement the following logic to handle the rotational display of 5-minute data segments every 15 minutes for requests received in 1 minute.

For each API request received in 1 minute

Fetch current date and time from server (curr_dt)

//Check node-cache for value of key 'acco_live' 
Read acco_live_obj from node-cache key 'acco_live' and check values for data_group_start_time and 
data_group_end_time

If cache key not empty and curr_dt falls between data_group_start_time and 
data_group_end_time
{
Get node-cache for value of key 'acco_live_curr_seg' as current data segment number last returned
Increment current data segment number by 1 as next data segment number
Get values for the next data segment number from node-cache as acco_live_obj.data[current data segment number-1]
Update node-cache for value of key 'acco_live_curr_seg'
return acco_live_obj.data[current data segment number-1]
}
else (cache key empty or if curr_dt does not fall between data_group_start_time and 
data_group_end_time)
{
//Get new data segments for the previous 15 minutes and keep in node-cache
Make database calls to get data segments between curr_dt-15min and curr_dt
Loop through data segment records from database to
[1] Get NAS locations and read wav data from NAS locations 
[2] Downsample data 
[3] convert to json 
Form/append segment data to acco_live_obj as
acco_live_obj
=
{"data_start_time": "curr_dt-15min",
"data_end_time": "curr_dt",
"data_group_start_time": "curr_dt",
"data_group_end_time": "curr_dt+15min",
"data":[ {"segm_no":1, "seg_datetime": "", "values": []},
{"segm_no":2, "seg_datetime": "", "values": []},
{"segm_no":3, "seg_datetime": "", "values": []}
]
}
set acco_live_obj as value for key 'acco_live'  in node-cache
set current segment number 1  as value for key 'acco_live_curr_seg'  in node-cache
return acco_live_obj.data[0]
}

Actions #1

Updated by Shameera S L about 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100
Actions #2

Updated by Thara S Pillai about 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF