Product Requirements - APFace

 

Target release

Type // to add a target release date

Epic

Type /Jira to add Jira epics and issues

Document status

DRAFT

Document owner

@ mention owner

Designer

@ designer

Tech lead

@ lead

Technical writers

@ writers

QA

 

Problem Statement

Currently, the technology service needs to pass the photos of examination candidates to CTI monthly so that the photos can be inserted into HikCentral accordingly. The APFace project (Stage 1) aims to create a function which could automate the process, by passing the photos of examination candidates who have exam on the present week, from S3 to HikCentral. The HikCentral Face Recognition Terminal in the exam hall can then authenticate the entries of candidates based on the inserted photos.

In Stage 2, the HikCentral Face Recognition Terminal should be able to authenticate the entries of candidates when they have an exam at the specifc time. In other words, the entries should be denied if the candidates don’t have any exam at the specific time. Therefore, there will be a new function that creates Access Schedule Template for the photos of examination candidates in HikCentral.

In Stage 3, the HikCentral should record the entry and exit of each examination candidate. For example, if a candidate has exited the exam hall, the next allowed action for the candidate must be only “enter“.

 Objective

  • To automate the process of uploading photos of examination candidates to HikCentral.

 Success metrics

Goal

Metric

Goal

Metric

Check if the students have exam before uploading the photos to HikCentral

  • Allow the students to enter exam hall when there is exam scheduled

  • Avoid unnecessary or prohibited entry

Transfer photos from S3 to HikCentral automatically and as scheduled

Save time and manpower

 Assumptions

  • Accepted formats of student photos: PNG, JPEG, JPG

  • The photos in S3 are saved in format “{StudentId}.png“

  • All students who have exam, must have photos in S3 ready

  • After the script is deployed, TnI or Student Services must only use APSpace Admin to upload photos, strictly not allowed to access HikCentral

 Requirements

Requirement

Notes

Requirement

Notes

Get the list of students who have exam on the present week

The DB view should include: Student Number, Gender and Completion Date

Retrieve photos from S3 based on the students list

  • The photos' filenames are the Student ID

  • Accepted formats of student photos: PNG, JPEG, JPG

Insert the photos into HikCentral via OpenAPI

  • The photos will be saved in HikCentral, with the following specifications

    • ID: Student ID

    • First Name: Student ID

    • Last Name: “APU“

    • Department: “APU“

    • beginTime: Present day

    • endTime: Completion Date + 7

    • faceData: Photo encoded in Base64

    • Remark: Photo’s S3 version ID

  • The function will send photo into HikCentral via OpenAPI.

Update the details/photo if necessary

  • Photo will be updated if the record doesn’t have a photo OR remark != S3 version ID

  • endTime will be updated if it’s not same with the Completion Date + 7

  • If photo is updated, remark should be updated to the latest S3 version ID as well.

IP of HikCentral Server

The Lambda function will use port 8080.

Resources used by the backend system:

  • Python v3.10.5

  • OracleDB View

  • S3 - Student Photos

  • HikCentral Professional Server and OpenAPI

Each of the request sent for HikCentral OpenAPI requires authentication header, please refer to HCP OpenAPI's Headers Configuration

For guidance on HikCentral, please refer to https://tpp.hikvision.com/tpp/Training. This website contains Support Ticket Form for assistance purposes.

 User interaction and design

AWS Architecture Diagram

 

Flow Chart

 

* Student’s details are based on what OracleDB provide

* The function will only handles students who have exam on the week (exam start date is within the next 7 days)

* ID in HikCentral is student ID

 Open Questions

Question

Answer

Date Answered

Question

Answer

Date Answered

 

 Out of Scope

  • HikCentral OpenAPI does not support the feature to create Access Schedule Template (needed in Stage 2).

    image-20241008-023755.png

Copyright © Asia Pacific University. All Rights Reserved.