WO2023016925A1 - System for extracting data from a document - Google Patents

System for extracting data from a document Download PDF

Info

Publication number
WO2023016925A1
WO2023016925A1 PCT/EP2022/071982 EP2022071982W WO2023016925A1 WO 2023016925 A1 WO2023016925 A1 WO 2023016925A1 EP 2022071982 W EP2022071982 W EP 2022071982W WO 2023016925 A1 WO2023016925 A1 WO 2023016925A1
Authority
WO
WIPO (PCT)
Prior art keywords
metadata
documents
int
counts
document
Prior art date
Application number
PCT/EP2022/071982
Other languages
French (fr)
Inventor
François BLAYO
Original Assignee
Neoinstinct Sa
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neoinstinct Sa filed Critical Neoinstinct Sa
Publication of WO2023016925A1 publication Critical patent/WO2023016925A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/353Clustering; Classification into predefined classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/12Accounting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present invention relates to a partly computer-implemented method for the recognition and automatic extraction of data from a document, in particular the automatic extraction of data from an accounting document.
  • management requires finance teams to provide timely, reliable, and concise information on the economic impact of specific strategic and tactical actions.
  • management wants to know the impact on the cost structure of choosing strategy A rather than option B or C. They want the revenue and operating margin calculations are determined by specific decisions about the allocation of the company's limited resources. In order for a finance team to find the time to support strategic business decisions while performing its operational tasks requires a reduction in manual work.
  • Outsourcing requires the same education, expertise, training, software knowledge, and/or cultural understanding.
  • data extractors need to recognize documents, find relevant information on documents, extract and enter data appropriately and accurately into particular software.
  • outsourcing is manual, just like conventional data mining, it is also complex, time-consuming, and error-prone.
  • Some companies often cut costs by outsourcing data mining work to locations with lower labor costs. For example, extracting data from US tax and financial documents is a function that has been implemented using thousands of well-trained English-speaking workers in India and other low-wage countries.
  • the first step in outsourcing is to scan financial, tax or other documents and save the resulting image files.
  • These image files can be accessed by data extractors through several methods.
  • One method stores image files on the source organization's computer systems and data extraction workers view the image files on networks (such as the Internet or private networks).
  • Another method stores image files on third-party computer systems and data extraction workers then view the image files on third-party servers across networks.
  • Another method is to transmit the source organizations' image files over networks and store the image files for data extraction workers to view on the data extraction organizations' computer system. .
  • an accountant can scan various tax forms containing client financial data and transmit the scanned image files to an external company.
  • An employee of the external company extracts the client's financial data and enters it into income tax software. Income.
  • the resulting tax software data file is then transmitted back to the accountant.
  • the third general method of data extraction involves partial automation, often combining optical character recognition, human inspection, and workflow management software.
  • the first step in a partially automated data extraction operation is to scan financial, tax or other documents and save the resulting image files.
  • the scanned images are compared against a database of known documents. Images that are not identified are routed to data extraction workers for conventional processing.
  • the images that are identified have data extracted using templates, either location-based or tag-based, as well as optical character recognition (OCR) technology.
  • OCR optical character recognition
  • the document US20210117665A describes a method to be used in an expense management platform that can be used to perform a content analysis of an imaged invoice document comprising at least one invoice, in an improved way.
  • the expense management platform includes an automatic invoice analyzer (AIA) including an optical character recognition (OCR) engine, said automatic invoice analyzer (AIA) operable to perform automated analysis of at least one invoice .
  • AIA automatic invoice analyzer
  • the expense management platform also includes a machine learning engine including a knowledge repository and a trained mechanism for performing visuo-linguistic analysis, wherein said mechanism includes a neural network.
  • the method includes the steps of receiving, via a communication interface, the imaged invoice document; pre-processing, by the automatic invoice analyzer (AIA), of said at least one invoice, extraction, by the optical character recognition (OCR) engine, of a set of OCR results associated with said at least one invoice, of generation, by the automatic invoice analyzer (AIA), of an image improved by OCR of the at least one invoice, of application, by the automatic invoice analyzer (AIA), of an analysis visuo-linguistic to determine semantic information of at least one element of the at least one invoice, and production, by the automatic invoice analyzer (AIA), of one or more analysis results.
  • AIA automatic invoice analyzer
  • OCR optical character recognition
  • the automatic extraction of metadata presents a technical difficulty which stems from the variability of the metadata format of the accounting documents.
  • the presentation of the date, the VAT number the amounts remains consistent.
  • a date in Switzerland will be formatted as follows: dd.mm.yyyy.
  • the format will be: dd/mm/yyyy.
  • the format will be: mm/dd/yyyy.
  • the date can also be formatted according to dd.mm.yy or even dd mmmmmm yy.
  • the VAT identifier that appears on the accounting document is also subject to variations.
  • the total amount of the voucher can also vary depending on the format of the numbers.
  • the separator can be a “. " Or " , ". For example: 150.00 or 150.00.
  • the items that make up the description of each line of the accounting document can also vary in number. There can be one article as well as ten articles in the same accounting document. VAT rates can also be different within the same accounting document.
  • the variability of the content of accounting documents creates a combinatorial complexity that makes an automatic extraction task difficult to achieve by a succession of conditions.
  • An object of the invention is to propose a system and a method for automatically extracting data from a document, for example an accounting document, structured or unstructured.
  • a document for example an accounting document, structured or unstructured.
  • Such an accounting document can for example be a supporting document, a bank statement, a supplier invoice or any document required for the establishment of an accounting ledger.
  • Another object of the invention is to propose a simple, reliable, rapid and efficient solution for automatically extracting data from a large number of documents, in particular of a varied nature. Summary of the invention
  • the invention firstly relates to a process for extracting data from a textually digitized target document, each data being characterized by its type in the form of metadata, said process comprising the steps of:
  • said learning database comprising a plurality of learning documents each comprising all or part of the metadata types of the generated generic model, each type metadata being associated with a value
  • the invention makes it possible to automatically recognize any document from a small number of extractions carried out manually which serve as a basis for learning an automated system.
  • the method according to the invention is effective for processing any type of document and thus countering the variability of the content of documents, in particular accounting documents.
  • the constitution of a sufficiently exhaustive learning base makes it possible to ensure that the models offer a performance in accordance with the needs of the users.
  • the user must find a benefit in simplicity and efficiency that will compensate for situations in which the automatic extraction of metadata from the accounting document will produce a partial result.
  • the principle of the invention is based on the fact that each issuer of an accounting document presents its content in a structured and coherent manner.
  • the invention consists in statistically identifying the structure of the information contained in the accounting documents produced by an issuer and in generalizing it in order to then be able to recognize the information contained in all the accounting documents issued by the same issuer.
  • a retailer issues a receipt that contains the name of his company, the VAT number, the items purchased, the VAT rates applied for each item, the transaction total, the seller, the method of payment, the identification of the mode of payment, the address of the company.
  • the invention described in this patent must make it possible to identify on a small number of tickets all the information previously described and then to be able to identify them for any ticket issued by this retailer. This operation must in particular make it possible to identify all the items sold, whatever their number, all VAT rates, all payment methods such as cash, bank card, payment card.
  • the method comprises a step of selecting a predetermined number of reference documents from an initial set of documents.
  • the selection of the predetermined number of documents in an initial set of documents is carried out manually by an operator.
  • the method comprises a preliminary step of digitizing the target document by optical character recognition to allow textual reading.
  • the method comprises a step of marking each piece of identifiable metadata in each selected document, preferably manually by an operator.
  • the method includes a step of recording in a memory zone the specific models generated.
  • the automatic production (generation) of the training database from the generated generic model comprises the generation of at least one hundred training documents, preferably at least one thousand, more preferably at least ten thousand .
  • each type of metadata is randomly associated with a value.
  • each document of the plurality of training documents includes all the types of metadata of the generated generic model.
  • the method includes a filtering step to ensure that each document includes at most one metadata of each type.
  • a neural network is dedicated to generate each specific model.
  • the sliding window slides one character on each iteration.
  • the size of the sliding window is at least twenty characters, preferably at least fifty characters, for example one hundred characters.
  • the invention also relates to a computer program product characterized in that it comprises a set of program code instructions which, when executed by one or more processors, configure the processor or processors to implement a process as presented above.
  • the invention also relates to a module for extracting data from a textually digitized target document, said extraction module being configured to implement certain steps of the method as presented above.
  • the invention also relates to a system comprising an image capture module, a management module, a character recognition module, an extraction module as presented previously, a memory zone and a screen.
  • FIG. 1 schematically illustrates an embodiment of the system according to the invention.
  • Figure 2 shows an example image of a reference document.
  • Figure 3 illustrates an embodiment of the learning phase.
  • Figure 4 illustrates an example of neural network learning from a sliding window.
  • Figure 5 illustrates the training substeps of the example in Figure 4.
  • Figure 6 illustrates an example of encoding by position of the characters framed by the ⁇ total> tag.
  • Window 7 illustrates two examples of profiles of average probability of prediction of a metadata from detected characters.
  • Figure 8 illustrates an embodiment of the exploitation phase.
  • Figure 9 illustrates an example of metadata identification from prediction probability profiles of detected characters.
  • Figure 10 illustrates an example of an image of a document allowing the manual addition of metadata in a dedicated field.
  • the system 1 makes it possible to automatically extract one or more data from a so-called “target” document such as, for example, an accounting document, in particular of the invoice or receipt type, or any other document.
  • a target document such as, for example, an accounting document, in particular of the invoice or receipt type, or any other document.
  • each data is characterized by its type and possibly its name.
  • the type of data can be represented by metadata to identify said type algorithmically or by computer in a manner known per se. The role and processing of these metadata will be better understood in the light of the description which will be given below.
  • System 1 comprises an image capture module 10, a management module 20, a character recognition module 30, an extraction module 40, a memory zone 50 and a screen 60.
  • the image capture module 10, the management module 20, the character recognition module 30, the extraction module 40, the memory zone 50 and the screen 60 can be implemented by the same physical entity or well by separate physical entities.
  • the image capture module 10 is implemented by a first physical entity
  • the management module 20 the character recognition module 30, the extraction 40 and the memory zone 50 are implemented by a second physical entity, for example a server 2 or a computer
  • the screen 60 constitutes a third physical entity, the three entities being connected together by wire, wireless or via one or more communication networks.
  • the image capture module 10 is configured to generate document images. These documents can be reference documents or target documents, as will be explained below.
  • the image capture module 10 can for example be a manual scanner, an automatic scanner, the camera of a smartphone, a camera and in general any device capable of generating an image of the accounting document and of produce a digital file, for example in JPEG format (Joint Photographic Expert Group), TIFF, BMP (BitMaP) or PDF (Packet Data Format) or any other suitable format.
  • Scanning devices include scanners connected directly to a computer, shared scanners connected to a computer via a network, and smart scanners with built-in computing functionality. Capture from smartphones with direct sending to storage systems such as Dropbox®, Trésorit®, OneDrive® can be used.
  • the image(s) can be transmitted to the management module 20, which stores them in the memory zone 50 or transfers them to the character recognition module 30, or directly to the character recognition module. 30 characters.
  • the management module 20 is configured to control the various interactions with the image capture module 10, with the character recognition module 30, with the extraction module 40, with the memory zone and with the screen 60.
  • the management module 20 can include the memory area 50 or be linked (directly or remotely) to the memory area 50.
  • the management module 20 comprises a user interface (UI or User Interface).
  • this user interface operates within a web browser such as for example Google Chrome®, Firefox®, Microsoft Edge®, Safari® or any standard browser available on the market or at state level. 'art.
  • the management module 20 is configured to allow the selection, preferably manually by an operator via the user interface, of a predetermined number of documents, called "reference", in an initial set of documents.
  • the management module 20 is configured to allow the marking, by an operator via the user interface, of each identifiable piece of metadata in each selected reference document. 30 Character Recognizer
  • the character recognition module 30 is configured to encode a target document in textual form by optical character recognition (OCR), called Optical Character Recognition (OCR) in English.
  • OCR optical character recognition
  • Optical character recognition is a computer-based process for translating images of printed or typed text into text files. This process is implemented by software making it possible to recover the text in the image of a printed text and to save it in a file which can be used in a word processor for enrichment, and stored in a database or on another medium usable by a computer system.
  • the characters extracted from the image by the character recognition module 30 are transferred to the extraction module 40 via the management module (or alternatively directly).
  • the extraction module 40 is configured to analyze the characters provided by the character recognition module 30.
  • the extraction module 40 can be implemented by a computer, by a server, by a platform or any suitable device comprising a processor or several processors allowing the processing of the steps as will be described below.
  • the extraction module 40 is configured to automatically generate a generic model from a plurality of so-called “marked” documents.
  • the marked documents correspond to reference documents each comprising at least one piece of metadata which has been marked by an operator via the management module 20.
  • the generic model generated by the extraction module 40 lists all the metadata marked in various reference documents by the operator.
  • the extraction module 40 is configured to automatically generate a so-called “learning” database from the generated generic model. This is achieved by a generator which produces multiple examples from the "generic model". The generator is therefore a kind of simulator which will produce a whole set of different documents based on the generic model.
  • the learning database therefore comprises a large number of so-called “learning” documents, preferably at least several hundred or several thousand, each comprising all or part of the types of metadata of the generic model, each type of metadata being associated to a randomly generated data value.
  • the extraction module 40 is configured to generate a plurality of specific models by training a plurality of neural networks in the same number from the learning base, the training of each neural network resulting in the generation of a specific model representative of a type of metadata listed in the generic model.
  • a specific model representative of a type of metadata listed in the generic model.
  • the extraction module 40 is configured to save the specific models generated in the memory area 50.
  • the extraction module 40 is configured to carry out a textual and sequential reading of a target document using a sliding window and to calculate, for each character of said sliding window and for each specific model, the probability of belonging of said character to the metadata corresponding to the specific model.
  • the extraction module 40 is configured to identify, in the sliding window, the specific model for which the mean of the probabilities calculated for each character of at least one series of characters is greater than a predetermined threshold.
  • the extraction module 40 is configured to determine the metadata associated with the specific model identified. Memory area 50
  • the memory zone 50 is included in the management module 20 or is connected (directly or remotely) to the management module 20 in order to store the various digital documents used during the implementation of the invention, in particular the reference documents , marked documents, generic model, learning documents, specific models and target documents.
  • the memory zone 50 can for example be a hard disk on a local computer, on a file server, on a cloud service such as Dropbox®, S3®, Box®, OneDrive® and in general any storage system which offers an interface management type Application Programming Interface (API).
  • API Application Programming Interface
  • the screen 60 is connected to the management module 20 in order to display the documents, commands and results necessary for the implementation of the invention.
  • the screen 60 can be of any type: a simple display screen, a touch screen or any suitable screen.
  • the target documents processed are slips of the cash receipt type comprising several types of data associated with different metadata.
  • one of the data may be a total sum of numerical values of the "price" type, noted “SOMME CHF” (sum in Swiss francs) in the slip, and which will be identified by metadata including a tag start tag, denoted ⁇ total>, and an end tag, denoted ⁇ /total>.
  • the value of the data will be of numeric type and will be indicated between the start tag and the end tag.
  • the extraction module 40 will note said sum ⁇ total>2914.85 ⁇ /total>.
  • the implementation of the method according to the invention assumes two distinct phases: a learning phase and an operating phase.
  • Learning phase assumes two distinct phases: a learning phase and an operating phase.
  • the learning phase is a preparatory phase which consists of the selection of a set of so-called “reference” documents, the manual marking by an operator of said reference documents, the production of a generic model from the marked documents, the generation of a set of so-called “learning” documents from the generic document designed and the training of neural networks from the generated learning documents in order to create specific models each specific to a type of metadata.
  • This learning phase can for example be carried out for each group of similar target documents, in particular associated with the same publisher of said documents.
  • the user of system 1 has a set of reference documents, for example selected by the user or available to the user. These documents are preferably chosen so as to present different forms and/or different types of data from the same publisher.
  • Reference documents can be in paper or electronic form.
  • documents are files, for example JPEG-type images or PDF-type files.
  • the reference documents are submitted to the image capture module 10 which transforms them into computer files, for example of the JPEG or PDF type.
  • the reference documents are sent to the character recognition module 30 which encodes them in textual form during a step E1 of optical character recognition.
  • each reference document coded in textual form is presented to the user via the screen 60 to allow him to simply designate the metadata present in said reference document.
  • the principle of the analysis consists in automatically extracting identifiable metadata in the reference document in textual form.
  • the present invention offers the extraction of nine identifiable metadata which are:
  • Item-taxcode the VAT code corresponding to the item-name
  • Taxitem-code the code corresponding to a VAT percentage
  • Taxitem-value the amount of VAT corresponding to a Taxitem-code
  • Taxitem-percentage the VAT percentage corresponding to a Taxitem-code
  • identifiable metadata is of two types:
  • the image of the reference document displayed on screen 60 via graphical user interface 400 is available in field 435 to allow the user to simply recognize it.
  • Data extracted after the text extraction step is presented in field 440.
  • Metadata to be identified is presented in fields 410 (Date), 415 (Identify), 423 (Total) for individual type metadata, 420 (Item-name), 421 (Item-value), 422 (Item -tax-code) for Items type metadata and 425 (taxitem-code), 426 (taxitem-value), 427 (taxitem- percentage).
  • the page can be saved via the “save” function 430.
  • Field 450 is intended for the display of messages which result from consistency processing on the metadata of the accounting document. This treatment will not be described within the scope of the present invention.
  • a step E3 the user will use the interface 400 to associate the data identified in the field 440 with the metadata to be identified (so-called “marking” step). To this end, the user selects a portion of text from field 440 and drags and drops this text into one of the metadata to be identified.
  • Metadata are identified by the tags that correspond to them. Each metadata surrounds the data with an opening tag that ends with a closing tag. For example the "date" metadata is stored as ⁇ date>20.12.2018 ⁇ /date>.
  • a step E5 makes it possible to generate a summary of all the reference documents marked in the form of a document called “generic model” corresponding in this example to a generic accounting document model.
  • the extraction module 40 builds, that is to say generates, automatically the generic model from the plurality of marked documents.
  • the generic model lists all the metadata marked by the user in the reference documents. This generic model is made from a fusion of different content to produce a generative model of accounting documents. It consists of exhaustively listing and counting the occurrences of each line of the reference document.
  • means that the line “coop ⁇ j” appeared 22 times out of the 34 examples manually identified by the user, the line ⁇ counts: 1:34 ⁇ coo ⁇
  • an Items type metadata means that an items type metadata has been read, followed by an Item-name tag. Inside the tag, the data is made up of several text type characters. Following Item-name, several spaces were read, a numeric value was read, then a decimal value, then several spaces, followed by an Item-value composed of a decimal value, then an item- taxcode composed of an integer value. The item then ends.
  • the analysis also identified an item formed in a different way:
  • Syntactic analysis is performed in a similar way for Tax-items type metadata.
  • the extraction module 40 automatically produces in a step E6 a learning database from the generated generic model, said learning database comprising a plurality of learning documents each comprising all or part of the types metadata of the generated generic model, each type of metadata being associated with a value.
  • the generic model is used to generate the learning database, which is stored in the memory area 50. This is achieved by producing so-called “learning” documents whose content is produced randomly while respecting the constraints of the generic model. This method is made possible because the aim is to produce a large quantity of accounting documents which respect the general structure observed in some documents and not the values which they contain.
  • the method for generating the learning documents consists of randomly choosing lines from the generic model such as: “serui par coop self-checkout”. In the embodiment described, if the line only contains characters, it is kept as it is.
  • produces the character sequence ⁇ taxcode>6 ⁇ /taxcode> ⁇ /item> ⁇
  • the type ⁇ int: 1 ⁇ has been replaced by the randomly chosen value 6.
  • a filtering step (not shown) can be carried out to guarantee that said generated learning document will be compliant. More precisely, the filtering consists in keeping only one occurrence of each Date, Identifier, Total, Items, Taxitems metadata, the Item-name, ltem_value, Item-taxcode, Taxitem-code, Taxitem-value, Taxitempercentage metadata being able to to appear in any number.
  • the memory zone 50 contains all the randomly generated documents, which will be used for learning the models. Specific models
  • the system triggers a step E7 of automatic modeling by learning of neural networks.
  • the extraction module 40 generates a plurality of specific models by training a plurality of neural networks in identical numbers from the learning base, the training of each neural network resulting in the generation of 'a specific model representative of a type of metadata listed in the generic model.
  • Step E7 consists in creating a set of neural networks which construct by supervised learning a model for recognizing the data present in a target document.
  • the choice of networks depends on the type of metadata.
  • each model will be built by a neural network. So three networks will be needed for these three individual metadata.
  • the models will be built at two levels: models for the recognition of the beginning and the end of the compound metadata, and models for the individual recognition of the metadata.
  • An example of the neural network architecture for individual metadata is shown in Figure 4.
  • the general architecture used in this example for neural networks, which model individual metadata, consists of an input layer whose length is fixed by a parameter.
  • the length for the networks responsible for modeling the individual type metadata is fixed at one hundred characters.
  • This input layer is a sliding reading window that traverses the accounting document by shifting one character to the right for each learning step.
  • the sliding reading window 510 limited for the illustration to twenty-five characters, contains the characters being read in the learning document.
  • the input characters are digitally encoded according to the method using an integration layer (Keras). This method being known to those skilled in the art, it will not be detailed in the context of this invention.
  • Each character is encoded with five numeric values.
  • the network consists of three layers of neurons whose number is also fixed by a parameter. In the context of the present invention, it is fixed at five times the size of the sliding window, ie five hundred neurons per layer.
  • the output layer 520 contains as many units as the size of the input window.
  • the output values are “0” or “1” and thus performing position coding.
  • the value “0” means that the value in the input layer at the corresponding position is not valid data for the metadata being modeled.
  • the value “1” means that the value in the input layer at the corresponding position is valid data for the metadata being modeled.
  • the modeled metadata is “Total”. The value 18.75 corresponding to the Total value in the sliding window being read.
  • the learning process E7 begins with step E71 during which the system reads an accounting document in the memory area 50.
  • this document is scanned through a sliding window 376 whose size in number of characters is fixed by a parameter. A typical value for this parameter is one hundred characters.
  • This sliding window is encoded as a vector Xi of text 377 where each position is a character and all tags are removed.
  • the data in the sliding window is analyzed to detect the presence of a tag corresponding to the model being trained. For example, if the model being trained concerns the "Total" metadata, the system will look for the presence of the ⁇ total> and ⁇ /total> tags in the text of the sliding window 376.
  • a vector of binary values zi 378 and of the same length as Xi is constructed to encode the position of the characters which correspond to the model being learned.
  • This vector will be filled with values 1 at the positions which correspond to the numerical values of the characters surrounded by the tags ⁇ total> and ⁇ /total> as illustrated in FIG. 6 (step E73).
  • the vector zi will position-code the presence or the absence of characters corresponding to the text of the model being trained.
  • the content of the sliding window is filled with empty characters for the beginning and for the end of the reading of the accounting document.
  • the two vectors Xi and zi are used to adapt the model parameters.
  • Each individual metadata will be modeled by a neural network.
  • each vector Xi associated with a vector Zj is presented as input to the neural network.
  • the values of Xi flow through the network to produce an output yr This is compared to the expected output Zj.
  • the comparison method is an angle calculation of the "cosine similarity" type known in itself.
  • the angle 0 is obtained by the scalar product and the norm of the vectors: yi - zt llydl- I ⁇ ll
  • the value "-1" will indicate opposite vectors, "0" orthogonal vectors and "1" collinear vectors with a positive coefficient.
  • the intermediate values make it possible to evaluate the degree of similarity.
  • the parameters of the model consist of all the connections Wij 531, 532, 533 in Figure 5 between neurons of the different layers. They are adapted according to an adaptation algorithm in a step E74 (FIG. 6).
  • the adaptation of the coefficients is based on a gradient descent, the calculation of which is optimized by an ADAM (Adaptive Moment Estimation) optimizer. This process is repeated for all the examples available in the learning database.
  • ADAM Adaptive Moment Estimation
  • the sliding window 377 is shifted by one unit to the right and the steps E71 to E75 are repeated until the sliding window 377 reaches the last character of the document. of learning, for each learning document of the learning database.
  • the interpretation of the model built by this process is that for each character in the sliding window 377, the output from the network predicts the probability that the character in the sliding window does or does not belong to the section modeled by the network. Since a large number of predictions are obtained, all of the predictions obtained must be aggregated. All the output vectors yi produced from the learning base are thus added and an average is calculated. y N where N is the number of examples available in the knowledge base.
  • the method involves identifying the peaks within a signal based on the properties of the peaks. This method takes a one-dimensional array of values and finds all local maxima by simple comparison of neighboring values. This method allows one to account for the prominence of each peak which, in general, can be interpreted as how the peak stands out from the surrounding region. Additionally, additional filtering is used to filter out small spikes that may appear on the ticket characters. The prominence value is then used as a confidence measure. A very high prominence value usually means that the region is very likely to represent the section, so the region with the highest prominence is returned as the region of interest.
  • Compound metadata requires specific pre-processing which is used to extract part of the document to build the model. Indeed, Item-name, ltem_value, Item-taxcode, Taxitem-code, Taxitemvalue, Taxitem-percentage metadata can only appear in the context of Items or Taxitems metadata.
  • the learning base must therefore reflect this particular context and only contain sequences of characters that are found in this context. It is therefore necessary to identify the start and end characters of the parts of the documents containing the Items and Taxitems.
  • the parameters of the models are recorded in the memory zone 50 in a step E8. These parameters will be used during the exploitation of the models when it comes to automatically recognizing the metadata of a new document called "target document" that has not been used for learning.
  • the exploitation phase comprises in a step S1 the textual and sequential reading of a target document by the extraction module 40 using the sliding window and the calculation in a step S2, for each character of said sliding window and for each specific model, the probability that said character belongs to the metadata corresponding to said specific model.
  • step S1 the accounting document is read in a textual form. This assumes that the image recognition phase has been carried out beforehand.
  • step S2 the prediction of the metadata is triggered and the extraction module 40 calculates the probabilities of belonging to a piece of metadata for each character read in the sliding window from the models available in the memory area 50.
  • the extraction module 40 identifies, in the sliding window, the specific model for which the mean of the probabilities calculated for each character of at least one series of characters is greater than a predetermined threshold,
  • the extraction module 40 determines the metadata associated with the specific model identified.
  • the extraction module 40 extracts the value associated with said determined metadata.
  • the extraction module 40 calculates all the predictions of each model. It identifies the metadata that delivers the most credible prediction and, knowing the position of each character, the system copies them into the corresponding metadata field.
  • the “total” metadata model delivers the most credible prediction. The data in the location with the highest probabilities will be copied to the "Total" metadata field.
  • the “description” metadata can be enriched in a window displayed by the extraction module 40.
  • the user can fill in the field 720 of this interface to manually add a description of the accounting document. This step can be used to facilitate grouping of target documents automatically. The invention therefore allows efficient and reliable automatic extraction.

