Tree entity object free conversion method and system and readable storage medium
By using metadata management and transformation engines in the transaction accounting platform, combined with batch loading and caching mechanisms, the free mapping from business documents to accounting transactions is realized, solving the problems of high complexity and performance requirements, and improving the flexibility and efficiency of transformation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-03-10
AI Technical Summary
In the transaction accounting platform, the existing technology cannot achieve free mapping from business documents to accounting transactions and from accounting transactions to transaction entries. As a result, the conversion between core business models requires manual maintenance, and the problems of high complexity and high performance requirements have not been effectively solved.
The metadata management module obtains the metadata definition of the business model, receives user-defined conversion rules, generates standard conversion templates using conversion template algorithms, including entity mapping rules, field mapping rules, and file penetration rules, and realizes the conversion of the source entity multi-branch tree data structure to the target entity multi-branch tree data structure through the conversion engine, and optimizes performance by combining batch loading and caching mechanisms.
It achieves metadata-driven free mapping, which can handle complex structures, improves flexibility, avoids hard coding, quickly responds to changes in business models, and improves processing speed and performance.
Smart Images

Figure CN121636596A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a tree-shaped entity object free conversion method and system and a readable storage medium. BACKGROUND
[0002] In order to realize the free mapping function from business documents to accounting transactions and from accounting transactions to transaction journal entries, the transaction accounting middle platform needs this function component. Without this function component, a large number of core business models need to be manually maintained, which will generate a large number of independent codes and cannot be deployed online, and the hierarchical structure between models is mostly a multi-fork tree structure, which has high conversion complexity and high performance requirements and cannot be solved by a complete technical solution. SUMMARY
[0003] The present application aims to solve or improve the above technical problems.
[0004] To this end, the first object of the present application is to provide a tree-shaped entity object free conversion method.
[0005] The second object of the present application is to provide a tree-shaped entity object free conversion system.
[0006] The third object of the present application is to provide a tree-shaped entity object free conversion system.
[0007] The fourth object of the present application is to provide a readable storage medium.
[0008] In order to achieve the first object of the present application, the technical solution of the first aspect of the present application provides a tree-shaped entity object free conversion method, comprising: obtaining the metadata definition of a business model through a metadata management module, the business model comprising a source entity object and a target entity object, the source entity object comprising a source entity multi-fork tree data structure; receiving a user-defined conversion rule through a configuration interface, converting the conversion rule into a standard conversion template through a conversion template algorithm, the standard conversion template comprising: an entity mapping rule, a field mapping rule and an archive penetration rule; converting the source entity multi-fork tree data structure into a target entity multi-fork tree data structure through a conversion engine.
[0009] According to the tree entity object free conversion method provided in the application, first, the metadata definition of a business model is obtained through a metadata management module, the business model comprising a source entity object and a target entity object, and the source entity object comprising a source entity multi-way tree data structure. Then, a user-defined conversion rule is received through a configuration interface, and the conversion rule is converted into a standard conversion template through a conversion template algorithm, the standard conversion template comprising an entity mapping rule, a field mapping rule and an archive penetration rule. The entity mapping rule is used to define the corresponding relationship between the source entity node and the target entity node, the field mapping rule is used to define the conversion logic of the source field and the target field, and the conversion logic comprises direct assignment, formula calculation, fixed value setting and archive association penetration. Finally, the source entity multi-way tree data structure is converted into a target entity multi-way tree data structure through a conversion engine to obtain the target entity object. The free mapping based on the metadata driving is realized through the configuration, the conversion scheme of the matter accounting middle platform is unified, the user can control the free conversion of the entity through the configuration connection, the complex structure can be processed, the conversion logic is realized through the metadata driving and the visual configuration, the traditional hard coding mode is avoided, the flexibility is improved, and the change of the business model can be quickly responded.
[0010] In some technical solutions, before the source entity multi-way tree data structure is converted into the target entity multi-way tree data structure through the conversion engine, the method further comprises: loading the source entity object data into the memory in batches according to rows through a batch loading module; and establishing a cache for the archive data through a cache module.
[0011] In the technical solution, before the source entity multi-way tree data structure is converted into the target entity multi-way tree data structure through the conversion engine, the method further comprises loading the source entity object data into the memory in batches according to rows through a batch loading module. The archive data is cached through a cache module. The source entity object data is loaded into the memory in batches according to rows through the batch loading module. This reduces the frequent I / O operation and greatly improves the processing speed. When the archive penetration is performed, the data is directly obtained from the memory cache, and the overhead of repeated database queries is avoided.
[0012] In some technical solutions, the source entity multi-way tree data structure is converted into the target entity multi-way tree data structure through the conversion engine, comprising: parsing and loading the standard conversion template; traversing the source entity multi-way tree data structure, and constructing and outputting the target entity multi-way tree data structure according to the entity mapping rule, the field mapping rule and the archive penetration rule.
[0013] In the technical solution, the source entity multi-way tree data structure is converted into the target entity multi-way tree data structure by the conversion engine. Specifically, a standard conversion template is parsed and loaded first. Then the source entity multi-way tree data structure is traversed, and the target entity multi-way tree data structure is constructed and output according to the entity mapping rule, the field mapping rule and the archive penetration rule, so as to obtain the target entity object.
[0014] In some technical solutions, the target entity multi-way tree data structure is constructed and output according to the entity mapping rule, the field mapping rule and the archive penetration rule, including: locating or creating a corresponding target entity node according to the entity mapping rule; performing conversion logic on the fields of each node according to the field mapping rule, wherein for an archive association penetration request, the cache module is called to obtain an associated archive attribute value; and the target entity multi-way tree data structure is constructed and output according to the structure processing rule.
[0015] In the technical solution, the target entity multi-way tree data structure is constructed and output according to the entity mapping rule, the field mapping rule and the archive penetration rule. Specifically, a corresponding target entity node is located or created according to the entity mapping rule. Then conversion logic is performed on the fields of each node according to the field mapping rule, wherein for an archive association penetration request, the cache module is called to obtain an associated archive attribute value. Finally, the target entity multi-way tree data structure is constructed and output according to the structure processing rule. The conversion logic is realized by metadata driving and visual configuration, avoiding the traditional hard coding mode, which can quickly respond to changes in business models and improve flexibility.
[0016] In some technical solutions, the conversion logic includes one or a combination of the following: direct assignment, formula calculation, fixed value setting and archive association penetration.
[0017] In the technical solution, the conversion logic includes one or a combination of the following: direct assignment, formula calculation, fixed value setting and archive association penetration.
[0018] In some technical solutions, for an archive association penetration request, the cache module is called to obtain an associated archive attribute value, including: parsing the field mapping rule to identify the archive path that needs to be penetrated; initiating a batch query request along the archive path layer by layer through a recursive drilling algorithm; and assigning the finally obtained end archive attribute value to the target field.
[0019] In the technical solution, for an archive association penetration request, the cache module is called to obtain an associated archive attribute value. Specifically, the field mapping rule is parsed first to identify the archive path that needs to be penetrated. Then a batch query request is initiated along the archive path layer by layer through a recursive drilling algorithm. Finally, the finally obtained end archive attribute value is assigned to the target field. Through the batch penetration mechanism based on the cache and the recursive drilling algorithm, the performance bottleneck problem of the association query is solved.
[0020] In some embodiments, the business model comprises one or a combination of a business document model, a financial accounting model, and an accounting voucher model.
[0021] In some embodiments, the business model comprises one or a combination of a business document model, a financial accounting model, and an accounting voucher model.
[0022] To achieve the second object of the present application, the second aspect of the present application provides a tree-shaped entity object free conversion system, comprising: an acquisition module configured to acquire metadata definition of a business model through a metadata management module, the business model comprising a source entity object and a target entity object, the source entity object comprising a source entity multi-way tree data structure; a configuration module configured to receive user-defined conversion rules through a configuration interface, and convert the conversion rules into a standard conversion template through a conversion template algorithm, the standard conversion template comprising: an entity mapping rule, a field mapping rule, and an archive penetration rule; and a conversion module configured to convert the source entity multi-way tree data structure into a target entity multi-way tree data structure through a conversion engine.
[0023] According to the tree-shaped entity object free conversion system provided by the present application, the system comprises an acquisition module, a configuration module, and a conversion module. The acquisition module is configured to acquire metadata definition of a business model through a metadata management module, the business model comprising a source entity object and a target entity object, the source entity object comprising a source entity multi-way tree data structure. The configuration module is configured to receive user-defined conversion rules through a configuration interface, and convert the conversion rules into a standard conversion template through a conversion template algorithm, the standard conversion template comprising: an entity mapping rule, a field mapping rule, and an archive penetration rule. The conversion module is configured to convert the source entity multi-way tree data structure into a target entity multi-way tree data structure through a conversion engine. The system realizes free mapping based on metadata driving through configuration, unifies the conversion scheme of the transaction accounting middle platform, and enables users to control the free conversion of entities through configuration connection, process complex structures, realize conversion logic through metadata driving and visual configuration, avoid traditional hard coding mode, quickly respond to changes in the business model, and improve flexibility.
[0024] To achieve the third object of the present application, the third aspect of the present application provides a tree-shaped entity object free conversion system, comprising: a storage and a processor, wherein the storage stores programs or instructions executable on the processor, and the processor executes the programs or instructions to implement the tree-shaped entity object free conversion method of any one of the first aspect, thus achieving the technical effects of any one of the first aspect, which will not be described herein again.
[0025] To achieve the fourth object of the present application, the technical solution of the fourth aspect of the present application provides a readable storage medium, which stores programs or instructions, and the programs or instructions are executed by a processor to realize the steps of the tree entity object free conversion method in any of the technical solutions of the first aspect, so as to have the technical effects of any of the technical solutions of the first aspect, which will not be repeated here.
[0026] Additional aspects and advantages of the present application will become apparent from the following description, or will be learned by practice of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0027] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood by considering the following detailed description, including the accompanying drawings, in which:
[0028] Figure 1 Step flowchart of the tree entity object free conversion method of one embodiment of the present application;
[0029] Figure 2 Step flowchart of the tree entity object free conversion method of one embodiment of the present application;
[0030] Figure 3 Step flowchart of the tree entity object free conversion method of one embodiment of the present application;
[0031] Figure 4 Step flowchart of the tree entity object free conversion method of one embodiment of the present application;
[0032] Figure 5 Step flowchart of the tree entity object free conversion method of one embodiment of the present application;
[0033] Figure 6 Structure schematic block diagram of the tree entity object free conversion system of one embodiment of the present application;
[0034] Figure 7 Structure schematic block diagram of the tree entity object free conversion system of one embodiment of the present application;
[0035] Figure 8 Item conversion-scene analysis schematic diagram of the tree entity object free conversion method of one embodiment of the present application;
[0036] Figure 9 Item conversion-scene analysis schematic diagram of the tree entity object free conversion method of one embodiment of the present application;
[0037] Figure 10 Item conversion-scene analysis schematic diagram of the tree entity object free conversion method of one embodiment of the present application;
[0038] Figure 11 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0039] Figure 12 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0040] Figure 13 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0041] Figure 14 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0042] Figure 15 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0043] Figure 16 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0044] Figure 17 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0045] Figure 18 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0046] Figure 19 One of the transaction conversion-scenario analysis schematic diagrams of the tree entity object free conversion method of one embodiment of the present application;
[0047] Figure 20 The conversion algorithm-data structure schematic diagram of the tree entity object free conversion method of one embodiment of the present application;
[0048] Figure 21 The conversion algorithm-flow schematic diagram of the tree entity object free conversion method of one embodiment of the present application;
[0049] Figure 22 The performance optimization schematic diagram of the tree entity object free conversion method of one embodiment of the present application;
[0050] Figure 23 The test case schematic diagram of the tree entity object free conversion method of one embodiment of the present application;
[0051] Figure 24 This is a schematic diagram of a fixed asset case study of the free conversion method for tree-shaped entity objects according to an embodiment of this application.
[0052] in, Figure 6 and Figure 7 The correspondence between the reference numerals and component names in the attached drawings is as follows:
[0053] 10: Tree-shaped entity object free conversion system; 110: Acquisition module; 120: Configuration module; 130: Calculation module; 140: Conversion module; 20: Tree-shaped entity object free conversion system; 300: Memory; 400: Processor. Detailed Implementation
[0054] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0055] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.
[0056] The following reference Figures 1 to 24 This application describes a method and system for freely converting tree-shaped entity objects, as well as a readable storage medium, according to some embodiments of this application.
[0057] like Figure 1 As shown, an embodiment of the first aspect of this application provides a method for freely converting tree-shaped entity objects, including the following steps:
[0058] Step S102: Obtain the metadata definition of the business model through the metadata management module. The business model includes source entity objects and target entity objects. The source entity objects include a source entity multi-branch tree data structure.
[0059] Step S104: Receive user-defined conversion rules through the configuration interface, and convert the conversion rules into standard conversion templates through the conversion template algorithm. The standard conversion templates include: entity mapping rules, field mapping rules, and file penetration rules.
[0060] Step S106: Convert the source entity multi-branch tree data structure into the target entity multi-branch tree data structure using the conversion engine.
[0061] According to the tree-structured entity object free conversion method provided in this embodiment, the metadata definition of the business model is first obtained through the metadata management module. The business model includes source entity objects and target entity objects, and the source entity objects include a source entity multi-branch tree data structure. Then, the user-defined conversion rules are received through the configuration interface, and the conversion rules are converted into a standard conversion template through a conversion template algorithm. The standard conversion template includes entity mapping rules, field mapping rules, and file penetration rules. Among them, the entity mapping rules are used to define the correspondence between source entity nodes and target entity nodes, and the field mapping rules are used to define the conversion logic between source fields and target fields. The conversion logic includes direct assignment, formula calculation, fixed value setting, and file association penetration. Finally, the conversion engine converts the source entity multi-branch tree data structure into the target entity multi-branch tree data structure to obtain the target entity object. By implementing metadata-driven free mapping through configuration, the conversion scheme of the transaction accounting platform is unified. Users can control the free conversion of entities through configuration connections, which can handle complex structures. The conversion logic is implemented through metadata-driven and visual configuration, avoiding the traditional hard-coding method, enabling rapid response to changes in the business model, and improving flexibility.
[0062] like Figure 2 As shown, the tree-structured entity object free conversion method according to an embodiment of this application further includes the following steps before converting the source entity multi-branch tree data structure into the target entity multi-branch tree data structure through a conversion engine:
[0063] Step S202: Load the source entity object data into memory in batches by row transformation using the batch loading module;
[0064] Step S204: Establish a cache for the archive data through the cache module.
[0065] In this embodiment, before converting the source entity multi-branch tree data structure to the target entity multi-branch tree data structure via the conversion engine, the process includes a batch loading module to load the source entity object data into memory row by row. A caching module is used to cache the archive data. The batch loading module loads the source entity object data into memory row by row. This reduces frequent I / O operations and significantly improves processing speed. The caching module also caches the archive data. When performing archive penetration, data is directly retrieved from the memory cache, avoiding the overhead of repeatedly querying the database.
[0066] like Figure 3 As shown, a tree-structured entity object free conversion method according to an embodiment of this application converts the source entity multi-branch tree data structure into the target entity multi-branch tree data structure through a conversion engine, specifically including the following steps:
[0067] Step S302: Parse and load the standard conversion template;
[0068] Step S304: Traverse the source entity multi-branch tree data structure, and construct and output the target entity multi-branch tree data structure according to the entity mapping rules, field mapping rules and file penetration rules.
[0069] In this embodiment, the source entity multi-branch tree data structure is converted into the target entity multi-branch tree data structure through a conversion engine. Specifically, a standard conversion template is first parsed and loaded. Then, the source entity multi-branch tree data structure is traversed, and the target entity multi-branch tree data structure is constructed and output according to entity mapping rules, field mapping rules, and file penetration rules, thereby obtaining the target entity object.
[0070] like Figure 4 As shown, a tree-structured entity object free conversion method according to an embodiment of this application constructs and outputs a target entity multi-branch tree data structure based on entity mapping rules, field mapping rules, and file penetration rules, including the following steps:
[0071] Step S402: Locate or create the corresponding target entity node according to the entity mapping rules;
[0072] Step S404: According to the field mapping rules, perform transformation logic on the fields of each node. For file association penetration requests, call the cache module to obtain the attribute values of the associated files.
[0073] Step S406: Construct and output the target entity multi-branch tree data structure according to the structure processing rules.
[0074] In this embodiment, a target entity multi-branch tree data structure is constructed and output based on entity mapping rules, field mapping rules, and file penetration rules. Specifically, firstly, the corresponding target entity node is located or created according to the entity mapping rules. Then, according to the field mapping rules, transformation logic is executed on the fields of each node. For file association penetration requests, the cache module is called to obtain the attribute values of the associated files. Finally, the target entity multi-branch tree data structure is constructed and output according to the structure processing rules. The transformation logic is implemented through metadata-driven and visual configuration, avoiding traditional hard-coding methods, enabling rapid response to changes in business models, and improving flexibility.
[0075] In some embodiments, the conversion logic may optionally include one or a combination of the following: direct assignment, formula calculation, fixed value setting, and file association penetration.
[0076] like Figure 5 As shown, according to an embodiment of the tree-structured entity object free conversion method proposed in this application, for a file association penetration request, the method calls the cache module to obtain the associated file attribute value, including the following steps:
[0077] Step S502: Parse the field mapping rules and identify the file path that needs to be penetrated;
[0078] Step S504: Using a recursive drill-down algorithm, initiate batch query requests layer by layer along the file path;
[0079] Step S506: Assign the final obtained end file attribute value to the target field.
[0080] In this embodiment, for file association penetration requests, the caching module is invoked to obtain the associated file attribute values. Specifically, the field mapping rules are first parsed to identify the file path to be penetrated. Then, a recursive drill-down algorithm is used to initiate batch query requests layer by layer along the file path. Finally, the obtained end file attribute values are assigned to the target field. This batch penetration mechanism based on caching and recursive drill-down solves the performance bottleneck problem of association queries.
[0081] In some embodiments, the business model may optionally include one or a combination of the following: a business document model, a financial accounting model, and an accounting voucher model.
[0082] like Figure 6 As shown, an embodiment of the second aspect of this application provides a tree-structured entity object free conversion system 10, including: an acquisition module 110, used to acquire the metadata definition of a business model through a metadata management module, the business model including source entity objects and target entity objects, the source entity objects including a source entity multi-branch tree data structure; a configuration module 120, used to receive user-defined conversion rules through a configuration interface, and convert the conversion rules into a standard conversion template through a conversion template algorithm, the standard conversion template including: entity mapping rules, field mapping rules, and file penetration rules; and a conversion module 130, used to convert the source entity multi-branch tree data structure into the target entity multi-branch tree data structure through a conversion engine.
[0083] The tree-structured entity object free conversion system 10 provided in this embodiment includes an acquisition module 110, a configuration module 120, and a conversion module 130. The acquisition module 110 acquires the metadata definition of the business model through the metadata management module. The business model includes source entity objects and target entity objects, and the source entity objects include a source entity multi-branch tree data structure. The configuration module 120 receives user-defined conversion rules through a configuration interface and converts these rules into a standard conversion template using a conversion template algorithm. The standard conversion template includes entity mapping rules, field mapping rules, and file penetration rules. The conversion module 130 converts the source entity multi-branch tree data structure into the target entity multi-branch tree data structure using a conversion engine. By implementing metadata-driven free mapping through configuration, the conversion scheme of the transaction accounting platform is unified. Users can control the free conversion of entities through configuration connections, handling complex structures. The conversion logic is implemented through metadata-driven and visual configuration, avoiding traditional hard-coding methods, enabling rapid response to changes in the business model, and improving flexibility.
[0084] like Figure 7 As shown, an embodiment of the third aspect of this application provides a tree-shaped entity object free conversion system 20, including: a memory 300 and a processor 400, wherein the memory 300 stores a program or instructions that can be executed on the processor 400, and when the processor 400 executes the program or instructions, it implements the steps of the tree-shaped entity object free conversion method of any one of the embodiments of the first aspect, and thus has the technical effects of any embodiment of the first aspect, which will not be repeated here.
[0085] An embodiment of the fourth aspect of this application provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the tree entity object free conversion method of any one of the embodiments of the first aspect, and thus has the technical effects of any embodiment of the first aspect described above, which will not be repeated here.
[0086] like Figure 8 , Figure 9 , Figure 10 , Figure 11 , Figure 12 , Figure 13 , Figure 14 , Figure 15 , Figure 16 , Figure 17 , Figure 18 , Figure 19 , Figure 20 , Figure 21 , Figure 22 , Figure 23 and Figure 24As shown, a tree-structured entity object free conversion method according to a specific embodiment of this application realizes functions such as free mapping based on MDD (Metadata-Driven Development) metadata through configuration. It can be used in different fields with the above scenarios and is available as a standalone JAR package. Furthermore, if needed, it can be extended to remove the metadata dependencies of MDD and implement free descriptions. Entity conversion can be achieved through configuration or mapping connections; and batch column-based conversion and cache replacement are implemented to improve performance, achieving high adaptability, high performance, and flexibility.
[0087] Specifically, the technical problem to be solved in this embodiment is:
[0088] The core model features include mapping between objects: free mapping between different sub-entities of an object; free mapping of attributes; and file penetration.
[0089] The number of documents and financial models is relatively large, and the model structures are complex and varied.
[0090] We need to address the performance issues associated with converting entities with a large number of rows.
[0091] For files similar to 'abc', the associated attributes can be penetrated through the id.
[0092] It supports flexible configuration of company formulas, fixed values, variables, etc.
[0093] Technical solutions to the technical problems:
[0094] For the above-mentioned functions such as entity mapping, field mapping, and file penetration, a conversion description format based on a tree-structured conversion model has been developed, which can fully describe different mapping relationships.
[0095] For different entity structures, the front-end page defines the conversion template, and the conversion template algorithm converts the relational database definition into a standard conversion template; the conversion mapping can be completed by modifying different configurations.
[0096] For larger entities, it is necessary to perform row-by-row transformation and batch loading to improve performance.
[0097] For file penetration, a recursive drilling-down method is used for batch processing, and there is a dedicated file loading module.
[0098] Formula parsing uses a formula component, but the conversion component independently handles issues such as file penetration and batch calling within the formula.
[0099] In summary, the beneficial effects of this application's embodiments are as follows: it unifies the conversion scheme of the transaction accounting platform, allows users to control the free conversion of entities through configuration connections, and solves the performance problem of large documents. It also standardizes core product components.
[0100] In this application, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; the term "multiple" refers to two or more unless otherwise expressly defined. The terms "install," "connect," "link," and "fix" should be interpreted broadly. For example, "connect" can mean a fixed connection, a detachable connection, or an integral connection; "link" can mean a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0101] In the description of this application, it should be understood that the terms "upper", "lower", "front", "rear", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or module referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0102] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0103] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A tree entity object free transform method, characterized by, The method comprises the following steps: acquiring metadata definition of a business model through a metadata management module, the business model comprising a source entity object and a target entity object, the source entity object comprising a source entity multi-ary tree data structure; receiving user-defined conversion rules through a configuration interface, and converting the conversion rules into a standard conversion template through a conversion template algorithm, the standard conversion template comprising an entity mapping rule, a field mapping rule and an archive penetration rule; converting the source entity multi-ary tree data structure into a target entity multi-ary tree data structure through a conversion engine.
2. The tree entity object free transform method of claim 1, wherein, Before the step of converting the source entity multi-ary tree data structure into a target entity multi-ary tree data structure through the conversion engine, the method further comprises the following steps: loading source entity object data into memory in batches according to rows through a batch loading module; establishing a cache for archive data through a cache module.
3. The tree entity object free transform method of claim 2, wherein, The step of converting the source entity multi-ary tree data structure into a target entity multi-ary tree data structure through the conversion engine comprises the following steps: parsing and loading the standard conversion template; traversing the source entity multi-ary tree data structure, and constructing and outputting a target entity multi-ary tree data structure according to the entity mapping rule, the field mapping rule and the archive penetration rule.
4. The tree entity object free transform method of claim 3, wherein, The step of constructing and outputting a target entity multi-ary tree data structure according to the entity mapping rule, the field mapping rule and the archive penetration rule comprises the following steps: locating or creating a corresponding target entity node according to the entity mapping rule; for each node, performing conversion logic on the fields of the node according to the field mapping rule, wherein for an archive association penetration request, calling the cache module to obtain an associated archive attribute value; constructing and outputting a target entity multi-ary tree data structure according to a structure processing rule.
5. The tree-shaped entity object free conversion method according to claim 4, wherein the conversion logic comprises one or a combination of the following: direct assignment, formula calculation, fixed value setting and archive association penetration. The step of, for an archive association penetration request, calling the cache module to obtain an associated archive attribute value comprises the following steps:
6. The tree entity object free transform method of claim 4, wherein, parsing the field mapping rule to identify an archive path that needs to be penetrated; initiating a batch query request along the archive path layer by layer through a recursive drilling algorithm; assigning a terminal archive attribute value obtained finally to a target field. The business model comprises one or a combination of the following: a business document model, a financial accounting model and an accounting voucher model.
7. The tree entity object free transform method according to any one of claims 1 to 6, wherein, The method comprises the following steps:
8. A tree entity object free transform system, characterized by, an acquiring module (110) is configured to acquire metadata definition of a business model through a metadata management module, the business model comprising a source entity object and a target entity object, the source entity object comprising a source entity multi-ary tree data structure; a configuration module (120) is configured to receive user-defined conversion rules through a configuration interface, and convert the conversion rules into a standard conversion template through a conversion template algorithm, the standard conversion template comprising an entity mapping rule, a field mapping rule and an archive penetration rule; a conversion module (130) is configured to convert the source entity multi-ary tree data structure into a target entity multi-ary tree data structure through a conversion engine. The method comprises the following steps:
9. A tree entity object free transform system, characterized by, A memory (300) and a processor (400), wherein the memory (300) has a program or instructions stored thereon, which are capable of being run on the processor (400), and the processor (400) implements the steps of the tree entity object free conversion method according to any one of claims 1 to 7 when running the program or the instructions.
10. A readable storage medium, on which a program or instructions are stored, characterized in that, The program or the instructions are capable of implementing the steps of the tree entity object free conversion method according to any one of claims 1 to 7 when executed by a processor.