Enterprise financial invoice management system and method based on Internet of Things

Through IoT technology, the text information in invoices is automatically extracted and identified, and the fuzzy matching algorithm is used to search for similar invoices in the database, which solves the problems of inefficiency and inconsistency in existing financial invoice management, and achieves efficient and accurate invoice management.

CN119046231APending Publication Date: 2024-11-29NANJING INST OF RAILWAY TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411034318.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The existing financial invoice management relies on manual entry and search, which is inefficient and error-prone. Especially when a large amount of invoice data, information inconsistency leads to difficulty in matching and searching, reducing management efficiency.

Method used

Using the Internet of Things-based enterprise financial invoice management system, the invoice image data is obtained through the Internet of Things scanning device, preprocessing and extracting text information, and converting it into feature vectors to match the pre-trained character model. The fuzzy matching algorithm is used to search for similarities in the database. Invoice, calculate the comprehensive similarity index, and automatically register and manage invoices.

Benefits of technology

It realizes automated financial invoice management, improves the accuracy and efficiency of invoice matching, solves the problems of inconsistency and difficulty in finding, and improves the accuracy and efficiency of financial management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046231A_ABST
    Figure CN119046231A_ABST
Patent Text Reader

Abstract

The invention discloses an enterprise financial invoice management system and method based on the Internet of Things, and relates to the technical field of financial invoice management. Invoice image data are obtained through an Internet of Things scanning device, feature vectors are matched with a pre-trained character model, character types are determined, and the invoice image data are obtained; after determining character categories of all character areas of the invoice image data, searching registered invoices similar to the input invoice in the database by using a fuzzy matching algorithm, calculating a comprehensive similarity index of the input invoice and all the registered invoices, and if the comprehensive similarity index of the input invoice and any registered invoice is greater than or equal to an index threshold, determining that the input invoice is the invoice. The input invoice is registered in a database. The management system automatically extracts and identifies the character information from the image, provides basic support for automatic financial invoice management, realizes efficient and accurate invoice fuzzy matching and information retrieval, solves the problems of information inconsistency and difficult searching in invoice management, and improves financial management efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial invoice management, and in particular to an enterprise financial invoice management system and method based on the Internet of Things. Background Art

[0002] Financial invoice management refers to the process by which an enterprise systematically handles and manages the invoices it receives and issues, including the collection, classification, entry, review, filing and tax reporting of invoices. Effective financial invoice management can help enterprises ensure the accuracy, compliance and transparency of financial data.

[0003] Relying on manual input, review and search to manage invoices is not only error-prone and inefficient, but also because the invoice data formats from different sources are inconsistent, when there is a large amount of invoice data, it will lead to difficulties in matching and searching, which will further reduce the efficiency of invoice management;

[0004] Based on this, the present invention proposes an enterprise financial invoice management system and method based on the Internet of Things, which automatically extracts and recognizes text information from images, provides basic support for automated financial invoice management, and realizes efficient and accurate invoice fuzzy matching and information retrieval, solves the problems of information inconsistency and difficulty in finding invoice management, and improves the efficiency and accuracy of financial management. Summary of the invention

[0005] The purpose of the present invention is to provide an enterprise financial invoice management system and method based on the Internet of Things to solve the shortcomings of the background technology.

[0006] In order to achieve the above object, the present invention provides the following technical solution: a method for managing enterprise financial invoices based on the Internet of Things, the management method comprising the following steps:

[0007] After acquiring the invoice image data through the IoT scanning device, it is sent to the management system for preprocessing based on the IoT. The text area containing the text is extracted from the preprocessed invoice image data, and the text area is segmented into single character areas and converted into feature vectors. The feature vectors are matched with the pre-trained character model to determine the character category.

[0008] After determining the character categories of all character regions of the invoice image data, recording the processing parameters of the invoice image data, searching the database for registered invoices similar to the input invoice using a fuzzy matching algorithm, and calculating the comprehensive similarity index between the input invoice and all registered invoices;

[0009] If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice will be registered in the database. If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice will be analyzed to determine whether the input invoice needs to be rescanned, and the corresponding management strategy will be generated based on the analysis results.

[0010] In a preferred embodiment, the feature vector is matched with a pre-trained character model to determine the character category. After the character category of all character regions of the invoice image data is determined, the processing parameters of the invoice image data are recorded, including the following steps:

[0011] Match the character image to be recognized with all character templates, calculate the matching similarity, and select the character template with the largest matching similarity as the recognition result;

[0012] Use a pre-labeled character dataset to train the SVM model. Each feature vector corresponds to a character category. Input the feature vector of the character to be recognized into the trained SVM model and output the character category.

[0013] After determining the character categories of all character regions of the invoice image data, the processing parameters of the invoice image data are recorded, the processing parameters including the noise intensity of the invoice image after denoising, the clarity of the invoice image after image enhancement, and the tilt index of the invoice image after tilt correction.

