当前位置:网站首页>Best practice | using Tencent cloud AI character recognition to realize enterprise qualification certificate recognition
Best practice | using Tencent cloud AI character recognition to realize enterprise qualification certificate recognition
2022-07-24 11:23:00 【Tencent cloud AI】
In business activities , Qualification certificate is a necessary certificate to prove the production capacity of an enterprise , It is also a platform for enterprises to settle in 、 Organization project declaration, etc. must be submitted , This includes the business license 、 Tax registration certificate 、 Production license 、 High tech enterprise accreditation certificate, etc . In daily work , Take the settlement of platform enterprises as an example , The enterprise is required to upload the corresponding qualification certificate and then review , However, due to the wide variety of enterprise qualification certificates , There are differences in qualification certificates from all walks of life , There is no unified plate , Through manual review, the workload is huge and easy to make mistakes .
that , Is there a more intelligent way to make the qualification review process faster and more efficient ? Searched for word recognition products at home and abroad , Discover Tencent cloud AI Character recognition has launched a new intelligent structured recognition capability , Be able to recognize and extract all kinds of licenses 、 Notes 、 Forms 、 Field information of structured scenarios such as contracts . After deep understanding , It is found that this interface capability fits perfectly with the problem of automatic enterprise qualification audit that we want to solve .
Next , I will describe in detail how I use intelligent structured recognition , Complete the title of qualification certificate 、 Company name 、 License number 、 Registered address 、 Automatic acquisition of information such as the person in charge of the enterprise .
One 、 preparation
In order to use Tencent cloud intelligent structured recognition capability , First of all, we need to make some preparations .
1. Tencent cloud AI Character recognition provides functional experience Services ( Function experience page ), We first experienced the intelligent structural ability , You can see that the recognition effect is very good , Let's have more confidence in using this interface capability .
2. Using Tencent cloud AI Before character recognition, you need to open character recognition service . Open Tencent cloud OCR Console page , We have successfully opened a character recognition service .
3. After the service is successfully opened , Tencent cloud AI Character recognition gives away a free resource pack , Among them, intelligent structure includes 1000 Free quota for each time , Can be in Resource pack management page Check the resource package usage .
When the free resource pack runs out , We first purchased some prepaid resource packs according to the usage , Later, post payment was opened , Ensure that the business can continue to call the interface normally .
- We first evaluated the request magnitude of the business , So in character recognition Purchase page Bought intelligent structured recognition 100 Ten thousand resource packs , The more resource packs you buy, the greater the discount . Can be in Resource pack management page View the specific usage of the resource package .
- And then in Usage statistics page You can see the call volume of the interface .
- Finally, we Setup page Opened the post payment service , In this way, you don't have to worry about the failure of the calling interface caused by the exhaustion of resource packets . It should be noted that the post payment setting can only be changed once a month .
Two 、 Development process
Through the following steps, you can officially use the intelligent structuring capability .
- Get a personal key
- Intelligent structure API file
- Experience online call
- Use integrated Tencent cloud OCR Of SDK
- Query the transferred quantity
1、 Get a personal key
First , We need to get personal API secret key , Used for calling interfaces . Open Tencent cloud access management API Key management page , You can create a personal key .
2、 Intelligent structured recognition API file
Check the specific instructions of the interface , In character recognition API file You can view the input parameters of intelligent structural recognition 、 Output parameters 、 Error code 、 Examples and other information .
3、 Online debugging
Tencent cloud AI Character recognition provides online call API Explorer Tools , It is convenient for us to visually call , And generate calling code , You can visually see the request parameters and return parameters .
4、 Use SDK call
Next, you can officially access the interface , At the bottom of intelligent structures and documents , Provides development toolsets for multiple languages (SDK),SDK The method of using is very simple and convenient , We can choose to access according to the language we need .
The development language we use is GoLang.
- 1. Install the common base package
go get -v -u github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common |
|---|
- 2. Install the product package corresponding to character recognition
go get -v -u github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr |
|---|
- 3. Implementation call logic ( Only the main logic , Incomplete code )
package main
import (
"fmt"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions"
ocr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr/v20181119"
)
func main() {
credential := common.NewCredential("secretId", "secretKey")
client, _ := ocr.NewClient(credential, regions.Guangzhou, profile.NewClientProfile())
request := ocr.NewSmartStructuralOCRRequest()
request.ImageUrl = common.StringPtr("xxxxx")
response, err := client.SmartStructuralOCR(request)
if _, ok := err.(*errors.TencentCloudSDKError); ok {
fmt.Printf("An API error has returned: %s", err)
return
}
if err != nil {
panic(err)
}
fmt.Printf("%s\n", response.ToJsonString())
}- 4. Intelligent structured specific parameters are used
In our business scenario, the review of medical qualification often pays more attention to specific fields , For example, category 、 Number , Address 、 full name , Validity period, etc , When using intelligent structured interface to identify medical qualification certificate , We need an intelligent structured interface to return these specific fields , For our further review .
After consulting the intelligent structured identification interface document , We found that we can customize the field name that the structured function needs to return , Pass in the corresponding parameters when requesting .
Pass in custom parameters , Let the intelligent structured interface return specific fields , Include : Category 、 Number , Address 、 full name , The period of validity , The call logic is as follows ( Only the main logic , Incomplete code ).
package main
import (
"fmt"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions"
ocr "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ocr/v20181119"
)
func main() {
credential := common.NewCredential("secretId", "secretKey")
client, _ := ocr.NewClient(credential, regions.Guangzhou, profile.NewClientProfile())
request := ocr.SmartStructuralOCRRequest{
ImageUrl: common.StringPtr("xxx") ,
ItemNames: common.StringPtrs([]string{" Category "," Number "," Address "," full name "," The period of validity "}),
}
response, err := client.SmartStructuralOCR(request)
if _, ok := err.(*errors.TencentCloudSDKError); ok {
fmt.Printf("An API error has returned: %s", err)
return
}
if err != nil {
panic(err)
}
fmt.Printf("%s\n", response.ToJsonString())
}5、 Query the transferred quantity
After the successful interface call , We can do it in Tencent cloud character recognition console View the call details of the interface , Including adjustment amount 、 The amount of success 、 The amount of failure 、 Error code and other information .
Be careful : After logging in the master account, you can view the call volume details of all accounts , Sub accounts can only query their own call volume details .
If you want to let the sub account also have permission to view the call details of all accounts , Can be in Usage query permission management page Empower the sub account , In this way, the sub account can also query the call volume of all accounts .
More Tencent cloud AI Intelligent structured recognition product information understanding :https://cloud.tencent.com/product/smart-ocr
边栏推荐
- 【Golang】golang实现简单memcache
- How to choose sentinel vs. hystrix current limiting?
- What is the difference between low code and no code?
- JMeter interface test steps - Installation Tutorial - script recording - concurrent test
- 【10】团队协作和跨团队协作
- 【10】 Teamwork and cross team collaboration
- Fifty lectures of Euler (I)
- Idea background image set
- UNIX C language POSIX thread creation, obtaining thread ID, merging thread, separating thread, terminating thread, thread comparison
- Leetcode 112. path sum
猜你喜欢

