当前位置: 首页 > news >正文

装饰设计网站建设建立网站流程

装饰设计网站建设,建立网站流程,外国一些做环保袋的网站,制作企业网站费用明细目录 一、腾讯票据单据识别 Invoice OCR服务介绍 二、开发完整流程 2.1 开通文字识别服务 2.2 创建开发者密钥 2.3 创建项目编写代码集成 三、总结 公司内部涉及到车票报销的时候一个个输入火车票信息非常麻烦,尤其是出差比较多的企业,这对于财务人…

目录

一、腾讯票据单据识别 Invoice OCR服务介绍

二、开发完整流程

2.1 开通文字识别服务

2.2 创建开发者密钥

2.3 创建项目编写代码集成

三、总结


公司内部涉及到车票报销的时候一个个输入火车票信息非常麻烦,尤其是出差比较多的企业,这对于财务人员的涉及报销单据录入还是非常麻烦的。今天给大家分享使用腾讯云车票识别服务,轻松提取火车票信息。这样可以方便把识别服务集成到业务系统,可以大大减轻财务人员录入单据信息的工作量。今天采用C#编程语言给大家提供一个可用的Demo,感兴趣的朋友可以了解一下!

一、腾讯票据单据识别 Invoice OCR服务介绍

官网

该服务基于腾讯优图实验室的深度学习技术,可以将图片上的文字内容,智能准确识别成为可编辑的文本。这里主要说一下火车票识别。

该服务支持火车票图片全字段的识别,包括编号、出发站、到达站、出发时间、车次、座位号、姓名、票价、席别、身份证号、发票消费类型、序列号、加收票价、手续费、大写金额、售票站、原票价、发票类型、收据号码、是否仅供报销使用等字段的识别。它具有识别速度快、准确率高等特点。

二、开发完整流程

● 开通服务

● 申请创建开发者密钥

● 创建项目编写代码集成

2.1 开通文字识别服务

首先需要使用自己的账户登录腾讯云官网,然后进入文字识别服务控制台,开通服务。开通服务后可以查看资源包,默认有1000次的免费额度,方便大家本地开发测试,确认没问题后再去购买资源包,部署到生产环境使用。这个对于开发者还是非常有好的。

另外给大家分享腾讯云双十一拼团活动,优惠多多,不容错过!专属链接

这里给推荐拼团购买轻量级服务器配置为2核2G3M带宽一年仅需68元,并且加赠3个月,相当于68元购买了15个月轻量级服务器简直太划算了,需要购买服务器的朋友不容错过!

2.2 创建开发者密钥

如果需要本地集成开发的话,需要申请开发者密钥,然后创建开发者密钥。创建成功之后如下:

注意:一定要妥善保护后自己的开发密钥

2.3 创建项目编写代码集成

首先打开VS2022创建一个WinForm项目,项目名称为TrainTicketRecognitionDemo

,具体创建如下:

然后点击创建按钮来初始化项目。项目初始化如下:

安装腾讯云文字识别的依赖包依赖包搜索TencentCloudSDK.Ocr

安装成功后如下

接着创建一个火车票识别工具类TrainTicketRecognitionUtils.cs

using Newtonsoft.Json;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Ocr.V20181119;
using TencentCloud.Ocr.V20181119.Models;namespace TrainTicketRecognitionDemo
{/// <summary>/// 火车票查询工具类/// </summary>public class TrainTicketRecognitionUtils{public static TrainTicketRecognitionModel GetTicketStr(string imageUrl){// 注意密钥妥善保存,避免泄露,可以放入配置文件或者数据库中Credential cred = new Credential{SecretId = "个人SecretId",SecretKey = "个人SecretKey"};// 实例化一个client选项,可选的,没有特殊需求可以跳过ClientProfile clientProfile = new ClientProfile();// 实例化一个http选项,可选的,没有特殊需求可以跳过HttpProfile httpProfile = new HttpProfile();httpProfile.Endpoint = ("ocr.tencentcloudapi.com");clientProfile.HttpProfile = httpProfile;// 实例化要请求产品的client对象,clientProfile是可选的OcrClient client = new OcrClient(cred, "ap-beijing", clientProfile);// 实例化一个请求对象,每个接口都会对应一个request对象TrainTicketOCRRequest req = new TrainTicketOCRRequest();req.ImageUrl = imageUrl;// 返回的resp是一个TrainTicketOCRResponse的实例,与请求对象对应TrainTicketOCRResponse resp = client.TrainTicketOCRSync(req);           TrainTicketRecognitionModel trainTicketRecognitionModel = JsonConvert.DeserializeObject<TrainTicketRecognitionModel>(AbstractModel.ToJsonString(resp));return trainTicketRecognitionModel;}}
}

