Artificial intelligence-based financial and tax bill risk intelligent auditing method

By deploying edge computing nodes on the enterprise gateway and using lightweight convolutional neural networks to extract physical feature vectors of tax invoices and determine layout anomalies, the problem of network bandwidth consumption and cloud server pressure during peak periods in the existing system has been solved, and efficient tax invoice risk auditing has been achieved.

CN122493478APending Publication Date: 2026-07-31HANGZHOU AOTEFISHI BIG DATA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610944263.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The existing financial and tax invoice risk audit system suffers from excessive network bandwidth consumption during peak periods, and cloud server computing power is occupied by low-level processing tasks, resulting in increased response latency.

Method used

Edge computing nodes are deployed on the enterprise gateway. Lightweight convolutional neural networks are used to extract physical feature vectors of financial and tax documents. Anomalies in the layout are determined based on Euclidean distance. The edge computing nodes extract image blocks and feature vectors of documents with abnormal layouts and transmit them to the cloud. For documents with normal layouts, only feature vectors are transmitted. The cloud performs character-level tampering detection and logical comparison of amounts.

Benefits of technology

It reduces network bandwidth consumption, alleviates the concurrent processing pressure on cloud servers, reduces response latency, and improves audit efficiency by adapting to changes in the emphasis of abnormal characteristics of invoices through dynamic weighting coefficients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493478A_ABST
    Figure CN122493478A_ABST
Patent Text Reader

Abstract

This invention relates to the field of edge computing and discloses an intelligent auditing method for financial and tax invoice risks based on artificial intelligence. An edge computing node receives an invoice image and extracts a physical feature vector composed of table line segment coordinates, seal pixel distribution, and text area proportions using a lightweight convolutional neural network. The Euclidean distance between this vector and a standard layout feature template is calculated. If the invoice is determined to have an abnormal layout, an image block of the abnormal area is extracted and encapsulated with the vector into a first data packet, which is then uploaded to a cloud server. If the invoice is determined to have a normal layout, the vector is encapsulated into a second data packet and uploaded to the cloud server. The cloud server uses a deep semantic recognition model to perform character-level tampering detection and monetary logic comparison on the first data packet, and outputs a risk probability value for the second data packet based on historical logs. This solution reduces network bandwidth consumption, alleviates cloud computing pressure, and shortens response latency through a layered transmission mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing and discloses an intelligent auditing method for financial and tax invoice risks based on artificial intelligence. Background Technology

[0002] Existing risk audits of financial and tax invoices typically employ a centralized processing architecture. Enterprises locally convert paper financial and tax invoices into high-resolution images using scanning terminals, and then upload the complete invoice images directly to a cloud server via the network. Upon receiving the image, the cloud server uses image processing technology to analyze the layout structure of the invoice image, extracting physical features such as table lines, seal areas, and text distribution. These extracted features are compared with standard formats to determine if any layout anomalies exist. After completing the layout analysis, the cloud server further performs text recognition and monetary logic verification on the image, comprehensively deriving a risk probability value.

[0003] In the aforementioned centralized processing architecture, the enterprise gateway serves only as a data transmission channel and does not participate in any computational tasks. During peak periods for document scanning, such as the end of the month or year, the concurrent uploading of massive amounts of high-resolution document images leads to a significant consumption of uplink network bandwidth, easily causing network congestion. Simultaneously, after receiving all the images, the cloud server needs to repeatedly perform basic preprocessing operations such as decoding and layout analysis for each image, causing a large portion of cloud computing power to be consumed by low-level processing tasks, resulting in increased response latency in the overall audit process. Summary of the Invention

[0004] The purpose of this invention is to provide an intelligent audit method for financial and tax invoice risks based on artificial intelligence, which can effectively solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: AI-based intelligent auditing methods for financial and tax invoice risks include: Edge computing nodes deployed on enterprise gateways receive images of financial and tax invoices uploaded by local scanning terminals; The edge computing node calls the built-in lightweight convolutional neural network to perform layout structure analysis on the tax invoice image and extract physical feature vectors including table line segment coordinates, seal pixel distribution, and text area proportion. The edge computing node calculates the Euclidean distance between the physical feature vector and the pre-stored standard layout feature template. When the Euclidean distance exceeds a preset distance threshold, it is determined to be an abnormal layout ticket; when the Euclidean distance does not exceed the preset distance threshold, it is determined to be a normal layout ticket. When a ticket is determined to have an abnormal layout, the edge computing node extracts the image block corresponding to the abnormal area of ​​the layout, encapsulates the image block and the physical feature vector into a first data packet, and transmits it to the cloud server. When the ticket is determined to be of normal format, the edge computing node encapsulates the physical feature vector into a second data packet and transmits it to the cloud server; After receiving the first data packet, the cloud server calls a deep semantic recognition model to perform character-level tampering detection and monetary logic comparison on the image blocks in the first data packet. After receiving the second data packet, the cloud server outputs a risk probability value in combination with historical audit logs.

[0006] Preferably, the edge computing node calls a built-in lightweight convolutional neural network to perform layout structure analysis on the tax invoice image, extracting physical feature vectors including table line segment coordinates, seal pixel distribution, and text area proportions, including: The lightweight convolutional neural network includes a feature extraction backbone network and a multi-branch detection head; The feature extraction backbone network performs convolutional pooling operations on the tax invoice image to output multi-scale feature maps. The multi-branch detection head includes a line segment detection branch, a seal detection branch, and a text region detection branch; The line segment detection branch performs pixel-level regression prediction on the multi-scale feature map and outputs the line segment feature matrix composed of the coordinates of the line segments in the table. The stamp detection branch performs binarization classification prediction on the multi-scale feature map and outputs the stamp mask matrix composed of the stamp pixel distribution. The text region detection branch performs bounding box regression prediction on the multi-scale feature map and outputs a text proportion vector composed of the proportion of the text regions. The edge computing node concatenates the line segment feature matrix, the stamp mask matrix, and the text proportion vector to generate the physical feature vector.

[0007] Preferably, the edge computing node calculates the Euclidean distance between the physical feature vector and the pre-stored standard template feature, including: The standard layout feature template includes a standard line segment feature matrix, a standard stamp mask matrix, and a standard text proportion vector that match the dimensions of the physical feature vector. The edge computing node calculates the first distance value between the standard line segment feature matrix corresponding to the coordinates of the table line segment and the line segment feature matrix, calculates the second distance value between the standard stamp mask matrix corresponding to the stamp pixel distribution and the stamp mask matrix, and calculates the third distance value between the standard text proportion vector corresponding to the text region proportion and the text proportion vector. The edge computing node obtains the dynamic weight coefficients corresponding to the first distance value, the second distance value and the third distance value, and performs a weighted summation of the first distance value, the second distance value and the third distance value to generate the Euclidean distance.

[0008] Preferably, the edge computing node extracts image blocks corresponding to abnormal areas on the page, encapsulates the image blocks and the physical feature vector into a first data packet, and transmits it to the cloud server, including: The edge computing node parses the feature dimensions in the Euclidean distance that exceed the preset distance threshold, and determines the image coordinate region corresponding to the feature dimensions that exceed the preset distance threshold as the initial abnormal region. The edge computing node expands and crops the boundary of the initial abnormal region according to the set expansion pixel ratio to generate the image block corresponding to the abnormal region of the layout. The edge computing node performs hash encoding and compression encoding on the image blocks to generate an image byte stream; The edge computing node encapsulates the image byte stream and the physical feature vector into a data frame, adds a frame header containing a ticket identifier and an abnormal dimension marker, and generates the first data packet; The edge computing node sends the first data packet to the cloud server through an encrypted tunnel.

[0009] Preferably, the edge computing node encapsulates the physical feature vector into a second data packet and transmits it to the cloud server, including: The edge computing node calls the principal component analysis algorithm to perform dimensionality reduction mapping on the physical feature vector, generating a dimensionality-reduced feature vector; The edge computing node obtains the current timestamp of the local system clock and the serial number of the tax invoice image; The edge computing node serializes the dimensionality-reduced feature vector, the current timestamp, and the serial number according to a set byte order to generate a feature sequence; The edge computing node adds check codes to the beginning and end of the feature sequence to generate the second data packet; The edge computing node stores the second data packet in an edge message queue. When the amount of data in the edge message queue reaches a preset queue length or the waiting time reaches a preset time window, the second data packet is transmitted in batches to the cloud server.

[0010] Preferably, after receiving the first data packet, the cloud server invokes a deep semantic recognition model to perform character-level tampering detection and monetary logical comparison on the image blocks in the first data packet, including: The deep semantic recognition model includes an optical character recognition sub-model and a graph neural network sub-model; The cloud server decapsulates and decompresses the first data packet to restore the image block; The optical character recognition sub-model performs character localization and recognition on the image block, and outputs the character sequence and the position coordinates of each character in the image block; The graph neural network sub-model constructs a topology graph with the characters as nodes and the spatial distance between the position coordinates as edges, updates the topology graph by message passing, and outputs the semantic feature vector of the character sequence. The cloud server matches the semantic feature vector with a standard tax semantic database, generates a character-level tampering detection result based on the matching deviation result, extracts the amount field from the character sequence for addition and subtraction logic verification, and outputs the amount logic comparison result.

[0011] Preferably, the seal detection branch performs binarization classification prediction on the multi-scale feature map and outputs a seal mask matrix composed of the seal pixel distribution, including: The seal detection branch upsamples the multi-scale feature map to generate a target feature map with the same size as the tax invoice image. The stamp detection branch performs a sigmoid activation function calculation on each pixel in the target feature map and outputs a pixel probability value. The edge computing node assigns pixels with a probability value greater than a set probability threshold to the stamp candidate region, and assigns pixels with a probability value less than the set probability threshold to the background region. The edge computing node performs a morphological closing operation on the candidate seal region to fill the holes inside the candidate seal region; The edge computing node counts the total number of pixels and the set of coordinates within the candidate area of ​​the seal after morphological closing operation, and arranges the total number of pixels and the set of coordinates according to the matrix dimension to generate the seal mask matrix.

[0012] Preferably, the edge computing node acquires dynamic weight coefficients corresponding to the first distance value, the second distance value, and the third distance value, including: The edge computing node maintains a local anomaly feature log table, which records the anomaly feature dimension labels corresponding to the anomaly tickets in the historical layout. The edge computing node counts the frequency of anomalies in the abnormal feature dimension labels pointing to table line segments, seals, and text regions within a set time period. The edge computing node calculates the first proportion of the frequency data corresponding to the table line segment anomaly in the total frequency data, calculates the second proportion of the frequency data corresponding to the seal anomaly in the total frequency data, and calculates the third proportion of the frequency data corresponding to the text region anomaly in the total frequency data. The edge computing nodes perform normalization processing on the first proportion, the second proportion, and the third proportion, respectively, and use the normalized values ​​as dynamic weight coefficients for the corresponding first distance value, second distance value, and third distance value.

[0013] Preferably, the edge computing node expands and crops the boundary of the initial abnormal region according to a set expansion pixel ratio to generate an image block corresponding to the abnormal region of the layout, including: The edge computing node obtains the geometric center coordinates of the initial abnormal region and calculates the minimum pixel distance from the geometric center coordinates to the four edges of the tax invoice image; The edge computing node calculates the product of the minimum pixel distance and the set basic expansion ratio to generate the maximum safe expansion pixel value; The edge computing node obtains the real-time load rate of the central processing unit in the edge computing node, and queries the corresponding compression level in a preset mapping table based on the real-time load rate; The edge computing node selects a target compression algorithm from a preset set of compression algorithms according to the compression level; The edge computing node performs outward cropping of the boundary of the initial abnormal region according to the maximum safe extended pixel value, and calls the target compression algorithm to encode the cropped image region to generate the image block corresponding to the abnormal region of the layout.

[0014] Preferably, the cloud server matches the semantic feature vector with a standard tax semantic database, and generates a character-level tampering detection result based on the matching deviation result, including: The standard tax semantic library stores the standard character pattern feature vectors corresponding to each character. The cloud server extracts single-character feature vectors one by one from the semantic feature vector; The cloud server calculates the cosine similarity between the single-character feature vector and the standard character pattern feature vector of the corresponding category; When the cosine similarity is lower than a set similarity threshold, the cloud server segments the single-character image corresponding to the single-character feature vector from the image block; The cloud server performs skeletonization extraction on the single-character image to generate a set of pixel skeleton points. The cloud server calculates the Hausdorff distance between the pixel skeleton point set and the standard skeleton point set corresponding to the standard character feature vector, marks single characters whose Hausdorff distance is greater than a set distance threshold as tampered characters, and summarizes the tampered characters to generate the character-level tampering detection result.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention extracts physical feature vectors by deploying lightweight convolutional neural networks on edge computing nodes within an enterprise gateway. It then determines layout anomalies based on the Euclidean distance from the standard layout feature template. For tickets with normal layouts, only the physical feature vectors are uploaded; for tickets with abnormal layouts, only the extracted abnormal region image blocks and their physical feature vectors are uploaded. This dynamic data layering transmission mechanism, based on initial risk screening results, transforms the transmission of the original high-resolution full image into the transmission of low-dimensional feature vectors and local image blocks. This reduces network bandwidth consumption during transmission and avoids the need for cloud servers to decode the full original image and perform basic layout preprocessing, thus alleviating the concurrent processing pressure on cloud servers.

[0016] 2. This invention decomposes the physical feature vector into a line segment feature matrix, a seal mask matrix, and a text proportion vector, and assigns dynamic weight coefficients to the corresponding distance values ​​based on frequency data from a historical anomaly feature log table. This allows distance calculation to adapt to changes in the emphasis of anomaly features in different periods. During the capture of anomaly images, the minimum pixel distance from the geometric center of the initial anomaly region to the image edge is calculated, and the maximum safe expansion pixel value is determined by combining it with the real-time load rate, ensuring that the boundary of the captured image block is within the original image range. After receiving data in the cloud, a graph neural network sub-model is used to construct a topological graph with characters as nodes and spatial distances as edges for message passing and updating. Semantic feature vectors are generated using the spatial positional relationships between characters for tamper detection. Attached Figure Description

[0017] Figure 1 This is the overall flowchart of the intelligent audit of financial and tax invoice risks in this invention; Figure 2 This is a flowchart illustrating the lightweight convolutional neural network structure and feature extraction process of this invention. Figure 3This is a flowchart of the dynamic weight coefficient calculation and weighted Euclidean distance generation process of the present invention; Figure 4 This is a flowchart of the image block extraction and first data packet encapsulation process for abnormal ticket layouts according to the present invention. Figure 5 This is a flowchart illustrating the feature dimensionality reduction and batch transmission of the second data packet for a normal-format invoice according to the present invention. Figure 6 This is a flowchart of the cloud-based deep semantic recognition and character-level tampering detection process of the present invention. Detailed Implementation

[0018] Please refer to the attached document. Figure 1 This embodiment provides an AI-based intelligent audit method for tax and financial invoice risks. An edge computing node deployed on an enterprise gateway receives tax and financial invoice images uploaded by a local scanning terminal via a local area network link. A point-to-point communication link based on the TCP / IP protocol is established between the local scanning terminal and the enterprise gateway. After the scanning terminal completes image acquisition of the paper tax and financial invoices, it sends the generated digital image to the edge computing node through a preset transmission interface. The edge computing node performs format and integrity checks on the received digital image. Images that pass the checks are used as tax and financial invoice images for subsequent processing. Format checks include compliance checks on image file format, color space, and bit depth; integrity checks include verification and validation of the image file to ensure that the received image file has not been lost or damaged during transmission.

[0019] Edge computing nodes utilize a built-in lightweight convolutional neural network to parse the layout structure of tax invoice images, extracting physical feature vectors including table line coordinates, seal pixel distribution, and text area proportion. The lightweight convolutional neural network is pre-trained and quantized, deployed on the local storage unit of the edge computing node. The model's inference process is entirely executed locally on the edge computing node, without relying on cloud computing power. The layout structure parsing process involves locating and quantizing the layout elements of the tax invoice image. The extracted physical feature vector includes three core features: table line coordinates, seal pixel distribution, and text area proportion. These three features correspond to the structured table elements, seal elements, and text elements of the invoice layout, respectively. After dimensional alignment, the three features are concatenated into a one-dimensional physical feature vector.

[0020] Table 1. Dimensional Composition and Corresponding Physical Meaning of Physical Feature Vectors:

[0021] The physical feature vector has a total dimension of 576, of which 256 dimensions correspond to the table line segment coordinate feature, 256 dimensions to the seal pixel distribution feature, and 64 dimensions to the text area proportion feature. The dimensional division of these three types of features perfectly matches the dimensions of the pre-stored standard layout feature template, ensuring the correspondence of feature dimensions in subsequent distance calculations. Within the dimensions of the table line segment coordinate feature, the first 128 dimensions correspond to the x and y coordinates of the start and end points of the horizontal table line segments, and the latter 128 dimensions correspond to the x and y coordinates of the start and end points of the vertical table line segments, which can completely represent the row and column structure and cell division of the table within the ticket layout.

[0022] Within the dimensions of the stamp pixel distribution feature, the first 128 dimensions correspond to the bounding rectangle coordinates of the stamp area and the total number of pixels, while the latter 128 dimensions correspond to the set of coordinates of the effective pixels within the stamp area. This comprehensively represents the stamp's position, size, and pixel coverage within the document layout. Within the dimensions of the text area proportion feature, the first 32 dimensions correspond to the bounding box coordinates of each text area within the document layout, while the latter 32 dimensions correspond to the area of ​​each text area and its proportion within the document layout. This comprehensively represents the distribution and coverage ratio of the text content within the document layout.

[0023] Edge computing nodes calculate the Euclidean distance between the physical feature vector and the pre-stored standard format feature template. If the Euclidean distance exceeds a preset threshold, the document is considered to have an abnormal format; otherwise, it is considered to have a normal format. The pre-stored standard format feature templates are stored in the local template library of the edge computing nodes. This library contains standard format feature templates for different document types, including common tax document types such as VAT special invoices, VAT general invoices, electronic invoices, and fixed-amount invoices.

[0024] After receiving an image of a tax invoice, the edge computing node first matches the invoice type based on its features, then retrieves a standard layout feature template that matches that invoice type, ensuring consistency in the feature comparison benchmark. The Euclidean distance is calculated by taking the square root of the sum of the squares of the differences between the physical feature vector and the corresponding feature values ​​in the standard layout feature template. The result characterizes the degree of difference between the layout features of the invoice to be detected and the standard layout. The corresponding calculation formula is: ; in, The Euclidean distance between the physical feature vector and the standard feature template is given. The total dimension of the physical feature vector. The first physical feature vector eigenvalues ​​of dimension For the standard layout feature template, the first The standard eigenvalues ​​of a dimension.

[0025] Edge computing nodes are pre-set with a distance threshold, which is based on the fluctuation range of the layout characteristics of the corresponding invoice type, and is used to distinguish between invoices with normal layout and invoices with abnormal layout. When the Euclidean distance exceeds the preset distance threshold, the edge computing node determines that the tax invoice is an invoice with abnormal layout; when the Euclidean distance does not exceed the preset distance threshold, the edge computing node determines that the tax invoice is an invoice with normal layout.

[0026] When a document is identified as having layout anomalies, the edge computing node extracts an image patch corresponding to the abnormal area. This image patch, along with a physical feature vector, is encapsulated into a first data packet and transmitted to the cloud server. The edge computing node first locates the abnormal feature dimension causing the Euclidean distance to exceed a preset threshold. Based on the physical meaning of this abnormal feature dimension, it determines the coordinate region corresponding to that abnormal feature in the document image; this coordinate region is the layout anomaly area. Based on the coordinates of the layout anomaly area, the edge computing node crops an image patch corresponding to the area from the original document image. The size of the image patch matches the boundary range of the layout anomaly area, ensuring complete coverage of the document area corresponding to the abnormal feature. The edge computing node encapsulates the cropped image patch with the previously extracted physical feature vector to generate a first data packet, which is then transmitted to the cloud server through a pre-established encrypted tunnel. The encrypted tunnel uses the IPSec protocol to ensure the security and integrity of data transmission, preventing the document data from being stolen or tampered with during transmission.

[0027] When a ticket is determined to be of normal format, the edge computing node encapsulates the physical feature vector into a second data packet and transmits it to the cloud server. The edge computing node serializes the physical feature vector, adds corresponding ticket identification and verification information, and generates the second data packet. The edge computing node then transmits the second data packet to the cloud server through an encrypted tunnel. This transmission can be done in batches, uploading the second data packets corresponding to multiple normal-format tickets together within a preset time window, reducing the number of network connection establishments and lowering transmission overhead.

[0028] After receiving the first data packet, the cloud server invokes a deep semantic recognition model to perform character-level tampering detection and monetary logic comparison on the image blocks in the first data packet. Upon receiving the second data packet, the cloud server combines historical audit logs to output a risk probability value. The cloud server maintains a bill risk audit processing platform, including a data receiving module, a model inference module, a risk assessment module, and a log storage module. After receiving data packets from edge computing nodes, the cloud server first decapsulates and verifies the data packets. If the verification passes, the corresponding processing flow is executed according to the data packet type.

[0029] For the first data packet, the cloud server decapsulates and restores the image blocks and physical feature vectors. It then calls a pre-trained deep semantic recognition model to perform character recognition and semantic analysis on the image blocks, performing character-level tampering detection. Simultaneously, it extracts the identified amount fields and performs a logical comparison to determine if the logical relationship between the amount fields conforms to the tax invoice filling specifications. For the second data packet, the cloud server decapsulates and restores the physical feature vectors. It retrieves the historical audit logs of the company corresponding to the invoice. These logs store the feature data, audit results, and risk marking information of the invoices uploaded by the company in the past. The cloud server performs correlation analysis between the current physical feature vector and the feature data in the historical audit logs, outputting the risk probability value corresponding to the invoice. The risk probability value ranges from 0 to 1, with a higher value indicating a higher probability of risk.

[0030] In this embodiment, the layout feature extraction and initial screening of the ticket image are completed by the edge computing node deployed in the enterprise gateway. Based on the initial screening results, a differentiated data transmission strategy is executed. For tickets with normal layout, only low-dimensional physical feature vectors are transmitted. For tickets with abnormal layout, only image blocks and physical feature vectors of the abnormal areas are transmitted. There is no need to upload the full set of high-resolution ticket images to the cloud, which reduces the bandwidth consumption of the uplink network. At the same time, the calculation tasks of layout parsing and initial screening are pushed to the edge, avoiding the cloud server from repeatedly performing the basic preprocessing operations of the full set of ticket images, thus reducing the computing load on the cloud.

[0031] Please refer to the attached document. Figure 2 In another embodiment, the lightweight convolutional neural network built into the edge computing node includes a feature extraction backbone network and a multi-branch detection head. The feature extraction backbone network is used to extract features at multiple scales from the input tax invoice image, outputting multi-scale feature maps containing semantic information at different levels. The multi-branch detection head is used to process the multi-scale feature maps in parallel, outputting feature data corresponding to different layout elements. The feature extraction backbone network is constructed using a depthwise separable convolutional structure. Depthwise separable convolution decomposes standard convolution into two steps: depthwise convolution and pointwise convolution. While ensuring feature extraction capabilities, it reduces the number of model parameters and computational cost, adapting to the computing power environment of the edge computing node. The feature extraction backbone network comprises multiple sequentially connected convolutional modules. Each convolutional module includes a depthwise convolutional layer, a batch normalization layer, an activation function layer, and a pointwise convolutional layer. The input tax invoice image is processed sequentially through these modules, generating multi-scale feature maps of different resolutions. These multi-scale feature maps contain shallow details such as edges and textures, as well as deep semantic and structural features, simultaneously adapting to the detection needs of different layout elements such as line segments, seals, and text regions. The core calculation formula for convolution operations is: ; in, To output the coordinates in the feature map eigenvalues ​​at that location The input feature map contains the pixel value at the corresponding coordinates. The size of the convolution kernel. Coordinates in the convolution kernel The weight value at that point, This is the bias term for the convolutional layer.

[0032] The multi-branch detection head includes a line segment detection branch, a seal detection branch, and a text region detection branch. These three branches process the multi-scale feature maps output by the feature extraction backbone network in parallel, and output the corresponding feature data respectively. The line segment detection branch performs pixel-level regression prediction on the multi-scale feature maps, outputting a line segment feature matrix composed of the coordinates of table line segments. The line segment detection branch contains multiple upsampling layers and regression prediction layers. The upsampling layers upsample the multi-scale feature maps to the same size as the input tax invoice image. The regression prediction layers perform regression prediction on each pixel, outputting the probability value of the pixel belonging to a table line segment and the direction parameter of the line segment. The start and end coordinates of the table line segments are fitted based on the probability value and direction parameter. The coordinates of all table line segments are arranged in a preset order to form the line segment feature matrix. The dimension of the line segment feature matrix is ​​completely matched with the dimension of the standard line segment feature matrix in the pre-stored standard layout feature template, ensuring dimensional alignment for subsequent distance calculations.

[0033] The seal detection branch performs binarization classification prediction on the multi-scale feature map, outputting a seal mask matrix composed of the seal pixel distribution. Specifically, the seal detection branch upsamples the multi-scale feature map to generate a target feature map with the same size as the tax invoice image. The seal detection branch then performs a sigmoid activation function calculation on each pixel in the target feature map, outputting a pixel probability value. The corresponding calculation formula is as follows: ; in, For the pixel points in the target feature map The corresponding pixel probability value, The pixels in the target feature map output by the stamp detection branch The corresponding eigenvalues.

[0034] Edge computing nodes assign pixels with probability values ​​greater than a set probability threshold to the stamp candidate region, and pixels with probability values ​​less than the set probability threshold to the background region. The set probability threshold is pre-defined based on the accuracy requirements of stamp detection and is used to distinguish stamp pixels from background pixels. The edge computing nodes perform morphological closing operations on the stamp candidate region to fill the holes within the region; the corresponding calculation formula is as follows: ; in, This is the binary image matrix corresponding to the candidate regions of the seal. For morphological operations, it is a structural element. This is the expansion operator. For the erosion operator, This is the binary image matrix after the closing operation.

[0035] Morphological closing operations first perform dilation on the candidate stamp region, followed by erosion. This fills in small holes within the region and connects adjacent discrete pixels without altering its overall position and size, resulting in a more complete outline. Edge computing nodes count the total number of pixels and their coordinates within the candidate stamp region after the morphological closing operation. These are then arranged according to matrix dimensions to generate a stamp mask matrix. The stamp mask matrix is ​​a binary matrix; elements with a value of 1 correspond to pixels in the stamp region, and elements with a value of 0 correspond to pixels in the background region. The matrix dimensions perfectly match those of the standard stamp mask matrix in the pre-stored standard template.

[0036] The text region detection branch performs bounding box regression prediction on multi-scale feature maps, outputting a text proportion vector composed of the proportions of text regions. The text region detection branch contains multiple convolutional layers and bounding box regression layers. The bounding box regression layer locates text regions in the multi-scale feature maps, outputting the top-left corner coordinates, width, and height of the bounding boxes corresponding to each text region. Based on the bounding box parameters, it calculates the area of ​​each text region and its proportion in the total area of ​​the tax invoice image. All bounding box parameters and proportion data for all text regions are arranged in a preset order to form the text proportion vector. The dimension of the text proportion vector perfectly matches the dimension of the standard text proportion vector in the pre-stored standard layout feature template.

[0037] The edge computing node concatenates the line segment feature matrix, the stamp mask matrix, and the text proportion vector to generate a physical feature vector. First, the edge computing node flattens the line segment feature matrix and the stamp mask matrix, converting them into one-dimensional vectors. Then, it concatenates the flattened line segment feature vector, the flattened stamp mask vector, and the text proportion vector according to a preset dimensional order to generate a one-dimensional physical feature vector. During the concatenation process, the vector dimensions corresponding to the three features remain fixed, completely consistent with the dimensional division of the standard feature template, ensuring that the dimensions correspond in subsequent feature comparisons.

[0038] Table 2 Output Feature Parameters of Lightweight Convolutional Neural Network Multi-Branch Detection Head:

[0039] The three detection branches share the multi-scale feature map output by the feature extraction backbone network, eliminating the need for separate feature extraction operations and reducing the overall computational load and inference latency of the model. The output dimensions of the three detection branches are pre-defined to perfectly match the dimensionality of the standard feature template, ensuring that the output feature data can be directly used for subsequent distance calculations and anomaly detection without additional dimensional transformation or alignment operations. The line segment detection branch's output dimension can cover the coordinate data of up to 64 horizontal and 64 vertical line segments within the document layout, adapting to the table structure of most tax and financial documents. The seal detection branch's output dimension can cover the pixel distribution data of up to two seal areas within the document layout, adapting to the detection requirements of seals such as invoice seals and financial seals on tax and financial documents. The text region detection branch's output dimension can cover the bounding boxes and proportion data of up to 16 text regions within the document layout, adapting to the text distribution features of tax and financial documents.

[0040] In this embodiment, a lightweight convolutional neural network containing a feature extraction backbone network and a multi-branch detection head is used to achieve parallel detection and feature extraction of layout elements of financial and tax invoice images. The three detection branches perform targeted feature extraction for three core layout elements: table line segments, seals, and text regions. The output feature data can completely represent the layout structure features of the invoice. At the same time, the model adopts a depthwise separable convolutional structure with low parameter and computational cost, and can achieve efficient inference in the local environment of edge computing nodes without relying on cloud computing power support.

[0041] Please refer to the attached document. Figure 3 In another embodiment, the standard layout feature template pre-stored by the edge computing node includes a standard line segment feature matrix, a standard stamp mask matrix, and a standard text proportion vector that match the dimensions of the physical feature vector. The standard line segment feature matrix, the standard stamp mask matrix, and the standard text proportion vector correspond to the table line segment coordinate features, stamp pixel distribution features, and text region proportion features in the physical feature vector, respectively. The dimensions of the three standard features are completely consistent with the dimensions of the corresponding physical features. The edge computing node calculates the first distance value between the standard line segment feature matrix and the line segment feature matrix corresponding to the table line segment coordinates, the second distance value between the standard stamp mask matrix and the stamp mask matrix corresponding to the stamp pixel distribution, and the third distance value between the standard text proportion vector and the text proportion vector corresponding to the text region proportion. The edge computing node divides the physical feature vector according to a preset dimension, decomposing it into line segment feature sub-vectors corresponding to the line segment feature matrix, stamp feature sub-vectors corresponding to the stamp mask matrix, and text feature sub-vectors corresponding to the text proportion vector. The three sub-vectors are then used to calculate the Euclidean distance with the corresponding standard feature vectors in the standard layout feature template, respectively, to obtain the first distance value, the second distance value, and the third distance value.

[0042] The edge computing node obtains the dynamic weight coefficients of the corresponding first, second, and third distance values, and then performs a weighted sum of the first, second, and third distance values ​​to generate the final Euclidean distance used for anomaly detection. The corresponding calculation formula is as follows: ; in, The Euclidean distance generated by weighted summation. The first distance value, This is the second distance value. This is the third distance value. The dynamic weight coefficient corresponding to the first distance value. The dynamic weight coefficient corresponding to the second distance value. Let be the dynamic weight coefficient corresponding to the third distance value, and satisfy . .

[0043] Edge computing nodes maintain a local anomaly feature log table, recording the anomaly feature dimension labels corresponding to historically abnormal ticket layouts. These labels mark the feature dimension categories in historically abnormal tickets that cause the Euclidean distance to exceed a threshold. These categories include three types of labels: table line segment anomalies, seal anomalies, and text region anomalies, corresponding to anomalies in line segment feature sub-vectors, seal feature sub-vectors, and text feature sub-vectors, respectively. After determining the layout anomaly of each ticket, if the edge computing node classifies it as an abnormal ticket, it writes the corresponding anomaly feature dimension label to the local anomaly feature log table and records the write timestamp for subsequent frequency statistics.

[0044] Edge computing nodes statistically analyze the frequency of anomalies (table line segment anomalies, seal anomalies, and text area anomalies) within a set time period. The set time period can be adjusted according to the business cycle of document auditing, such as a calendar month or quarter, to ensure that the statistical frequency data reflects the distribution of document anomalies within the current time period. The frequency data collection process involves classifying and counting the anomaly feature dimension labels within the set time period, specifically counting the occurrences of the table line segment anomaly label, the seal anomaly label, and the text area anomaly label, thus obtaining the frequency data corresponding to the three types of anomalies.

[0045] The edge computing nodes calculate the first percentage of frequency data corresponding to table line segment anomalies in the total frequency data, the second percentage of frequency data corresponding to seal anomalies, and the third percentage of frequency data corresponding to text region anomalies. The total frequency data is the sum of the frequency data corresponding to the three types of anomalies. The first percentage is the frequency data of table line segment anomalies divided by the total frequency data, the second percentage is the frequency data of seal anomalies divided by the total frequency data, and the third percentage is the frequency data of text region anomalies divided by the total frequency data.

[0046] The edge computing nodes perform normalization processing on the first proportion, the second proportion, and the third proportion, respectively, and use the normalized values ​​as dynamic weight coefficients for the corresponding first distance value, second distance value, and third distance value. The corresponding calculation formula is as follows: ; in, For the first The dynamic weight coefficients corresponding to the class of exceptions For the first Frequency data corresponding to different types of exceptions The values ​​are 1, 2, and 3, which correspond to table line segment abnormalities, seal abnormalities, and text area abnormalities, respectively.

[0047] The sum of the three dynamic weight coefficients after normalization is 1, satisfying the weighted summation constraint. The dynamic weight coefficients are automatically updated based on the frequency of anomalies within a set time period. When the frequency of a certain type of anomaly increases, the corresponding dynamic weight coefficient increases accordingly, enhancing the influence of the distance value corresponding to that type of feature on the final result during distance calculation. This ensures that the distance calculation can adapt to changes in the emphasis of anomaly features on documents over different periods. For example, when the frequency of seal anomalies increases within a set time period, the dynamic weight coefficient corresponding to the second distance value increases, making the impact of seal anomalies on the final Euclidean distance more significant and improving the sensitivity of detecting seal-anomaly documents.

[0048] Table 3. Correspondence between anomaly frequency data and dynamic weight coefficients:

[0049] The statistical period in this table is a calendar month, with a total frequency of 100 occurrences. The frequencies of the three types of anomalies are 32, 45, and 23, respectively, corresponding to percentages of 0.32%, 0.45%, and 0.23%. The dynamic weighting coefficients obtained after normalization are consistent with these percentages. Under this set of weighting coefficients, the second distance value corresponding to seal anomalies has the highest weight, indicating that seal anomalies are the most common type of document layout anomalies within this statistical period. The distance calculation process will focus on the differences between seal features and the standard layout to improve the detection capability of documents with seal anomalies. When the anomaly frequency data changes within the statistical period, the dynamic weighting coefficients will be updated synchronously to always match the current distribution of anomaly features.

[0050] In this embodiment, the physical feature vector is decomposed into three feature sub-vectors corresponding to different page elements, and the distance values ​​between each sub-vector and the standard feature are calculated. Then, dynamic weight coefficients are assigned to each distance value in combination with the frequency data of historical abnormal features, and the final weighted Euclidean distance is generated for page anomaly determination. This allows the benchmark for anomaly determination to be dynamically adjusted according to historical anomalies, adapting to changes in the characteristics of abnormal bills in different periods, and improving the accuracy and adaptability of page anomaly determination.

[0051] Please refer to the attached document. Figure 4 In this embodiment, after the edge computing node determines that the tax invoice is an abnormal document, it analyzes the feature dimensions that exceed a preset distance threshold in the Euclidean distance and identifies the image coordinate regions corresponding to these feature dimensions as initial abnormal regions. During the calculation of the weighted Euclidean distance, the edge computing node simultaneously records the difference between the feature value and the standard feature value for each feature dimension. When the difference for a certain feature dimension exceeds a preset difference threshold, that dimension is determined to be an abnormal feature dimension. Based on the feature category corresponding to the abnormal feature dimension, the edge computing node determines the coordinate region corresponding to that dimension in the tax invoice image. The union of the coordinate regions corresponding to all abnormal feature dimensions is the initial abnormal region.

[0052] The edge computing node expands and crops the boundary of the initial abnormal region according to the set expansion pixel ratio, generating image blocks corresponding to the abnormal regions on the page. The edge computing node first obtains the bounding rectangle boundary of the initial abnormal region, calculates the geometric center coordinates of the bounding rectangle, and then calculates the pixel distances from the geometric center coordinates to the top, bottom, left, and right edges of the tax document image. The minimum of these four pixel distances is taken, and the product of this minimum pixel distance and the set basic expansion ratio is calculated to generate the maximum safe expansion pixel value. The corresponding calculation formula is as follows: ; in, To maximize the safe extension of pixel values, Let be the minimum pixel distance from the geometric center coordinates of the initial anomaly region to the four edges of the tax invoice image. The set basic expansion ratio, The value range is from 0 to 1.

[0053] Basic expansion ratio The resolution of the invoice image is preset to control the extent of outward cropping, ensuring that the boundaries of the expanded image blocks do not exceed the original tax invoice image and avoiding cropping into meaningless background areas. Edge computing nodes obtain the real-time load rate of their central processing unit (CPU) and look up the corresponding compression level in a preset mapping table based on this load rate. The real-time load rate represents the current CPU utilization and indicates the current computing power load of the edge computing node. The preset mapping table stores compression levels corresponding to different load rate ranges. Higher compression levels correspond to higher compression ratios, resulting in smaller image block file sizes but requiring higher decoding computing power. Edge computing nodes adjust the compression level based on the real-time load rate. When the real-time load rate is high, a lower compression ratio is selected to reduce encoding computing power consumption at the edge; when the real-time load rate is low, a higher compression ratio is selected to further reduce the image block file size and reduce transmission bandwidth consumption.

[0054] Edge computing nodes select a target compression algorithm from a pre-set set of compression algorithms based on the compression level. This set includes both lossless and lossy compression algorithms, each corresponding to a different compression level. The edge computing nodes then expand and crop the boundaries of the initial anomalous region according to the maximum safe expansion pixel value, obtaining an expanded image region. The target compression algorithm is then called to encode the cropped image region, generating image blocks corresponding to the anomalous areas on the page.

[0055] Edge computing nodes perform hash encoding and compression encoding on image blocks to generate an image byte stream. Hash encoding uses the SHA-256 algorithm to generate a hash value for each image block, which is used for subsequent integrity verification of the image blocks by the cloud. The edge computing node encapsulates the image byte stream and physical feature vector into a data frame, adding a frame header containing the invoice identifier and anomaly dimension markers to generate the first data packet. The invoice identifier is a unique identification number corresponding to the tax invoice, used to distinguish different invoices; the anomaly dimension marker is used to mark the anomaly feature dimension category corresponding to the invoice, facilitating the cloud server to quickly locate abnormal areas and perform targeted processing. The edge computing node sends the first data packet to the cloud server through an encrypted tunnel established using the TLS 1.3 protocol to ensure the security of data transmission.

[0056] Please refer to the attached document. Figure 5After the edge computing node determines that the tax invoice is a normal format invoice, it calls the principal component analysis algorithm to perform dimensionality reduction mapping on the physical feature vector, generating a dimensionality-reduced feature vector. The corresponding calculation formula is as follows: ; in, For dimensionality reduction feature vectors, This is the original physical feature vector. The projection matrix is ​​obtained through pre-training of principal component analysis. The column vectors of the projection matrix are the principal component eigenvectors of the physical eigenvectors.

[0057] The projection matrix of the principal component analysis algorithm is pre-trained using a large number of physical feature vector samples of invoices. This reduces the original 576-dimensional physical feature vector to 64 dimensions while retaining over 95% of the effective information, significantly reducing the amount of feature vector data and further lowering transmission bandwidth usage. Edge computing nodes acquire the current timestamp of the local system clock and the serial number of the tax invoice image. The current timestamp marks the processing time of the invoice, and the serial number is the acquisition sequence number of the invoice in the local scanning terminal, used for invoice traceability and verification.

[0058] Edge computing nodes serialize the reduced-dimensional feature vector, current timestamp, and serial number according to a predefined byte order to generate a feature sequence. The serialization uses little-endian byte order to ensure the cloud server can deserialize the data using the same byte order. Edge computing nodes add checksums to the beginning and end of the feature sequence to generate a second data packet. The checksum uses a cyclic redundancy check (CRC) for the cloud server to verify the integrity of the feature sequence. Edge computing nodes store the second data packet in an edge message queue. When the data volume in the edge message queue reaches a preset queue length or the waiting time reaches a preset time window, the second data packet is transmitted in batches to the cloud server. The edge message queue uses a first-in, first-out (FIFO) storage mechanism. The preset queue length and preset time window can be adjusted according to business needs. Batch transmission reduces the number of network connection establishments, lowering transmission overhead and network resource consumption.

[0059] Please refer to the attached document. Figure 6After receiving the first data packet, the cloud server invokes a deep semantic recognition model to perform character-level tampering detection and monetary logic comparison on the image blocks within the first data packet. The deep semantic recognition model includes an optical character recognition sub-model and a graph neural network sub-model. These two sub-models process sequentially to complete the semantic analysis and tampering detection of the image blocks. The cloud server decapsulates and decompresses the first data packet, restoring the image blocks and physical feature vectors. It then performs integrity verification on the image blocks. If the verification passes, the image blocks are input into the optical character recognition sub-model. The optical character recognition sub-model performs character localization and recognition on the image blocks, outputting the character sequence and the position coordinates of each character within the image block. The optical character recognition sub-model uses a structure based on convolutional neural networks and recurrent neural networks. It first extracts features from the image blocks, then segments the text lines and recognizes characters, outputting the content of each character and its corresponding bounding box coordinates. The bounding box coordinates are the position coordinates of the character within the image block.

[0060] The graph neural network sub-model constructs a topology graph using characters as nodes and the spatial distance between their position coordinates as edges. It then updates the topology graph through message passing and outputs a semantic feature vector of the character sequence. The edge weights between nodes in the topology graph are calculated based on the spatial distance between the character position coordinates, using the following formula: ; in, For nodes With nodes Edge weights between them For nodes Corresponding character position coordinates and nodes The Euclidean distance between the corresponding character position coordinates.

[0061] Each node in the topology graph corresponds to a character output by the optical character recognition sub-model. The initial feature of each node is the image feature vector corresponding to that character. Edges between nodes are constructed based on the position coordinates of the characters; the closer the spatial distance between two characters, the higher the edge weight, indicating a stronger semantic association between them. The graph neural network sub-model performs multi-layer message passing updates on the topology graph. The features of each node are updated based on the features of its neighboring nodes and the edge weights, so that the final output node features integrate the spatial position and semantic information of neighboring characters, fully representing the contextual semantic features of the character sequence. The calculation formula for message passing updates is: ; in, For the first Nodes in a layered network eigenvectors, For activation function, For nodes The set of adjacent nodes, For nodes With nodes Edge weights between them For the first Nodes in a layered network eigenvectors, For the first The weight matrix of the layer network, For the first Bias terms of the layer network.

[0062] After multiple layers of message passing and updates, the graph neural network sub-model pools the feature vectors of all nodes to generate a semantic feature vector corresponding to the entire character sequence. The cloud server matches the semantic feature vector with a standard tax semantic database, generates character-level tampering detection results based on the matching deviation results, extracts the amount field from the character sequence for addition and subtraction logic verification, and outputs the amount logic comparison results.

[0063] The standard tax semantic database stores standard character feature vectors corresponding to each character. These standard character feature vectors are pre-trained using standard character samples from a large number of tax invoices, covering common character types in tax invoices, such as numbers, Chinese characters, and letters. The cloud server extracts individual character feature vectors from the semantic feature vectors one by one, and calculates the cosine similarity between the individual character feature vector and the corresponding category's standard character feature vector. The corresponding calculation formula is as follows: ; in, For cosine similarity, For single-character feature vectors, For the standard character pattern feature vector of the corresponding category, The dot product of two vectors. and These are the magnitudes of the two vectors, respectively.

[0064] The cosine similarity value ranges from -1 to 1. A higher value indicates a higher similarity between the two vectors, and a higher degree of matching between the single character and the standard character pattern. When the cosine similarity is lower than a set similarity threshold, the cloud server determines that the single character is suspected of being tampered with, and segments the single character image corresponding to the single character's feature vector from the image block. The cloud server performs skeletonization extraction on the single character image, generating a pixel skeleton point set. Skeletonization extraction simplifies the character strokes in the single character image into skeleton lines of single pixel width, and extracts the set of pixel coordinates corresponding to the skeleton lines, which is the pixel skeleton point set. The cloud server calculates the Hausdorff distance between the pixel skeleton point set and the standard skeleton point set corresponding to the standard character pattern feature vector. Single characters with a Hausdorff distance greater than a set distance threshold are marked as tampered characters. The tampered characters are summarized to generate character-level tampering detection results. The corresponding calculation formula is as follows: ; in, ; in, For point set with point set The distance between Hausdorf and the other side, This is the set of pixel skeleton points corresponding to a single character image. This is the standard skeleton point set corresponding to the standard font pattern. For point set Point set One-way Hausdorf distance, For point set Point set One-way Hausdorf distance, For point With point The Euclidean distance between them.

[0065] Hausdorff distance is used to characterize the maximum mismatch between two sets of points. The larger the distance value, the greater the difference between the two skeleton point sets, and the higher the probability of tampering with a single character. The cloud server marks single characters with a Hausdorff distance greater than a set distance threshold as tampered characters, records the location, content, and detection results of the tampered characters, and summarizes all tampered characters to generate character-level tampering detection results.

[0066] Table 4. Mapping table of judgment thresholds and corresponding results for character tampering detection:

[0067] This table sets a similarity threshold of 0.85 and a distance threshold of 10 pixels. Based on the calculation results of cosine similarity and Hausdorff distance, characters are divided into three categories: normal characters, characters awaiting verification, and tampered characters. Normal characters proceed directly to the subsequent monetary comparison process. Characters awaiting verification are first marked, then enter the monetary comparison process, and can be further verified based on the monetary comparison results. Tampered characters are directly marked as high-risk, and a risk warning is generated simultaneously; they do not need to enter the subsequent monetary comparison process. By setting two levels of thresholds, unnecessary skeletonization extraction and distance calculation operations can be reduced while ensuring the accuracy of tamper detection, thus improving detection efficiency.

[0068] The cloud server extracts the amount field from the character sequence, including uppercase and lowercase amount fields, as well as the total amount and itemized amounts fields from the invoice. The cloud server performs addition and subtraction logic checks on the itemized amounts, determining whether the sum of all itemized amounts matches the total amount on the invoice. It also checks whether the uppercase and lowercase amounts match. If any inconsistency exists, it is determined to be an amount logic anomaly, and the corresponding amount logic comparison result is output.

[0069] After receiving the second data packet, the cloud server decapsulates and verifies its integrity. If the verification passes, it reconstructs the dimensionality-reduced feature vector. This feature vector is then inversely transformed to reconstruct the original physical feature vector. The cloud server retrieves the historical audit logs of the company corresponding to the invoice. These logs store the company's historically uploaded invoice feature data, audit results, risk marker information, and tax declaration data. The cloud server performs correlation analysis between the current physical feature vector and the feature data in the historical audit logs, including feature similarity comparison, historical anomaly feature matching, and correlation analysis of the company's tax behavior, outputting the risk probability value corresponding to the invoice.

[0070] In this embodiment, the cropping range and compression level of the image block are determined by combining the geometric center position of the initial abnormal region with the real-time load rate of the edge nodes. While ensuring complete coverage of the abnormal region, the file size of the image block is optimized to adapt to the computing power load of the edge nodes. Principal component analysis is used to reduce the dimensionality of the physical feature vector of the normal format ticket, further reducing the amount of transmitted data. A batch transmission mechanism is used to reduce transmission overhead. The cloud uses a deep semantic recognition model that combines an optical character recognition sub-model and a graph neural network sub-model to generate semantic feature vectors by fusing the spatial position association information of characters. Then, character-level tampering detection is achieved through two-level judgment using cosine similarity and Hausdorff distance, improving the accuracy of tampering detection. At the same time, compliance verification of the ticket amount is completed through logical comparison of the amount, realizing in-depth risk audit of abnormal tickets.

Claims

1. An artificial intelligence-based financial and tax bill risk intelligent auditing method, characterized in that, include: Edge computing nodes deployed on enterprise gateways receive images of financial and tax invoices uploaded by local scanning terminals; The edge computing node calls the built-in lightweight convolutional neural network to perform layout structure analysis on the tax invoice image and extract physical feature vectors including table line segment coordinates, seal pixel distribution, and text area proportion. The edge computing node calculates the Euclidean distance between the physical feature vector and the pre-stored standard layout feature template. When the Euclidean distance exceeds a preset distance threshold, it is determined to be an abnormal layout ticket; when the Euclidean distance does not exceed the preset distance threshold, it is determined to be a normal layout ticket. When a ticket is determined to have an abnormal layout, the edge computing node extracts the image block corresponding to the abnormal area of ​​the layout, encapsulates the image block and the physical feature vector into a first data packet, and transmits it to the cloud server. When the ticket is determined to be of normal format, the edge computing node encapsulates the physical feature vector into a second data packet and transmits it to the cloud server; After receiving the first data packet, the cloud server calls a deep semantic recognition model to perform character-level tampering detection and monetary logic comparison on the image blocks in the first data packet. After receiving the second data packet, the cloud server outputs a risk probability value in combination with historical audit logs. 2.The AI-based financial and tax document risk intelligent auditing method according to claim 1, characterized in that, The edge computing node invokes a built-in lightweight convolutional neural network to parse the layout structure of the tax invoice image, extracting physical feature vectors including table line segment coordinates, seal pixel distribution, and text area proportions, including: The lightweight convolutional neural network includes a feature extraction backbone network and a multi-branch detection head; The feature extraction backbone network performs convolutional pooling operations on the tax invoice image to output multi-scale feature maps. The multi-branch detection head includes a line segment detection branch, a seal detection branch, and a text region detection branch; The line segment detection branch performs pixel-level regression prediction on the multi-scale feature map and outputs the line segment feature matrix composed of the coordinates of the line segments in the table. The stamp detection branch performs binarization classification prediction on the multi-scale feature map and outputs the stamp mask matrix composed of the stamp pixel distribution. The text region detection branch performs bounding box regression prediction on the multi-scale feature map and outputs a text proportion vector composed of the proportion of the text regions. The edge computing node concatenates the line segment feature matrix, the stamp mask matrix, and the text proportion vector to generate the physical feature vector.

3. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 1, characterized in that, The edge computing node calculates the Euclidean distance between the physical feature vector and the pre-stored standard template feature, including: The standard layout feature template includes a standard line segment feature matrix, a standard stamp mask matrix, and a standard text proportion vector that match the dimensions of the physical feature vector. The edge computing node calculates the first distance value between the standard line segment feature matrix corresponding to the coordinates of the table line segment and the line segment feature matrix, calculates the second distance value between the standard stamp mask matrix corresponding to the stamp pixel distribution and the stamp mask matrix, and calculates the third distance value between the standard text proportion vector corresponding to the text region proportion and the text proportion vector. The edge computing node obtains the dynamic weight coefficients corresponding to the first distance value, the second distance value and the third distance value, and performs a weighted summation of the first distance value, the second distance value and the third distance value to generate the Euclidean distance.

4. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 1, characterized in that, The edge computing node extracts image blocks corresponding to abnormal areas on the page, encapsulates the image blocks and the physical feature vector into a first data packet, and transmits it to the cloud server, including: The edge computing node parses the feature dimensions in the Euclidean distance that exceed the preset distance threshold, and determines the image coordinate region corresponding to the feature dimensions that exceed the preset distance threshold as the initial abnormal region. The edge computing node expands and crops the boundary of the initial abnormal region according to the set expansion pixel ratio to generate the image block corresponding to the abnormal region of the layout. The edge computing node performs hash encoding and compression encoding on the image blocks to generate an image byte stream; The edge computing node encapsulates the image byte stream and the physical feature vector into a data frame, adds a frame header containing a ticket identifier and an abnormal dimension marker, and generates the first data packet; The edge computing node sends the first data packet to the cloud server through an encrypted tunnel.

5. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 1, characterized in that, The edge computing node encapsulates the physical feature vector into a second data packet and transmits it to the cloud server, including: The edge computing node calls the principal component analysis algorithm to perform dimensionality reduction mapping on the physical feature vector, generating a dimensionality-reduced feature vector; The edge computing node obtains the current timestamp of the local system clock and the serial number of the tax invoice image; The edge computing node serializes the dimensionality-reduced feature vector, the current timestamp, and the serial number according to a set byte order to generate a feature sequence; The edge computing node adds check codes to the beginning and end of the feature sequence to generate the second data packet; The edge computing node stores the second data packet in an edge message queue. When the amount of data in the edge message queue reaches a preset queue length or the waiting time reaches a preset time window, the second data packet is transmitted in batches to the cloud server.

6. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 1, characterized in that, After receiving the first data packet, the cloud server invokes a deep semantic recognition model to perform character-level tampering detection and monetary logical comparison on the image blocks in the first data packet, including: The deep semantic recognition model includes an optical character recognition sub-model and a graph neural network sub-model; The cloud server decapsulates and decompresses the first data packet to restore the image block; The optical character recognition sub-model performs character localization and recognition on the image block, and outputs the character sequence and the position coordinates of each character in the image block; The graph neural network sub-model constructs a topology graph with the characters as nodes and the spatial distance between the position coordinates as edges, updates the topology graph by message passing, and outputs the semantic feature vector of the character sequence. The cloud server matches the semantic feature vector with a standard tax semantic database, generates a character-level tampering detection result based on the matching deviation result, extracts the amount field from the character sequence for addition and subtraction logic verification, and outputs the amount logic comparison result.

7. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 2, characterized in that, The seal detection branch performs binarization classification prediction on the multi-scale feature map and outputs a seal mask matrix composed of the seal pixel distribution, including: The seal detection branch upsamples the multi-scale feature map to generate a target feature map with the same size as the tax invoice image. The stamp detection branch performs a sigmoid activation function calculation on each pixel in the target feature map and outputs a pixel probability value. The edge computing node assigns pixels with a probability value greater than a set probability threshold to the stamp candidate region, and assigns pixels with a probability value less than the set probability threshold to the background region. The edge computing node performs a morphological closing operation on the candidate seal region to fill the holes inside the candidate seal region; The edge computing node counts the total number of pixels and the set of coordinates within the candidate area of ​​the seal after morphological closing operation, and arranges the total number of pixels and the set of coordinates according to the matrix dimension to generate the seal mask matrix.

8. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 3, characterized in that, The edge computing node acquires dynamic weight coefficients corresponding to the first distance value, the second distance value, and the third distance value, including: The edge computing node maintains a local anomaly feature log table, which records the anomaly feature dimension labels corresponding to the anomaly tickets in the historical layout. The edge computing node counts the frequency of anomalies in the abnormal feature dimension labels pointing to table line segments, seals, and text regions within a set time period. The edge computing node calculates the first proportion of the frequency data corresponding to the table line segment anomaly in the total frequency data, calculates the second proportion of the frequency data corresponding to the seal anomaly in the total frequency data, and calculates the third proportion of the frequency data corresponding to the text region anomaly in the total frequency data. The edge computing nodes perform normalization processing on the first proportion, the second proportion, and the third proportion, respectively, and use the normalized values ​​as dynamic weight coefficients for the corresponding first distance value, second distance value, and third distance value.

9. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 4, characterized in that, The edge computing node expands and crops the boundary of the initial abnormal region according to a set expansion pixel ratio, generating an image block corresponding to the abnormal region of the layout, including: The edge computing node obtains the geometric center coordinates of the initial abnormal region and calculates the minimum pixel distance from the geometric center coordinates to the four edges of the tax invoice image; The edge computing node calculates the product of the minimum pixel distance and the set basic expansion ratio to generate the maximum safe expansion pixel value; The edge computing node obtains the real-time load rate of the central processing unit in the edge computing node, and queries the corresponding compression level in a preset mapping table based on the real-time load rate; The edge computing node selects a target compression algorithm from a preset set of compression algorithms according to the compression level; The edge computing node performs outward cropping of the boundary of the initial abnormal region according to the maximum safe extended pixel value, and calls the target compression algorithm to encode the cropped image region to generate the image block corresponding to the abnormal region of the layout.

10. The intelligent auditing method for financial and tax invoice risks based on artificial intelligence according to claim 6, characterized in that, The cloud server matches the semantic feature vector with a standard tax semantic database, and generates character-level tampering detection results based on the matching deviation results, including: The standard tax semantic library stores the standard character pattern feature vectors corresponding to each character. The cloud server extracts single-character feature vectors one by one from the semantic feature vector; The cloud server calculates the cosine similarity between the single-character feature vector and the standard character pattern feature vector of the corresponding category; When the cosine similarity is lower than a set similarity threshold, the cloud server segments the single-character image corresponding to the single-character feature vector from the image block; The cloud server performs skeletonization extraction on the single-character image to generate a set of pixel skeleton points. The cloud server calculates the Hausdorff distance between the pixel skeleton point set and the standard skeleton point set corresponding to the standard character feature vector, marks single characters whose Hausdorff distance is greater than a set distance threshold as tampered characters, and summarizes the tampered characters to generate the character-level tampering detection result.