A financial data desensitization encoding method and system for cloud large language models
Patent Information
- Application Number
- CN202611172332.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-23
AI Technical Summary
[0009]本发明旨在克服现有云端大模型财务处理数据不安全、传统脱敏无法兼顾智能性、本地部署成本高、同时难以兼容中文大写金额、图像发票、负数金额复杂业务场景的缺陷,提供一种面向云端大语言模型的财务数据脱敏编码方法及系统,实现云端零真实金额接触、财务科目识别精准、数据无损还原、原始数据不出内网、轻量化低成本部署、无GPU算力依赖的轻量化财务智能处理
[0038]1、本发明所有真实金额、交易数据全程留存本地,云端大模型仅处理编码占位数据、零接触真实财务信息,从根源杜绝数据泄露,完全满足企业原始财务数据不出内网的合规制度。
Smart Images

Figure CN122964929A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data security and accounting information technology, specifically relating to a method and system for de-identifying financial data using a cloud-based large language model. Background Technology
[0002] In December 2024, the State Taxation Administration fully implemented digital invoices, which significantly increased the workload for enterprises in monthly invoice entry and financial data processing. The traditional financial entry process relies on manual identification of economic events, determination of accounting subjects, determination of debit and credit directions, entry of amounts, and generation of accounting entries for each invoice. This manual processing method is extremely inefficient, highly repetitive, and prone to data entry errors, making it unsuitable for the automated processing needs of massive digital invoices.
[0003] Large Language Models (LLMs) possess excellent text understanding, financial transaction recognition, and accounting subject classification capabilities, and can replace manual labor in completing financial classification and structured organization work. They represent the mainstream technological approach for intelligent transformation of enterprise finance. However, existing commercial AI-powered financial automation solutions generally employ a processing flow of "OCR recognition - direct output of raw financial data - cloud-based AI calculation and result return," which has unavoidable technical shortcomings and security risks.
[0004] 1. High risk of data leakage: Core and sensitive financial data such as the actual amount of invoices, tax amount, names of the transacting parties, tax identification numbers, and transaction amount need to be transmitted in plaintext to third-party cloud API service providers such as Alibaba Cloud and OpenAI. There is a risk of interception, leakage, and misuse of the data during transmission, storage, and computing.
[0005] 2. Enterprise compliance is not met: Most enterprises' financial internal control systems and the compliance requirements for state-owned and manufacturing enterprises clearly stipulate that original financial data must not leave the enterprise's intranet. Existing cloud AI solutions cannot meet the compliance bottom line of preventing intranet data from leaving the site.
[0006] 3. The cost barrier for local deployment is extremely high: If a large model is deployed locally on a private basis to avoid the problem of data outbound, it is necessary to purchase high-end GPU servers, complete model fine-tuning, deployment and maintenance, which is very costly and most small and medium-sized enterprises and science and technology innovation enterprises cannot implement it.
[0007] 4. Poor adaptability of traditional data masking techniques: Existing general data masking and field masking techniques can only achieve data erasure or plaintext retention: Completely erasing the amount will cause LLM to lose its financial judgment basis and be unable to classify; retaining the original value has no masking effect and cannot solve the data security problem. At the same time, conventional encryption algorithms do not have the property of preserving numerical order, and the relative size relationship of the values is lost after encryption, making it impossible for LLM to make professional financial judgments.
[0008] In summary, the prior art lacks an intelligent processing solution that can avoid disclosing real amounts, retain the financial analysis capability of large models, support lightweight deployment, be compatible with various financial bill formats, and adapt to complex financial scenarios. Contents of the Invention
[0009] The present invention aims to overcome the defects of the existing cloud large model in financial processing, such as insecure data, failure of traditional desensitization to balance intelligence, high local deployment cost, and difficulty in adapting to complex business scenarios involving Chinese capitalized amounts, image invoices, and negative amounts, and provides a financial data desensitization encoding method and system for cloud large language models, so as to realize lightweight intelligent financial processing with zero exposure of real amounts on the cloud, accurate financial item identification, lossless data restoration, no outflow of original data from the intranet, lightweight and low-cost deployment, and no reliance on GPU computing power.
[0010] To achieve the above purpose, the present invention adopts the following technical solution: a financial data desensitization encoding method for cloud large language models, comprising the following steps:
[0011] Step 1: Obtain all amount values in the original financial document, deduplicate them, and sort them in ascending order of value to obtain an ordered sequence of unique values; the amount values include positive amount values and negative amount values, and the identification manners of the negative amount values include identifying values prefixed with a minus sign and identifying values enclosed in parentheses; before extracting the amount values, standardize the full-width characters in the original financial document, and convert full-width numbers, full-width commas, full-width periods and full-width minus signs into corresponding half-width ASCII characters; in the process of extracting the amount values, exclude numbers belonging to the date format, pure integer formats with 13 or more digits, and numbers where a preset non-amount keyword appears within a predetermined character range in front of the number.
[0012] In this step, the amount value region is located through text boundaries excluding alphabetic and numeric characters, to match formats of pure integers, integers with thousand separators, values with decimal points, and unsigned integers with 4 or more digits.
[0013] Before obtaining the original amount values, the method further includes a Chinese capitalized amount identification and conversion step: scanning a continuous sequence of Chinese capitalized characters containing zero, one, two, three, four, five, six, seven, eight, nine, ten, hundred, thousand, ten thousand, hundred million, yuan, jiao, fen, and zheng in the original financial document, removing suffixes with no numerical meaning such as yuan and zheng; parsing the weight of each digit by segments of hundred million and ten thousand, accumulating to obtain the integer part, identifying the characters of jiao and fen to extract the decimal part, and converting the Chinese capitalized amount into the corresponding Arabic numeral value; merging the converted values with the Arabic numeral amounts extracted in step 1 to jointly participate in the subsequent encoding process; the Arabic numeral corresponding to the same amount and the conversion result of the Chinese capitalized amount are mapped to the same final encoding value; the conversion is only performed locally, and the conversion result does not leave the local device.
[0014] Step 2: Set a fixed coded value range [L, H] that is independent of the original amount, where L and H are both positive integers; map each amount value in the ordered sequence of unique values to a basic random integer within the range according to its sorting position and quantile, so that the basic random integer maintains the same order as the original amount and only represents the relative sorting position, which is independent of the absolute amount of the original amount.
[0015] The specific mapping rule is as follows: Let the ordered sequence of unique values be U = [u1, u2, ..., u...]. n ], u1 < u2 < ... < u n When n=1, base=(L+H) / 2 is rounded down; when n>1, percentile=i / (n-1), base=L+floor((HL)×percentile), and i starts counting from 0.
[0016] Step 3: Apply random jitter to each of the basic random integers to obtain coded integers. The amplitude of the random jitter is smaller than the interval between the basic random integers corresponding to adjacent sorting positions, so as to keep the sorting between the coded integers consistent with the sorting between the original monetary values.
[0017] The specific jitter calculation method is as follows:
[0018] segment = (HL) / max(n, 2),
[0019] jitter=RandomInteger(-segment×α, +segment×α),
[0020] encoded_number=clamp(base+jitter,L,H);
[0021] Where RandomInteger(a, b) represents uniform random rounding within the interval [a, b], α is a preset jitter ratio coefficient and 0 < α ≤ 0.5, preferably α = 0.25; the clamp function is used to limit the value within the interval [L, H]; the random seed used to generate random jitter is associated with the corresponding original amount value, a global seed S is set, and the amount v is rounded to two decimal places to obtain v. - `int = int(v × 100)` sets the random seed to `S + v` before performing random jitter. -int, after the operation is completed, restores the original global random seed; so that the same original amount will get the same jitter result, and different original amounts will have differentiated jitter output, reducing the probability of code collision; by slightly random jittering, the linear proportional relationship of the original amount is broken, so that the outside cannot deduce the real amount value from the code value, while not destroying the overall order preservation.
[0022] Step four: Concatenate randomly generated letter strings after each of the coded integers to form the final coded value; specifically, randomly select 2 to 3 letters from the 26 uppercase English letters and concatenate them after the coded integer to make the coded value visually different from ordinary numbers, avoid LLM miscalculations, and increase the difficulty of cracking the code.
[0023] Step 5: Store the mapping relationship between each original amount value and the corresponding final coded value on the local device only, and replace the corresponding original amount value in the original financial document with each of the final coded values to generate a de-identified financial document; the de-identified financial document only contains coded values and does not contain any real original amount values. The de-identified financial document is used to send to the cloud big language model for processing, so that the cloud big language model cannot obtain real amount data throughout the process.
[0024] The mapping relationship is stored using a local in-memory bidirectional hash table, including a forward mapping table and a reverse mapping table. The forward mapping table uses the final encoded value as the key and the corresponding original amount value as the value, while the reverse mapping table uses the original amount value as the key and the corresponding final encoded value as the value. After the session ends, the data can be persistently stored locally in encrypted form and decrypted and loaded for the next session, without being transmitted externally. Document replacement uses reverse traversal from the end of the document to the beginning to avoid position offset errors. After the mapping table is used, the memory data is actively cleared, and cleanup is performed again during the object reclamation phase to improve data security. The API key required to access the cloud-based large model is stored in a local configuration file using symmetric encryption, and the plaintext key is only decrypted and used temporarily in memory.
[0025] Step six: Receive the processing result containing the final encoded value returned by the cloud-based large language model, and restore the final encoded value to the corresponding original monetary value according to the mapping relationship stored locally.
[0026] Furthermore, this method also supports the de-identification of financial documents in image format, as follows:
[0027] Step A: Obtain financial documents in image formats such as PNG, JPG, and BMP;
[0028] Step B: Run the OCR engine offline locally to complete image text detection and recognition, output text region coordinates and recognized text, and keep the original image within the local boundaries;
[0029] Step C: Perform the aforementioned amount matching and Chinese capitalized amount conversion logic on the recognized text to locate the area where all amounts are located in the image;
[0030] Step D: Use a filled rectangle that matches the background color of the invoice to cover the original amount text and numbers on a pixel layer;
[0031] Step E: Write the corresponding final encoded value into the covered area, retain non-monetary information such as table borders, transaction subject, tax rate, and date, and generate a desensitized image; uniformly fill the low-confidence digital areas of OCR with gray masking blocks.
[0032] Step F involves pushing the de-identified image to a cloud-based multimodal large language model. The model only recognizes the encoded value and cannot obtain the actual amount.
[0033] Step G: Receive the results returned by the model and restore the actual amount value based on the local mapping table.
[0034] Based on the above-mentioned financial data anonymization coding method, the present invention further provides an automatic electronic invoice posting method, including: parsing electronic invoices in XML, PDF, and OFD formats to extract invoice transaction information; performing sequence-protected coding anonymization on invoice amounts and tax amounts; sending anonymized invoice data without actual amounts to a cloud-based big data model, where the big data model judges economic events and outputs an accounting entry framework with coded values; and restoring the actual amount locally through a mapping table to generate complete and compliant accounting entries.
[0035] Based on the above-mentioned financial data anonymization coding method, the present invention also provides a financial statement structure extraction method, including: loading multi-format financial statement documents and anonymizing all statement amounts with coding; sending the anonymized statements to a cloud-based large model to complete the structured extraction of accounts and coded values; decoding locally to restore the real amounts and outputting complete structured financial data.
[0036] This invention also provides a financial data anonymization processing system for cloud-based large language models, used to execute the aforementioned financial data anonymization encoding method, electronic invoice automatic accounting method, and financial statement structure extraction method. The system includes: a document parsing module, a sequence-preserving random encoding module, a cloud-based LLM communication module, and a local decoding module, realizing fully automated processing of financial document parsing, anonymization encoding, cloud-based intelligent analysis, and local accurate restoration.
[0037] Compared with the prior art, the present invention has the following significant technical advantages:
[0038] 1. In this invention, all real amounts and transaction data are stored locally throughout the entire process. The cloud-based big model only processes coded placeholder data and has zero contact with real financial information, thus preventing data leakage from the source and fully meeting the compliance system of ensuring that the company's original financial data does not leave the internal network.
[0039] 2. This invention uses order-preserving random coding to completely conceal the absolute value and proportional relationship of the real amount while retaining the relative size order of the values. This allows the large cloud model to still accurately determine accounting subjects, distinguish the amount level, and sort out the financial structure. The AI recognition accuracy is not reduced after the anonymization.
[0040] 3. No GPU server, privacy computing hardware, or complex cryptographic operations are required. It can be implemented with lightweight code, which significantly reduces costs compared to local large-scale model deployment and homomorphic encryption solutions, making it suitable for widespread application in the manufacturing industry and science and technology innovation enterprises.
[0041] 4. Based on a unique local mapping table, it achieves lossless restoration, supports two core scenarios: automatic accounting of digital invoices and structured extraction of financial statements, and is compatible with all mainstream financial formats such as XML, PDF, OFD, Excel, and TXT. Attached Figure Description
[0042] Figure 1 This is a block diagram of the hierarchical architecture of the present invention, which consists of local desensitization, cloud analysis, and local restoration. Detailed Implementation
[0043] The following detailed description of the specific embodiments of the present invention is based on actual test cases and the technical solutions defined in the claims.
[0044] Example 1: Sequence-Preserving Random Encoding Desensitization for Text Financial Documents
[0045] First, full-width character normalization is performed to convert full-width numbers and punctuation marks in the document to half-width format; then, monetary values are extracted by text boundary regular expression matching, while also recognizing negative numbers represented by minus signs and accounting brackets; finally, non-monetary numbers such as dates, invoice numbers, and tax numbers are removed using filtering rules.
[0046] The document is scanned to identify the sequence of Chinese capitalized monetary characters, which are then parsed and converted into Arabic numerals. These numerals are then merged with the extracted Arabic numeral amounts, and the results are deduplicated and sorted in ascending order to obtain a unique, ordered sequence.
[0047] Set a fixed encoding range [1000, 99999], calculate the basic random integer corresponding to each amount according to the quantile formula; select α=0.25 as the preferred jitter coefficient, associate the random seed with the amount value, restore the global seed after completing the jitter calculation, destroy the original linear ratio while maintaining the sorting relationship; concatenate 2 uppercase random letters to the encoded integer to generate the final encoded value.
[0048] A local bidirectional mapping table is built and resides in memory. It is traversed backward from the end of the document, and the original amount is replaced with the encoded value to generate a de-identified document. The mapping table can be encrypted and persistently stored. The de-identified document is uploaded to the cloud-based large model. After receiving the results returned from the cloud, the local mapping table is queried to accurately restore the real amount.
[0049] Example encoding results: The original amount 86000.00 corresponds to the code 46607LN, and the original amount 97180.00 corresponds to the code 57844XT; the same value obtained by converting Chinese capital amounts is mapped to the same encoding value.
[0050] Example 2: Automatic Posting of Electronic Invoices
[0051] The system selected a Dell R750 server purchase invoice from an enterprise. The invoice amount was 86,000 yuan, the tax was 11,180 yuan, and the total price including tax was 97,180 yuan. The system parsed the XML format invoice and extracted the amount data. After performing sequence-preserving random coding for data anonymization, the anonymized text containing only the coded values was sent to the cloud-based big data model. The cloud-based big data model identified the economic transaction based on the product name and transaction attributes, and output the accounting entry framework: Debit: Fixed Assets - Electronic Equipment 46607LN, Credit: Accounts Payable 57844XT. The local system queried the mapping table to restore the actual amount and generated a complete and accurate accounting entry. Throughout the entire process, the cloud did not handle any actual transaction amount data, and the account identification was accurate and the amount restoration was 100% correct.
[0052] Example 3: Structured Extraction of Financial Statements
[0053] The system loads monthly financial statements from a technology company's Excel spreadsheet, containing 28 accounting items with amounts ranging from 180,000 to 22.3 million. All amounts are anonymized using sequence-preserving coding, generating an anonymized report which is then pushed to a cloud-based big data model. The cloud-based model accurately extracts the structured relationships between all 28 accounting items and their corresponding codes, outputting standardized structured results. The local decoding module batch restores the actual amounts, accurately restoring all 28 item amounts with 100% accuracy in structured extraction, achieving secure and leak-free automated financial statement processing.
[0054] Example 4: Financial Data De-identification Processing System
[0055] This system comprises four main functional modules: a document parsing module that supports parsing and extracting amounts from multiple formats including XML, PDF, Excel, and TXT; a sequence-preserving random encoding module that executes the complete encoding, dithering, letter concatenation, and document replacement logic of this invention; a cloud-based LLM communication module responsible for pushing de-identified data and receiving subject classification and structured results; and a local decoding module that relies on a local mapping table to accurately restore amounts and output standardized data that can be directly used for financial accounting.
[0056] Embodiment 5: Desensitization of invoices in image format
[0057] A scanned image of a special VAT invoice is selected, with an original amount of 6000.00 yuan, a tax amount of 60.00 yuan, and a total amount including tax of 6060.00 yuan. Both Arabic numerals and the Chinese capitalized amount of 陆仟零陆拾圆整 exist in the image. Local offline OCR is used to identify the text areas of the image and locate all positions of the amount; the Chinese capitalized amount is converted to obtain 6060.00, which is combined and encoded with the Arabic numerical value. The original amount is covered with pixels of a background color rectangle, and the corresponding encoded value is written in; the low-confidence digital areas of OCR are uniformly covered with gray to generate a desensitized image. The desensitized image is pushed to the multimodal large language model, and the model outputs an accounting entry framework with the encoded value. After local decoding, all amounts are restored correctly, and the debit-credit relationship is balanced; only the code placeholder is visible throughout the cloud, and the real financial value cannot be obtained.
[0058] The above description is merely a preferred embodiment of the present invention, and is not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and accompanying drawings of the present invention, or directly or indirectly applied to other related technical fields, is similarly included in the patent protection scope of the present invention.
Claims
1. A method for de-identifying and encoding financial data for cloud-based large language models, characterized in that, comprising the following steps: Step 1: Acquire all monetary values in the original financial document, deduplicate them and sort them in ascending order by value to obtain an ordered sequence of unique values; the monetary values include positive monetary values and negative monetary values, and the identification manners for the negative monetary values include identifying values prefixed with a minus sign and identifying values enclosed in parentheses; before extracting the monetary values, standardize full-width characters in the original financial document, and convert full-width digits, full-width commas, full-width periods and full-width minus signs into corresponding half-width ASCII characters; during the process of extracting the monetary values, exclude numbers that belong to a date format, a pure integer format of 13 or more digits, and numbers with a preset non-monetary keyword appearing within a predetermined character range ahead. Step 2: Set a fixed encoding value interval [L, H] independent of the original monetary magnitude, where both L and H are positive integers; map each monetary value in the ordered sequence of unique values to a base random integer within the interval through quantile mapping according to its sorting position, such that the base random integer maintains the same order relationship with the original monetary amount and only represents the relative sorting position. Step 3: Apply random dithering to each of the base random integers to obtain encoded integers, wherein the amplitude of the random dithering is smaller than the interval between the base random integers corresponding to adjacent sorting positions, so as to keep the order between the respective encoded integers consistent with the order between the respective original monetary values. Step 4: Splice a randomly generated alphabetic string after each of the encoded integers respectively to form a final encoded value. Step 5: Store only the mapping relationship between each original monetary value and the corresponding final encoded value in a local device, replace the corresponding original monetary values in the original financial document with each of the final encoded values, and generate a desensitized financial document; the desensitized financial document only contains encoded values and does not contain any real original monetary values, and the desensitized financial document is used for being sent to a cloud large language model for processing, so that the cloud large language model cannot obtain real monetary data throughout the whole process. Step 6: Receive the processing result containing the final encoded values returned by the cloud large language model, and restore the final encoded values to the corresponding original monetary values according to the locally stored mapping relationship.
2. The financial data anonymization encoding method for cloud-based large language models according to claim 1, characterized in that, In Step 1, the monetary value region is located by text boundaries excluding alphabetic and numeric characters, to match a pure integer format, a thousand-separator integer format, a numeric format with a decimal point, and an unsigned integer format of 4 or more digits. Before acquiring the original monetary values, the method further includes Chinese capital amount identification and conversion: Scan Chinese capital amount characters in the original financial document, where the Chinese capital amount characters include zero, one, two, three, four, five, six, seven, eight, nine, ten, hundred, thousand, ten thousand, hundred million, yuan, jiao, fen, and zheng, to match consecutive sequences of Chinese capital amount characters. Convert the matched Chinese capital amount character string into a corresponding Arabic numeral value, and merge the converted value with the Arabic numeral monetary values extracted in Step 1 to enter the subsequent encoding process; the conversion is performed only locally, and the conversion result does not leave the local device.
3. The financial data anonymization encoding method for cloud-based large language models according to claim 1, characterized in that, In step two, let the ordered sequence of unique values be U=[u1, u2, ..., u...]. n ], where n is the number of unique values, u1 < u2 < ... < u n For the i-th value uᵢ in the sequence, its corresponding base random integer base is calculated as follows: When n=1, then base=(L+H) / 2, rounded down. When n > 1, the calculation is based on the quantile position. percentile=i / (n-1), base=L+floor((HL)×percentile), Where i starts counting from 0, and floor represents the floor function.
4. The financial data anonymization encoding method for cloud-based large language models according to claim 3, characterized in that, In step three, the method for applying random jitter to each of the basic random integers is as follows: segment = (HL) / max(n, 2), jitter=RandomInteger(-segment×α, +segment×α), encoded_number=clamp(base+jitter,L,H), RandomInteger(a, b) represents uniformly randomizing the integers within the interval [a, b]. The random seed used to generate random jitter is associated with the corresponding original amount value, so that the same original amount value will produce the same jitter result, and different original amount values will have different jitter outputs. After the jitter calculation is completed, the original global random seed is restored. α is a preset jitter ratio coefficient and 0 < α ≤ 0.
5. The clamp function is used to limit the value within the interval [L, H]. The random jitter disrupts the linear proportional relationship between the original monetary values, making it impossible to deduce the original true amount from the encoded value.
5. The financial data anonymization encoding method for cloud-based large language models according to claim 1, characterized in that, In step four, the method of concatenating randomly generated letter strings after each encoded integer is as follows: randomly select 2 to 3 letters from the 26 uppercase English letters to form the letter strings, and concatenate them after the encoded integers to form the final encoded value.
6. The financial data anonymization encoding method for cloud-based large language models according to claim 1, characterized in that, In step five, the mapping relationship is stored in a forward mapping table and a reverse mapping table in the memory of the local device. The forward mapping table uses the final encoded value as the key and the corresponding original amount value as the value, and the reverse mapping table uses the original amount value as the key and the corresponding final encoded value as the value. The mapping relationship is written to the local storage device in encrypted form at the end of the session and decrypted and loaded back into memory at the start of the next session. When replacing the corresponding original amount value in the original financial document with each of the final encoded values, the replacement is performed by traversing backward from the end of the document to the beginning according to the position information of each original amount value in the original financial document. After the mapping relationship is used up, the mapping relationship is cleared and the reference is removed by explicitly calling the clearing method.
7. A method for automatically recording electronic invoices based on the financial data desensitization coding method according to any one of claims 1 to 6, characterized in that, Includes the following steps: Obtain an electronic invoice document, parse the electronic invoice document to extract invoice information, the invoice information including at least seller information, buyer information, product or service name, amount and tax amount; The financial data desensitization encoding method described in any one of claims 1 to 6 is used to encode the amount and tax amount in the invoice information to generate desensitized invoice information; The de-identified invoice information is sent to the cloud-based big language model. The cloud-based big language model judges economic events and determines accounting subjects based on the de-identified invoice information, and outputs an accounting entry framework that includes the accounting subject name and the final code value. Receive the accounting entry framework returned by the cloud-based big language model, restore the final encoded value to the corresponding original amount value according to the mapping relationship stored locally, and generate a complete accounting entry containing the real amount; The electronic invoice document can be any one of the following: XML format electronic invoice, PDF format electronic invoice, or OFD format electronic invoice.
8. A method for extracting financial statement structure based on the financial data desensitization encoding method according to any one of claims 1 to 6, characterized in that, Includes the following steps: Load a financial statement document, which contains multiple accounting items and the corresponding monetary values for each accounting item; The financial data desensitization encoding method described in any one of claims 1 to 6 is used to encode all monetary values in the financial statement document to generate desensitized financial statements; The anonymized financial statements are sent to a cloud-based big language model, which extracts the mapping relationship between the accounting subject names and their corresponding final codes in the anonymized financial statements and outputs the structured extraction results. The system receives the structured extraction results returned by the cloud-based large language model, restores the final encoded value to the corresponding original amount value according to the mapping relationship stored locally, and generates structured financial data containing the real amount.
9. A financial data anonymization system for cloud-based large language models, characterized in that, The method for performing the financial data de-identification coding method according to any one of claims 1 to 6 includes: The document parsing module is used to load and parse financial documents in XML, PDF, Excel, and TXT formats, and extract all identifiable monetary values and textual business information from the documents. The order-preserving random encoding module is used to execute the complete set of encoding desensitization logic as described in claim 1, including deduplication sorting, quantile mapping, random dithering, letter concatenation, and numerical replacement, to generate desensitized financial documents; The cloud-based LLM communication module is used to send anonymized financial data (excluding real amounts) to the cloud-based big language model and receive the account classification, structure extraction, and journal entry framework results returned by the cloud-based big language model. The local decoding module is used to accurately restore the encoded value to the original real amount based on the mapping relationship stored locally, and output a complete and practical financial processing result.
10. The financial data anonymization encoding method for cloud-based large language models according to any one of claims 1 to 6, characterized in that, When the original financial document is in image format, the following image processing steps are included: Obtain financial documents in image format; The image is processed by an OCR engine that runs offline locally, which detects and recognizes text to obtain the bounding box coordinates of each text region and the recognized text content. The original image does not leave the local device. Apply the step 1 of claim 1 and the Chinese capital amount recognition and conversion of claim 2 to the text content recognized by OCR to locate the image region where all amounts are located; For each amount area, the original amount number and text pixels within the bounding box are covered by a fill rectangle with the same color as the background at the image pixel layer; Within each covered area, the final encoded value corresponding to the amount is written to generate a desensitized image, in which non-monetary information is retained as is. The de-identified image is sent to a cloud-based multimodal language model, which performs table structure recognition and subject classification based on the de-identified image, and outputs a processing result containing the accounting subject name and the final coded value. The system receives the processing result returned by the cloud-based multimodal language model and restores the final encoded value to the corresponding original monetary value according to the mapping relationship stored locally.