[0014] In a preferred embodiment, calculating the comprehensive similarity index between the input invoice and all registered invoices includes the following steps:

[0015] Use the edit distance to calculate the similarity between the input invoice string and the registered invoice. The calculation expression is: edit_d = D[len(str1), len(str20], where edit_d represents the similarity, D[len(str1), len(str2)] represents the edit distance between the first i characters of the string str1 and the first j characters of the string str1, the string str1 represents the input invoice image string, and the string str2 represents the registered invoice image string;

[0016] The similarities of multiple field strings are combined for weighted matching, and the matching results are weighted calculated to obtain the comprehensive similarity index. The expression is:

[0017] ZS=ω1*edit_d hm +ω2*edit_d rq +ω3*edit_d je , where ZS is the comprehensive similarity index, edit_d hmThe similarity between the input invoice number string and the registered invoice number string, edit_d rq To determine the similarity between the input invoice date string and the registered invoice date string, edit_d je is the similarity between the input invoice amount string and the registered invoice amount string, ω1, ω2, ω3 are weight coefficients, and ω1+ω2+ω3=1.

[0018] In a preferred embodiment, analyzing the processing parameters and characterization parameters of the input invoice and determining whether the input invoice needs to be re-scanned comprises the following steps:

[0019] The noise normalization value, clarity normalization value, tilt index normalization value, and missing index normalization value are calculated comprehensively to obtain the image coefficient, and the expression is:

[0020] In the formula, is the image coefficient, Q norn is the missing index normalization value, NL norn is the noise normalization value, TA norn is the normalized value of the tilt index, HE norn is the clarity normalization value, α, β, and γ are the proportional coefficients of the noise normalization value, the tilt index normalization value, and the clarity normalization value, respectively, and α, β, and γ are all greater than 0;

[0021] Compare the acquired image coefficient with the quality threshold. The quality threshold is used to analyze whether the overall quality of the input invoice image meets the standard. If the image coefficient is less than the quality threshold, the overall quality of the input invoice image does not meet the standard. If the image coefficient is greater than or equal to the quality threshold, the overall quality of the input invoice image meets the standard.

[0022] When the overall quality of the input invoice image is analyzed to be not up to standard, it is determined that the input invoice needs to be rescanned. If the number of consecutive scans exceeds 5 times and the overall quality of the input invoice image is still not up to standard, the input invoice is marked and sent to the management area, and the management area information is sent to the administrator.

[0023] In a preferred embodiment, generating a corresponding management strategy based on the analysis results includes the following steps:

[0024] If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, and the overall quality of the input invoice image is analyzed to be up to standard, the input invoice is marked as a new format invoice and registered in the database, and the registration information is sent to the administrator.

[0025] In a preferred embodiment, if the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and characterization parameters of the input invoice are analyzed, the processing parameters include the noise intensity of the invoice image after denoising, the clarity of the invoice image after image enhancement, and the tilt index of the invoice image after tilt correction, and the characterization parameters include the string format missing index;

[0026] The noise intensity of the denoised invoice image is normalized to obtain a noise normalization value. The clarity of the invoice image after image enhancement is normalized to obtain a clarity normalization value. The tilt index of the invoice image after tilt correction is normalized to obtain a tilt index normalization value. The missing index of the string format is normalized to obtain a missing index normalization value.

[0027] In a preferred embodiment, registering the input invoice in the database comprises the following steps:

[0028] The larger the comprehensive similarity index is, the more accurate the matching result of the input invoice in the database is. The index threshold is used to determine whether the input invoice matches the registered invoice in the database;

[0029] If the comprehensive similarity index between the input invoice and the registered invoice is greater than or equal to the index threshold, the input invoice is judged to match the registered invoice; if the comprehensive similarity index between the input invoice and the registered invoice is less than the index threshold, the input invoice is judged to not match the registered invoice;

[0030] If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice will be registered in the database.

[0031] In a preferred embodiment, extracting a text region containing text from pre-processed invoice image data comprises the following steps:

[0032] Use the connected domain analysis algorithm to identify all connected regions in the binary image, filter non-text regions based on the area and aspect ratio features of the connected domain, and retain the text region;

[0033] Calculate the sum of the pixel values ​​of each row of the image to generate a horizontal projection image, and calculate the sum of the pixel values ​​of each column of the image to generate a vertical projection image;

[0034] Detect peaks and valleys in the projection image, where the peaks correspond to the text area and the valleys correspond to the segmentation lines;

[0035] The size of the sliding window is defined according to the size of the retained text area, the window is gradually slid in the image, the features of the pixel values ​​in the window are calculated, and the text area is identified according to the features of the pixel values ​​in the window;

[0036] Adjacent and overlapping text regions are merged, and the boundaries of the text regions are adjusted according to the results of the projection map.

[0037] In a preferred embodiment, segmenting the text region into individual character regions and then converting them into feature vectors comprises the following steps:

[0038] Calculate the sum of the pixel values ​​of each column in the text area to generate a vertical projection map, in which the valley value corresponds to the gap between characters and the peak value corresponds to the column where the character is located;

[0039] Perform connected domain analysis on each segmented character region to identify and extract the connected domain of each character;

[0040] Apply a distance transform to convert each foreground pixel in the binary image into its distance to the nearest background pixel;

[0041] According to the distance transformation result, the foreground and background areas are marked by thresholding operation;

[0042] The watershed algorithm is applied to further segment the marked foreground and background areas, process the connected characters, normalize each character image to the same size, and convert the normalized character image into a feature vector based on the HOG feature method.

[0043] An enterprise financial invoice management system based on the Internet of Things, including a character category confirmation module, an invoice matching module, and a management module;

[0044] Character category confirmation module: After obtaining the invoice image data through the IoT scanning device, pre-process it, extract the text area containing the text from the pre-processed invoice image data, segment the text area into individual character areas and convert them into feature vectors, match the feature vectors with the pre-trained character model, determine the character category, and after determining the character categories of all character areas in the invoice image data, record the processing parameters of the invoice image data;

[0045] Invoice matching module: uses fuzzy matching algorithm to search the database for registered invoices similar to the input invoice, and calculates the comprehensive similarity index between the input invoice and all registered invoices;

[0046] Management module: If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice will be registered in the database. If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice will be analyzed to determine whether the input invoice needs to be rescanned, and the corresponding management strategy will be generated based on the analysis results.

[0047] In the above technical solution, the technical effects and advantages provided by the present invention are:

[0048] 1. The present invention obtains invoice image data through an Internet of Things scanning device, matches the feature vector with a pre-trained character model, determines the character category, and after determining the character category of all character areas of the invoice image data, uses a fuzzy matching algorithm to search for registered invoices similar to the input invoice in the database, and calculates the comprehensive similarity index between the input invoice and all registered invoices. If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice is registered in the database. The management system automatically extracts and recognizes text information from the image, provides basic support for automated financial invoice management, and realizes efficient and accurate invoice fuzzy matching and information retrieval, solves the problems of information inconsistency and difficulty in finding invoice management, and improves the efficiency and accuracy of financial management;

[0049] 2. When the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the present invention analyzes the processing parameters and characterization parameters of the input invoice to determine whether the input invoice needs to be rescanned, and generates a corresponding management strategy based on the analysis result, which can avoid input invoice matching errors caused by abnormal input parameters and characterization parameters of the input invoice, and further improve the accuracy of invoice matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0051] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] Example 1: Please refer to Figure 1 As shown, the enterprise financial invoice management method based on the Internet of Things described in this embodiment includes the following steps:

[0054] After acquiring the invoice image data through the Internet of Things scanning device, it is sent to the management system for preprocessing based on the Internet of Things. The text area containing words is extracted from the preprocessed invoice image data, and the text area is divided into single character areas and then converted into feature vectors. The feature vectors are matched with the pre-trained character model to determine the character category. After determining the character category of all character areas of the invoice image data, the processing parameters of the invoice image data are recorded, and the fuzzy matching algorithm is used to search the database for registered invoices similar to the input invoice, allowing a certain degree of error and inaccuracy. The comprehensive similarity index between the input invoice and all registered invoices is calculated. If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice is registered in the database. If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and characterization parameters of the input invoice are analyzed to determine whether the input invoice needs to be rescanned, and the corresponding management strategy is generated based on the analysis results.

[0055] This application obtains invoice image data through an IoT scanning device, matches the feature vector with a pre-trained character model, determines the character category, and after determining the character category of all character areas in the invoice image data, uses a fuzzy matching algorithm to search for registered invoices similar to the input invoice in the database, calculates the comprehensive similarity index between the input invoice and all registered invoices, and registers the input invoice in the database if the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold. The management system automatically extracts and recognizes text information from images, provides basic support for automated financial invoice management, and realizes efficient and accurate invoice fuzzy matching and information retrieval, solves the problems of inconsistent information and difficulty in finding invoices in invoice management, and improves the efficiency and accuracy of financial management.

[0056] When the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, this application analyzes the processing parameters and characterization parameters of the input invoice to determine whether the input invoice needs to be rescanned, and generates a corresponding management strategy based on the analysis results. This can avoid input invoice matching errors caused by abnormal input parameters and characterization parameters of the input invoice, and further improve the accuracy of invoice matching.

[0057] Embodiment 2: After acquiring the invoice image data through the Internet of Things scanning device, it is sent to the management system for pre-processing based on the Internet of Things, including the following steps:

[0058] After the invoice image data is obtained through the IoT scanning device, it is sent to the management system for preprocessing based on the IoT. The preprocessing includes grayscale, denoising, binarization, tilt correction and image enhancement.

