Disclosure of Invention
In order to solve the problems, the embodiment of the invention provides a lost certificate recovery system and a control method thereof, which effectively avoid the defect that the lost certificate recovery system is not effective and convenient in the prior art.
In order to overcome the defects in the prior art, the embodiment of the invention provides a solution for a lost certificate recovery system and a control method thereof, which comprises the following specific steps:
a control method of a lost certificate recovery system comprises the following steps:
step 1-1: the certificate picker issues the information of the picked certificates to the managed QQ group in a chat record issuing mode;
step 1-2: chat robot software stores the chat log;
step 1-3, if the chat record also contains the picture of the picked-up certificate, the chat robot software grabs the picture of the picked-up certificate and downloads the picture of the picked-up certificate;
step 1-4: the image recognition interface recognizes the certificate type and the certificate information in the picked-up certificate picture;
step 1-5: if the identification is successful, the identification type and identification information in the identified picture of the picked-up identification are formed into relevant data of the called-up identification.
Further, the control method of the lost certificate recovery system further comprises the following steps:
step 2-1: the owner pays attention to and binds identity information through the WeChat service signal account number or the WeChat open platform framework;
step 2-2: the owner describes the specific situation of losing the certificate;
step 2-3: if the specific situation includes losing the identity card, uploading the face information through the face information acquisition interface, and then transferring to the step 2-5 for execution;
step 2-4: if the identity card is not lost in the specific situation, uploading information of the identity card photo;
step 2-5: taking the uploaded information as related data of the loss report document;
step 2-6: comparing the related data of the loss report document with the related data of the solicited document obtained in the step 1-5;
step 2-7: if the comparison is successful, pushing a message to the WeChat account of the certificate owner by using a message template of the WeChat service account, and ending the flow of the control method of the lost certificate recovery system;
step 2-8: if the comparison is unsuccessful, the credential enrollment module processes relevant data of the enrollment credential.
A lost certificate retrieval system comprising:
a chat management subsystem, a user identity subsystem, a certificate analysis subsystem, a certificate loss reporting subsystem and a certificate return subsystem which are operated on the service system;
the chat management subsystem is used for chat management;
the user identity subsystem is used for managing user identities;
the certificate analysis subsystem is used for certificate analysis;
the certificate loss reporting subsystem is used for reporting the certificate loss;
the certificate return subsystem is used for returning certificates.
Further, the chat management subsystem comprises a chat content grabbing module, a chat content processing module and a chat file processing module;
the chat content grabbing module is used for adding a management account into a QQ group to be managed, logging the management account into the cool Q chat robot software, and storing the information of the certificate picker published in the managed QQ group into a chat record table in a table record mode by the cool Q chat robot software;
the chat content processing module is used for extracting the QQ number of the certificate picker and the chat text or media file identification information from the record detail field of the chat record table, writing the QQ number of the certificate picker back to the QQ number field of the certificate picker of the chat record table, writing the chat text back to the chat text field of the chat record table, and writing the media file identification information back to the media file identification information field of the chat record table;
the chat picture processing module comprises a chat file screening code, a chat picture retrieval code and a chat picture downloading code, wherein the chat file screening code is used for screening the identification information of the picture file according to the extension of the identification information; the chat picture retrieval code is used for retrieving a corresponding index file in an installation directory of the cool Q chat robot software by taking identification information of a picture file as a picture file name, and storing network hyperlinks of the picture file in the file; the chat picture downloading code is used for downloading the picture to the disk directory path according to the network hyperlink of the picture, and writing the path back to the picture path field of the chat record table.
Further, the user identity subsystem is used for firstly applying for a WeChat service number account, then applying for a WeChat open platform framework, and accessing the WeChat service number account to a system of the WeChat open platform framework;
the user identity subsystem comprises a service number focusing module, a service number binding module, an open platform authorization module and an open platform binding module;
the service number focusing module is used for running the WeChat terminal to enable the user to automatically detect whether the WeChat service number account is focused, if not, the two-dimension code of the WeChat service number account is displayed to the user, so that the user can recognize the two-dimension code and focus on the WeChat service number account;
the service number binding module is used for detecting whether the user binds identity information based on the WeChat service number account, if not, pushing a form to be filled in by the user, and converging the unionid, openid information, the WeChat head portrait information and the WeChat nickname information obtained according to the WeChat service number account webpage authorization and storing the information into a user information table of the user identity subsystem;
the open platform authorization module is used for generating a two-dimensional code based on a webpage authorized to log in by the framework so as to enable a user to use a mobile phone WeChat to sweep one sweep, thereby logging in WeChat identity;
the open platform binding module is used for detecting whether a user binds identity information based on a WeChat open platform framework, if not, pushing a form to be filled in by the user, and converging information such as unionid, openid, a WeChat head portrait and a WeChat nickname obtained according to WeChat service number account webpage authorization and storing the information into a user information table of the user identity subsystem.
Further, the certificate analysis subsystem comprises a certificate template presetting module, a picture record screening module and a picture character recognition module;
the certificate template presetting module refers to a default template and a customized individual template selected based on an AI cloud platform; the picture record screening module is used for screening out the records with non-empty picture path fields in the chat record list, namely a picture record information set; the picture character recognition module is used for calling the image recognition interface, recognizing the certificate type and as much certificate information as possible from the picture, and if the recognition is successful and the result is ideal, storing the information into a owner-loss information table, wherein the owner-loss information table comprises an owner-loss name, an owner-loss identity card number or an owner-loss running card number.
Further, the certificate loss reporting subsystem comprises a loss owner login detection module, a certificate loss reporting registration module and a loss owner identity verification module;
the owner-loss login detection module is used for detecting whether a certificate person has operated the user identity subsystem, namely whether an account A or a binding platform B is concerned and bound; the certificate loss registration module is used for describing the specific condition of the lost certificate by the certificate loss person; the identity verification module is used for submitting information for proving the identity of the identity reporting person, and if the identity reporting person reports the identity card, the face information of the identity document losing person is submitted to the face information field of the owner information table for standby through the face information acquisition interface; if the identity card is not reported, the identity card photo needs to be uploaded.
Further, the certificate return subsystem comprises a failure owner comparison module, a failure owner notification module, a certificate solicitation module and a return registration module;
the owner-loss comparison module is used for comparing the owner-loss name and the owner-loss mobile phone number acquired by the picture character recognition module with the user information table of the user identity subsystem, and if the owner-loss comparison module is successful, the compared user records are sent to the owner-loss notification module;
the owner-loss notification module pushes a message to a WeChat account of the user by using a message template of the WeChat service number account according to the acquired user record;
the certificate acquisition module is used for displaying the record of the owner information in a picture-text list mode, adding mosaic to the certificate picture by using a picture processing algorithm, and carrying out encryption processing on important information;
the return registration module is used for resetting the return record to a returned state after the certificate loss reporting person contacts with the certificate picker and obtains the certificate.
Detailed description of the preferred embodiments
Embodiments of the present invention will be further described with reference to the drawings and examples.
As shown in fig. 1 to 8, the control method of the missing certificate recovery system includes the following steps:
step 1-1: the certificate picker issues the information of the picked certificates to the managed QQ group in a chat record issuing mode;
step 1-2: chat robot software stores the chat log;
step 1-3, if the chat record also contains the picture of the picked-up certificate, the chat robot software grabs the picture of the picked-up certificate and downloads the picture of the picked-up certificate;
step 1-4: the image recognition interface recognizes the certificate type and as much certificate information as possible in the picked-up certificate picture;
step 1-5: if the identification is successful, the identification type in the picture of the picked-up certificate and as much certificate information as possible are formed into relevant data of the called certificate.
Further, the control method of the lost certificate recovery system further comprises the following steps:
step 2-1: the owner pays attention to and binds identity information through the WeChat service signal account number or the WeChat open platform framework;
step 2-2: the owner describes the specific situation of losing the certificate;
step 2-3: if the specific situation includes losing the identity card, uploading the face information through the face information acquisition interface, and then transferring to the step 2-5 for execution;
step 2-4: if the identity card is not lost in the specific situation, uploading information of the identity card photo;
step 2-5: taking the uploaded information as related data of the loss report document;
step 2-6: comparing the related data of the loss report document with the related data of the solicited document obtained in the step 1-5;
step 2-7: if the comparison is successful, pushing a message to the WeChat account of the certificate owner by using a message template of the WeChat service account, and ending the flow of the control method of the lost certificate recovery system;
step 2-8: if the comparison is unsuccessful, the credential enrollment module processes relevant data of the enrollment credential.
A lost certificate retrieval system comprising:
chat management subsystem 0100, user identification subsystem 0200, credential analysis subsystem 0300, credential reporting subsystem 0400 and credential return subsystem 0500 running on the service system;
the chat management subsystem 0100 is used for chat management;
the user identity subsystem 0200 is used for managing user identities;
the certificate analysis subsystem 0300 is used for certificate analysis;
the certificate loss reporting subsystem 0400 is used for reporting the certificate loss;
the document return subsystem 0500 is used to return documents. The service system can include a PC and a server connected to the PC.
The chat management subsystem 0100 comprises a chat content grabbing module 0110, a chat content processing module 0120 and a chat file processing module 0130;
the chat content grabbing module 0110 is configured to add a QQ account for management, that is, a management account, to a QQ group to be managed, log in the management account to the cool Q chat robot software, and then the cool Q chat robot software can store a message issued by a certificate picker in the managed QQ group into a chat record table in a table record manner, where each table record includes a record serial number, a record time, a QQ group number and record details; the cool Q chat robot software can also store the picture reference information carried in the message to the installation directory of the cool Q chat robot in a special format.
The chat content processing module 0120 is configured to extract the QQ number of the certificate picker, the chat text, or the media file identification information from the record detail field of the chat log table, write the QQ number of the certificate picker back to the QQ number field of the certificate picker of the chat log table, write the chat text back to the chat text field of the chat log table, and write the media file identification information back to the media file identification information field of the chat log table;
the chat picture processing module 0130 comprises a chat file screening code 0131, a chat picture retrieval code 0132 and a chat picture downloading code 0133, wherein the chat file screening code 0131 can be used for screening the identification information of a picture file according to the extension of the identification information, and the extension can be bmp, jpg, png, tif, gif, pcx, tga, exif, fpx, svg, psd, cdr, pcd, dxf, ufo, eps, ai, raw, wmf or webp; the chat picture retrieval code 0132 can be used for retrieving a corresponding index file in an installation directory of the cool Q chat robot software by taking identification information of a picture file as a picture file name, and storing network hyperlinks of the picture file in the file; the chat picture download code 0133 can be used to download pictures to a disk directory path based on their web hyperlinks and write back their path to the picture path field of the chat log table.
The user identity subsystem 0200 is used for firstly applying for a WeChat service number account A, then applying for a WeChat open platform framework B, and accessing the WeChat service number account A into a system of the WeChat open platform framework B;
the user identity subsystem 0200 comprises a service number focusing module 0210, a service number binding module 0220, an open platform authorization module 0230 and an open platform binding module 0240;
the service number focusing module 0210 is used for running the WeChat terminal to enable the user to automatically detect whether the WeChat service number account A is focused, if not, the two-dimension code of the WeChat service number account A is displayed to the user, so that the user can recognize the two-dimension code and focus on the WeChat service number account A;
the service number binding module 0220 is configured to detect whether the user binds identity information based on the micro-letter service number account a, if not, push a form to be filled in by the user, where the form includes fields such as "name", "eight bits after the identity card", "mobile phone number", "gender", etc., and the information such as a unique (key field), an open, a micro-letter head portrait and a micro-letter nickname obtained according to the web page authorization of the micro-letter service number account a is collected and stored in the user information table of the user identity subsystem;
the open platform authorization module 0230 is used as the PC of the computer end, and based on the webpage authorized to log in by the framework B, a two-dimensional code is generated for a user to use a mobile phone to scan a little letter and scan a little letter so as to log in the little letter identity;
the open platform binding module 0240 is configured to detect whether the user binds identity information based on the WeChat open platform framework B, and if not, push a form to be filled in by the user, where the form includes fields such as "name", "eight bits after the identity card", "mobile phone number" and "gender", and the information such as a unique (key field), an open, a WeChat head portrait and a WeChat nickname obtained according to the WeChat service number account a web authorization is collected and stored in the user information table of the user identity subsystem. Here, it should be noted that, because the micro-letter service number account a has been accessed under the micro-letter open platform framework B, the unionid obtained by the service number binding module 0220 and the open platform binding module 0240 is actually a globally unique identification value under the same open platform, so that only any one of the two modules needs to bind, and after success, the other module does not need to bind again.
The certificate analysis subsystem 0300 comprises a certificate template presetting module 0310, a picture record screening module 0320 and a picture character recognition module 0330;
the certificate template presetting module 0310 refers to a default template and a customized individual template selected based on a common AI cloud platform (such as a hundred-degree AI open platform), wherein the default template comprises an identity card, a driving license, a passport, a household book and a birth medical certificate, and the individual template comprises a public transport card, a campus card and a bank card according to a use field Jing Dingzhi; the picture record screening module 0320 is used for screening out the records with non-empty picture path fields in the chat record list, namely a picture record information set; the picture character recognition module 0330 is configured to call a common image recognition interface (such as hundred-degree image recognition API), recognize the type of the certificate and as many certificate information as possible from the picture, and if the recognition is successful and the result is ideal, store the information into a owner information table, where the owner information table may include an owner name, an owner identification number, or an owner driving license number, or other key information.
The certificate loss reporting subsystem 0400 comprises a loss owner login detection module 0410, a certificate loss reporting registration module 0420 and a loss owner identity verification module 0430;
the owner-loss login detection module 0410 is used for detecting whether the credential loss reporting person has operated the user identity subsystem 0200, namely whether to pay attention to and bind an account number A or a binding platform B; the certificate loss registration module 0420 is used for describing the specific conditions of the lost certificate by the certificate loss person, wherein the specific conditions comprise certificate type, certificate key information, lost time and place, expected retrieval mode, emergency contact mode and the like; the identity verification module 0430 is used for submitting information for proving the identity of the identity newspaper person, and if the identity newspaper is a loss identity card, the face information of the identity of the certificate report person is submitted to a face information field of a owner information table for standby through a face information acquisition interface (such as hundred-degree image recognition API); if the identity card is not reported, the identity card photo needs to be uploaded.
The certificate return subsystem 0500 includes a owner comparison module 0510, an owner notification module 0520, a certificate solicitation module 0530, and a return registration module 0540;
the owner-loss comparison module 0510 is configured to compare the owner-loss name and the owner-loss mobile phone number acquired by the picture character recognition module 0330 with the user information table of the user identity subsystem 0200, where the comparison condition is eight bits after the name field and the identity card, and if successful, send the compared user record to the owner-loss notification module 0520;
the owner-loss notification module 0520 uses a message template of the micro-letter service number account A to push a message to a micro-letter account of a user according to the acquired user record;
the certificate receiving module 0530 is used for displaying the record of the owner information in a picture-text list mode, adding mosaic to the certificate picture by using a picture processing algorithm, and carrying out encryption processing on important information;
the return registration module 0540 is used for resetting the return record to the returned state after the certificate loss report person contacts the certificate picker and obtains the certificate.
The control method of the lost certificate recovery system of the present invention is also described below by using specific practical examples:
1. the group chat named "campus missing certificate recovery system test" is created for simulating an experimental environment used in the invention, and the QQ number with the QQ account number of "tally robot" is added into the group chat as shown in fig. 9.
2. The cool Q pro 5.15.10 (200406) software is installed on a Server whose operating system is Windows Server2008R2 as cool Q chat robot software, and a QQ account "tally robot" is registered as shown in fig. 10.
3. After the students and teachers in the campus pick up the certificates, only the campus QQ group added in the certificates is required to issue information as shown in fig. 11, and the certificates are not required to be specially handed to relevant departments of the guard or other lost and found out professional staff.
4. The cool Q robot software obtains the user chat record in real time to the cool Q log file, and stores the user chat record in a disk in the form of a sqlite database as shown in fig. 12.
5. The operating system is a Server of Windows Server2008R2, sqlite odbc_w64.exe is installed, then a system DSN is added to a management tool/data source (odbc), and the configuration parameters are as follows, and a log file of the cool Q robot is added to a data source named "logv2_202004" as shown in fig. 13.
6. The operating system is that Microsoft SQL Server2008R2 is installed on a Server of Windows Server2008R2, a link Server is added, the configuration is as shown in FIG. 14, an access interface "Microsoft OLE DB Provider for ODBC Drivers", a product Name "sqlite", a data source "logv2_202004" and the position is the same as "Database Name" filled in by the above-mentioned odbc adding operation. Note that, since the database software adopted by the main program portion of the present example is inconsistent with the database software of the data source, an intermediate interface capable of accessing the data source needs to be added to Microsoft SQL Server2008R 2.
7. Creating a view vw_qq_log, and converting a chat message log read by a link server into a QQ log view, wherein the specific codes are as follows:
create view[dbo].[vw_qq_log]as
select
ID,
timestamp=time,
time=CONVERT(varchar(50),DATEADD(HH,8,DATEADD(S,time,'1970-01-01
00:00:00')),120),
priority,
CONVERT(varchar(max),source)source,
CONVERT(varchar(max),status)status,
CONVERT(varchar(max),name)name,
CONVERT(varchar(max),detail)detail
from OPENQUERY(LOGV2_202004,'select*from main.log')
8. creating a view vw_chat_content_original, converting the QQ log view into a chat content original record view, screening out a group message and a group message file, and specifically comprising the following steps:
create view[dbo].[vw_chat_content_original]as
select*,
case when CHARINDEX('[CQ:image,file=',a.content)>0then
REPLACE(REPLACE(a.content,'[CQ:image,file=',”),']',”)
when CHARINDEX ('filename:', a.content) >0then
SUBSTRING (a.content, 5, CHARINDEX ('size:', a.content) -6)
else”end media_name
from(
select a.ID,
a.timestamp,
a.time,
a.name,
a.detail,
'group'account_type,
SUBSTRING (a.details, CHARINDEX ('group:', a details) +2, CHARINDEX ('account:', a details) -4)
acount_code,
SUBSTRING (a.detail, channdex (' account number):
',a.detail)+3,assets_inquiry.dbo.f_findstr(a.detail,”,4)-
assets_inquiry.dbo.f_findstr(a.detail,”,3))user_code,
case when CONVERT (varchar (50), a.name) = '[ ] group message' then
SUBSTRING(a.detail,assets_inquiry.dbo.f_findstr(a.detail,”,4)+3,LEN(a.detail)-
assets_inquiry.dbo.f_findstr(a.detail,”,4)-2)
when CONVERT (50), a name) = '[ -A ] group message (file)' then
SUBSTRING(a.detail,assets_inquiry.dbo.f_findstr(a.detail,”,4)+1,LEN(a.detail)-
assets_inquiry.dbo.f_findstr(a.detail,”,4)-2)
else”end content
from LostFound.dbo.vw_qq_log a
where CONVERT (varchar (50), a.name) = '[ -y ] group message' or
CONVERT (varchar (50), a.name) =' [ ] group message (file).
)a
9. AI open platform at hundred degreeshttps://ai.baidu.com/The above applies for "image recognition" cloud services and downloads the AipSdk program library, as shown in fig. 14, to be installed into the project file. The "Ocr.cs" of the "Ocr" directory is used, and the Ocr.cs class library is a hundred-degree AI providing universal text recognition function, including:
1) Identifying all characters in a certain picture, and returning the position information of the characters in the picture;
2) The user requests to identify an identity card from the service, wherein the identity card identification comprises a front surface and a back surface;
3) Identify the bank card and return the card number and issuer, etc. The present example uses the identification function codes for identity cards, bank cards and other custom card certificates in the class library.
10. And packaging an OcrService class library, wherein the API for conveniently calling hundred-degree image recognition is as follows:
11. the method comprises the steps of creating a local API, reading, calling an OcrService class library by taking a received picture path as a parameter, wherein the specific codes are as follows:
12. a table chat_content is created for storing already processed vw_chat_content_original data, and the specific codes are as follows:
13 creates a table lost_property for storing the successfully identified pick-up certificate data.
14. Creating Windows service, named LostFoundDataAchievement, for processing vw_chat_content_original data and for storing successfully identified pick-up certificate data, the main codes are as follows:
15. the certificate photograph captured in the above steps is matched to the data shown in table 1 after the above series of processing:
TABLE 1
16. Because the owner information is matched according to the certificate photo and the service number openid is contained, the program automatically sends the certificate picker information to the student directly in the form of a service number template message.
While the embodiments of the present invention have been described above with reference to the processes illustrated by the embodiments, it will be understood by those skilled in the art that the present disclosure is not limited to the embodiments described above, and that each of the modifications, changes, and substitutions can be made without departing from the scope of the embodiments of the present invention.