CN113554029B - Bill verification method, device, equipment and storage medium - Google Patents

Bill verification method, device, equipment and storage medium Download PDF

Info

Publication number
CN113554029B
CN113554029B CN202111095953.7A CN202111095953A CN113554029B CN 113554029 B CN113554029 B CN 113554029B CN 202111095953 A CN202111095953 A CN 202111095953A CN 113554029 B CN113554029 B CN 113554029B
Authority
CN
China
Prior art keywords
bill
verification
data
interface
verified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111095953.7A
Other languages
Chinese (zh)
Other versions
CN113554029A (en
Inventor
何丙南
孙玉坤
陶晓阳
易寒
金宝华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN202111095953.7A priority Critical patent/CN113554029B/en
Publication of CN113554029A publication Critical patent/CN113554029A/en
Application granted granted Critical
Publication of CN113554029B publication Critical patent/CN113554029B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying

Abstract

The invention belongs to the technical field of computers, and discloses a bill verification method, a bill verification device, bill verification equipment and a storage medium. The method comprises the steps of carrying out picture recognition on a received bill to be verified to obtain bill identification information, bill face data and a bill type; when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information; and performing authenticity verification on the bill to be verified according to the bill bottom database data and the bill surface data. Because the corresponding bill base database data can be searched in the pre-constructed local bill information base when the bill to be verified is received, the authenticity of the bill to be verified is verified according to the bill base database data and the bill face data of the bill to be verified, the bill checking interface provided by a third party is not required to be inquired every time, and the problem of low bill checking efficiency caused by the instability of the bill checking interface of the third party is effectively solved.

Description

Bill verification method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a bill verification method, a bill verification device, bill verification equipment and a storage medium.
Background
In the operation process of the enterprise, a large number of invoices are generated, and the enterprise can carry out work such as reimbursement or tax declaration on the received invoices. Some lawbreakers can forge invoices in order to obtain the benefit, make the enterprise when to the invoice received, need carry out the true and false verification to the invoice earlier, just carry out work such as reimbursement or tax declare when verifying that issue a bill is true, and nowadays, the enterprise usually verifies the true and false of invoice through the bill inspection interface that the third party provided, but, the bill inspection interface that the third party provided is unstable, can appear blocking often or respond slowly the phenomenon etc. leads to the verification inefficiency to the invoice, be unfavorable for the operation of enterprise.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a bill verification method, a bill verification device, bill verification equipment and a storage medium, and aims to solve the technical problem of low invoice verification efficiency in the prior art.
In order to achieve the above object, the present invention provides a bill validation method, comprising the steps of:
carrying out picture recognition on a received bill to be verified to obtain bill identification information, bill face data and a bill type;
when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information;
and carrying out authenticity verification on the bill to be verified according to the bill bottom database data and the bill face data.
Optionally, after the step of performing picture recognition on the received bill to be verified to obtain the bill identification information, the bill face data and the bill type, the method further includes:
when the bill type is not the target bill type, selecting a target bill verification interface from a preset verification interface library;
acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data;
sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result;
and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
Optionally, the step of receiving the bill verification result and determining whether the bill to be verified passes the authenticity verification according to the bill verification result includes:
receiving the bill verification result, and analyzing the bill verification result to obtain a verification state code;
determining whether the interface access is successful according to the verification status code and the interface information;
when the interface access is successful, determining an authenticity verification result according to the bill verification result;
and when the authenticity verification result is verification pass, judging that the bill to be verified passes authenticity verification.
Optionally, the step of determining whether the interface access is successful according to the verification status code and the interface information includes:
determining a success status code corresponding to the target bill verification interface according to the interface information;
comparing the verification status code to the success status code;
and when the verification status code is consistent with the success status code, judging that the interface access is successful.
Optionally, after the step of determining whether the interface access is successful according to the verification status code and the interface information, the method further includes:
and when the interface access is unsuccessful, returning to the step of selecting the target bill verification interface from the preset verification interface library.
Optionally, after the step of searching the corresponding bill base database data in the local bill information base according to the bill identification information when the bill type is the target bill type, the method further includes:
when the bill base database data corresponding to the bill identification information cannot be found, selecting a target bill verification interface from a preset verification interface library;
acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data;
sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result;
and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
Optionally, the step of performing picture recognition on the received bill to be verified to obtain bill identification information, bill face data and bill type includes:
selecting a target picture identification interface from a preset picture identification interface library;
carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result;
and determining bill identification information, bill face data and bill types according to the picture recognition result.
Optionally, the step of determining the bill identification information, the bill face data and the bill type according to the image recognition result includes:
carrying out picture recognition on the bill to be verified through a local recognition interface to obtain a local recognition result;
performing reliability verification on the picture identification result according to the local identification result;
and when the reliability verification passes, determining bill identification information, bill face data and bill types according to the picture recognition result.
Optionally, after the step of performing reliability verification on the picture identification result according to the local identification result, the method further includes:
when the reliability verification fails, acquiring historical verification failure times;
updating the historical verification failure times to obtain the current verification failure times;
and when the current verification failure times are smaller than a preset failure threshold value, returning to the step of carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result.
Optionally, before the step of performing picture recognition on the received bill to be verified to obtain the bill identification information, the bill face data and the bill type, the method further includes:
when the current time meets a preset data synchronization condition, acquiring a data synchronization rule corresponding to the preset data synchronization condition;
generating a data synchronization request according to the data synchronization rule;
sending the data synchronization request to a bill bottom library interface so as to enable the bill bottom library interface to feed back a data synchronization response;
receiving the data synchronous response, and analyzing the data synchronous response to obtain a plurality of pieces of bill bottom database data;
and updating the local bill information base according to the bill base data.
Optionally, the step of performing authenticity check on the bill to be checked according to the bill base data and the bill face data includes:
determining a check field and check data according to the bill bottom database data, and determining a field to be checked in the ticket face data according to the check field;
acquiring data to be verified corresponding to the field to be verified;
comparing the verification data with the data to be verified;
and when the verification data is consistent with the data to be verified, judging that the bill to be verified passes the authenticity verification.
Optionally, after the step of performing authenticity check on the bill to be checked according to the bill base data and the bill face data, the method further includes:
when the bill to be verified passes authenticity verification, generating a real bill record according to the bill identification information, the bill face data and the bill type;
and storing the real bill records into a preset real bill library.
In addition, in order to achieve the above object, the present invention further provides a bill validation device, including the following modules:
the bill identification module is used for carrying out picture identification on the received bill to be verified to obtain bill identification information, bill face data and bill type;
the data searching module is used for searching corresponding bill bottom database data in a local bill information base according to the bill identification information when the bill type is the target bill type;
and the bill verification module is used for verifying the authenticity of the bill to be verified according to the bill bottom database data and the bill face data.
Optionally, the data search module is further configured to select a target bill validation interface from a preset validation interface library when the bill type is not the target bill type; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
Optionally, the data search module is further configured to receive the bill validation result, analyze the bill validation result, and obtain a validation status code; determining whether the interface access is successful according to the verification status code and the interface information; when the interface access is successful, determining an authenticity verification result according to the bill verification result; and when the authenticity verification result is verification pass, judging that the bill to be verified passes authenticity verification.
Optionally, the data search module is further configured to determine a successful status code corresponding to the target bill validation interface according to the interface information; comparing the verification status code to the success status code; and when the verification status code is consistent with the success status code, judging that the interface access is successful.
Optionally, the data search module is further configured to select a target bill validation interface from a preset validation interface library when the validation is unsuccessful.
Optionally, the bill validation module is further configured to select a target bill validation interface from a preset validation interface library when the bill base database corresponding to the bill identification information cannot be found; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
In addition, in order to achieve the above object, the present invention also provides a bill validation apparatus, including: a processor, a memory and a ticket validation program stored on the memory and executable on the processor, the ticket validation program when executed by the processor implementing the steps of the ticket validation method as described above.
In addition, in order to achieve the above object, the present invention further provides a computer readable storage medium having a bill validation program stored thereon, which when executed implements the steps of the bill validation method as described above.
The method comprises the steps of carrying out picture recognition on a received bill to be verified to obtain bill identification information, bill face data and a bill type; when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information; and performing authenticity verification on the bill to be verified according to the bill bottom database data and the bill surface data. Because the corresponding bill base database data can be searched in the pre-constructed local bill information base when the bill to be verified is received, the authenticity of the bill to be verified is verified according to the bill base database data and the bill face data of the bill to be verified, the bill checking interface provided by a third party is not required to be inquired every time, and the problem of low bill checking efficiency caused by the instability of the bill checking interface of the third party is effectively solved.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a bill validation method according to the present invention;
FIG. 3 is a schematic flow chart of a second embodiment of a bill validation method according to the present invention;
FIG. 4 is a schematic flow chart of a third embodiment of a bill validation method according to the present invention;
fig. 5 is a block diagram showing the structure of the first embodiment of the bill validator according to the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a bill validation device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a ticket validation program.
In the electronic apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention may be provided in a ticket validation device, and the electronic device calls a ticket validation program stored in the memory 1005 through the processor 1001 and executes the ticket validation method provided by the embodiment of the present invention.
An embodiment of the present invention provides a bill validation method, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of a bill validation method according to the present invention.
In this embodiment, the bill validation method includes the following steps:
step S10: and carrying out picture recognition on the received bill to be verified to obtain bill identification information, bill face data and bill type.
It should be noted that the execution subject of this embodiment may be the bill validation device, and the bill validation device may be an electronic device such as a personal computer, a server, and the like, or may be other devices that can achieve the same or similar functions.
It should be noted that the bill to be verified may be a bill which needs to be subjected to authenticity verification and is sent to the bill verification device by other devices, when the bill to be verified is sent to the bill verification device by other devices, a picture of the bill to be verified may be directly sent to the bill verification device, or an access link of the picture of the bill to be verified may be sent to the bill verification device, and then the bill verification device downloads the picture of the bill to be verified according to the received access link. The ticket identification information may be identification information of a ticket to be verified, such as: and if the bill to be verified is the invoice, the bill identification information is the invoice number. The ticket face data can be data recorded on the ticket face of the ticket, and can comprise data such as the head raising of a drawer, tax payment numbers of the drawer, commodity information, amount of money, tax amount, date of drawing the ticket and the like. The ticket type may be a type of ticket to be verified, which may include: special value-added tax invoice, common invoice, special invoice and the like.
Further, in order to quickly identify the picture of the ticket, step S10 in this embodiment may include:
selecting a target picture identification interface from a preset picture identification interface library; carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result; and determining bill identification information, bill face data and bill types according to the picture recognition result.
It should be noted that the preset picture identification interface library may be preset by a manager of the bill identification device, the preset picture identification interface library may include picture identification interfaces provided by a plurality of different manufacturers, the selection of the target picture identification interface in the preset picture identification interface library may be to obtain an interface score corresponding to each picture identification interface in the preset picture identification interface library, and use the picture identification interface with the highest interface score as the target picture identification interface, where the interface score may be quantized data for representing identification efficiency and identification accuracy corresponding to each picture identification interface, and the higher the interface score is, the higher the identification efficiency and identification accuracy corresponding to the picture identification machine interface are, and the higher the identification efficiency and identification accuracy can be preset by the manager of the bill identification device.
In actual use, the target picture identification interface is used for carrying out picture identification on the received bill to be verified, and the obtained picture identification result can be obtained by sending the picture of the bill to be verified to the target picture identification interface for carrying out picture identification and receiving a picture identification result fed back by the target picture identification interface when the identification is complete. Determining the bill identification information, the bill data and the bill type according to the picture identification result can be to analyze the picture identification result and extract the bill identification information, the bill data and the bill type contained in the picture identification result.
It can be understood that the recognition efficiency and the recognition accuracy of the picture recognition interface provided by a professional picture recognition manufacturer are generally higher, and the picture recognition interface with the highest interface score is selected from the preset picture recognition interface library to be used as the target picture recognition interface for carrying out picture recognition on the bill to be verified, so that the picture recognition of the bill to be verified can be completed as quickly as possible.
Further, although the recognition accuracy of the picture recognition interface provided by the picture recognition manufacturer is generally high, it is inevitable that a recognition error occurs, and in order to ensure the recognition accuracy of the bill to be verified as much as possible, the step of determining the bill identification information, the bill face data and the bill type according to the picture recognition result in this embodiment may include:
carrying out picture recognition on the bill to be verified through a local recognition interface to obtain a local recognition result; performing reliability verification on the picture identification result according to the local identification result; and when the reliability verification passes, determining bill identification information, bill face data and bill types according to the picture recognition result.
It should be noted that the local identification interface may be a picture identification interface provided in the bill validation device, and the local identification interface may identify only important data, instead of all data of the bill to be verified, such as: and identifying the taxpayer tax payment number, amount and tax payment amount in the bill to be verified through the local identification interface. The reliability verification of the picture identification result according to the local identification result may be that data of the same type as the local identification result in the picture identification result is extracted, the extracted data is compared with the data in the local identification result, and when the extracted data is consistent with the data in the local identification result, the reliability verification is judged to be passed.
It can be understood that, because the data concerned by the local identification interface is less, the identification accuracy of the data is higher, the image identification result is subjected to reliability verification through the local identification result, and the image identification result can be determined not to have errors when the reliability verification passes, so that the bill identification information, the ticket face data and the bill type can be determined according to the image identification result when the reliability verification passes.
Further, in order to obtain a reliable picture identification result as much as possible, in this embodiment, after the step of performing reliability verification on the picture identification result according to the local identification result, the method further includes:
when the reliability verification fails, acquiring historical verification failure times; updating the historical verification failure times to obtain the current verification failure times; and when the current verification failure times are smaller than a preset failure threshold value, returning to the step of carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result.
It should be noted that the preset failure threshold may be the maximum number of times that the picture recognition result of the same picture recognition interface is allowed to continuously fail the reliability verification, and the preset failure threshold may be preset by a manager of the bill verification device. The historical verification failure times may be the number of times that the target picture identification interface has not continuously passed the authenticity verification.
It can be understood that, if the current verification failure number is less than the preset failure threshold, it indicates that the number of times of continuous failure of the reliability verification does not reach the preset upper limit, and therefore, the image recognition of the received bill to be verified through the target image recognition interface can be retried, thereby ensuring that a reliable image recognition result is obtained as much as possible.
In actual use, if the reliability verification is passed, the recorded historical verification failure times can be cleared. If the current verification failure frequency is greater than or equal to the preset failure threshold, the frequency which continuously fails reliability verification reaches the preset upper limit, and at this time, in order to ensure that a reliable picture identification result is obtained as far as possible, picture identification interfaces provided by other manufacturers can be selected for picture identification, so that the step of selecting a target picture identification interface from a preset picture identification interface library can be returned, and a target picture identification interface is selected again, wherein the newly selected target picture identification interface is different from the previously selected target identification interface.
Step S20: and when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information.
It should be noted that the local bill information base may be a preset database in which a plurality of pieces of bill base data are stored. The bill bottom database data can be the bottom account data of the invoice, and the bill bottom database data can be acquired through a bottom account database query interface of a tax bureau provided by a third party. The target bill type can be preset by the manager of the bill validation device according to actual needs, for example: the local bill information base only contains bill base data of the value-added tax special invoice, and then the target bill type can be set as the value-added tax special invoice. And if the bill type of the bill to be verified is the target bill type, the verification can be performed by using the bill base database data in the local bill information base.
Step S30: and carrying out authenticity verification on the bill to be verified according to the bill bottom database data and the bill face data.
It should be noted that the bill base data generally only contains a part of important data in the complete bill face data, so that the authenticity verification of the bill to be verified according to the bill base data and the bill face data can be realized by extracting part of data stored in the tax bureau base account in the bill face data, obtaining the bill face base account data, comparing the bill face base account data with the bill base data, and if the bill face base account data is consistent with the bill base data, determining that the bill to be verified is not a counterfeit bill, so that the bill to be verified can be judged to pass the authenticity verification.
Further, in order to perform the authenticity check quickly, step S30 in this embodiment may include:
determining a check field and check data according to the bill bottom database data, and determining a field to be checked in the ticket face data according to the check field; acquiring data to be verified corresponding to the field to be verified; comparing the verification data with the data to be verified; and when the verification data is consistent with the data to be verified, judging that the bill to be verified passes the authenticity verification.
It should be noted that, in the data processing process, both the ticket base data and the ticket face data may store data in a key-value form, the check field may be all fields in the ticket base data, and the check data may be a value corresponding to each check field. And determining the field to be verified in the ticket data according to the verification field, wherein the field to be verified in the ticket data can be a field which is the same name as the verification field in the acquired ticket data. The data to be verified corresponding to the field to be verified is obtained, which may be a value corresponding to each field to be verified in the obtained ticket data.
In practical use, in order to improve execution efficiency and perform authenticity verification quickly, the verification data and the data to be verified are compared through a preset hash algorithm, namely a verification hash value of the verification data is obtained through the preset hash algorithm, then the hash value to be verified of the data to be verified is obtained through the preset hash algorithm, and when the verification hash value is consistent with the hash value to be verified, the verification data is judged to be consistent with the data to be verified.
In the embodiment, the received bill to be verified is subjected to picture recognition to obtain bill identification information, bill face data and bill type; when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information; and performing authenticity verification on the bill to be verified according to the bill bottom database data and the bill surface data. Because the corresponding bill base database data can be searched in the pre-constructed local bill information base when the bill to be verified is received, the authenticity of the bill to be verified is verified according to the bill base database data and the bill face data of the bill to be verified, the bill checking interface provided by a third party is not required to be inquired every time, and the problem of low bill checking efficiency caused by the instability of the bill checking interface of the third party is effectively solved.
Referring to fig. 3, fig. 3 is a schematic flow chart of a bill validation method according to a second embodiment of the present invention.
Based on the first embodiment, after step S10, the bill validation method of this embodiment further includes:
step S20': and when the bill type is not the target bill type, selecting a target bill verification interface from a preset verification interface library.
It should be noted that, if the type of the bill is not the target type of the bill, it indicates that the bill base data of this type may not exist in the local bill information base, and cannot be verified by using the bill base data in the local bill information base, and the bill to be verified needs to be verified by using other methods, at this time, the target bill verification interface may be selected from the preset verification interface base. The preset verification interface library may include a plurality of bill verification interfaces provided by different manufacturers, and the selection of the target bill verification interface from the preset verification interface library may be a random selection of a bill verification interface from the preset verification interface library as the target bill verification interface.
Step S30': and acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill surface data.
It should be noted that the interface information may include access parameters of the target ticket validation interface, meanings of the access parameters, and formats of the access parameters. The generating of the bill query request according to the interface information and the bill identification information may be generating an interface access parameter according to the interface information, the bill identification information and the ticket data, and then generating the bill query request based on the interface access parameter.
Step S40': and sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result.
It can be understood that the bill validation interface can analyze the received bill query request to obtain the bill identification information and the bill surface data, perform the authenticity verification on the obtained bill identification information and the bill surface data, and then feed back the bill validation result when the verification is completed.
Step S50': and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
The bill verification device can analyze the bill verification result when receiving the bill verification result to obtain an authenticity verification result, and can determine whether the bill to be verified passes authenticity verification according to the authenticity verification result.
Further, since each bill validation interface is provided by a different manufacturer, the data format and parameter meaning of the interface may be different, and in order to quickly determine whether the bill to be verified passes the authenticity verification according to the bill validation result returned by the bill validation interface, the step S50' in this embodiment may include:
receiving the bill verification result, and analyzing the bill verification result to obtain a verification state code; determining whether the interface access is successful according to the verification status code and the interface information; when the interface access is successful, determining an authenticity verification result according to the bill verification result; and when the authenticity verification result is verification pass, judging that the bill to be verified passes authenticity verification.
It should be noted that the interface information may further include a name of a return parameter field of the target bill validation interface, a meaning of each field, and a corresponding state of different values of each field, and the bill validation result is analyzed, and the validation state code may be a validation result object constructed in advance according to the return parameter field in the interface information, and when the bill validation result is received, the validation result object is converted into the validation result object, and then the value corresponding to the validation state field is extracted from the validation result object, so as to obtain the validation state code. The authenticity check result may include both verification pass and verification fail.
It can be understood that if the interface access is successful, it indicates that the target bill verification interface successfully performs the authenticity verification on the bill to be verified, at this time, the bill verification result can be tied, the authenticity verification result therein is extracted, and then when the authenticity verification result is verification pass, it is determined that the bill to be verified passes the authenticity verification.
In practical use, the bill validation interface is provided by a third party vendor, and the service thereof may have unstable factors and fail, for example: the method comprises the steps of selecting a target bill verification interface from a preset verification interface library, reselecting the target bill verification interface, and verifying the to-be-verified bill by using the reselected target bill verification interface, wherein the reselected target bill verification interface is different from the target bill verification interface selected last time.
Further, in order to quickly determine whether the interface access is successful, the step of determining whether the interface access is successful according to the verification status code and the interface information according to this embodiment may include:
determining a success status code corresponding to the target bill verification interface according to the interface information; comparing the verification status code to the success status code; and when the verification status code is consistent with the success status code, judging that the interface access is successful.
It should be noted that the interface information may include the field name of the returned parameter of the target bill validation interface, the meaning of each field, and the corresponding state of different values of each field, so that the field of the returned validation status code of the target bill validation interface may be determined according to the interface information, the corresponding state of each value of the field may be obtained, and the value whose state is successful in access may be used as the successful status code.
It can be understood that, if the verification status code in the bill verification result is consistent with the successful status code, it indicates that the target bill verification interface has successfully verified the authenticity of the bill to be verified, and therefore, it can be determined that the interface access is successful.
Further, in order to verify the to-be-verified bill when the bill type of the to-be-verified bill is the target bill type but the bill base database data corresponding to the bill identification information corresponding to the to-be-verified bill cannot be found, after step S20, the method may further include:
when the bill base database data corresponding to the bill identification information cannot be found, selecting a target bill verification interface from a preset verification interface library; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
It can be understood that, if the bill base database data corresponding to the bill identification information of the bill to be verified cannot be found in the local bill information base, it indicates that the bill to be verified may be a counterfeit bill, and there is no corresponding bill base database data, or the bill base database data corresponding to the bill to be verified is not obtained when the local bill information base is constructed, and the bill to be verified cannot be subjected to authenticity verification through the bill base database data at this time.
In the embodiment, when the bill type is not the target bill type, the target bill verification interface is selected from a preset verification interface library; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result. When the target bill type is positioned at the bill type part of the bill to be verified, the target bill verification interface is selected from the preset verification interface library to verify the authenticity of the bill to be verified, so that the bill to be verified can still be verified in authenticity when the bill base database data in the local bill information library cannot be utilized, whether the target bill verification interface can be successfully accessed is detected, and the bill verification interfaces provided by other manufacturers are selected from the preset verification interface library again to serve as the target bill verification set interface when the target bill verification interface cannot be normally accessed, so that the bill to be verified can still be normally verified in authenticity when the bill verification interface of one manufacturer is abnormal and cannot be accessed.
Referring to fig. 4, fig. 4 is a schematic flow chart of a bill validation method according to a third embodiment of the present invention.
Based on the first embodiment, before the step S10, the bill validation method in this embodiment further includes:
step S01: and when the current moment meets a preset data synchronization condition, acquiring a data synchronization rule corresponding to the preset data synchronization condition.
It should be noted that the current time may be the current device time of the bill validation device. When the current time meets the preset data synchronization condition, it indicates that the data synchronization process needs to be executed, and the preset data synchronization condition may be set in advance by a manager of the bill validation device, for example: the data synchronization process is required to be executed at 1:00 a day or at an integer point. The data synchronization rule may be a rule to be observed when the data synchronization flow is executed, and may include a request construction manner, a data synchronization time range, and the like.
In actual use, a manager of the bill verification device can set a plurality of different preset data synchronization conditions, and each different preset data synchronization condition can correspond to different data synchronization rules.
Step S02: and generating a data synchronization request according to the data synchronization rule.
It should be noted that, the generating of the data synchronization request according to the data synchronization rule may be generating the data synchronization request according to a request construction manner recorded in the data synchronization rule, and setting a parameter in the data synchronization request according to the data synchronization time range.
Step S03: and sending the data synchronization request to a bill bottom library interface so as to enable the bill bottom library interface to feed back a data synchronization response.
It should be noted that the bill bottom library interface may be an interface for querying a bottom account library of the tax bureau, and the bill bottom library interface may be provided by the tax bureau or may be provided by a supplier specified by the tax bureau.
It can be understood that the data synchronization request is sent to the bill base interface, and then the bill base interface queries the bill base data within the data synchronization time range according to the parameters in the data synchronization request, and generates a data synchronization response according to the queried bill base data and feeds the data synchronization response back to the bill validation device.
Step S04: and receiving the data synchronous response, and analyzing the data synchronous response to obtain a plurality of pieces of bill bottom database data.
It can be understood that when the bill validation device receives the data synchronization response fed back by the bill base interface, the bill validation device can analyze the data synchronization response and extract the data therein, so as to obtain a plurality of pieces of bill base data.
Step S05: and updating the local bill information base according to the bill base data.
It will be appreciated that updating the local ticket information base based on the ticket vault data may be storing the ticket vault data in the local ticket information base.
In actual use, in order to save modification operation on the local bill information base, corresponding data can be searched in the local bill information base according to the identification of the bill information base data when the local bill information base is updated according to the bill information base data, the searched data is compared with the bill information base data when the data corresponding to the identification can be searched, and the searched data is modified according to the bill information base data when the data corresponding to the identification is inconsistent with the data of the bill information base; and directly adding the bill base database data to the local bill information base when the data corresponding to the identifier is found.
Further, since the same invoice may be used multiple times in different auditing links, if verification is required each time, a large amount of resources may be wasted, and in order to avoid this phenomenon, after the step S30, the method further includes:
when the bill to be verified passes authenticity verification, generating a real bill record according to the bill identification information, the bill face data and the bill type; and storing the real bill records into a preset real bill library.
It should be noted that the preset real bill repository may be a preset database for storing real bill records of bills that have passed the authenticity verification.
It can be understood that, if the bill to be verified passes the authenticity verification, it indicates that the bill to be verified is not a counterfeit bill, at this time, a real bill record may be generated according to the bill identification information, the bill face data, and the bill type of the bill to be verified, then the real bill record is stored in the preset real bill repository, and is stored, then, subsequently, when the bill is verified, the corresponding real bill record may be searched in the preset real bill repository, if the corresponding record is searched, the bill does not need to be verified again, and if the corresponding real bill record is searched, the bill may be verified by the bill verification method according to the embodiment and the embodiments.
In the embodiment, when the current time meets the preset data synchronization condition, the data synchronization rule corresponding to the preset data synchronization condition is acquired; generating a data synchronization request according to the data synchronization rule; sending the data synchronization request to a bill bottom library interface so as to enable the bill bottom library interface to feed back a data synchronization response; receiving the data synchronous response, and analyzing the data synchronous response to obtain a plurality of pieces of bill bottom database data; and updating the local bill information base according to the bill base data. The data synchronization process can be executed when the preset data synchronization condition is met at the current moment, the bill base data are obtained from the bill base interface to update the local bill information base, the fact that the bill base data corresponding to the bill to be verified are contained in the local bill information base when the bill to be verified is guaranteed to the greatest extent, dependence on a bill checking interface of a third party is reduced, and the influence of instability of the bill checking interface of the third party on bill verification efficiency is further reduced.
Furthermore, an embodiment of the present invention further provides a storage medium, where a bill validation program is stored, and the bill validation program, when executed by a processor, implements the steps of the bill validation method as described above.
Referring to fig. 5, fig. 5 is a block diagram showing the structure of the first embodiment of the bill validator according to the present invention.
As shown in fig. 5, the bill validation device according to the embodiment of the present invention includes:
the bill identifying module 10 is used for carrying out picture identification on the received bill to be verified to obtain bill identification information, bill face data and bill type;
the data searching module 20 is configured to search corresponding bill base database data in a local bill information base according to the bill identification information when the bill type is the target bill type;
and the bill verification module 30 is used for verifying the authenticity of the bill to be verified according to the bill bottom database data and the bill surface data. .
In the embodiment, the received bill to be verified is subjected to picture recognition to obtain bill identification information, bill face data and bill type; when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information; and performing authenticity verification on the bill to be verified according to the bill bottom database data and the bill surface data. Because the corresponding bill base database data can be searched in the pre-constructed local bill information base when the bill to be verified is received, the authenticity of the bill to be verified is verified according to the bill base database data and the bill face data of the bill to be verified, the bill checking interface provided by a third party is not required to be inquired every time, and the problem of low bill checking efficiency caused by the instability of the bill checking interface of the third party is effectively solved.
Further, the data search module 20 is further configured to select a target bill validation interface from a preset validation interface library when the bill type is not the target bill type; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
Further, the data search module 20 is further configured to receive the bill validation result, and analyze the bill validation result to obtain a validation status code; determining whether the interface access is successful according to the verification status code and the interface information; when the interface access is successful, determining an authenticity verification result according to the bill verification result; and when the authenticity verification result is verification pass, judging that the bill to be verified passes authenticity verification.
Further, the data search module 20 is further configured to determine a successful status code corresponding to the target bill validation interface according to the interface information; comparing the verification status code to the success status code; and when the verification status code is consistent with the success status code, judging that the interface access is successful.
Further, the data search module 20 is further configured to select a target bill validation interface from a preset validation interface library when the validation is unsuccessful.
Further, the bill validation module 30 is further configured to select a target bill validation interface from a preset validation interface library when the bill base database corresponding to the bill identification information cannot be found; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
Further, the bill identifying module 10 is further configured to select a target picture identifying interface from a preset picture identifying interface library; carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result; and determining bill identification information, bill face data and bill types according to the picture recognition result.
Further, the bill identifying module 10 is further configured to perform image identification on the bill to be verified through a local identification interface to obtain a local identification result; performing reliability verification on the picture identification result according to the local identification result; and when the reliability verification passes, determining bill identification information, bill face data and bill types according to the picture recognition result.
Further, the bill identifying module 10 is further configured to obtain a historical verification failure number when the reliability verification fails; updating the historical verification failure times to obtain the current verification failure times; and when the current verification failure times are smaller than a preset failure threshold value, returning to the step of carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result.
Further, the bill identifying module 10 is further configured to obtain a data synchronization rule corresponding to a preset data synchronization condition when the current time meets the preset data synchronization condition; generating a data synchronization request according to the data synchronization rule; sending the data synchronization request to a bill bottom library interface so as to enable the bill bottom library interface to feed back a data synchronization response; receiving the data synchronous response, and analyzing the data synchronous response to obtain a plurality of pieces of bill bottom database data; and updating the local bill information base according to the bill base data.
Further, the bill validation module 30 is further configured to determine a check field and check data according to the bill base data, and determine a field to be checked in the ticket data according to the check field; acquiring data to be verified corresponding to the field to be verified; comparing the verification data with the data to be verified; and when the verification data is consistent with the data to be verified, judging that the bill to be verified passes the authenticity verification.
Further, the bill validation module 30 is further configured to generate a real bill record according to the bill identification information, the bill face data, and the bill type when the bill to be verified passes the authenticity verification; and storing the real bill records into a preset real bill library.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the bill validation method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
The invention discloses a1 and a bill verification method, which comprises the following steps:
carrying out picture recognition on a received bill to be verified to obtain bill identification information, bill face data and a bill type;
when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information;
and carrying out authenticity verification on the bill to be verified according to the bill bottom database data and the bill face data.
The ticket validation method according to a1 as described in a2, further includes, after the step of performing picture recognition on the received ticket to be verified to obtain the ticket identification information, the ticket face data, and the ticket type:
when the bill type is not the target bill type, selecting a target bill verification interface from a preset verification interface library;
acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data;
sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result;
and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
A3, the bill validation method as recited in a2, wherein the step of receiving the bill validation result and determining whether the bill to be verified passes the authenticity verification according to the bill validation result comprises:
receiving the bill verification result, and analyzing the bill verification result to obtain a verification state code;
determining whether the interface access is successful according to the verification status code and the interface information;
when the interface access is successful, determining an authenticity verification result according to the bill verification result;
and when the authenticity verification result is verification pass, judging that the bill to be verified passes authenticity verification.
A4, the ticket validation method of A3, wherein the step of determining whether the interface access is successful according to the validation status code and the interface information comprises:
determining a success status code corresponding to the target bill verification interface according to the interface information;
comparing the verification status code to the success status code;
and when the verification status code is consistent with the success status code, judging that the interface access is successful.
A5, the ticket validation method as in A3, further comprising after the step of determining whether the interface access is successful according to the validation status code and the interface information:
and when the interface access is unsuccessful, returning to the step of selecting the target bill verification interface from the preset verification interface library.
A6, the ticket validation method as in a1, further comprising, after the step of searching corresponding ticket base data in a local ticket information base according to the ticket identification information when the ticket type is the target ticket type:
when the bill base database data corresponding to the bill identification information cannot be found, selecting a target bill verification interface from a preset verification interface library;
acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data;
sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result;
and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
The bill verification method according to a7, as described in a1, the step of performing picture recognition on the received bill to be verified to obtain the bill identification information, the bill face data and the bill type, includes:
selecting a target picture identification interface from a preset picture identification interface library;
carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result;
and determining bill identification information, bill face data and bill types according to the picture recognition result.
A8, the bill validation method as recited in A7, wherein the step of determining the bill identification information, the bill face data and the bill type according to the picture recognition result comprises:
carrying out picture recognition on the bill to be verified through a local recognition interface to obtain a local recognition result;
performing reliability verification on the picture identification result according to the local identification result;
and when the reliability verification passes, determining bill identification information, bill face data and bill types according to the picture recognition result.
A9, the bill validation method as in A8, further comprising, after the step of validating the authenticity of the picture identification result according to the local identification result:
when the reliability verification fails, acquiring historical verification failure times;
updating the historical verification failure times to obtain the current verification failure times;
and when the current verification failure times are smaller than a preset failure threshold value, returning to the step of carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result.
The ticket verification method according to a10 and the ticket verification method according to a1, before the step of performing picture recognition on the received ticket to be verified to obtain the ticket identification information, the ticket face data and the ticket type, further includes:
when the current time meets a preset data synchronization condition, acquiring a data synchronization rule corresponding to the preset data synchronization condition;
generating a data synchronization request according to the data synchronization rule;
sending the data synchronization request to a bill bottom library interface so as to enable the bill bottom library interface to feed back a data synchronization response;
receiving the data synchronous response, and analyzing the data synchronous response to obtain a plurality of pieces of bill bottom database data;
and updating the local bill information base according to the bill base data.
A11, the bill validation method as described in a1, wherein the step of verifying the authenticity of the bill to be verified according to the bill base data and the face data comprises:
determining a check field and check data according to the bill bottom database data, and determining a field to be checked in the ticket face data according to the check field;
acquiring data to be verified corresponding to the field to be verified;
comparing the verification data with the data to be verified;
and when the verification data is consistent with the data to be verified, judging that the bill to be verified passes the authenticity verification.
A12 method for bill validation as in any one of a1-a11, further comprising the following steps after the step of verifying authenticity of the bill to be verified according to the bill base data and the face data:
when the bill to be verified passes authenticity verification, generating a real bill record according to the bill identification information, the bill face data and the bill type;
and storing the real bill records into a preset real bill library.
The invention discloses a bill verification device B13, which comprises the following modules:
the bill identification module is used for carrying out picture identification on the received bill to be verified to obtain bill identification information, bill face data and bill type;
the data searching module is used for searching corresponding bill bottom database data in a local bill information base according to the bill identification information when the bill type is the target bill type;
and the bill verification module is used for verifying the authenticity of the bill to be verified according to the bill bottom database data and the bill face data.
B14, the bill validation device as described in B13, said data search module further configured to select a target bill validation interface from a preset validation interface library when the bill type is not the target bill type; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
The bill validation device of B15, as described in B14, the data lookup module further configured to receive the bill validation result, analyze the bill validation result, and obtain a validation status code; determining whether the interface access is successful according to the verification status code and the interface information; when the interface access is successful, determining an authenticity verification result according to the bill verification result; and when the authenticity verification result is verification pass, judging that the bill to be verified passes authenticity verification.
The bill validation device of B16, the data search module of B15, further configured to determine a success status code corresponding to the target bill validation interface according to the interface information; comparing the verification status code to the success status code; and when the verification status code is consistent with the success status code, judging that the interface access is successful.
B17, the bill validation device according to B15, the data lookup module further configured to select a target bill validation interface from the library of preset validation interfaces when validation is unsuccessful.
B18, the bill validation device according to B13, the bill validation module further configured to select a target bill validation interface from a preset validation interface library when the bill base library data corresponding to the bill identification information cannot be found; acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data; sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result; and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
The invention discloses C19, a bill validation device, comprising: a processor, a memory and a ticket validation program stored on the memory and executable on the processor, the ticket validation program when executed by the processor implementing the steps of the ticket validation method as described above.
The invention discloses D20, a computer readable storage medium having stored thereon a ticket validation program which when executed implements the steps of a ticket validation method as described above.

Claims (10)

1. A method of document validation, the method comprising the steps of:
carrying out picture recognition on a received bill to be verified to obtain bill identification information, bill face data and a bill type;
when the bill type is the target bill type, searching corresponding bill base database data in a local bill information base according to the bill identification information;
carrying out authenticity verification on the bill to be verified according to the bill bottom database data and the bill face data;
before the step of performing picture recognition on the received bill to be verified to obtain bill identification information, bill face data and bill type, the method further comprises the following steps of:
when the current time meets a preset data synchronization condition, acquiring a data synchronization rule corresponding to the preset data synchronization condition;
generating a data synchronization request according to a request construction mode recorded in the data synchronization rule, and setting parameters in the data synchronization request according to a data synchronization time range in the data synchronization rule;
sending the data synchronization request to a bill bottom library interface to enable the bill bottom library interface to feed back data synchronization response, wherein the bill bottom library interface is an interface for inquiring a tax bureau bottom account library;
receiving the data synchronous response, and analyzing the data synchronous response to obtain a plurality of pieces of bill bottom database data;
updating a local bill information base according to the bill base data;
the step of verifying the authenticity of the bill to be verified according to the bill bottom database data and the bill face data comprises the following steps:
determining a check field and check data according to the bill bottom database data, and determining a field to be checked in the ticket face data according to the check field;
acquiring data to be verified corresponding to the field to be verified;
comparing the verification data with the data to be verified;
and when the verification data is consistent with the data to be verified, judging that the bill to be verified passes the authenticity verification.
2. The bill validation method according to claim 1, wherein the step of performing picture recognition on the received bill to be verified to obtain the bill identification information, the bill face data and the bill type further comprises:
when the bill type is not the target bill type, selecting a target bill verification interface from a preset verification interface library;
acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data;
sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result;
and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
3. The document validation method of claim 2, wherein the step of receiving the document validation result and determining whether the document to be validated passes the authenticity check based on the document validation result comprises:
receiving the bill verification result, and analyzing the bill verification result to obtain a verification state code;
determining whether the interface access is successful according to the verification status code and the interface information;
when the interface access is successful, determining an authenticity verification result according to the bill verification result;
and when the authenticity verification result is verification pass, judging that the bill to be verified passes authenticity verification.
4. The ticket validation method of claim 3, wherein said step of determining whether interface access was successful based on said validation status code and said interface information comprises:
determining a success status code corresponding to the target bill verification interface according to the interface information;
comparing the verification status code to the success status code;
and when the verification status code is consistent with the success status code, judging that the interface access is successful.
5. The ticket validation method of claim 3, wherein the step of determining whether the interface access was successful based on the validation status code and the interface information further comprises:
and when the interface access is unsuccessful, returning to the step of selecting the target bill verification interface from the preset verification interface library.
6. The ticket validation method of claim 1, wherein after the step of searching the local ticket information base for the corresponding ticket base data according to the ticket identification information when the ticket type is the target ticket type, further comprising:
when the bill base database data corresponding to the bill identification information cannot be found, selecting a target bill verification interface from a preset verification interface library;
acquiring interface information corresponding to the target bill verification interface, and generating a bill query request according to the interface information, the bill identification information and the bill face data;
sending the bill query request to the target bill verification interface so that the target bill verification interface performs authenticity verification on the bill to be verified and feeds back a bill verification result;
and receiving the bill verification result, and determining whether the bill to be verified passes the authenticity verification according to the bill verification result.
7. The bill validation method according to claim 1, wherein the step of performing picture recognition on the received bill to be verified to obtain the bill identification information, the bill face data and the bill type comprises:
selecting a target picture identification interface from a preset picture identification interface library;
carrying out image recognition on the received bill to be verified through the target image recognition interface to obtain an image recognition result;
and determining bill identification information, bill face data and bill types according to the picture recognition result.
8. A document validator comprising the following modules:
the bill identification module is used for carrying out picture identification on the received bill to be verified to obtain bill identification information, bill face data and bill type;
the data searching module is used for searching corresponding bill bottom database data in a local bill information base according to the bill identification information when the bill type is the target bill type;
the bill verification module is used for verifying the authenticity of the bill to be verified according to the bill bottom database data and the bill face data;
the bill identification module is further used for acquiring a data synchronization rule corresponding to a preset data synchronization condition when the current time meets the preset data synchronization condition; generating a data synchronization request according to a request construction mode recorded in the data synchronization rule, and setting parameters in the data synchronization request according to a data synchronization time range in the data synchronization rule; sending the data synchronization request to a bill bottom library interface to enable the bill bottom library interface to feed back data synchronization response, wherein the bill bottom library interface is an interface for inquiring a tax bureau bottom account library; receiving the data synchronous response, and analyzing the data synchronous response to obtain a plurality of pieces of bill bottom database data; updating a local bill information base according to the bill base data;
the bill verification module is also used for determining a verification field and verification data according to the bill base data and determining a field to be verified in the bill surface data according to the verification field; acquiring data to be verified corresponding to the field to be verified; comparing the verification data with the data to be verified; and when the verification data is consistent with the data to be verified, judging that the bill to be verified passes the authenticity verification.
9. A document validation apparatus, comprising: a processor, a memory and a ticket validation program stored on the memory and executable on the processor, the ticket validation program when executed by the processor implementing the steps of the ticket validation method according to any one of claims 1-7.
10. A computer-readable storage medium, having stored thereon a ticket validation program which, when executed, implements the steps of a ticket validation method according to any one of claims 1-7.
CN202111095953.7A 2021-09-17 2021-09-17 Bill verification method, device, equipment and storage medium Active CN113554029B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111095953.7A CN113554029B (en) 2021-09-17 2021-09-17 Bill verification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111095953.7A CN113554029B (en) 2021-09-17 2021-09-17 Bill verification method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113554029A CN113554029A (en) 2021-10-26
CN113554029B true CN113554029B (en) 2022-03-11

Family

ID=78134440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111095953.7A Active CN113554029B (en) 2021-09-17 2021-09-17 Bill verification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113554029B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115457668B (en) * 2022-08-17 2024-04-02 广州零加零科技有限公司 Quick ticket checking method, device and system
CN115169335B (en) * 2022-09-07 2023-01-13 深圳高灯计算机科技有限公司 Invoice data calibration method and device, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112308589A (en) * 2019-08-01 2021-02-02 腾讯科技(深圳)有限公司 Bill processing method, device, equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6993507B2 (en) * 2000-12-14 2006-01-31 Pacific Payment Systems, Inc. Bar coded bill payment system and method
CN109461247A (en) * 2018-10-29 2019-03-12 北京慧流科技有限公司 Note validating method and device, electronic equipment and storage medium
CN111125254A (en) * 2019-12-23 2020-05-08 北京懿医云科技有限公司 Database synchronization method and device, electronic equipment and computer readable medium
CN111340517A (en) * 2020-03-26 2020-06-26 深圳微众信用科技股份有限公司 Method, system and related equipment for rapidly inquiring authenticity of invoice

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112308589A (en) * 2019-08-01 2021-02-02 腾讯科技(深圳)有限公司 Bill processing method, device, equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Research on electric vehicle fast charging station billing and settlement system;Juan Liu;《IEEE》;20171005;第223-226页 *
中行支票通综合业务管理系统的设计与实现;孙迪宇;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20190115;第1-83页 *

Also Published As

Publication number Publication date
CN113554029A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN113554029B (en) Bill verification method, device, equipment and storage medium
CN107908485B (en) Interface parameter transmission method, device, equipment and computer readable storage medium
US9934134B2 (en) Generating a test scenario template from runs of test scenarios belonging to different organizations
CN107704479B (en) File generation method and device
US20080312992A1 (en) Automatic business process creation method using past business process resources and existing business process
CN112488855B (en) Business verification method and device based on rule template
CN108764239B (en) Invoice verification method and device, computer equipment and storage medium
CN110609954A (en) Data acquisition method and device, computer equipment and storage medium
CN114996125A (en) Test case generation method, device, equipment and storage medium
CN109214362B (en) Document processing method and related equipment
CN114756466A (en) Test case obtaining method and device and storage medium
CN112907263B (en) Abnormal order quantity detection method, device, equipment and storage medium
CN114003432A (en) Parameter checking method and device, computer equipment and storage medium
CN112433936A (en) Test method, test device and storage medium
CN112612833A (en) Rule package updating method, device, equipment and storage medium
CN111210185A (en) Automatic checking method and device for seal card
CN113706138B (en) Payment method, device, equipment and storage medium based on digital currency hard wallet
CN115543816A (en) Software regression test result verification method, device, equipment and storage medium
CN110570207A (en) commodity tracing method and device
CN114721959A (en) Test information analysis method and device
CN114255134A (en) Account number disassembling method and device and storage medium
CN110515946B (en) Data extraction method, device, equipment and computer readable storage medium
CN112465612A (en) Receipt information processing method and device, computer equipment and storage medium
EP3979177A1 (en) Verification method, information processing device, and verification program
CN113554009B (en) Bill verification method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant