Bill detection method, device, computer equipment and storage medium
By extracting the inspection elements in the bill graphic code and submitting the response inspection results, the problem that traditional invoice detection methods cannot determine the authenticity of the invoice is solved, and effective detection of the authenticity of the bill is achieved.
Patent Information
- Application Number
- CN201910875209.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-17
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2039-10-07
AI Technical Summary
Traditional invoice detection methods cannot effectively determine the authenticity of invoices, and cannot determine the authenticity of bills.
By obtaining the graphic code of the bill to be detected, extracting the verification elements in the graphic code, adding them to the preset page, and submitting the response verification results to determine the authenticity of the bill.
Effective detection of the authenticity of bills is achieved, the authenticity of bills to be tested can be determined, and the accuracy of the detection is improved.
Smart Images

Figure CN110599271B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a bill detection method, device, computer equipment and storage medium. Background Art
[0002] Invoices are important vouchers for economic activities and an important basis for law enforcement inspections by auditing and tax authorities. When companies or individuals sell goods to consumers or engage in business activities, they need to issue invoices and pay taxes based on the invoices in accordance with the law. However, there are cases where some merchants provide false invoices for economic activities, so invoices need to be verified.
[0003] However, when inspecting invoices, the traditional invoice detection method obtains the face information of the invoice by scanning the QR code of the invoice, but the authenticity of the invoice cannot be determined based on the obtained face information. Summary of the invention
[0004] Based on this, it is necessary to provide a bill detection method, device, computer equipment and storage medium that can verify the authenticity of bills in response to the above technical problems.
[0005] A bill detection method, the method comprising:
[0006] Obtaining the graphic code of the bill to be inspected, and extracting the inspection elements in the graphic code;
[0007] Add the extracted inspection elements to the preset page;
[0008] Obtain the verification element added in the preset page, and submit the added verification element;
[0009] Receiving a verification result in response to the submitted verification element, wherein the verification result is used to characterize the authenticity of the bill to be tested;
[0010] Output the inspection result.
[0011] A bill detection device, comprising:
[0012] An extraction module, used to obtain the graphic code of the bill to be detected and extract the inspection elements in the graphic code;
[0013] Add module to add the extracted inspection elements to the preset page;
[0014] An acquisition module, used for acquiring the verification element added in the preset page, and submitting the added verification element;
[0015] A receiving module, used for receiving a verification result in response to the submitted verification element, wherein the verification result is used to characterize the authenticity of the bill to be tested;
[0016] An output module is used to output the inspection result.
[0017] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0018] Obtaining the graphic code of the bill to be inspected, and extracting the inspection elements in the graphic code;
[0019] Add the extracted inspection elements to the preset page;
[0020] Obtain the verification element added in the preset page, and submit the added verification element;
[0021] Receiving a verification result in response to the submitted verification element, wherein the verification result is used to characterize the authenticity of the bill to be tested;
[0022] Output the inspection result.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0024] Obtaining the graphic code of the bill to be inspected, and extracting the inspection elements in the graphic code;
[0025] Add the extracted inspection elements to the preset page;
[0026] Obtain the verification element added in the preset page, and submit the added verification element;
[0027] Receiving a verification result in response to the submitted verification element, wherein the verification result is used to characterize the authenticity of the bill to be tested;
[0028] Output the inspection result.
[0029] The above-mentioned bill detection method, device, computer equipment and storage medium obtain the graphic code of the bill to be detected, extract the inspection elements in the graphic code, add the extracted inspection elements to the preset page, obtain the inspection elements added in the preset page, submit the added inspection elements, receive the inspection results in response to the submitted inspection elements, and the inspection results are used to characterize the authenticity of the bill to be detected, and output the inspection results; the preset page is a page that can detect the authenticity of the bill, the inspection elements obtained are the inspection elements to be entered on the preset page, and are not the inspection elements of the general page, and automatically switch to the preset page to submit the input inspection elements. The accepted inspection results can not only obtain relevant information of the bill to be detected, but also determine the authenticity of the bill to be detected. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A diagram showing an application environment of a bill detection method in an embodiment;
[0031] Figure 2 Schematic diagram of a bill detection method in one embodiment;
[0032] Figure 3 The steps of switching to the ticket description page of the ticket to be detected and playing the media information corresponding to the detected ticket in a ticket detection method in an embodiment;
[0033] Figure 4 is a flow chart of a bill detection method in another embodiment;
[0034] Figure 5 A schematic diagram of a bill to be detected in one embodiment;
[0035] Figure 6 A schematic diagram of the inspection result of a bill to be inspected in one embodiment;
[0036] Figure 7 A schematic diagram of a bill description page of a bill to be detected in one embodiment;
[0037] Figure 8 is a structural block diagram of a bill detection device in one embodiment;
[0038] Fig. 9 is a structural block diagram of a bill detection device in another embodiment;
[0039] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] The bill detection method provided in this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The terminal 102 obtains the graphic code of the bill to be detected through the network, extracts the inspection elements in the graphic code; obtains the inspection elements entered in the preset page, and submits the input inspection elements; receives the inspection result in response to the inspection element, and the inspection result can be used to characterize the authenticity of the bill to be detected; outputs the inspection result. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0042] In one embodiment, Figure 2 As shown, a bill detection method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0043] Step 202, obtaining the graphic code of the bill to be inspected, and extracting the inspection elements in the graphic code.
[0044] Among them, the bill is a certificate of relevant information such as the transfer of resources or assets that occurs during the exchange of goods or transactions. The type of bill to be tested can be an electronic bill or a paper bill, and the type of bill to be tested is not limited here. The face of the bill to be tested includes data such as a graphic code, detailed information of the two parties to the resource or asset transfer, the number of resources or assets transferred, the transfer time, the bill code, the bill number, and the bill password.
[0045] A graphic code is a graphic that can be used to record data and is generated according to specific rules. The graphic code can be a QR code or a barcode, which is not limited here. For example, when the graphic code is a QR code, the QR code is generated according to preset QR code rules. The QR code rules may include the domain name of the web page for checking the bill to be tested and the hash value of the bill to be tested, where the domain name is the name of a computer or computer group on the Internet composed of a string of characters or letters separated by dots, such as www.wikipedia.org; the hash value is a hash function that shuffles and mixes the data to recreate a fingerprint called a hash value (hash values, hash codes, hash sums, hashes). The hash value is usually represented by a short string of random letters and numbers. Commonly used hash algorithms include MD5 and SHA-1.
[0046] Verification factors are data that can be used to verify the authenticity of bills. Verification factors include the bill code and bill number of the bill to be tested. Verification factors can also include bill type, seller name, buyer name, invoice date, total price and tax, check code, and bill status.
[0047] Specifically, after obtaining the bill to be inspected, the built-in scanner of terminal 102 is triggered to scan the graphic code of the bill to be inspected after receiving the scanning instruction. After the scanner identifies the graphic code of the bill to be inspected, the parser parses the graphic code to obtain the parsing result, and the inspection elements of the graphic code are extracted from the parsing result. Alternatively, the terminal 102 may be triggered to scan the graphic code of the bill to be inspected after receiving the scanning instruction. After the graphic code scanning device identifies the graphic code of the bill to be inspected, the graphic code is parsed by the graphic code parsing model to obtain the parsing result of the graphic code, and the inspection elements of the graphic code are extracted from the parsing result.
[0048] Step 204, adding the extracted verification elements to the preset page.
[0049] The preset page is a page pre-designated for checking the bill to be tested.
[0050] Step 206, obtain the verification elements added in the preset page, and submit the added verification elements.
[0051] Specifically, according to the input requirements of the preset page, the inspection elements that meet the conditions are obtained from the extracted inspection elements. After obtaining the inspection elements that meet the conditions, the submission of the input inspection elements is triggered, and the input inspection elements are processed.
[0052] Step 208, receiving the verification result in response to the submitted verification factor, and the verification result is used to characterize the authenticity of the bill to be tested.
[0053] Step 210, output the inspection result.
[0054] Specifically, the output inspection result can be a result that directly represents the authenticity of the bill to be tested, for example, the inspection result obtained is "the bill to be tested is true" or "the bill to be tested is false". The output inspection result can also be used to compare with the bill information on the bill to be tested to determine the authenticity of the bill to be tested; the authenticity of the bill can be detected by manually checking the inspection result and the bill information on the face of the bill to be tested, or by pre-training a model based on a sample bill to be tested to obtain a trained bill detection model, inputting the inspection result of the inspection element response into the trained bill detection model, and performing detection through the bill model and the bill information on the face of the bill to be tested, and outputting the detection result. The bill inspection method is not limited here.
[0055] The verification result includes the bill code, bill number, and bill password area. The hash values in the bill code, bill number, and bill password area are input into the bill detection model. When the bill detection model detects that the verification result is exactly the same as the bill information on the bill to be detected, the bill detection model outputs a prompt "The bill to be detected is true"; when the bill detection model detects that any one of the hash values in the bill code, bill number, and bill password area is different from the bill information on the bill to be detected, the bill detection model outputs a prompt "The bill to be detected is false".
[0056] Optionally, the inspection result may also include the bill type, the name of the seller, the name of the buyer, the invoice date, the total price and tax, the check code, the bill status, etc. All the inspection results are input into the bill detection model. When the bill detection model detects that the bill code, bill number, bill password area, bill type, name of the seller, name of the buyer, the invoice date, the total price and tax, the check code, and the bill status are exactly the same as the bill information on the bill to be detected, the bill detection model outputs a prompt "the bill to be detected is true". When the bill detection model detects that any one of the bill code, bill number, bill password area, bill type, name of the seller, name of the buyer, the invoice date, the total price and tax, the check code, and the bill status is different from the bill information on the bill to be detected, the bill detection model outputs a prompt "the bill to be detected is false". Among them, the check code is generated by the random function Rand(), and the check code can be a random combination of at least 5 digits plus letters. The check code of the inspection result output by each bill to be detected is different; the bill password area corresponds to the bill hash value of the bill to be detected.
[0057] In the above-mentioned bill detection method, by obtaining the graphic code of the bill to be detected, extracting the inspection elements in the graphic code, adding the extracted inspection elements to the preset page, obtaining the inspection elements added in the preset page, submitting the added inspection elements, receiving the inspection results in response to the submitted inspection elements, the inspection results are used to characterize the authenticity of the bill to be detected, and outputting the inspection results; the preset page is a page that can detect the authenticity of the bill, the inspection elements obtained are the inspection elements to be entered on the preset page, and are not the inspection elements of the general page, and the preset page is automatically switched to submit the input inspection elements. The accepted inspection results can not only obtain relevant information of the bill to be detected, but also determine the authenticity of the bill to be detected.
[0058] In one embodiment, the bill hash value is generated when it is sent to the receiving address corresponding to the bill to be detected, and the bill hash value is obtained by processing the bill information corresponding to the bill to be detected through a hash algorithm.
[0059] The bill information includes the bill type, bill code, bill number, seller name, buyer name, invoice date, price and tax total, verification code, invoice status, etc. of the bill to be tested.
[0060] The hash algorithm is a function constructed based on the hash function. The hash algorithm can transform input of any length into an output of fixed length through the hash algorithm to obtain a hash value. The hash algorithm includes the Secure Hash Algorithm (SHA256) and the encryption algorithm RIPEMD160.
[0061] The receiving address is usually a string of numbers selected randomly. The string of numbers is encrypted with SHA256 as the private key, and then a public key is generated through the Elliptic Curves Cryptography (ECC). The public key is processed by the SHA256 algorithm and the RIPEMD160 algorithm to obtain the corresponding public key hash. The public key hash and the address version number and checksum corresponding to the public key hash are generated through BASE58 encoding. Among them, the process of obtaining the public key from the private key through the ECC algorithm is irreversible.
[0062] Specifically, when the bill to be tested is sent to the corresponding receiving address, the bill information corresponding to the bill to be tested is processed by the hash algorithm to obtain the bill hash value. The bill hash value is generated based on the determined bill information and cannot be changed. The bill to be tested can correspond to at least one hash value, and a new hash value will be generated every time the bill to be tested circulates. For example, when the bill asset to be tested is generated, the asset generation time, the corresponding participants and other data are processed by the hash algorithm to obtain the hash value corresponding to the asset; when the bill to be tested is sent to the corresponding receiving address, the bill hash value is obtained based on the bill information.
[0063] In one embodiment, obtaining the graphic code of the bill to be inspected and extracting the inspection elements in the graphic code include:
[0064] Obtain the graphic code of the bill to be tested, extract the link of the graphic code, which includes the bill hash value; according to the bill hash value, obtain the inspection element corresponding to the bill hash value from the corresponding database.
[0065] A link refers to a connection relationship from an object to a target object. The object can be a word, a picture, or information, etc.
[0066] Specifically, when the bill to be tested is generated, the inspection elements related to the bill to be tested are stored in the database, and the inspection elements are associated with the bill hash value through mapping, that is, when the bill hash value in the graphic code link is extracted, the inspection element corresponding to the bill hash value is found from the database through the mapping relationship. The inspection elements are stored in the database and will not be changed or lost, ensuring the accuracy and integrity of the data. The link may also include the bill assets and bill numbers of the bill to be tested. The bill assets and bill numbers of the bill to be tested can be directly obtained by extracting the link of the graphic code, and the inspection elements corresponding to the bill assets and bill numbers can be obtained from the database according to the bill assets and bill numbers, which increases the way to obtain the inspection elements and improves the accuracy of the inspection elements.
[0067] In one embodiment, the bill to be detected is a blockchain bill.
[0068] Among them, blockchain is a chain data structure that combines data blocks in a sequential manner in chronological order. Blockchain technology is a new distributed infrastructure that uses block chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses smart contracts composed of automated script codes to program and operate data. The life cycle of bills can be recorded on the blockchain, that is, each flow of bills is recorded in chronological order through timestamps, and bills can be queried through query instructions.
[0069] Blockchain bills are proof of consumption or payment that is completely generated by algorithms. Blockchain bills allow users to apply for, generate, check, and enter bills on the blockchain, saving the bill generation and reimbursement process; users can also store, circulate, and reimburse bills on the blockchain. When users operate bills on the blockchain, a corresponding operation identifier will be generated and stored in the database corresponding to the blockchain. For example, when a reimbursement instruction corresponding to a blockchain bill is received, a reimbursement identifier corresponding to the reimbursement instruction will be generated. When the reimbursement instruction of the blockchain is received again, the corresponding reimbursement identifier is detected, and a "reimbursed" prompt is output to avoid multiple reimbursement of blockchain bills; the integrity of blockchain bill information and data cannot be changed, ensuring the authenticity of the bill.
[0070] Specifically, blockchain bills are obtained through blockchain technology, a scanning instruction is received on the display page of the blockchain bill, the terminal scanner is triggered to scan the QR code of the blockchain bill, the link in the QR code is extracted, the inspection element corresponding to the bill hash value is obtained from the corresponding database according to the bill hash value in the link, the inspection domain name in the QR code link is obtained, the preset page corresponding to the inspection domain name is switched to, the extracted inspection element is added to the preset page, the inspection element added in the preset page is obtained, and the added inspection element is submitted, and the inspection result in response to the submitted inspection element is received, and the inspection result is used to characterize the authenticity of the bill to be tested, and the inspection result is output. On the blockchain, any participant of the blockchain bill can query the specific data of each flow of the blockchain bill in the database corresponding to the blockchain, which can realize the historical tracing of the blockchain bill, and can also realize the application, generation, inspection, accounting, storage, circulation and reimbursement of the blockchain bill.
[0071] In one embodiment, Figure 3 As shown, the method further includes: switching to the ticket description page of the ticket to be tested, and playing the media information corresponding to the tested ticket, which specifically includes the following steps:
[0072] Step 302: Display the inspection result on the display interface corresponding to the preset page, and the inspection result includes the link address of the bill description of the bill to be inspected.
[0073] The link address includes web addresses of various network resources of different formats, different attributes, and different locations, and jump addresses of local resources. The different formats include electronic documents, pictures, multimedia audio, etc., and the different locations include local resources, network resources, etc. The bill description link address is the web address of the bill description. For example, the link address can be the web address of a web page on the Internet, the web address of a network service, and the network service can be a weather service, message push, etc.; it can also be the jump address of a local file or a local picture.
[0074] Step 304: Obtain a first trigger instruction of a bill description link address from the display interface, and switch to a bill description page of the bill to be detected corresponding to the first trigger instruction.
[0075] Among them, the trigger instruction is used to execute the program processing condition instruction, and the first trigger instruction is used to trigger the switch to the bill description page of the bill to be detected. The first trigger instruction can be triggered by a timer. When the preset time is reached, the display interface is switched to the bill description page of the bill to be detected corresponding to the first trigger instruction, or the bill description page of the bill to be detected corresponding to the first trigger instruction is popped up on the display interface; the first trigger instruction can also be generated by a voice recognition module. For example, when the inspection result is displayed on the display interface, a voice trigger instruction of the bill description link address is received, and the voice trigger instruction is converted into a first trigger instruction through the voice recognition module. After responding to the first trigger instruction, the description page of the bill to be detected corresponding to the first trigger instruction is switched to the description page of the bill to be detected corresponding to the first trigger instruction, or the bill description page of the bill to be detected corresponding to the first trigger instruction is popped up on the display interface. Here, the triggering method of the first trigger instruction is not limited. Specifically, after obtaining the first trigger instruction of the bill description link address from the display interface, the first trigger instruction is responded to, and the bill description page of the bill to be detected corresponding to the first trigger instruction is switched or popped up. The description page includes a description of the bill to be tested, the characteristics of the bill to be tested, and a description of how to generate the bill to be tested; when the bill to be tested is a blockchain bill, the bill description page includes a description of the blockchain bill, a description of the advantages of the blockchain bill over traditional bills, and instructions on how to generate a blockchain bill.
[0076] Step 306: Display the media link of the bill to be detected on the bill description page, obtain the second trigger instruction of the media link from the bill description page, switch to the media page corresponding to the second trigger instruction, and play the media information corresponding to the bill to be detected.
[0077] Among them, the media link is the web page address of the network resource and the switching address of the local resource played in the form of media, wherein the media form includes video, audio and other forms; the second trigger instruction is used to trigger the switch from the ticket description page to the media page or pop up the media page on the ticket description page; the media information is the description of the ticket to be tested and the description of the method of generating the ticket to be tested played in the form of media.
[0078] Specifically, after obtaining the second trigger instruction of the media link, switch to the media page corresponding to the second trigger instruction, obtain the click operation of the play button and the selection operation of the media playback form from the media page, and trigger the playback of the media information corresponding to the bill to be detected. The media link of the bill to be detected may include a bill description media link and a bill generation method media link. After obtaining the second trigger instruction of the bill description media link, switch to the media page of the bill description corresponding to the second trigger instruction, wherein the media page of the bill description page can be suspended on the bill description page in the form of a floating window, obtain the click operation of the play button and the selection operation of the media playback form from the bill description page, and play the media information of the bill description in the selected media form; after obtaining the second trigger instruction of the bill generation method media link, switch to the media page of the bill generation method corresponding to the second trigger instruction, wherein the media page of the bill generation method can be suspended on the bill description page in the form of a floating window, obtain the click operation of the play button and the selection operation of the media playback form from the bill generation method page, and play the media information of the bill generation method in the selected media form.
[0079] In the above-mentioned bill detection method, in the steps of switching the ticket description page of the bill to be detected and playing the media information corresponding to the detected bill, the inspection result is displayed on the display interface corresponding to the preset page, and the inspection result includes the bill description link address of the bill to be detected; a first trigger instruction of the bill description link address is obtained from the display interface, and the bill description page of the bill to be detected corresponding to the first trigger instruction is switched to, or the bill description page of the bill to be detected corresponding to the first trigger instruction can be popped up; the media link of the bill to be detected is displayed on the bill description page, and a second trigger instruction of the media link is obtained from the bill description page, and the media page corresponding to the second trigger instruction is switched to or the media page corresponding to the second trigger instruction is popped up, and the media information corresponding to the bill to be detected is played, which can help users master the use of the bill to be detected, improve the authenticity of the bill, save the time of generating bills, and simplify the process of generating bills.
[0080] In another embodiment, Figure 4 As shown, a bill detection method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0081] Step 402, obtain the graphic code of the bill to be tested, extract the link of the graphic code, the link includes the bill hash value, and obtain the inspection element corresponding to the bill hash value from the corresponding database according to the bill hash value.
[0082] Step 404, obtain the domain name in the link of the graphic code, and switch to the preset page corresponding to the domain name.
[0083] Specifically, the verification domain name is the web address corresponding to the verification page. After obtaining the verification domain name in the link of the graphic code, it is triggered to switch to the preset page corresponding to the verification domain name, or it can be a pop-up window that pops up the preset page corresponding to the verification domain name. The verification domain name can be a secondary verification domain name corresponding to the preset page. For example, the obtained verification domain name is the web address baidu.com of the Baidu engine. By switching to the query page of the Baidu engine after triggering, the query information can be entered in the input box of the Baidu engine to obtain the query result corresponding to the query information.
[0084] Step 406, adding the extracted verification elements to the preset page.
[0085] Step 408, obtain the verification elements added in the preset page, and submit the added verification elements.
[0086] Step 410, receiving the verification result in response to the submitted verification element, the verification result is used to characterize the authenticity of the bill to be tested.
[0087] Step 412, output the inspection result.
[0088] Step 414, display the inspection result on the display interface corresponding to the preset page, the inspection result including the bill description link address of the bill to be detected; obtain the first trigger instruction of the bill description link address from the display interface, and switch to the bill description page of the bill to be detected corresponding to the first trigger instruction.
[0089] In the above-mentioned bill detection method, the graphic code of the bill to be detected is obtained, and the link of the graphic code is extracted, the link includes the bill hash value, and according to the bill hash value, the inspection element corresponding to the bill hash value is obtained from the corresponding database, and the domain name is inspected in the link of the graphic code, and the preset page corresponding to the inspection domain name is switched to or the preset page corresponding to the inspection domain name is popped up in the form of a pop-up window, and the extracted inspection element is added to the preset page, and the inspection element added in the preset page is obtained, and the added inspection element is submitted, and the inspection result in response to the submitted inspection element is received. The inspection result is used to characterize the authenticity of the bill to be detected, and the inspection result is output. The inspection result is displayed on the display interface corresponding to the preset page, and the inspection result includes the bill description link address of the bill to be detected; the bill is obtained from the display interface The first trigger instruction of the description link address switches to the bill description page of the bill to be tested corresponding to the first trigger instruction, or the bill description page of the bill to be tested corresponding to the first trigger instruction can be popped up in the form of a pop-up window; the preset page is a page that can detect the authenticity of the bill, and the inspection factors obtained are the inspection factors to be entered on the preset page, not the inspection factors of the general page. It automatically switches to the preset page to submit the input inspection factors, and the accepted inspection results can not only obtain relevant information of the bill to be tested, but also determine the authenticity of the bill to be tested. Switch to the bill description page of the bill to be tested, and you can obtain the description of the bill to be tested, the characteristics of the bill to be tested and the bill generation method from the description page, which simplifies the process of generating bills and reduces the generation time of bills.
[0090] In one embodiment, the ticket to be tested is a blockchain ticket.
[0091] Specifically, a blockchain bill is obtained through blockchain technology, a scanning instruction is received on a display page of the blockchain bill, a scanner of a terminal is triggered to scan a QR code of the blockchain bill, a link in the QR code is extracted, and a verification factor corresponding to the bill hash value is obtained from a corresponding database according to the bill hash value in the link, a verification domain name in the QR code link is obtained, a preset page corresponding to the verification domain name is switched to or a preset page corresponding to the verification domain name is popped up in a pop-up window, the extracted verification factor is added to the preset page, the verification factor added to the preset page is obtained, and the added verification factor is submitted, and a verification result in response to the submitted verification factor is received, the verification result is used to characterize the authenticity of the bill to be detected, and the verification result is output; the verification result is displayed on a display interface corresponding to the preset page, and the verification result is output. The result includes the link address of the blockchain bill description to be received; a first trigger instruction for obtaining the bill description link address from the display interface, switching to the bill description page of the blockchain bill corresponding to the first trigger instruction or popping up the bill description page of the blockchain bill corresponding to the first trigger instruction in the form of a pop-up window, displaying the media link of the blockchain bill on the bill description page, obtaining a second trigger instruction for the media link from the bill description page, switching to the media page corresponding to the second trigger instruction or popping up the media page corresponding to the second trigger instruction in the form of a pop-up window, playing the media information corresponding to the blockchain bill, wherein the media link includes the blockchain bill description media link and the blockchain bill generation method media link; users can directly operate on the blockchain to obtain blockchain bills, optimize the bill generation process and save bill generation time.
[0092] In one embodiment, a bill to be detected is provided, such as Figure 5 As shown, the bill information of the bill to be tested includes the bill's QR code, bill code, bill number, billing date, verification code, password area, buyer and seller, etc., where both the buyer and seller include name, taxpayer identification code, address and telephone number, and user bank account number. Figure 5 The QR code of the bill to be tested is shown, and the link in the QR code is extracted. The link includes the bill hash value of the bill to be tested, and the inspection element corresponding to the bill hash is obtained from the data according to the bill hash value; switch to the preset page corresponding to the inspection domain name in the link in the QR code or pop up the preset page corresponding to the inspection domain name in the QR code link in the form of a pop-up window, enter the inspection element on the preset page, receive the inspection result of the inspection element response, and output the inspection result. Figure 6As shown, the verification result 600 includes: a preset page 602, bill information 604 and a bill description link address 606, wherein the bill information 604 includes data such as invoice type, invoice code, invoice number, seller name, buyer name, invoice date, price and tax total, verification code, invoice status, hash value, etc.; when the bill to be detected is a blockchain bill, the bill description link address 606 can be a description link address of the blockchain electronic invoice link; by clicking the bill description link address 606 on the display page, a first trigger instruction is obtained to switch to the bill description page or pop up the bill description page, such as Figure 7 As shown, the bill description page 700 includes a bill description 702 , a bill video introduction link 704 , bill features 706 , a bill generation method 708 , and a bill generation method video introduction link 710 .
[0093] When receiving the trigger instruction corresponding to the bill video introduction link 704, switch to the media page corresponding to the bill video playback link or pop up the media page corresponding to the bill video playback link in the form of a pop-up window, obtain the play click instruction, and play the media information of the bill description in the form of video or audio; when receiving the bill generation method video introduction link 710, switch to the media page corresponding to the bill video playback link or pop up the media page corresponding to the bill video playback link in the form of a pop-up window, obtain the play click instruction, and play the media information generated by the bill in the form of video or audio.
[0094] It should be understood that although Figure 2-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0095] In one embodiment, Figure 8 As shown, a bill detection device 800 is provided, comprising: an extraction module 802, an addition module 804, a submission module 806, a receiving module 808 and an output module 810, wherein:
[0096] Extraction module 802, used to obtain the graphic code of the bill to be detected and extract the inspection elements in the graphic code;
[0097] An adding module 804, used to add the extracted inspection elements to a preset page;
[0098] The submission module 806 is used to obtain the verification elements added in the preset page and submit the added verification elements;
[0099] A receiving module 808 is used to receive a verification result in response to the submitted verification element, and the verification result is used to characterize the authenticity of the bill to be tested;
[0100] The output module 810 is used to output the inspection results.
[0101] In the above-mentioned bill detection device, by obtaining the graphic code of the bill to be detected, extracting the inspection elements in the graphic code, obtaining the inspection domain name in the link of the graphic code, switching to the preset page corresponding to the inspection domain name, obtaining the inspection elements entered in the preset page, and submitting the input inspection elements, receiving the inspection results in response to the inspection elements, the inspection results are used to characterize the authenticity of the bill to be detected, and outputting the inspection results; the preset page is a page that can detect the authenticity of the bill, the inspection elements obtained are the inspection elements to be entered in the preset page, and are not the inspection elements of the general page, and automatically switching to the preset page to submit the input inspection elements, the accepted inspection results can not only obtain the relevant information of the bill to be detected, but also determine the authenticity of the bill to be detected.
[0102] In another embodiment, Fig. 9 As shown, a bill detection device 800 is provided, including: an acquisition module 812, a generation module 814, a switching module 816 and a playing module 818, wherein:
[0103] The acquisition module 812 is used to acquire the graphic code of the bill to be detected, extract the link of the graphic code, which includes the bill hash value, and acquire the inspection element corresponding to the bill hash value from the corresponding database according to the bill hash value.
[0104] The generating module 814 is used to generate a bill hash value when sending to the receiving address corresponding to the bill to be detected. The bill hash value is obtained by processing the bill information corresponding to the bill to be detected through a hash algorithm.
[0105] Specifically, when the bill to be detected is sent to the corresponding receiving address, the bill information corresponding to the bill to be detected is processed by a hash algorithm to obtain a bill hash value, wherein the bill information corresponding to the bill to be detected may include bill type, bill code, bill number, seller name, buyer name, invoice date, price and tax total, check code, and invoice status. The hash algorithm processing process is irreversible, and the bill hash value cannot be changed after it is generated, thereby improving the accuracy of the bill hash value.
[0106] The switching module 816 is used to obtain the domain name in the link of the graphic code and switch to the preset page corresponding to the domain name.
[0107] In one embodiment, the switching module 816 is also used to display the inspection result on the display interface corresponding to the preset page, which inspection result includes the bill description link address of the bill to be tested; obtain the first trigger instruction of the bill description link address from the display interface, and switch to the bill description page of the bill to be tested corresponding to the first trigger instruction.
[0108] The playing module 818 is used to obtain the second trigger instruction of the media link from the bill description page, switch to the media page corresponding to the second trigger instruction, and play the media information corresponding to the bill to be detected.
[0109] For the specific definition of the bill detection device, please refer to the definition of the bill detection method above, which will not be repeated here. Each module in the above-mentioned bill detection device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0110] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a bill detection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0111] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0112] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0113] Obtain the graphic code of the bill to be inspected and extract the inspection elements in the graphic code;
[0114] Add the extracted inspection elements to the preset page;
[0115] Obtain the verification element added in the preset page and submit the added verification element;
[0116] Receiving the verification result in response to the submitted verification element, the verification result is used to characterize the authenticity of the bill to be tested;
[0117] Output the inspection results.
[0118] In one embodiment, when the processor executes the computer program, it also implements the following:
[0119] The bill to be tested is a blockchain bill.
[0120] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0121] Obtain the graphic code of the bill to be tested and extract the inspection elements in the graphic code, including:
[0122] Obtain the graphic code of the bill to be detected, and extract the link of the graphic code, which includes the bill hash value;
[0123] According to the bill hash value, the verification factor corresponding to the bill hash value is obtained from the corresponding database.
[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0125] The bill hash value is generated when it is sent to the receiving address corresponding to the bill to be detected. The bill hash value is obtained by processing the bill information corresponding to the bill to be detected through a hash algorithm.
[0126] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0127] Before adding the extracted inspection elements to the preset page, the method further includes:
[0128] Check the domain name in the link to obtain the graphic code;
[0129] Switch to the preset page corresponding to the domain name.
[0130] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0131] Displaying the inspection result on the display interface corresponding to the preset page, the inspection result includes the link address of the bill description of the bill to be inspected;
[0132] A first trigger instruction of the bill description link address is obtained from the display interface, and the page of the bill description of the bill to be detected corresponding to the first trigger instruction is switched.
[0133] In one embodiment, the media link of the to-be-detected bill is displayed on the bill description page. After switching to the description page corresponding to the first trigger instruction, the processor further implements the following steps when executing the computer program:
[0134] A second trigger instruction of the media link is obtained from the bill description page, and the media page corresponding to the second trigger instruction is switched to play the media information corresponding to the bill to be detected.
[0135] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0136] Obtaining the graphic code of the bill to be inspected, and extracting the inspection elements in the graphic code;
[0137] Add the extracted inspection elements to the preset page;
[0138] Obtain the verification element added in the preset page, and submit the added verification element;
[0139] Receiving a verification result in response to the submitted verification element, wherein the verification result is used to characterize the authenticity of the bill to be tested;
[0140] Output the inspection result.
[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0142] In one embodiment, when the processor executes the computer program, it also implements the following:
[0143] The bill to be tested is a blockchain bill.
[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0145] Obtain the graphic code of the bill to be tested and extract the inspection elements in the graphic code, including:
[0146] Obtain the graphic code of the bill to be detected, and extract the link of the graphic code, which includes the bill hash value;
[0147] According to the bill hash value, the verification factor corresponding to the bill hash value is obtained from the corresponding database.
[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0149] The bill hash value is generated when it is sent to the receiving address corresponding to the bill to be detected. The bill hash value is obtained by processing the bill information corresponding to the bill to be detected through a hash algorithm.
[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0151] Before adding the extracted inspection elements to the preset page, the method further includes:
[0152] Check the domain name in the link to obtain the graphic code;
[0153] Switch to the preset page corresponding to the domain name.
[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0155] Displaying the inspection result on the display interface corresponding to the preset page, the inspection result includes the link address of the bill description of the bill to be inspected;
[0156] A first trigger instruction of the bill description link address is obtained from the display interface, and the page of the bill description of the bill to be detected corresponding to the first trigger instruction is switched.
[0157] In one embodiment, the media link of the to-be-detected bill is displayed on the bill description page. After switching to the description page corresponding to the first trigger instruction, the processor further implements the following steps when executing the computer program:
[0158] A second trigger instruction of the media link is obtained from the bill description page, and the media page corresponding to the second trigger instruction is switched to play the media information corresponding to the bill to be detected.
[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0160] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0161] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A bill detection method, the method comprising: When a bill to be detected is generated, the generation time of the bill to be detected and the corresponding participant are processed by a hash algorithm to obtain a bill hash value corresponding to the bill to be detected; And, the inspection elements related to the bill to be detected are associated with the bill hash value through mapping and stored in a database; the bill to be detected includes a graphic code on the face of the bill, and the graphic code is generated according to the bill hash value of the bill to be detected and the inspection domain name of the webpage used to check the bill to be detected; Obtaining a graphic code of the bill to be tested, extracting a link of the graphic code, wherein the link includes a bill hash value of the bill to be tested and a verification domain name of a web page for verifying the bill to be tested, wherein the verification domain name is a web page address corresponding to a verification page; According to the bill hash value, the verification factor corresponding to the bill hash value is obtained from the database, and according to the verification domain name, a preset page corresponding to the verification domain name is switched to, where the preset page is a page capable of detecting the authenticity of the bill; Adding the obtained verification elements to the preset page; Obtain the verification element added in the preset page, and submit the added verification element; Receiving a verification result in response to the submitted verification element, wherein the verification result is used to compare with the bill information on the bill to be tested to determine the authenticity of the bill to be tested; The determining the authenticity of the bill to be detected comprises: inputting the inspection result into a trained bill detection model, performing detection according to the inspection result and the bill information on the bill face of the bill to be detected by the bill detection model, and outputting the detection result; Displaying the inspection result on the display interface corresponding to the preset page, wherein the inspection result includes the bill description link address of the bill to be inspected; Obtaining a first trigger instruction of the bill description link address from the display interface, switching to a bill description page of the bill to be detected corresponding to the first trigger instruction, and displaying a media link of the bill to be detected on the bill description page; A second trigger instruction of the media link is obtained from the bill description page, and the media page corresponding to the second trigger instruction is switched to trigger the media page to play the media information corresponding to the bill to be detected in the form of video or audio.
2. The method according to claim 1, characterized in that: The bill hash value is generated when it is sent to the receiving address corresponding to the bill to be detected.
3. The method according to claim 2, characterized in that: The bill information of the bill to be detected includes the bill's QR code, bill code, bill number, bill issue date, verification code, password area, buyer and seller.
4. The method according to claim 1, characterized in that The bill to be detected is a blockchain bill.
5. The method according to claim 1, characterized in that The link of the graphic code includes the bill asset and bill number of the bill to be detected; the method further includes: According to the bill asset and the bill number, the verification elements corresponding to the bill asset and the bill number are obtained from the database.
6. A bill detection device, characterized in that: The device comprises: A bill data mapping module is used for, when a bill to be detected is generated, processing the generation time of the bill to be detected and the corresponding participant through a hash algorithm to obtain a bill hash value corresponding to the bill to be detected; and associating the inspection elements related to the bill to be detected with the bill hash value through mapping and storing them in a database; the face of the bill to be detected includes a graphic code, and the graphic code is generated according to the bill hash value of the bill to be detected and the inspection domain name of the web page used to inspect the bill to be detected; an extraction module is used to obtain the graphic code of the bill to be detected, and extract a link of the graphic code, wherein the link includes the bill hash value of the bill to be detected and the inspection domain name of the web page used to inspect the bill to be detected, and the inspection domain name is the web page address corresponding to the inspection page; An adding module is used to obtain the verification factor corresponding to the bill hash value from the database according to the bill hash value, switch to a preset page corresponding to the verification domain name according to the verification domain name, and the preset page is a page that can detect the authenticity of the bill; and add the obtained verification factor to the preset page; An acquisition module, used for acquiring the verification element added in the preset page, and submitting the added verification element; A receiving module, used to receive the inspection result in response to the submitted inspection element, wherein the inspection result is used to compare with the bill information on the bill to be inspected to determine the authenticity of the bill to be inspected; the receiving module is also used to input the inspection result into a trained bill detection model, and the bill detection model performs detection based on the inspection result and the bill information on the bill face of the bill to be inspected, and outputs the detection result; An output module is used to display the inspection result on the display interface corresponding to the preset page, wherein the inspection result includes the bill description link address of the bill to be inspected; obtain a first trigger instruction of the bill description link address from the display interface, switch to the bill description page of the bill to be inspected corresponding to the first trigger instruction, and display the media link of the bill to be inspected on the bill description page; obtain a second trigger instruction of the media link from the bill description page, switch to the media page corresponding to the second trigger instruction, and trigger the media page to play the media information corresponding to the bill to be inspected in the form of video or audio.
7. The device according to claim 6, characterized in that The bill hash value is generated when it is sent to the receiving address corresponding to the bill to be detected.
8. The device according to claim 6, characterized in that The bill to be detected is a blockchain bill.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Invoice checking method based on block chain technology without disclosing original information
CN108922012A
Bill checking, printing device, system, method, equipment and storage medium
CN110211280A