[0059] in:

[0060] 1) Grayscale: Convert the color image to a grayscale image to reduce the computational complexity and highlight the text information. Calculate the grayscale value of each pixel. The expression is:

[0061] Gray = 0.299*R + 0.587*G + 0.114*B, where Gray is the grayscale value, R is the intensity value of the red channel, G is the intensity value of the green channel, and B is the intensity value of the blue channel.

[0062] 2) Denoising: Remove noise from the image, maintain the clarity and readability of the image, use the mean of the neighborhood pixels instead of the current pixel value, and smooth the image.

[0063] 3) Binarization: Convert the grayscale image into a binary image to make the text area more prominent. Set the pixels with grayscale values ​​greater than or equal to the global threshold to white (1), and set the pixels with grayscale values ​​less than the global threshold to black (0).

[0064] 4) Tilt correction: Correct the tilt angle in the image so that the text is arranged horizontally to facilitate subsequent character recognition. Use the Canny operator to detect the image edge, use the Hough transform to detect the straight lines in the image, calculate the tilt angle, and rotate the image according to the calculated tilt angle to correct the image to be horizontal.

[0065] 5) Image enhancement: Improve the contrast and clarity of the image, make the characters clearer, adjust the image histogram distribution, enhance the contrast, stretch the contrast range of the image through linear transformation, use the Laplace operator to enhance the image edge, and highlight the text outline.

[0066] To sum up, after acquiring the invoice image data, the invoice image data is preprocessed by grayscale, denoising, binarization, tilt correction and image enhancement, among which grayscale, denoising, binarization, tilt correction and image enhancement are all existing technologies, and the detailed steps are not repeated here.

[0067] Extracting text regions containing words from preprocessed invoice image data includes the following steps:

[0068] Use the connected domain analysis algorithm to identify all connected regions in the binary image, filter non-text regions according to the area, aspect ratio and other features of the connected domain, retain the text region, calculate the sum of the pixel values ​​of each row of the image, generate a horizontal projection map, calculate the sum of the pixel values ​​of each column of the image, generate a vertical projection map, detect peaks and valleys in the projection map, the peaks correspond to the text regions, and the valleys correspond to the dividing lines, define the size of the sliding window according to the size of the retained text region, slide the window step by step in the image, calculate the features of the pixel values ​​in the window (such as the sum of the pixel values ​​or the number of edge pixels), identify possible text regions according to the features of the pixel values ​​in the window, merge adjacent and overlapping text regions, and adjust the boundaries of the text regions according to the results of the projection map.

[0069] Example of connected domain analysis algorithm: Assume that there is an invoice image, and 20 connected regions are identified through connected domain analysis. After filtering out regions with too small area and unreasonable aspect ratio, 8 connected regions are retained, which may contain text.

[0070] Projection chart example: In the horizontal projection chart, the rows corresponding to the peak values ​​contain text, and the rows corresponding to the valley values ​​are blank between rows. In the vertical projection chart, the columns corresponding to the peak values ​​contain text, and the columns corresponding to the valley values ​​are blank between columns.

[0071] The horizontal projection shows that the blank spaces between rows are at rows 15 and 30, and the vertical projection shows that the blank spaces between columns are at columns 50 and 100.

[0072] Sliding window example: Assume that the average width of the retained text area is 100 pixels and the height is 40 pixels, so the size of the sliding window is defined as 50 pixels wide and 20 pixels high. During the sliding window process, it is found that the sum of the pixel values ​​in some windows exceeds the preset threshold, so these windows may contain text areas. Finally, 10 possible text areas are detected.

[0073] Merge example: Among the 10 detected text regions, 3 pairs of regions are adjacent and partially overlapped. After merging, 7 final text regions are obtained. According to the peaks and valleys in the projection map, the boundaries of these regions are adjusted to make them contain text more accurately.

[0074] Segmenting the text region into individual character regions and converting them into feature vectors includes the following steps:

[0075] Calculate the sum of the pixel values ​​of each column in the text area and generate a vertical projection map. In the vertical projection map, the valley value corresponds to the gap between characters, and the peak value corresponds to the column where the character is located. Perform connected domain analysis on each segmented character area, identify and extract the connected domain of each character, and ensure that each connected domain contains a character. Apply distance transformation to convert each foreground pixel in the binary image into the distance to the nearest background pixel. According to the distance transformation result, mark the foreground and background areas through thresholding operation. Apply the watershed algorithm to further segment the marked foreground and background areas, process connected characters, normalize each character image to the same size, such as 28x28 pixels, and convert the normalized character image into a feature vector based on the HOG feature method.

[0076] Example of vertical projection map: For a line of text, the vertical projection map can detect the gap positions between characters, such as the 10th column, 20th column, 30th column, etc., and the text line can be segmented into individual character areas based on these gap positions.

[0077] Connected component analysis example: In each character region, connected component analysis can identify the specific character shape and extract it as a single character region.

