A financial service coding method, device, medium and product

CN122547358APending Publication Date: 2026-08-11INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-23
Publication Date
2026-08-11

AI Technical Summary

Benefits of technology

[0013]根据本发明的另一方面,提供了一种计算机程序产品,计算机程序产品包括计算机程序,该计算机程序被处理器执行时实现本发明任一实施例的一种金融业务编码方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122547358A_ABST
    Figure CN122547358A_ABST
Patent Text Reader

Abstract

This invention discloses a financial business coding method, device, medium, and product. It can be applied to the fintech field. The method includes: acquiring financial business description data to be encoded; inputting the financial business description data to be encoded into a pre-trained business coding model to obtain financial business coding data output by the business coding model. The business coding model is trained based on target business code sample data, which is generated based on at least one method abstract syntax tree (AST) subtree corresponding to the target AST subtree and preset sample label values. Each method AST subtree is obtained by structuring the pre-acquired original business code sample data. This invention improves the efficiency of encoding financial business data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial technology, and in particular to a financial business coding method, device, medium and product. Background Technology

[0002] In the context of online financial services within the fintech sector, business coding models are crucial technologies supporting core aspects such as transaction processing and risk control. Their training effectiveness directly determines business processing efficiency and security compliance. As business scenarios become increasingly complex, business code exhibits characteristics of large scale, intricate logic, and frequent iterations.

[0003] Existing model training suffers from problems such as inaccurate sample processing, insufficient extraction of core logic, and lack of risk adaptability: the original code samples contain a large amount of redundant information, and direct training can easily lead to model overfitting. Traditional processing methods lack structured in-depth analysis, making it difficult to extract the core links of atomic business, and there is no mechanism for judging the risk level of code logic. At the same time, the verification process is imperfect, which can easily lead to deviations in core logic, resulting in insufficient effectiveness of training samples. Ultimately, this will make it difficult for the model to meet the high-quality and high-security operation requirements of online financial business. Summary of the Invention

[0004] This invention provides a financial business coding method, device, medium, and product to improve the sample quality used for training business coding models in the financial technology field, thereby improving the training accuracy of the business coding models.

[0005] According to one aspect of the present invention, a financial transaction coding method is provided, the method comprising:

[0006] Obtain the description data of the financial business to be encoded;

[0007] The financial business description data to be encoded is input into a pre-trained business encoding model to obtain the financial business encoding data output by the business encoding model.

[0008] The business coding model is trained based on target business code sample data, which is generated based on the target AST subtree corresponding to at least one method abstract syntax tree (AST) subtree and preset sample label values. Each method AST subtree is obtained by structuring the pre-acquired original business code sample data. According to another aspect of the present invention, an electronic device is provided, comprising:

[0009] At least one processor; and

[0010] A memory that is communicatively connected to at least one processor; wherein,

[0011] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to execute a financial business coding method according to any embodiment of the present invention.

[0012] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute a financial business coding method according to any embodiment of the present invention.

[0013] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements a financial business coding method according to any embodiment of the present invention.

[0014] The technical solution of this invention obtains financial business description data to be encoded; inputs the financial business description data to be encoded into a pre-trained business encoding model to obtain financial business encoding data output by the business encoding model. The business encoding model is trained based on target business code sample data, which is generated based on at least one method abstract syntax tree (AST) subtree corresponding to the target AST subtree and preset sample label values; each method AST subtree is obtained by structuring the pre-acquired original business code sample data. This technical solution can accurately capture the syntactic logic and business characteristics of financial business codes, significantly improving the accuracy and consistency of business encoding; simultaneously, by leveraging the structuring processing of business codes using AST subtrees, the business encoding model can deeply understand different financial businesses, avoiding subjective biases and omissions that are prone to occur in manual encoding, and significantly improving the efficiency of processing financial business codes.

[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a financial business coding method provided according to Embodiment 1 of the present invention;

[0018] Figure 2This is a flowchart of a financial business coding method provided according to Embodiment 2 of the present invention;

[0019] Figure 3 This is a flowchart of a financial business coding method provided according to Embodiment 3 of the present invention;

[0020] Figure 4 This is a schematic diagram of the structure of a financial business coding device according to Embodiment 4 of the present invention;

[0021] Figure 5 This is a schematic diagram of the structure of an electronic device that implements a financial business coding method according to an embodiment of the present invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] Example 1

[0025] Figure 1 This is a flowchart of a financial business coding method provided in Embodiment 1 of the present invention. This embodiment is applicable to scenarios involving training on financial business description data in the field of fintech. The method can be executed by a financial business coding device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0026] S101. Obtain the description data of the financial business to be encoded.

[0027] S102. Input the financial business description data to be encoded into the pre-trained business encoding model to obtain the financial business encoding data output by the business encoding model.

[0028] The business coding model is trained based on target business code sample data, and the target business code sample data is generated based on the target AST subtree corresponding to at least one method AST subtree and the preset sample label value; each method AST subtree is obtained by structuring the pre-acquired original business code sample data.

[0029] Among them, the financial business description data to be coded can be a requirement description that needs to be converted into business code for the online finance field.

[0030] For example, the financial business description data to be encoded obtained from the bank's mobile application can be: generating the core code for QR code payment, including data such as amount parsing, single transaction amount risk control verification rules, transaction result return, and transaction record.

[0031] The business coding model processes the financial business description data to be coded, resulting in financial business coding data. This financial business coding data is executable code data output by the business coding model, conforming to commercial bank code security specifications. The Abstract Syntax Tree (AST) is a tree-like data structure formed by abstracting the syntactic structure of the financial business coding data.

[0032] Furthermore, to address the issues of non-compliant and semantically fragmented data used to train the business coding model and thus improve the accuracy of the training model, in an optional embodiment, before inputting the financial business description data to be encoded into the pre-trained business coding model and obtaining the financial business coding data output by the business coding model, the following steps are also included:

[0033] Step a1: In response to the model training request for the business coding model in the online financial business scenario, obtain the original business code sample data for training the business coding model.

[0034] Step a2: Perform a structured transformation on the original business code sample data to obtain AST structured data, and perform node traversal on the AST structured data to generate at least one method AST subtree.

[0035] Step a3: Identify non-core nodes in each method's AST subtree, remove the identified non-core nodes, and perform a complete atomic operation logic verification on the method's AST subtree after removing non-core nodes. Based on the logic verification results, generate the reference AST subtree corresponding to each method's AST subtree.

[0036] Step a4: Based on the atomic business core links corresponding to each reference AST subtree, perform semantic purification operations on each reference AST subtree to obtain the target AST subtree corresponding to each reference AST subtree.

[0037] Step a5: Determine the risk level of each target AST subtree, and based on the risk level determination result, repair the corresponding target AST subtree from at least one preset repair dimension to obtain the repaired target AST subtree.

[0038] Step a6: Based on each repaired target AST subtree and the preset sample label values, generate target business code sample data, and use the target business code sample data to train the business coding model.

[0039] The online financial business scenarios can include QR code payments, fund clearing, and other scenarios involving financial transactions and business processing. The business coding model can be a large language model used to automatically generate compliant code for online financial business operations. Model training requests can be fine-tuning requests initiated by relevant technical personnel to optimize the compliance and accuracy of the model's financial business coding. The original business code sample data can be a collection of existing executable code in online financial business scenarios, such as core QR code payment code and risk control verification code.

[0040] For example, after relevant technical personnel initiate a fine-tuning request for the business coding model of the QR code payment scenario, they extract the original QR code payment code containing functions such as amount parsing, risk control verification, and transaction result return from the code repository as the original business code sample data.

[0041] Among them, AST structured data can be a tree-like data structure formed by decomposing the original business code according to syntax rules. For example, AST structured data contains node information such as declarations, import declarations, and class members.

[0042] For example, a syntax parsing tool is used for structured transformation. First, the original business code sample data is split into basic lexical units such as identifiers, keywords, and operators. Then, the lexical units are analyzed according to the syntax rules to construct AST structured data. Finally, the nodes of the AST structured data are traversed, relevant nodes are filtered, and a method AST subtree is generated.

[0043] Non-core nodes can be nodes that do not affect the execution of core business logic. Examples include log classes and nested functions for temporary calculations. The logic verification result can be the result of performing an atomic operation logic integrity check on the method AST subtree after removing non-core nodes. Complete atomic operation logic verification can be a verification process that checks whether the method AST subtree after removing non-core nodes completely covers the atomic operation logic chain of the corresponding business scenario and whether there are any missing key nodes. The atomic operation logic chain can be an indivisible core business process chain in the context of online financial business. For example, taking the payment method scenario as an example, the corresponding atomic operation logic chain could be: authentication, amount verification, risk control, and result return. The reference AST subtree can be the AST subtree that meets the atomic business logic requirements after removing non-core nodes and performing logic verification.

[0044] For example, taking the payment method subtree as an example, the AST subtree of the QR code payment method is traversed, non-core nodes such as log printing inner class nodes and marketing push nested methods are identified and removed, and the atomic operation logic chain of "user authentication, amount verification, risk control verification, and transaction result return" is verified. If the logic verification passes, the subtree is determined as the reference AST subtree.

[0045] Furthermore, to accurately remove redundant nodes and ensure the integrity of the complete logical link, in an optional embodiment, non-core nodes are identified in each method AST subtree, the identified non-core nodes are removed, and the method AST subtree after removing non-core nodes undergoes complete atomic operation logic verification. Based on the logic verification results, reference AST subtrees corresponding to each method AST subtree are generated, including:

[0046] Step b1: Traverse the child nodes of each method's AST subtree, and based on the preset inner class identification rules, determine the inner class nodes and redundant nested method nodes, and identify the inner class nodes and redundant nested method nodes as non-core nodes.

[0047] Step b2: Remove non-core nodes from each method AST subtree to obtain the method AST subtree after removing non-core nodes.

[0048] Step b3: Perform complete atomic operation logic verification according to the atomic operation logic link corresponding to each method's AST subtree, and obtain the logic verification results of each method's AST subtree.

[0049] Step b4: Determine the reference AST subtree based on the logical verification results of the AST subtrees of each method.

[0050] The preset inner class identification rules can be predefined non-core inner class judgment criteria, such as log classes, temporary calculation nested functions, and marketing push nested methods. Inner class nodes can be nodes corresponding to auxiliary inner classes defined in the AST subtree. Redundant nested method nodes can be method nodes defined nested in the AST subtree that do not participate in core business logic.

[0051] For example, the preset rule for identifying inner classes is that "log printing classes, temporary data calculation nested functions, and non-essential marketing function nested methods are all non-core nodes". Traverse all child nodes of the AST subtree and treat the child nodes corresponding to log printing classes, temporary data calculation nested functions, and non-essential marketing function nested methods as non-core nodes.

[0052] For example, the marked non-core nodes are located in the method AST subtree, and each node is deleted from the list of child nodes of its parent node one by one. At the same time, the parent and child references of the non-core nodes are cleared to obtain the method AST subtree after removing the non-core nodes. Here, the parent node can be the parent node of a certain node.

[0053] The logical verification result of the method AST subtree can be the result of whether the current method AST subtree passes the logical verification.

[0054] For example, taking the QR code payment method scenario, the atomic operation logic chain corresponding to the method AST subtree is "user authentication, amount parsing, risk control verification, and transaction result return". The subtree after removing non-core nodes is verified to check whether it contains user authentication node, amount parsing node, risk control verification node and transaction result return node. If all are contained, it is determined that the verification is passed; otherwise, it is determined that the verification is failed.

[0055] The reference AST subtree can be an AST subtree that meets the requirements of atomic operation logic after logical verification.

[0056] For example, the method AST subtree whose logical verification result is passed can be used as the reference AST subtree.

[0057] The above solution reduces redundant information interference by accurately identifying and eliminating non-core nodes, while ensuring the integrity of core business logic through atomic operation logic verification, laying the foundation for generating high-quality training samples and improving the relevance and effectiveness of the sample data.

[0058] Furthermore, to clarify how to determine the reference AST subtree and ensure that the generated reference AST subtree is more standardized, the reference AST subtree is determined based on the logical verification results of the AST subtrees from each method, including:

[0059] Step c1: Determine the AST subtrees that pass the logical verification results of each method's AST subtree as candidate AST subtrees.

[0060] Step c2: Determine the number of lines of code for each candidate AST subtree after it has been converted into code data.

[0061] Step c3: Determine the reference AST subtree based on the number of lines of code corresponding to each candidate AST subtree.

[0062] Among them, the candidate AST subtree can be a method AST subtree that has passed the logic verification and has complete atomic operation logic.

[0063] Here, the number of lines of code can be the total number of lines of code after the candidate AST subtree is converted into executable code according to the syntax rules. The syntax rules can be the rules followed in converting various nodes in the candidate AST subtree into executable code text that conforms to the syntax of the programming language according to the formal syntax specifications of that language.

[0064] For example, by using an AST to code conversion tool, the two candidate AST subtrees were converted into executable code respectively. The code count for the first subtree was 22 lines and the code count for the second subtree was 55 lines.

[0065] For example, candidate AST subtrees that meet a threshold can be used as reference AST subtrees. The threshold can be preset by relevant technical personnel according to actual needs. For instance, if the threshold is set to 30 lines, candidate AST subtrees with fewer than 30 lines of code can all be used as reference AST subtrees.

[0066] The above scheme ensures that the reference AST subtrees meet the requirements of atomic operation scale while maintaining a certain number of lines of code by filtering candidate AST subtrees that pass the logical verification and distinguishing them based on a preset line number range, thereby improving the efficiency and effectiveness of subsequent model training.

[0067] Furthermore, to clarify the generation method of the reference AST subtree and improve the accuracy of determining the reference AST subtree, in an optional embodiment, the reference AST subtree is determined based on the number of lines of code corresponding to each candidate AST subtree, including:

[0068] Step d1: For any candidate AST subtree, if the number of lines of code in the candidate AST subtree is within the preset range of lines of code, then the candidate AST subtree is determined as the reference AST subtree.

[0069] Step d2: If the number of lines of code in the candidate AST subtree is greater than the upper limit of the range of lines of code, then the candidate AST subtree is split according to the functional boundary node of the candidate AST subtree to obtain at least one candidate AST split subtree, and each candidate AST split subtree is determined as a reference AST subtree.

[0070] Step d3: If the number of lines of code in the candidate AST subtree is less than the lower limit of the range of lines of code, then according to the atomic operation logic rules of the candidate AST subtree, code completion is performed on the candidate AST subtree, and the candidate AST subtree with completed code is determined as the reference AST subtree.

[0071] The candidate AST subtree can be the method AST subtree that has passed the logical verification. The preset range of code lines can be a range pre-defined by relevant technical personnel.

[0072] For example, all candidate AST subtrees that meet the preset range of lines of code can be identified as reference AST subtrees. For instance, if the preset range of lines of code is set to 10-50 lines, and the candidate AST subtree has 30 lines of code, then the candidate AST subtree can be a reference AST subtree.

[0073] Among them, functional boundary nodes can be nodes in the AST subtree that distinguish different core functions, such as user authentication nodes, risk control verification nodes, and amount verification nodes. Candidate AST split subtrees can be candidate AST subtrees whose line count falls within a preset range after splitting by functional boundaries.

[0074] For example, if the preset code line count range is set to 10-50 lines, and the code line count of the candidate AST subtree is 65 lines, which exceeds the upper limit of 50 lines, and its functional boundary nodes are the user authentication node and the risk control verification node, and the code line count of the candidate AST subtree corresponding to the user authentication node is 28 lines and the code line count of the candidate AST subtree corresponding to the risk control verification node is 32 lines, then both candidate AST subtrees can be determined as reference AST subtrees.

[0075] For example, if the preset code line count range is set to 10-50 lines, and the code line count of a candidate AST subtree is 8 lines, which is below the lower limit of 10 lines, then the code lines are supplemented according to the atomic operation logic rules. After completion, the code line count is 22 lines, and the completed candidate AST subtree is determined as the reference AST subtree. The code completion logic can be based on the atomic operation logic rules of the candidate AST subtree. First, it analyzes the currently missing atomic operation steps in the subtree, then matches a general completion template preset by relevant technical personnel, and supplements the AST node corresponding to the missing step to the corresponding position in the original candidate AST subtree.

[0076] The above scheme splits or completes the candidate AST subtrees according to a preset row number interval, ensuring that the size of the reference AST subtree is adapted to the atomic operation requirements. This avoids both logical redundancy and incompleteness of the candidate AST subtrees, thus improving the standardization of the sample data.

[0077] The atomic core business link can be the core business process link corresponding to the reference AST subtree. Semantic purification operations can include removing non-core semantic nodes, reorganizing the order of core semantic nodes, and supplementing missing nodes in the link. The target AST subtree can be the AST subtree obtained after semantic purification operations on the reference AST subtree.

[0078] For example, if the atomic core business links of the reference AST subtree corresponding to the QR code payment business are "user authentication, amount parsing, risk control verification, and transaction result return", the subtree is semantically purified, non-core semantic nodes such as temporary variable definitions are removed, the nodes are reorganized according to the core link order, and missing nodes are supplemented to obtain the target AST subtree.

[0079] The risk level assessment involves determining the risk level of the target AST subtree based on the type and number of rules in the financial anti-pattern rule base that it matches. The financial anti-pattern rule base can be pre-defined by relevant technical personnel according to actual needs. For example, it could include rules on sensitive information leakage, flawed fund clearing logic, unauthorized account permissions, and non-standard transaction log formats. The risk level assessment result can be either low or high risk. Pre-defined remediation dimensions can be remediation directions for different risk types, such as sensitive information desensitization, missing logic completion, and enhanced permission verification. The remediated target AST subtree can be an AST subtree that meets financial compliance requirements after automatic remediation or manual review and correction.

[0080] For example, the financial anti-pattern rule base can store the risk levels corresponding to the rules. For instance, sensitive information leakage corresponds to low risk, while account permission overreach corresponds to high risk. If a certain threshold number of low-risk rules are met simultaneously, the target AST subtree is judged to be high-risk. For example, a target AST subtree that meets three low-risk rules is considered high-risk. Specifically, the risk level of the target AST subtree is assessed. If it is found to have a rule indicating non-standard transaction flow format, it is judged to be low-risk. Compliance verification and anomaly handling nodes are then added to eliminate the low-risk issue of non-standard format, resulting in a repaired target AST subtree.

[0081] The preset sample label values ​​can be a set of labels used to annotate the attributes of the target business code sample data, including business scenarios, core functions, compliance status, line count, etc. The target business code sample data can be the executable code converted from the repaired target AST subtree, and the standardized training sample data with added sample label values.

[0082] For example, the repaired target AST subtree is converted into executable code, and corresponding business scenarios such as QR code payment service, core function: user authentication, compliance status: compliant, and line number: 22 are added to generate target business code sample data. This sample data is then input into the business coding model for fine-tuning and training to optimize the model parameters.

[0083] The technical solution of this invention obtains financial business description data to be encoded; inputs the financial business description data to be encoded into a pre-trained business encoding model to obtain financial business encoding data output by the business encoding model. The business encoding model is trained based on target business code sample data, which is generated based on at least one method abstract syntax tree (AST) subtree corresponding to the target AST subtree and preset sample label values; each method AST subtree is obtained by structuring the pre-acquired original business code sample data. This technical solution can accurately capture the syntactic logic and business characteristics of financial business codes, significantly improving the accuracy and consistency of business encoding; simultaneously, by leveraging the structuring processing of business codes using AST subtrees, the business encoding model can deeply understand different financial businesses, avoiding subjective biases and omissions that are prone to occur in manual encoding, and significantly improving the efficiency of processing financial business codes.

[0084] Example 2

[0085] Figure 2 This is a flowchart of a financial business coding method provided in Embodiment 2 of the present invention. This embodiment optimizes and improves upon the above-mentioned technical solutions. The step "traversing nodes of the AST structured data to generate at least one method AST subtree" is refined to "traversing and extracting global dimension nodes from the AST root node in the AST structured data, traversing and extracting field nodes under class nodes from the AST root node in the AST structured data, determining core field nodes based on preset field validation rules, traversing and extracting method nodes from the AST root node in the AST structured data to obtain core method nodes, establishing mapping relationships between the core method nodes and the core field nodes and the global dimension nodes respectively, and generating at least one method AST subtree with a complete context core method node based on the mapping relationship." This improves the process of determining the business coding model.

[0086] It should be noted that for parts not described in detail in the embodiments of the present invention, please refer to the descriptions in other embodiments. For example... Figure 2 As shown, the method includes the following specific steps:

[0087] S201. In response to the model training request for the business coding model in the online financial business scenario, obtain the original business code sample data for training the business coding model.

[0088] S202. Perform a structured transformation on the original business code sample data to obtain AST structured data, and extract global dimension nodes from the AST root node in the AST structured data.

[0089] Global dimension nodes include package declaration nodes and import declaration nodes.

[0090] S203. Traverse the root node of the AST structured data to extract the field nodes under the class nodes, and determine the core field nodes based on the preset field validation rules.

[0091] S204. Extract method nodes from the root node of the AST structured data to obtain the core method nodes.

[0092] S205. Establish the mapping relationship between the core method node and the core field node and the global dimension node respectively, and generate at least one method AST subtree with a core method node having a complete context based on the mapping relationship.

[0093] S206. Identify non-core nodes in each method's AST subtree, remove the identified non-core nodes, and perform a complete atomic operation logic verification on the method's AST subtree after removing non-core nodes. Based on the logic verification results, generate the reference AST subtree corresponding to each method's AST subtree.

[0094] S207. Based on the atomic business core links corresponding to each reference AST subtree, perform semantic purification operations on each reference AST subtree to obtain the target AST subtree corresponding to each reference AST subtree.

[0095] S208. Determine the risk level of each target AST subtree, and based on the risk level determination result, repair the corresponding target AST subtree from at least one preset repair dimension to obtain the repaired target AST subtree.

[0096] S209. Based on each repaired target AST subtree, generate target business code sample data based on preset sample label values, and use the target business code sample data to train the business coding model.

[0097] S210. Obtain the description data of the financial business to be encoded.

[0098] S211. Input the financial business description data to be encoded into the pre-trained business encoding model to obtain the financial business encoding data output by the business encoding model.

[0099] The business coding model is trained based on target business code sample data, and the target business code sample data is generated based on the target AST subtree corresponding to at least one method abstract syntax tree (AST) subtree and the preset sample label values. Each method AST subtree is obtained by structuring the pre-acquired original business code sample data.