Abstract

The invention makes it possible to automatically recognize any document based on a small number of extractions that are performed manually, these serving as a learning base for an automated system. Based on the automatic construction of models in relation to each metadatum through supervised machine learning, the method according to the invention is effective in processing any type of document and thus dealing with the variability of the content of the documents. The principle of the invention is based on each issuer of an accounting document presenting the content thereof in a structured and coherent manner. The invention consists in statistically identifying the structure of the information contained in the accounting documents produced by an issuer and in generalizing it so as then to be able to recognize the information contained in all accounting documents issued by one and the same issuer.

Description

Système d’extraction de données d’un document System for extracting data from a document
Domaine technique de l'invention Technical field of the invention
La présente invention se rapporte à une méthode en partie mise en œuvre par ordinateur pour la reconnaissance et l’extraction automatique de données d’un document, en particulier l’extraction automatique de données d’une pièce comptable. The present invention relates to a partly computer-implemented method for the recognition and automatic extraction of data from a document, in particular the automatic extraction of data from an accounting document.
État de la technique State of the art
Une étude datant de 2015 (« Driscoll ») évaluant 832 divisions financières d'entreprises utilisant les données de la base de données « Open Standards Benchmarking » de l'APQC (« American Productivity & Quality Center »), a mis en lumière ce que les divisions financières font réellement toute la journée. Les dirigeants de ces divisions ont été questionnés sur le temps consacré par leurs organisations au traitement des transactions, au contrôle, à l'aide à la décision et aux activités de gestion. Les résultats ont montré que quelle que soit la taille de l'entreprise, environ la moitié du temps des divisions financières est consacrée au traitement des transactions. A 2015 study ("Driscoll") evaluating 832 financial divisions of companies using data from the "Open Standards Benchmarking" database of the APQC ("American Productivity & Quality Center"), highlighted what the financial divisions actually do all day. The leaders of these divisions were asked about the time spent by their organizations on transaction processing, control, decision support and management activities. The results showed that regardless of company size, about half of finance departments' time is spent processing transactions.
Cela signifie qu'au cours d'une semaine de travail moyenne, les employés des divisions financières hautement rémunérés passent l'équivalent du lundi matin au mercredi midi pour s'assurer que les factures sont payées, que les clients reçoivent des factures correctes, que le travail de comptabilité générale est effectué et que les immobilisations sont comptabilisées, entre autres tâches qui permettent à l'argent de circuler dans l’entreprise. This means that in an average work week, employees in highly paid finance departments spend the equivalent of Monday morning to Wednesday noon making sure bills are paid, customers receive correct bills, general accounting work is done and fixed assets are accounted for, among other tasks that keep money flowing through the business.
A l’opposé, la direction exige des équipes financières des renseignements rapides, fiables et concis sur les répercussions économiques de mesures stratégiques et tactiques précises. En fin de premier semestre, lorsqu’il est encore temps d'améliorer le rendement, la direction veut connaître l'incidence sur la structure des coûts du choix de la stratégie A plutôt que de l'option B ou C. Elle veut que le calcul du chiffre d'affaires et de la marge d'exploitation soient déterminés par des décisions précises quant à l'affectation des ressources limitées de l’entreprise. Afin qu’une équipe financière puisse trouver le temps d'appuyer les décisions stratégiques de l'entreprise tout en assurant ses tâches opérationnelles nécessite une réduction du travail manuel. In contrast, management requires finance teams to provide timely, reliable, and concise information on the economic impact of specific strategic and tactical actions. At the end of the first half, when there is still time to improve performance, management wants to know the impact on the cost structure of choosing strategy A rather than option B or C. They want the revenue and operating margin calculations are determined by specific decisions about the allocation of the company's limited resources. In order for a finance team to find the time to support strategic business decisions while performing its operational tasks requires a reduction in manual work.
Par exemple, il est fréquent que des entreprises reçoivent 60 % des factures des fournisseurs sur papier ou en format PDF (« Portable Document Format »). Quelqu'un doit saisir manuellement ces données dans les systèmes financiers de l'entreprise. Certains utilisent la reconnaissance optique de caractères. Mais cela prend aussi du temps, et les petites et moyennes entreprises n'ont peut-être pas les moyens de le faire à grande échelle. Ainsi, le papier continue d'encombrer le système, obligeant les employés à être formés et gérés, ce qui coûte du temps et de l'argent. For example, it is common for companies to receive 60% of supplier invoices on paper or in PDF (“Portable Document Format”). Someone has to manually enter this data into the company's financial systems. Some use optical character recognition. But it also takes time, and small and medium-sized businesses may not have the means to do it at scale. Thus, paper continues to clutter the system, requiring employees to be trained and managed, which costs time and money.
Si l'objectif est de traiter les transactions rapidement, à peu de frais et sans erreurs, les entreprises doivent libérer leur personnel financier des piles de papier en mouvement et les amener à se concentrer sur la compréhension des facteurs de coût et de demande, des besoins en ressources et des contraintes opérationnelles. If the goal is to process transactions quickly, inexpensively, and without errors, businesses need to free their finance staff from moving piles of paper and focus them on understanding cost and demand drivers, resource requirements and operational constraints.
Ainsi, des millions de documents produits chaque jour sont examinés, traités, stockés, vérifiés et transformés en données lisibles par ordinateur. Par exemple, les comptes créditeurs et débiteurs, les états financiers, les documents administratifs, les dossiers des ressources humaines, les documents juridiques, les dossiers de paie, les documents d'expédition et les formulaires fiscaux. Thus, millions of documents produced every day are examined, processed, stored, verified and transformed into machine-readable data. For example, accounts payable and receivable, financial statements, administrative documents, human resources records, legal documents, payroll records, shipping documents and tax forms.
Ces documents exigent généralement que les données soient extraites pour pouvoir être traitées. These documents generally require the data to be extracted before it can be processed.
Diverses techniques, comme l'Échange de Données informatisées (EDI), tentent d'éliminer les efforts de traitement humain en codant et en transmettant l'information documentaire dans des messages strictement formatés. L'échange de données informatisées est connu pour ses systèmes informatiques personnalisés, ses logiciels peu conviviaux et ses normes complexes qui ont empêché sa propagation rapide tout au long de la chaîne logistique. La grande majorité des entreprises ont évité de mettre en œuvre l'EDI perçue comme trop coûteuse. De même, les applications de XML, XBRL et d'autres fichiers de documents lisibles par ordinateur sont très limitées comparativement à l'utilisation de documents sur papier et d'images numériques tels que PDF et JPEG (Joint Photographie Expert Group). A ce jour, ces documents sont lus et interprétés par des personnes humaines pour être traités par des ordinateurs. Plus précisément, il y a trois méthodes générales d'extraction de données dans les documents : Various techniques, such as Electronic Data Interchange (EDI), attempt to eliminate human processing efforts by encoding and transmitting documentary information in strictly formatted messages. Electronic data interchange is notorious for its custom computer systems, unfriendly software, and complex standards that have prevented its rapid spread throughout the supply chain. The vast majority of companies have avoided implementing EDI perceived as too costly. Similarly, applications of XML, XBRL and other machine-readable document files are very limited compared to the use of paper documents and digital images such as PDF and JPEG (Joint Photography Expert Group). To date, these documents are read and interpreted by human beings to be processed by computers. Specifically, there are three general methods of extracting data from documents:
• l'extraction conventionnelle • conventional extraction
• l'externalisation • outsourcing
• l'automatisation. • automation.
L'extraction conventionnelle des données nécessite des travailleurs ayant une formation spécifique, une expertise dans le domaine, une formation particulière, une connaissance des logiciels et/ou une compréhension culturelle. Les préposés à l'extraction des données doivent reconnaître les documents, identifier et extraire l'information pertinente sur les documents et entrer les données de façon appropriée et précise dans des logiciels particuliers. Une telle extraction manuelle des données est complexe, longue et sujette aux erreurs. Il en découle que le coût de l'extraction des données est souvent très élevé et particulièrement lorsque l'extraction des données est effectuée par des comptables, des avocats et d'autres professionnels hautement rémunérés dans le cadre de leur travail. Conventional data mining requires workers with specific training, domain expertise, special training, software knowledge, and/or cultural understanding. Data Extractors must recognize documents, identify and extract relevant information from documents, and enter data appropriately and accurately into specific software. Such manual data extraction is complex, time-consuming and error-prone. As a result, the cost of data mining is often very high and especially when data mining is performed by accountants, lawyers and other highly paid professionals as part of their job.
L'extraction de données conventionnelle expose également l’intégralité des documents aux travailleurs en charge de l'extraction de données. Ces documents peuvent contenir des renseignements de nature confidentielle concernant l'emploi, la situation de famille, les finances, les questions juridiques, fiscales et autres des collaborateurs et des entreprises. Conventional data extraction also exposes the entire document to data extraction workers. These documents may contain information of a confidential nature relating to the employment, family status, finances, legal, tax and other matters of associates and companies.
Alors que l'extraction de données conventionnelle se fait entièrement sur papier, l'externalisation et l'automatisation commencent par la conversion du papier en fichiers d'images numériques. Cette étape est simple, facile et rapide grâce à des scanneurs de haute qualité, rapides et abordables qui sont offerts par de nombreux fournisseurs. Une fois les documents papier convertis en fichiers d'images numériques, le traitement des documents peut être rendu plus productif grâce à l'utilisation d'un logiciel de flux de travail qui achemine les documents vers la main-d'œuvre la moins onéreuse, interne ou externe. Le traitement primaire peut être effectué par du personnel subalterne ; les exceptions peuvent être traitées par du personnel mieux formé. Malgré les gains de productivité potentiels offerts par le logiciel de flux de travail par une meilleure utilisation des ressources humaines, le traitement manuel des documents reste un processus fondamentalement coûteux. While conventional data mining is done entirely on paper, outsourcing and automation starts with converting paper into digital image files. This step is simple, easy and quick thanks to high quality, fast and affordable scanners that are offered by many vendors. Once paper documents are converted into digital image files, document processing can be made more productive through the use of workflow software that routes documents to the least expensive workforce, internal or external. Primary processing can be done by junior staff; exceptions can be handled by better trained staff. Despite the potential productivity gains offered by workflow software through better use of human resources, the manual processing of documents remains a fundamentally expensive process.
L’externalisation exige la même éducation, la même expertise, la même formation, la même connaissance du logiciel et/ou la même compréhension culturelle. Comme pour l'extraction de données conventionnelle, les personnes chargées de l'extraction de données doivent reconnaître les documents, trouver les informations pertinentes sur les documents, extraire et saisir les données de manière appropriée et précise dans des logiciels particuliers. Comme l'externalisation est manuelle, tout comme l'extraction de données conventionnelle, elle est également complexe, longue et sujette aux erreurs. Certaines entreprises réduisent souvent les coûts en délocalisant le travail d'extraction de données dans des lieux où les coûts de la main d’œuvre est plus faible. Par exemple, l'extraction de données à partir de documents fiscaux et financiers américains est une fonction qui a été mise en œuvre en utilisant des milliers de travailleurs anglophones bien formés en Inde et dans d'autres pays à bas salaires. Outsourcing requires the same education, expertise, training, software knowledge, and/or cultural understanding. As with conventional data mining, data extractors need to recognize documents, find relevant information on documents, extract and enter data appropriately and accurately into particular software. Since outsourcing is manual, just like conventional data mining, it is also complex, time-consuming, and error-prone. Some companies often cut costs by outsourcing data mining work to locations with lower labor costs. For example, extracting data from US tax and financial documents is a function that has been implemented using thousands of well-trained English-speaking workers in India and other low-wage countries.
La première étape de l’externalisation consiste à numériser les documents financiers, fiscaux ou autres et à sauvegarder les fichiers images qui en résultent. Ces fichiers d'images sont accessibles par les personnes chargées de l'extraction des données par plusieurs méthodes. Une méthode stocke les fichiers d'images sur les systèmes informatiques de l'organisation source et les travailleurs d'extraction de données visualisent les fichiers d'images sur les réseaux (tels que l'Internet ou les réseaux privés). Une autre méthode stocke les fichiers d'images sur des systèmes informatiques tiers et les travailleurs d'extraction de données visualisent alors les fichiers d'images sur les serveurs tiers à travers les réseaux. Une autre méthode consiste à transmettre les fichiers d'images des organisations sources sur les réseaux et à stocker les fichiers d'images pour que les travailleurs chargés de l'extraction des données puissent les visualiser sur le système informatique des organisations d'extraction des données. The first step in outsourcing is to scan financial, tax or other documents and save the resulting image files. These image files can be accessed by data extractors through several methods. One method stores image files on the source organization's computer systems and data extraction workers view the image files on networks (such as the Internet or private networks). Another method stores image files on third-party computer systems and data extraction workers then view the image files on third-party servers across networks. Another method is to transmit the source organizations' image files over networks and store the image files for data extraction workers to view on the data extraction organizations' computer system. .
Par exemple, un comptable peut numériser les divers formulaires fiscaux contenant les données financières des clients et transmettre les fichiers d'images numérisés à une entreprise externe. Un employé de l'entreprise externe extrait les données financières du client et les saisit dans un logiciel d'impôt sur le revenu. Le fichier de données du logiciel d'impôt qui en résulte est ensuite retransmis au comptable. For example, an accountant can scan various tax forms containing client financial data and transmit the scanned image files to an external company. An employee of the external company extracts the client's financial data and enters it into income tax software. Income. The resulting tax software data file is then transmitted back to the accountant.
Dans cette situation, de nombreux clients ont constaté des problèmes de qualité dans les travaux d'extraction de données externalisée. Les fournisseurs de services externes s'attaquent à ces problèmes en embauchant des travailleurs mieux formés ou plus expérimentés, en leur offrant une formation plus poussée, en extrayant et en saisissant des données deux fois ou plus ou en vérifiant de façon exhaustive la qualité de leur travail. Ces mesures réduisent par voie de conséquence les économies de coûts attendues de l'externalisation. In this situation, many clients have seen quality issues in outsourced data mining jobs. External service providers address these issues by hiring better trained or more experienced workers, providing them with more extensive training, extracting and entering data twice or more, or comprehensively checking the quality of their work. These measures consequently reduce the cost savings expected from outsourcing.
L’externalisation s'accompagne de préoccupations relatives aux risques de sécurité associés tels que la fraude et au vol d'identité. Ces préoccupations en matière de sécurité s'appliquent aux employés et aux travailleurs temporaires ainsi qu'aux travailleurs externes et aux travailleurs à l'étranger qui ont accès à des documents contenant des renseignements sensibles. With outsourcing comes concerns about associated security risks such as fraud and identity theft. These security concerns apply to employees and temporary workers as well as to external and overseas workers who have access to documents containing sensitive information.
Bien que la transmission de fichiers d'images numérisés à l'organisme d'extraction des données puisse être sécurisée par des techniques cryptographiques, les données sensibles et les renseignements personnels d'identification sont « en clair », c’est-à-dire non cryptés lorsqu'ils sont lus par les travailleurs responsables de l’extraction des données avant leur entrée dans les systèmes informatiques appropriés. Les organisations d'extraction de données reconnaissent publiquement le besoin de sécurité de l'information. Certains organismes d'extraction de données affirment enquêter et effectuer des vérifications sur les antécédents des employés. De nombreuses organisations d'extraction de données annoncent limiter strictement l'accès physique aux locaux dans lesquels les employés entrent les données. Le papier, le matériel d'écriture, les appareils photo ou toute autre technologie d'enregistrement peuvent être interdits dans les locaux. De plus, les employés peuvent faire l'objet d'une inspection pour s'assurer que rien n'est copié ou supprimé. Étant donné que de telles mesures de sécurité en apparence exhaustives sont principalement de nature physique, elles sont imparfaites et potentiellement invérifiables. Although the transmission of scanned image files to the data extraction agency may be secured by cryptographic techniques, sensitive data and personally identifiable information is "in the clear", i.e. unencrypted when read by workers responsible for extracting the data before entering the appropriate computer systems. Data mining organizations publicly recognize the need for information security. Some data mining organizations claim to investigate and perform background checks on employees. Many data mining organizations advertise strictly limiting physical access to premises where employees enter data. Paper, writing materials, cameras or other recording technology may be prohibited on the premises. Additionally, employees can be inspected to ensure nothing is copied or deleted. Since such seemingly comprehensive security measures are primarily physical in nature, they are imperfect and potentially unverifiable.
En raison de ces imperfections, des failles dans la sécurité physique se sont produites. Par exemple, les propriétaires, les gestionnaires, le personnel des organismes d'extraction de données peuvent utiliser à mauvais escient une partie ou la totalité des renseignements confidentiels non cryptés qui leur sont confiés. De plus, des violations de la sécurité physique et des systèmes d'information par des tiers peuvent se produire. Étant donné que les organismes d'extraction de données sont de plus en plus souvent situés à l'étranger, les citoyens suisses victimes de cette façon n'ont souvent que peu ou pas de recours. Due to these imperfections, breaches in physical security have occurred. For example, owners, managers, staff of data mining organizations may misuse a part or all of the unencrypted confidential information entrusted to them. Additionally, breaches of physical security and information systems by third parties may occur. As data-mining organizations are increasingly located abroad, Swiss citizens victimized in this way often have little or no recourse.
La troisième méthode générale d'extraction de données implique une automatisation partielle, combinant souvent la reconnaissance optique de caractères, l'inspection humaine et un logiciel de gestion des flux de travail. The third general method of data extraction involves partial automation, often combining optical character recognition, human inspection, and workflow management software.
Des outils logiciels qui facilitent l'extraction et la transformation automatisées des informations documentaires sont disponibles auprès de plusieurs fournisseurs. L'économie relative des coûts d'exploitation facilitée par ces outils est proportionnelle au degré d'automatisation qui dépend notamment de l'application, de la qualité de la personnalisation des logiciels, de la variété et de la qualité des documents. Software tools that facilitate the automated extraction and transformation of document information are available from several vendors. The relative savings in operating costs facilitated by these tools is proportional to the degree of automation which depends in particular on the application, the quality of the customization of the software, the variety and the quality of the documents.
La première étape d'une opération d'extraction de données partiellement automatisée consiste à numériser les documents financiers, fiscaux ou autres et à enregistrer les fichiers images qui en résultent. Les images numérisées sont comparées à une base de données de documents connus. Les images qui ne sont pas identifiées sont acheminées aux travailleurs de l'extraction de données pour un traitement conventionnel. Les images qui sont identifiées ont des données extraites à l'aide de modèles, basés sur l'emplacement ou sur l'étiquette, ainsi que de la technologie de reconnaissance optique de caractères (ROC). The first step in a partially automated data extraction operation is to scan financial, tax or other documents and save the resulting image files. The scanned images are compared against a database of known documents. Images that are not identified are routed to data extraction workers for conventional processing. The images that are identified have data extracted using templates, either location-based or tag-based, as well as optical character recognition (OCR) technology.
La reconnaissance optique des caractères est imparfaite, plus d'un pour cent des caractères étant incorrectement reconnus. Or, les documents papier ne sont ni propres ni de haute qualité, souffrant d'être pliés ou abîmés avant la numérisation, déformés pendant la numérisation et dégradés pendant la binarisation post-numérisation. Par conséquent, certaines des informations nécessaires pour identifier les données ne sont souvent pas reconnaissables et il en résulte que certaines des données ne peuvent pas être extraites automatiquement. Optical character recognition is imperfect, with more than one percent of characters being incorrectly recognized. However, paper documents are neither clean nor of high quality, suffering from being folded or damaged before scanning, distorted during scanning and degraded during post-scanning binarization. Therefore, some of the information needed to identify the data is often not recognizable and as a result some of the data cannot be extracted automatically.
À l'aide d'outils logiciels conventionnels, les éditeurs déclarent être en mesure d'extraire jusqu'à 80 à 90 % des données sur un nombre limité de formulaires types. Lorsqu'il existe un large éventail de formulaires, l'extraction automatisée des données est très limitée. Malgré des années d'efforts, plusieurs fournisseurs d'automatisation de documents fiscaux atteignent des taux d’identification de 50 % voire moins dans la qualité d'extraction de données et admettent de nombreuses erreurs en comparaison avec les méthodes conventionnelles d'extraction de données. Using conventional software tools, publishers claim to be able to extract up to 80-90% of data on a limited number of standard forms. When there is a wide range of forms, automated data extraction is very limited. Despite years of effort, many tax document automation vendors achieve identification rates of 50% or less in data extraction quality and admit many errors compared to conventional data extraction methods. .
Ce taux décroit encore lorsque les documents ne sont pas issus de formulaires standardisés. Cela est le cas, par exemple, pour les tickets de caisse de supermarchés, les billets de transport urbain et tous les documents justificatifs qui ne sont pas issus d’un fournisseur administratif standard. This rate decreases further when the documents are not taken from standardized forms. This is the case, for example, for supermarket receipts, urban transport tickets and all supporting documents that are not issued by a standard administrative supplier.
Afin de tenter de remédier au moins en partie à ces inconvénients, le document US20210117665A décrit un procédé à utiliser dans une plate-forme de gestion des dépenses utilisable pour effectuer une analyse de contenu d'un document de facture imagé comprenant au moins une facture, d'une manière améliorée. La plate-forme de gestion des dépenses comprend un analyseur automatique de factures (AIA) comprenant un moteur de reconnaissance optique de caractères (OCR), ledit analyseur automatique de factures (AIA) pouvant fonctionner pour effectuer une analyse automatisée d'au moins une facture. La plate-forme de gestion des dépenses comprend également un moteur d'apprentissage automatique comprenant un référentiel de connaissances et un mécanisme entraîné pour effectuer une analyse visuo-linguistique, dans lequel ledit mécanisme comprend un réseau neuronal. Le procédé comprend les étapes de réception, via une interface de communication, du document de facture imagé ; de prétraitement, par l’analyseur automatique de factures (AIA), de ladite au moins une facture, d’extraction, par le moteur de reconnaissance optique de caractères (OCR), d’un ensemble de résultats OCR associés à ladite au moins une facture, de génération, par l’analyseur automatique de factures (AIA), d’une image améliorée par OCR de l’au moins une facture, d’application, par l’analyseur automatique de factures (AIA), d’une analyse visuo-linguistique pour déterminer une information sémantique d'au moins un élément de l’au moins une facture, et de production, par l’analyseur automatique de factures (AIA), d’un ou plusieurs résultats d'analyse. In an attempt to remedy these drawbacks at least in part, the document US20210117665A describes a method to be used in an expense management platform that can be used to perform a content analysis of an imaged invoice document comprising at least one invoice, in an improved way. The expense management platform includes an automatic invoice analyzer (AIA) including an optical character recognition (OCR) engine, said automatic invoice analyzer (AIA) operable to perform automated analysis of at least one invoice . The expense management platform also includes a machine learning engine including a knowledge repository and a trained mechanism for performing visuo-linguistic analysis, wherein said mechanism includes a neural network. The method includes the steps of receiving, via a communication interface, the imaged invoice document; pre-processing, by the automatic invoice analyzer (AIA), of said at least one invoice, extraction, by the optical character recognition (OCR) engine, of a set of OCR results associated with said at least one invoice, of generation, by the automatic invoice analyzer (AIA), of an image improved by OCR of the at least one invoice, of application, by the automatic invoice analyzer (AIA), of an analysis visuo-linguistic to determine semantic information of at least one element of the at least one invoice, and production, by the automatic invoice analyzer (AIA), of one or more analysis results.
Cette solution repose sur la détection de probabilités de présence des données à identifier dans le document. Ces probabilités sont visualisées sous forme de cartes de chaleur (« heatmaps » en langue anglaise) comme illustré sur la figure 12 du document US20210117665A. Il s’agit en l’espèce de combiner une représentation spatiale avec une représentation sémantique obtenue après reconnaissance optique de caractères. L’utilisation de probabilités et de carte de chaleur est particulièrement complexe et peut limiter l’efficacité de la méthode. De plus, la solution proposée dans US20210117665A ne peut traiter que des données structurées sous forme de formulaire. This solution is based on the detection of probabilities of presence of the data to be identified in the document. These probabilities are visualized under form of heatmaps (“heatmaps” in English) as illustrated in Figure 12 of the document US20210117665A. This involves combining a spatial representation with a semantic representation obtained after optical character recognition. The use of probabilities and heat maps is particularly complex and can limit the effectiveness of the method. Moreover, the solution proposed in US20210117665A can only process data structured in form form.
En outre, l’extraction de métadonnées de manière automatique présente une difficulté technique qui découle de la variabilité du format des métadonnées des pièces comptables. En général, pour un pays donné, la présentation de la date, du numéro de TVA, des montants reste cohérente. Par exemple, une date en Suisse sera formatée de la manière suivante : jj.mm.aaaa. En France, le format sera : jj/mm/aaaa. Aux Etats-Unis, le format sera : mm/jj/aaaa. Il existe également une variabilité au sein d’un même pays. Pour la Suisse, la date peut aussi être formatée selon jj.mm.aa ou encore jj mmmmmm aa. L’identifiant TVA qui figure sur la pièce comptable est aussi sujet à variations. Par exemple en Suisse il peut être formaté CHE-nnn.nnn.nnn TVA, CHE- nnn.nnn.nnn MWST, CHE-nnn.nnn.nnn IVA, CHE-nnn.nnn.nnn VAT. Le montant total de la pièce comptable peut aussi varier selon le format des nombres. Le séparateur peut être un « . » ou « , ». Par exemple : 150.00 ou 150,00. Les items qui composent la description de chaque ligne de la pièce comptable peuvent aussi varier en nombre. Il peut y avoir un article comme dix articles dans une même pièce comptable. Les taux de TVA peuvent aussi être différents au sein d’une même pièce comptable. La variabilité du contenu des pièces comptable crée une complexité combinatoire qui rend une tâche d’extraction automatique difficile à réaliser par une succession de conditions. In addition, the automatic extraction of metadata presents a technical difficulty which stems from the variability of the metadata format of the accounting documents. In general, for a given country, the presentation of the date, the VAT number, the amounts remains consistent. For example, a date in Switzerland will be formatted as follows: dd.mm.yyyy. In France, the format will be: dd/mm/yyyy. In the United States, the format will be: mm/dd/yyyy. There is also variability within a single country. For Switzerland, the date can also be formatted according to dd.mm.yy or even dd mmmmmm yy. The VAT identifier that appears on the accounting document is also subject to variations. For example in Switzerland it can be formatted CHE-nnn.nnn.nnn TVA, CHE-nnn.nnn.nnn MWST, CHE-nnn.nnn.nnn IVA, CHE-nnn.nnn.nnn VAT. The total amount of the voucher can also vary depending on the format of the numbers. The separator can be a “. " Or " , ". For example: 150.00 or 150.00. The items that make up the description of each line of the accounting document can also vary in number. There can be one article as well as ten articles in the same accounting document. VAT rates can also be different within the same accounting document. The variability of the content of accounting documents creates a combinatorial complexity that makes an automatic extraction task difficult to achieve by a succession of conditions.
Un but de l’invention est de proposer un système et une méthode d’extraction automatique de données dans un document, par exemple un document comptable, structuré ou non structuré. Un tel document comptable peut par exemple être une pièce justificative, un relevé de banque, une facture fournisseur ou tout document requis pour l’établissement d’un grand livre comptable. Un autre but de l’invention est de proposer une solution simple, fiable, rapide et efficace pour extraire automatiquement des données d’un grand nombre de documents, en particulier de nature variée. Résumé de l'invention An object of the invention is to propose a system and a method for automatically extracting data from a document, for example an accounting document, structured or unstructured. Such an accounting document can for example be a supporting document, a bank statement, a supplier invoice or any document required for the establishment of an accounting ledger. Another object of the invention is to propose a simple, reliable, rapid and efficient solution for automatically extracting data from a large number of documents, in particular of a varied nature. Summary of the invention
A cette fin, l’invention a tout d’abord pour objet un procédé d’extraction de données dans un document cible textuellement numérisé, chaque donnée étant caractérisée par son type sous la forme d’une métadonnée, ledit procédé comprenant les étapes de : To this end, the invention firstly relates to a process for extracting data from a textually digitized target document, each data being characterized by its type in the form of metadata, said process comprising the steps of:
- conception d’un modèle générique à partir d’une pluralité de documents comprenant chacun au moins une métadonnée marquée, ledit modèle générique listant l’ensemble des métadonnées marquées, - design of a generic model from a plurality of documents each comprising at least one marked metadata, said generic model listing all the marked metadata,
- production automatique d’une base de données d’apprentissage à partir du modèle générique généré, ladite base de données d’apprentissage comprenant une pluralité de documents d’apprentissage comprenant chacun tout ou partie des types de métadonnées du modèle générique généré, chaque type de métadonnées étant associé à une valeur, - automatic production of a learning database from the generated generic model, said learning database comprising a plurality of learning documents each comprising all or part of the metadata types of the generated generic model, each type metadata being associated with a value,
- génération d’une pluralité de modèles spécifiques par entrainement d’une pluralité de réseaux de neurones en même nombre que le nombre de modèles spécifiques à partir de la base d’apprentissage, l’entrainement de chaque réseau de neurones entraînant la génération d’un modèle spécifique représentatif d’un type de métadonnée listé dans le modèle générique, - generation of a plurality of specific models by training a plurality of neural networks in the same number as the number of specific models from the learning base, the training of each neural network resulting in the generation of a specific model representing a type of metadata listed in the generic model,
- lecture textuelle et séquentielle du document cible à l’aide de la fenêtre glissante et calcul, pour chaque caractère de ladite fenêtre glissante et pour chaque modèle spécifique, de la probabilité d’appartenance dudit caractère à la métadonnée correspondant au dit modèle spécifique, - textual and sequential reading of the target document using the sliding window and calculation, for each character of said sliding window and for each specific model, of the probability that said character belongs to the metadata corresponding to said specific model,
- identification, dans la fenêtre glissante, du modèle spécifique pour lequel la moyenne des probabilités calculées pour chaque caractère d’au moins une série de caractères est supérieure à un seuil prédéterminé, - identification, in the sliding window, of the specific model for which the average of the probabilities calculated for each character of at least one series of characters is greater than a predetermined threshold,
- détermination de la métadonnée associée au modèle spécifique identifié, - determination of the metadata associated with the specific model identified,
- extraction de la valeur associée à ladite métadonnée déterminée.- extraction of the value associated with said determined metadata.
L’invention permet de reconnaître automatiquement tout document à partir d’un petit nombre d’extractions réalisées manuellement qui servent de base pour l’apprentissage à un système automatisé. The invention makes it possible to automatically recognize any document from a small number of extractions carried out manually which serve as a basis for learning an automated system.
En reposant sur la construction automatique de modèles relatifs à chaque métadonnée par apprentissage automatique supervisé, le procédé selon l’invention est efficace pour traiter tout type de document et parer ainsi à la variabilité du contenu des documents, notamment comptables. Based on the automatic construction of models relating to each metadata by supervised machine learning, the method according to the invention is effective for processing any type of document and thus countering the variability of the content of documents, in particular accounting documents.
La constitution d’une base d’apprentissage suffisamment exhaustive permet d’assurer que les modèles offrent une performance en accord avec les besoins des utilisateurs. En particulier, l’utilisateur doit trouver un bénéfice en simplicité et en efficacité qui compensera les situations dans lesquelles l’extraction des métadonnées automatique de la pièce comptable produira un résultat partiel. The constitution of a sufficiently exhaustive learning base makes it possible to ensure that the models offer a performance in accordance with the needs of the users. In particular, the user must find a benefit in simplicity and efficiency that will compensate for situations in which the automatic extraction of metadata from the accounting document will produce a partial result.
Le principe de l’invention repose sur le fait que chaque émetteur d’une pièce comptable présente son contenu d’une manière structurée et cohérente. L’invention consiste à identifier statistiquement la structure des informations contenues dans les pièces comptables produites par un émetteur et à la généraliser pour être ensuite en mesure de reconnaître les informations contenues dans toutes les pièces comptables émises par un même émetteur. Par exemple, un détaillant émet un ticket de caisse qui contient le nom de sa société, le numéro de TVA, les articles achetés, les taux de TVA appliqués pour chaque article, le total de la transaction, le vendeur, le mode de règlement, l’identification du mode de règlement, l’adresse de la société. L’invention décrite dans ce brevet doit permettre d’identifier sur un petit nombre de tickets toutes les informations précédemment décrites puis d’être en mesure de les identifier pour tout ticket émis par ce détaillant. Cette opération doit notamment permettre d’identifier tous les articles vendus, quelle que soit leur nombre, tous les taux de TVA, tous les modes de règlement tels que cash, carte bancaire, carte de payement. The principle of the invention is based on the fact that each issuer of an accounting document presents its content in a structured and coherent manner. The invention consists in statistically identifying the structure of the information contained in the accounting documents produced by an issuer and in generalizing it in order to then be able to recognize the information contained in all the accounting documents issued by the same issuer. For example, a retailer issues a receipt that contains the name of his company, the VAT number, the items purchased, the VAT rates applied for each item, the transaction total, the seller, the method of payment, the identification of the mode of payment, the address of the company. The invention described in this patent must make it possible to identify on a small number of tickets all the information previously described and then to be able to identify them for any ticket issued by this retailer. This operation must in particular make it possible to identify all the items sold, whatever their number, all VAT rates, all payment methods such as cash, bank card, payment card.
Selon une caractéristique de l’invention, le procédé comprend une étape de sélection d’un nombre prédéterminé de documents de référence dans un ensemble initial de documents. According to one characteristic of the invention, the method comprises a step of selecting a predetermined number of reference documents from an initial set of documents.
Selon un aspect de l’invention, la sélection du nombre prédéterminé de documents dans un ensemble initial de documents est réalisée manuellement par un opérateur. According to one aspect of the invention, the selection of the predetermined number of documents in an initial set of documents is carried out manually by an operator.
Avantageusement, le procédé comprend une étape préliminaire de numérisation du document cible par reconnaissance optique de caractères pour permettre une lecture textuelle. Selon un aspect de l’invention, le procédé comprend une étape de marquage de chaque métadonnée identifiable dans chaque document sélectionné, de préférence manuellement par un opérateur. Advantageously, the method comprises a preliminary step of digitizing the target document by optical character recognition to allow textual reading. According to one aspect of the invention, the method comprises a step of marking each piece of identifiable metadata in each selected document, preferably manually by an operator.
Avantageusement, le procédé comprend une étape d’enregistrement dans une zone mémoire des modèles spécifiques générés. Advantageously, the method includes a step of recording in a memory zone the specific models generated.
De préférence, la production (génération) automatique de la base de données d’apprentissage à partir du modèle générique généré comprend la génération d’au moins cent documents d’apprentissage, de préférence au moins mille, de préférence encore au moins dix-mille. Preferably, the automatic production (generation) of the training database from the generated generic model comprises the generation of at least one hundred training documents, preferably at least one thousand, more preferably at least ten thousand .
Selon un aspect de l’invention, chaque type de métadonnées est associé de manière aléatoire à une valeur. According to one aspect of the invention, each type of metadata is randomly associated with a value.
De manière avantageuse, chaque document de la pluralité de documents d’apprentissage comprend tous les types de métadonnées du modèle générique généré. Advantageously, each document of the plurality of training documents includes all the types of metadata of the generated generic model.
Avantageusement encore, le procédé comprend une étape de filtrage pour s’assurer que chaque document comprend au maximum une métadonnée de chaque type. Advantageously, the method includes a filtering step to ensure that each document includes at most one metadata of each type.
De préférence, un réseau de neurones est dédié pour générer chaque modèle spécifique. Preferably, a neural network is dedicated to generate each specific model.
Dans un mode de réalisation, la fenêtre glissante glisse d’un caractère à chaque itération. In one embodiment, the sliding window slides one character on each iteration.
De préférence, la taille de la fenêtre glissante est d’au moins vingt caractères, de préférences au moins cinquante caractères, par exemple cent caractères. Preferably, the size of the sliding window is at least twenty characters, preferably at least fifty characters, for example one hundred characters.
L’invention concerne également un produit programme d’ordinateur caractérisé en ce qu’il comporte un ensemble d’instructions de code de programme qui, lorsqu’elles sont exécutées par un ou plusieurs processeurs, configurent le ou les processeurs pour mettre en œuvre un procédé tel que présenté précédemment. The invention also relates to a computer program product characterized in that it comprises a set of program code instructions which, when executed by one or more processors, configure the processor or processors to implement a process as presented above.
L’invention concerne également un module d’extraction de données dans un document cible textuellement numérisé, ledit module d’extraction étant configuré pour mettre en œuvre certaines étapes du procédé tel que présenté précédemment. The invention also relates to a module for extracting data from a textually digitized target document, said extraction module being configured to implement certain steps of the method as presented above.
L’invention concerne également un système comprenant un module de capture d’images, un module de gestion, un module de reconnaissance de caractères, un module d’extraction tel que présenté précédemment, une zone mémoire et un écran. The invention also relates to a system comprising an image capture module, a management module, a character recognition module, an extraction module as presented previously, a memory zone and a screen.
Brève description des dessins Brief description of the drawings
La figure 1 illustre schématiquement une forme de réalisation du système selon l’invention. Figure 1 schematically illustrates an embodiment of the system according to the invention.
La figure 2 illustre un exemple d’image d’un document de référence.Figure 2 shows an example image of a reference document.
La figure 3 illustre un mode de réalisation de la phase d’apprentissage.Figure 3 illustrates an embodiment of the learning phase.
La figure 4 illustre un exemple d’apprentissage par réseaux de neurones à partir d’une fenêtre glissante. Figure 4 illustrates an example of neural network learning from a sliding window.
La figure 5 illustre décrit les sous-étapes d’entrainement de l’exemple de la figure 4. Figure 5 illustrates the training substeps of the example in Figure 4.
La figure 6 illustre un exemple de codage par position des caractères encadrés par la balise <total>. Figure 6 illustrates an example of encoding by position of the characters framed by the <total> tag.
La fenêtre 7 illustre deux exemples de profils de probabilité moyenne de prédiction d’une métadonnée à partir de caractères détectés. Window 7 illustrates two examples of profiles of average probability of prediction of a metadata from detected characters.
La figure 8 illustre un mode de réalisation de la phase d’exploitation.Figure 8 illustrates an embodiment of the exploitation phase.
La figure 9 illustre un exemple d’identification de métadonnées à partir de profils de probabilités de prédiction des caractères détectés. Figure 9 illustrates an example of metadata identification from prediction probability profiles of detected characters.
La figure 10 illustre un exemple d’image d’un document permettant l’ajout manuel d’une métadonnée dans un champ dédié. Figure 10 illustrates an example of an image of a document allowing the manual addition of metadata in a dedicated field.
Description détaillée detailed description
On a représenté à la figure 1 un exemple schématique fonctionnel d’une forme de réalisation du système 1 selon l’invention. I. Système 1 There is shown in Figure 1 a functional schematic example of an embodiment of the system 1 according to the invention. I. System 1
Le système 1 permet d’extraire de manière automatique une ou plusieurs données d’un document dit « cible » tel que, par exemple, un document comptable, notamment de type facture ou facturette, ou tout autre document. Dans un document cible, chaque donnée est caractérisée par son type et éventuellement son nom. Le type d’une donnée peut être représenté par une métadonnée pour identifier ledit type de manière algorithmique ou informatique de manière connue en soi. Le rôle et le traitement de ces métadonnées sera mieux compris à la lumière de la description qui sera faite ci-après. The system 1 makes it possible to automatically extract one or more data from a so-called “target” document such as, for example, an accounting document, in particular of the invoice or receipt type, or any other document. In a target document, each data is characterized by its type and possibly its name. The type of data can be represented by metadata to identify said type algorithmically or by computer in a manner known per se. The role and processing of these metadata will be better understood in the light of the description which will be given below.
Le système 1 comprend un module de capture d’images 10, un module de gestion 20, un module de reconnaissance de caractères 30, un module d’extraction 40, une zone mémoire 50 et un écran 60. System 1 comprises an image capture module 10, a management module 20, a character recognition module 30, an extraction module 40, a memory zone 50 and a screen 60.
Le module de capture d’images 10, le module de gestion 20, le module de reconnaissance de caractères 30, le module d’extraction 40, la zone mémoire 50 et l’écran 60 peuvent être mis en œuvre par une même entité physique ou bien par des entités physiques distinctes. The image capture module 10, the management module 20, the character recognition module 30, the extraction module 40, the memory zone 50 and the screen 60 can be implemented by the same physical entity or well by separate physical entities.
De préférence, comme dans l’exemple illustré sur la figure 1 , le module de capture d’images 10 est mis en œuvre par un première entité physique, le module de gestion 20, le module de reconnaissance de caractères 30, le module d’extraction 40 et la zone mémoire 50 sont mis en œuvre par une deuxième entité physique, par exemple un serveur 2 ou un ordinateur, et l’écran 60 constitue une troisième entité physique, les trois entités étant connectées entre elles de manière filaire, sans fil ou via un ou plusieurs réseaux de communication. Preferably, as in the example illustrated in FIG. 1, the image capture module 10 is implemented by a first physical entity, the management module 20, the character recognition module 30, the extraction 40 and the memory zone 50 are implemented by a second physical entity, for example a server 2 or a computer, and the screen 60 constitutes a third physical entity, the three entities being connected together by wire, wireless or via one or more communication networks.
Module de capture d’images 10 Image capture module 10
Le module de capture d’images 10 est configuré pour générer des images de documents. Ces documents peuvent être des documents de références ou des documents cibles, comme cela sera expliqué ci-après. The image capture module 10 is configured to generate document images. These documents can be reference documents or target documents, as will be explained below.
Le module de capture d’images 10 peut par exemple être un scanner manuel, un scanner automatique, l’appareil photo d’un smartphone, un appareil photo et en général tout appareil capable de générer une image de la pièce comptable et d’en produire un fichier numérique, par exemple au format JPEG (Joint Photographic Expert Group), TIFF, BMP (BitMaP) ou PDF (Packet Data Format) ou tout autre format adapté. Parmi les dispositifs à balayage, on inclut les scanners connectés directement à un ordinateur, les scanners partagés connectés sur un ordinateur via un réseau et les scanners intelligents comprenant une fonctionnalité de calcul intégrée. La capture à partir de smartphones avec un envoi direct vers des systèmes de stockage tels que Dropbox®, Trésorit®, OneDrive® sont utilisables. The image capture module 10 can for example be a manual scanner, an automatic scanner, the camera of a smartphone, a camera and in general any device capable of generating an image of the accounting document and of produce a digital file, for example in JPEG format (Joint Photographic Expert Group), TIFF, BMP (BitMaP) or PDF (Packet Data Format) or any other suitable format. Scanning devices include scanners connected directly to a computer, shared scanners connected to a computer via a network, and smart scanners with built-in computing functionality. Capture from smartphones with direct sending to storage systems such as Dropbox®, Trésorit®, OneDrive® can be used.
A l’issue de la capture d’image, la ou les images peuvent être transmises au module de gestion 20, qui les stockent dans la zone mémoire 50 ou les transfèrent au module de reconnaissance de caractères 30, ou directement au module de reconnaissance de caractères 30. At the end of the image capture, the image(s) can be transmitted to the management module 20, which stores them in the memory zone 50 or transfers them to the character recognition module 30, or directly to the character recognition module. 30 characters.
Module de gestion 20 Management module 20
Le module de gestion 20 est configuré pour contrôler les différentes interactions avec le module de capture d’images 10, avec le module de reconnaissance de caractères 30, avec le module d’extraction 40, avec la zone mémoire et avec l’écran 60. Le module de gestion 20 peut comprendre la zone mémoire 50 ou être relié (directement ou à distance) à la zone mémoire 50. The management module 20 is configured to control the various interactions with the image capture module 10, with the character recognition module 30, with the extraction module 40, with the memory zone and with the screen 60. The management module 20 can include the memory area 50 or be linked (directly or remotely) to the memory area 50.
Afin de permettre les interactions avec l’utilisateur via l’écran 60, le module de gestion 20 comprend une interface utilisateur (Ul ou User Interface). De préférence, cette interface utilisateur fonctionne à l’intérieur d’un navigateur web tel que par exemple Google Chrome®, Firefox®, Microsoft Edge®, Safari® ou tout navigateur standard disponible sur le marché ou au niveau de l’état de l’art. In order to allow interactions with the user via the screen 60, the management module 20 comprises a user interface (UI or User Interface). Preferably, this user interface operates within a web browser such as for example Google Chrome®, Firefox®, Microsoft Edge®, Safari® or any standard browser available on the market or at state level. 'art.
Le module de gestion 20 est configuré pour permettre la sélection, de préférence manuellement par un opérateur via l’interface utilisateur, d’un nombre prédéterminé de documents, dits « de référence », dans un ensemble initial de documents. The management module 20 is configured to allow the selection, preferably manually by an operator via the user interface, of a predetermined number of documents, called "reference", in an initial set of documents.
Le module de gestion 20 est configuré pour permettre le marquage, par un opérateur via l’interface utilisateur, de chaque métadonnée identifiable dans chaque document de référence sélectionné. Module de reconnaissance de caractères 30 The management module 20 is configured to allow the marking, by an operator via the user interface, of each identifiable piece of metadata in each selected reference document. 30 Character Recognizer
Le module de reconnaissance de caractères 30 est configuré pour coder un document cible sous forme textuelle par reconnaissance optique de caractères (ROC), appelée Optical Character Recognition (OCR) en langue anglaise. The character recognition module 30 is configured to encode a target document in textual form by optical character recognition (OCR), called Optical Character Recognition (OCR) in English.
La reconnaissance optique de caractères est un procédé informatique pour la traduction d'images de textes imprimés ou dactylographiés en fichiers de texte. Ce procédé est mis en œuvre par un logiciel permettant de récupérer le texte dans l'image d'un texte imprimé et de le sauvegarder dans un fichier pouvant être exploité dans un traitement de texte pour enrichissement, et stocké dans une base de données ou sur un autre support exploitable par un système informatique. Optical character recognition is a computer-based process for translating images of printed or typed text into text files. This process is implemented by software making it possible to recover the text in the image of a printed text and to save it in a file which can be used in a word processor for enrichment, and stored in a database or on another medium usable by a computer system.
Les caractères extraits de l’image par le module de reconnaissance de caractères 30 sont transférés vers le module d’extraction 40 via le module de gestion (ou alternativement directement). The characters extracted from the image by the character recognition module 30 are transferred to the extraction module 40 via the management module (or alternatively directly).
Module d’extraction 40 Extraction module 40
Le module d’extraction 40 est configuré pour analyser les caractères fournis par le module de reconnaissance de caractères 30. A cette fin, le module d’extraction 40 peut être mis en œuvre par un ordinateur, par un serveur, par une plateforme ou tout dispositif adapté comprenant un processeur ou plusieurs processeurs permettant le traitement des étapes comme cela sera décrit ci- après. The extraction module 40 is configured to analyze the characters provided by the character recognition module 30. To this end, the extraction module 40 can be implemented by a computer, by a server, by a platform or any suitable device comprising a processor or several processors allowing the processing of the steps as will be described below.
Le module d’extraction 40 est configuré pour générer de manière automatique un modèle générique à partir d’une pluralité de documents dits « marqués ». Les documents marqués correspondent à des documents de référence comprenant chacun au moins une métadonnée qui a été marquée par un opérateur via le module de gestion 20. The extraction module 40 is configured to automatically generate a generic model from a plurality of so-called “marked” documents. The marked documents correspond to reference documents each comprising at least one piece of metadata which has been marked by an operator via the management module 20.
Le modèle générique généré par le module d’extraction 40 liste l’ensemble des métadonnées marquées dans différents documents de référence par l’opérateur. Le module d’extraction 40 est configuré pour générer de manière automatique une base de données dite « d’apprentissage » à partir du modèle générique généré. Ceci est réalisé par un générateur qui produit de multiples exemples à partir du « modèle générique ». Le générateur est donc une sorte de simulateur qui va produire tout un ensemble de documents différents basés sur le modèle générique. The generic model generated by the extraction module 40 lists all the metadata marked in various reference documents by the operator. The extraction module 40 is configured to automatically generate a so-called “learning” database from the generated generic model. This is achieved by a generator which produces multiple examples from the "generic model". The generator is therefore a kind of simulator which will produce a whole set of different documents based on the generic model.
La base de données d’apprentissage comprend donc un nombre important de documents dits « d’apprentissage », de préférence au moins plusieurs centaines ou plusieurs milliers, comprenant chacun tout ou partie des types de métadonnées du modèle générique, chaque type de métadonnées étant associé à une valeur de donnée générée aléatoirement. The learning database therefore comprises a large number of so-called "learning" documents, preferably at least several hundred or several thousand, each comprising all or part of the types of metadata of the generic model, each type of metadata being associated to a randomly generated data value.
Le module d’extraction 40 est configuré pour générer une pluralité de modèles spécifiques par entrainement d’une pluralité de réseaux de neurones en même nombre à partir de la base d’apprentissage, l’entrainement de chaque réseau de neurones entraînant la génération d’un modèle spécifique représentatif d’un type de métadonnée listé dans le modèle générique. Par « même nombre », on entend qu’un réseau de neurones est dédié à un et un seul modèle spécifique. The extraction module 40 is configured to generate a plurality of specific models by training a plurality of neural networks in the same number from the learning base, the training of each neural network resulting in the generation of a specific model representative of a type of metadata listed in the generic model. By “same number”, we mean that a neural network is dedicated to one and only one specific model.
Le module d’extraction 40 est configuré pour enregistrer les modèles spécifiques générés dans la zone mémoire 50. The extraction module 40 is configured to save the specific models generated in the memory area 50.
Le module d’extraction 40 est configuré pour procéder à une lecture textuelle et séquentielle d’un document cible à l’aide d’une fenêtre glissante et pour calculer, pour chaque caractère de ladite fenêtre glissante et pour chaque modèle spécifique, la probabilité d’appartenance dudit caractère à la métadonnée correspondant au modèle spécifique. The extraction module 40 is configured to carry out a textual and sequential reading of a target document using a sliding window and to calculate, for each character of said sliding window and for each specific model, the probability of belonging of said character to the metadata corresponding to the specific model.
Le module d’extraction 40 est configuré pour identifier, dans la fenêtre glissante, le modèle spécifique pour lequel la moyenne des probabilités calculées pour chaque caractère d’au moins une série de caractères est supérieure à un seuil prédéterminé. The extraction module 40 is configured to identify, in the sliding window, the specific model for which the mean of the probabilities calculated for each character of at least one series of characters is greater than a predetermined threshold.
Le module d’extraction 40 est configuré pour déterminer la métadonnée associée au modèle spécifique identifié. Zone mémoire 50 The extraction module 40 is configured to determine the metadata associated with the specific model identified. Memory area 50
La zone mémoire 50 est comprise dans le module de gestion 20 ou est reliée (directement ou à distance) au module de gestion 20 afin de stocker les différents documents numériques utilisés lors de la mise en œuvre de l’invention, notamment les documents de références, les documents marqués, le modèle générique, les documents d’apprentissage, les modèles spécifiques et les documents cibles. The memory zone 50 is included in the management module 20 or is connected (directly or remotely) to the management module 20 in order to store the various digital documents used during the implementation of the invention, in particular the reference documents , marked documents, generic model, learning documents, specific models and target documents.
La zone mémoire 50 peut par exemple être un disque dur sur un ordinateur local, sur un serveur de fichier, sur un service cloud tel que Dropbox®, S3®, Box®, OneDrive® et en général tout système de stockage qui offre une interface de gestion de type Application Programming Interface (API). The memory zone 50 can for example be a hard disk on a local computer, on a file server, on a cloud service such as Dropbox®, S3®, Box®, OneDrive® and in general any storage system which offers an interface management type Application Programming Interface (API).
Ecran 60 Screen 60
L’écran 60 est connecté au module de gestion 20 afin d’afficher les documents, commandes et résultats nécessaires à la mise en œuvre de l’invention. The screen 60 is connected to the management module 20 in order to display the documents, commands and results necessary for the implementation of the invention.
L’écran 60 peut être de tout type : un écran d’affichage simple, un écran tactile ou tout écran adapté. The screen 60 can be of any type: a simple display screen, a touch screen or any suitable screen.
II. Exemple de mise en œuyre II. Example of implementation
Dans l’exemple non limitatif qui sera décrit ci-après, les documents cibles traités sont des facturettes de type tickets de caisse comportant plusieurs types de données associées à différentes métadonnées. A titre d’exemple, l’une des données peut être une somme totale de valeurs numériques de type « prix », notée « SOMME CHF » (somme en francs suisses) dans la facturette, et qui sera identifiée par une métadonnée comportant une balise de début, notée <total>, et une balise de fin, notée </total>. Dans ce cas, la valeur de la donnée sera de type numérique et sera indiquée entre la balise de début et la balise de fin. Par exemple, pour une somme totale de 2914, 85 CHF sur la facturette, le module d’extraction 40 notera ladite somme <total>2914,85</total>. In the non-limiting example which will be described below, the target documents processed are slips of the cash receipt type comprising several types of data associated with different metadata. By way of example, one of the data may be a total sum of numerical values of the "price" type, noted "SOMME CHF" (sum in Swiss francs) in the slip, and which will be identified by metadata including a tag start tag, denoted <total>, and an end tag, denoted </total>. In this case, the value of the data will be of numeric type and will be indicated between the start tag and the end tag. For example, for a total sum of 2914.85 CHF on the slip, the extraction module 40 will note said sum <total>2914.85</total>.
La mise en œuvre du procédé selon l’invention suppose deux phases distinctes : une phase d’apprentissage et une phase d’exploitation. Phase d’apprentissage The implementation of the method according to the invention assumes two distinct phases: a learning phase and an operating phase. Learning phase
La phase d’apprentissage est une phase préparatoire qui consiste en la sélection d’un ensemble de documents dits « de référence », le marquage manuel par un opérateur desdits documents de référence, la production d’un modèle générique à partir des documents marqués, la génération d’un ensemble de documents dits « d’apprentissage » à partir du document générique conçu et l’entrainement de réseaux de neurones à partir des documents d’apprentissage générés afin de créer des modèles spécifiques propres chacun à un type de métadonnées. The learning phase is a preparatory phase which consists of the selection of a set of so-called "reference" documents, the manual marking by an operator of said reference documents, the production of a generic model from the marked documents, the generation of a set of so-called “learning” documents from the generic document designed and the training of neural networks from the generated learning documents in order to create specific models each specific to a type of metadata.
Cette phase d’apprentissage peut par exemple être réalisée pour chaque groupe de documents cibles similaires, notamment associés à un même éditeur desdits documents. This learning phase can for example be carried out for each group of similar target documents, in particular associated with the same publisher of said documents.
Marquage Marking
Tout d’abord, à l’étape E0, l’utilisateur du système 1 dispose d’un ensemble de documents de référence, par exemple sélectionnés par l’utilisateur ou à disposition de l’utilisateur. Ces documents sont choisis de préférence de manière à présenter différentes formes et/ou différentes types de données d’un même éditeur. First of all, at step E0, the user of system 1 has a set of reference documents, for example selected by the user or available to the user. These documents are preferably chosen so as to present different forms and/or different types of data from the same publisher.
Les documents de référence peuvent être sous forme papier ou électronique. Dans leur forme électronique, les documents sont des fichiers, par exemple des images de type JPEG ou des fichiers de type PDF. Dans leur forme papier, les documents de référence sont soumis au module de capture d’images 10 qui les transforme en fichiers informatiques, par exemple de type JPEG ou PDF. Reference documents can be in paper or electronic form. In their electronic form, documents are files, for example JPEG-type images or PDF-type files. In their paper form, the reference documents are submitted to the image capture module 10 which transforms them into computer files, for example of the JPEG or PDF type.
Une fois numérisés, s’ils ne l’étaient pas, les documents de référence sont envoyés au module de reconnaissance de caractères 30 qui les code sous forme textuelle lors d’une étape E1 de reconnaissance optique de caractères. Once digitized, if they were not, the reference documents are sent to the character recognition module 30 which encodes them in textual form during a step E1 of optical character recognition.
Ensuite, dans une étape E2, chaque document de référence codé sous forme textuelle est présenté à l’utilisateur via l’écran 60 pour lui permettre de désigner simplement les métadonnées présentes dans ledit document de référence. Le principe de l’analyse consiste à extraire automatiquement des métadonnées identifiables dans de document de référence sous forme textuelle. Dans l’exemple décrit ci-après, la présente invention offre l’extraction de neuf métadonnées identifiables qui sont : Then, in a step E2, each reference document coded in textual form is presented to the user via the screen 60 to allow him to simply designate the metadata present in said reference document. The principle of the analysis consists in automatically extracting identifiable metadata in the reference document in textual form. In the example described below, the present invention offers the extraction of nine identifiable metadata which are:
• Date : la date d’émission du document de référence ; • Date: the date of issue of the reference document;
• Identifier : le numéro de TVA de l’émetteur du document de référence ;• Identify: the VAT number of the issuer of the reference document;
• Total : le montant total du document de référence ; • Total: the total amount of the reference document;
• Item-name : la description d’une ligne du document de référence ; • Item-name: the description of a line of the reference document;
• ltem_value : la valeur correspondant à l’item-name du document de référence ; • ltem_value: the value corresponding to the item-name of the reference document;
• Item-taxcode : le code de TVA correspondant à l’item-name ; • Item-taxcode: the VAT code corresponding to the item-name;
• Taxitem-code : le code correspondant à un pourcentage de TVA ; • Taxitem-code: the code corresponding to a VAT percentage;
• Taxitem-value : le montant de de la TVA correspondant à un Taxitem- code ; • Taxitem-value: the amount of VAT corresponding to a Taxitem-code;
• Taxitem-percentage : le pourcentage de la TVA correspondant à un Taxitem-code ; • Taxitem-percentage: the VAT percentage corresponding to a Taxitem-code;
Dans cet exemple, les métadonnées identifiables sont de deux types: In this example, identifiable metadata is of two types:
• Individuelles: Date, Identifier, Total, Item-name, Item-value, Item-taxcode, taxitem-code, taxitem-value, taxitem-percentage • Individual: Date, Identifier, Total, Item-name, Item-value, Item-taxcode, taxitem-code, taxitem-value, taxitem-percentage
• Composées : Items et Taxitems qui sont respectivement composées de plusieurs Item et taxitem. • Composites: Items and Taxitems which are respectively composed of several Items and taxitems.
En référence à la figure 2, l’image du document de référence affichée sur l’écran 60 via l’interface utilisateur graphique 400 est disponible dans le champ 435 pour permettre à l’utilisateur de le reconnaître simplement. Les données extraites après l’étape d’extraction de texte sont présentées dans le champ 440. Les métadonnées à identifier sont présentées dans les champs 410 (Date), 415 (Identifier), 423 (Total) pour les métadonnées de type individuelles, 420 (Item-name), 421 (Item-value), 422 (Item -tax-code) pour les métadonnées de type Items et 425 (taxitem-code), 426 (taxitem-value), 427 (taxitem- percentage). La page peut être sauvegardée via la fonction « save » 430. Le champ 450 est destiné à l’affichage de messages qui résultent de traitement de cohérence sur les métadonnées de la pièce comptable. Ce traitement ne sera pas décrit dans le cadre de la présente invention. Referring to Figure 2, the image of the reference document displayed on screen 60 via graphical user interface 400 is available in field 435 to allow the user to simply recognize it. Data extracted after the text extraction step is presented in field 440. Metadata to be identified is presented in fields 410 (Date), 415 (Identify), 423 (Total) for individual type metadata, 420 (Item-name), 421 (Item-value), 422 (Item -tax-code) for Items type metadata and 425 (taxitem-code), 426 (taxitem-value), 427 (taxitem- percentage). The page can be saved via the “save” function 430. Field 450 is intended for the display of messages which result from consistency processing on the metadata of the accounting document. This treatment will not be described within the scope of the present invention.
Dans une étape E3, l’utilisateur va exploiter l’interface 400 pour associer les données identifiées dans le champ 440 avec les métadonnées à identifier (étape dite « de marquage »). A cet effet, l’utilisateur effectue une sélection d’une partie de texte du champ 440 et un glisser-déposer de ce texte dans une des métadonnées à identifier. In a step E3, the user will use the interface 400 to associate the data identified in the field 440 with the metadata to be identified (so-called “marking” step). To this end, the user selects a portion of text from field 440 and drags and drops this text into one of the metadata to be identified.
Par exemple sur la Figure 6, la donnée 20.12.2018 présente dans le champ 440 de l’interface 400 a été glissée-déposée dans la métadonnée Date 410. Les documents marqués sont enregistrés dans la zone mémoire 50 dans une étape E4. For example in Figure 6, the data 20.12.2018 present in the field 440 of the interface 400 has been dragged and dropped into the Date metadata 410. The marked documents are saved in the memory zone 50 in a step E4.
Un extrait de la base de données d’un document exemple avec les métadonnées identifiées est présenté dans le Tableau 1 suivant : An extract from the database of an example document with the metadata identified is shown in the following Table 1:
Figure imgf000023_0001
Figure imgf000023_0001
Table 1 Chart 1
Les métadonnées sont identifiées grâce aux balises qui leur correspondent. Chaque métadonnée encadre la donnée par une balise ouvrante qui se termine par une balise fermante. Par exemple la métadonnée « date » est stockée comme <date>20.12.2018</date>. Metadata are identified by the tags that correspond to them. Each metadata surrounds the data with an opening tag that ends with a closing tag. For example the "date" metadata is stored as <date>20.12.2018</date>.
Ce processus d’identification est répété pour l’ensemble des documents de référence disponibles afin d’obtenir un ensemble de documents de référence marqués. Modèle générique This identification process is repeated for all available reference documents to obtain a set of marked reference documents. Generic model
Une fois les documents de référence marqués, une étape E5 permet de générer une synthèse de l’ensemble des documents de référence marqués sous la forme d’un document appelé « modèle générique » correspondant dans cet exemple à un modèle de document comptable générique. Le module d’extraction 40 construit, c’est à dire génère, de manière automatique le modèle générique à partir de la pluralité des documents marqués. Le modèle générique liste l’ensemble des métadonnées marquées par l’utilisateur dans les documents de référence. Ce modèle générique est constitué à partir d’une fusion de différents contenus pour produire un modèle génératif des pièces comptables. Il consiste à lister exhaustivement et compter les occurrences de chaque ligne du document de référence. Once the reference documents have been marked, a step E5 makes it possible to generate a summary of all the reference documents marked in the form of a document called “generic model” corresponding in this example to a generic accounting document model. The extraction module 40 builds, that is to say generates, automatically the generic model from the plurality of marked documents. The generic model lists all the metadata marked by the user in the reference documents. This generic model is made from a fusion of different content to produce a generative model of accounting documents. It consists of exhaustively listing and counting the occurrences of each line of the reference document.
Par exemple, dans le Tableau 2 ci-après qui illustre un exemple de modèle générique, {{counts:22:34}}coop^| signifie que la ligne « coop^j » est apparue 22 fois sur les 34 exemples identifiés manuellement par l’utilisateur, la ligne {{counts: 1 :34}}coo^| est apparue 1 fois sur les 34. La ligne {{counts: 3: 34}}cood^| est apparue 3 fois sur les 34 exemples :
Figure imgf000024_0001
Figure imgf000025_0001
<itemxname>{{text+}}</name> {{decimal}}
For example, in Table 2 below which illustrates an example of a generic pattern, {{counts:22:34}}coop^| means that the line “coop^j” appeared 22 times out of the 34 examples manually identified by the user, the line {{counts: 1:34}}coo^| appeared 1 time out of 34. The line {{counts: 3: 34}}cood^| appeared 3 times out of the 34 examples:
Figure imgf000024_0001
Figure imgf000025_0001
<itemxname>{{text+}}</name> {{decimal}}
<value>{{decimal}}</value><taxcode>{{int:l}}</taxcodex/item>!]<value>{{decimal}}</value><taxcode>{{int:l}}</taxcodex/item>!]
<itemxname>{{text+}}</name> i {{decimal}}<itemxname>{{text+}}</name> i {{decimal}}
<value>{{decimal}}</valuextaxcode>{{int:l}}</taxcodex/item>!]<value>{{decimal}}</valuextaxcode>{{int:l}}</taxcodex/item>!]
<itemxname>{{text+}}</name> {{decimal}} <value>{{decimal}}<itemxname>{{text+}}</name> {{decimal}} <value>{{decimal}}
<taxcode>{{int:l}}</taxcodex/item>!] <taxcode>{{int:l}}</taxcodex/item>!]
<itemxname>{{text+}}</name> {{decimal}} <value>{{decimal}}</value><itemxname>{{text+}}</name> {{decimal}} <value>{{decimal}}</value>
<taxcode>{{int:l}}</taxcode>.</item>!] <taxcode>{{int:l}}</taxcode>.</item>!]
<itemxname>{{text+}}</name>{{int:l}} {{int: l}}{{decimal}} {{decimal}}<itemxname>{{text+}}</name>{{int:l}} {{int: l}}{{decimal}} {{decimal}}
<value>{{decimal}}</value> <taxcode>i</taxcode> a</item>ü<value>{{decimal}}</value> <taxcode>i</taxcode> a</item>ü
<itemxname>{{text+}}</name> {{int:l}}{{decimal}} <value>{{decimal}}</value><itemxname>{{text+}}</name> {{int:l}}{{decimal}} <value>{{decimal}}</value>
<taxcode>{{int:l}}</taxcode>#</item>ü <taxcode>{{int:l}}</taxcode>#</item>ü
<itemxname>{{text+}}</name> : {{decimal}} {{decimal}} {{decimal}}<itemxname>{{text+}}</name>: {{decimal}} {{decimal}} {{decimal}}
<value>{{decimal}}</value> <taxcode>d</taxcode> a</itemx/items>!]<value>{{decimal}}</value> <taxcode>d</taxcode> a</itemx/items>!]
{{counts:9:34}}somme chf <total>{{decimal}}</total>ü {{counts:9:34}}sum chf <total>{{decimal}}</total>ü
{{counts:25:34}}somme che <total>{{decimal}}</total>ü {{counts:25:34}}sum of <total>{{decimal}}</total>ü
{{counts:7:34}}especes {{decimal}}!] {{counts:7:34}}species {{decimal}}!]
{{counts:7:34}}retour -{{decimal}}!] {{counts:7:34}}return -{{decimal}}!]
{{counts:22:34}}visa {{decimal}}!] {{counts:22:34}}visa {{decimal}}!]
{{counts:2:34}}tuint {{decimal}}!] {{counts:2:34}}tuint {{decimal}}!]
{{counts:l:34}}tvint {{decimal}}!] {{counts:l:34}}tvint {{decimal}}!]
{{counts: l:34}}amexco {{decimal}}!] {{counts: l:34}}amexco {{decimal}}!]
{{counts: l:34}}anexco {{decimal}}!] {{counts: l:34}}anexco {{decimal}}!]
{{counts:22:34}}debit visa credit!] {{counts:22:34}}debit visa credit!]
{{counts: 1:34}}VVVV uuuuuu uwvü {{counts: 1:34}}VVVV uuuuuu uwvü
{{counts: l:34}}manü {{counts: l:34}}manü
{{counts: l:34}}{{int:2}}ü {{counts: l:34}}{{int:2}}ü
{{counts:3:34}}xxxxxxxxxxxx{{int:4}} {{int:2}}:{{int:2}}ü {{counts:3:34}}xxxxxxxxxxxx{{int:4}} {{int:2}}:{{int:2}}ü
{{counts:2:34}}debit american express!] {{counts:2:34}}debit american express!]
{{counts: 18:34}}xxxxxxxxxxxx{{int:4}}ü {{counts: 18:34}}xxxxxxxxxxxx{{int:4}}ü
{{counts:2:34}}xxxxxxxxxxx{{int:4}}ü {{counts:2:34}}xxxxxxxxxxx{{int:4}}ü
{{counts:21:34}}{{int:2}}.{{int:2}}.{{int:4}} {{int:2}}:{{int:2}}ü{{counts:21:34}}{{int:2}}.{{int:2}}.{{int:4}} {{int:2}}:{{int:2}}ü
{{counts:3:34}}{{int:2}}.{{int:2}}.{{int:4}}!] {{counts:3:34}}{{int:2}}.{{int:2}}.{{int:4}}!]
{{counts: 17:34}}#{{int:8}}*{{int:8}}/{{int:6}}/{{int:ll}}#!] {{counts: 17:34}}#{{int:8}}*{{int:8}}/{{int:6}}/{{int:ll}}#!]
{{counts: l:34}}#{{int:8}}*{{int:8}}/{{int:2}}/{{int:ll}}#!] {{counts: l:34}}#{{int:8}}*{{int:8}}/{{int:2}}/{{int:ll}}#!]
{{counts: l:34}}#{{int:8}}-{{int:8}}/{{int:6}}/{{int:ll}}#!]{{counts: l:34}}#{{int:8}}-{{int:8}}/{{int:6}}/{{int:ll}}#!]
{{counts:2:34}}#{{int:8}}*{{int:8}}/{{int:6}}/{{int:12}}!]{{counts:2:34}}#{{int:8}}*{{int:8}}/{{int:6}}/{{int:12}}!]
{{counts:2:34}}#{{int:8}}*{{int:15}}/{{int:ll}}#!]{{counts:2:34}}#{{int:8}}*{{int:15}}/{{int:ll}}#!]
{{counts:l:34}}#{{int:8}}*{{int:8}}/{{int:2}}/{{int:ll}}*!) {{counts:l:34}}#{{int:8}}*{{int:8}}/{{int:2}}/{{int:ll}}*!)
{{counts:22:34}}total-eft chf: {{decimal}}!] {{counts:22:34}}total-eft chf: {{decimal}}!]
{{counts: l:34}}total-efi chf: {{decimal}}!] {{counts: l:34}}total-efi chf: {{decimal}}!]
{{counts: l:34}}{{int:l}}ü {{counts: l:34}}{{int:l}}ü
{{counts:l:34}}.. - Ü {{counts:l:34}}.. - Ü
{{counts: l:34}}total-eft che: {{decimal}}!] {{counts: l:34}}total-eft che: {{decimal}}!]
{{counts:l:34}} - Ü {{counts:l:34}} - Ü
{{counts:30:34}}coop société cooperative,<ident>che-{{int:3}}.{{int:3}}.{{int:3}}</ident> tvaü{{counts:30:34}}coop cooperative society,<ident>che-{{int:3}}.{{int:3}}.{{int:3}}</ident> tvaü
{{counts:l:34}}coop société cooperative,<ident>che-{{int:3}}.{{int:3}}.{{int:3}}</ident> ivaü
Figure imgf000027_0002
{{counts:l:34}}coop cooperative society,<ident>che-{{int:3}}.{{int:3}}.{{int:3}}</ident> ivaü
Figure imgf000027_0002
{{counts:l:34}}cd tva% jotal tvaü {{counts:l:34}}cd vat% jotal vat
{{counts:l:34}}cd tva% total ivaü {{counts:l:34}}cd vat% total ivaü
{{counts:l:34}}cd ta% total tvaü {{counts:l:34}}cd ta% total vat
{{counts:l:34}}cd tax totals {{counts:l:34}}cd tax totals
{{counts:l:34}}cd tva totals {{counts:l:34}}cd vat totals
<taxitemsxtaxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage><taxitemsxtaxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage>
{{decimal}} <taxvalue>{{decimal}}</taxvaluex/taxitem>{{decimal}} <taxvalue>{{decimal}}</taxvaluex/taxitem>
<taxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage> {{decimal}}<taxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage> {{decimal}}
<taxvalue>{{decimal}}</taxvaluex/taxitem><taxvalue>{{decimal}}</taxvaluex/taxitem>
<taxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage>{{decimal}}<taxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage>{{decimal}}
<taxvalue>{{decimal}}</taxvaluex/taxitem> <taxvalue>{{decimal}}</taxvaluex/taxitem>
<taxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage>. <taxitemxcode>{{int:l}}</code> <percentage>{{decimal}}</percentage>.
{{decimal}} <taxvalue>{{decimal}}</taxvaluex/taxitemx/taxitems>ü{{decimal}} <taxvalue>{{decimal}}</taxvaluex/taxitemx/taxitems>ü
{{counts:3:34}}vous econonisez {{decimal}}!] {{counts:3:34}}you save {{decimal}}!]
{{counts:2:34}}vous econopisez {{decimal}}!] {{counts:2:34}}you save {{decimal}}!]
{{counts:18:34}}nombre d'articles achetés!] {{counts:18:34}}number of items purchased!]
{{counts:l:34}}nombre d'articles achetés >ü {{counts:l:34}}number of items purchased >ü
{{counts:l:34}}nonbre d'article {{counts:l:34}}item count
{{counts:22:34}}no supercard: }ü {{counts:22:34}}no supercard: }ü
{{counts:l:34}}no supercard:{{i solde!] {{counts:l:34}}no supercard:{{i sale!]
{{counts:l:34}}no supercard:{{i solde {{int:3}}ü{{counts:l:34}}no supercard:{{i balance {{int:3}}ü
{{counts:l:34}}no supercard: } solde {{int:4}}ü{{counts:l:34}}no supercard: } balance {{int:4}}ü
{{counts:l:34}}no supercard:{{i solde {{int:5}}ü{{counts:l:34}}no supercard:{{i balance {{int:5}}ü
{{counts:l:34}}akciens points {{counts:l:34}}akciens points
{{counts:l:34}}no supercard:{{i {{int:4}}ü {{counts:l:34}}no supercard:{{i {{int:4}}ü
{{counts: l:34}}no supercard:{{i {{counts: l:34}}no supercard:{{i
{{counts:2:34}}no supercaro:{{i
Figure imgf000027_0001
{{counts:2:34}}no supercaro:{{i
Figure imgf000027_0001
{{counts:l:34}}ang tens points solde {{int:4}}ü {{counts:l:34}}ang tens points balance {{int:4}}ü
{{counts:10:34}}anciens points solde {{int:4}}ü {{counts:10:34}}old balance points {{int:4}}ü
{{counts:l:34}}anciens points solde solde {{int:4}} {{int:4}}ü{{counts:l:34}}old points balance balance {{int:4}} {{int:4}}ü
{{counts:2:34}}anciens points solde!] {{counts:2:34}}old balance points!]
{{counts:l:34}}superpoints sous-/total sur excl achat* {{decimal}} solde gg{{counts:l:34}}superpoints sub-/total on excl purchase* {{decimal}} balance gg
{{int:4}}ü {{int:4}}ü
{{counts:l:34}}solde {{int:4}}ü {{counts:l:34}}balance {{int:4}}ü
{{counts:2:34}}anciens points!] {{counts:2:34}}old points!]
{{counts:l:34}}anciens points solde {{int:3}}ü {{counts:l:34}}old balance points {{int:3}}ü
{{counts:ll:34}}anciens points solde {{int:5}}ü {{counts:ll:34}}old balance points {{int:5}}ü
{{counts: 14:34}}sous-/total excl* {{decimal}} {{int:2}}ü {{counts: 14:34}}sub/total excl* {{decimal}} {{int:2}}ü
{{counts: l:34}}sous-/total.excl* {{decimal}} {{text+}}ü {{counts: l:34}}sub/total.excl* {{decimal}} {{text+}}ü
{{counts: l:34}}sous-/total excl * {{int:2}}ü {{counts: l:34}}sub/total excl * {{int:2}}ü
{{counts: l:34}}sous-/total excl * {{int: 1}}Ü {{counts: l:34}}sub/total excl * {{int: 1}}Ü
{{counts:l:34}}sous-/total excl*{{decimal}} {{int:2}} {{int:2}}ü{{counts:l:34}}sub/total excl*{{decimal}} {{int:2}} {{int:2}}ü
{{counts:l:34}}anciens sous-/points total excl* {{decimal}} {{int:5}}ü {{counts:5:34}}sous-/total excl*{{decimal}} {{int:l}}ü {{counts:l:34}}old sub/total points excl* {{decimal}} {{int:5}}ü {{counts:5:34}}sub/total excl*{{decimal}} {{int:l}}ü
{{counts:5:34}}sous-/total excl* {{decimal}}!] {{counts:5:34}}sub/total excl* {{decimal}}!]
{{counts: !:34}}{{text+}}juü {{counts: !:34}}{{text+}}juü
{{counts:13:34}}superpoints sur achatü {{counts:13:34}}superpoints on purchaseü
{{counts:l:34}}superpoints sur achat sol deü {{counts:l:34}}superpoints on purchase sol deü
{{counts:7:34}}superpoints sur achat {{int:2}}ü {{counts:7:34}}superpoints on purchase {{int:2}}ü
{{counts:2:34}}superpoints sur achat {{int:5}}ü {{counts:2:34}}superpoints on purchase {{int:5}}ü
{{counts:2:34}}superpoints sur achat {{int:4}}ü {{counts:2:34}}superpoints on purchase {{int:4}}ü
{{counts:l:34}}superpoints sur achat solde {{int:4}}ü{{counts:l:34}}superpoints on balance purchase {{int:4}}ü
{{counts:l:34}}superpoints sur achat solde {{int :2}} 1 {{counts:l:34}}superpoints on balance purchase {{int:2}} 1
{{counts:l:34}}superpoints sur achat {{int:2}}{{int:3}}51{{counts:l:34}}superpoints on purchase {{int:2}}{{int:3}}51
{{counts:l:34}}superpoints sur achat {{int:2}}{{int:4}}51 {{counts:l:34}}superpoints on purchase {{int:2}}{{int:4}}51
{{counts:4:34}}nouveaux points soldeü {{counts:4:34}}new points saleü
{{counts: l:34}}nouveaux points soldes!] {{counts: l:34}}new sale points!]
{{counts:2:34}}nouveaux points!] {{counts:2:34}}new points!]
{{counts: l:34}}nouveaux points solde.!] {{counts: l:34}}new sale points.!]
{{counts:l:34}}nouveaux points solde solde!] {{counts:l:34}}new balance points balance!]
{{counts: l:34}}nouveaux points solide!] {{counts: l:34}}new solid points!]
{{counts:6:34}}nouveaux pointssolde {{int:4}}ü {{counts:6:34}}new balancepoints {{int:4}}ü
{{counts:l:34}}servi par mme nzitaü {{counts:l:34}}served by Mrs. Nzitaü
{{counts: l:34}}nouveaux points {{int:3}}ü {{counts: l:34}}new points {{int:3}}ü
{{counts: l:34}}nouveaux points {{int:4}}ü {{counts: l:34}}new points {{int:4}}ü
{{counts:l:34}}nouveaux pointssolde solde {{int:4}}ü {{counts:l:34}}new pointsbalance balance {{int:4}}ü
{{counts:10:34}}nouveaux points solde {{int:5}}ü {{counts:10:34}}new balance points {{int:5}}ü
{{counts:l:34}}nouveaux pointssolde . {{int:5}}ü {{counts:l:34}}new balancepoints. {{int:5}}ü
{{counts:17:34}}points trophée reçus!] {{counts:17:34}}trophy points received!]
{{counts:l:34}}servi par mme perteshantü {{counts:l:34}}served by Mrs Pershantu
{{counts:2:34}}#avec superpoints mais pas de rabais!] {{counts:2:34}}#with superpoints but no discounts!]
{{counts:l:34}}*avec superpoints mais pas de rabais!] {{counts:l:34}}*with superpoints but no discounts!]
{{counts: l:34}}servi park.ciravegnaü {{counts: l:34}}servi park.ciravegnaü
{{counts:24:34}}servi par coop self-checkoutü {{counts:24:34}}served by coop self-checkoutü
{{counts:5:34}}serui par coop self-checkoutü {{counts:5:34}}serui by coop self-checkoutü
{{counts:l:34}}serul par coop self-checkoutü {{counts:l:34}}serul by coop self-checkoutü
{{counts:l:34}}serut par coop self-checkoutü {{counts:l:34}}serut by coop self-checkoutü
{{counts:25:34}}nous vous remercions de votre visiteü {{counts:25:34}}thank you for visitingü
{{counts: l:34}}{{int:l}} {{int: 1}} {{int: 1}} {{int: 1}} {{int: 1}} {{int:2}} {{int: 1}} {{int:4}} {{int: 1}}{{counts: l:34}}{{int:l}} {{int: 1}} {{int: 1}} {{int: 1}} {{int: 1}} {{int:2} } {{int: 1}} {{int:4}} {{int: 1}}
{{int: 1}} {{int: 1}} {{int:8}} {{int: 1}} {{int: 1}} {{int:l}}*{{int:2}}"ü {{int: 1}} {{int: 1}} {{int:8}} {{int: 1}} {{int: 1}} {{int:l}}*{{int:2}} "u
{{counts:l:34}}nous vous remercions de votre visite {{counts:l:34}}thank you for visiting
{{counts: l:34}}nchini {{counts: l:34}}nchini
{{counts:l:34}}looooo{{int:9}} mittiin {{int:4}} 1 {{counts:l:34}}looooo{{int:9}} mittiin {{int:4}} 1
{{counts:l:34}}"{{int:6}} {{int:4}} {{int:2}} {{int: 1}} {{int: 1}} {{int: 1}} {{int: 13}}"ü{{counts:l:34}}"{{int:6}} {{int:4}} {{int:2}} {{int: 1}} {{int: 1}} {{int: 1 }} {{int: 13}}"ü
{{counts:l:34}}"{{int:8}} {{int:2}} {{int: 1}} {{int: 1}} {{int: 1}} {{int: 15}}"ü {{counts:l:34}}"{{int:8}} {{int:2}} {{int: 1}} {{int: 1}} {{int: 1}} {{int: 15 }}"ü
{{counts: l:34}}"{{int:20}} {{int:3}}*ot {{int: l}}'{{int: l}}"{{int:l}}"ü {{counts: l:34}}"{{int:20}} {{int:3}}*ot {{int: l}}'{{int: l}}"{{int:l}}" ü
{{counts: l:34}}{{int:5}} {{int:3}} {{int:4}} {{int:8}} {{int:4}}*{{int:2}}*{{int: l}}'{{int:l}}"ü{{counts: l:34}}{{int:5}} {{int:3}} {{int:4}} {{int:8}} {{int:4}}*{{int:2 }}*{{int:l}}'{{int:l}}"ü
{{counts: l:34}}"{{int:5}} {{int:2}} {{int:l}} {{int: 13}}*{{int:l}}*{{int:2}}*{{int:2}}*{{int:2}}"5]{{counts: l:34}}"{{int:5}} {{int:2}} {{int:l}} {{int: 13}}*{{int:l}}*{{int :2}}*{{int:2}}*{{int:2}}"5]
{{counts:8:34}}nous vous renercions de votre visiteü {{counts:8:34}}we thank you for your visitü
{{counts: !:34}}{{int:10}} {{int:18}} 1
Figure imgf000029_0002
{{counts: !:34}}{{int:10}} {{int:18}} 1
Figure imgf000029_0002
Table 2 Chart 2
Pour les métadonnées composées de type Items ou Taxitems, la synthèse va produire une structure syntaxique. Par exemple, pour une métadonnée de type Items :
Figure imgf000029_0001
signifie qu’une métadonnée de type items a été lue, suivie d’une balise Item-name. A l’intérieur de la balise, la donnée est composée de plusieurs caractères de type texte. A la suite de Item-name, plusieurs espace sont été lus, une valeur numérique a été lue, puis une valeur décimale, plus plusieurs espaces, suivis d’une Item-value composée d’une valeur décimale, puis d’une item-taxcode composée d’une valeur entière. L’item se termine alors. L’analyse a également identifié un item formé d’une manière différente :
Figure imgf000030_0001
For compound metadata of the Items or Taxitems type, the synthesis will produce a syntactic structure. For example, for an Items type metadata:
Figure imgf000029_0001
means that an items type metadata has been read, followed by an Item-name tag. Inside the tag, the data is made up of several text type characters. Following Item-name, several spaces were read, a numeric value was read, then a decimal value, then several spaces, followed by an Item-value composed of a decimal value, then an item- taxcode composed of an integer value. The item then ends. The analysis also identified an item formed in a different way:
Figure imgf000030_0001
L’analyse syntaxique est réalisée de manière analogue pour les métadonnées de type Tax-items. Syntactic analysis is performed in a similar way for Tax-items type metadata.
Base de données d’apprentissage Learning database
Le module d’extraction 40 produit de manière automatique dans une étape E6 une base de données d’apprentissage à partir du modèle générique généré, ladite base de données d’apprentissage comprenant une pluralité de documents d’apprentissage comprenant chacun tout ou partie des types de métadonnées du modèle générique généré, chaque type de métadonnées étant associé à une valeur. The extraction module 40 automatically produces in a step E6 a learning database from the generated generic model, said learning database comprising a plurality of learning documents each comprising all or part of the types metadata of the generated generic model, each type of metadata being associated with a value.
La constitution d’une base d’apprentissage exhaustive ne peut pas être réalisée d’une façon manuelle car cela exigerait l’identification manuelle de métadonnées dans des centaines de pièces comptables. Une deuxième difficulté technique provient de ce constat : il faut faire appel à l’utilisateur pour identifier manuellement les métadonnées des pièces comptables mais cela ne peut être fait que de manière très limitée. Dans la pratique, un utilisateur acceptera d’analyser et identifier manuellement les métadonnées de quelques pièces comptables. Au-delà, le risque de provoquer un rejet sera très élevé et le système deviendra donc inutilisable. Dans le cadre de cette invention, l’identification et l’analyse d’un nombre restreint de métadonnées sera faite manuellement par un utilisateur afin de constituer une base d’exemples. Celle-ci sera ensuite automatiquement analysée afin de générer une base d’apprentissage beaucoup plus vaste. Celle-ci sera enfin utilisée pour générer automatiquement des modèles de métadonnées identifiables. Le processus détaillé est décrit en référence à la Figure 3. A l’issue de l’analyse complète, le modèle générique est utilisé pour générer la base de données d’apprentissage, qui est stockée dans la zone mémoire 50. Cela est réalisé en produisant des documents dits « d’apprentissage » dont le contenu est produit aléatoirement en respectant les contraintes du modèle générique. Cette méthode est rendue possible car le but poursuivi est de produire une grande quantité de documents comptables qui respectent la structure générale observée dans quelques documents et non les valeurs qu’ils contiennent. The constitution of an exhaustive learning base cannot be done manually because it would require the manual identification of metadata in hundreds of accounting documents. A second technical difficulty arises from this observation: the user must be called upon to manually identify the metadata of the accounting documents, but this can only be done in a very limited way. In practice, a user will agree to manually analyze and identify the metadata of some accounting documents. Beyond that, the risk of causing a rejection will be very high and the system will therefore become unusable. In the context of this invention, the identification and analysis of a limited number of metadata will be done manually by a user in order to constitute a base of examples. This will then be automatically analyzed to generate a much larger learning base. This will finally be used to automatically generate identifiable metadata models. The detailed process is described with reference to Figure 3. At the end of the complete analysis, the generic model is used to generate the learning database, which is stored in the memory area 50. This is achieved by producing so-called “learning” documents whose content is produced randomly while respecting the constraints of the generic model. This method is made possible because the aim is to produce a large quantity of accounting documents which respect the general structure observed in some documents and not the values which they contain.
La méthode pour générer les documents d’apprentissage consiste à choisir aléatoirement des lignes du modèle générique comme par exemple : “serui par coop self-checkout”. Dans le mode de réalisation décrit, si la ligne ne contient que des caractères, on la garde telle quelle. The method for generating the learning documents consists of randomly choosing lines from the generic model such as: “serui par coop self-checkout”. In the embodiment described, if the line only contains characters, it is kept as it is.
Toujours dans le mode de réalisation décrit, si la ligne choisie contient des codes de types, alors on génère aléatoirement des valeurs qui correspondent à ces types afin de former une séquence de caractère. Still in the embodiment described, if the chosen line contains type codes, then values are randomly generated which correspond to these types in order to form a character sequence.
Par exemple, la ligne <taxcode>{{int:1 }}</taxcode></item>^| permet de produire la séquence de caractères <taxcode>6</taxcode></item>^|. Le type {{int: 1 }} a été remplacé par la valeur 6 choisie aléatoirement. For example, the line <taxcode>{{int:1 }}</taxcode></item>^| produces the character sequence <taxcode>6</taxcode></item>^|. The type {{int: 1 }} has been replaced by the randomly chosen value 6.
A Tissue de la génération aléatoire de lignes et de contenus de lignes d’un document d’apprentissage, une étape de filtrage (non représentée) peut être réalisée pour garantir que ledit document d’apprentissage généré sera conforme. Plus précisément, le filtrage consiste à ne conserver qu’une seule occurrence de chaque métadonnée Date, Identifier, Total, Items, Taxitems, les métadonnées Item-name, ltem_value, Item-taxcode, Taxitem-code, Taxitem-value, Taxitempercentage pouvant quant à elles apparaitre en nombre quelconque. After the random generation of lines and line contents of a learning document, a filtering step (not shown) can be carried out to guarantee that said generated learning document will be compliant. More precisely, the filtering consists in keeping only one occurrence of each Date, Identifier, Total, Items, Taxitems metadata, the Item-name, ltem_value, Item-taxcode, Taxitem-code, Taxitem-value, Taxitempercentage metadata being able to to appear in any number.
Un exemple de document d’apprentissage généré par cette méthode est présenté dans le Tableau 3 :
Figure imgf000032_0001
An example of a learning document generated by this method is shown in Table 3:
Figure imgf000032_0001
Table 3 Chart 3
A l’issue de cette étape E6, la zone mémoire 50 contient tous les documents générés aléatoirement, qui serviront à l’apprentissage des modèles. Modèles spécifiques At the end of this step E6, the memory zone 50 contains all the randomly generated documents, which will be used for learning the models. Specific models
A l’issue de la génération de la base d’apprentissage, le système déclenche une étape E7 de modélisation automatique par apprentissage de réseaux de neurones. A cette fin, le module d’extraction 40 génère une pluralité de modèles spécifiques par entrainement d’une pluralité de réseaux de neurones en nombre identique à partir de la base d’apprentissage, l’entrainement de chaque réseau de neurones entraînant la génération d’un modèle spécifique représentatif d’un type de métadonnée listé dans le modèle générique. At the end of the generation of the learning base, the system triggers a step E7 of automatic modeling by learning of neural networks. To this end, the extraction module 40 generates a plurality of specific models by training a plurality of neural networks in identical numbers from the learning base, the training of each neural network resulting in the generation of 'a specific model representative of a type of metadata listed in the generic model.
L’étape E7 consiste à créer un ensemble de réseaux de neurones qui construisent par apprentissage supervisé un modèle de reconnaissance des données présentes dans un document cible. Dans le cadre de la présente invention, le choix des réseaux dépend du type de métadonnée. Pour les métadonnées individuelles (Total, Identifier, Date), chaque modèle sera construit par un réseau de neurone. Il faudra donc trois réseaux pour ces trois métadonnées individuelles. Pour les métadonnées de type Items ou tax-items composées de plusieurs métadonnées individuelles, les modèles seront construits à deux niveaux : modèles pour la reconnaissance du début et de la fin des métadonnées composées, et modèles pour la reconnaissance individuelle des métadonnées. Un exemple d’architecture des réseaux de neurones pour les métadonnées individuelles est illustré sur la Figure 4. Step E7 consists in creating a set of neural networks which construct by supervised learning a model for recognizing the data present in a target document. In the context of the present invention, the choice of networks depends on the type of metadata. For individual metadata (Total, Identifier, Date), each model will be built by a neural network. So three networks will be needed for these three individual metadata. For metadata of the Items or tax-items type composed of several individual metadata, the models will be built at two levels: models for the recognition of the beginning and the end of the compound metadata, and models for the individual recognition of the metadata. An example of the neural network architecture for individual metadata is shown in Figure 4.
L’architecture générale utilisée dans cet exemple pour les réseaux de neurones, qui modélisent les métadonnées individuelles, se compose d’une couche d’entrée dont la longueur est fixée par un paramètre. Dans le cas de la présente invention, la longueur pour les réseaux responsables de modéliser les métadonnées de type individuelle est fixée à cent caractères. The general architecture used in this example for neural networks, which model individual metadata, consists of an input layer whose length is fixed by a parameter. In the case of the present invention, the length for the networks responsible for modeling the individual type metadata is fixed at one hundred characters.
Cette couche d’entrée est une fenêtre de lecture glissante qui parcourt la pièce comptable en se décalant d’un caractère vers la droite pour chaque pas d’apprentissage. La fenêtre de lecture glissante 510, limitée pour l’illustration à vingt-cinq caractères, contient les caractères en cours de lecture dans le document d’apprentissage. This input layer is a sliding reading window that traverses the accounting document by shifting one character to the right for each learning step. The sliding reading window 510, limited for the illustration to twenty-five characters, contains the characters being read in the learning document.
Les caractères d’entrée sont codés numériquement selon la méthode en utilisant une couche d’intégration (Keras). Cette méthode étant connue de l’homme de l’art, elle ne sera pas détaillée dans le cadre de cette invention. Chaque caractère est encodé avec cinq valeurs numériques. Le réseau est constitué de trois couches de neurones dont le nombre est également fixé par un paramètre. Dans le cadre de la présente invention, il est fixé à cinq fois la taille de la fenêtre glissante, soit cinq cents neurones par couche. The input characters are digitally encoded according to the method using an integration layer (Keras). This method being known to those skilled in the art, it will not be detailed in the context of this invention. Each character is encoded with five numeric values. The network consists of three layers of neurons whose number is also fixed by a parameter. In the context of the present invention, it is fixed at five times the size of the sliding window, ie five hundred neurons per layer.
La couche de sortie 520 contient autant d’unités que la taille de la fenêtre d’entrée. Les valeurs de sortie sont « 0 » ou « 1 » et réalisant ainsi un codage par position. La valeur « 0 » signifie que la valeur dans la couche d’entrée à la position correspondante n’est pas une donnée valide pour la métadonnée que l’on modélise. La valeur « 1 » signifie que la valeur dans la couche d’entrée à la position correspondante est une donnée valide pour la métadonnée que l’on modélise. Dans l’exemple de la Figure 4, la métadonnée modélisée est « Total ». La valeur 18.75 correspondant à la valeur Total dans la fenêtre glissante en cours de lecture. The output layer 520 contains as many units as the size of the input window. The output values are “0” or “1” and thus performing position coding. The value “0” means that the value in the input layer at the corresponding position is not valid data for the metadata being modeled. The value “1” means that the value in the input layer at the corresponding position is valid data for the metadata being modeled. In the example of Figure 4, the modeled metadata is “Total”. The value 18.75 corresponding to the Total value in the sliding window being read.
Les paramètres du réseau de neurones dont l’architecture est présentée Figure 4 sont fixés par une méthode d’apprentissage dont le processus est présenté sur la Figure 5 et en référence à la figure 6. The parameters of the neural network whose architecture is presented in Figure 4 are fixed by a learning method whose process is presented in Figure 5 and with reference to Figure 6.
Le processus d’apprentissage E7 débute par l’étape E71 durant laquelle le système lit un document comptable dans la zone mémoire 50. Dans l’étape E72, ce document est parcouru à travers une fenêtre glissante 376 dont la taille en nombre de caractères est fixée par un paramètre. Une valeur typique de ce paramètre est cent caractères. Cette fenêtre glissante est codée sous la forme d’un vecteur Xi de texte 377 dont chaque position est un caractère et toutes les balises sont retirées. Les données de la fenêtre glissante sont analysées pour y détecter la présence d’une balise correspondant au modèle en cours d’apprentissage. Par exemple, si le modèle en cours d’apprentissage concerne la métadonnée « Total », le système recherchera la présence de la balise <total> et </total> dans le texte de la fenêtre glissante 376. The learning process E7 begins with step E71 during which the system reads an accounting document in the memory area 50. In step E72, this document is scanned through a sliding window 376 whose size in number of characters is fixed by a parameter. A typical value for this parameter is one hundred characters. This sliding window is encoded as a vector Xi of text 377 where each position is a character and all tags are removed. The data in the sliding window is analyzed to detect the presence of a tag corresponding to the model being trained. For example, if the model being trained concerns the "Total" metadata, the system will look for the presence of the <total> and </total> tags in the text of the sliding window 376.
En parallèle, un vecteur de valeurs binaires zi 378 et de même longueur que Xi est construit pour coder la position des caractères qui correspondent au modèle en cours d’apprentissage. Ce vecteur sera rempli avec des valeurs 1 aux positions qui correspondent aux valeurs numériques des caractères entourés par les balises <total> et </total> comme illustré sur la Figure 6 (étape E73). En général, le vecteur zi codera par position la présence ou l’absence de caractères correspondant au texte du modèle en cours d’apprentissage. In parallel, a vector of binary values zi 378 and of the same length as Xi is constructed to encode the position of the characters which correspond to the model being learned. This vector will be filled with values 1 at the positions which correspond to the numerical values of the characters surrounded by the tags <total> and </total> as illustrated in FIG. 6 (step E73). In general, the vector zi will position-code the presence or the absence of characters corresponding to the text of the model being trained.
Afin que la fenêtre glissante soit de longueur toujours égale, le contenu de la fenêtre glissante est rempli avec des caractères vides pour le début et pour la fin de la lecture du document comptable. Les deux vecteurs Xi et zi sont utilisés pour adapter les paramètres du modèle. Chaque métadonnée individuelle sera modélisée par un réseau de neurones. So that the sliding window is always of equal length, the content of the sliding window is filled with empty characters for the beginning and for the end of the reading of the accounting document. The two vectors Xi and zi are used to adapt the model parameters. Each individual metadata will be modeled by a neural network.
Dans l’exemple décrit ici, il y a neuf métadonnées individuelles. Il y aura donc neuf réseaux de neurones dont les paramètres seront calculés afin de modéliser chacune d’elles. In the example described here, there are nine individual pieces of metadata. There will therefore be nine neural networks whose parameters will be calculated in order to model each of them.
En phase d’apprentissage, chaque vecteur Xi associé à un vecteur Zj est présenté en entrée du réseau de neurones. Les valeurs de Xi traversent le réseau pour produire une sortie yr Cette dernière est comparée à la sortie attendue Zj. La méthode de comparaison est un calcul d’angle de type « cosine similarity » connu en soi. In the learning phase, each vector Xi associated with a vector Zj is presented as input to the neural network. The values of Xi flow through the network to produce an output yr This is compared to the expected output Zj. The comparison method is an angle calculation of the "cosine similarity" type known in itself.
Pour les deux vecteurs yi et Zj, l'angle 0 s'obtient par le produit scalaire et la norme des vecteurs : yi - zt
Figure imgf000035_0001
llydl- I ïll
For the two vectors yi and Zj, the angle 0 is obtained by the scalar product and the norm of the vectors: yi - zt
Figure imgf000035_0001
llydl- I ïll
Comme la valeur cos 0 est comprise dans l'intervalle [-1 ,1 ], la valeur « -1 » indiquera des vecteurs opposés, « 0 » des vecteurs orthogonaux et « 1 » des vecteurs colinéaires de coefficient positif. Les valeurs intermédiaires permettent d'évaluer le degré de similarité. As the value cos 0 is included in the interval [-1 ,1 ], the value "-1" will indicate opposite vectors, "0" orthogonal vectors and "1" collinear vectors with a positive coefficient. The intermediate values make it possible to evaluate the degree of similarity.
Les paramètres du modèle sont constitués de l’ensemble des connexions Wij 531 , 532, 533 de la Figure 5 entre neurones des différentes couches. Ils sont adaptés suivant un algorithme d’adaptation dans une étape E74 (figure 6). Dans le cadre de la présente invention, l’adaptation des coefficients repose sur une descente de gradient dont le calcul est optimisé par un optimisateur ADAM (Adaptive Moment Estimation). Ce processus est réitéré pour l’ensemble des exemples disponibles dans la base d’apprentissage. The parameters of the model consist of all the connections Wij 531, 532, 533 in Figure 5 between neurons of the different layers. They are adapted according to an adaptation algorithm in a step E74 (FIG. 6). In the context of the present invention, the adaptation of the coefficients is based on a gradient descent, the calculation of which is optimized by an ADAM (Adaptive Moment Estimation) optimizer. This process is repeated for all the examples available in the learning database.
Quand tous les caractères ont été lus, la fenêtre glissante 377 est décalée d’une unité vers la droite et les étapes E71 à E75 sont reprises jusqu’à ce que la fenêtre glissante 377 atteigne le dernier caractère du document d’apprentissage, pour chaque document d’apprentissage de la base d’apprentissage. When all the characters have been read, the sliding window 377 is shifted by one unit to the right and the steps E71 to E75 are repeated until the sliding window 377 reaches the last character of the document. of learning, for each learning document of the learning database.
A l’issue de ce processus E7, les modèles spécifiques sont enregistrés dans la zone mémoire 50 afin de les rendre disponibles pour la phase d’exploitation. At the end of this process E7, the specific models are saved in the memory zone 50 in order to make them available for the exploitation phase.
Amélioration du modèle Model improvement
L’interprétation du modèle construit par ce processus est que pour chaque caractère de la fenêtre glissante 377, la sortie délivrée par le réseau prédit la probabilité que le caractère de la fenêtre glissante appartienne ou non à la section modélisée par le réseau. Du fait que l’on obtient un grand nombre de prédictions, il faut agréger la totalité des prédictions obtenues. Tous les vecteurs de sortie yi produits à partir de la base d’apprentissage sont ainsi additionnés et une moyenne est calculée.
Figure imgf000036_0001
y N où N est le nombre d’exemples disponibles dans la base de connaissance.
The interpretation of the model built by this process is that for each character in the sliding window 377, the output from the network predicts the probability that the character in the sliding window does or does not belong to the section modeled by the network. Since a large number of predictions are obtained, all of the predictions obtained must be aggregated. All the output vectors yi produced from the learning base are thus added and an average is calculated.
Figure imgf000036_0001
y N where N is the number of examples available in the knowledge base.
L’analyse de cette moyenne permet d’améliorer le traitement destiné à produire la prédiction à partir de la fenêtre glissante. En effet, en analysant la forme des vecteurs avec des probabilités moyennes sur de nombreux échantillons, il ressort que la probabilité que des caractères donnés appartiennent à la section dépend de la forme de la prédiction. La prédiction ayant un profil très marqué aura une plus grande crédibilité qu’une prédiction avec un profil plus lisse. Un exemple est montré sur la Figure 7. The analysis of this average makes it possible to improve the processing intended to produce the prediction from the sliding window. Indeed, by analyzing the shape of the vectors with average probabilities over many samples, it appears that the probability that given characters belong to the section depends on the shape of the prediction. The prediction with a very marked profile will have greater credibility than a prediction with a smoother profile. An example is shown in Figure 7.
Pour différencier les pics, la méthode consiste à identifier les pics à l'intérieur d'un signal en se basant sur les propriétés des pics. Cette méthode prend un tableau de valeur monodimensionnel et trouve tous les maximas locaux par simple comparaison des valeurs voisines. Cette méthode permet de rendre compte de la proéminence de chaque pic qui, en général, peut être interprété comme la façon dont le pic se distingue de la région environnante. En outre, un filtrage additionnel est utilisé pour filtrer les petits pics qui peuvent apparaître sur les caractères du ticket. La valeur de proéminence est ensuite utilisée comme mesure de confiance. Une valeur de proéminence très élevée signifie généralement qu'il est très probable que la région représente la section, de sorte que la région ayant la proéminence la plus élevée est renvoyée comme région d'intérêt. To differentiate the peaks, the method involves identifying the peaks within a signal based on the properties of the peaks. This method takes a one-dimensional array of values and finds all local maxima by simple comparison of neighboring values. This method allows one to account for the prominence of each peak which, in general, can be interpreted as how the peak stands out from the surrounding region. Additionally, additional filtering is used to filter out small spikes that may appear on the ticket characters. The prominence value is then used as a confidence measure. A very high prominence value usually means that the region is very likely to represent the section, so the region with the highest prominence is returned as the region of interest.
Prétraitement spécifique pour les métadonnées composéesSpecific preprocessing for compound metadata
Les métadonnées composées requièrent un prétraitement spécifique qui sert à extraire une partie du document pour construire le modèle. En effet, les métadonnées Item-name, ltem_value, Item-taxcode, Taxitem-code, Taxitemvalue, Taxitem-percentage ne peuvent apparaître que dans le contexte de métadonnées Items ou Taxitems. Compound metadata requires specific pre-processing which is used to extract part of the document to build the model. Indeed, Item-name, ltem_value, Item-taxcode, Taxitem-code, Taxitemvalue, Taxitem-percentage metadata can only appear in the context of Items or Taxitems metadata.
La base d’apprentissage doit donc refléter ce contexte particulier et ne contenir que des suites de caractères qui se trouvent dans ce contexte. Il convient donc d’identifier les caractères de début et de fin des parties des documents contenant les Items et Taxitems. The learning base must therefore reflect this particular context and only contain sequences of characters that are found in this context. It is therefore necessary to identify the start and end characters of the parts of the documents containing the Items and Taxitems.
Une fois ce traitement réalisé, l’apprentissage des modèles se réalise selon la même architecture et le même processus que pour les items individuels. Once this processing has been carried out, the learning of the models is carried out according to the same architecture and the same process as for the individual items.
A l’issue de l’ensemble des apprentissages, les paramètres des modèles sont enregistrés dans la zone mémoire 50 dans une étape E8. Ces paramètres seront utilisés lors de l’exploitation des modèles lorsqu’il s’agir de reconnaître automatiquement les métadonnées d’un nouveau document appelé « document cible » n’ayant pas servi à l’apprentissage. At the end of all the learnings, the parameters of the models are recorded in the memory zone 50 in a step E8. These parameters will be used during the exploitation of the models when it comes to automatically recognizing the metadata of a new document called "target document" that has not been used for learning.
Phase d’exploitation Operation phase
En référence à la figure 8, la phase d’exploitation comprend dans une étape S1 la lecture textuelle et séquentielle d’un document cible par le module d’extraction 40 à l’aide de la fenêtre glissante et le calcul dans une étape S2, pour chaque caractère de ladite fenêtre glissante et pour chaque modèle spécifique, de la probabilité d’appartenance dudit caractère à la métadonnée correspondant audit modèle spécifique. En s’inspirant de la manière dont le cerveau procède pour la lecture de textes, l’invention va permettre de lire un document cible à travers une fenêtre glissante centrée sur chaque caractère lu et qui lui offre ainsi un contexte de lecture. With reference to FIG. 8, the exploitation phase comprises in a step S1 the textual and sequential reading of a target document by the extraction module 40 using the sliding window and the calculation in a step S2, for each character of said sliding window and for each specific model, the probability that said character belongs to the metadata corresponding to said specific model. Inspired by the way the brain proceeds to read texts, the invention will make it possible to read a target document through a sliding window centered on each character read and which thus offers it a reading context.
A l’étape S1 , le document comptable est lu sous une forme textuelle. Cela suppose que la phase de reconnaissance de l’image a été effectuée préalablement. At step S1, the accounting document is read in a textual form. This assumes that the image recognition phase has been carried out beforehand.
A l’étape S2, la prédiction des métadonnées est déclenchée et le module d’extraction 40 calcule les probabilités d’appartenance à une métadonnée pour chaque caractère lu dans la fenêtre glissante à partir des modèles disponibles dans la zone mémoire 50. At step S2, the prediction of the metadata is triggered and the extraction module 40 calculates the probabilities of belonging to a piece of metadata for each character read in the sliding window from the models available in the memory area 50.
Dans une étape S3, le module d’extraction 40 identifie, dans la fenêtre glissante, le modèle spécifique pour lequel la moyenne des probabilités calculées pour chaque caractère d’au moins une série de caractères est supérieure à un seuil prédéterminé, In a step S3, the extraction module 40 identifies, in the sliding window, the specific model for which the mean of the probabilities calculated for each character of at least one series of characters is greater than a predetermined threshold,
Dans une étape S4, le module d’extraction 40 détermine la métadonnée associée au modèle spécifique identifié. In a step S4, the extraction module 40 determines the metadata associated with the specific model identified.
Dans une étape S5, le module d’extraction 40 extrait la valeur associée à ladite métadonnée déterminée. In a step S5, the extraction module 40 extracts the value associated with said determined metadata.
En référence à la figure 9, pour chaque position de la fenêtre glissante 377, le module d’extraction 40 calcule toutes les prédictions de chaque modèle. Il identifie la métadonnée qui délivre la prédiction la plus crédible et, connaissant la position de chaque caractère, le système les copie dans le champ de la métadonnée correspondant. Sur la Figure 9, pour les caractères lus dans la fenêtre glissante, le modèle de métadonnée « total » délivre la prédiction la plus crédible. Les données à l’emplacement correspondant aux probabilités le plus élevées seront copiées dans le champ de métadonnées « Total ». Referring to Figure 9, for each position of the sliding window 377, the extraction module 40 calculates all the predictions of each model. It identifies the metadata that delivers the most credible prediction and, knowing the position of each character, the system copies them into the corresponding metadata field. In Figure 9, for the characters read in the sliding window, the “total” metadata model delivers the most credible prediction. The data in the location with the highest probabilities will be copied to the "Total" metadata field.
Ajout manuel d’une métadonnée Add metadata manually
La métadonnée « description » peut être enrichie dans une fenêtre affichée par le module d’extraction 40. En référence à la figure 10, l’utilisateur peut remplir le champ 720 de cette interface pour ajouter manuellement une description de la pièce comptable. Cette étape peut être utilisée pour faciliter le regroupement de documents cibles de manière automatique. L’invention permet donc une extraction automatique efficace et fiable. The “description” metadata can be enriched in a window displayed by the extraction module 40. With reference to FIG. 10, the user can fill in the field 720 of this interface to manually add a description of the accounting document. This step can be used to facilitate grouping of target documents automatically. The invention therefore allows efficient and reliable automatic extraction.