[0078] Watershed algorithm example: In the area of ​​connected characters, the watershed algorithm can effectively separate each individual character. For example, separate the connected characters such as "ll".

[0079] Example of feature vector conversion: flatten each 28x28 character image into a 784-dimensional vector, or extract the HOG features of the character image and convert them into feature vectors. The feature vectors include geometric features, shape features, texture features, and directional features.

[0080] Geometric features: such as character height, width, proportion, etc.;

[0081] Shape features: such as edges, contours, skeletons, etc.;

[0082] Texture features: such as local binary pattern (LBP), etc.

[0083] Directional features: such as Histogram of Oriented Gradients (HOG).

[0084] Matching the feature vector with a pre-trained character model to determine the character category, after determining the character category of all character regions of the invoice image data, recording the processing parameters of the invoice image data, including the following steps:

[0085] The character image to be recognized is matched with all character templates, the matching similarity is calculated, and the character template with the largest matching similarity is selected as the recognition result. The SVM model is trained using a pre-labeled character data set. Each feature vector corresponds to a character category. The feature vector of the character to be recognized is input into the trained SVM model, and the character category is output. After determining the character category of all character areas of the invoice image data, the processing parameters of the invoice image data are recorded. The processing parameters include the noise intensity of the invoice image after denoising, the clarity of the invoice image after image enhancement, and the tilt index of the invoice image after tilt correction.

[0086] Use the pre-labeled character dataset to train the SVM model. Each feature vector corresponds to a character category. Input the feature vector of the character to be recognized into the trained SVM model and output the character category. The following steps are included:

[0087] Collect a large number of character image samples, each sample corresponds to a character, annotate each sample, record its corresponding character category, and divide the data set into a training set and a test set. Usually 80% of the data is used as a training set and 20% of the data is used as a test set. The RBF kernel function is selected, and the feature vector of the training set and the corresponding character category are used to train the SVM model. The trained SVM model is evaluated using the test set, and the model's performance indicators such as accuracy, recall rate, and F1 score are calculated. The character image to be recognized is preprocessed and feature extracted to obtain a feature vector, which is input into the trained SVM model and the character category is output. This step belongs to the prior art and is not described in detail in this application.

[0088] The noise intensity calculation expression of the denoised invoice image is:

[0089] Where NL is the noise intensity of the denoised invoice image, I i is the gray value of the i-th pixel, n is the total number of pixels in the invoice image, and MeanIntensity is the average gray value. When the noise intensity of the invoice image after denoising is large, it indicates that there are a large number of noise points in the image, such as spots or stripes, that is, the quality of the invoice image after processing is low.

[0090] The clarity of the invoice image after image enhancement is obtained by calculating the high-frequency component of the image, and the expression is: HE = ∑ u,v |F(u,v)| 2 , where HE is the clarity of the invoice image after image enhancement, F(u,v) is the Fourier transform of the invoice image in the frequency domain, (u,v) is the frequency variable, and when the clarity of the invoice image after image enhancement is small, it indicates that the image is blurred or has low resolution, that is, the quality of the invoice image after processing is low;

[0091] F(u,v) is the Fourier transform of the invoice image in the frequency domain, and the calculation logic is:

[0092] Assume that the size of the invoice image I(x,y) is M×N, and the calculation expression of the two-dimensional discrete Fourier transform F(u,v) of the invoice image I(x,y) is: Where, u,v) is a frequency variable, and the value range of u is usually 0 to M-1, the value range of v is usually 0 to N-1, and I(x,y) is the pixel value of the invoice image in the spatial domain. is the complex exponential function, representing a fundamental sine wave with frequency (u,v).

[0093] The tilt index of the invoice image after tilt correction is obtained by calculating the tilt angle of the invoice image, and the expression is: Where TA is the tilt index of the invoice image after tilt correction, (x i ,y i ) is the coordinate of the i-th pixel in the invoice image, is the mean coordinate of all pixels, n is the total number of pixels of the invoice image, and when the tilt index of the invoice image after tilt correction is large, it indicates that the character area is tilted or distorted, that is, the quality of the invoice image after processing is low.

[0094] The search for registered invoices similar to the input invoice in the database using a fuzzy matching algorithm, allowing for a certain degree of error and inaccuracy, includes the following steps:

[0095] A fuzzy search tree (usually a Trie tree or its variant) is used to store the registered invoice information in the database. This tree structure allows for quick search of items similar to the input invoice. The Aho-Corasick algorithm is used to perform fuzzy matching in the invoice text. The algorithm can efficiently find the similarity between the string in the input invoice and the invoice text stored in the database. The Aho-Corasick algorithm can achieve fast multi-mode matching by building failure-links and output-functions based on the Trie tree. It is suitable for large-scale data sets, specifically:

[0096] Insert each invoice text string in the database into a Trie tree. A Trie tree is a prefix tree that can efficiently store and retrieve strings.

