Adaptive credential intelligent generation method, system, product, medium and device
Through the adaptive voucher intelligent generation method, the BERT and GPT hybrid model is used to dynamically define the voucher structure, which solves the problems of strong format coupling and high manual configuration costs in the financial voucher generation strategy, and realizes efficient, automated voucher generation and cross-platform compatibility.
Patent Information
- Application Number
- CN202510637215.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-05-19
AI Technical Summary
The existing financial voucher generation strategy has problems such as strong format coupling, high manual configuration costs, limited rule understanding, and poor adaptability to rule changes. It is unable to adapt to new voucher formats and the cost of cross-platform migration is high.
A hybrid model based on BERT and GPT is adopted, and an adaptive credential intelligent generation method is used to dynamically define and expand the credential structure, automatically parse and generate multiple credential formats, support compatibility with different systems, and reduce manual configuration time.
It realizes flexible credential generation without pre-defined fixed formats, improves development efficiency and code consistency, reduces development costs, ensures compatibility with different systems and data processing accuracy, and improves the automation and accuracy of credential generation.
Smart Images

Figure CN120163674B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, system, product, medium and device for intelligently generating adaptive credentials. Background Art
[0002] The statements in this section merely provide background art related to the present invention and do not necessarily constitute prior art.
[0003] Financial vouchers, as the cornerstone of a company's financial accounting, play a crucial role in the entire financial management system. They are not only an important vehicle for recording the company's economic and business activities, but also the basis for subsequent accounting processing, financial statement preparation, and financial analysis. Existing financial voucher generation strategies have the following problems:
[0004] (1) There is strong format coupling. For example, traditional systems use fixed template engines 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) Manual configuration costs are high, and cross-platform migration is hindered. Differences in data structures between systems of different manufacturers lead to high migration costs; (3) There are limitations in rule understanding. Manual understanding of voucher rule documents and manual configuration of voucher templates are required, which requires users to have certain voucher knowledge. Deviations in document understanding can easily lead to errors in voucher template configuration, which in turn lead to errors in the generated vouchers; (4) Poor adaptability to rule changes. When a rule change causes a change in the rule document, manual identification of the rule change and modification of the voucher template are required. Hundreds of voucher templates may need to be modified, resulting in poor dynamic adaptability of rule changes. Summary of the Invention
[0005] To address the shortcomings of the existing technology, the present invention provides an adaptive credential intelligent generation method, system, product, medium and device that supports a dynamic template engine, can flexibly define and expand the credential structure, does not require predefined fixed formats, supports the parsing and generation of multiple credential formats, ensures compatibility with different systems (such as blockchain platforms), and can automatically generate credential templates according to business rules, reducing manual configuration time.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for intelligently generating adaptive credentials.
[0008] An adaptive credential intelligent generation method includes the following steps:
[0009] Process the acquired financial text rule data to obtain an embedding vector;
[0010] Taking the embedding vector as input, a hybrid model based on BERT (Bidirectional Encoder Representations from Transformers) and GPT (Generative Pre-trained Transformer) is used to obtain an intermediate representation of the format, extract structural information from the intermediate representation of the format, and generate a dynamic template;
[0011] Parse the dynamic template and generate executable target format code based on the metadata definition of the target format and the dynamic template data obtained by parsing;
[0012] Parse the generated target format code to obtain the generated result in the target format.
[0013] 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 dynamic template data obtained by parsing includes:
[0014] Generate data binding code based on the field mapping tags in the dynamic template, automatically convert the calculation expressions in the dynamic template into syntax codes supported by the target format, and convert the conditional tags in the dynamic template into conditional statements in the target format.
[0015] As a further limitation of the first aspect of the present invention, the generated target format code is parsed through a hybrid execution engine to obtain a generation result in the target format, including: 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 compiling high-frequency called code segments into machine code, and then directly executing the compiled code.
[0016] 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 of which take the embedding vector as input, the BERT branch is encoded using a 12-layer Transformer encoder, and the GPT branch is encoded using a 6-layer Transformer encoder, and the outputs of the BERT branch and the GPT branch are weightedly fused through a gating mechanism to obtain a weighted fusion result.
[0017] As a further limitation of the first aspect of the present invention, the weighted fusion result is subjected to secondary joint encoding, including: The result of weighted fusion Perform feature splicing 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.
[0018] As a further limitation of the first aspect of the present invention, 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.
[0019] In a second aspect, the present invention provides an adaptive credential intelligent generation system.
[0020] An adaptive credential intelligent generation system, comprising:
[0021] The embedding vector generating unit is configured to: process the acquired financial text rule data to obtain an embedding vector;
[0022] A dynamic template generation unit is configured to: take the embedding vector as input, obtain a format intermediate representation based on a hybrid model based on BERT and GPT, extract structured information of the format intermediate representation, and generate a dynamic template;
[0023] 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;
[0024] The target format generating unit is configured to: parse the generated target format code to obtain a generated result in the target format.
[0025] In a third aspect, the present invention provides a computer device comprising: a processor and a computer-readable storage medium;
[0026] a processor adapted to execute a computer program;
[0027] A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the adaptive credential intelligent generation method as described in the first aspect of the present invention.
[0028] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor and executing the adaptive credential intelligent generation method as described in the first aspect of the present invention.
[0029] In a fifth aspect, the present invention provides a computer program product, which includes a computer program. 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.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] 1. The present invention uses the embedded vector of financial text rule data as input and obtains a dynamic template based on a hybrid model based on BERT and GPT. According to the metadata definition of the target voucher format, the intermediate template is adapted to the target voucher format through dynamic code generation. It supports a dynamic template engine, can flexibly define and expand the voucher structure, does not require predefined fixed formats, supports the parsing and generation of multiple voucher formats, and ensures compatibility with different systems (such as blockchain platforms).
[0032] 2. The present invention can automatically generate voucher templates based on business rules, reducing manual configuration time, providing standardized data interfaces, supporting seamless data connection between systems of different manufacturers, automatically identifying and converting data structures of different systems, reducing manual intervention, and can automatically parse voucher rule documents and generate corresponding template configurations. It uses reinforcement learning to optimize the hybrid model to improve the accuracy of data processing.
[0033] 3. The present invention innovatively generates data binding code based on the field mapping tags in the dynamic template, automatically converts the calculation expressions in the dynamic template into syntax codes supported by the target format, and converts the conditional tags in the dynamic template into conditional statements in the target format. By parsing the dynamic template data and combining it with the metadata definition of the target format, the executable code is automatically generated, realizing the automatic mapping and assignment of data fields, avoiding manual writing of repetitive field mapping logic, reducing development costs, and significantly improving development efficiency and code consistency.
[0034] 4. The present invention innovatively uses static compilation to compile predetermined logic into directly executable code segments. The statically compiled code is directly loaded when the program starts, without the need for 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 and boundary checks); dynamic compilation is used to monitor frequently called code segments in real time, dynamically compile the frequently called code segments into machine code, and then directly execute the compiled code. The combination of static compilation and dynamic compilation realizes efficient preprocessing of deterministic logic and real-time optimization of dynamic logic, balancing performance and flexibility.
[0035] 5. This invention innovatively uses a hybrid architecture of the BERT branch (12-layer Transformer encoder) and the GPT branch (6-layer Transformer encoder), combined with a gating mechanism to dynamically weight the outputs of the two, significantly improving the performance and adaptability of natural language processing tasks. It can simultaneously retain the pre-trained knowledge of BERT and the generation capability of GPT, avoiding the performance degradation of a single model in transfer learning.
[0036] 6. The present invention performs secondary joint encoding on the results of weighted fusion, including: feature splicing of the output of the BERT branch and the result of weighted fusion, secondary encoding of the spliced features using a 12-layer Transformer encoder, and the generation of an intermediate representation driven by the output of the secondary encoding, which significantly improves the feature extraction and interaction capabilities of the hybrid model in complex natural language tasks.
[0037] 7. The present invention abstracts the field mapping, calculation logic and conditional branching of data processing through the format intermediate representation, and embeds field binding and field type prediction in the process of generating the format intermediate representation, which significantly improves the automation and accuracy of data conversion and calculation tasks.
[0038] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0040] Figure 1 A schematic diagram of the process of the adaptive credential intelligent generation method provided in Example 1 of the present invention;
[0041] Figure 2 A schematic diagram of the adaptive credential intelligent generation system provided in Example 2 of the present invention;
[0042] Figure 3 A schematic diagram of a computer device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0044] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.
[0045] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0046] Example 1:
[0047] As mentioned in the background technology, the existing financial voucher generation strategy has problems such as strong format coupling, high manual configuration cost, limited rule understanding and poor adaptability of rule changes. In view of the above problems, this implementation method proposes an adaptive voucher intelligent generation method, such as Figure 1 As shown, the following process is included:
[0048] S1: Process the acquired financial text rule data to obtain an embedding vector;
[0049] S2: Using the embedding vector as input, a hybrid model based on BERT and GPT is used to obtain the intermediate representation of the format, extract the structural information of the intermediate representation of the format, and generate a dynamic template;
[0050] S3: Parse the dynamic template and generate executable target format code based on the metadata definition of the target format and the parsed dynamic template data;
[0051] S4: The generated target format code is parsed through the hybrid execution engine to obtain the generated result in the target format.
[0052] Specifically in this application, a BERT-GPT hybrid model architecture was designed to process input natural language rule text (i.e., financial text rule data, such as PDF / Word / Txt), and output a Format Intermediate Representation (FIR). After the financial text rule data is input, it is processed through the following steps:
[0053] (1);
[0054] in, BERT word vector (dimension 768) fine-tuned based on financial domain corpus, is the position code (maximum length 512), Used to distinguish text paragraphs (rule body / comments), is the position index, indicating The ordinal position in the sequence, for example: the first The first position is 0, the second is 1; It is a paragraph identifier that distinguishes different sentences (0 or 1) and is used to process sentence pair tasks. For example, sentence A is marked as 0 and sentence B is marked as 1. Represents words extracted from financial text rule data; is the embedding vector.
[0055] This implementation adopts a parallel processing scheme, including BERT branch and GPT branch;
[0056] More specifically, the BERT branch includes:
[0057] (2);
[0058] in, For a 12-layer BERT encoder, this paper adopts a complete 12-layer Transformer encoder, and the output contains the local features of each intermediate layer ( ,···, ), top-level features Carrying global semantic information, represents the output of the BERT branch, and L represents the L layer.
[0059] More specifically, the GPT branch includes:
[0060] (3);
[0061] in, It is a 6-layer Transformer encoder, and the output contains the context features generated by autoregression ( ,···, ), top-level features Contains the ability to predict logical structures, represents the output of the GPT branch, and M represents the M layer.
[0062] To perform feature fusion, first calculate the gate weight:
[0063] (4);
[0064] in, express and Vector splicing of is the learnable parameter matrix, is the Sigmoid function, the output range is [0,1], Represents the gate weight.
[0065] Then, perform weighted fusion:
[0066] (5);
[0067] in, is the result output after weighted fusion.
[0068] The secondary joint coding stage specifically includes:
[0069] right and Perform feature splicing to obtain ;
[0070] The features after splicing Perform secondary encoding:
[0071] (6);
[0072] in, For the final secondary encoding output, it directly drives the generation of FIR. Based on the secondary encoding output, it generates FIR in XML format. FIR contains generation field mapping, calculation logic and conditional branches.
[0073] More specifically, FIR is defined using XML syntax and includes: (1) a root element whose attributes include the version number and namespace; (2) at least one child element, which is used to define a structured data block and includes a type attribute to identify the data type; (3) an element, which establishes a mapping relationship from the source field to the target field through the src and dst attributes. The optional values of the element's type attribute include but are not limited to: string, numeric, date, currency, etc.
[0074] More specifically, in the process of generating the FIR, field binding (i.e., establishing a mapping relationship between source fields and target fields) and field type (i.e., type attribute) processing are required, and the field binding and field type are written into the FIR. Specifically, the following steps are required:
[0075] Field binding, which automatically identifies field relationships in financial text rule data through semantic role labeling (SRL):
[0076] (7);
[0077] in, is a learnable parameter, is the sentence vector output by BERT, For fields, In the given sentence Under the condition that belongs to a certain field The probability distribution of Indicates special tags in BERT branches The hidden state vector of .
[0078] For example, if you input "The debit account is accounts receivable (account code 1122), and the amount is the total order amount (total_amount)", the probabilities of "debit account" and "amount" in the output probability distribution are significantly higher than those of other fields, reflecting their core position and relevance in the sentence. This yields an accounting voucher entry with the debit account and its amount.
[0079] Field type prediction, field type prediction based on context embedding:
[0080] (8);
[0081] in, is the transpose of the type embedding matrix, For fields The hidden state vector of Predict results for the field type.
[0082] By analyzing the contextual semantics of the field in natural language rules (such as adjacent words and syntactic structure), the data type of the field (such as document date, amount, account code, etc.) is automatically inferred. For example: the context of the field "Total order amount equals order amount multiplied by quantity" contains keywords such as "amount" and "multiply", and the model predicts its type as Amount; for example, "document date" and "settlement date" 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.
[0083] In this implementation, based on the generated intermediate representation of the format, structured information is extracted to generate a dynamic template. The structured information extraction includes:
[0084] Field mapping: directly read the field name, type and data path defined in FIR;
[0085] Calculation logic: Analyze the calculation logic in FIR;
[0086] Conditional branching: Extract conditional rules in FIR.
[0087] Use the rule distillation loss function to ensure the semantic consistency between dynamic templates and financial text rule data:
[0088] (9);
[0089] in, and Represents the rule text and dynamic template The semantic embedding corresponding to each field; is the cross entropy loss, which constrains the grammatical correctness of the template; α and β are weight coefficients, which control the ratio of cross entropy loss to semantic alignment loss. represents the norm operation, is the regular distillation loss function.
[0090] Dynamically adjust template generation strategies through reinforcement learning to improve accuracy, performance, and compatibility. Specifically, the following improvements are made:
[0091] State Space :
[0092] (10);
[0093] in, Indicates the iteration round, that is, the spatial state is in the The system status during the optimization cycle.
[0094] Action Space :
[0095] (11);
[0096] The action space above is the set of operations that the agent can perform, which directly affects the direction of policy adjustment. This means what actions the agent can take to automatically optimize the template generation strategy. Specifically:
[0097] Adjusting field weights means: increasing the priority of key fields (such as amount and date);
[0098] Modifying path binding means: optimizing JSONPath expressions (e.g. changing $.total to $.order.total);
[0099] Optimizing conditional expressions means simplifying or enhancing conditional logic (for example, total>100000 → total>=100000).
[0100] Reward Function for:
[0101] (12);
[0102] in, is the accuracy, is the performance indicator, For format compatibility, =1-(number of wrong vouchers / total number of vouchers), =1 / average generation time, Equal to the ratio of the number of supported target formats to the total number of formats, 、 and are the corresponding weights respectively.
[0103] Using the PPO algorithm (Proximal Policy Optimization), the objective function (Bigger is better) is:
[0104] (13);
[0105] Where: θ is the weight of the neural network to be optimized, and the control strategy action selection; It is a hyperparameter (usually 0.1-0.3) used to clip the range, limit the strategy update amplitude, and prevent the result from deviating too far from 1; is the advantage function, calculated by GAE (Generalized Advantage Estimation), which quantifies the advantage of the action relative to the average level. Representative The expected value of the wheel, is the clipping function.
[0106] (14);
[0107] in, is the probability ratio of the new and old strategies, which measures the magnitude of strategy change. Indicates the current policy status Take action The probability of Represents the old policy in state Take action probability.
[0108] In this implementation, the optimized dynamic template is converted into executable code or protocol in the target format (such as SAP, blockchain, database, etc.). A hybrid execution engine is used to achieve cross-format compatibility and high-performance data calculation and credential generation. Specifically, the following are included:
[0109] Load the target format metadata, parse the target format schema definition (such as SAP IDoc XSD files, blockchain smart contract ABI, etc.), extract field type constraints, automatically insert type conversion code, and convert field types in dynamic templates (such as Date, Amount) to the target format type, such as xs:date, DECIAML (18, 2):
[0110] (15);
[0111] in, is a set of predefined conversion functions, is the conversion function, is the distance function.
[0112] Perform dynamic code generation and output executable target format code based on the dynamic template parsing results and target format metadata, including: field mapping code (generating data binding code based on the field mapping tags in the dynamic template), calculation logic conversion (automatically converting the calculation expressions in the dynamic template into syntax code supported by the target format), and conditional branch adaptation (converting the conditional tags in the dynamic template into conditional statements in the target format).
[0113] The generated code is parsed through a hybrid execution engine, and the generated results are output in the target format. Specifically, during the program execution process, static compilation and dynamic interpretation and execution technologies work together. Static compilation compiles the high-frequency, stable logic (such as field mapping rules, fixed calculation logic, etc.) predetermined in the template into directly executable code segments, reducing runtime interpretation overhead; the dynamic interpretation and execution module processes dynamic rules (such as user-defined rules or system variables at runtime); hotspot detection is used to implement JIT optimization, that is, real-time monitoring of code execution hotspots (high-frequency called code segments), dynamically compiling the hotspot code into machine code, and then directly executing the compiled code to avoid repeated interpretation overhead; tasks suitable for parallel computing (such as large-scale numerical operations) are put on the GPU for execution, utilizing the parallel computing capabilities of the GPU to significantly improve throughput.
[0114] This implementation also includes performance optimizations, specifically: multi-level data binding based on the attention mechanism, enabling accurate mapping and dynamic association of fields at different levels in complex data structures. This is mainly because the source data often contains multi-layered nested structures (such as order → detail → sub-item). A JSONPath-like expression is defined in the dynamic template, and the path offset is pre-calculated using pointer mapping technology:
[0115] (16);
[0116] in, Indicates the fields, Indicates the The path to the fields, Indicates the total number of fields. Indicates the path The offset of the field represents the address offset from the parent node to the current field. Compared with the traditional JSONPath parsing, which requires traversing the data structure layer by layer, the time complexity is , pointer mapping jumps directly to the target address by precalculating the path offset, that is, the time complexity , improve data processing efficiency, reduce latency, and directly access memory through offsets to reduce system memory usage.
[0117] JSONPath pre-compilation optimization is performed, path expression caching is performed, and compiled JSONPaths are stored using an LRU cache (maximum capacity 1000). GPU-accelerated computing is performed, kernels are processed in batches, and the amount calculation kernel is implemented using CUDA. Configuration parameters are: 256 threads per block, Grid Size = ceil(Y / 256), where Y is the total number of data to be calculated, the ceil function represents the rounding function, and Grid Size represents the total number of computing units.
[0118] Through the design of the above solution, data access efficiency can be improved and system performance can be enhanced.
[0119] This implementation also evaluates the effectiveness of the entire full-format adaptive credential generation method using the following evaluation metrics:
[0120] Manual workload reduction rate:
[0121] (17);
[0122] in, The manual verification time required by the present invention (0.5 hours / template), Indicates the time required for manual operation. The labor workload reduction rate.
[0123] Improved cross-format generation efficiency:
[0124] (18);
[0125] in, The time used for cross-format generation by existing traditional methods, is the time used for cross-format generation in the method of the present invention, Generate efficiencies across formats.
[0126] Example 2:
[0127] like Figure 2 As shown, this implementation provides an adaptive credential intelligent generation system, including:
[0128] The embedding vector generating unit is configured to: process the acquired financial text rule data to obtain an embedding vector;
[0129] A dynamic template generation unit is configured to: take the embedding vector as input, obtain a format intermediate representation based on a hybrid model based on BERT and GPT, extract structured information of the format intermediate representation, and generate a dynamic template;
[0130] 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;
[0131] The target format generating unit is configured to: parse the generated target format code to obtain a generated result in the target format.
[0132] The specific working process of each of the above units is described in Example 1 and will not be repeated here.
[0133] It is understandable that each of the above-mentioned units can be separately or completely combined into one or several other units to constitute, or one (or some) of the units can be further divided into multiple functionally smaller units to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the system may also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0134] According to another embodiment of the present application, the system described in this embodiment can be constructed and the method of Example 1 of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method described in Example 1 on a general-purpose computing device such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.
[0135] Example 3:
[0136] like Figure 3 As shown, this implementation provides an electronic device, which includes a processor 1001, a communication interface 1002, and a computer-readable storage medium 1003. The processor 1001, the communication interface 1002, and the computer-readable storage medium 1003 may be connected via a bus or other means.
[0137] 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, the computer program includes program instructions, and the processor 1001 is used to execute the program instructions stored in the computer-readable storage medium 1003.
[0138] The processor 1001, or CPU (Central Processing Unit), is the computing core and control core of the electronic device. It is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to implement corresponding method processes or corresponding functions.
[0139] The processor 1001 is configured to execute the following process:
[0140] Process the acquired financial text rule data to obtain an embedding vector;
[0141] 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;
[0142] Parse the dynamic template and generate executable target format code based on the metadata definition of the target format and the dynamic template data obtained by parsing;
[0143] Parse the generated target format code to obtain the generated result in the target format.
[0144] The specific working process is described in Example 1 and will not be repeated here.
[0145] Example 4:
[0146] This implementation provides a computer-readable storage medium (Memory). This computer-readable storage medium is a memory device within an electronic device that stores programs and data. It should be understood that the computer-readable storage medium herein may include both built-in storage media within the electronic device and, of course, extended storage media supported by the electronic device. The computer-readable storage medium provides storage space that stores the processing system of the electronic device.
[0147] Furthermore, the storage space also stores one or more instructions suitable for being loaded and executed by the processor. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium herein may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device; alternatively, it may be at least one computer-readable storage medium located remotely from the processor.
[0148] In one embodiment, the computer-readable storage medium stores one or more instructions; the processor loads and executes the one or more instructions stored in the computer-readable storage medium to implement the following process:
[0149] Process the acquired financial text rule data to obtain an embedding vector;
[0150] 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;
[0151] Parse the dynamic template and generate executable target format code based on the metadata definition of the target format and the dynamic template data obtained by parsing;
[0152] Parse the generated target format code to obtain the generated result in the target format.
[0153] The specific working process is described in Example 1 and will not be repeated here.
[0154] Example 5:
[0155] This implementation provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the following process:
[0156] Process the acquired financial text rule data to obtain an embedding vector;
[0157] 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;
[0158] Parse the dynamic template and generate executable target format code based on the metadata definition of the target format and the dynamic template data obtained by parsing;
[0159] Parse the generated target format code to obtain the generated result in the target format.
[0160] The specific working process is described in Example 1 and will not be repeated here.
[0161] Those skilled in the art will appreciate that the units and algorithmic steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0162] The above embodiments can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. A computer program product comprises 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 the present 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 device. The computer instructions can be stored in a computer-readable storage medium or transmitted via 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 via wired (e.g., coaxial cable, optical fiber, digital line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data processing device such as a server or data center that integrates one or more available media. Available media can include magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives).
[0163] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A self-adaptive credential intelligent generation method, characterized in that: The following processes are included: 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 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 expressions in the dynamic template into syntax codes supported by the target format, and convert the conditional tags in the dynamic template into conditional statements in the target format; Parsing the generated target format code to obtain the target format generation result, including: using static compilation to compile the predetermined logic into a directly executable code segment; using dynamic compilation to monitor the frequently called code segments in real time, dynamically compiling the frequently called code segments into machine code, and then directly executing the compiled code; 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 are performed, and the field binding and field type are written into the format intermediate representation. Dynamically adjust the template generation strategy through reinforcement learning.
2. The adaptive credential intelligent generation method according to claim 1, characterized in that: 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 using a 12-layer Transformer encoder, and the GPT branch is encoded using 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.
3. The adaptive credential intelligent generation method according to claim 2, 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 splicing 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.
4. An adaptive credential intelligent generation system, using the adaptive credential intelligent generation method according to any one of claims 1 to 3, characterized in that: include: The embedding vector generating unit is configured to: process the acquired financial text rule data to obtain an embedding vector; A dynamic template generation unit is configured to: take the embedding vector as input, obtain a format intermediate representation based on 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.
5. 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 having a computer program stored therein, wherein the computer program, when executed by the processor, implements the adaptive credential intelligent generation method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded by a processor and executing the adaptive credential intelligent generation method according to any one of claims 1 to 3.
7. 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 according to any one of claims 1 to 3.
Citation Information
Patent Citations
Electronic creditor's right certificate intelligent issuing method, system and device and storage medium
CN119273351A
Model management system and business processing method
CN119337933A