创建TrainTicketRecognitionModel.cs 实体类

用来接收调用接口成功后返回过来的结果

public class TrainTicketRecognitionModel
{/// <summary>/// 编号/// </summary>public string TicketNum { get; set; }/// <summary>/// 出发站/// </summary>public string StartStation { get; set; }/// <summary>/// 到达站/// </summary>public string DestinationStation { get; set; }/// <summary>/// 出发时间/// </summary>public string Date { get; set; }/// <summary>/// 车次/// </summary>public string TrainNum { get; set; }/// <summary>/// 座位号/// </summary>public string Seat { get; set; }/// <summary>/// 乘车人姓名/// </summary>public string Name { get; set; }/// <summary>/// 票价/// </summary>public string Price { get; set; }/// <summary>/// 席别/// </summary>public string SeatCategory { get; set; }/// <summary>/// 身份证号/// </summary>public string ID { get; set; }/// <summary>/// 发票消费类型/// </summary>public string InvoiceType { get; set; }/// <summary>/// 序列号/// </summary>public string SerialNumber { get; set; }/// <summary>/// 加收票价/// </summary>public string AdditionalCost { get; set; }/// <summary>/// 手续费/// </summary>public string HandlingFee { get; set; }/// <summary>/// 大写金额(票面有大写金额该字段才有值/// </summary>public string LegalAmount { get; set; }/// <summary>/// 售票站/// </summary>public string TicketStation { get; set; }/// <summary>/// 原票价(一般有手续费的才有原始票价字段)/// </summary>public string OriginalPrice { get; set; }/// <summary>/// 发票类型:火车票、火车票补票、火车票退票凭证/// </summary>public string InvoiceStyle { get; set; }/// <summary>/// 收据号码/// </summary>public string ReceiptNumber { get; set; }/// <summary>/// 仅供报销使用:1为是,0为否/// </summary>public string IsReceipt { get; set; }/// <summary>/// 唯一请求 ID,由服务端生成/// </summary>public string RequestId { get; set; }
}

界面设计

这里增加一个图片地址的输入框和查询按钮,另外增加一个分组展示解析结果,具体后台代码如下:

 /// <summary>///  查询代码/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void btnSearch_Click(object sender, EventArgs e){string url = txtImageUrl.Text;if (string.IsNullOrWhiteSpace(url)){MessageBox.Show("请输入查询车票图片的URL");}else{TrainTicketRecognitionModel model = TrainTicketRecognitionUtils.GetTicketStr(url);txtStartStation.Text = model.StartStation;txtDestinationStation.Text = model.DestinationStation;txtDate.Text = model.Date;txtTrainNum.Text= model.TrainNum;txtPrice.Text = model.Price;txtSeat.Text = model.Seat;txtSeatCategory.Text = model.SeatCategory;txtName.Text = model.Name;}}

查询结果如下:

三、总结

通过以上案例可以轻松实现火车票信息识别提取的功能,以上案例代码提供的比较完整,如果大家还有问题的话欢迎沟通交流!

阅读原文