Claims

38 Revendications 38 Claims
1. Procédé d’extraction de données dans un document cible textuellement numérisé, chaque donnée étant caractérisée par son type sous la forme d’une métadonnée, ledit procédé comprenant les étapes de : 1. Process for extracting data from a textually digitized target document, each data being characterized by its type in the form of metadata, said process comprising the steps of:
- conception (E5) d’un modèle générique à partir d’une pluralité de documents comprenant chacun au moins une métadonnée marquée, ledit modèle générique listant l’ensemble des métadonnées marquées, - design (E5) of a generic model from a plurality of documents each comprising at least one marked metadata, said generic model listing all the marked metadata,
- production (E6) automatique d’une base de données d’apprentissage à partir du modèle générique généré, ladite base de données d’apprentissage comprenant une pluralité de documents d’apprentissage comprenant chacun tout ou partie des types de métadonnées du modèle générique généré, chaque type de métadonnées étant associé à une valeur,- automatic production (E6) of a learning database from the generated generic model, said learning database comprising a plurality of learning documents each comprising all or part of the metadata types of the generated generic model , each type of metadata being associated with a value,
- génération (E7) d’une pluralité de modèles spécifiques par entrainement d’une pluralité de réseaux de neurones en même nombre que le nombre de modèles spécifiques à partir de la base d’apprentissage, l’entrainement de chaque réseau de neurones entraînant la génération d’un modèle spécifique représentatif d’un type de métadonnée listé dans le modèle générique, - generation (E7) of a plurality of specific models by training a plurality of neural networks in the same number as the number of specific models from the learning base, the training of each neural network resulting in the generation of a specific model representing a type of metadata listed in the generic model,
- lecture (S1 ) textuelle et séquentielle du document cible à l’aide de la fenêtre glissante et calcul (S2), pour chaque caractère de ladite fenêtre glissante et pour chaque modèle spécifique, de la probabilité d’appartenance dudit caractère à la métadonnée correspondant audit modèle spécifique, - textual and sequential reading (S1) of the target document using the sliding window and calculation (S2), for each character of said sliding window and for each specific model, of the probability of belonging of said character to the corresponding metadata to the specific model,
- identification (S3), dans la fenêtre glissante, du modèle spécifique pour lequel la moyenne des probabilités calculées pour chaque caractère d’au moins une série de caractères est supérieure à un seuil prédéterminé, - identification (S3), in the sliding window, of the specific model for which the mean of the probabilities calculated for each character of at least one series of characters is greater than a predetermined threshold,
- détermination (S4) de la métadonnée associée au modèle spécifique identifié, - determination (S4) of the metadata associated with the specific model identified,
- extraction (S5) de la valeur associée à ladite métadonnée déterminée. - extraction (S5) of the value associated with said determined metadata.
2. Procédé selon la revendication 1 , comprenant une étape (E0) de sélection d’un nombre prédéterminé de documents de référence dans un ensemble initial de documents. 39 2. Method according to claim 1, comprising a step (E0) of selecting a predetermined number of reference documents from an initial set of documents. 39
3. Procédé selon la revendication précédente, dans lequel la sélection du nombre prédéterminé de documents dans un ensemble initial de documents est réalisée manuellement par un opérateur. 3. Method according to the preceding claim, in which the selection of the predetermined number of documents from an initial set of documents is carried out manually by an operator.
4. Procédé selon l’une quelconque des revendications précédentes, comprenant une étape de marquage (E3) de chaque métadonnée identifiable dans chaque document sélectionné, de préférence manuellement par un opérateur. 4. Method according to any one of the preceding claims, comprising a step of marking (E3) each identifiable metadata item in each selected document, preferably manually by an operator.
5. Procédé selon l’une quelconque des revendications précédentes, comprenant une étape d’enregistrement (E4) dans une zone mémoire (50) des modèles spécifiques générés. 5. Method according to any one of the preceding claims, comprising a step of recording (E4) in a memory zone (50) specific models generated.
6. Procédé selon l’une quelconque des revendications précédentes, dans lequel la production (E6) automatique de la base de données d’apprentissage à partir du modèle générique généré comprend la génération d’au moins cent documents d’apprentissage, de préférence au moins mille, de préférence encore au moins dix-mille. 6. Method according to any one of the preceding claims, in which the automatic production (E6) of the learning database from the generated generic model comprises the generation of at least one hundred learning documents, preferably at less than a thousand, more preferably at least ten thousand.
7. Procédé selon l’une quelconque des revendications précédentes, dans lequel chaque document de la pluralité de documents d’apprentissage comprend tous les types de métadonnées du modèle générique généré. 7. Method according to any one of the preceding claims, in which each document of the plurality of training documents comprises all the types of metadata of the generated generic model.
8. Procédé selon l’une quelconque des revendications précédentes, comprenant une étape de filtrage pour s’assurer que chaque document comprend au maximum une métadonnée de chaque type. 8. Method according to any one of the preceding claims, comprising a filtering step to ensure that each document comprises at most one piece of metadata of each type.
9. Procédé selon l’une quelconque des revendications précédentes, dans lequel la fenêtre glissante glisse d’un caractère à chaque itération. 9. Method according to any one of the preceding claims, in which the sliding window slides by one character at each iteration.
10. Module d’extraction (40) de données dans un document cible textuellement numérisé, ledit module d’extraction (40) étant configuré pour mettre en œuvre le procédé selon la revendication 1. 10. Extraction module (40) of data in a textually digitized target document, said extraction module (40) being configured to implement the method according to claim 1.
PCT/EP2022/071982 2021-08-13 2022-08-04 System for extracting data from a document WO2023016925A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CH70158/21A CH718888A2 (en) 2021-08-13 2021-08-13 A method of extracting data from a document.
CH070158/2021 2021-08-13

