Safe and intelligent invoicing method based on image super-resolution enhancement

By constructing a lightweight image super-resolution model and a certificate-free signature mechanism, the problems of low information recognition rate and data security in the electronic invoice system are solved, achieving efficient and secure multimodal invoice processing. This addresses the issues of low information recognition rate, easy leakage during transmission, and limited interaction methods in the electronic invoice system, thereby improving the system's adaptability and processing efficiency.

CN120996794APending Publication Date: 2025-11-21FUJIAN QINGYI INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511106098.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing electronic invoice systems suffer from low invoice information recognition rates, easy leakage of user information during transmission, low data collection and processing efficiency, and limited interaction methods, making it difficult to meet the diverse needs of complex business scenarios.

Method used

A lightweight model based on image super-resolution enhancement is adopted to improve OCR recognition accuracy, and a certificateless signature mechanism is combined to ensure data security. It supports multimodal interaction and modular deployment, and constructs a lightweight invoice image super-resolution model and a certificateless signature algorithm. It combines speech recognition and text recognition technologies, uses OpenAI Whisper and KeyBERT to extract keywords, and achieves data security through a hash chain binding mechanism.

Benefits of technology

It improves the accuracy of invoice information recognition, ensures data security, enhances the system's adaptability and processing efficiency, supports multimodal interaction, and adapts to complex business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996794A_ABST
    Figure CN120996794A_ABST
Patent Text Reader

Abstract

The invention relates to a safe intelligent invoicing method based on image super-resolution enhancement, and belongs to the field of intelligent invoicing. The method comprises the following steps: generating signcryption public parameters and deploying a training model in an initialization stage; after the user logs in and the identity verification is successful, the user selects voice recognition or character recognition on the terminal to convert the voice signal or the character signal on the character image into the text information; according to the obtained text information, invoice content is automatically extracted through keywords, invoice information is intelligently corrected according to an invoice template selected by a user, a tax digital certificate signature is called to generate a legal and effective electronic invoice, then the invoice is sent to a receiver or printed according to a delivery mode, and invoice issuing data is stored in a local database; and the terminal performs signcryption on the invoicing data by adopting a signcryption algorithm based on a certificateless cryptosystem, and uploads the invoicing data to the cloud server to decrypt and verify invoice information so as to generate an invoice. According to the invention, the problems of efficiency, safety and adaptability in invoice processing can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent invoicing, specifically relating to a secure intelligent invoicing method based on image super-resolution enhancement. Background Technology

[0002] In the information age, enterprises have an increasingly urgent need for digital transformation. Various management information systems are gradually penetrating the core aspects of business processes. Among these, the financial management system, as a key hub connecting business data and decision support, is becoming increasingly important. Against this backdrop, electronic invoices, with their paperless, easy-to-store, and traceable characteristics, have become a crucial tool for enterprises' digital transformation of finance and taxation. Compared to traditional paper invoices, electronic invoices, through digital collection, networked transmission, and automated processing, significantly reduce the costs of printing, mailing, and warehousing, shorten reimbursement cycles, and improve the efficiency and standardization of financial data entry, providing effective support for alleviating corporate financial pressure and optimizing business processes.

[0003] However, despite the widespread adoption of e-invoices, they still face multiple challenges in practical use. Firstly, corporate finance personnel often need to take screenshots of e-invoices using mobile devices or embedded systems. Low-resolution, blurry, tilted, or unevenly lit images easily lead to OCR recognition errors, resulting in frequent mis-entry of key information (such as amounts and tax numbers). Secondly, the transmission and storage of e-invoices rely on the network environment, making data susceptible to tampering, forgery, or leakage. Existing encryption technologies struggle to meet the stringent security and compliance requirements of financial and tax data while ensuring transmission efficiency. Furthermore, the invoicing needs of different enterprises and in different scenarios vary significantly (e.g., cross-platform integration, multimodal information entry). Existing systems often have limited functionality and insufficient adaptability, failing to cover the diverse needs of complex business scenarios. These pain points not only diminish the practical application value of e-invoices but also hinder the deepening of corporate financial digital transformation, necessitating a smart invoicing solution that balances efficiency, security, and adaptability.

[0004] The current bottleneck in low invoice information recognition rates largely stems from the low quality of the original images. Traditional Optical Character Recognition (OCR) relies on fixed-resolution input, and when faced with low-resolution or blurry images, issues such as blurred character edges and loss of key information significantly increase the false recognition rate. Image super-resolution (SR) enhancement technology aims to recover the corresponding high-resolution, high-quality image from a low-resolution image and has been widely applied in various fields such as medical imaging, satellite remote sensing, video surveillance, and invoice recognition. Currently, most mainstream image super-resolution enhancement methods are based on deep learning frameworks, especially model architectures based on convolutional neural networks (CNNs) and self-attention mechanisms (such as Transformers). In convolutional methods, typical examples include SRCNN, EDSR, and RDN, which learn the mapping relationship between low-resolution and high-resolution images by stacking convolutional layers and residual modules layer by layer. These methods have relatively simple structures, fast inference speeds, and are suitable for resource-constrained environments. In recent years, super-resolution methods based on the Transformer architecture (such as SwinIR and HAT) have significantly improved modeling capabilities and recovery quality by introducing self-attention mechanisms. However, such methods typically introduce significant computational overhead and parameter scale, placing high demands on storage and computing resources, making them unsuitable for deployment in lightweight scenarios such as mobile devices and embedded systems. Furthermore, existing methods often focus on deep layer stacking and channel expansion in model structure design, rarely incorporating large receptive field convolutional structures and pixel adaptation mechanisms, and lack specific modeling capabilities for structured document images such as invoice images. Speech recognition and natural language processing have also seen rapid development. OpenAI's Whisper is a powerful open-source model that can efficiently convert speech into text. KeyBERT is a BERT-based tool for automatically extracting keywords from natural language information.

[0005] Furthermore, the transmission and storage of electronic invoices still face significant challenges. Invoice information is vulnerable to tampering, forgery, or leakage during mobile terminal photography, network transmission, or cloud storage. Once this information, containing corporate information and funds, is leaked or altered, it will lead to unacceptable financial losses for users. However, encryption algorithms cannot guarantee the integrity and non-repudiation of message transmission, and using them in conjunction with signature algorithms incurs massive computational overhead. Therefore, signature encryption technology, by integrating encryption and digital signatures, has become a key technological path to balance efficiency and security. However, traditional signature encryption schemes face the dual threats of single point of failure and computational inefficiency: the former is due to the fact that the underlying cryptographic system often requires a trusted third party, and if this third party is compromised, the security of the scheme is significantly reduced. The latter is because the algorithms often rely on computationally complex bilinear pairing operations, leading to a substantial increase in overhead. Summary of the Invention

[0006] The purpose of this invention is to address the common problems in existing electronic invoice issuance schemes, such as low invoice information recognition rate, easy leakage of user information during transmission, low data collection and processing efficiency, and single and unintelligent interaction methods. This invention provides a secure and intelligent invoicing method based on image super-resolution enhancement. By constructing a lightweight super-resolution enhancement model, the method improves OCR recognition accuracy and uses a certificate-free signature mechanism to ensure data security. It also supports multimodal interaction and modular deployment, comprehensively solving the efficiency, security, and adaptability issues in invoice processing.

[0007] To achieve the above objectives, the technical solution of the present invention is: a secure intelligent invoicing method based on image super-resolution enhancement, comprising:

[0008] During the initialization phase, public signature parameters are generated and a training model is deployed. Users register and obtain their own keys. When logging in, the terminal encrypts the user's identity and login password and sends them to the cloud server for identity verification.

[0009] After successful identity verification, the user can select voice recognition or text recognition on the terminal to convert the voice signal or text signal on the text image into text information.

[0010] The system automatically extracts invoice content from the obtained text information using keywords, intelligently corrects the invoice information based on the invoice template selected by the user, calls the tax digital certificate to sign and generate a legal and valid electronic invoice, and then sends the invoice to the recipient or prints it according to the delivery method, and stores the invoice data in the local database.

[0011] The terminal uses a signature algorithm based on a certificateless cryptography system to sign the invoice data and uploads it to the cloud server. The cloud server decrypts and verifies the invoice information and generates an invoice.

[0012] Furthermore, text recognition enhances text images using a lightweight invoice image super-resolution model based on equivalent convolutional kernels and adaptive pixel classification, and then converts the text signals on the text images into text information using OCR technology; speech recognition converts speech signals into text information by calling OpenAI Whisper.

[0013] Furthermore, after intelligently correcting the invoice information based on the invoice template selected by the user, the BERT model is used to predict the rationality of the current invoice information based on historical invoice data, and then the tax digital certificate is called to sign and generate a legal and valid electronic invoice.

[0014] Furthermore, the signature algorithm seamlessly combines encryption and digital signatures, utilizing temporary key negotiation and hash chain binding mechanisms to achieve signature verification of invoice data.

[0015] Furthermore, in the initialization phase, the system initializes the common parameters of the signature and trains a lightweight invoice image super-resolution model based on equivalent large convolutional kernels and adaptive pixel classification. The specific steps are as follows:

[0016] (1-1) Given a security parameter λ, the key distribution server initializes the signature public parameters, first initializing an additive group G of order p, where Γ is a generator in G, and the system master key is... The master public key is P pub =msk·Γ, where It is the field of non-zero integers modulo p;

[0017] (1-2) The key issuance server publicly discloses the signature public parameters {Γ,G,p,λ,P}. pub} and hash function H1: H2: Where |m| is the length of message m, and H1 and H2 are hash functions;

[0018] (1-3) Use a camera to capture original invoice images under various distances and lighting conditions, and take photos or screenshots of invoice information to obtain high-resolution invoice images X. HR A low-resolution image X is generated by downsampling a high-resolution invoice image using the Bicubic interpolation method. LR ;

[0019]

[0020] Where the downsampling factor s>1, w(i,j) is the weight calculated according to the Bicubic interpolation kernel function, and (x,y) are the pixel coordinates of the low-resolution image; all the obtained low-resolution-high-resolution invoice images are compared... The dataset used for model training consists of a pair of images where the size of the high-resolution invoice image is an integer multiple of the size of the low-resolution image, and N is the total number of image pairs.

[0021] (1-4) Perform data augmentation on the dataset, including performing one or more of the following operations on the low-resolution images and high-resolution invoice images: 90°, 180°, 270° rotation, horizontal flipping, or random cropping;

[0022] (1-5) Construct a super-resolution enhancement neural network model F on the training platform, including an equivalent large kernel convolution module, an adaptive pixel classification module, and a global and channel attention mechanism. θ (·), where θ is the model parameter, which takes the low-resolution image X obtained in steps (1-4) as an input. LR As input, the output is the reconstructed image.

[0023] (1-6) The L1 loss function is used to measure the difference between the reconstructed image and the corresponding real high-resolution invoice image. The loss function is: Represented as the actual pixel value y i With the reconstructed pixel value f(x) i Minimize the sum of the absolute differences of ), where i represents the i-th pixel in the image and n represents the number of pixels in the image;

[0024] (1-7) The model constructed in step (1-5) is trained based on the optimization algorithm. The backpropagation algorithm and Lion optimizer are used to minimize the loss function. The model parameters θ are iteratively updated until the loss function converges or the preset training rounds are reached, and the lightweight invoice image super-resolution model is obtained after training.

[0025] Furthermore, steps (1-5) are implemented as follows:

[0026] (1-5a) For the input low-resolution image Perform a 3×3 convolution operation to extract shallow feature information and increase the channel dimension, denoted as: Where C, h, and w represent the number of channels, height, and width of the input feature, respectively, and Conv n×n This indicates that an n×n kernel is used for the convolution operation;

[0027] (1-5b) Using the SCA module in conjunction with the input feature map, spatial attention and channel attention are jointly modeled to globally enhance the responses of key regions and salient channels in the image, resulting in a spatial attention map. Channel attention map Represented as: S a =SA(Conv 1×1 (F0)), C a =CA(Conv) 1×1 (F0)), where SA(·) and CA(·) are spatial attention mechanism and channel attention mechanism, respectively;

[0028] (1-5c) The ELK module is based on the spatial attention-enhanced feature input F in =S a ⊙F0+F0, then sequentially passed through a depthwise separable convolution with a kernel size of 5×5, a depthwise dilated convolution with a kernel size of 5×5 and a dilation factor of 3, and a 1×1 pointwise convolution to achieve an equivalent large convolution kernel operation, resulting in a large receptive field of 13×13 with significantly reduced parameter and computational costs; using this equivalent large convolution kernel operation, an attention map of all features at the spatial level is obtained. Represented as: in This indicates that a depthwise separable convolution kernel of size n×n is used for convolution operations. This represents a depthwise dilated convolution of size n×n; it utilizes the attention map A and the input features of the ELK module to perform a Hadamard product and then performs a residual connection with the input features, finally passing it through a 1×1 convolution Conv. 1×1 The features are further refined to obtain the output F of the ELK module. ELK This process is represented as: F ELK =Conv 1×1 (A⊙F in +F in ), where ⊙ represents the Hadamard product operation;

[0029] (1-5d) For the feature input F after spatial attention enhancement in The MCDA module is used to fully utilize non-local similar pixels to assist in reconstruction; the input features are divided at the pixel level of the original image, and the spatial attention map S is obtained. a The activation values ​​of all pixel positions are sorted, and features of pixels with similar positions are grouped together. The feature vector changes as follows: (C,h,w) → (C,n,s), where h×w=n×s. num , n represents the number of groups, s num This represents the number of pixels within each group; then, the ELSK module, which shares a similar concept with the ELK module in steps (1-5c), is used to enhance the features after the division grouping operation. Unlike the ELK module, ELSK addresses changes in the feature input and enhances the features after acquiring the attention map A. ' Feature extraction is performed using asymmetric sparse 1×5 convolution kernels, specifically as follows:

[0030]

[0031] Then, the Recover operation is used to restore all features to their original input positions after feature enhancement.

[0032] (1-5e) The output features of the ELK module and MCDA module are weighted by channel attention and then summed element-wise. The result is further refined by a feedforward neural network FFN to obtain the deep features F. Deep This process is represented as: F Deep =FFN(F ELK ·C a +F MCDA );

[0033] (1-5f) for deep features F DeepA residual connection is made with the shallow feature F0, and a 3×3 convolution Conv is applied to the result. 3×3 To upgrade the channel to its original state. Features obtained by multiple times s up Upsampling factor: F up =Conv 3×3 (F Deep +F0); First, the feature F is processed through the pixel shuffle operation. up Perform channel rearrangement, changing the dimensions from Transformed into (hs) up ,ws up C) Obtain high-resolution dimensions, then restore the number of channels to RGB space to obtain the super-resolution reconstructed image.

[0034] Furthermore, during user registration, users first enter their own identity ID. u After setting the username and password, and receiving these parameters, the key distribution server issues a unique public-private key pair; the specific steps are as follows:

[0035] (2-1) The key distribution server selects a random number a and calculates R. u =aΓ,O u =H1(id) u ,R u And generate a public key signature φ u =msk+aO u Subsequently, a portion of the key (φ) u ,R u It is sent to the terminal through a secure channel, where u = cs,t, representing the cloud server (cs) and the terminal (t) respectively;

[0036] (2-2) After receiving part of the key, the terminal verifies whether the following equation holds true;

[0037] P pub +H1(id u ,R u )R u =φ u Γ

[0038] If this fails, a new partial public key is requested; otherwise, the terminal selects a random number x. u a1, calculate public key Y u =x u Γ, Public key signature S u =x u +a1H1(φ u ,Υ u and a blinding value Tu =a1Γ; User's private key is (x u ,φ u The public key is (Υ). u ,S u ,T u The user then sends the public key to the key distribution server; the key distribution server verifies Y. u +H1(φ u ,Υ u )T u =S u Γ; If true, accept and publish this public key; otherwise, reject this public key;

[0039] (2-3) The terminal provides the user with the private key and uploads the public key to the cloud server. In addition, to ensure the security of the user's login password, the cloud server salts and obfuscates the user's password hash value. The collaborative key issuing server binds the salted user password hash value, the user's public key, and the user's identity, and stores them in the database to ensure that the user's password is not leaked throughout the process. When the user logs in, the user enters the user identity and password, the terminal calculates the password hash value, and uploads it to the cloud server. The cloud server salts and obfuscates the password hash value and uses the obfuscated password, username, and the value stored in the database to verify whether it passes. If it passes, the user is allowed to log in; otherwise, the user's login fails.

[0040] Furthermore, the invoice content is automatically extracted from the obtained text information using keywords, which is achieved using the KeyBERT keyword extraction model.

[0041] Furthermore, for the corrected invoice information, a legally valid electronic invoice is generated by calling the tax digital certificate for signing. Subsequently, the invoice is sent to the recipient or printed according to the delivery method, and the invoice data is stored in the local database. The specific implementation method is as follows:

[0042] (7-1) For the corrected invoice information, the cloud server calls the tax digital certificate to sign the invoice content in order to generate a valid electronic invoice;

[0043] (7-2) The terminal stores the invoice information in the local database, then selects a random number α and calculates the temporary key r1 = αY. cs ;

[0044] (7-3) Encrypted invoice message m receives ciphertext

[0045] (7-4) The terminal uses a temporary key r1, and the cloud server shares the terminal's public key Υ. cs Υ t Calculate the hash value h = H2(r1,m,Y) with message m. cs ,Υ tTo generate the signature T = α(h + x) t ) -1 And send the ciphertext σ=(C,h,T) to the cloud server;

[0046] (7-5) Depending on the delivery method selected by the user, the terminal will send the invoice to the recipient via email, SMS or directly connect to the printer for printing.

[0047] Furthermore, the cloud server decrypts and verifies the invoice information, and generates an invoice, as specifically implemented below:

[0048] (8-1) After receiving the ciphertext σ=(C,h,T) sent by the terminal, the cloud server decrypts the temporary key r1=x s zΥ t ·hzΥ cs ;

[0049] (8-2) Decrypting the ciphertext on the cloud server yields the plaintext.

[0050] (8-3) Cloud server verification h = H2(r1,m,Y) cs ,Υ t If the condition is not met, reject the ciphertext; otherwise, accept the message.

[0051] This invention also provides a secure intelligent invoicing system based on image super-resolution enhancement, which consists of three main modules: an intelligent invoice information extraction module, an intelligent error correction module, and an automated process engine module. The intelligent invoice information extraction module includes three sub-modules: OCR image and text recognition, Whisper language recognition, and KeyBERT keyword extraction. The intelligent error correction module consists of information verification and the BERT text classification algorithm. The automated process engine module is divided into user registration, user login, data acquisition, invoice generation and management, and information transmission sub-modules.

[0052] The present invention also provides a computer-readable storage medium having stored thereon computer program instructions executable by a processor, wherein when the processor executes the computer program instructions, it can implement the steps of any of the methods described above.

[0053] Compared with the prior art, the present invention has the following beneficial effects: Attached Figure Description

[0054] Figure 1 This is a flowchart of a secure intelligent invoicing method system based on image super-resolution according to an embodiment of the present invention.

[0055] Figure 2 This is a structural diagram of the lightweight invoice image super-resolution model based on equivalent large convolution kernel and adaptive pixel classification in this invention.

[0056] Figure 3 This is a screenshot of a genuine electronic invoice and its low-resolution image after being downsampled using Bicubic.

[0057] Figure 4 This is a comparison chart of the super-resolution reconstruction effects of an embodiment of the present invention.

[0058] Figure 5 This is a system architecture diagram of a secure intelligent invoicing method based on image super-resolution according to an embodiment of the present invention. Detailed Implementation

[0059] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.

[0060] This invention provides a secure intelligent invoicing method based on image super-resolution enhancement, comprising:

[0061] During the initialization phase, public signature parameters are generated and a training model is deployed. Users register and obtain their own keys. When logging in, the terminal encrypts the user's identity and login password and sends them to the cloud server for identity verification.

[0062] After successful identity verification, the user can select voice recognition or text recognition on the terminal to convert the voice signal or text signal on the text image into text information.

[0063] The system automatically extracts invoice content from the obtained text information using keywords, intelligently corrects the invoice information based on the invoice template selected by the user, calls the tax digital certificate to sign and generate a legal and valid electronic invoice, and then sends the invoice to the recipient or prints it according to the delivery method, and stores the invoice data in the local database.

[0064] The terminal uses a signature algorithm based on a certificateless cryptography system to sign the invoice data and uploads it to the cloud server. The cloud server decrypts and verifies the invoice information and generates an invoice.

[0065] This invention also provides a secure intelligent invoicing system based on image super-resolution enhancement, which consists of three main modules: an intelligent invoice information extraction module, an intelligent error correction module, and an automated process engine module. The intelligent invoice information extraction module includes three sub-modules: OCR image and text recognition, Whisper language recognition, and KeyBERT keyword extraction. The intelligent error correction module consists of information verification and the BERT text classification algorithm. The automated process engine module is divided into user registration, user login, data acquisition, invoice generation and management, and information transmission sub-modules.

[0066] The present invention also provides a computer-readable storage medium having stored thereon computer program instructions executable by a processor, wherein when the processor executes the computer program instructions, it can implement the steps of any of the methods described above.

[0067] The following are specific implementation examples of the present invention.

[0068] Example 1:

[0069] This invention discloses a secure intelligent invoicing method based on image super-resolution enhancement, involving four entities: a terminal, a cloud server, a user, and a key issuance server. The steps include the following:

[0070] (1) During the system initialization phase, the key issuance server generates signature-encrypted public parameters, and the cloud server deploys and trains the neural network model. Users register and obtain their own keys. When a user logs in, the terminal encrypts the user's identity and login password and sends them to the cloud server. The cloud server verifies the user's identity and confirms whether to allow the user to log in.

[0071] (2) The user selects either image text recognition invoicing or voice recognition invoicing. If image text recognition invoicing is selected, the user takes a picture using the terminal's camera or uploads a photographed file. If voice recognition invoicing is selected, the user enters the invoicing information via voice input on the terminal.

[0072] (3) If the invoice is issued via image text recognition, the terminal enhances the image quality using a super-resolution method for invoice images based on equivalent convolutional kernels and adaptive pixel classification, and then converts the text in the image into text using OCR technology. If the invoice is issued via speech recognition, the terminal calls OpenAIWhisper to convert speech into text. Then, for the text information obtained from both methods, the KeyBERT keyword extraction model is used to intelligently identify the invoice information in the text.

[0073] (4) Based on the invoice template selected by the user, automatically fill in the invoice information and perform format and logic checks on the information. At the same time, predict the rationality of this invoice based on historical invoicing data. If it is not rational, issue a warning. After confirmation by the user, call the tax digital certificate to sign the invoice file information to generate a legal and valid electronic invoice.

[0074] (5) Depending on the delivery method selected by the user, the terminal sends the invoice to the recipient or prints it. The terminal stores the invoice data in the local database and uploads the signed invoice message to the cloud. The cloud server decrypts and verifies the information, and performs data analysis.

[0075] Example 2:

[0076] In Example 1, the present invention has provided an overall description of the system workflow. The following will be based on… Figure 1 Detailed explanations are provided for specific details.

[0077] (1) System initialization

[0078] In the initialization phase, the system initializes the signature parameters and trains a lightweight invoice image super-resolution model based on an equivalent large convolutional kernel and adaptive pixel classification. Steps (1-1) and (1-2) initialize the signature parameters, while the remaining steps involve training and deploying the lightweight invoice image super-resolution enhancement model based on an equivalent large convolutional kernel and adaptive pixel classification (e.g., ...). Figure 2 (As shown). The specific steps are as follows.

[0079] (1-1) Given a security parameter λ, the key issuing server initializes the public parameters of the signature encryption algorithm. It first initializes an additive group G of order p, where Γ is a generator of it. If the system algorithm master key is msk, then the master public key is P. pub =msk·Γ, where, It is a field of non-zero integers modulo p.

[0080] (1-2) The key distribution server publishes the following parameters: {Γ,G,p,λ,P} pub} with the following hash function H1: H2: Where |m| is the length of message m, and the hash algorithm is implemented using SHA256.

[0081] (1-3) Use a camera to capture original invoice images under various distances and lighting conditions, as well as take photos or screenshots of invoice information, to obtain high-resolution invoice images X. HR The high-resolution invoice image is downsampled using the Bicubic interpolation method to generate a low-resolution image X. LR .

[0082]

[0083] Where the downsampling factor s>1, w(i,j) is the weight calculated according to the Bicubic interpolation kernel function, and (x,y) are the pixel coordinates of the low-resolution image; all the obtained high-resolution-low-resolution image pairs The dataset used for model training, wherein each pair of images satisfies the condition that the size of the high-resolution image is an integer multiple of the size of the low-resolution image;

[0084] (1-4) Perform data augmentation on the above dataset, including performing one or more of the following operations on low-resolution and high-resolution images: 90°, 180°, 270° rotation, horizontal flipping, or random cropping, to improve the generalization ability of the model.

[0085] (1-5) Construct a super-resolution enhancement neural network model F on the training platform, which includes an equivalent large kernel convolution module, an adaptive pixel classification module, and a global and channel attention mechanism. θ (·), where θ is the model parameter, and the model takes the low-resolution image X obtained above as an input. LR As input, the output is the reconstructed image.

[0086] (1-6) The L1 loss function is used to measure the difference between the reconstructed image and the real high-resolution image. The loss function is calculated as follows: Represented as the actual pixel value y i With the reconstructed pixel value f(x) i Minimize the sum of the absolute differences of ), where i represents the i-th pixel in the image and n represents the number of pixels in the image;

[0087] (1-7) The model is trained based on the optimization algorithm. The backpropagation algorithm and Lion optimizer are used to minimize the loss function. The model parameters θ are iteratively updated until the loss function converges or reaches the preset training rounds, so as to obtain the trained lightweight invoice image super-resolution model.

[0088] Furthermore, steps (1-5) also involve the following detailed process.

[0089] (1-5a) For the input low-resolution image Perform a 3×3 convolution operation to extract shallow feature information and increase the channel dimension, denoted as: Where Conv n×n This indicates that an n×n kernel is used for the convolution operation, where C, h, and w represent the number of channels, height, and width of the input feature, respectively.

[0090] (1-5b) Using the SCA module in conjunction with the input feature map, spatial attention and channel attention are jointly modeled to globally enhance the responses of key regions and salient channels in the image, resulting in spatial attention maps and channel attention maps. Represented as: S a =SA(Conv 1×1 (F0)),C a =CA(Conv) 1×1 (F0)), where SA(·) and CA(·) are spatial attention mechanism and channel attention mechanism, respectively;

[0091] (1-5c) The ELK module is based on the spatial attention-enhanced feature input F described above. in =S a⊙F0+F0, then sequentially passed through a depthwise separable convolution with a kernel size of 5×5, a depthwise dilated convolution with a kernel size of 5×5 and a dilation factor of 3, and a 1×1 pointwise convolution to achieve an equivalent large convolution kernel operation, resulting in a large receptive field of 13×13 with significantly reduced parameter and computational costs; using this equivalent large convolution kernel, an attention map of all features at the spatial level is obtained. Represented as: in This indicates that a depthwise separable convolution kernel of size n×n is used for convolution operations. This represents a depthwise dilated convolution of size n×n; the attention map A is used to perform a Hadamard product with the input features of the ELK module and then a residual connection is made with the input features. Finally, a 1×1 convolution is used to further refine the features to obtain the output F of the ELK module. ELK This process is represented as: F ELK =Conv 1×1 (A⊙F in +F in ), where ⊙ represents the Hadamard product operation;

[0092] (1-5d) For the feature input F after spatial attention enhancement in We continue to use the MCDA module to fully utilize non-local similar pixels to assist in reconstruction; the input features are divided at the pixel level of the original image, based on the attention map S obtained above. a The activation values ​​of all pixel positions are sorted, and features of similar pixel positions are grouped together. The feature vector changes as follows: (C,h,w) → (C,n,s), where h×w=n×s, n represents the number of groups, and s represents the number of pixels in each group. Next, the ELSK module, which shares a similar concept with the ELK module in steps (1-5c), is used to enhance the features after the division grouping operation. Unlike the ELK module, ELSK addresses changes in the feature input and enhances the features in the attention map A. ' The feature extraction was performed using an asymmetric sparse 1×5 convolution kernel, and the specific differences can be represented as follows:

[0093]

[0094] Then, the Recover operation is used to restore all features to their original input positions after feature enhancement.

[0095] (1-5e) The output features of the above ELK module and MCDA module are weighted by channel attention and then summed by principal elements. The result is further refined by a feedforward neural network FFN to obtain the deep feature F.Deep This process can be represented as: F Deep =FFN(F ELK ·C a +F MCDA );

[0096] (1-5f) for deep features F Deep A residual connection is made with the shallow feature F0, and a 3×3 convolution Conv is applied to the result. 3×3 To upgrade the channel to its original state. Features obtained by multiple times s up Upsampling factor: F up =Conv 3×3 (F Deep +F0); First, the feature F is processed through the pixel shuffle operation. up Perform channel rearrangement, changing the dimensions from Transformed into (hs) up ,ws up C) Obtain high-resolution dimensions, then restore the number of channels to RGB space to obtain the super-resolution reconstructed image.

[0097] (2) User key distribution

[0098] During user registration, users first enter their own identity ID. u Set your username and password. After receiving these parameters, the key distribution server will issue you a unique public-private key pair. The specific steps are as follows.

[0099] (2-1) The key distribution server selects a random number a and calculates R. u =aΓ,O u =H1(id) u ,R u And generate a public key signature φ u =msk+aO u Subsequently, it will transfer a portion of the key (φ) u ,R u It is sent to the terminal through a secure channel. Where u = cs,t, representing the cloud server (cs) and the terminal (t) respectively.

[0100] (2-2) After receiving part of the key, the terminal verifies whether the following equation is true.

[0101] P pub +H1(id u ,R u )R u =φ u Γ

[0102] If this fails, a new partial public key is requested. Otherwise, the terminal selects a random number x. u a1, calculate Υ u =x u Γ,S u =x u +a1H1(φ u ,Υ u ),T u =a1Γ. The user's private key is (x u ,φ u The public key is (Υ). u ,S u ,T u The user then sends the public key to the key distribution server. The key distribution server verifies Y. u +H1(φ u ,Υ u )T u =S u Γ. If true, accept and publish this public key; otherwise, reject this public key.

[0103] (2-3) Subsequently, the terminal hands over the private key to the user and uploads the public key to the cloud server. In addition, to ensure the security of the user's login password, the cloud server salts and obfuscates the user's password hash value. The collaborative key issuing server binds the salted user password hash value, the user's public key, and the user's identity and stores them in the database to ensure that the user's password is not leaked throughout the process.

[0104] (3) User Login

[0105] During login, the user enters their username and password. The terminal calculates the password hash and uploads it to the cloud server. The cloud server salts and obfuscates the password hash, then uses the obfuscated password and username to verify against the value stored in the database. If successful, the user is allowed to log in; otherwise, the login fails.

[0106] (4) User selects input method

[0107] After successfully logging in, users can choose between image text recognition invoicing or voice recognition invoicing. For image text recognition invoicing, users can use the terminal's camera to take a picture or upload a photographed file. For voice recognition invoicing, users can enter invoicing information via voice commands.

[0108] (5) Terminal identifies invoice information

[0109] Depending on the invoice recognition method selected by the user, the system calls different algorithms to recognize the invoice text information. If the user selects speech recognition, the terminal converts speech to text using OpenAI Whisper. If the user selects image text recognition, after receiving the invoice information from the user, the system performs geometric correction, brightness normalization, and noise suppression preprocessing on the input low-quality image, and generates a high-resolution image using a lightweight invoice image super-resolution model based on equivalent large convolution kernels and adaptive pixel classification. Then, the image is input to a CNN-based OCR recognition algorithm to identify the text information in the image. Next, for the text information obtained from both methods, the KeyBERT keyword extraction model intelligently identifies the invoice information within the text.

[0110] (6) Intelligent error correction of invoice information

[0111] Based on the invoice template selected by the user, the terminal automatically fills in the invoice information identified in step 5), checks whether the data format of the collected invoice information conforms to tax regulations, such as the number of digits in the taxpayer identification number and whether the format of the amount is reasonable, and verifies the logical relationships between the data, such as whether the product of the quantity and unit price of the goods equals the amount, and whether the buyer information matches the historical records. At the same time, based on historical invoice data, the BERT model is used to predict the reasonableness of the current invoice information. If it is unreasonable, the system automatically prompts the user to correct it and provides intelligent error correction suggestions.

[0112] (7) Invoice generation and information encryption

[0113] Based on the data confirmed by the user, the terminal generates an invoice and enters it into the system. The specific steps are as follows.

[0114] (7-1) For accepted invoice information, the cloud server calls the tax digital certificate to sign the invoice content to generate a valid electronic invoice.

[0115] (7-2) The terminal stores the invoice information in the local database, then selects a random number α and calculates the temporary key r1 = αY. s .

[0116] (7-3) Encrypted invoice message m receives ciphertext

[0117] (7-4) The terminal uses the hash value h = H2(r1,m,Y) to calculate the hash value. s ,Υ t To generate the signature T = α(h + x) t ) -1 The encrypted message σ = (C, h, T) is then sent to the cloud server.

[0118] (7-5) Depending on the delivery method selected by the user, the terminal will send the invoice to the recipient via email, SMS, or other means, or directly connect to the printer for printing.

[0119] (8) Invoice information storage and analysis

[0120] The cloud server uses its own private key to decrypt the invoice information and generate an invoice. The specific steps are as follows.

[0121] (8-1) After receiving the ciphertext σ=(C,h,T) sent by the terminal, the cloud server decrypts the temporary key r1=x cs zΥ t ·hzΥ cs ;

[0122] (8-2) Decrypting the ciphertext on the cloud server yields the plaintext.

[0123] (8-3) Cloud server verification h = H2(r1,m,Y) cs ,Υ t If the condition is not met, reject the ciphertext; otherwise, accept the message.

[0124] Example 3:

[0125] In Example 2, the system process and algorithm were explained in detail. Next, the specific deployment and implementation of the method will be explained through the interaction between modules.

[0126] A secure intelligent invoicing system based on image super-resolution enhancement comprises three main modules: an intelligent invoice information extraction module, an intelligent error correction module, and an automated process engine module. The intelligent invoice information extraction module includes three sub-modules: OCR image and text recognition, Whisper language recognition, and KeyBERT keyword extraction. The intelligent error correction module consists of information verification and the BERT text classification algorithm. The automated process engine module is divided into sub-modules for user registration, user login, data collection, invoice generation and management, and information transmission. Figure 5 As shown, the specific system workflow is as follows.

[0127] (1) During system initialization, the system initializes the signature parameters and deploys the model. During user registration, the system calls the registration submodule to complete the issuance and storage of user keys. When a user logs in, the system calls the login submodule to verify the salted hash against the value stored in the database and determines whether to allow the user to log in based on the result.

[0128] (2) After the user selects the invoice information entry method, the system calls the data acquisition submodule to complete the invoice information acquisition. If it is file upload entry, the system calls the camera to take a picture or the user uploads a file. If it is voice entry, the system calls the microphone to complete the voice information entry.

[0129] (3) Subsequently, the data acquisition submodule uses different AI algorithm submodules to complete the acquisition based on the different forms of information. If it is an image, OCR image recognition is called. If it is speech, Whisper speech recognition is called. The invoice information is then extracted from the recognized text information using KeyBERT.

[0130] (4) After receiving the invoice information, the system calls the intelligent error correction module. The verification module checks whether the data format (such as the number of digits in the taxpayer identification number, the format of the amount) conforms to tax regulations and verifies the logical relationships between the data. The BERT model is used to predict the reasonableness of the invoice information; if it is unreasonable, the system automatically prompts the user to correct it and provides intelligent error correction suggestions.

[0131] (5) After the user confirms that the invoice information is correct, the system calls the invoice generation and management submodule to call the tax certificate interface to generate the invoice, and calls the information transmission submodule to encrypt the invoice information and upload it to the cloud server. In addition, the cloud server will periodically call deep learning to optimize and update the model weights to improve the model recognition rate.

[0132] (6) Depending on the user's choice, the invoice generation and management submodule sends the invoice to the user via email, SMS or other means, or directly connects to the printer for printing.

[0133] Figure 3 This is a screenshot of a genuine electronic invoice and its low-resolution image after being downsampled using Bicubic. Figure 4 This is a comparison chart of the super-resolution reconstruction effects of an embodiment of the present invention.

[0134] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.

Claims

1. A secure intelligent invoicing method based on image super-resolution enhancement, characterized in that, include: During the initialization phase, public signature parameters are generated and a training model is deployed. Users register and obtain their own keys. When logging in, the terminal encrypts the user's identity and login password and sends them to the cloud server for identity verification. After successful identity verification, the user can select voice recognition or text recognition on the terminal to convert the voice signal or text signal on the text image into text information. The system automatically extracts invoice content from the obtained text information using keywords, intelligently corrects the invoice information based on the invoice template selected by the user, calls the tax digital certificate to sign and generate a legal and valid electronic invoice, and then sends the invoice to the recipient or prints it according to the delivery method, and stores the invoice data in the local database. The terminal uses a signature algorithm based on a certificateless cryptography system to sign the invoice data and uploads it to the cloud server. The cloud server decrypts and verifies the invoice information and generates an invoice.

2. The secure intelligent invoicing method based on image super-resolution enhancement according to claim 1, characterized in that, The text recognition process enhances text images using a lightweight invoice image super-resolution model based on equivalent large convolution kernels and adaptive pixel classification, and then converts the text signals in the text images into text information using OCR technology; the speech recognition process converts speech signals into text information by calling OpenAIWhisper.

3. The secure intelligent invoicing method based on image super-resolution enhancement according to claim 1, characterized in that, After intelligently correcting the invoice information based on the invoice template selected by the user, the BERT model is used to predict the rationality of the current invoice information based on historical invoice data, and then the tax digital certificate is called to sign and generate a legal and valid electronic invoice.

4. The secure intelligent invoicing method based on image super-resolution enhancement according to claim 1, characterized in that, The signature algorithm seamlessly combines encryption and digital signatures, utilizing temporary key negotiation and hash chain binding mechanisms to achieve signature verification of invoice data.

5. The secure intelligent invoicing method based on image super-resolution enhancement according to claim 1, characterized in that, During the initialization phase, the system initializes the common parameters for signature encryption and trains a lightweight invoice image super-resolution model based on equivalent large convolutional kernels and adaptive pixel classification. The specific steps are as follows: (1-1) Given a security parameter λ, the key distribution server initializes the signature public parameters, first initializing an additive group G of order p, where Γ is a generator in G, and the system master key is... The master public key is P pub =msk·Γ, where It is the field of non-zero integers modulo p; (1-2) The key issuance server publicly discloses the signature public parameters {Γ,G,p,λ,P}. pub } and hash function H1: H2: Where |m| is the length of message m, and H1 and H2 are hash functions; (1-3) Use a camera to capture original invoice images under various distances and lighting conditions, and take photos or screenshots of invoice information to obtain high-resolution invoice images X. HR A low-resolution image X is generated by downsampling a high-resolution invoice image using the Bicubic interpolation method. LR ; Where the downsampling factor s>1, w(i,j) is the weight calculated according to the Bicubic interpolation kernel function, and (x,y) are the pixel coordinates of the low-resolution image; all the obtained low-resolution-high-resolution invoice images are compared... The dataset used for model training consists of a pair of images where the size of the high-resolution invoice image is an integer multiple of the size of the low-resolution image, and N is the total number of image pairs. (1-4) Perform data augmentation on the dataset, including performing one or more of the following operations on the low-resolution images and high-resolution invoice images: 90°, 180°, 270° rotation, horizontal flipping, or random cropping; (1-5) Construct a super-resolution enhancement neural network model F on the training platform, which includes an equivalent large kernel convolution module, an adaptive pixel classification module, and a global and channel attention mechanism. θ (·), where θ is the model parameter, which takes the low-resolution image X obtained in step (1-4) as an input. LR As input, the output is the reconstructed image. (1-6) The L1 loss function is used to measure the difference between the reconstructed image and the corresponding real high-resolution invoice image. The loss function is: Represented as the actual pixel value y i With the reconstructed pixel value f(x) i Minimize the sum of the absolute differences of ), where i represents the i-th pixel in the image and n represents the number of pixels in the image; (1-7) The model constructed in step (1-5) is trained based on the optimization algorithm. The backpropagation algorithm and Lion optimizer are used to minimize the loss function. The model parameters θ are iteratively updated until the loss function converges or the preset training rounds are reached, and the lightweight invoice image super-resolution model is obtained after training.

6. The secure intelligent invoicing method based on image super-resolution enhancement according to claim 5, characterized in that, Steps (1-5) are implemented as follows: (1-5a) For the input low-resolution image Perform a 3×3 convolution operation to extract shallow feature information and increase the channel dimension, denoted as: C, h, and w represent the number of channels, height, and width of the input feature, respectively; (1-5b) Using the SCA module in conjunction with the input feature map, spatial attention and channel attention are jointly modeled to globally enhance the responses of key regions and salient channels in the image, resulting in a spatial attention map. Channel attention map Represented as: S a =SA(Conv 1×1 (F0)), C a =CA(Conv) 1×1 (F0)), where SA(·) and CA(·) are the spatial attention mechanism and the channel attention mechanism, respectively. n×n This indicates that an n×n kernel is used for the convolution operation; (1-5c) The ELK module is based on the spatial attention-enhanced feature input F in =S a ⊙F0+F0, then sequentially passed through a depthwise separable convolution with a kernel size of 5×5, a depthwise dilated convolution with a kernel size of 5×5 and a dilation factor of 3, and a 1×1 pointwise convolution to achieve an equivalent large convolution kernel operation, resulting in a large receptive field of 13×13 with significantly reduced parameter and computational costs; using this equivalent large convolution kernel operation, an attention map of all features at the spatial level is obtained. Represented as: in This indicates that a depthwise separable convolution kernel of size n×n is used for convolution operations. This represents a depthwise dilated convolution of size n×n; it utilizes the attention map A and the input features of the ELK module to perform a Hadamard product and then performs a residual connection with the input features, finally passing it through a 1×1 convolution Conv. 1×1 The features are further refined to obtain the output F of the ELK module. ELK This process is represented as: F ELK =Conv 1×1 (A⊙F in +F in ), where ⊙ represents the Hadamard product operation; (1-5d) For the feature input F after spatial attention enhancement in The MCDA module is used to fully utilize non-local similar pixels to assist in reconstruction; the input features are divided at the pixel level of the original image, and the spatial attention map S is obtained. a The activation values ​​of all pixel positions are sorted, and features of pixels with similar positions are grouped together. The change in the feature vector during this process is: (C,h,w)→(C,n,s), where h×w=n×s. num , n represents the number of groups, s num This represents the number of pixels within each group; then, the ELSK module, which shares a similar concept with the ELK module in steps (1-5c), is used to enhance the features after the division grouping operation. Unlike the ELK module, ELSK addresses changes in the feature input and enhances the features after acquiring the attention map A. ' Feature extraction is performed using asymmetric sparse 1×5 convolution kernels, specifically as follows: Then, the Recover operation is used to restore all features to their original input positions after feature enhancement. (1-5e) The output features of the ELK module and MCDA module are weighted by channel attention and then summed element-wise. The result is further refined by a feedforward neural network FFN to obtain the deep features F. Deep This process is represented as: F Deep =FFN(F ELK ·C a +F MCDA ); (1-5f) for deep features F Deep A residual connection is made with the shallow feature F0, and a 3×3 convolution Conv is applied to the result. 3×3 To upgrade the channel to its original state. Features obtained by multiple times s up Upsampling factor: F up =Conv 3×3 (F Deep +F0); First, the feature F is processed through the pixel shuffle operation. up Perform channel rearrangement, changing the dimensions from Transformed into (hs) up ,ws up C) Obtain high-resolution dimensions, then restore the number of channels to RGB space to obtain the super-resolution reconstructed image.

7. A secure intelligent invoicing method based on image super-resolution enhancement according to claim 5, characterized in that, During user registration, users first enter their own identity ID. u After setting the username and password, and receiving these parameters, the key distribution server issues a unique public-private key pair; the specific steps are as follows: (2-1) The key distribution server selects a random number a and calculates R. u =aΓ,O u =H1(id) u ,R u And generate a public key signature φ u =msk+aO u ; then , will part of the key (φ u ,R u The message is sent to the terminal via a secure channel, where u = cs,t, representing the cloud server cs and the terminal t, respectively. (2-2) After receiving part of the key, the terminal verifies whether the following equation holds true; P pub +H1(id u ,R u )R u =φ u C If this fails, a new partial public key is requested; otherwise, the terminal selects a random number x. u a1, calculate public key Y u =x u Γ, Public key signature S u =x u +a1H1(φ u ,Υ u and a blinding value T u =a1Γ; User's private key is (x u ,φ u The public key is (Υ). u ,S u ,T u The user then sends the public key to the key distribution server; the key distribution server verifies Y. u +H1(φ u ,Υ u )T u =S u Γ; If true, accept and publish this public key; otherwise, reject this public key; (2-3) The terminal provides the user with the private key and uploads the public key to the cloud server. In addition, to ensure the security of the user's login password, the cloud server salts and obfuscates the user's password hash value. The collaborative key issuing server binds the salted user password hash value, the user's public key, and the user's identity, and stores them in the database to ensure that the user's password is not leaked throughout the process. When the user logs in, the user enters the user identity and password, the terminal calculates the password hash value, and uploads it to the cloud server. The cloud server salts and obfuscates the password hash value and uses the obfuscated password, username, and the value stored in the database to verify whether it passes. If it passes, the user is allowed to log in; otherwise, the user's login fails.

8. The secure intelligent invoicing method based on image super-resolution enhancement according to claim 1, characterized in that, The invoice content is automatically extracted from the obtained text information using keywords, and the KeyBERT keyword extraction model is used for this purpose.

9. A secure intelligent invoicing method based on image super-resolution enhancement according to claim 5, characterized in that, For the corrected invoice information, a legal and valid electronic invoice is generated by calling the tax digital certificate for signing. Then, the invoice is sent to the recipient or printed according to the delivery method, and the invoice data is stored in the local database. The specific implementation method is as follows: (7-1) For the corrected invoice information, the cloud server calls the tax digital certificate to sign the invoice content in order to generate a valid electronic invoice; (7-2) The terminal stores the invoice information in the local database, then selects a random number α and calculates the temporary key r1 = αY. cs ; (7-3) Encrypted invoice message m receives ciphertext (7-4) The terminal uses a temporary key r1, and the cloud server shares the terminal's public key Υ. cs Υ t Calculate the hash value h = H2(r1,m,Y) with message m. cs ,Υ t To generate the signature T = α(h + x) t ) -1 And send the ciphertext σ=(C,h,T) to the cloud server; (7-5) Depending on the delivery method selected by the user, the terminal will send the invoice to the recipient via email, SMS or directly connect to the printer for printing.

10. A secure intelligent invoicing method based on image super-resolution enhancement according to claim 9, characterized in that, The cloud server decrypts and verifies the invoice information, and generates an invoice. The specific implementation is as follows: (8-1) After receiving the ciphertext σ=(C,h,T) sent by the terminal, the cloud server decrypts the temporary key r1=x cs zΥ t ·hzΥ cs ; (8-2) Decrypting the ciphertext on the cloud server yields the plaintext. (8-3) Cloud server verification h = H2(r1,m,Y) cs ,Υ t If the condition is not met, reject the ciphertext; otherwise, accept the message.