System and method for automatically issuing digital invoices based on digital electronic business interface
By introducing a support vector machine model and a variational automatic encoder into the invoice processing system, an automatic issuance of digital invoices based on the digital and diesel interface is realized, which solves the problems of low efficiency and accuracy of traditional invoice processing processes, and realizes efficient and accurate invoice processing and outlier recognition.
Patent Information
- Application Number
- CN202411962312.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Traditional invoice processing processes are low in efficiency and accuracy, and it is difficult to effectively identify potential abnormalities or frauds.
A system for automatically issuing digital invoices based on the digital invoice interface is designed, including four key units: order management, invoice issuance, review and delivery. The system uses the support vector machine model for invoice audits, and extracts outlier features through kernel functions and variational automatic encoder to realize intelligent audit and outlier evaluation.
It realizes the full process automation from order receipt to invoice delivery, improves work efficiency, reduces the possibility of human error, ensures the accuracy and compliance of invoice information, and effectively identifies potential abnormalities or frauds.
Smart Images

Figure CN119359396B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automatic issuance of digital invoices, and in particular to a system and method for automatic issuance of digital invoices based on a digital electronic business interface. Background Art
[0002] The traditional invoice processing process usually relies on manual operation. From order information entry, invoice generation to review and delivery, each link requires manual intervention, which is not only time-consuming and labor-intensive, but also prone to errors. With the growth of the business volume of enterprises, this manual processing method is difficult to meet the needs of rapid response to market changes; in the process of manual invoice processing, due to the influence of human factors, information entry errors, calculation errors, etc. may occur, resulting in inaccurate invoice information, which in turn affects the financial management and tax declaration of the enterprise; the traditional system's evaluation of invoice outliers is often limited to internal data, lacks timely response to changes in the external environment (such as the financial status of cooperative enterprises), and cannot effectively identify potential anomalies or fraudulent behaviors. Therefore, a system and method for automatically issuing digital invoices based on the digital electronic business interface is provided. Summary of the invention
[0003] The purpose of the present invention is to provide a system and method for automatically issuing digital invoices based on a digital electronic business interface, so as to solve the problems of low efficiency and accuracy and difficult control of abnormal values in the traditional invoice processing process mentioned in the above background technology.
[0004] To achieve the above objectives, on the one hand, the present invention aims to provide a system for automatically issuing digital invoices based on a digital electronic business interface, comprising:
[0005] An order management unit, which receives and processes order information from an enterprise ERP system;
[0006] An invoice issuing unit, which automatically generates a digital invoice based on the order information transmitted by the order management unit, and calls the digital invoice business interface to transmit the digital invoice information to the tax bureau system;
[0007] An invoice review unit, wherein the invoice review unit reviews the generated digital electricity invoice based on a one-class support vector machine model, trains the one-class support vector machine model using a kernel function and adjusting hyperparameters of a variational autoencoder, optimizes the one-class support vector machine model, and uses the optimized one-class support vector machine model to evaluate the newly generated digital electricity invoice in real time;
[0008] Among them, the optimized support vector machine model is:
[0009] ;
[0010] in, Indicates the characteristic data of digital invoice; Represents the number of samples in the training set; Represents the support vector weight of each sample in the training set; represents the kernel function; Indicates The feature vector of the samples in the training set; Represents the index of the sample in the training set; represents the bias term; It represents the prediction result of the back-end support vector machine model for the duplicate numbering problem of invoices; A feature indicating whether the invoice number is a duplicate; represents the parameter controlling the intensity of the penalty for duplicate invoice numbers;
[0011] An invoice delivery unit, wherein the invoice delivery unit automatically delivers the reviewed digital invoice to the customer.
[0012] As a further improvement of the technical solution, the invoice issuing unit automatically generates a digital invoice according to the order information transmitted by the order management unit, including the following steps:
[0013] S1.1. Receive order information from the order management unit;
[0014] S1.2. Pre-process the received order information;
[0015] S1.3. Apply the corresponding tax rate according to the commodity category, calculate the tax amount for each commodity, and summarize the total tax amount to calculate the total amount including tax;
[0016] S1.4. Fill the pre-processed order information into the pre-designed electronic invoice template to generate a digital invoice, and generate a unique number for each invoice.
[0017] As a further improvement of the technical solution, the calling of the digital electronic business interface to transmit the digital electronic invoice information to the tax bureau system includes the following steps:
[0018] S1.5. Based on the generated digital invoice, confirm the accuracy of all the digital invoice information filled into the invoice template, and organize the digital invoice information in accordance with the format specified by the digital invoice enterprise interface;
[0019] S1.6. Construct an HTTP POST request based on the API documentation provided by Digital Electronics.
[0020] S1.7, sending the constructed request to the URL specified by the digital electronic enterprise interface through the network;
[0021] S1.8. After receiving the response from the digital enterprise interface, parse the data returned by the tax bureau system.
[0022] As a further improvement of the technical solution, the invoice review unit reviews the generated digital electricity invoice based on a type of support vector machine model, including the following steps:
[0023] S2.1. Receive the digital invoice data to be reviewed from the invoice issuing unit, set the initial review status to "pending review", and record the start time;
[0024] S2.2, automatically conduct preliminary review;
[0025] S2.3, evaluate the outlier scores of digital invoices through a one-class support vector machine model to identify potential anomalies;
[0026] S2.4. Mark high outlier invoices through preset business rules;
[0027] S2.5. For abnormal digital invoices detected, mark the specific issues and trigger further manual review.
[0028] As a further improvement of the technical solution, in S2.3, the outlier score of the digital electricity invoice is evaluated by a class of support vector machine models to identify potential anomalies, including the following steps:
[0029] S2.31. Collect normal digital invoice data from the historical records of the enterprise as a training set and pre-process the normal digital invoice data;
[0030] S2.32, extracting features related to abnormal values of digital invoices based on variational autoencoder;
[0031] S2.33, adjust the variational autoencoder hyperparameters, and use the kernel function and the variational autoencoder hyperparameters to train a class of support vector machine models, and optimize the class of support vector machine models for the duplicate numbering problem of invoices;
[0032] S2.34. Reserve a portion of normal invoices as a test set, and use the test set to evaluate the performance of the first-class support vector machine model after training is completed;
[0033] S2.35. Use the optimized one-class support vector machine model to evaluate the newly generated digital invoices in real time.
[0034] As a further improvement of the technical solution, in S2.32, extracting features related to abnormal values of digital electricity invoices based on variational autoencoders includes the following steps:
[0035] S2.321. Design a neural network structure as an encoder, the input is the original digital invoice feature vector, and the output is the mean and logarithmic variance vector in the latent space;
[0036] S2.322. Design another neural network structure as a decoder, the input is the latent variable, and the output is the reconstruction of the original invoice features;
[0037] S2.323. Define a loss function, and use the loss function to calculate the difference between the reconstructed invoice features and the original invoice features, optimize the loss function based on the abnormal feature differences of digital invoices in different time periods and geographical locations, and reconstruct the loss function based on the historical records of the transaction personnel in the process of calculating the difference between the reconstructed invoice features and the original invoice features;
[0038] S2.324, using the data of the training set to update the variational autoencoder parameters until the variational autoencoder reaches a predetermined maximum number of iterations m;
[0039] S2.325. After the variational autoencoder training is completed, the new digital invoice feature data is input into the trained encoder to obtain the representation of the new digital invoice features in the latent space, that is, the extracted features.
[0040] As a further improvement of the technical solution, in S2.323, the loss function is:
[0041] ;
[0042] in, represents the lower bound of evidence; represents the set of parameters of the decoder network; represents the set of parameters of the encoder network; Indicates the characteristic data of digital invoice; Represents latent variables The approximate posterior distribution of ; represents the probability distribution defined by the decoder; represents latent variables; Represents latent variables The prior distribution of represents a measure of the difference between the approximate posterior distribution and the prior distribution;
[0043] The loss function is optimized based on the abnormal characteristics of digital invoices in different time periods and geographical locations:
[0044] ;
[0045] in, represents the optimized lower bound of evidence; represents a weight function that adjusts the importance of reconstruction error according to time and geographical location; Indicates a timestamp; Indicates geographic location; Indicates the total number of digital invoice samples; The index of the digital invoice sample.
[0046] As a further improvement of the technical solution, in S2.33, a type of support vector machine model is:
[0047] ;
[0048] In the formula, Indicates the input digital invoice characteristic data , the prediction results of a class of support vector machine models.
[0049] As a further improvement of the technical solution, the invoice delivery unit automatically delivers the reviewed digital invoice to the customer, including the following steps:
[0050] S3.1. Receive the approved digital electricity invoice data from the invoice review unit, set the initial delivery status to "pending delivery", and record the start time;
[0051] S3.2, verify and pre-process the digital invoice data;
[0052] S3.3. Convert the format of the digital invoice data and generate a file;
[0053] S3.4, save the generated file to the local server;
[0054] S3.5. Push the generated file to the company's internal system through the API interface, and send an email with attachments to the customer through the SMTP server.
[0055] On the other hand, the present invention provides a method for automatically issuing digital invoices based on a digital electronic business interface, which is used in any of the above-mentioned systems for automatically issuing digital electronic invoices based on a digital electronic business interface, comprising the following steps:
[0056] S4.1. Receive and process order information from the enterprise ERP system;
[0057] S4.2. Automatically generate digital invoices based on order information, and call the digital invoice business interface to transmit the digital invoice information to the tax bureau system;
[0058] S4.3. Review the generated digital invoices based on a one-class support vector machine model, and optimize the one-class support vector machine model to address the problem of duplicate invoice numbers;
[0059] S4.4. The audited digital invoice will be automatically delivered to the customer.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] 1. The system and method for automatically issuing digital invoices based on the digital electronic business interface realizes the automation of the entire process from order receipt to invoice delivery by integrating four key units: order management, invoice issuance, review and delivery. In particular, the invoice issuance unit can automatically generate digital electronic invoices based on order information, and use preset algorithms to ensure that all numerical calculations are correct. At the same time, the digital electronic business interface is called to accurately transmit the invoice information to the tax bureau system. This not only greatly reduces manual intervention and improves work efficiency, but also minimizes the possibility of human errors and ensures the accuracy and compliance of invoice information. In addition, the invoice review unit uses an advanced first-class support vector machine model to intelligently review the generated digital electronic invoices, which can quickly identify potential outliers or abnormal situations, further ensuring the quality of the invoice.
[0062] 2. In the system and method for automatically issuing digital electricity invoices based on the digital electricity and enterprise interface, the invoice review unit introduces a type of support vector machine model to evaluate the outlier score of digital electricity invoices. This approach not only takes into account the data characteristics within the enterprise, but also combines the outlier characteristics of different time periods and geographical locations, making the outlier evaluation more comprehensive and accurate. By introducing factors such as time, regional weights, and transaction personnel historical records to adjust the loss function, the system can provide each enterprise with a personalized outlier control strategy while maintaining a certain degree of accuracy. This approach helps reduce the incidence of false positives and false negatives, allowing enterprises to more effectively manage invoice-related outliers and ensure the security and stability of business activities. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is the overall flow chart of the present invention;
[0064] The meaning of each number in the figure is:
[0065] 1. Order management unit; 2. Invoice issuance unit; 3. Invoice review unit; 4. Invoice delivery unit. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] Example 1: Please refer to Figure 1 As shown, a system for automatically issuing digital invoices based on the digital electronic business interface is provided, including:
[0068] The order management unit 1 receives and processes order information from the enterprise ERP system (resource planning system);
[0069] In this embodiment, the order information includes the purchaser's information (such as name, taxpayer identification number, address, telephone number, etc.), the seller's information (usually automatically brought out by the system), the product or service information (such as name, specification model, quantity, unit price, amount, etc.) and specific business information (if the order involves a specific business, such as construction services, cargo transportation services, etc.);
[0070] The invoice issuing unit 2 automatically generates a digital invoice based on the order information transmitted by the order management unit 1, and calls the digital invoice business interface to transmit the digital invoice information to the tax bureau system;
[0071] In this embodiment, the invoice issuing unit 2 automatically generates a digital invoice according to the order information transmitted by the order management unit 1, including the following steps:
[0072] S1.1, receiving order information from order management unit 1;
[0073] S1.2. Pre-process the received order information, including data screening, merging, splitting, verification, and adding notes to ensure the accuracy and compliance of the invoice information;
[0074] S1.3. Apply the corresponding tax rate according to the category of goods or services, calculate the tax amount for each good or service using the formula Tax amount = amount excluding tax × tax rate, and sum up the total tax amount to calculate the total amount including tax;
[0075] S1.4. Fill the pre-processed order information into the pre-designed electronic invoice template (the template content includes basic invoice information, seller information, buyer information, product or service details, tax information, etc.) to generate a digital invoice, and generate a unique number or identification code for each invoice to ensure its non-repeatability.
[0076] Further, calling the Digital Electronics Enterprise interface to transmit the Digital Electronics invoice information to the tax bureau system includes the following steps:
[0077] S1.5. Based on the generated digital invoice, confirm the accuracy of all the digital invoice information (such as buyer and seller information, product or service details, amount, tax amount, etc.) filled into the invoice template, and organize the digital invoice information in the format specified by the digital invoice interface, which may involve specific data structures (such as JSON or XML), and ensure that all fields meet the requirements in the interface document;
[0078] S1.6. Construct an HTTP POST request (or in accordance with the method specified in the interface) according to the API document provided by Digital Electronics. The HTTP POST request contains necessary header information (such as authentication header, content type) and body content (i.e. invoice information);
[0079] S1.7, sending the constructed request to the URL specified by the digital electronic enterprise interface through the network;
[0080] S1.8. After receiving the response from the Digital Enterprise Interface, parse the data returned by the tax bureau system. Once the tax bureau system completes the processing and verification of the invoice information, it will generate a response that includes a status description of the submitted invoice information (for example, successful submission, failure and reason, etc.). A successful response usually includes a status code indicating successful submission (for example, HTTP 200 OK) and possible transaction ID or other confirmation information.
[0081] The invoice review unit 3 reviews the generated digital electricity invoice based on a type of support vector machine model;
[0082] In this embodiment, the invoice review unit 3 reviews the generated digital electricity invoice based on a type of support vector machine model, including the following steps:
[0083] S2.1, receiving the digital invoice data to be reviewed from the invoice issuing unit 2, setting the initial review status to "pending review", and recording the start time;
[0084] S2.2. Automatically conduct preliminary review, which includes data integrity check (ensure that all required fields are correctly filled, such as invoice number, invoice date, seller information, buyer information, etc.; verify whether the data format of each field complies with regulations (such as telephone number, taxpayer identification number, etc.)), logical consistency check (recalculate the amount excluding tax, tax amount, and total amount including tax to ensure that they are consistent with the values provided in the invoice; confirm that the tax rate used is applicable to the corresponding category of goods or services; check whether the quantity of goods or services is reasonable to avoid abnormally large values), and regulatory compliance check (according to local tax regulations, check whether the invoice contains all required information and is in the correct format; recalculate the checksum using the same algorithm as when it was generated to ensure that it matches);
[0085] S2.3, evaluate the outlier scores of digital invoices through a one-class support vector machine model to identify potential anomalies;
[0086] Among them, the outlier score of digital invoices is evaluated by a one-class support vector machine model. The principle of identifying potential anomalies is to learn the distribution boundary of normal invoice data in high-dimensional space and mark digital invoices that deviate from this boundary as potential anomalies; the one-class support vector machine is an unsupervised learning method that only requires normal data samples for training. For digital invoices, this means that it can build a model based on the normal invoice data in the history of the enterprise without the need to mark abnormal data in advance, which is particularly useful for those situations where it is difficult to obtain or define clear abnormal instances; the one-class support vector machine model can find an optimal hyperplane in the feature space to distinguish "normal" and "abnormal" data points. When processing digital invoices, this method can effectively delineate the distribution area of normal invoices and regard data falling outside this area as potential anomalies, which helps to accurately detect anomalies; by using the kernel function (RBF radial basis function), the one-class support vector machine model can map the original features to a high-dimensional space, where a suitable decision boundary can be found even if the original problem is not linearly separable, which makes it very suitable for capturing complex, nonlinear outlier patterns in digital invoices;
[0087] The outlier scores of digital invoices are evaluated by a one-class support vector machine model to identify potential anomalies, including the following steps:
[0088] S2.31. Collect normal digital invoice data from the company's historical records as a training set, and pre-process the normal digital invoice data, including removing duplicates, correcting erroneous data, and ensuring data quality;
[0089] S2.32. Extract features related to abnormal values of digital invoices based on variational autoencoders, including amount, tax rate, quantity, customer type, product category, etc. Convert non-numeric features (such as customer name, product name) into numeric representations, such as using one-hot encoding or embedding methods, and standardize numeric features so that features of different scales can be compared fairly;
[0090] Furthermore, the principle of extracting features related to abnormal values of digital invoices based on variational autoencoders is to capture and represent the intrinsic structure and abnormal patterns of digital invoices in latent space by learning the probability distribution of data, so as to identify features related to abnormal values; variational autoencoders are a generative model that can learn the potential structure of data distribution. For digital invoices, this means that it can capture the hidden and complex patterns and relationships in the invoices, rather than just the surface statistical characteristics, which helps to more accurately identify abnormal situations; digital invoices usually contain a large amount of field information, forming a high-dimensional and possibly sparse data set. Variational autoencoders are good at extracting useful features from such data sets and compressing them into a lower-dimensional but information-rich representation. This dimensionality reduction process not only simplifies the subsequent outlier evaluation task, but also improves computational efficiency;
[0091] Extracting features related to abnormal values of digital invoices based on variational autoencoders includes the following steps:
[0092] S2.321. Design a neural network structure as an encoder, the input is the original digital invoice feature vector, and the output is the mean and logarithmic variance vector in the latent space;
[0093] S2.322. Design another neural network structure as a decoder. The input is the latent variable and the output is the reconstruction of the original invoice features. The goal of the decoder is to restore the input data as accurately as possible.
[0094] S2.323. Define a loss function, and use the loss function to calculate the difference between the reconstructed invoice features and the original invoice features, optimize the loss function based on the abnormal feature differences of digital invoices in different time periods and geographical locations, and reconstruct the loss function based on the historical records of the transaction personnel in the process of calculating the difference between the reconstructed invoice features and the original invoice features;
[0095] Furthermore, the loss function is:
[0096] ;
[0097] in, represents the evidence lower bound, which is the quantity that the variational autoencoder tries to maximize; Represents the set of parameters of the decoder network, usually neural network weights and other learnable parameters; represents the set of parameters of the encoder network; Indicates the characteristic data of digital invoice; Represents latent variables The approximate posterior distribution of is estimated by the encoder network based on the input data 𝑥; represents the probability distribution defined by the decoder, for a given latent variable Reconstruct the original data probability; represents the latent variable, which is an unobserved implicit variable in the variational autoencoder and is used to capture the structural information in the data; Represents latent variables The prior distribution of , which is the model's assumption about the distribution of data points in the latent space, is a simple probability distribution; represents a measure of the difference between the approximate posterior distribution and the prior distribution;
[0098] The outlier characteristics of the same time period and geographic location may vary greatly. For example, during promotional activities, the possibility of false transactions may increase; and in some regions, specific types of invoices may have higher audit outliers. By considering these differences, more accurate outlier assessment and early warning can be achieved; by introducing weights of time and geographic location, the system can learn new patterns and trends from the ever-changing data, which allows the model to continue to improve over time to cope with new challenges that may arise in the future. At the same time, this also makes it easier to monitor and evaluate model performance and continuously adjust optimization strategies based on feedback; the loss function is optimized based on the differences in abnormal characteristics of digital invoices in different time periods and geographic locations:
[0099] ;
[0100] in, represents the optimized lower bound of evidence; represents a weight function that adjusts the importance of reconstruction error according to time and geographical location; Indicates a timestamp; Indicates geographic location; Indicates the total number of digital invoice samples; The index of the digital invoice sample.
[0101] Furthermore, the specific process of optimization is as follows: collect historical data of digital invoices in different time periods and different geographical locations, including information such as invoice amount, invoice type, and business transaction object; analyze the outlier trend of digital invoices in different time periods, and the impact of outlier characteristics of different geographical locations on the outliers of digital invoices;
[0102] For time interval Calculate the frequency of abnormal value events (such as false invoices, tax evasion, etc.) in digital invoices within this time interval , and the total number of electronic invoices ,but ,so It reflects the The relative outlier weights of the digital invoices in the time interval; , calculate the frequency of outlier events in digital invoices within the geographic location , and the total number of electronic invoices ,but , Reflects the The relative outlier weights of digital invoices within a geographical location;
[0103] In the original variational autoencoder training process, for each digital invoice data point ,
[0104] Determine the time period and geographic location ;according to , calculate the weight value, and then calculate the expected item When Multiply by the corresponding Then ask for expectation;
[0105] Each trader has his or her own unique trading habits and behavior patterns. By analyzing historical records, these patterns can be identified and incorporated into the model as features, which helps to more accurately understand the behavioral baseline of each trader, so as to provide timely warnings when deviations from normal behavior are found; the historical records of traders can provide additional time series information, such as transaction frequency, amount change trends, etc. When a trader's behavior suddenly changes significantly (for example, employees who usually handle small transactions begin to frequently handle large transactions), this may be a signal of abnormal or potential fraudulent behavior. The reconstructed loss function can better capture such abnormalities and improve the sensitivity of detection; in the process of calculating the difference between the reconstructed invoice features and the original invoice features, the loss function is reconstructed based on the trader's historical records as follows:
[0106] ;
[0107] in, Represents the historical record characteristics of traders;
[0108] S2.324, using the data of the training set to update the variational autoencoder parameters until the variational autoencoder reaches a predetermined maximum number of iterations m;
[0109] S2.325. After the variational autoencoder is trained, the new digital invoice feature data is input into the trained encoder to obtain the representation of the new digital invoice feature in the latent space, i.e., the extracted feature;
[0110] S2.33, adjust the variational autoencoder hyperparameters (regularization parameter, kernel width parameter), and use the kernel function (RBF kernel function) and the variational autoencoder hyperparameters to train a class of support vector machine models, and optimize the class of support vector machine models for the duplicate numbering problem of invoices;
[0111] Furthermore, a type of support vector machine model is:
[0112] ;
[0113] in, Indicates the input digital invoice characteristic data ,The result predicted by the one-class SVM model, the positive and negative signs indicate whether the invoice is considered abnormal; Indicates the characteristic data of digital invoice; Represents the number of samples in the training set; Represents the support vector weights of each sample in the training set. These values are determined by the algorithm during the training process. Represents the kernel function, which is used to calculate the similarity between two samples. ; Indicates The feature vector of the samples in the training set; Represents the index of the sample in the training set; represents the bias term;
[0114] Different companies may have different business models, transaction frequencies, and amount ranges. By combining the business transaction volume of the company, "normal" transaction behavior can be more accurately defined, thereby helping the SVM model to better identify outliers and reduce false positives and negatives. The credit rating of each company reflects its financial health and reliability. For companies with higher credit ratings, their invoice data may have higher credibility, so relatively loose thresholds may be used during the review. On the contrary, for companies with lower credit ratings, more stringent review standards may be required, which helps make the model more in line with the actual situation of the company and provide personalized services.
[0115] Aiming at the problem of duplicate invoice numbering, a class of support vector machine models is optimized:
[0116] ;
[0117] in, It represents the prediction result of the back-end support vector machine model for the duplicate numbering problem of invoices; A feature indicating whether the invoice number is repeated. If it is a repeated number, it is 1, otherwise it is 0; represents the parameter controlling the intensity of the penalty for duplicate invoice numbers;
[0118] S2.34. Reserve a portion of normal invoices as a test set, and use the test set to evaluate the performance of the first-class support vector machine model after training is completed;
[0119] S2.35. Use the optimized one-class support vector machine model to evaluate the newly generated digital invoices in real time.
[0120] S2.4. Mark high outlier invoices through preset business rules (such as transaction amount exceeding threshold (when the amount of a single transaction exceeds the set upper limit a, the system will mark the invoice as a high outlier), frequent invoicing for specific customers (set a time window (such as one day, one week or one month) and the corresponding maximum number of invoicing times b, monitor the invoicing frequency of each customer, and once the number of invoices issued by a customer within this time window exceeds the set maximum number, it will be marked as a high outlier), repeated transactions or similar transaction patterns (detect multiple very similar transactions (such as the same goods, amounts, time intervals) in a short period of time, which may be an attempt to evade detection) etc.);
[0121] S2.5. For abnormal digital invoices detected, mark the specific issues and trigger further manual review.
[0122] Invoice delivery unit 4 automatically delivers the reviewed digital invoice to the customer in various formats (such as XML, PDF, OFD), which can be sent via email, SMS, etc.
[0123] In this embodiment, the invoice delivery unit 4 automatically delivers the reviewed digital invoice to the customer in multiple formats (such as XML, PDF, OFD), including the following steps:
[0124] S3.1, receiving the approved digital electricity invoice data from the invoice review unit 3, setting the initial delivery status to "pending delivery", and recording the start time;
[0125] S3.2. Verify and pre-process the digital invoice data to ensure that all required fields are correctly filled, verify whether the data format of each field complies with regulations, and recalculate key values such as amount and tax to ensure consistency with the audit results;
[0126] S3.3. Convert the digital invoice data to a format such as XML, PDF, or OFD to generate a file;
[0127] S3.4. Save the generated files to a local server or cloud storage service to ensure easy access and backup;
[0128] S3.5. Push the generated files to the company's internal system (such as ERP, CRM) through the API interface to ensure information synchronization, and send emails with attachments to customers through the SMTP server to ensure that the email content is clear and the format is correct.
[0129] Embodiment 2: Embodiment 2 of the present invention differs from Embodiment 1 in that this embodiment introduces a method for automatically issuing digital invoices used by a system for automatically issuing digital invoices based on a digital electronic business interface.
[0130] The method for automatically issuing digital invoices based on the digital electronic business interface, used in any of the above-mentioned systems for automatically issuing digital invoices based on the digital electronic business interface, comprises the following steps:
[0131] S4.1. Receive and process order information from the enterprise ERP system;
[0132] S4.2. Automatically generate digital invoices based on order information, and call the digital invoice business interface to transmit the digital invoice information to the tax bureau system;
[0133] S4.3. Review the generated digital invoices based on a one-class support vector machine model, and optimize the one-class support vector machine model to address the problem of duplicate invoice numbers;
[0134] S4.4. The audited digital invoice will be automatically delivered to the customer.
[0135] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only preferred examples of the present invention, and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A system for automatically issuing digital invoices based on the digital electronic business interface, characterized in that: include: An order management unit, which receives and processes order information from an enterprise ERP system; An invoice issuing unit, which automatically generates a digital invoice based on the order information transmitted by the order management unit, and calls the digital invoice business interface to transmit the digital invoice information to the tax bureau system; An invoice review unit, wherein the invoice review unit reviews the generated digital electricity invoice based on a one-class support vector machine model, trains the one-class support vector machine model using a kernel function and adjusting hyperparameters of a variational autoencoder, optimizes the one-class support vector machine model, and uses the optimized one-class support vector machine model to evaluate the newly generated digital electricity invoice in real time; The invoice review unit reviews the generated digital electricity invoice based on a type of support vector machine model, including the following steps: S2.3, evaluate the outlier scores of digital invoices through a one-class support vector machine model to identify potential anomalies; including the following steps: S2.32, extracting features related to abnormal values of digital invoices based on variational autoencoder, including the following steps: S2.
321. Design a neural network structure as an encoder, the input is the original digital invoice feature vector, and the output is the mean and logarithmic variance vector in the latent space; S2.
322. Design another neural network structure as a decoder, the input is the latent variable, and the output is the reconstruction of the original invoice features; S2.
323. Define a loss function, and use the loss function to calculate the difference between the reconstructed invoice features and the original invoice features, optimize the loss function based on the abnormal feature differences of digital invoices in different time periods and geographical locations, and reconstruct the loss function based on the historical records of the transaction personnel in the process of calculating the difference between the reconstructed invoice features and the original invoice features; Optimize the loss function: ; represents the optimized lower bound of evidence; represents a weight function that adjusts the importance of reconstruction error according to time and geographical location; Indicates a timestamp; Indicates geographic location; Indicates the total number of digital invoice samples; An index representing a sample of a digital invoice; represents the set of parameters of the decoder network; represents the set of parameters of the encoder network; Indicates the characteristic data of digital invoice; Represents latent variables The approximate posterior distribution of ; represents the probability distribution defined by the decoder; represents latent variables; Represents latent variables The prior distribution of represents a measure of the difference between the approximate posterior distribution and the prior distribution; S2.324, using the data of the training set to update the variational autoencoder parameters until the variational autoencoder reaches a predetermined maximum number of iterations m; S2.
325. After the variational autoencoder is trained, the new digital invoice feature data is input into the trained encoder to obtain the representation of the new digital invoice feature in the latent space, i.e., the extracted feature; S2.33, adjust the variational autoencoder hyperparameters, and use the kernel function and the variational autoencoder hyperparameters to train a class of support vector machine models, and optimize the class of support vector machine models for the duplicate numbering problem of invoices; Among them, the optimized support vector machine model is: ; Indicates the characteristic data of digital invoice; Represents the number of samples in the training set; Represents the support vector weight of each sample in the training set; represents the kernel function; Indicates The feature vector of the samples in the training set; Represents the index of the sample in the training set; represents the bias term; It represents the prediction result of the back-end support vector machine model for the duplicate numbering problem of invoices; A feature indicating whether the invoice number is a duplicate; represents the parameter controlling the intensity of the penalty for duplicate invoice numbers; The invoice delivery unit (4) automatically sends the reviewed digital invoice to the customer's mailbox.
2. The system for automatically issuing digital invoices based on the digital electronic business interface according to claim 1 is characterized by: The invoice issuing unit (2) automatically generates a digital invoice based on the order information transmitted by the order management unit (1), including the following steps: S1.
1. receiving order information from the order management unit (1); S1.
2. Pre-process the received order information; S1.
3. Apply the corresponding tax rate according to the commodity category, calculate the tax amount for each commodity, and summarize the total tax amount to calculate the total amount including tax; S1.
4. Fill the pre-processed order information into the pre-designed electronic invoice template to generate a digital invoice, and generate a unique number for each invoice.
3. The system for automatically issuing digital invoices based on the digital electronic business interface according to claim 2 is characterized by: The calling of the digital electricity business interface to transmit the digital electricity invoice information to the tax bureau system includes the following steps: S1.
5. Based on the generated digital invoice, confirm the accuracy of all the digital invoice information filled into the invoice template, and organize the digital invoice information in accordance with the format specified by the digital invoice enterprise interface; S1.
6. Construct an HTTP POST request based on the API documentation provided by Digital Electronics. S1.7, sending the constructed request to the URL specified by the digital electronic enterprise interface through the network; S1.
8. After receiving the response from the digital enterprise interface, parse the data returned by the tax bureau system.
4. The system for automatically issuing digital invoices based on the digital electronic business interface according to claim 3 is characterized by: The invoice delivery unit (4) automatically sends the reviewed digital invoice to the customer's mailbox, including the following steps: S3.
1. Receive the approved digital electricity invoice data from the invoice review unit (3), set the initial delivery status to "pending delivery", and record the start time; S3.2, verify and pre-process the digital invoice data; S3.
3. Convert the format of the digital invoice data and generate a file; S3.4, save the generated file to the local server; S3.
5. Push the generated file to the company's internal system through the API interface, and send an email with attachments to the customer through the SMTP server.
5. A method for automatically issuing digital invoices based on a digital electronic business interface, used in a system for automatically issuing digital invoices based on a digital electronic business interface as claimed in any one of claims 1 to 4, characterized in that: The steps include: S4.
1. Receive and process order information from the enterprise ERP system; S4.
2. Automatically generate digital invoices based on order information, and call the digital invoice business interface to transmit the digital invoice information to the tax bureau system; S4.
3. Review the generated digital invoices based on a one-class support vector machine model, and optimize the one-class support vector machine model to address the problem of duplicate invoice numbers; S4.
4. The reviewed digital invoice will be automatically sent to the customer's email address.
Citation Information
Patent Citations
Invoicing system and method based on windows operating system
CN108734526A
Machine Learning Based Duplicate Invoice Detection
US20240134834A1