[0100] The root node of the AST can be the top-level node of the AST structure. Global dimension nodes can be nodes in the AST subtree that provide global dependency support; for example, global dimension nodes include package declaration nodes and import declaration nodes.

[0101] For example, the original business code sample data is parsed into AST structured data according to the target programming language syntax. Then, the global dimension nodes of package declarations and import declarations are extracted by traversing the root node of the AST. For instance, converting the original code of bank QR code payment into AST structured data yields package declaration nodes, import declaration nodes, etc., under its AST root node. Package declaration nodes and import declaration nodes are extracted from the root node to form a global dimension node set. The global dimension node set can be a collection of global dimension nodes.

[0102] Here, field nodes can be variable nodes defined under class nodes in AST structured data, such as payment amount, user name, etc. Preset field validation rules can be rules for filtering core business fields. Core field nodes are those field nodes that, after being filtered by the field validation rules, play a crucial role in the execution of core business logic.

[0103] For example, after traversing all field nodes from the AST root node, each field node is checked one by one to see if it matches the preset rules: first, the field attributes, such as the type, are verified to be core business types; then, the business keywords in the field name are matched, such as financial core identifiers like amount, account, and transaction history; at the same time, redundant fields, such as temporary variables and log fields, are excluded; finally, the field nodes that meet all the verification conditions are determined as core field nodes.

[0104] In this context, method nodes can be the nodes corresponding to business methods defined under class nodes in AST structured data. Core method nodes can be the method nodes that implement the core functions of online financial services.

[0105] For example, after traversing all method nodes from the root node of the AST, non-core methods are first filtered out. For example, empty methods and utility methods used only for auxiliary functions such as log printing or format conversion are identified and removed. Then, core methods are determined according to preset rules. For example, it is verified whether the method contains core business logic nodes such as transaction processing and amount calculation, and whether it involves reading and writing core fields to determine it as a core method node.

[0106] The mapping relationship can be the association between core method nodes, core field nodes, and global dimension nodes. The method AST subtree with a core method node and a complete context can be a subtree structure containing the core method node, associated core field nodes, and global dimension nodes, possessing an independent business execution context.

[0107] For example, first, sort out the relationship between core method nodes and core field nodes, such as whether core methods read or write core fields, and the relationship between core method nodes and global dimension nodes, such as the package declaration of the core method and the import declaration of dependencies. Then, embed the relationship information into the AST subtree of the core method node, supplement the definition reference of the core field node and the context dependency of the global dimension, and finally generate the core method AST subtree containing complete fields and global context.

[0108] Furthermore, to accurately extract core semantic features and ensure the logical integrity of the AST subtrees, in an optional embodiment, semantic extraction is performed on each reference AST subtree according to the atomic business core links corresponding to each reference AST subtree, resulting in the target AST subtree corresponding to each reference AST subtree, including:

[0109] Step e1: For any reference AST subtree, traverse the child nodes of the reference AST subtree and extract the child node attribute information of each child node.

[0110] Step e2: Determine the semantic tags of each child node based on the child node attribute information.

[0111] Step e3: Based on the node semantic labels of each child node and the preset non-core semantic rules, remove the non-core semantic child nodes from the reference AST subtree to obtain the reference AST subtree with the non-core semantic child nodes removed.

[0112] Step e4: Perform syntactic integrity verification on the reference AST subtrees that have removed non-core semantic child nodes, and determine the target AST subtrees corresponding to each reference AST subtree based on the verification results.

[0113] In this context, the child nodes of an AST subtree can be nodes at various levels under the core method node in the reference AST subtree. Node attribute information can describe the function and characteristics of the child node, such as method name, conditional expression, variable purpose, parameter type, etc.

[0114] For example, traverse the child nodes of the reference AST subtree, including method call nodes, conditional branch nodes, variable assignment nodes, etc., and extract the attribute information of each node, such as the method name being payment function, the conditional expression being payment amount greater than risk control threshold, etc.

[0115] Among them, the semantic tags of child nodes can be tags that describe the core functions of the node, based on the node attribute information.

[0116] For example, the type, operation content, associated fields, and other attributes of the child nodes of the reference AST subtree are extracted, and semantic tags are defined by relevant technical personnel. For example, if a condition judgment node is judged and the judgment content is that the account balance is less than 0, then the node is labeled with the semantic tag of balance anomaly verification.

[0117] Among them, the preset non-core semantic rules can be rules that define non-core semantic categories. The removal of child nodes with non-core semantics can be an operation that removes nodes with non-core semantic labels from the reference AST subtree.

[0118] For example, if the preset non-core semantic rules are: temporary variable definition, non-compliant log printing, debugging statements, and marketing-related nodes are non-core semantic nodes, according to these rules, nodes with the label of temporary variable definition and nodes with the label of non-compliant log printing can be removed from the reference AST subtree to obtain a reference AST subtree with non-core semantic subtrees removed.

[0119] Among them, integrity verification can be a verification process to check whether there are syntax breakpoints or missing core link nodes in the reference AST subtree after removing non-core semantic child nodes.

[0120] For example, the reference AST subtree after removing non-core semantic child nodes is verified. If it is found that after removing variable nodes, there are no core variable reference breakpoints, but risk control result judgment nodes are missing, then risk control result judgment nodes are added to ensure the integrity of the link and it is determined to be the target AST subtree.

[0121] The above technical solution extracts node attribute information, assigns semantic labels, removes non-core semantic nodes, and performs integrity checks to accurately purify core business semantics, generate target AST subtrees, remove redundant interference while ensuring the syntactic and logical integrity of the subtrees, and further improve the quality and effectiveness of training samples.

[0122] This invention refines the node extraction logic of AST structured data, extracting global dimension nodes, core field nodes, and core method nodes, establishing corresponding mapping relationships, and generating method AST subtrees with complete context. This ensures that the subtrees have the ability to independently execute core business logic, avoiding invalid sample data due to missing context. At the same time, semantic purification operations accurately preserve core semantics, improving the purity and relevance of sample data. Ultimately, this enables the business coding model to more accurately capture the core logic of financial business, generating more compliant and reliable business code, thereby improving the training accuracy of the business coding model.

[0123] Example 3

[0124] Figure 3 This is a flowchart of a financial business coding method provided in Embodiment 3 of the present invention. Based on the above embodiments, this embodiment provides a preferred example.

[0125] S301. In response to the model training request for the business coding model in the online financial business scenario, obtain the original business code sample data for training the business coding model, perform a structured transformation on the original business code sample data to obtain AST structured data, and extract global dimension nodes from the AST root node in the AST structured data.

[0126] Global dimension nodes include package declaration nodes and import declaration nodes.

[0127] S302. Traverse the root node of the AST structured data to extract the field nodes under the class nodes, and determine the core field nodes based on the preset field validation rules. Traverse the root node of the AST structured data to extract the method nodes to obtain the core method nodes.

[0128] S303. Establish the mapping relationship between the core method node and the core field node and the global dimension node respectively, and generate at least one method AST subtree with a core method node having a complete context based on the mapping relationship.

[0129] S304. Traverse the child nodes of each method AST subtree, and based on the preset inner class identification rules, determine the inner class nodes and redundant nested method nodes, and identify the inner class nodes and redundant nested method nodes as non-core nodes. Remove the non-core nodes from each method AST subtree to obtain the method AST subtree after removing the non-core nodes.

[0130] S305. Based on the atomic operation logic link corresponding to each method AST subtree, perform complete atomic operation logic verification respectively to obtain the logic verification result of each method AST subtree. Determine the method AST subtree that passes the verification in the logic verification result of each method AST subtree as a candidate AST subtree, and determine the number of lines of code after converting each candidate AST subtree into code data.

[0131] S306. Determine the relationship between the number of lines of code in any candidate AST subtree and the range of lines of code. If the number of lines of code in the candidate AST subtree is within the preset range of lines of code, proceed to step S307. If the number of lines of code in the candidate AST subtree is greater than the upper limit of the range of lines of code, proceed to step S308. If the number of lines of code in the candidate AST subtree is less than the lower limit of the range of lines of code, proceed to step S309.

[0132] S307. The candidate AST subtree is determined as the reference AST subtree.

[0133] S308. Based on the functional boundary nodes of the candidate AST subtree, split the candidate AST subtree to obtain at least one candidate AST split subtree, and determine each candidate AST split subtree as a reference AST subtree.

[0134] S309. Based on the atomic operation logic rules of the candidate AST subtree, complete the code of the candidate AST subtree, and determine the candidate AST subtree after code completion as the reference AST subtree.

[0135] S310. For any reference AST subtree, traverse the child nodes of the reference AST subtree and extract the child node attribute information of each child node. Based on the child node attribute information, determine the node semantic label of each child node.

[0136] S311. Based on the node semantic labels of each child node and the preset non-core semantic rules, remove the non-core semantic child nodes from the reference AST subtree to obtain the reference AST subtree with the non-core semantic child nodes removed.

[0137] S312. Perform syntactic integrity verification on the reference AST subtrees that have removed non-core semantic child nodes, and determine the target AST subtrees corresponding to each reference AST subtree based on the verification results.

[0138] S313. Determine the risk level of each target AST subtree, and based on the risk level determination result, repair the corresponding target AST subtree from at least one preset repair dimension to obtain the repaired target AST subtree.

[0139] S314. Based on each repaired target AST subtree, generate target business code sample data based on preset sample label values, and use the target business code sample data to train the business coding model.

[0140] S315. Obtain the description data of the financial business to be coded.

[0141] S316. Input the financial business description data to be encoded into the pre-trained business encoding model to obtain the financial business encoding data output by the business encoding model.

[0142] The business coding model is trained based on target business code sample data, and the target business code sample data is generated based on the target AST subtree corresponding to at least one method abstract syntax tree (AST) subtree and the preset sample label values. Each method AST subtree is obtained by structuring the pre-acquired original business code sample data.

[0143] The information collected in the above embodiments of the present invention is all information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.

[0144] Example 4

[0145] Figure 4 This is a schematic diagram of a financial business coding device provided in Embodiment 4 of the present invention. The financial business coding device provided in this embodiment of the present invention is applicable to scenarios in the financial technology field for training business coding models. This financial business coding device can be implemented in hardware and / or software, and can be applied to a financial business coding method. Specifically, it can be configured in a controller, such as... Figure 4 As shown, the device includes: a financial business description data acquisition module 401 and a financial business code data output module 402. Wherein:

[0146] The financial business description data acquisition module 401 is used to acquire the financial business description data to be encoded.

[0147] The financial business coding data output module 402 is used to input the financial business description data to be encoded into a pre-trained business coding model to obtain the financial business coding data output by the business coding model. The business coding model is trained based on target business code sample data, which is generated based on at least one method abstract syntax tree (AST) subtree corresponding to a target AST subtree and preset sample label values. Each method AST subtree is obtained by structuring the pre-acquired original business code sample data.

[0148] The technical solution of this invention obtains financial business description data to be encoded; inputs the financial business description data to be encoded into a pre-trained business encoding model to obtain financial business encoding data output by the business encoding model. The business encoding model is trained based on target business code sample data, which is generated based on at least one method abstract syntax tree (AST) subtree corresponding to the target AST subtree and preset sample label values; each method AST subtree is obtained by structuring the pre-acquired original business code sample data. This technical solution can accurately capture the syntactic logic and business characteristics of financial business codes, significantly improving the accuracy and consistency of business encoding; simultaneously, by leveraging the structuring processing of business codes using AST subtrees, the business encoding model can deeply understand different financial businesses, avoiding subjective biases and omissions that are prone to occur in manual encoding, and significantly improving the efficiency of processing financial business codes.