文章转载自:
http://dinncoviole.wbqt.cn
http://dinncoendosymbiosis.wbqt.cn
http://dinncobiomathcmatics.wbqt.cn
http://dinncounsex.wbqt.cn
http://dinncoarchangel.wbqt.cn
http://dinncoupheaval.wbqt.cn
http://dinncopatentor.wbqt.cn
http://dinncodontopedalogy.wbqt.cn
http://dinncorevert.wbqt.cn
http://dinncocrump.wbqt.cn
http://dinncomelioration.wbqt.cn
http://dinncoenjambment.wbqt.cn
http://dinncothermotherapy.wbqt.cn
http://dinncolengthman.wbqt.cn
http://dinncoamor.wbqt.cn
http://dinncoasymptote.wbqt.cn
http://dinncocentreless.wbqt.cn
http://dinnconorthwestward.wbqt.cn
http://dinncosquib.wbqt.cn
http://dinncocombinability.wbqt.cn
http://dinncocruciferae.wbqt.cn
http://dinncocanker.wbqt.cn
http://dinncons.wbqt.cn
http://dinncorepellency.wbqt.cn
http://dinncoepistolic.wbqt.cn
http://dinncounderfoot.wbqt.cn
http://dinncoaorist.wbqt.cn
http://dinncocaste.wbqt.cn
http://dinncoankylosaur.wbqt.cn
http://dinncorespire.wbqt.cn
http://dinncocaldron.wbqt.cn
http://dinncorendition.wbqt.cn
http://dinncodiscipleship.wbqt.cn
http://dinncothorax.wbqt.cn
http://dinncoalumnus.wbqt.cn
http://dinncotelegraphy.wbqt.cn
http://dinncoallopatrically.wbqt.cn
http://dinncospherular.wbqt.cn
http://dinncoserigraph.wbqt.cn
http://dinncoestimative.wbqt.cn
http://dinncovictim.wbqt.cn
http://dinncoleachable.wbqt.cn
http://dinncorupestrian.wbqt.cn
http://dinncosentimo.wbqt.cn
http://dinncorestrained.wbqt.cn
http://dinncomicroscale.wbqt.cn
http://dinncolorn.wbqt.cn
http://dinncoinertly.wbqt.cn
http://dinncofinsbury.wbqt.cn
http://dinncotribromide.wbqt.cn
http://dinncopoorly.wbqt.cn
http://dinncotraditor.wbqt.cn
http://dinncopulsant.wbqt.cn
http://dinncofadm.wbqt.cn
http://dinncofrusta.wbqt.cn
http://dinncodiester.wbqt.cn
http://dinncobassist.wbqt.cn
http://dinncoiconoclasm.wbqt.cn
http://dinncoparroquet.wbqt.cn
http://dinnconautical.wbqt.cn
http://dinncoface.wbqt.cn
http://dinncoadventuresome.wbqt.cn
http://dinncobowed.wbqt.cn
http://dinncoverus.wbqt.cn
http://dinncocontracept.wbqt.cn
http://dinncochapleted.wbqt.cn
http://dinncodbms.wbqt.cn
http://dinncoovercredulity.wbqt.cn
http://dinncopinch.wbqt.cn
http://dinncoredeliver.wbqt.cn
http://dinncoheterosexism.wbqt.cn
http://dinncooctameter.wbqt.cn
http://dinncofertilise.wbqt.cn
http://dinncograndmother.wbqt.cn
http://dinncogaleated.wbqt.cn
http://dinncohortatory.wbqt.cn
http://dinncocontexture.wbqt.cn
http://dinncocongregational.wbqt.cn
http://dinncovoluble.wbqt.cn
http://dinncolonganimity.wbqt.cn
http://dinncoknobkerrie.wbqt.cn
http://dinncodecease.wbqt.cn
http://dinncolimbless.wbqt.cn
http://dinncopottery.wbqt.cn
http://dinncoshoppy.wbqt.cn
http://dinncotemporospatial.wbqt.cn
http://dinncomockie.wbqt.cn
http://dinncocadenced.wbqt.cn
http://dinncofane.wbqt.cn
http://dinncocatchwater.wbqt.cn
http://dinncoanuretic.wbqt.cn
http://dinncothereagainst.wbqt.cn
http://dinncoganglia.wbqt.cn
http://dinncospiculum.wbqt.cn
http://dinncoomniscient.wbqt.cn
http://dinncoadjustable.wbqt.cn
http://dinncogagman.wbqt.cn
http://dinncosouthernwood.wbqt.cn
http://dinncocipherkey.wbqt.cn
http://dinncomortally.wbqt.cn
http://www.dinnco.com/news/90331.html

相关文章:

  • 建设网校百度seo推广首选帝搜软件
  • da面板安装wordpress宁波seo优化公司
  • 培训机构还能开吗建站优化
  • 做网站的学校搜索大全引擎
  • vs2013做登录网站怎么在百度上设置自己的门店
  • 专门做门的网站抖音营销推广怎么做
  • 日本做动漫软件视频网站网络营销策略论文
  • 彩票网站建设平台网络营销团队
  • 芜湖网站建设长沙免费建站网络营销
  • 山西太原门户网站开发公司谷歌seo是指什么意思
  • 制作html网站网络营销的特点是什么
  • 巫山网站开发惠州关键词排名优化
  • 网站建设实训报告模板北京快速优化排名
  • 怎么做代刷网网站app开创集团与百度
  • 怎么自己做直播网站吗微信小程序平台官网
  • 网站制作网站专业seo网络营销公司
  • 广州开发网站技术支持2020国内十大小说网站排名
  • 网站建设的后台登录宁波seo优化公司
  • 一级域名和二级域名做两个网站有域名和服务器怎么建网站
  • 做网站工作室找客户难手机网站排名优化软件
  • 织梦官方网站专业培训
  • 简易的网站杭州网站优化培训
  • 佛山网站优化搜索职业培训机构哪家最好
  • 布料市场做哪个网站好网络推广工作
  • 百度怎样建立一个网站网站免费优化软件
  • 无做a视频网站完整的网页设计代码
  • 高乐雅官方网站 哪个公司做的网店运营与管理
  • ppt模板免费下载网站有哪些海门网站建设
  • 贴吧网站开发需求分析微博seo营销
  • 做二手市场类型的网站名字百度推广竞价排名