Fifty lectures of Euler (I)

性能测试总结(一)---基础理论篇

这个应该是全网最全的接口测试工具之postman

STM32+ESP8266+MQTT协议连接阿里云物联网平台

cgo+gSoap+onvif学习总结:9、go和c进行socket通信进行onvif协议处理

Decomposition of kubernets principle

有关并行的两个重要定律

iMeta观点 | 短读长扩增子测序是否适用于微生物组功能的预测?

Paging query of employee information of black maredge takeout

Blue Bridge Cup provincial match training camp - Calculation of date
随机推荐
Performance test summary (I) -- basic theory
Research on parameter setting of MATLAB FFT
MOS管 —— 快速复苏应用笔记(壹)[原理篇]
Reprint of illustrations in nature, issue 3 - area map (part2-100)
What is the difference between low code and no code?
Video playback | how to become an excellent reviewer of international journals in the field of Geoscience and ecology?
JMeter接口测试步骤-安装教程-脚本录制-并发测试
系统管理员需知的 16 个 iptables 使用技巧
Simply use MySQL index
What is the difference between strong reference, soft reference, weak reference and virtual reference?
黑马瑞吉外卖之员工信息分页查询
HDU5667 Sequence
[golang] golang implements the URLEncode URLDecode function
Docker installs 3 master and 3 slave redis clusters
About [software testing - interview skills and precautions for automated testing] - talk freely
Kubernetes Foundation
[golang] golang implements the post request to send form type data function
Redis cluster setup
Docker builds MySQL master-slave replication
HDU 3351:Seinfeld