[0149] Optionally, the device further includes:

[0150] The sample data acquisition module is used to respond to model training requests for business coding models in online financial business scenarios and to acquire original business code sample data for training the business coding models.

[0151] The method AST subtree generation module is used to perform structured transformation on the original business code sample data to obtain AST structured data, and to perform node traversal on the AST structured data to generate at least one method AST subtree.

[0152] The reference AST subtree generation module is used to identify non-core nodes in each method's AST subtree, remove the identified non-core nodes, perform complete atomic operation logic verification on the method's AST subtree after removing non-core nodes, and generate the corresponding reference AST subtree for each method's AST subtree based on the logic verification results.

[0153] The target AST subtree generation module is used to perform semantic purification operations on each reference AST subtree according to the atomic business core links corresponding to each reference AST subtree, so as to obtain the target AST subtree corresponding to each reference AST subtree.

[0154] The module for generating the repaired target AST subtree is used to determine the risk level of each target AST subtree and, based on the risk level determination result, repair the corresponding target AST subtree from at least one preset repair dimension to obtain the repaired target AST subtree.

[0155] The model training module is used to generate target business code sample data based on preset sample label values ​​from each repaired target AST subtree, and to train the business coding model using the target business code sample data.

[0156] Optionally, refer to the AST subtree generation module, including:

[0157] The non-core node determination unit traverses the child nodes of each method's AST subtree and, based on preset internal class identification rules, determines internal class nodes and redundant nested method nodes, and identifies internal class nodes and redundant nested method nodes as non-core nodes.

[0158] The method AST subtree generation unit removes non-core nodes from each method AST subtree to obtain the method AST subtree after removing non-core nodes.

[0159] The logic verification unit performs complete atomic operation logic verification based on the atomic operation logic links corresponding to each method's AST subtree, and obtains the logic verification results of each method's AST subtree.

[0160] The reference AST subtree determination unit determines the reference AST subtree based on the logical verification results of the AST subtrees of each method.

[0161] Optionally, the unit is determined by referring to the AST subtree, including:

[0162] Candidate AST subtrees are determined by identifying the sub-units that pass the logical verification of each method's AST subtree.

[0163] The code line count determines the sub-unit, which determines the code line count of each candidate AST subtree after it has been converted into code data.

[0164] The reference AST subtree is used to determine the sub-unit. The reference AST subtree is determined based on the number of lines of code corresponding to each candidate AST subtree.

[0165] Optionally, refer to the AST subtree to determine the sub-unit, specifically used for:

[0166] For any candidate AST subtree, if the number of lines of code in the candidate AST subtree is within the preset range of lines of code, then the candidate AST subtree is determined as the reference AST subtree.

[0167] If the number of lines of code in the candidate AST subtree is greater than the upper limit of the range of lines of code, then the candidate AST subtree is split according to the functional boundary node of the candidate AST subtree to obtain at least one candidate AST split subtree, and each candidate AST split subtree is determined as a reference AST subtree.

[0168] If the number of lines of code in the candidate AST subtree is less than the lower limit of the range of lines of code, then the candidate AST subtree is completed according to the atomic operation logic rules of the candidate AST subtree, and the candidate AST subtree with completed code is determined as the reference AST subtree.

[0169] Optional, the AST subtree generation module is specifically used for:

[0170] Extract global dimension nodes from the root node of the AST structured data; global dimension nodes include package declaration nodes and import declaration nodes.

[0171] The system extracts field nodes under class nodes by traversing the root node of the AST structured data, and determines the core field nodes based on preset field validation rules.

[0172] Extract method nodes from the root node of the AST structured data to obtain the core method nodes.

[0173] Establish mapping relationships between core method nodes and core field nodes and global dimension nodes respectively, and generate at least one method AST subtree with a core method node and a complete context based on the mapping relationships.

[0174] Optional, the target AST subtree generation module is specifically used for:

[0175] For any reference AST subtree, traverse the child nodes of the reference AST subtree and extract the child node attribute information of each child node.

[0176] Based on the attribute information of the child nodes, determine the node semantic label of each child node.

[0177] Based on the semantic labels of each child node, and according to the preset non-core semantic rules, the non-core semantic child nodes of the reference AST subtree are removed to obtain the reference AST subtree with the non-core semantic child nodes removed.

[0178] Syntactic integrity checks are performed on the reference AST subtrees that have removed non-core semantic child nodes, and the target AST subtrees corresponding to each reference AST subtree are determined based on the check results.

[0179] The financial business coding device provided in this embodiment of the invention can execute a financial business coding method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0180] Example 5

[0181] Figure 5 A schematic diagram of an electronic device 50 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0182] like Figure 5 As shown, the electronic device 50 includes at least one processor 51 and a memory, such as a read-only memory (ROM) 52 and a random access memory (RAM) 53, communicatively connected to the at least one processor 51. The memory stores computer programs executable by the at least one processor. The processor 51 can perform various appropriate actions and processes based on the computer program stored in the ROM 52 or loaded from storage unit 58 into the RAM 53. The RAM 53 can also store various programs and data required for the operation of the electronic device 50. The processor 51, ROM 52, and RAM 53 are interconnected via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0183] Multiple components in electronic device 50 are connected to I / O interface 55, including: input unit 56, such as keyboard, mouse, etc.; output unit 57, such as various types of monitors, speakers, etc.; storage unit 58, such as disk, optical disk, etc.; and communication unit 59, such as network card, modem, wireless transceiver, etc. Communication unit 59 allows electronic device 50 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0184] Processor 51 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 51 performs the various methods and processes described above, such as a financial business coding method.

