Bill linkage automatic accounting processing method and system

By linking the operating system with the invoice platform, fully automated invoice data acquisition, association, and electronic file generation are achieved, solving the problem of low efficiency in electronic invoice management in existing technologies and realizing efficient and accurate fully electronic financial management.

CN121120282APending Publication Date: 2025-12-12BEIJING WANGLAITIANXIA MEDICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511279941.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing financial software suffers from problems such as duplicate printing and chaotic management in electronic invoice management. Financial personnel are unable to automatically link invoices and payment documents, resulting in low efficiency. Financial file management relies on paper documents and lacks an automated linking mechanism.

Method used

By linking the operating system with the invoice platform, a fully automated accounting process is achieved, including invoice data acquisition, association, and generation of electronic financial files. SM4 encryption and a rule engine are used to ensure data security and accuracy, and invoice numbers are used as unique identifiers to avoid duplicate printing, thus automatically generating electronic files.

Benefits of technology

It improved invoice management efficiency by 50%, reduced the error rate to below 0.5%, achieved fully electronic management, reduced the use of paper documents, and saved manpower and resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120282A_ABST
    Figure CN121120282A_ABST
Patent Text Reader

Abstract

The invention discloses a bill linkage automatic accounting processing method and system. The full-automatic bill linkage accounting processing method comprises the steps that an operating system sends a bill acquisition request to a bill platform; the bill platform sends JSON invoice data to a front-end operating system according to the acquisition request; the operating system receives the JSON invoice data and then stores the JSON invoice data to a database; the operation system obtains operation input information of a user; the operating system sends an invoice association request to the database according to the operation input information of the user; the database carries out invoice association according to the obtained invoice association request and sends an association success prompt to an operating system; and the system generates an electronic financial file after receiving the association success prompt. Structured invoice data are obtained through bill platform direct connection, and physical medium conversion (paper-to-digital stream) is achieved. And the invoice number is used as a unique identifier during front-end display, so that repeated printing is avoided from the source.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of bill processing, in particular to a bill linkage automatic accounting processing method and system. BACKGROUND

[0002] In May 2025, the electronic invoice of tax has been popularized to 99%. However, the common problems of all the current financial software are as follows:

[0003] 1. The business personnel can only pass paper documents, WeChat, and scanning to the financial personnel to deliver the completed electronic invoice.

[0004] Problems caused: repeated printing of electronic invoices, management confusion, and even if the electronic invoice is fully implemented, it cannot truly realize paperless;

[0005] 2. The financial personnel can see the invoices of the tax system, but cannot determine which invoice can be associated with the payment documents (employee reimbursement documents / payment documents).

[0006] Problems caused: at the end of each month, the special invoices are checked and authenticated, and even a separate post is established to register the electronic invoice account book to remove the repeated ones, which is time-consuming and laborious.

[0007] 3. The financial personnel still need to look at the project name of the paper documents and invoices to judge the input of the accounting entries; the financial archive management is also paper-based, and even the business personnel need to take photos to check the invoices.

[0008] This is the common problem of all the current financial software. Although it is said to be electronic, more than half of it is electronic and half of it is paper, and it has not truly achieved a breakthrough. The current financial software can truly realize full electronicization, and does not need to print any paper documents, and can directly and effectively check the duplicates to improve the efficiency by 50%. SUMMARY

[0009] The purpose of the application is to provide a bill linkage automatic accounting processing method to at least solve one of the above technical problems.

[0010] In one aspect of the application, a bill linkage automatic accounting processing method is provided, and the full-automatic bill linkage accounting processing method comprises the following steps:

[0011] The operating system sends a bill acquisition request to the bill platform;

[0012] The bill platform sends JSON invoice data to the front-end operating system according to the acquisition request;

[0013] The operating system stores the JSON invoice data in the database after receiving the JSON invoice data;

[0014] The operating system obtains user input information;

[0015] The operating system sends an invoice association request to the database based on the user's input.

[0016] The database associates invoices based on the obtained invoice association request and sends a successful association notification to the operating system.

[0017] After receiving a successful association notification, the system generates electronic financial records.

[0018] Optionally, the operating system sending a bill retrieval request to the bill platform includes:

[0019] Use the Gson library to convert query request parameters into a JSON-formatted request body string (requestBody).

[0020] Extract the first 32 bits of authoritySecret as the SM4 encryption key, call Sm4Uti l.encryptEcb to encrypt requestBody in ECB mode, and generate the encrypted string secretMsg;

[0021] Construct a new Map, store secretMsg as the value with a fixed key, and then use Gson to convert it into the final JSON format request body encryptedRequestBody;

[0022] The baseUrl and requestUrl are combined to form the complete request URL;

[0023] Initialize the BaseReqInf object and set the basic request header information;

[0024] Call the `Xft0penApiReqCl ​​ient.doCommonPostReq` method to send `BaseReqInf`, `url`, and `encryptedRequestBody` to the ticket platform as a POST request.

[0025] Optionally, the invoice platform sending JSON invoice data to the front-end operating system according to the acquisition request includes:

[0026] Receive POST requests sent by the system and verify the request headers;

[0027] Extract the encryptedRequestBody and decrypt it using the agreed key to obtain the original query condition requestBody;

[0028] Based on the query criteria, the system retrieves matching invoice information from the connected tax bureau invoice system or from its own stored invoice data.

[0029] The retrieved invoice data is organized into a structured JSON format, then encrypted using SM4 to generate an encrypted response body (encryptedResponseBody).

[0030] The encryptedResponseBody is returned to the operating system via an HTTP response.

[0031] Optionally, the operating system stores the received JSON invoice data in a database, including:

[0032] Receive the HTTP response returned by the ticketing platform and extract the response body string "responseBody";

[0033] Decrypt the response body using Sm4Uti l.decryptEcb to obtain the plaintext decryptedResponseBody;

[0034] The Gson library is used to convert the decryptedResponseBody into a Java object of the target type to complete the response parsing.

[0035] Call the InvoiceService.save method to store the parsed invoice object into the database.

[0036] Optionally, the invoice-linked automated accounting processing method further includes:

[0037] Perform the following operations at preset intervals:

[0038] The operating system sends a request to the bill platform to retrieve the bill;

[0039] The invoice platform sends JSON invoice data to the front-end operating system based on the requested data.

[0040] After receiving the JSON invoice data, the operating system stores it in the database.

[0041] Optionally, the user's input information may include a list of invoice IDs, expense reports, or loan application data.

[0042] Optionally, the operating system sending an invoice association request to the database based on the user's input includes:

[0043] The rules engine is invoked to execute SQL and verify whether the invoice corresponding to the invoice ID has been associated with other documents. If it has been associated, a "Invoice already associated" message is returned; otherwise, proceed to the next step.

[0044] Iterate through the invoice IDs in the request, retrieve the invoice amount corresponding to each invoice ID from the database, and calculate the total amount S of all selected invoices using BigDecimal.add(). Compare the calculated S with the expense report amount B in the request. If S≤B, the verification passes, and an invoice association request is sent to the database.

[0045] Optionally, the database performs invoice association based on the obtained invoice association request and sends a successful association notification to the operating system, including:

[0046] Insert an invoice-document association record, execute SQL operations, and establish the association between the invoice and the document;

[0047] Modify the invoice status field to update the status of the corresponding invoice to "Associated [Reimbursement ID / Loan ID]", thereby enabling real-time locking of the invoice and preventing duplicate claims;

[0048] Return a message indicating successful association to the front end.

[0049] Optionally, the system generates electronic financial files after receiving a successful association notification, including:

[0050] Read the marked invoice data and associated expense reports / loan orders from the database; based on the file address in the invoice data, call the billing platform or read the original file of the associated invoice from the database; at the same time, extract the key business information of the expense reports / loan orders from the database and generate an association description document;

[0051] The fileUpload method is called to upload the collected invoice PDF and XML files to cloud storage; after the upload is complete, the system obtains the file's storage URL, file ID, and file extension.

[0052] Based on the acquired file information and invoice / document data, a ModInputInvoiceFileEntity object is constructed and stored in the database archive record table to complete the storage of archive metadata.

[0053] This application also provides a bill-linked automated accounting system, which includes an operating system, a bill platform, and a database. The operating system, bill platform, and database work together to implement the bill-linked automated accounting method described above.

[0054] This application obtains structured invoice data directly through a billing platform, achieving physical media conversion (paper → digital stream). The invoice number is used as a unique identifier during front-end display, preventing duplicate printing at the source. Attached Figure Description

[0055] Figure 1This is a flowchart illustrating an embodiment of the invoice-linked automated accounting processing method of this application.

[0056] Figure 2 This is a timing diagram of a bill-linked automated accounting processing method according to an embodiment of this application.

[0057] Figure 3 This is a schematic diagram of the specific process of the invoice-linked automated accounting processing method in one embodiment of this application. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some, but not all, embodiments of this application. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0059] like Figure 1 The fully automated invoice-linked accounting processing method shown includes:

[0060] Step 1: The operating system sends a ticket retrieval request to the ticket platform;

[0061] Step 2: The invoice platform sends JSON invoice data to the front-end operating system based on the requested data;

[0062] Step 3: After receiving the JSON invoice data, the operating system stores it in the database;

[0063] Step 4: The operating system obtains the user's input information;

[0064] Step 5: The operating system sends an invoice association request to the database based on the user's input information;

[0065] Step 6: The database associates the invoices based on the obtained invoice association request and sends a successful association notification to the operating system;

[0066] Step 7: After receiving the successful association notification, the system generates electronic financial records.

[0067] In this embodiment, the operating system sending a bill retrieval request to the bill platform includes:

[0068] Use the Gson library to convert the query request parameters (request, including enterprise ID, time range, and other invoice query conditions) into a JSON format request body string requestBody (standardized request content that specifies which invoices to query);

[0069] Extract the first 32 bits of authoritySecret as the SM4 encryption key, call Sm4Util.encryptEcb(key, requestBody) to encrypt requestBody in ECB mode, and generate the encrypted string secretMsg (following the encryption requirements of the Xinfutong interface to protect the security of query conditions);

[0070] Construct a new Map, store secretMsg as the value with a fixed key (such as secretMsg), and then use Gson to convert it into the final JSON format request body encryptedRequestBody (adapted to the request body structure received by the Xinfutong interface);

[0071] Construct the complete request URL using baseUrl+requestUrl (clearly specifying which interface of Xinfutong to access);

[0072] Initialize the BaseReq Inf object and set basic request header information such as appId, request timestamp, and signature (if any) (to meet the authentication requirements of the Xinfutong interface);

[0073] Call the `Xft0penApiReqCl ​​ient.doCommonPostReq` method to send a POST request to the Xinfutong platform (actively initiating a request and conveying the query requirement). The request header contains `BaseReqInf`, `url`, and `encryptedRequestBody`.

[0074] In this embodiment, the invoice platform sending JSON invoice data to the front-end operating system according to the acquisition request includes:

[0075] Upon receiving a POST request from the system, first verify the request header (check if the appId is valid, if the timestamp is valid, etc.);

[0076] Extract the encryptedRequestBody and decrypt it with the agreed key to obtain the original query conditions requestBody (to restore the invoice conditions that the system needs to query);

[0077] Based on the query criteria (company ID, time range, etc.), the system retrieves matching invoice information (such as invoice code, number, amount, invoice date, PDF address, etc.) from the connected tax bureau invoice system / its own stored invoice data.

[0078] The retrieved invoice data is organized into a structured JSON format (with clearly defined data fields and specifications), then encrypted using SM4 (using an agreed-upon key to ensure data security), generating an encrypted response body encryptedResponseBody.

[0079] The encryptedResponseBody is returned to the system via an HTTP response (completing the invoice data return).

[0080] In this embodiment, the process of the operating system receiving the JSON invoice data and storing it in the database includes:

[0081] Receive the HTTP response returned by the Xinfutong platform and extract the response body string responseBody (i.e. encryptedResponseBody);

[0082] Use Sm4Uti l.decryptEcb(key,responseBody) to decrypt the response body and obtain the plaintext decryptedResponseBody (restore the invoice data JSON);

[0083] The Gson library is used to convert the decryptedResponseBody into a Java object of the target type (such as the InvoiceList class) (converting JSON into an invoice list object that the system can directly use), thus completing the response parsing.

[0084] Call the InvoiceService.save(invoice) method to store the parsed invoice object (containing fields such as invoiceCode, invoiceNumber, and amount) into the database;

[0085] Execute the deduplication SQL (SELECT COUNT(*) FROM mod_input_invoice WHERE invoice_code=? AND invoice_number=?). If the invoice already exists, update its status; otherwise, add a new record (data storage and deduplication ensure local data accuracy).

[0086] In this embodiment, the invoice-linked automated accounting processing method further includes:

[0087] The following operations are performed at preset intervals (specifically, by configuring a Cron expression through the Quartz framework, the following steps are triggered every 30 minutes (the time can be set as needed) to automatically execute the invoice query process (timed triggering ensures timely data retrieval):

[0088] The operating system sends a request to the bill platform to retrieve the bill;

[0089] The invoice platform sends JSON invoice data to the front-end operating system based on the requested data.

[0090] After receiving the JSON invoice data, the operating system stores it in the database.

[0091] In this embodiment, the database stores structured invoice data (including invoice code, number, amount, invoice date, file address, etc., which is consistent with the data returned by Xinfutong).

[0092] In this embodiment, the user's input information includes a list of invoice IDs and expense report or loan application data. Specifically, this includes the list of invoices selected by the user on the OA front end (including invoice IDs, corresponding to invoices already stored in the database) and the corresponding expense report / loan application data (including document IDs, reimbursement amounts, etc., filled in by the user).

[0093] In this embodiment, the operating system sending an invoice association request to the database based on the user's input information includes:

[0094] The first step of the validation is performed by calling the rules engine: Execute SQL(SELECT 1 FROM mod_input_invoice_relation WHERE invoice_id IN (?)) to query whether the invoice ID has an associated record; if an associated record is found, the system (backend) returns a "Invoice already associated" message to the frontend and terminates the subsequent operation; if no associated record is found, proceed to the next step of validation.

[0095] The second step of the verification process is as follows: Iterate through the invoice IDs in the request, retrieve the invoice amount corresponding to each invoice ID from the database, and calculate the total amount S of all selected invoices using BigDecimal.add() (S = s1 + s2 + ... + sn, where si is the amount of the i-th invoice). Compare the calculated S with the reimbursement amount B in the request (keeping two decimal places for precision). If S > B, return a "Total invoice amount exceeds reimbursement amount" message to the customer and terminate subsequent operations; if S ≤ B, the verification passes.

[0096] In this embodiment, the database performs invoice association based on the obtained invoice association request and sends a successful association notification to the operating system, including:

[0097] Insert an invoice-document association record by executing the SQL operation (INSERT INTO mod_input_invoice_relation(business_id,input_invoice_id,create_time)VALUES, where business_id is the expense report / loan order ID) to establish the association between the invoice and the document;

[0098] Modify the invoice status field to update the status of the corresponding invoice to "Associated [Reimbursement ID / Loan ID]", thereby enabling real-time locking of the invoice and preventing duplicate claims;

[0099] After confirming the database operation is complete, a "Successful association" message is returned to the front end. Upon receiving the message, the OA system (front end) calls the interface to refresh the invoice list page, marks the associated invoices as "Associated" and sets them to an unselectable state, allowing users to see the association results intuitively.

[0100] In this embodiment, the system generates electronic financial files after receiving a successful association notification, including:

[0101] Retrieves tagged invoice data (including invoice ID, invoiceCode, invoiceNumber, and file address) and associated expense report / loan slip data (including document ID, claimant, approval status, and other business information) from the database; based on the file address in the invoice data, calls the Xinfutong interface or reads the original files of the associated invoices (PDF format invoices, XML format metadata) from the database; simultaneously extracts key business information from the expense report / loan slip from the database, generates an association description document (TXT or JSON format, clearly defining the association between invoices and documents), and completes the collection of basic archive data;

[0102] The `fileUpload(file, invoice.getSellerCompanyName())` method is called to upload the collected invoice PDF and XML files to cloud storage (such as OSS). After the upload is complete, the system obtains the file's storage URL, file ID, and file extension. Based on the obtained file information and invoice and document data, a `ModInputInvoiceFileEntity` object (containing invoice ID, file URL, file ID, extension, associated business ID, etc.) is constructed and stored in the database archive record table to complete the storage of archive metadata and provide support for subsequent retrieval.

[0103] In accordance with the requirements of the "Electronic Accounting Archives Management Standard", the invoice PDF file, XML metadata file, and associated explanatory document are aggregated; a ZIP compressed package is generated using the naming rule "Invoice Code-Invoice Number-Document ID.zip" (ensuring the uniqueness and identifiability of each archive package), resulting in a compliant electronic financial archive package.

[0104] Upload the generated ZIP archive to the archive storage server (or a dedicated archive partition in cloud storage) and obtain the archive's storage address. Store this storage address, associated business ID, invoice ID, and other information in the database. Simultaneously, configure the OA system's search function: associate the archive information in the database, allowing OA users to initiate search requests by invoice number, document ID, date, and other dimensions. When a user queries an archive in the OA system, the system can quickly locate the corresponding archive storage address based on the search criteria, enabling online preview of the files within the ZIP package and meeting the archive access needs of finance and business personnel.

[0105] The following examples further illustrate this application in detail. It is understood that these examples do not constitute any limitation on this application.

[0106] Step 1: Invoice Data Acquisition

[0107] Program implementation:

[0108] 1) Develop the Java utility method xftExecutea() to encapsulate the interface call logic;

[0109] 2) Parse the response data: Convert the JSON response into an Invoice object (containing fields such as invoiceCode and invoiceNo) using the gson library, call the InvoiceService.save(invoice) method to store it in the database, and at the same time execute the deduplication logic (SELECT COUNT(*) FROM mod_input_invoice WHERE invoice_code=? AND invoice_number=?, update the status if it exists, otherwise add it);

[0110] 3) Scheduled triggering: Configure a Cron expression (0 0 / 30***?) via Quartz to execute every 30 minutes.

[0111] Step 2: Invoice Display and Association in the OA System (Operating System)

[0112] 1) Front-end development: Add an "Invoice Claim" button to the OA expense reimbursement page. After clicking, the API / modInput / modInputInvoiceList will be called to retrieve unassociated invoices and display them in a list format (including invoice code, amount, and invoice date).

[0113] 2) After the user selects the invoice, the front end submits the "Invoice ID List" along with the expense report data to the interface / modExpense / saveModExpense;

[0114] 3) Backend processing: After receiving the request, the rule engine is invoked for verification.

[0115] Uniqueness check: SELECT 1 FROM mod_input_invoice_relation WHERE invoice_idIN(?), if a record exists, return "Invoice already associated";

[0116] Amount verification: The reimbursement amount is less than or equal to the invoice amount (compare the total amount calculated using BigDecimal.add());

[0117] If the verification passes, add a claim record: INSERT INTO mod_input_invoice_relation(business_id, input_invoice_id, create_time) VALUES(?,?, NOW());

[0118] Step 3: Electronic record generation and storage

[0119] Program implementation:

[0120] Document Aggregation: Uses the Xinfutong (invoice platform) API to retrieve associated invoices (PDF, XML).

[0121] Storage and Indexing: Upload PDFs to OSS, associate file addresses with reimbursement records, and save archives.

[0122] Key logical judgments and mathematical models

[0123] The plagiarism detection logic is based on the unique identifier of "invoice code + invoice number", and the mathematical expression is as follows:

[0124] The unique identifier is defined as invoice code (string) + invoice number (string), and a unique index in the database ensures that the unique identifier is not duplicated.

[0125] Amount matching rule: Let the expense report amount be B, and the total amount of the associated invoices be S (S=s1+s2+...+sn, si is the amount of the i-th invoice), then S≤B must be satisfied (achieved through BigDecimal comparison, with precision retained to 2 decimal places);

[0126] (4) Hardware compatibility instructions

[0127] The hardware facilities upon which this invention relies include:

[0128] The system includes an enterprise OA server (running Java applications), a database server (storing structured data), and a front-end server (deploying web pages); a salary and benefits platform server (providing an invoice interface); and a cloud storage server (storing electronic documents in PDF and XML formats).

[0129] This application has the following advantages:

[0130] Structured invoice data is obtained directly via the Xinfutong API, enabling physical media conversion (paper → digital stream). The invoice number is used as a unique identifier for front-end display, preventing duplicate printing at the source.

[0131] In existing technologies, finance departments need to manually compare invoices and expense reports, and maintain separate ledgers for deduplication, lacking an automated association mechanism. This solution uses a rule engine based on the unique verification of "invoice number" and intelligent association module to automatically block duplicate associations, and displays the invoice status (unassociated / associated) in real time through the "invoice pool." Finance departments no longer need to maintain manual ledgers, and can directly filter "associated and compliant" invoices when selecting and certifying at the end of the month, improving efficiency by more than 50%.

[0132] In existing technologies, finance personnel need to manually determine journal entries based on paper invoices and documents, which is prone to errors due to reliance on human experience. This solution uses a pre-set journal entry rule library (related to invoice type, document type, and project name) to automatically calculate and generate journal entries. Finance personnel only need to review basic information, reducing the error rate to below 0.5% (based on historical data statistics).

[0133] In existing technologies, financial records are still paper-based, requiring manual review or photographing for retrieval. This solution automatically generates structured electronic records (including invoices, documents, and related records) according to management standards, stores them in a database, and supports retrieval within the OA system. Business personnel / finance staff can view them directly online without touching paper documents.

[0134] In the existing reimbursement process, the authenticity of invoices can only be detected when the invoice number is entered at the very end, but by then the payment has already been made, and it's too late. This new technology, however, uses API technology to automatically retrieve structured invoice data directly, eliminating the need for manual intervention and completely solving the problem of "fake invoices."

[0135] Enables intelligent selection, marking, and claiming of electronic invoices, breaking down the barriers between front-end business needs and back-end financial invoices.

[0136] Sales staff no longer need to transmit invoice information through third parties (such as paper or WeChat) or by maintaining paper ledgers, reducing communication steps, reducing paper printing, and improving efficiency. Saving on paper usage requires printing and transmission; at least one company can save 100,000 sheets of paper per year (each sheet costs 7 cents).

[0137] Based on the selected / marked / claimed electronic invoices, the finance department can directly select the deductible invoices on the tax platform at the end of the month, without having to compare them one by one.

[0138] The system generates journal entries directly based on the selected / marked / claimed electronic invoices and payment document types, according to the invoice content, improving efficiency and reducing error rates. Finance only needs to judge and verify basic information.

[0139] The system automatically generates electronic financial files that meet management standards based on the selected / marked / claimed electronic invoices and payment document types.

[0140] By saving time on registration and transfer, each employee in the company saves an average of half an hour per day, which translates to a saving of 15 to 30 yuan per person per hour (based on a monthly income of 5,000 yuan).

[0141] This application also provides a bill-linked automated accounting system, which includes an operating system, a bill platform, and a database. The operating system, bill platform, and database work together to implement the bill-linked automated accounting method described above.

[0142] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for automated accounting processing linked to invoices, characterized in that, The fully automated invoice-linked accounting processing method includes: The operating system sends a request to the bill platform to retrieve the bill; The invoice platform sends JSON invoice data to the front-end operating system based on the requested data. After receiving the JSON invoice data, the operating system stores it in the database; The operating system obtains user input information; The operating system sends an invoice association request to the database based on the user's input. The database associates invoices based on the obtained invoice association request and sends a successful association notification to the operating system. After receiving a successful association notification, the system generates electronic financial records.

2. The automated accounting processing method linked to invoices as described in claim 1, characterized in that, The operating system sends a bill retrieval request to the bill platform, including: Use the Gson library to convert query request parameters into a JSON-formatted request body string (requestBody). Extract the first 32 bits of authoritySecret as the SM4 encryption key, call Sm4Uti l.encryptEcb to encrypt requestBody in ECB mode, and generate the encrypted string secretMsg; Construct a new Map, store secretMsg as the value with a fixed key, and then use Gson to convert it into the final JSON format request body encryptedRequestBody; The baseUrl and requestUrl are combined to form the complete request URL; Initialize the BaseReqInf object and set the basic request header information; Call the `Xft0penApiReqCl ​​ient.doCommonPostReq` method to send `BaseReqInf`, `url`, and `encryptedRequestBody` to the ticket platform as a POST request.

3. The automated accounting processing method linked to invoices as described in claim 2, characterized in that, The invoice platform sends JSON invoice data to the front-end operating system based on the retrieval request, including: Receive POST requests sent by the system and verify the request headers; Extract the encryptedRequestBody and decrypt it using the agreed key to obtain the original query condition requestBody; Based on the query criteria, the system retrieves matching invoice information from the connected tax bureau invoice system or from its own stored invoice data. The retrieved invoice data is organized into a structured JSON format, then encrypted using SM4 to generate an encrypted response body (encryptedResponseBody). The encryptedResponseBody is returned to the operating system via an HTTP response.

4. The automated accounting processing method linked to invoices as described in claim 3, characterized in that, After receiving the JSON invoice data, the operating system stores it in the database, including: Receive the HTTP response returned by the ticketing platform and extract the response body string "responseBody"; Decrypt the response body using Sm4Uti l.decryptEcb to obtain the plaintext decryptedResponseBody; The Gson library is used to convert the decryptedResponseBody into a Java object of the target type to complete the response parsing. Call the InvoiceService.save method to store the parsed invoice object into the database.

5. The automated accounting processing method for linked invoices as described in any one of claims 1 to 4, characterized in that, The automated accounting processing method linked to invoices further includes: Perform the following operations at preset intervals: The operating system sends a request to the bill platform to retrieve the bill; The invoice platform sends JSON invoice data to the front-end operating system based on the requested data. After receiving the JSON invoice data, the operating system stores it in the database.

6. The automated accounting processing method linked to invoices as described in claim 5, characterized in that, The user's input information includes a list of invoice IDs, expense reports, or loan application data.

7. The automated accounting processing method linked to invoices as described in claim 6, characterized in that, The operating system sends an invoice association request to the database based on the user's input information, including: The rules engine is invoked to execute SQL and verify whether the invoice corresponding to the invoice ID has been associated with other documents. If it has been associated, a "Invoice already associated" message is returned; otherwise, proceed to the next step. Iterate through the invoice IDs in the request, retrieve the invoice amount corresponding to each invoice ID from the database, and calculate the total amount S of all selected invoices using BigDecimal.add(). Compare the calculated S with the expense report amount B in the request. If S≤B, the verification passes, and an invoice association request is sent to the database.

8. The automated accounting processing method linked to invoices as described in claim 7, characterized in that, The database associates invoices based on the obtained invoice association request and sends a successful association notification to the operating system, including: Insert an invoice-document association record, execute SQL operations, and establish the association between the invoice and the document; Modify the invoice status field to update the status of the corresponding invoice to "Associated [Reimbursement Form ID / Loan Form ID]", thereby enabling real-time locking of invoices and preventing duplicate claims; Return a message indicating successful association to the front end.

9. The automated accounting processing method linked to invoices as described in claim 8, characterized in that, Upon receiving a successful association notification, the system generates electronic financial files including: Read the marked invoice data and associated expense reports / loan orders from the database; based on the file address in the invoice data, call the billing platform or read the original file of the associated invoice from the database; at the same time, extract the key business information of the expense reports / loan orders from the database and generate an association description document; The fileUpload method is called to upload the collected invoice PDF and XML files to cloud storage; after the upload is complete, the system obtains the file's storage URL, file ID, and file extension. Based on the acquired file information and invoice / document data, a ModInputInvoiceFileEntity object is constructed and stored in the database archive record table to complete the storage of archive metadata.

10. A document-linked automated accounting system, characterized in that, The bill linkage automated accounting system includes an operating system, a bill platform, and a database. The operating system, bill platform, and database work together to implement the bill linkage automated accounting method as described in any one of claims 1 to 9.