Publications (1)

Publication Number Publication Date
WO2023016925A1 true WO2023016925A1 (en) 2023-02-16

Family

ID=85200593

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2022/071982 WO2023016925A1 (en) 2021-08-13 2022-08-04 System for extracting data from a document

Country Status (2)

Country Link
CH (1) CH718888A2 (en)
WO (1) WO2023016925A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190121840A1 (en) * 2017-10-20 2019-04-25 Heretik Inc. Method and system for dynamically configuring a user interface for a specified document review task
US20210117665A1 (en) 2017-11-13 2021-04-22 Way2Vat Ltd. Systems and methods for neuronal visual-linguistic data retrieval from an imaged document
US20210150338A1 (en) * 2019-11-20 2021-05-20 Abbyy Production Llc Identification of fields in documents with neural networks without templates

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190121840A1 (en) * 2017-10-20 2019-04-25 Heretik Inc. Method and system for dynamically configuring a user interface for a specified document review task
US20210117665A1 (en) 2017-11-13 2021-04-22 Way2Vat Ltd. Systems and methods for neuronal visual-linguistic data retrieval from an imaged document
US20210150338A1 (en) * 2019-11-20 2021-05-20 Abbyy Production Llc Identification of fields in documents with neural networks without templates

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BAVISKAR DIPALI ET AL: "Multi-Layout Unstructured Invoice Documents Dataset: A Dataset for Template-Free Invoice Processing and Its Evaluation Using AI Approaches", IEEE ACCESS, IEEE, USA, vol. 9, 12 July 2021 (2021-07-12), pages 101494 - 101512, XP011869184, DOI: 10.1109/ACCESS.2021.3096739 *

