提供在服务器端的指纹比对的最佳方法 [英] Best way to provide the fingerprint comparison in the server side

查看:720
本文介绍了提供在服务器端的指纹比对的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要通过的WebAPI提供从服务器端的指纹验证。下面code是指纹比对的一部分。

I'm going to provide the fingerprint authentication from server side via WebAPI. The below code is the fingerprint comparison part.

var allFingerprints = container.Fingerprints.OrderByDescending(p=>p.FingerprintID);

List<Fmd> fmdList = new List<Fmd>();

foreach (var fp in allFingerprints)
{
    fmdList.Add(Fmd.DeserializeXml(fp.FMD));
}

IdentifyResult identifyResult = Comparison.Identify(customerFmd, 0, fmdList, thresholdScore, 2);

如果量小(小于3000)指纹在数据库中,我认为这将是确定读取数据库指纹,并进行比较。但是,如果指纹的数量越来越大,服务器来自客户端得到了很多API调用后,什么是从数据库读取指纹和比较它的最佳方式?我一定要保持指纹列表中的内存和比较呢?感谢您提前您的宝贵意见。

If the small amount(<3000) fingerprints are in the DB, I think it will be OK to read the fingerprint from DB and compare it. But if the amount of fingerprints is getting bigger and the server get a lot of API Calls from clients later, what is the best way to read fingerprint from DB and compare it? Do I have to keep the fingerprint list in the memory and compare it? Thank you for your valuable comments in advance.

推荐答案

如果您使用的是EF一些信息将在内存automaticaly。但是如果你想使自己的结构,使用字典而不是列表。你也可以使用Redis的用于这一目的。

If you are using EF some information will be in memory automaticaly. But if you want to make your own structure, use dictionary instead of a list. Also you can use redis for this purpose.

这篇关于提供在服务器端的指纹比对的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