[0097] After the Trie tree is built, a failure pointer is added to each node through BFS (Breadth First Search). The failure pointer points to the next longest suffix node in the Trie tree, so that when the match fails, it can jump to the next possible matching position, improving the matching efficiency;

[0098] The output function is used to mark the output result corresponding to each node in the Trie tree. In the Aho-Corasick algorithm, the output function is usually used to indicate whether the string represented by the node in the Trie tree is the end point of the input pattern;

[0099] Use the Aho-Corasick algorithm for fuzzy matching. The steps are as follows:

[0100] Starting from the root node of the Trie tree, match the characters in the input invoice one by one;

[0101] If a matching character is found in the current node in the Trie tree, move to the next node to continue matching;

[0102] If a matching character cannot be found, move to the next possible position in the Trie tree according to the failure pointer until a match is found or the end of the Trie tree is reached;

[0103] When matching to a leaf node in the Trie tree, the matching results are collected according to the output function.

[0104] Calculating the comprehensive similarity index between the input invoice and all registered invoices includes the following steps:

[0105] Use edit distance or other similarity measurement methods to calculate the similarity between the input invoice string and the registered invoice. The calculation expression is:

[0106] edit_d = D[len(str1), len(str2)], where edit_d represents similarity, and D[len(str1), len(str2)] represents the edit distance between the first i characters of the string str1 and the first j characters of the string str2. Specifically, the string str1 can be represented as an input invoice image string, and the string str2 can be represented as a registration invoice image string;

[0107] By combining the similarities of multiple field strings for weighted matching, the overall matching accuracy can be improved. For example, the similarities of fields such as invoice number, date, and amount can be considered, and the matching results can be weighted to obtain a comprehensive similarity index. The expression is:

[0108] ZS=ω1*edit_d hm +ω2*edit_d rq +ω3*edit_d je , where ZS is the comprehensive similarity index, edit_d hm The similarity between the input invoice number string and the registered invoice number string, edit_d rq To determine the similarity between the input invoice date string and the registered invoice date string, edit_dje is the similarity between the input invoice amount string and the registered invoice amount string, ω1, ω2, ω3 are weight coefficients, and ω1+ω2+ω3=1.

[0109] If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice is registered in the database. If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice are analyzed to determine whether the input invoice needs to be re-scanned, and a corresponding management strategy is generated based on the analysis results, including the following steps:

[0110] The larger the comprehensive similarity index is, the more accurate the matching result of the input invoice in the database is. The index threshold is used to determine whether the input invoice matches the registered invoice in the database;

[0111] If the comprehensive similarity index between the input invoice and the registered invoice is greater than or equal to the index threshold, the input invoice is judged to match the registered invoice; if the comprehensive similarity index between the input invoice and the registered invoice is less than the index threshold, the input invoice is judged to not match the registered invoice;

[0112] If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice are analyzed. The processing parameters include the noise intensity of the invoice image after denoising, the clarity of the invoice image after image enhancement, and the tilt index of the invoice image after tilt correction. The representation parameters include the string format missing index.

[0113] The noise intensity of the denoised invoice image is normalized to obtain the noise normalization value. The clarity of the invoice image after image enhancement is normalized to obtain the clarity normalization value. The tilt index of the invoice image after tilt correction is normalized to obtain the tilt index normalization value. The missing index of the string format is normalized to obtain the missing index normalization value.

[0114] It should be noted that the normalization of each parameter in this application is implemented through a general normalization formula, which is used to map the value range of the parameter to between [0,1], and the expression is:

[0115] In the formula, g norn is the normalized value of the parameter, g is the original parameter, and g max is the maximum value of the parameter, g min is the minimum value of the parameter;

[0116] The noise normalization value, clarity normalization value, tilt index normalization value, and missing index normalization value are calculated comprehensively to obtain the image coefficient, and the expression is:

[0117] In the formula, is the image coefficient, Q norn is the missing index normalization value, NL norn is the noise normalization value, TA norn is the normalized value of the tilt index, HE norn is the clarity normalization value, α, β, and γ are the proportional coefficients of the noise normalization value, the tilt index normalization value, and the clarity normalization value, respectively, and α, β, and γ are all greater than 0.

[0118] The larger the image coefficient, the higher the overall quality of the input invoice image. The obtained image coefficient is compared with the quality threshold. The quality threshold is used to analyze whether the overall quality of the input invoice image meets the standard. If the image coefficient is less than the quality threshold, the overall quality of the input invoice image does not meet the standard. If the image coefficient is greater than or equal to the quality threshold, the overall quality of the input invoice image meets the standard.

[0119] When the overall quality of the input invoice image is not up to standard, it is determined that the input invoice needs to be re-scanned. If the number of consecutive scans exceeds 5 and the overall quality of the input invoice image is still not up to standard, the input invoice is marked and sent to the waiting management area, and the waiting management area information is sent to the administrator;

