TWI737168B - Detecting system for electronic invoice certificate and method thereof - Google Patents
Detecting system for electronic invoice certificate and method thereof Download PDFInfo
- Publication number
- TWI737168B TWI737168B TW109104333A TW109104333A TWI737168B TW I737168 B TWI737168 B TW I737168B TW 109104333 A TW109104333 A TW 109104333A TW 109104333 A TW109104333 A TW 109104333A TW I737168 B TWI737168 B TW I737168B
- Authority
- TW
- Taiwan
- Prior art keywords
- invoice
- text
- graphic
- dimensional
- module
- Prior art date
Links
Images
Landscapes
- Character Input (AREA)
Abstract
本發明主要提供一種電子發票證明聯的檢測系統,其藉由一圖形獲取裝置獲取一發票圖形,且經由圖形讀取單元讀取該發票圖形內的一發票內容,再透過檢測單元依據該發票內容或該發票圖形進行尺寸及規格的檢測,以生成複數檢測資訊後,根據各該檢測資訊生成一檢測結果,最後再經由一輸出模組將該檢測結果輸出,藉以提供完整且自動檢測電子發票證明聯的方式,進而改善先前技術必須利用人工檢測或是無法有效地透過自動辨識檢測的問題。 The present invention mainly provides a detection system for an electronic invoice proof sheet, which obtains an invoice graphic by a graphic acquisition device, reads an invoice content in the invoice graphic through a graphic reading unit, and then uses the detection unit according to the invoice content Or the size and specifications of the invoice graphics are tested to generate plural test information, a test result is generated based on each test information, and finally the test result is output through an output module to provide a complete and automatic inspection electronic invoice certificate The method of linking further improves the problem that the prior art must use manual detection or cannot be effectively detected through automatic identification.
Description
本發明係提供一種電子發票證明聯的檢測系統及其方法,尤指一種用於檢測電子發票的發票內容及尺寸是否符合制式規格的電子發票證明聯的檢測系統。 The present invention provides a detection system and method for the electronic invoice certification sheet, and particularly refers to a detection system for the electronic invoice certification sheet for detecting whether the content and size of the electronic invoice conform to the standard specifications.
為了響應紙張減量使用,以符合節能減碳之環保訴求,政府機關自西元2010年起全面推行電子發票,並逐步淘汰紙本發票的開立,使之能逐步朝向發票無紙化目標邁進。 In response to the reduced use of paper and to meet the environmental requirements of energy saving and carbon reduction, government agencies have fully implemented electronic invoices since 2010, and have gradually phased out the issuance of paper invoices, so that they can gradually move towards the goal of paperless invoices.
近年來,為了落實電子消費機制的完善性,以避免業者發生漏開或誤開發票,或是發票被再利用的情況,再新的電子發票證明聯上係新增有一維條碼及二維條碼的設置,以便於後續檢測稽核之用。 In recent years, in order to implement the completeness of the electronic consumption mechanism, to avoid missing or misinvoicing, or reuse of invoices by the industry, one-dimensional barcodes and two-dimensional barcodes have been added to the new electronic invoice certification link. To facilitate subsequent testing and auditing.
然而,現今在檢測電子發票證明聯的內容時,通常僅是利用後台取得電子發票的資訊,再利用手機上的應用程式掃描一維條碼或二維條碼,以進行相關的檢測動作,其並無法提供自動檢測之功效,且亦無法對二維條碼的版本、容錯標準,或是電子發票的尺寸及文字內容作檢測。因此,如何提供完整且可自動檢測電子發票證明聯的系統,即是現今必須解決的問題。 However, nowadays, when checking the content of the electronic invoice certificate, it usually only uses the background to obtain the information of the electronic invoice, and then uses the application on the mobile phone to scan the one-dimensional barcode or the two-dimensional barcode to perform related detection actions. Provides the function of automatic detection, and cannot detect the version of the two-dimensional barcode, the error tolerance standard, or the size and text content of the electronic invoice. Therefore, how to provide a complete system that can automatically detect the electronic invoice certificate is a problem that must be solved today.
為解決前揭之問題,本發明之目的在於提供一種電子發票證 明聯的檢測系統,其係利用圖形讀取單元讀取發票圖形內的發票內容,再利用檢測單元針對發票內容或發票圖形作檢測,進以解決先前技術之問題。 In order to solve the aforementioned problems, the purpose of the present invention is to provide an electronic invoice certificate Minglian’s detection system uses a graphics reading unit to read the invoice content in the invoice graphics, and then uses the detection unit to detect the invoice content or invoice graphics to solve the problems of the prior art.
為達上述之目的者,本發明係提供一種電子發票證明聯的檢測系統,其包括:一圖形獲取裝置,其被設置以從一電子發票獲取一發票圖形;一圖形讀取單元,其與該圖形獲取裝置相連結,該圖形讀取單元係讀取該發票圖形,且依據該發票圖形生成一發票內容;一檢測單元,其與該圖形讀取裝置相連結,該檢測單元依據所設定的一發票規格檢測該發票內容或該發票圖形,且依據檢測該發票內容或該發票圖形後所生成的複數檢測資訊生成一檢測結果;一輸出模組,其與該檢測模組相連結,該輸出模組將該檢測結果輸出至外。 To achieve the above-mentioned purpose, the present invention provides an electronic invoice verification page detection system, which includes: a graphic acquisition device configured to obtain an invoice graphic from an electronic invoice; a graphic reading unit that is connected to the The graphic acquisition device is connected, the graphic reading unit reads the invoice graphic, and generates an invoice content according to the invoice graphic; a detection unit is connected to the graphic reading device, the detection unit is based on a set one The invoice specification detects the invoice content or the invoice graphic, and generates a detection result based on the plural detection information generated after detecting the invoice content or the invoice graphic; an output module, which is connected with the detection module, and the output module The group outputs the test result to the outside.
較佳地,該圖形讀取單元包括:一一維條碼讀取模組,其被設置以讀取該發票圖形內的一一維條碼,且將該一維條碼解析成一一維字串;一二維條碼讀取模組,其被設置以讀取該發票圖形內的複數二維條碼,且分別將各該二維條碼解析成一二維字串;一文字辨識模組,其被設置以讀取該發票圖形內的一文字圖形,且該文字辨識模組係文字化該文字圖形,以獲取一文字內容,其中,該發票內容包括該一維字串、該二維字串及該文字內容。 Preferably, the graphic reading unit includes: a one-dimensional bar code reading module, which is configured to read the one-dimensional bar code in the invoice graphic and parse the one-dimensional bar code into a one-dimensional string; A two-dimensional barcode reading module, which is set to read a plurality of two-dimensional barcodes in the invoice graph, and to parse each two-dimensional barcode into a two-dimensional character string; a text recognition module, which is set To read a text graphic in the invoice graphic, and the text recognition module textualizes the text graphic to obtain a text content, wherein the invoice content includes the one-dimensional string, the two-dimensional string, and the text content .
較佳地,當該文字辨識模組獲取該文字內容時,該文字辨識模組判斷該文字內容內是否符合該文字辨識模組內所設定的複數規格文字,若該文字內容缺少任一該規格文字時,該文字辨識模組則重新讀取該文字圖形,且以區塊式讀取的方式文字化該文字圖形,當該文字圖形被完整文字化時,該文字辨識模組係依序堆疊文字化後所獲取之各區塊的該文 字內容,且依據各該規格文字與各區塊的該文字內容相比對,以判斷各區塊的該文字內容是否符合各該規格文字;其中若該文字辨識模組判斷各區塊的該文字內容符合各該規格文字時,該文字辨識模組則輸出各區塊所組成的該文字內容;其中,若該文字辨識模組判斷各區塊的該文字內容不符合各該規格文字時,該文字辨識模組則再重新讀取該文字圖形,且以區塊式讀取的方式文字化該文字圖形。 Preferably, when the text recognition module obtains the text content, the text recognition module determines whether the text content meets the plural specification text set in the text recognition module, and if the text content lacks any of the specifications When writing text, the text recognition module re-reads the text graphic and textualizes the text graphic by block reading. When the text graphic is completely textualized, the text recognition module is stacked in order The text of each block obtained after textualization The text content of each block is compared with the text content of each block to determine whether the text content of each block meets the specified text; wherein, if the text recognition module determines the text content of each block When the text content meets the standard text, the text recognition module outputs the text content composed of each block; wherein, if the text recognition module determines that the text content of each block does not meet the standard text, The text recognition module reads the text graphics again, and textizes the text graphics in a block reading manner.
較佳地,該檢測單元包括:一規格解析模組,其與該圖形讀取模組相連結,該規格解析模組依據該發票規格內的一文字規格檢測該文字內容、該發票規格內的一一維規格檢測該一維字串、以及該發票規格內的一二維規格檢測各該二維字串,以生成複數該檢測資訊;一尺寸檢測模組,其與該圖形讀取模組相連結,以獲取該發票圖形,該尺寸檢測模組依據該發票規格內的一尺寸規格檢測該發票圖形,以生成該檢測資訊;一規格設定模組,其與該規格解析模組與該尺寸檢測模組相連結,該規格設定模組被設置以設定該發票規格,以將該發票規格提供予該規格解析模組及該尺寸檢測模組。 Preferably, the detection unit includes: a specification analysis module connected to the graph reading module, and the specification analysis module detects the text content and an item in the invoice specification according to a text specification in the invoice specification. The one-dimensional specification detects the one-dimensional character string and the one-dimensional specification in the invoice specification detects each of the two-dimensional character strings to generate a plurality of the detection information; a size detection module, which is similar to the graphics reading module Link to obtain the invoice graphic, the size detection module detects the invoice graphic according to a size specification in the invoice specification to generate the detection information; a specification setting module, which is associated with the specification analysis module and the size detection The modules are connected, and the specification setting module is set to set the invoice specification so as to provide the invoice specification to the specification analysis module and the size detection module.
較佳地,當該規格解析模組依據該文字規格檢測該文字內容時,該規格解析模組係依據營業人識別標章的圖形或文字、電子發票證明聯的文字、年期別的文字及後續的字軌號碼所屬民國年份及所屬期別、統一發票字軌號碼、交易日期時間的記載方式、隨機碼的文字及後續的數字個數、總計的文字及後續的數字、賣方或賣方編號的文字及後續的數字個數,以檢測該文字內容。 Preferably, when the specification analysis module detects the text content according to the text specification, the specification analysis module is based on the figure or text of the business person’s identification stamp, the text of the electronic invoice certificate, the text of the year and The subsequent character track number belongs to the Republic of China year and period, the unified invoice character track number, the recording method of the transaction date and time, the text of the random code and the number of subsequent numbers, the total text and subsequent numbers, the seller or the seller number The number of text and subsequent digits to detect the text content.
較佳地,當該規格解析模組依據該文字規格檢測該文字內容 時,該規格解析模組進一步依據買方或買方統編的文字及後數的數字個數、或是交易明細之記載事項,以檢測該文字內容。 Preferably, when the specification analysis module detects the text content according to the text specification At the time, the specification analysis module further detects the content of the text based on the text compiled by the buyer or the buyer and the number of subsequent digits, or the record items of the transaction details.
較佳地,當該規格解析模組依據該一維規格檢測該一維字串時,該規格解析模組係依據該一維字串是否符合一條碼類型的記載方式,以及該一維字串的前5碼是否為期別、後4碼是否為隨機碼、中間10碼是否為統一發票字軌號碼,且該期別、該隨機碼及該統一發票字軌號碼是否符合該文字內容的該期別、該隨機碼及該統一發票字軌號碼,以檢測該一維字串;其中該條碼類型係為三九碼(Code 39)。 Preferably, when the specification analysis module detects the one-dimensional character string according to the one-dimensional specification, the specification analysis module is based on whether the one-dimensional character string conforms to the recording method of a code type, and the one-dimensional character string Is the first 5 codes of the period, the last 4 codes a random code, whether the middle 10 codes are the uniform invoice character track number, and whether the period, the random code and the uniform invoice character track number conform to the period of the text content Do not, the random code and the uniform invoice character track number to detect the one-dimensional character string; the barcode type is Code 39 (Code 39).
較佳地,當該規格解析模組依據該二維規格檢測該二維字串時,該規格解析模組係擷取該二維條碼中的複數定位圖案的四周相鄰處中的一版本資訊及一防錯標準資訊,該規格解析模組再依據該二維規格檢測該版本資訊及該防錯標準資訊。 Preferably, when the specification analysis module detects the two-dimensional character string according to the two-dimensional specification, the specification analysis module captures a piece of version information in the neighboring locations of the plural positioning patterns in the two-dimensional barcode And an error-proof standard information, the specification analysis module then detects the version information and the error-proof standard information according to the two-dimensional specification.
較佳地,當該規格解析模組依據該二維規格檢測該二維字串時,該規格解析模組係依據具有一防錯標準資訊的該二維規格檢測其一之該二維字串的第77碼之前包含之銷售額的數字個數、加密驗證資訊、以及與該文字內容相同的統一發票字軌號碼、交易日期時間、隨機碼的數字、總計的數字、賣方編號的數字以及買方統編的數字檢測。 Preferably, when the specification analysis module detects the two-dimensional character string according to the two-dimensional specification, the specification analysis module detects one of the two-dimensional character string according to the two-dimensional specification with an error-proof standard information The number of sales digits before the 77th code, encrypted verification information, and the unified invoice track number that is the same as the text, transaction date and time, random code numbers, total numbers, seller number numbers, and buyers Integrated digital inspection.
較佳地,該加密驗證資訊係由該統一發票字軌號碼與該隨機碼以字串方式組合,且經由一加密程序,並利用一編碼程序轉換以生成該加密驗證資訊。 Preferably, the encrypted verification information is a string combination of the uniform invoice track number and the random code, and is converted by an encryption process to generate the encrypted verification information.
較佳地,該規格解析模組進一步依據該二維規格檢測該二維字串的第78碼之後的交易明細或/及另一該二維字串的交易明細之記載事項 是否符合該文字內容內的交易明細之記載事項。 Preferably, the specification analysis module further detects the transaction details after the 78th code of the two-dimensional string or/and the record items of the transaction details of another two-dimensional string according to the two-dimensional specification Whether it conforms to the transaction details recorded in the text content.
較佳地,當該尺寸檢測模組依據該尺寸規格檢測該發票圖形時,該尺寸檢測模組係擷取該發票圖形的其一之一寬度或一長度,以依據該寬度或該長度量測是否符合該尺寸規格;若符合時,該尺寸檢測模組則再依據該尺寸規格所記載的比例檢測該發票圖形未量測的該寬度或該長度,以及該發票圖形內的該一維條碼、該二維條碼以及該文字圖形的位置、寬度及長度;若不符合時,該尺寸檢測模組則判斷該發票圖形不符合該尺寸規格。 Preferably, when the size detection module detects the invoice graphic according to the size specification, the size detection module captures a width or a length of the invoice graphic to measure according to the width or the length Whether it meets the size specification; if it does, the size detection module will then detect the unmeasured width or length of the invoice graphic according to the ratio recorded in the size specification, as well as the one-dimensional barcode, The position, width and length of the two-dimensional bar code and the text graphic; if not, the size detection module determines that the invoice graphic does not meet the size specification.
較佳地,該檢測結果包括符合該發票規格的至少一合格項目、不符合該發票規格的至少一錯誤項目、或是針對該錯誤項目提供修正建議的至少一建議項目。 Preferably, the detection result includes at least one qualified item that meets the invoice specification, at least one error item that does not meet the invoice specification, or at least one suggestion item that provides correction suggestions for the error item.
較佳地,該發票圖形包括一發票正面圖形、一發票反面圖形、一發票明細聯圖形或其任二者以上之組合。 Preferably, the invoice graphic includes a graphic on the front of the invoice, a graphic on the back of the invoice, a detailed invoice graphic, or a combination of any two or more thereof.
較佳地,該發票內容包括至少一一維條碼、一二維條碼、一文字內容或其任二者以上之組合。 Preferably, the invoice content includes at least a one-dimensional bar code, a two-dimensional bar code, a text content, or a combination of two or more thereof.
為解決前揭之問題,本發明之另一目的在於提供一種電子發票證明聯的檢測方法,其係揭露圖形讀取單元讀取發票圖形,檢測單元針對發票圖形或發票內容作檢測的步驟方法,進以解決先前技術之問題。 In order to solve the aforementioned problems, another object of the present invention is to provide a detection method for the electronic invoice verification sheet, which discloses a step method in which the graphics reading unit reads the invoice graphics, and the detection unit detects the invoice graphics or the content of the invoice. Advance to solve the problems of the prior art.
為達上述之另一目的者,本發明係提供一種電子發票證明聯的檢測方法,其包括:利用一圖形獲取裝置以從一電子發票獲取一發票圖形;利用一圖形讀取模組讀取該發票圖形,且依據該發票圖形生成一發票內容;利用一檢測單元依據所設定的一發票規格檢測該發票內容或該發票 圖形,且依據檢測該發票內容或該發票圖形後所生成的複數檢測資訊生成一檢測結果;利用一輸出模組將該檢測結果輸出至外。 In order to achieve the above-mentioned other object, the present invention provides a method for detecting an electronic invoice certificate, which includes: using a graphic obtaining device to obtain an invoice graphic from an electronic invoice; using a graphic reading module to read the invoice graphic. Invoice graphics, and generate an invoice content based on the invoice graphics; use a detection unit to detect the invoice content or the invoice according to a set invoice specification Graphics, and generate a detection result based on the plurality of detection information generated after detecting the invoice content or the invoice graphics; an output module is used to output the detection result to the outside.
較佳地,當該圖形讀取單元係讀取該發票圖形時,係包括如下步驟:利用一一維條碼讀取模組讀取該發票圖形內的一一維條碼,且將該一維條碼解析成一一維字串;利用一二維條碼讀取模組讀取該發票圖形內的複數二維條碼,且分別將各該二維條碼解析成一二維字串;利用一文字辨識模組讀取該發票圖形內的一文字圖形,且該文字辨識模組係文字化該文字圖形,以獲取一文字內容;其中,該發票內容包括該一維字串、該二維字串及該文字內容。 Preferably, when the graphic reading unit reads the invoice graphic, it includes the following steps: using a one-dimensional barcode reading module to read the one-dimensional barcode in the invoice graphic, and the one-dimensional barcode Parse into a one-dimensional character string; use a two-dimensional barcode reading module to read the plural two-dimensional barcodes in the invoice graphics, and parse each two-dimensional barcode into a two-dimensional character string; use a text recognition module The group reads a text graphic in the invoice graphic, and the text recognition module textualizes the text graphic to obtain a text content; wherein the invoice content includes the one-dimensional string, the two-dimensional string, and the text content .
較佳地,當該文字辨識模組獲取該文字內容時,該文字辨識模組判斷該文字內容內是否符合該文字辨識模組內所設定的複數規格文字,若該文字內容缺少任一該規格文字時,該文字辨識模組則重新讀取該文字圖形,且以區塊式讀取的方式文字化該文字圖形,當該文字圖形被完整文字化時,該文字辨識模組係依序堆疊文字化後所獲取之各區塊的該文字內容,且依據各該規格文字與各區塊的該文字內容相比對,以判斷各區塊的該文字內容是否符合各該規格文字;其中,若該文字辨識模組判斷各區塊的該文字內容符合各該規格文字時,該文字辨識模組則輸出各區塊所組成的該文字內容;其中,若該文字辨識模組判斷各區塊的該文字內容不符合各該規格文字時,該文字辨識模組則重新執行重新讀取該文字圖形,且以區塊式讀取的方式文字化該文字圖形的步驟。 Preferably, when the text recognition module obtains the text content, the text recognition module determines whether the text content meets the plural specification text set in the text recognition module, and if the text content lacks any of the specifications When writing text, the text recognition module re-reads the text graphic and textualizes the text graphic by block reading. When the text graphic is completely textualized, the text recognition module is stacked in order After textualization, the text content of each block is obtained, and the text content of each block is compared with the text content of each block according to the comparison of the text content of each block to determine whether the text content of each block meets the specification text; wherein, If the text recognition module determines that the text content of each block conforms to the standard text, the text recognition module outputs the text content composed of each block; wherein, if the text recognition module determines each block When the text content of does not meet the standard text, the text recognition module re-executes the steps of re-reading the text graphic and texturing the text graphic in a block-based reading manner.
較佳地,當該檢測單元依據該發票規格檢測該發票內容或該發票圖形時,係包括如下步驟:利用一規格解析模組依據該發票規格內的 一文字規格檢測該文字內容、該發票規格內的一一維規格檢測該一維字串、以及該發票規格內的一二維規格檢測各該二維字串,以生成複數該檢測資訊;利用一尺寸檢測模組依據該發票規格內的一尺寸規格檢測該發票圖形,以生成該檢測資訊;利用一規格設定模組設定該發票規格,以將該發票規格提供予該規格解析模組及該尺寸檢測模組。 Preferably, when the detection unit detects the invoice content or the invoice graph according to the invoice specification, it includes the following steps: using a specification analysis module according to the invoice specification A text specification detects the text content, a one-dimensional specification in the invoice specification detects the one-dimensional character string, and a two-dimensional specification in the invoice specification detects each of the two-dimensional character strings to generate a plurality of the detection information; The size detection module detects the invoice graphic according to a size specification in the invoice specification to generate the detection information; uses a specification setting module to set the invoice specification to provide the invoice specification to the specification analysis module and the size Detection module.
較佳地,當該尺寸檢測模組依據該尺寸規格檢測該發票圖形時,該尺寸檢測模組係擷取該發票圖形的其一之一寬度或一長度,以依據該寬度或該長度量測是否符合該尺寸規格;若符合時,該尺寸檢測模組則再依據該尺寸規格所記載的比例檢測該發票圖形未量測的該寬度或該長度,以及該發票圖形內的該一維條碼、該二維條碼以及該文字圖形的位置、寬度及長度;若不符合時,該尺寸檢測模組則判斷該發票圖形不符合該尺寸規格。 Preferably, when the size detection module detects the invoice graphic according to the size specification, the size detection module captures a width or a length of the invoice graphic to measure according to the width or the length Whether it meets the size specification; if it does, the size detection module will then detect the unmeasured width or length of the invoice graphic according to the ratio recorded in the size specification, as well as the one-dimensional barcode, The position, width and length of the two-dimensional bar code and the text graphic; if not, the size detection module determines that the invoice graphic does not meet the size specification.
100:檢測系統 100: detection system
10:圖形獲取裝置 10: Graphic acquisition device
11:發票圖形 11: Invoice graphics
20:圖形讀取單元 20: Graphic reading unit
201:發票內容 201: Invoice content
21:一維條碼讀取模組 21: One-dimensional barcode reading module
211:一維字串 211: One-dimensional string
22:二維條碼讀取模組 22: Two-dimensional barcode reading module
221:二維字串 221: two-dimensional string
23:文字辨識模組 23: text recognition module
231:文字內容 231: text content
232:規格文字 232: Specification text
30:檢測單元 30: detection unit
301:檢測資訊 301: Detection Information
302:檢測結果 302: test result
31:規格解析模組 31: Specification Analysis Module
32:尺寸檢測模組 32: size detection module
33:規格設定模組 33: Specification setting module
331:發票規格 331: invoice specifications
3311:文字規格 3311: text specifications
3312:一維規格 3312: One-dimensional specifications
3313:二維規格 3313: Two-dimensional specifications
3314:尺寸規格 3314: size specifications
40:輸出模組 40: output module
S11~S14、S121~S123、S1231~S1234、S131~S133:步驟流程 S11~S14, S121~S123, S1231~S1234, S131~S133: step flow
圖1係為本發明之檢測系統方塊圖; Figure 1 is a block diagram of the detection system of the present invention;
圖2係為本發明之檢測系統之資料傳遞方塊圖; Figure 2 is a block diagram of the data transfer of the detection system of the present invention;
圖3係為本發明之電子發票證明聯的檢測步驟流程圖; Figure 3 is a flow chart of the detection steps of the electronic invoice certificate of the present invention;
圖4係為本發明之圖形讀取單元讀取發票圖形的步驟流程圖; FIG. 4 is a flowchart of the steps of reading the invoice graphics by the graphics reading unit of the present invention;
圖5係為本發明之文字辨識模組檢測文字內容的步驟流程圖; FIG. 5 is a flowchart of the steps for detecting text content by the text recognition module of the present invention;
圖6係為本發明之檢測單元依據發票規格檢測發票內容的步驟流程圖。 Fig. 6 is a flow chart of the steps of the detection unit of the present invention to detect the content of the invoice according to the invoice specification.
以下將描述具體之實施例以說明本發明之實施態樣,惟其並 非用以限制本發明所欲保護之範疇。 Specific embodiments will be described below to illustrate the implementation of the present invention, but they are not It is not intended to limit the scope of protection of the present invention.
請參閱圖1及圖2,其係為本發明之檢測系統方塊圖及檢測系統之資料傳遞方塊圖。如圖所示,本發明之電子發票證明聯的檢測系統100主要係由一圖形獲取裝置10、一圖形讀取單元20、一檢測單元30及一輸出模組40所組成。
Please refer to FIG. 1 and FIG. 2, which are the block diagram of the detection system and the block diagram of the data transmission of the detection system of the present invention. As shown in the figure, the
該圖形獲取裝置10係被設置從一電子發票(可為紙本或電子圖檔的電子發票)獲取一發票圖形11,該圖形獲取裝置10具體可為相機、掃描機或其他可獲取該發票圖形11的裝置,其中,該發票圖形11包括一發票正面圖形、一發票反面圖形、一發票明細聯圖形或其任二者以上之組合。
The graphic obtaining
該圖形讀取單元20主要是用於讀取一圖形內的資訊,且藉由所設置的各模組將所讀取到的資訊進行解析或文字化之動作,當該圖形讀取單元20與該圖形獲取裝置10相連結時,該圖形讀取單元20則會讀取該發票圖形11,且依據該發票圖形11生成一發票內容201。具體來說,當該圖形讀取單元讀取20到該發票圖形11時,因通常該電子發票內會具有一維條碼、二維條碼及文字,故該圖形讀取單元20即會利用一一維條碼讀取模組21讀取該發票圖形11內的一一維條碼,且將該一維條碼解析成一一維字串211、一二維條碼讀取模組22讀取該發票圖形11內的複數二維條碼,且分別將各該二維條碼解析成一二維字串221、一文字辨識模組23讀取該發票圖形11內的一文字圖形,且該文字辨識模組23係文字化該文字圖形,以獲取一文字內容231,其中,該一維字串211及該二維字串221具體可為由英文和數字組合而成的字串。如此可知,該發票內容201係包括該一維字串211、該二維字串221、該文字內容231或其任二者以上之組合。
The
當該文字辨識模組23文字化該文字圖形時,該文字辨識模組23例如可利用光學字元辨識(Optical Character Recognition,OCR)該文字圖形,以獲取該文字圖形內的該文字內容231。然而,若僅應用光學字元辨識來獲取該文字內容231,係難以達到百分百地辨識出該文字圖形內的文字,如此,該文字辨識模組23在獲取到該文字內容231後,則會判斷該文字內容231內是否符合該文字辨識模組23內所設定的複數規格文字232,各該規格文字232係被用以判斷該電子發票上所應記載的內容,若該文字內容231缺少任一該規格文字232時,該文字辨識模組23則重新讀取該文字圖形,且以區塊式讀取的方式文字化該文字圖形,當該文字圖形被完整文字化時,該文字辨識模組23係依序堆疊文字化後所獲取之各區塊的該文字內容231,且依據各該規格文字232與各區塊的該文字內容231相比對,以判斷各區塊的該文字內容231是否符合各該規格文字232。
When the
由於該電子發票的規格或尺寸常會基於電子發票實施作業要點的修正而有所更動,故該檢測單元30主要是用於檢測電子發票是否符合現行電子發票實施作業要點所制訂的發票規格、發票尺寸、版本資訊及容錯標準。當該檢測單元30與該圖形讀取裝置10相連結時,該檢測單元30會依據所設定的一發票規格331檢測該發票內容201或該發票圖形11,且依據檢測該發票內容201或該發票圖形11後所生成的複數檢測資訊301生成一檢測結果302,其中,該檢測結果302可包括有符合該發票規格331的至少一合格項目、不符合該發票規格的至少一錯誤項目、或是針對該錯誤項目提供修正建議的至少一建議項目,其中該合格項目係指符合該發票規格331的項目、該錯誤項目為不符合該發票規格331的項目、而該建議項目則為提供
特定項目修正的建議(無論其係為該合格項目或該錯誤項目)。
Since the specifications or dimensions of the electronic invoice are often changed based on the revision of the key points of the electronic invoice implementation, the
具體來說,該檢測單元30是利用該檢測單元30所包括的一規格解析模組31、一尺寸檢測模組32、一規格設定模組33所進行檢測的,當該檢測單元30檢測該發票內容201時,該規格解析模組31則會依據該發票規格331內的一文字規格3311檢測該文字內容231、該發票規格331內的一一維規格3312檢測該一維字串211、以及該發票規格331內的一二維規格3313檢測各該二維字串221,以生成複數該檢測資訊301。
Specifically, the
該規格解析模組31檢測該一維字串211時,該規格解析模組31主要是檢測該一維字串211是否符合一條碼類型的記載方式,以及該一維字串211的前5碼是否為期別、後4碼是否為隨機碼、中間10碼是否為統一發票字軌號碼,且該期別、該隨機碼及該統一發票字軌號碼是否符合該文字內容231的該期別、該隨機碼及該統一發票字軌號碼;其中該條碼類型係包括有三九碼(Code 39)、九三碼(Code 93)、一一碼(Code 11)、MSI條碼、中國郵政條碼(Toshiba code)、三二碼(Code 32)或交錯式二五條碼等,在此實施例中,該條碼類型具體為三九碼(Code 39)。
When the
該規格解析模組31檢測該二維字串221時,該規格解析模組31會擷取該二維條碼中的複數定位圖案(例如該二維條碼的三個角落上設有如同「回」的定位圖案)的四周相鄰處中的一版本資訊及一防錯標準資訊,該規格解析模組再依據該二維規格檢測該版本資訊及該防錯標準資訊,由於該二維條碼具有多種版本以及多種的防錯標準,如此,依據該規格解析模組所擷取該版本資訊及該防錯標準資訊即可確定該二維條碼所使用的版本及防錯標準是否與符合現行電子發票實施作業要點或是使用者所欲使用
的版本及防錯標準。在此實施例中,該二維規格係依據二維條碼V6(41x41)以上的版本,以及Level L(容錯率7%)以上的防錯標準檢測該版本資訊及該防錯標準資訊。
When the
該規格解析模組31檢測該二維字串221時,該規格解析模組31則會再依據具有該防錯標準資訊(容錯率7%)的該二維規格3313檢測其一之該二維字串的第77碼之前包含之銷售額的數字個數、加密驗證資訊、以及與該文字內容相同的統一發票字軌號碼、交易日期時間、隨機碼的數字、總計的數字、賣方編號的數字以及買方統編的數字。在此實施例中,銷售額的數字個數係為8位數的未稅之金額,且將金額轉換以十六進位的方式記載;加密驗證資訊(24位數)係將統一發票字軌號碼及隨機碼以字串方式組合後,再依據一加密程序(例如進階加密標準(Advanced Encryption Standard,AES))加密,並採用一編碼程序(例如Base 64)編碼轉換成該加密驗證資訊;統一發票字軌號碼係具有10位數;交易日期時間的前三碼為民國年、中間二碼為月份、後面二碼為日期;總計的數字個數係為8位數的含稅之金額,且將金額轉換以十六進位的方式記載;賣方編號的數字(8位數)係為賣方的統一編號;買方統編的數字(8位數)係為買方的統一編號,若買受人為一般消費者時,則以8個0記載。
When the
該規格解析模組31檢測該二維字串221時,該規格解析模組31進一步依據該二維規格3313檢測該二維字串221的第78碼之後的交易明細或/及另一該二維字串221的交易明細之記載事項是否符合該文字內容內的交易明細之記載事項。具體來說,當交易的資訊過多時,若僅利用一個該二維條碼的第78碼之後記載交易明細,則可能無法全部記載交易的資
訊,如此,一般電子發票上會設有二個該二維條碼,當其一該二維字串221係記載如上述之第77碼之前的資訊及第78碼之後的交易明細,而另一該二維字串221則會記載其一該二維條碼第78碼之後無法記載的交易明細,如此,該規格解析模31組即可依據該二維規格3313檢測其一該二維字串221的第78碼之後或/及另一該二維字串221的交易明細是否符合該文字內容231內的交易明細之記載事項。
When the
該尺寸檢測模組32則是依據該發票規格331內的一尺寸規格3314檢測該發票圖形11,以生成該檢測資訊301,而當該尺寸檢測模組32進行檢測時,該尺寸檢測模組32是先擷取該發票圖形11的一寬度或是一長度(以下係以擷取該寬度為例),以依據該寬度量測是否符合該尺寸規格3314內記載的寬度限制(可為一個範圍值或是一數值,在此實施例中,寬度限制係為5.7公分),若符合時,該尺寸檢測模組32則會依據該尺寸規格3314所記載的比例(例如3:4、9:16)檢測該發票圖形11上尚未量測到的該長度(例如9公分,誤差值±3%),以及該發票圖形11內的該一維條碼(例如高度需為0.5公分以上)、該二維條碼以及該文字圖形的位置、寬度及長度(例如該二維條碼的寬度及長度各為1.5公分),且以該寬度作為量測之基準;但若不符合時,該尺寸檢測模組32則判斷該發票圖形11不符合該尺寸規格3314,以於輸出其一之該檢測資訊301時,該檢測資訊301內則會具有將此尺寸檢測紀錄為錯誤的該錯誤項目,且可進一步生成針對尺寸檢測的建議項目。
The
該規格設定模組33主要是被設置以提供使用者設定該發票規格331,又或是從外部接收該發票規格331,以將該發票規格331提供予該規格解析模組31及該尺寸檢測模組32。
The
該輸出模組40係用於將資訊傳輸至外,以使得外部之計算裝置、處理裝置、分析裝置或接收裝置等,可從該輸出模組40接收到所輸出的資訊,如此,當該輸出模組40則會與該檢測單元30相連結時,該輸出模組40則會將從該檢測單元30接收到該檢測結果302輸出至外,以提供該電子發票開發人員確認列印的該電子發票是否符合規定,或是提供國稅局人員審核該電子發票申請之輔助工具。
The
請參閱圖3至圖6,其係為本發明之電子發票證明聯的檢測步驟流程圖、圖形讀取單元讀取發票圖形的步驟流程圖、文字辨識模組檢測文字內容的步驟流程圖及檢測單元依據發票規格檢測發票內容的步驟流程圖。如圖所示,本發明進一步揭露電子發票證明聯的檢測方法,該檢測方法係應用於如上所述之電子發票證明聯的檢測系統上,其主要包括: Please refer to Figures 3 to 6, which are the flow chart of the detection steps of the electronic invoice certificate sheet of the present invention, the flow chart of the steps for the graphics reading unit to read the graphics of the invoice, the flow chart of the steps for the text recognition module to detect the text content, and the detection A flow chart of the steps for the unit to check the contents of the invoice according to the invoice specifications. As shown in the figure, the present invention further discloses the detection method of the electronic invoice verification sheet. The detection method is applied to the above-mentioned electronic invoice verification sheet detection system, which mainly includes:
S11:利用一圖形獲取裝置以從一電子發票獲取一發票圖形; S11: Use a graphic obtaining device to obtain an invoice graphic from an electronic invoice;
S12:利用一圖形讀取模組讀取該發票圖形,且依據該發票圖形生成一發票內容; S12: Use a graphic reading module to read the invoice graphic, and generate an invoice content based on the invoice graphic;
S13:利用一檢測單元依據所設定的一發票規格檢測該發票內容或該發票圖形後,且依據檢測該發票內容或該發票圖形後所生成的複數檢測資訊生成一檢測結果; S13: Use a detection unit to detect the invoice content or the invoice graphic according to a set invoice specification, and generate a detection result based on the plural detection information generated after detecting the invoice content or the invoice graphic;
S14:利用一輸出模組將該檢測結果輸出至外。 S14: Use an output module to output the detection result to the outside.
當該圖形讀取單元係讀取該發票圖形時,則會包括如下步驟: When the graphic reading unit reads the invoice graphic, it will include the following steps:
S121:利用一一維條碼讀取模組讀取該發票圖形內的一一維條碼,且將該一維條碼解析成一一維字串; S121: Use the one-dimensional barcode reading module to read the one-dimensional barcode in the invoice graph, and parse the one-dimensional barcode into a one-dimensional string;
S122:利用一二維條碼讀取模組讀取該發票圖形內的複數二維條碼,且分別將各該二維條碼解析成一二維字串; S122: Use a one- and two-dimensional barcode reading module to read the plural two-dimensional barcodes in the invoice graph, and parse each of the two-dimensional barcodes into a two-dimensional character string respectively;
S123:利用一文字辨識模組讀取該發票圖形內的一文字圖形,且該文字辨識模組係文字化該文字圖形,以獲取一文字內容; S123: Use a text recognition module to read a text graphic in the invoice graphic, and the text recognition module textualizes the text graphic to obtain a text content;
其中,該發票內容包括該一維字串、該二維字串及該文字內容。 Wherein, the invoice content includes the one-dimensional character string, the two-dimensional character string, and the text content.
又當該文字辨識模組獲取該文字內容時,則會進行如下步驟: When the text recognition module obtains the text content, it will perform the following steps:
S1231:該文字辨識模組判斷該文字內容內是否符合該文字辨識模組內所設定的複數規格文字; S1231: The text recognition module judges whether the text content meets the plural specification text set in the text recognition module;
S1232:若該文字內容缺少任一該規格文字時,該文字辨識模組則重新讀取該文字圖形,且以區塊式讀取的方式文字化該文字圖形; S1232: If the text content lacks any of the standard text, the text recognition module re-reads the text graphic, and textualizes the text graphic in a block reading manner;
S1233:當該文字圖形被完整文字化時,該文字辨識模組係依序堆疊文字化後所獲取之各區塊的該文字內容; S1233: When the text graphics are completely textualized, the text recognition module sequentially stacks the text content of each block obtained after textualization;
S1234:依據各該規格文字與各區塊的該文字內容相比對,以判斷各區塊的該文字內容是否符合各該規格文字; S1234: Determine whether the text content of each block meets the text content of each standard according to the comparison of the text of each specification with the text content of each block;
其中,若該文字辨識模組判斷各區塊的該文字內容符合各該規格文字時,該文字辨識模組則輸出各區塊所組成的該文字內容; Wherein, if the text recognition module determines that the text content of each block conforms to the standard text, the text recognition module outputs the text content composed of each block;
其中,若該文字辨識模組判斷各區塊的該文字內容不符合各該規格文字時,該文字辨識模組則重新執行重新讀取該文字圖形,且以區塊式讀取的方式文字化該文字圖形的步驟。 Wherein, if the text recognition module determines that the text content of each block does not meet the specifications of the text, the text recognition module re-reads the text graphics and textualizes it in a block-based reading method. The steps of the text graphics.
當該檢測單元依據該發票規格檢測該發票內容時,係包括如 下步驟: When the detection unit detects the content of the invoice according to the invoice specifications, it includes: Next steps:
S131:利用一規格解析模組依據該發票規格內的一文字規格檢測該文字內容、該發票規格內的一一維規格檢測該一維字串、以及該發票規格內的一二維規格檢測各該二維字串,以生成複數該檢測資訊; S131: Use a specification analysis module to detect the text content according to a text specification in the invoice specification, detect the one-dimensional character string in the one-dimensional specification in the invoice specification, and detect each of the two-dimensional specifications in the invoice specification. A two-dimensional character string to generate a plurality of the detection information;
S132:利用一尺寸檢測模組依據該發票規格內的一尺寸規格檢測該發票圖形,以生成該檢測資訊; S132: Use a size detection module to detect the invoice graphics according to a size specification in the invoice specification to generate the detection information;
S133:利用一規格設定模組設定該發票規格,以將該發票規格提供予該規格解析模組及該尺寸檢測模組。 S133: Use a specification setting module to set the invoice specification, so as to provide the invoice specification to the specification analysis module and the size detection module.
其中,當該尺寸檢測模組依據該尺寸規格檢測該發票圖形時,該尺寸檢模組係擷取該發票圖形的其一之一寬度或一長度,以依據該寬度或該長度量測是否符合該尺寸規格;若符合時,該尺寸檢測模組則再依據該尺寸規格所記載的比例檢測該發票圖形未量測的該寬度或該長度,以及該發票圖形內的該一維條碼、該二維條碼以及該文字圖形的位置、寬度及長度;若不符合時,該尺寸檢測模組則判斷該發票圖形不符合該尺寸規格。 Wherein, when the size detection module detects the invoice graphic according to the size specification, the size detection module captures a width or a length of the invoice graphic to measure whether the width or length conforms to The size specification; if it meets the specifications, the size detection module will then detect the unmeasured width or length of the invoice graphic according to the ratio recorded in the size specification, and the one-dimensional barcode and the two-dimensional barcode in the invoice graphic. Dimension bar code and the position, width and length of the text graphic; if not, the size detection module will determine that the invoice graphic does not meet the size specification.
藉由上述之實施例所載之技術內容,本發明即可提供完整且自動檢測電子發票證明聯的方式,進而改善先前技術必須利用人工檢測或是無法有效地透過自動辨識檢測的問題。 With the technical content contained in the above-mentioned embodiments, the present invention can provide a complete and automatic way of detecting the electronic invoice certificate, thereby improving the problem that the prior art must use manual detection or cannot effectively detect through automatic identification.
在上列詳細說明係針對本發明之一可行實施例之具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。 The above detailed description is a specific description of a feasible embodiment of the present invention, but this embodiment is not intended to limit the scope of the present invention. Any equivalent implementation or modification that does not deviate from the technical spirit of the present invention shall include In the scope of the patent in this case.
100:檢測系統 100: detection system
10:圖形獲取裝置 10: Graphic acquisition device
11:發票圖形 11: Invoice graphics
20:圖形讀取單元 20: Graphic reading unit
201:發票內容 201: Invoice content
21:一維條碼讀取模組 21: One-dimensional barcode reading module
211:一維字串 211: One-dimensional string
22:二維條碼讀取模組 22: Two-dimensional barcode reading module
221:二維字串 221: two-dimensional string
23:文字辨識模組 23: text recognition module
231:文字內容 231: text content
232:規格文字 232: Specification text
30:檢測單元 30: detection unit
301:檢測資訊 301: Detection Information
302:檢測結果 302: test result
31:規格解析模組 31: Specification Analysis Module
32:尺寸檢測模組 32: size detection module
33:規格設定模組 33: Specification setting module
331:發票規格 331: invoice specifications
3311:文字規格 3311: text specifications
3312:一維規格 3312: One-dimensional specifications
3313:二維規格 3313: Two-dimensional specifications
3314:尺寸規格 3314: size specifications
40:輸出模組 40: output module
Claims (16)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109104333A TWI737168B (en) | 2020-02-12 | 2020-02-12 | Detecting system for electronic invoice certificate and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109104333A TWI737168B (en) | 2020-02-12 | 2020-02-12 | Detecting system for electronic invoice certificate and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202131314A TW202131314A (en) | 2021-08-16 |
TWI737168B true TWI737168B (en) | 2021-08-21 |
Family
ID=78282948
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109104333A TWI737168B (en) | 2020-02-12 | 2020-02-12 | Detecting system for electronic invoice certificate and method thereof |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI737168B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150317842A1 (en) * | 2014-05-05 | 2015-11-05 | Curtis A. Evans | Methods, Systems, and Account Settings for Payment with a Transponder |
TWM562436U (en) * | 2017-11-03 | 2018-06-21 | Whale Business Intelligence Co Ltd | Intelligent account checking system |
TWM579361U (en) * | 2019-03-08 | 2019-06-11 | 關貿網路股份有限公司 | Tax refund service system and tax refund service platform |
-
2020
- 2020-02-12 TW TW109104333A patent/TWI737168B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150317842A1 (en) * | 2014-05-05 | 2015-11-05 | Curtis A. Evans | Methods, Systems, and Account Settings for Payment with a Transponder |
US20150317614A1 (en) * | 2014-05-05 | 2015-11-05 | Curtis A. Evans | Methods and Systems for Payment with a Transponder |
TWM562436U (en) * | 2017-11-03 | 2018-06-21 | Whale Business Intelligence Co Ltd | Intelligent account checking system |
TWM579361U (en) * | 2019-03-08 | 2019-06-11 | 關貿網路股份有限公司 | Tax refund service system and tax refund service platform |
Also Published As
Publication number | Publication date |
---|---|
TW202131314A (en) | 2021-08-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7840890B2 (en) | Generation of randomly structured forms | |
EP2820592B1 (en) | Unique identification information from marked features | |
EP2937818B1 (en) | Information code, information code generation method, information code reader device, and information code usage system | |
US20080212845A1 (en) | Automatic form generation | |
CN110751143A (en) | Electronic invoice information extraction method and electronic equipment | |
CN100414549C (en) | Image search system, image search method, and storage medium | |
JP7263423B2 (en) | Improved matrix symbol error fix | |
JP5202677B2 (en) | Receipt data recognition device and program thereof | |
CN102591596A (en) | Information processing equipment, and information processing method | |
CN112084748A (en) | Text comparison method | |
CN111950380A (en) | Bill auditing method and device, electronic equipment and computer-readable storage medium | |
TWI737168B (en) | Detecting system for electronic invoice certificate and method thereof | |
Hamzah et al. | Data capturing: Methods, issues and concern | |
JP2012221372A (en) | Business form, business form processor, business form processing method and recording medium | |
CN111967246A (en) | Error correction method for shopping bill recognition result | |
US20080292136A1 (en) | Data Processing System And Method | |
CN112287936A (en) | Optical character recognition test method and device, readable storage medium and terminal equipment | |
US8649055B2 (en) | Image processing apparatus and computer readable medium | |
JP2006079571A (en) | Printer print verification inspection device | |
TW202207122A (en) | Electronic invoice certificate identifying method and invoice identification system thereof | |
JPS6122347B2 (en) | ||
JPH0773267A (en) | Method and apparatus for discrimination and correction of error | |
JP4232316B2 (en) | Validity verification system for print data for OCR | |
TWI810623B (en) | Document proofreading method and device, and computer-readable recording medium | |
TWI237176B (en) | Testing card and testing method |