[0185] In some embodiments, a financial transaction encoding method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 50 via ROM 52 and / or communication unit 59. When the computer program is loaded into RAM 53 and executed by processor 51, one or more steps of the financial transaction encoding method described above may be performed. Alternatively, in other embodiments, processor 51 may be configured as a financial transaction encoding method by any other suitable means (e.g., by means of firmware).

[0186] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0187] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0188] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0189] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0190] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0191] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0192] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0193] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method of encoding financial transactions, characterized by, include: Obtain the description data of the financial business to be encoded; The financial business description data to be encoded is input into a pre-trained business encoding model to obtain the financial business encoding data output by the business encoding model. The business coding model is trained based on target business code sample data, and the target business code sample data is generated based on the target AST subtree corresponding to at least one method abstract syntax tree (AST) subtree and preset sample label values. Each of the methods described above uses an AST subtree obtained by structuring the pre-acquired original business code sample data.

2. The method according to claim 1, characterized in that, Before inputting the financial business description data to be encoded into the pre-trained business encoding model to obtain the financial business encoding data output by the business encoding model, the method further includes: In response to a model training request for a business coding model in a network financial business scenario, original business code sample data for training the business coding model is obtained. The original business code sample data is structurally transformed to obtain AST structured data, and the nodes of the AST structured data are traversed to generate at least one method AST subtree. Non-core nodes are identified in each of the method AST subtrees. The identified non-core nodes are removed. The method AST subtrees after removing non-core nodes are subjected to complete atomic operation logic verification. Based on the logic verification results, reference AST subtrees corresponding to each of the method AST subtrees are generated. Based on the atomic service core links corresponding to each of the reference AST subtrees, semantic purification operations are performed on each of the reference AST subtrees to obtain the target AST subtrees corresponding to each of the reference AST subtrees. The risk level of each target AST subtree is determined, and based on the risk level determination result, the corresponding target AST subtree is repaired from at least one preset repair dimension to obtain the repaired target AST subtree. Based on the repaired target AST subtrees, target business code sample data is generated based on preset sample label values, and the business coding model is trained using the target business code sample data.

3. The method according to claim 2, characterized in that, Non-core nodes are identified in each of the method AST subtrees. These identified non-core nodes are then removed. A complete atomic operation logic verification is performed on the method AST subtree after removing non-core nodes. Based on the logic verification results, a reference AST subtree corresponding to each of the method AST subtrees is generated, including: Traverse the child nodes of each method AST subtree, and determine the inner class nodes and redundant nested method nodes based on the preset inner class identification rules, and determine the inner class nodes and the redundant nested method nodes as non-core nodes; Remove the non-core nodes from each of the method AST subtrees to obtain the method AST subtree after removing the non-core nodes; Based on the atomic operation logic link corresponding to each method AST subtree, complete atomic operation logic verification is performed to obtain the logic verification result of each method AST subtree; Based on the logical verification results of the AST subtrees of each method, the reference AST subtree is determined.

4. The method according to claim 3, characterized in that, The step of determining the reference AST subtree based on the logical verification results of each of the method's AST subtrees includes: The method AST subtrees that pass the logical verification results of each method AST subtree are determined as candidate AST subtrees; Determine the number of lines of code for each candidate AST subtree after it has been converted into code data; The reference AST subtree is determined based on the number of lines of code corresponding to each of the candidate AST subtrees.

5. The method according to claim 4, characterized in that, Based on the line number of each candidate AST subtree, a reference AST subtree is determined, including: For any candidate AST subtree, if the number of lines of code in the candidate AST subtree is within the preset range of lines of code, then the candidate AST subtree is determined as the reference AST subtree. If the number of lines of code in the candidate AST subtree is greater than the upper limit of the range of the number of lines of code, then the candidate AST subtree is split according to the functional boundary node of the candidate AST subtree to obtain at least one candidate AST split subtree, and each candidate AST split subtree is determined as a reference AST subtree. If the number of lines of code in the candidate AST subtree is less than the lower limit of the range of the number of lines of code, then the candidate AST subtree is completed according to the atomic operation logic rules of the candidate AST subtree, and the candidate AST subtree with completed code is determined as the reference AST subtree.

6. The method according to claim 2, characterized in that, The step of traversing the nodes of the AST structured data to generate at least one method AST subtree includes: Global dimension nodes are extracted by traversing the root node of the AST structured data; the global dimension nodes include package declaration nodes and import declaration nodes; and... The system iterates through the root node of the AST structured data to extract field nodes under class nodes, and determines core field nodes based on preset field validation rules; and, Extract method nodes from the root node of the AST structured data to obtain the core method nodes; Establish mapping relationships between the core method nodes and the core field nodes and the global dimension nodes respectively, and based on the mapping relationships, generate at least one method AST subtree with a core method node having a complete context.

7. The method according to claim 2, characterized in that, The step of performing semantic purification on each reference AST subtree according to the atomic service core link corresponding to each reference AST subtree to obtain the target AST subtree corresponding to each reference AST subtree includes: For any reference AST subtree, traverse the child nodes of the reference AST subtree and extract the child node attribute information of each child node; Based on the child node attribute information, determine the node semantic label of each child node; Based on the node semantic labels of each child node, and based on preset non-core semantic rules, the non-core semantic child nodes of the reference AST subtree are removed to obtain the reference AST subtree with the non-core semantic child nodes removed. Syntactic integrity checks are performed on the reference AST subtrees that have removed non-core semantic child nodes, and the target AST subtrees corresponding to each reference AST subtree are determined based on the check results.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the financial business coding method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the financial business coding method according to any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the financial business coding method according to any one of claims 1-7.