[0120] If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, and the overall quality of the input invoice image is analyzed to be up to standard, the input invoice is marked as a new format invoice and registered in the database, and the registration information is sent to the administrator.

[0121] Embodiment 3: The enterprise financial invoice management system based on the Internet of Things described in this embodiment includes a character category confirmation module, an invoice matching module, and a management module;

[0122] Character category confirmation module: After obtaining the invoice image data through the Internet of Things scanning device, pre-process it, extract the text area containing words from the pre-processed invoice image data, divide the text area into single character areas and convert it into feature vectors, match the feature vectors with the pre-trained character model, determine the character category, and after determining the character category of all character areas of the invoice image data, record the processing parameters of the invoice image data, send the processing parameters to the management module, and input the invoice information and send it to the management module;

[0123] Invoice matching module: uses fuzzy matching algorithm to search the database for registered invoices similar to the input invoice, allowing a certain degree of error and inaccuracy, and calculates the comprehensive similarity index between the input invoice and all registered invoices. The comprehensive similarity index is sent to the management module;

[0124] Management module: If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice will be registered in the database. If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice will be analyzed to determine whether the input invoice needs to be rescanned, and the corresponding management strategy will be generated based on the analysis results.

[0125] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0126] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0127] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0128] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for enterprise financial invoice management based on the Internet of Things, characterized by: The management method comprises the following steps: After acquiring the invoice image data through the IoT scanning device, it is sent to the management system for preprocessing based on the IoT. The text area containing the text is extracted from the preprocessed invoice image data, and the text area is segmented into single character areas and converted into feature vectors. The feature vectors are matched with the pre-trained character model to determine the character category. After determining the character categories of all character regions of the invoice image data, recording the processing parameters of the invoice image data, searching the database for registered invoices similar to the input invoice using a fuzzy matching algorithm, and calculating the comprehensive similarity index between the input invoice and all registered invoices; If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice will be registered in the database. If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice will be analyzed to determine whether the input invoice needs to be rescanned, and the corresponding management strategy will be generated based on the analysis results.

2. According to the method for enterprise financial invoice management based on the Internet of Things in claim 1, it is characterized by: Matching the feature vector with a pre-trained character model to determine the character category, after determining the character category of all character regions of the invoice image data, recording the processing parameters of the invoice image data, including the following steps: Match the character image to be recognized with all character templates, calculate the matching similarity, and select the character template with the largest matching similarity as the recognition result; Use a pre-labeled character dataset to train the SVM model. Each feature vector corresponds to a character category. Input the feature vector of the character to be recognized into the trained SVM model and output the character category. After determining the character categories of all character regions of the invoice image data, the processing parameters of the invoice image data are recorded, the processing parameters including the noise intensity of the invoice image after denoising, the clarity of the invoice image after image enhancement, and the tilt index of the invoice image after tilt correction.

3. According to the method for managing enterprise financial invoices based on the Internet of Things in claim 2, it is characterized by: Calculating the comprehensive similarity index between the input invoice and all registered invoices includes the following steps: The similarity between the input invoice string and the registered invoice is calculated using the edit distance, and the calculation expression is: edit_d = D[len(str1), len(str2)], where edit_d represents the similarity, D[len(str1), len(str2)] represents the edit distance between the first i characters of the string str1 and the first j characters of the string str1, the string str1 represents the input invoice image string, and the string str2 represents the registered invoice image string; The similarities of multiple field strings are combined for weighted matching, and the matching results are weighted calculated to obtain the comprehensive similarity index. The expression is: ZS=ω1*edit_d hm +ω2*edit_d rq +ω3*edit_d je , where ZS is the comprehensive similarity index, edit_d hm The similarity between the input invoice number string and the registered invoice number string, edit_d rq To determine the similarity between the input invoice date string and the registered invoice date string, edit_d je is the similarity between the input invoice amount string and the registered invoice amount string, ω1, ω2, ω3 are weight coefficients, and ω1+ω2+ω3=1.

4. According to the method for managing enterprise financial invoices based on the Internet of Things in claim 3, it is characterized by: Analyzing the processing parameters and characterization parameters of the input invoice to determine whether the input invoice needs to be re-scanned includes the following steps: The noise normalization value, clarity normalization value, tilt index normalization value, and missing index normalization value are calculated comprehensively to obtain the image coefficient, and the expression is: In the formula, is the image coefficient, Q norn is the missing index normalization value, NL norn is the noise normalization value, TA norn is the normalized value of the tilt index, HE norn is the clarity normalization value, α, β, and γ are the proportional coefficients of the noise normalization value, the tilt index normalization value, and the clarity normalization value, respectively, and α, β, and γ are all greater than 0; Compare the acquired image coefficient with the quality threshold. The quality threshold is used to analyze whether the overall quality of the input invoice image meets the standard. If the image coefficient is less than the quality threshold, the overall quality of the input invoice image does not meet the standard. If the image coefficient is greater than or equal to the quality threshold, the overall quality of the input invoice image meets the standard. When the overall quality of the input invoice image is analyzed to be not up to standard, it is determined that the input invoice needs to be rescanned. If the number of consecutive scans exceeds 5 times and the overall quality of the input invoice image is still not up to standard, the input invoice is marked and sent to the management area, and the management area information is sent to the administrator.

5. According to the method for managing enterprise financial invoices based on the Internet of Things according to claim 4, it is characterized by: Generate corresponding management strategies based on the analysis results, including the following steps: If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, and the overall quality of the input invoice image is analyzed to be up to standard, the input invoice is marked as a new format invoice and registered in the database, and the registration information is sent to the administrator.

6. According to the method for managing enterprise financial invoices based on the Internet of Things according to claim 5, it is characterized by: If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice are analyzed. The processing parameters include the noise intensity of the invoice image after denoising, the clarity of the invoice image after image enhancement, and the tilt index of the invoice image after tilt correction. The representation parameters include the string format missing index. The noise intensity of the denoised invoice image is normalized to obtain a noise normalization value. The clarity of the invoice image after image enhancement is normalized to obtain a clarity normalization value. The tilt index of the invoice image after tilt correction is normalized to obtain a tilt index normalization value. The missing index of the string format is normalized to obtain a missing index normalization value.

7. The enterprise financial invoice management method based on the Internet of Things according to claim 6 is characterized by: The process of registering the input invoice in the database includes the following steps: The larger the comprehensive similarity index is, the more accurate the matching result of the input invoice in the database is. The index threshold is used to determine whether the input invoice matches the registered invoice in the database; If the comprehensive similarity index between the input invoice and the registered invoice is greater than or equal to the index threshold, the input invoice is judged to match the registered invoice; if the comprehensive similarity index between the input invoice and the registered invoice is less than the index threshold, the input invoice is judged to not match the registered invoice; If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice will be registered in the database.

8. The enterprise financial invoice management method based on the Internet of Things according to claim 1 is characterized by: Extracting text regions containing words from preprocessed invoice image data includes the following steps: Use the connected domain analysis algorithm to identify all connected regions in the binary image, filter non-text regions based on the area and aspect ratio features of the connected domain, and retain the text region; Calculate the sum of the pixel values ​​of each row of the image to generate a horizontal projection image, and calculate the sum of the pixel values ​​of each column of the image to generate a vertical projection image; Detect peaks and valleys in the projection image, where the peaks correspond to the text area and the valleys correspond to the segmentation lines; The size of the sliding window is defined according to the size of the retained text area, the window is gradually slid in the image, the features of the pixel values ​​in the window are calculated, and the text area is identified according to the features of the pixel values ​​in the window; Adjacent and overlapping text regions are merged, and the boundaries of the text regions are adjusted according to the results of the projection map.

9. The enterprise financial invoice management method based on the Internet of Things according to claim 1 is characterized by: Segmenting the text region into individual character regions and converting them into feature vectors includes the following steps: Calculate the sum of the pixel values ​​of each column in the text area to generate a vertical projection map, in which the valley value corresponds to the gap between characters and the peak value corresponds to the column where the character is located; Perform connected domain analysis on each segmented character region to identify and extract the connected domain of each character; Apply a distance transform to convert each foreground pixel in the binary image into its distance to the nearest background pixel; According to the distance transformation result, the foreground and background areas are marked by thresholding operation; The watershed algorithm is applied to further segment the marked foreground and background areas, process the connected characters, normalize each character image to the same size, and convert the normalized character image into a feature vector based on the HOG feature method.

10. An enterprise financial invoice management system based on the Internet of Things, used to implement the management method according to any one of claims 1 to 9, characterized in that: It includes character category confirmation module, invoice matching module and management module; Character category confirmation module: After obtaining the invoice image data through the IoT scanning device, pre-process it, extract the text area containing the text from the pre-processed invoice image data, segment the text area into individual character areas and convert them into feature vectors, match the feature vectors with the pre-trained character model, determine the character category, and after determining the character categories of all character areas of the invoice image data, record the processing parameters of the invoice image data; Invoice matching module: uses fuzzy matching algorithm to search the database for registered invoices similar to the input invoice, and calculates the comprehensive similarity index between the input invoice and all registered invoices; Management module: If the comprehensive similarity index between the input invoice and any registered invoice is greater than or equal to the index threshold, the input invoice will be registered in the database. If the comprehensive similarity index between the input invoice and all registered invoices is less than the index threshold, the processing parameters and representation parameters of the input invoice will be analyzed to determine whether the input invoice needs to be rescanned, and the corresponding management strategy will be generated based on the analysis results.

Citation Information

Cited By

  • Financial management system and method based on big data

    CN119359469A