Also Published As

Publication number Publication date
CH718888A2 (en) 2023-02-15

Similar Documents

Publication Publication Date Title
CN109658478B (en) Method and system for providing enterprise portrait
CN107608958B (en) Contract text risk information mining method and system based on unified modeling of clauses
US20190279170A1 (en) Dynamic resource management associated with payment instrument exceptions processing
US8798354B1 (en) Method and system for automatic correlation of check-based payments to customer accounts and/or invoices
WO2021025926A1 (en) Digital content prioritization to accelerate hyper-targeting
US20150242856A1 (en) System and Method for Identifying Procurement Fraud/Risk
US8855377B1 (en) Method and system for semi-automated setup of accounts within a data management system
US20210233181A1 (en) System and method of determining tax liability of entity
Celestini et al. Tor marketplaces exploratory data analysis: the drugs case
KR20170032327A (en) Account processing device, account processing method, and account processing program
US20110052075A1 (en) Remote receipt analysis
US20220067365A1 (en) System and method for domain aware document classification and information extraction from consumer documents
CH716698B1 (en) Partial perceptual image hashing for bill deconstruction.
Crookes et al. Technology challenges in accounting and finance
Jayoma et al. OCR based document archiving and indexing using PyTesseract: A record management system for dswd caraga, Philippines
Sahu et al. Invoice processing using robotic process automation
Lawton et al. eDiscovery in digital forensic investigations
WO2023016925A1 (en) System for extracting data from a document
US20220188882A1 (en) Leaving hierarchical-embedded reviews for verified transactions
EP3945484A1 (en) Systems and methods for obtaining information from a digital message
WO2021110763A1 (en) Computer-implemented method for allocating an accounting document to a pair of debtor/creditor accounts and the accounting entry
TWM553835U (en) Automatic intelligent accounting system
CN113408446A (en) Bill accounting method and device, electronic equipment and storage medium
TWI660312B (en) Automatic intellgent accounting system
Abate et al. Significance. Stop Illicit Heritage Trafficking with Artificial Intelligence

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22768633

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE