Self-adaptive voucher intelligent generation method, system, product, medium and equipment
Through a hybrid model based on BERT and GPT, a dynamic template is generated and the target format is adapted to the target format, and other problems such as strong format coupling and high manual configuration cost in the existing financial voucher generation strategy are solved, and efficient and compatible voucher intelligent generation is achieved.
Patent Information
- Application Number
- CN202510637215.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-05-19
AI Technical Summary
The existing financial voucher generation strategies have problems such as strong coupling of formats, high manual configuration costs, limited rule understanding, and poor adaptability of rule changes.
Using a hybrid model based on BERT and GPT, a dynamic template is generated by embedding vectors, and executable target format code is generated based on the metadata definition of the target format, supporting the parsing and generation of multiple credential formats.
It realizes intelligent generation of adaptive credentials, reduces manual configuration time, supports compatibility of different systems, and improves data processing accuracy and development efficiency.
Smart Images

Figure CN120163674A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to an adaptive voucher intelligent generation method, system, product, medium and device. Background Art
[0002] The statements in this part merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] Financial vouchers, as the cornerstone of an enterprise's financial accounting work, play a crucial role in the entire financial management system. They are not only an important carrier for recording the occurrence of an enterprise's economic business activities, but also the basis for subsequent accounting processing, financial statement preparation, financial analysis and other work. The existing financial voucher generation strategies have the following problems: (1) There is strong format coupling. For example, traditional systems use a fixed template engine and only support predefined voucher structures (such as SAP standard vouchers), and cannot adapt to new voucher formats (such as blockchain smart contract vouchers); (2) The manual configuration cost is high, and there are obstacles to cross-platform migration. The differences in data structures between systems of different manufacturers result in high migration costs; (3) There are limitations in rule understanding. It is necessary to manually understand the voucher rule document and manually configure the voucher template, which requires users to have certain voucher knowledge. Deviations in document understanding are likely to lead to errors in voucher template configuration, and thus errors in the generated vouchers; (4) The adaptability to rule changes is poor. When the rules change and the rule document changes, it is necessary to manually identify the rule changes and modify the voucher template. It may be necessary to modify hundreds of voucher templates, resulting in poor dynamic adaptability to rule changes. Summary of the Invention
[0004] To solve the deficiencies of the prior art, the present invention provides an adaptive voucher intelligent generation method, system, product, medium and device, which supports a dynamic template engine, can flexibly define and expand voucher structures, does not require predefined fixed formats, supports the parsing and generation of multiple voucher formats, ensures compatibility with different systems (such as blockchain platforms), can automatically generate voucher templates according to business rules, and reduces the manual configuration time.
[0005] To achieve the above object, the present invention adopts the following technical solutions: In a first aspect, the present invention provides an adaptive voucher intelligent generation method.
[0006] An adaptive voucher intelligent generation method includes the following processes: Process the obtained financial text rule data to obtain an embedding vector; Taking the embedding vector as input, according to a hybrid model based on BERT (Bidirectional Encoder Representations from Transformers) and GPT (Generative Pre-trained Transformer), obtain a format intermediate representation, extract the structured information of the format intermediate representation, and generate a dynamic template; Parse the dynamic template, and generate executable target format code according to the metadata definition of the target format and the parsed dynamic template data; Parse the generated target format code to obtain the generation result of the target format.
[0007] As a further limitation of the first aspect of the present invention, generating executable target format code according to the metadata definition of the target format and the parsed dynamic template data includes: Generate data binding code according to the field mapping tags in the dynamic template, automatically convert the calculation expressions in the dynamic template into syntax code supported by the target format, and convert the conditional tags in the dynamic template into conditional statements of the target format.
[0008] As a further limitation of the first aspect of the present invention, parsing the generated target format code through a hybrid execution engine to obtain the generation result of the target format includes: using static compilation to compile predetermined logic into directly executable code segments; using dynamic compilation to monitor high-frequency called code segments in real time, dynamically compile the high-frequency called code segments into machine code, and directly execute the compiled code subsequently.
[0009] As a further limitation of the first aspect of the present invention, the hybrid model based on BERT and GPT includes a BERT branch and a GPT branch. Both the BERT branch and the GPT branch take the embedding vector as input. The BERT branch uses a 12-layer Transformer encoder for encoding, and the GPT branch uses a 6-layer Transformer encoder for encoding. The outputs of the BERT branch and the GPT branch are weighted and fused through a gating mechanism to obtain a weighted fusion result.
[0010] As a further limitation of the first aspect of the present invention, performing secondary joint encoding on the weighted fusion result includes: the output of the BERT branch and the weighted fusion result are feature concatenated to obtain , and the concatenated features are secondarily encoded using a 12-layer Transformer encoder, and the output of the secondary encoding is used to drive the generation of the format intermediate representation.
[0011] As a further limitation of the first aspect of the present invention, the format intermediate representation includes field mapping, calculation logic, and conditional branches. During the process of generating the format intermediate representation, field binding and field type prediction processing are performed, and the field binding and field type are written into the format intermediate representation.
[0012] In a second aspect, the present invention provides an adaptive credential intelligent generation system.
[0013] An adaptive credential intelligent generation system includes: An embedding vector generation unit, configured to: process the obtained financial text rule data to obtain an embedding vector; A dynamic template generation unit, configured to: take the embedding vector as an input, and according to a hybrid model based on BERT and GPT, obtain a format intermediate representation, extract the structured information of the format intermediate representation, and generate a dynamic template; A target code generation unit, configured to: parse the dynamic template, and generate an executable target format code according to the metadata definition of the target format and the parsed dynamic template data; A target format generation unit, configured to: parse the generated target format code to obtain the generation result of the target format.
[0014] In a third aspect, the present invention provides a computer device, including: a processor and a computer-readable storage medium; The processor is adapted to execute a computer program; The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it implements the adaptive credential intelligent generation method as described in the first aspect of the present invention.
[0015] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, and the computer program is adapted to be loaded and executed by a processor to implement the adaptive credential intelligent generation method as described in the first aspect of the present invention.
[0016] In a fifth aspect, the present invention provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the adaptive credential intelligent generation method as described in the first aspect of the present invention.
[0017] Compared with the prior art, the beneficial effects of the present invention are: 1. The present invention takes the embedded vector of financial text rule data as input, obtains a dynamic template according to a hybrid model based on BERT and GPT, adapts the intermediate template to the target voucher format based on the metadata definition of the target voucher format by means of dynamic code generation, supports a dynamic template engine, can flexibly define and expand the voucher structure, without predefining a fixed format, supports the parsing and generation of multiple voucher formats, and ensures compatibility with different systems (such as blockchain platforms).
[0018] 2. The present invention can automatically generate voucher templates according to business rules, reduces the manual configuration time, provides a standardized data interface, supports seamless data docking between systems of different manufacturers, automatically identifies and converts the data structures of different systems, reduces manual intervention, can automatically parse voucher rule documents and generate corresponding template configurations, and optimizes the hybrid model by reinforcement learning, improving the accuracy of data processing.
[0019] 3. The present invention innovatively generates data binding code according to the field mapping tags in the dynamic template, automatically converts the calculation expressions in the dynamic template into syntax code supported by the target format, converts the conditional tags in the dynamic template into conditional statements of the target format, and automatically generates executable code by parsing the dynamic template data and combining the metadata definition of the target format, realizing the automatic mapping and assignment of data fields, avoiding manual writing of repetitive field mapping logic, reducing the development cost, and significantly improving the development efficiency and code consistency.
[0020] 4. The present invention innovatively uses static compilation to compile predetermined logic into directly executable code segments. The statically compiled code is directly loaded at program startup without runtime parsing, reducing the first execution delay. The statically compiled code segments can detect potential errors in advance through compile-time checks (such as type safety, boundary checks); uses dynamic compilation to monitor code segments with high-frequency calls in real time, dynamically compiles the code segments with high-frequency calls into machine code, and directly executes the compiled code subsequently. The combination of static compilation and dynamic compilation realizes the efficient preprocessing of deterministic logic and the real-time optimization of dynamic logic, balancing performance and flexibility.
[0021] 5. The present invention innovatively uses a hybrid architecture of a BERT branch (12-layer Transformer encoder) and a GPT branch (6-layer Transformer encoder), combines a gating mechanism to dynamically weight and fuse the outputs of both, significantly improves the performance and adaptability of natural language processing tasks, can retain both the pre-trained knowledge of BERT and the generation ability of GPT, and avoids the performance degradation of a single model in transfer learning.
[0022] 6. The present invention performs secondary joint encoding on the result of weighted fusion, including: splicing the features of the output of the BERT branch and the result of weighted fusion, performing secondary encoding on the spliced features using a 12-layer Transformer encoder, and using the output of the secondary encoding to drive the generation of the format intermediate representation, significantly improving the feature extraction and interaction capabilities of the hybrid model in complex natural language tasks.
[0023] 7. The present invention abstracts the field mapping, calculation logic, and conditional branches of data processing through the format intermediate representation, and embeds field binding and field type prediction during the process of generating the format intermediate representation, significantly improving the automation and accuracy of data conversion and calculation tasks.
[0024] Advantages of additional aspects of the present invention will be partly given in the following description, partly will become obvious from the following description, or will be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings forming a part of this specification are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention.
[0026] Figure 1 It is a schematic flowchart of the adaptive voucher intelligent generation method provided in Embodiment 1 of the present invention; Figure 2 It is a schematic diagram of an adaptive voucher intelligent generation system provided in Embodiment 2 of the present invention; Figure 3 It is a schematic diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0028] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0029] Without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0030] Embodiment 1: As described in the background art, the existing financial voucher generation strategy has problems such as strong format coupling, high manual configuration cost, limited rule understanding, and poor adaptability to rule changes. In view of the above problems, this implementation proposes an adaptive voucher intelligent generation method, as Figure 1 shown, including the following processes: S1: Process the obtained financial text rule data to obtain an embedding vector; S2: Use the embedding vector as input, and according to the hybrid model based on BERT and GPT, obtain a format intermediate representation, extract the structured information of the format intermediate representation, and generate a dynamic template; S3: Parse the dynamic template, and generate an executable target format code according to the metadata definition of the target format and the parsed dynamic template data; S4: Through the hybrid execution engine, parse the generated target format code to obtain the generation result of the target format.
[0031] Specifically in this application, a BERT-GPT hybrid model architecture is designed to process the input natural language rule text (i.e., financial text rule data, such as PDF / Word / Txt, etc.), and output a format intermediate representation (FIR, Format Intermediate Representation). After the financial text rule data is input, it is processed through the following steps: (1); Among them, is the BERT word vector (dimension 768) fine-tuned based on the financial domain corpus, is the position encoding (maximum length 512), used to distinguish text paragraphs (rule body / annotation), is the position index, indicating the sequential position in the sequence, for example: the first position is 0, and the second is 1; is the paragraph identifier, distinguishing different sentences (0 or 1), used to process sentence pair tasks, for example: sentence A is marked as 0, and sentence B is marked as 1; represents the words extracted from the financial text rule data; is the embedding vector.
[0032] This implementation method adopts a parallel processing scheme, including a BERT branch and a GPT branch; More specifically, the BERT branch includes: (2); Among them, is a 12-layer BERT encoder. In the present invention, a complete 12-layer Transformer encoder is adopted, and the output contains local features of each intermediate layer ( , ···, ), and the top-layer feature carries global semantic information, Represents the output of the BERT branch, and L represents the L layers.
[0033] More specifically, the GPT branch includes: (3); Wherein, Is a 6-layer Transformer encoder, and the output contains autoregressive generated context features ( , ···, ), and the top-level feature Contains the ability to predict the logical structure, Represents the output of the GPT branch, and M represents the M layers.
[0034] Perform feature fusion. First, calculate the gating weights: (4); Wherein, Indicates And The vector concatenation of, Is a learnable parameter matrix, Is the Sigmoid function, and the output range is [0,1], Represents the gating weight.
[0035] Then, perform weighted fusion: (5); Wherein, Is the result output after weighted fusion.
[0036] In the second joint coding stage, specifically, it includes: For And Perform feature concatenation to obtain ; Perform secondary coding on the concatenated feature : (6); Wherein, Is the final secondary coding output, which directly drives the generation of the FIR. Based on the secondary coding output, generate the FIR in XML format. The FIR contains generated field mapping, calculation logic, and conditional branches.
[0037] More specifically, the FIR is defined using XML syntax and includes: (1) a root element whose attributes include a version number "version" and a namespace "namespace"; (2) at least one child element used to define a structured data block, which includes a "type" attribute to identify the data type; (3) elements that establish a mapping relationship from source fields to target fields through "src" and "dst" attributes, and the optional values of the "type" attribute of the elements include, but are not limited to: string, numeric, date, currency, etc.
[0038] More specifically, during the process of generating the FIR, field binding (i.e., establishing a mapping relationship from source fields to target fields) and field type (i.e., the "type" attribute) processing are required, and the field binding and field type are written into the FIR. Specifically, it includes: Field binding, which automatically identifies the field relationships in the financial text rule data through semantic role labeling (SRL): (7); Among them, is a learnable parameter, is the sentence vector output by BERT, is a field, represents that under the condition of a given sentence the probability distribution belonging to a certain field and represents the hidden state vector of the special token in the BERT branch.
[0039] For example: when the input is "The debit account is accounts receivable (account code 1122), and the amount is taken as the total order amount (total_amount)", in the output probability distribution, the probabilities of "debit account" and "amount" are significantly higher than those of other fields, reflecting their core status and relevance in the sentence, and thus an accounting voucher entry, the debit account and its amount, can be obtained.
[0040] Field type prediction, which is based on context embedding for field type prediction: (8); Among them, is the transpose of the type embedding matrix, is the hidden state vector of the field and is the field type prediction result.
[0041] By analyzing the context semantics of fields in natural language rules (such as adjacent words, syntactic structures), automatically infer the data types of fields (such as voucher date, amount, account code, etc.). For example, the context of the field "total order amount equals order amount multiplied by quantity" contains keywords such as "amount" and "multiplied by", and the model predicts its type as Amount; for example, "voucher date", "settlement date", etc. contain the keyword "date", and the model predicts its type as Date. The purpose is to define the field type in the intermediate representation layer after predicting the type to ensure data type consistency during cross-format conversion.
[0042] In this implementation method, based on the generated intermediate representation of the format, extract structured information to generate a dynamic template. The structured information extraction includes: Field mapping: directly read the field names, types, and data paths defined in the FIR; Calculation logic: parse the calculation logic in the FIR; Conditional branch: extract the conditional rules in the FIR.
[0043] Use the rule distillation loss function to ensure the semantic consistency between the dynamic template and the financial text rule data: (9); Among them, and respectively represent the semantic embeddings corresponding to the th fields of the rule text and the dynamic template; is the cross-entropy loss, which constrains the syntax correctness of the template; α and β are weight coefficients that control the proportion of the cross-entropy loss and the semantic alignment loss, represents the norm operation, is the rule distillation loss function.
[0044] Dynamically adjust the generation strategy of the template through reinforcement learning to improve accuracy, performance, and compatibility. Specifically, it includes: State space : (10); Among them, represents the iteration round, that is, the state space is the system state in the th round of the optimization cycle.
[0045] Action space : (11); The above action space is the set of operations that the agent can execute, which directly affects the adjustment direction of the strategy, meaning what actions the agent can take to automatically optimize the generation strategy of the template. Specifically: Adjusting field weights means: enhancing the priority of key fields (such as amount, date); Modifying path binding means: optimizing the JSONPath expression (such as changing $.total to $.order.total); Optimizing conditional expressions means: simplifying or enhancing conditional logic (such as total>100000 → total>=100000).
[0046] Reward function is: (12); Among them, is the accuracy rate, is the performance metric, is the format compatibility, = 1 - (number of incorrect vouchers / total number of vouchers), = 1 / average generation time, is equal to the ratio of the number of supported target formats to the total number of formats, , and are the corresponding weights respectively.
[0047] Using the PPO algorithm (Proximal Policy Optimization), the objective function (the larger the better) is: (13); Among them: θ is the neural network weight to be optimized, controlling the policy action selection; is a hyperparameter (usually 0.1~0.3), used for the clipping range, restricting the policy update amplitude, and preventing the result from deviating too far from 1; is the advantage function, calculated by GAE (Generalized Advantage Estimation), quantifying the advantage of an action relative to the average level, represents the expected value of the th round, is the clipping function.
[0048] (14); Among them, is the ratio of the new and old policy probabilities, measuring the magnitude of the policy change, represents the probability of the current policy taking action in state , represents the probability of the old policy taking action in state .
[0049] In this implementation method, the optimized dynamic template is converted into executable code or protocols in target formats (such as SAP, blockchain, databases, etc.), and cross-format compatibility and high-performance data calculation and voucher generation are achieved through a hybrid execution engine. Specifically, it includes: Load the metadata of the target format, parse the Schema definition of the target format (such as the XSD file of SAP IDoc, the ABI of blockchain smart contracts, etc.), extract the field type constraints, and automatically insert type conversion code to convert the field types (such as Date, Amount) in the dynamic template into the types of the target format, such as xs:date, DECIAML(18, 2): (15); Among them, is a predefined set of conversion functions, is a conversion function, is a distance function.
[0050] Perform dynamic code generation. Based on the parsing results of the dynamic template and the metadata of the target format, output executable target format code, including: field mapping code (generate data binding code according to the field mapping tags in the dynamic template), calculation logic conversion (automatically convert the calculation expressions in the dynamic template into syntax code supported by the target format), and conditional branch adaptation (convert the conditional tags in the dynamic template into conditional statements of the target format).
[0051] Through the hybrid execution engine, parse the generated code and output the generation results in the target format. Specifically, during the program execution process, two technologies, static compilation and dynamic interpretation execution, work together. Static compilation compiles the high-frequency and stable logic (such as field mapping rules, fixed calculation logic, etc.) determined in advance in the template into directly executable code segments to reduce the interpretation overhead during runtime; the dynamic interpretation execution module processes dynamic rules (such as user-defined rules or obtaining system variables at runtime); adopt hot spot detection to achieve JIT optimization, that is, monitor the hot spots of code execution (code segments with high-frequency calls) in real time, dynamically compile the hot spot code into machine code, and directly execute the compiled code subsequently to avoid repeated interpretation overhead; place tasks suitable for parallel computing (such as large-scale numerical operations) on the GPU for execution, and utilize the parallel computing power of the GPU to significantly improve the throughput.
[0052] In this implementation method, performance optimization is also carried out. Specifically, it includes: performing multi-level data binding based on the attention mechanism to achieve precise mapping and dynamic association of fields at different levels in complex data structures. This is mainly because the source data usually contains multi-level nested structures (such as order → details → sub-items), define class JSONPath expressions in the dynamic template, and pre-compute the path offsets through pointer mapping technology: (16); Among them, represents the th field, represents the path of the th field, represents the total number of fields, represents the offset of the th field in the path, indicating the address offset from the parent node to the current field. Compared with the traditional JSONPath parsing that needs to traverse the data structure layer by layer, that is, the time complexity is , through pre-computing the path offset, the pointer mapping directly jumps to the target address, that is, the time complexity is , which improves the data processing efficiency, reduces the latency, and directly accesses the memory through the offset, reducing the system memory occupancy.
[0053] JSONPath pre-compilation optimization, caching the path expression, using an LRU cache (maximum capacity 1000) to store the compiled JSONPath; performing GPU accelerated computing, batch processing kernels, using CUDA to implement the amount calculation kernel, configuring parameters: 256 threads per block, Grid Size = ceil(Y / 256), Y is the total number of data to be calculated, the ceil function represents the ceiling function, and Grid Size represents the total number of computing units.
[0054] Through the design of the above solution, the data access efficiency can be improved and the system performance can be enhanced.
[0055] In this implementation method, the effect of the entire full-format adaptive voucher generation method is also evaluated, using the following evaluation metrics: Manual workload reduction rate: (17); Among them, is the manual verification time required by the present invention (0.5 hours / template), represents the time required for manual operation, is the manual workload reduction rate.
[0056] Cross-format generation efficiency improvement: (18); Among them, is the time used for cross-format generation by the existing traditional method, is the time used for cross-format generation by the method of the present invention, is the cross-format generation efficiency.
[0057] Example 2: Such asFigure 2 As shown in Figure 2 , this implementation provides an adaptive credential intelligent generation system, including: An embedded vector generation unit, configured to: process the obtained financial text rule data to obtain an embedded vector; A dynamic template generation unit, configured to: take the embedded vector as input, and according to a hybrid model based on BERT and GPT, obtain a format intermediate representation, extract the structured information of the format intermediate representation, and generate a dynamic template; A target code generation unit, configured to: parse the dynamic template, and generate an executable target format code according to the metadata definition of the target format and the parsed dynamic template data; A target format generation unit, configured to: parse the generated target format code to obtain the generation result of the target format.
[0058] The specific working processes of the above units are described in Embodiment 1 and will not be elaborated here.
[0059] It can be understood that the above units can be separately or all combined into one or several other units to form, or some of them can be further split into multiple smaller units with more specific functions to form, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of this application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of this application, the system can also include other units. In practical applications, these functions can also be assisted by other units and can be realized through the cooperation of multiple units.
[0060] According to another embodiment of this application, the system described in this embodiment can be constructed and the method of Embodiment 1 of this application can be implemented by running a computer program (including program code) that can execute the steps involved in the corresponding method described in Embodiment 1 on a general computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access memory (RAM), and a read-only memory (ROM). The computer program can be recorded on a computer-readable recording medium, for example, and loaded into the above computing device through the computer-readable recording medium and run therein.
[0061] Embodiment 3: As Figure 3As shown in the figure, this implementation provides an electronic device, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. Among them, the processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 can be connected through a bus or other means.
[0062] Among them, the communication interface 1002 is used to receive and send data. The computer-readable storage medium 1003 can be stored in the memory of the electronic device. The computer-readable storage medium 1003 is used to store a computer program, and the computer program includes program instructions. The processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.
[0063] The processor 1001, also known as the CPU (Central Processing Unit), is the computing core and control core of the electronic device, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding function.
[0064] The processor 1001 is configured to execute the following process: Process the obtained financial text rule data to obtain an embedding vector; Using the embedding vector as input, according to a hybrid model based on BERT and GPT, obtain a format intermediate representation, extract the structured information of the format intermediate representation, and generate a dynamic template; Parse the dynamic template, and generate an executable target format code according to the metadata definition of the target format and the parsed dynamic template data; Parse the generated target format code to obtain the generation result of the target format.
[0065] For the specific working process, see the introduction in Embodiment 1, which will not be elaborated here.
[0066] Embodiment 4: This implementation provides a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in the electronic device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the electronic device and, of course, the extended storage medium supported by the electronic device. The computer-readable storage medium provides a storage space, and this storage space stores the processing system of the electronic device.
[0067] Moreover, one or more instructions suitable for being loaded and executed by a processor are stored in this storage space, and these instructions may be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium located far from the aforementioned processor.
[0068] In one embodiment, one or more instructions are stored in the computer-readable storage medium; one or more instructions stored in the computer-readable storage medium are loaded and executed by a processor to implement the following process: Process the obtained financial text rule data to obtain an embedding vector; Taking the embedding vector as an input, according to a hybrid model based on BERT and GPT, obtain a format intermediate representation, extract the structured information of the format intermediate representation, and generate a dynamic template; Parse the dynamic template, and generate an executable target format code according to the metadata definition of the target format and the parsed dynamic template data; Parse the generated target format code to obtain the generation result of the target format.
[0069] For the specific working process, see the introduction in Embodiment 1 and will not be elaborated here.
[0070] Embodiment 5: This implementation provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the following process: Process the obtained financial text rule data to obtain an embedding vector; Taking the embedding vector as an input, according to a hybrid model based on BERT and GPT, obtain a format intermediate representation, extract the structured information of the format intermediate representation, and generate a dynamic template; Parse the dynamic template, and generate an executable target format code according to the metadata definition of the target format and the parsed dynamic template data; Parse the generated target format code to obtain the generation result of the target format.
[0071] For the specific working process, see the introduction in Embodiment 1 and will not be elaborated here.
[0072] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this application can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0073] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital line) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data processing device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive), etc.
[0074] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An adaptive credential intelligent generation method, characterized in that: The process includes: Process the acquired financial text rule data to obtain an embedding vector; Taking the embedding vector as input, obtaining a format intermediate representation according to a hybrid model based on BERT and GPT, extracting structural information of the format intermediate representation, and generating a dynamic template; Parse the dynamic template and generate executable target format code according to the metadata definition of the target format and the dynamic template data obtained by parsing; Parse the generated target format code to obtain the generated result in the target format.
2. The method for intelligently generating an adaptive credential according to claim 1, wherein: Generate executable target format code based on the target format metadata definition and the parsed dynamic template data, including: Generate data binding code based on the field mapping tags in the dynamic template, automatically convert the calculation expression in the dynamic template into the syntax code supported by the target format, and convert the conditional tags in the dynamic template into conditional statements in the target format.
3. The adaptive credential intelligent generation method according to claim 1, characterized in that: Through the hybrid execution engine, the generated target format code is parsed to obtain the generation result of the target format, including: using static compilation to compile the predetermined logic into a code segment that can be directly executed; using dynamic compilation to monitor the high-frequency called code segments in real time, dynamically compile the high-frequency called code segments into machine code, and then directly execute the compiled code.
4. The method for intelligently generating an adaptive credential according to claim 1, wherein: The hybrid model based on BERT and GPT includes a BERT branch and a GPT branch. Both the BERT branch and the GPT branch take the embedding vector as input. The BERT branch is encoded by a 12-layer Transformer encoder, and the GPT branch is encoded by a 6-layer Transformer encoder. The outputs of the BERT branch and the GPT branch are weightedly fused through a gating mechanism to obtain a weighted fusion result.
5. The adaptive credential intelligent generation method according to claim 4, characterized in that: The weighted fusion result is subjected to secondary joint coding, including: Output of BERT branch The result of weighted fusion Perform feature concatenation to obtain , for the concatenated features A 12-layer Transformer encoder is used for secondary encoding, and the output of the secondary encoding is used to drive the generation of the intermediate representation.
6. The method for intelligently generating an adaptive credential according to any one of claims 1 to 5, characterized in that: The format intermediate representation includes field mapping, calculation logic and conditional branching. In the process of generating the format intermediate representation, field binding and field type prediction processing are performed, and the field binding and field type are written into the format intermediate representation.
7. An adaptive credential intelligent generation system, characterized in that: include: The embedding vector generating unit is configured to: process the acquired financial text rule data to obtain an embedding vector; The dynamic template generation unit is configured to: take the embedding vector as input, obtain a format intermediate representation according to a hybrid model based on BERT and GPT, extract structured information of the format intermediate representation, and generate a dynamic template; The target code generation unit is configured to: parse the dynamic template and generate executable target format code according to the metadata definition of the target format and the dynamic template data obtained by parsing; The target format generating unit is configured to: parse the generated target format code to obtain a generated result in the target format.
8. A computer device, characterized in that: include: A processor and a computer readable storage medium; a processor adapted to execute a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the adaptive credential intelligent generation method as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the adaptive credential intelligent generation method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the adaptive credential intelligent generation method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
A financial voucher generation method and device and electronic equipment
CN112634005A
Financial voucher generation method and system
CN116416076A
Electronic creditor's right certificate intelligent issuing method, system and device and storage medium
CN119273351A
Model management system and business processing method
CN119337933A
Method of providing automated platform service for reporting processing of sales and expenditure resolutions by user for pharmaceutical distribution
KR102645426B1
Cited By
Financial voucher generation method, medium and system based on ocean monitoring platform
CN120672499A
Format conversion method and device for heterogeneous data and medium
CN121092506A