A financial platform export system based on Java reflection and spring IOC

By using Java reflection and Spring IOC technology, a financial platform export system was designed, which solved the problems of manual coding and complexity in existing technologies, and achieved automated data export and stable financial data migration.

CN115309812BActive Publication Date: 2026-05-12上海镁信健康科技集团股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
上海镁信健康科技集团股份有限公司
Filing Date
2022-09-19
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing financial software systems require manual coding during data migration, and with the increase in business functions, the number of methods is numerous and difficult to manage. Existing export tools cannot automate the field mapping and export process, leading to increased system complexity.

Method used

This paper designs a financial platform export system using Java reflection and Spring IOC technology. The system includes a comprehensive processing module, a field mapping unit, a file generation unit, a file splitting unit, and a concurrency protection unit. These units are constructed using Spring IOC injection to achieve automated field mapping and file processing, and distributed locks are used to solve concurrency issues.

Benefits of technology

The number of interfaces in the system was reduced, the coding workload was decreased, productivity was improved, system performance was ensured to be stable, service pressure was avoided, and the data export process was automated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309812B_ABST
    Figure CN115309812B_ABST
Patent Text Reader

Abstract

The present application relates to the field of financial platform export system, and particularly relates to a financial platform export system based on Java reflection and springIOC, the present application adds export function to query function each time, and no additional export interface programming is needed, thereby greatly reducing the number of interfaces in the system, avoiding a large amount of meaningless coding work, and improving productivity; the file generation unit adopts paging query, and the content is written in the form of addition after each query, and then the file is closed, so as to ensure stable performance consumption, and then according to the data volume, mail sending or front-end export is selected, so that the service pressure can be effectively reduced, and the service performance is avoided from being affected; through the setting of the concurrent protection unit, when frequent export or large export file data volume is detected, the export function is added with a distributed lock for the export of the same user and the same query condition, so that only one export of the same user and the same query condition is allowed at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of a financial platform export system, in particular to a financial platform export system based on Java reflection and springIOC. BACKGROUND

[0002] Because different financial software companies are in a competitive relationship, manual downloading of financial data is generally provided. If the created account set and balance table, historical vouchers, report forms and other data in the financial system of the financial software company are to be migrated to a new financial system (if the new financial system is of a different manufacturer), the existing export migration tools, such as apache's common-csv, although encapsulating file generation and export methods, still need to be coded by technical personnel. For example, field mapping is specified, and after data is obtained, a file generation method is called. Furthermore, if export is required, the query and export need to be separated. With the increase of business functions, the number of methods is large, and it is not easy to manage. In view of the above problems, a financial platform export system based on Java reflection and springIOC is designed. SUMMARY

[0003] The application aims to provide a financial platform export system based on Java reflection and springIOC to solve the problems in the background.

[0004] To achieve the above-mentioned purpose, the application provides the following technical scheme: a financial platform export system based on Java reflection and springIOC, comprising a financial platform, a comprehensive processing module, a file export function module, a field mapping unit, a file generation unit, a file splitting unit and a concurrent protection unit, characterized in that: the financial platform is connected to the comprehensive processing module, and the comprehensive processing module is connected to the file export function module.

[0005] The comprehensive processing module is based on a springIOC injection mode, and according to file export information, corresponding field mapping units, file generation units, file splitting units and concurrent protection units are constructed. The input ends of the file generation units and the file splitting units are connected to the financial platform. The file generation units are used to receive signals sent by the file export function module and process files to be exported in the financial platform. The field mapping units are used to map file fields in the financial platform. The concurrent protection units allow only one export of the same user and the same query condition to exist at the same time.

[0006] Preferably, the file generation units are connected to the file splitting units, and the file splitting units are used to split the query files into multiple file units. The file units are transmitted to the file generation units, such as:

[0007] # The number of exported data, the number of queries in the database each time, which cannot be greater than the maximum number of file records

[0008] spring.export.csv.pageSize=1000

[0009] # The maximum number of records in each csv file

[0010] spring.export.csv.recordCount=600000.

[0011] Preferably, the file name of the file unit is recorded and written in the order of 0, 1, 2, ….

[0012] Preferably, the field mapping unit uses json interaction and uses VO object for data encapsulation, and the field mapping unit uses @CsvColumn annotation for field mapping, reducing additional mapping coding, such as:

[0013] @CsvColumn(alias = "payment object type", dictCode = "PAY_OBJECT_TYPE", index= 13) private String objectType;

[0014] Among them, alias indicates the file export header name, if the returned field is an enumeration code, the system needs to be translated, then dictCode needs to be specified, index indicates the column order in the file. When assembling the file, the field will be parsed according to the annotation.

[0015] In addition, many exports have summary fields, which can be marked with @CsvSummary annotation, which also has alias and indx fields, and has the same effect as @CsvColumn annotation. It will write summary data in a new line in the document.

[0016] @CsvSummary(alias = "payment amount total")

[0017] private String totalPrice.

[0018] Preferably, the file generation unit uses paging query, and after each query, the content is written in the form of addition, and then the file is closed, to ensure stable performance consumption of the entire system.

[0019] Preferably, the file generation unit includes an email sending unit and a front-end export unit. The front-end export unit is connected to the file export function module. The file generation unit selects email sending or front-end export based on the file data volume. The file name generated in the file generation unit uses the format: filename_timestamp_exporting user_file number.

[0020] Preferably, the file export function module includes a query unit and an export unit, which share a common API. This allows the export unit to execute simultaneously when the query unit performs a query, reducing the need for additional export interface development and decreasing the number of interfaces in the system. For example:

[0021] PHA_DRUG_REFUND_INFO("drugRefund","fastYkfReportController","listPharmacyRefundInfo","com.meditrusthealth.fast.ep.core.admin.resp.reportForm.PharmacyRefundResp","drugRefundInfo").

[0022] Preferably, when the concurrency protection unit detects frequent exports or a large amount of exported file data, the export function adds a distributed lock for exports from the same user with the same query conditions, so that only one export from the same user with the same query conditions is allowed at the same time.

[0023] Compared with existing technologies, the beneficial effects of this invention are as follows: Compared with previous export systems, this invention eliminates the need to write additional export interfaces for each query function and the addition of a new export function, thereby greatly reducing the number of interfaces in the system and avoiding a large amount of meaningless coding work, thus improving productivity; by using paginated queries through the file generation unit, content is written in an append-only manner after each query, and then the file is closed, thus ensuring stable performance consumption; then, depending on the data volume, email sending or front-end export is selected, which can effectively reduce service pressure and avoid affecting service performance; by setting up a concurrency protection unit, when frequent exports or large amounts of exported file data are detected, the export function adds a distributed lock for exports from the same user with the same query conditions, ensuring that only one export from the same user with the same query conditions is allowed at the same time. Attached Figure Description

[0024] Fig. 1 This is a schematic diagram of the overall structure of the present invention;

[0025] Fig. 2 This is a schematic diagram of the file export function module of the present invention;

[0026] Fig. 3 This is a schematic diagram of the document generation unit of the present invention.

[0027] In the diagram: 1. Financial Platform; 2. Comprehensive Processing Module; 3. File Export Function Module; 301. Query Unit; 302. Export Unit; 4. Field Mapping Unit; 5. File Generation Unit; 501. Email Sending Unit; 502. Front-end Export Unit; 6. File Splitting Unit; 7. Concurrency Protection Unit. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0029] Please see Figs. 1-3 The present invention provides a technical solution: a financial platform export system based on Java reflection and Spring IOC, including a financial platform 1, a comprehensive processing module 2, a file export function module 3, a field mapping unit 4, a file generation unit 5, a file splitting unit 6, and a concurrency protection unit 7. The financial platform 1 is connected to the comprehensive processing module 2, and the comprehensive processing module 2 is connected to the file export function module 3.

[0030] The integrated processing module 2 is based on Spring IOC injection. According to the file export information, it constructs the corresponding field mapping unit 4, file generation unit 5, file splitting unit 6, and concurrency protection unit 7. The input terminals of file generation unit 5 and file splitting unit 6 are connected to the financial platform 1. The file generation unit 5 is used to receive the signal sent by the file export function module 3 and process the files that need to be exported from the financial platform 1. The field mapping unit 4 is used to map the file fields in the financial platform 1. The concurrency protection unit 7 ensures that only one export from the same user with the same query conditions is allowed at the same time.

[0031] Furthermore, the file generation unit 5 is connected to the file splitting unit 6, which is used to split the query file into multiple file units, wherein the file units are transmitted to the file generation unit 5, for example:

[0032] #The number of records retrieved from the database each time the exported data is queryed cannot exceed the maximum number of records in the file.

[0033] spring.export.csv.pageSize=1000

[0034] #Maximum number of records in each CSV file

[0035] spring.export.csv.recordCount=600000.

[0036] Furthermore, the filenames of the file units are recorded and written in the order of 0, 1, 2, ...

[0037] Furthermore, field mapping unit 4 uses JSON for interaction and encapsulates data using VO objects. It also uses the `@CsvColumn` annotation for field mapping to reduce additional mapping encoding. For example:

[0038] @CsvColumn(alias = "Payment Object Type",dictCode = "PAY_OBJECT_TYPE", index= 13)private String objectType;

[0039] Here, `alias` represents the file export header name. If the returned field is an enumeration code that needs to be translated by the system, then `dictCode` needs to be specified. `index` indicates the column order in the file. During file assembly, the fields are parsed based on the annotations.

[0040] In addition, many exports have summary fields, which can be annotated using the `@CsvSummary` annotation. This annotation also has `alias` and `indx` fields, functioning similarly to the `@CsvColumn` annotation. The summary data will be written on a separate line in the documentation.

[0041] @CsvSummary(alias = "Total Payment Amount")

[0042] private String totalPrice.

[0043] Furthermore, the file generation unit 5 uses paginated queries. After each query, content is written in an append-only manner, and then the file is closed to ensure stable performance consumption of the entire system.

[0044] Furthermore, the file generation unit 5 includes an email sending unit 501 and a front-end export unit 502. The front-end export unit 502 is connected to the file export function module 3. The file generation unit 5 selects email sending or front-end export based on the file data volume. The file name generated in the file generation unit 5 is generated in the format of: file name_timestamp_exporting user_file number.

[0045] Furthermore, the file export function module 3 includes a query unit 301 and an export unit 302. The query unit 301 and the export unit 302 share a single API, allowing the export unit 302 to execute simultaneously when the query unit 301 performs a query function. This reduces the need for additional export interface writing and lowers the number of interfaces in the system. For example:

[0046] PHA_DRUG_REFUND_INFO("drugRefund","fastYkfReportController","listPharmacyRefundInfo","com.meditrusthealth.fast.ep.core.admin.resp.reportForm.PharmacyRefundResp","drugRefundInfo").

[0047] Furthermore, when the concurrency protection unit 7 detects frequent exports or a large amount of exported file data, the export function adds a distributed lock for exports from the same user with the same query conditions, ensuring that only one export from the same user with the same query conditions is allowed at the same time.

[0048] Compared to previous export systems, this invention eliminates the need for additional export interfaces when adding new export functions to the query function, significantly reducing the number of interfaces in the system and avoiding a large amount of meaningless coding work, thus improving productivity. The file generation unit 5 uses paginated queries, adding content after each query and then closing the file to ensure stable performance. Then, depending on the data volume, it chooses email sending or front-end export, effectively reducing service pressure and avoiding impact on service performance. By setting up a concurrency protection unit 7, when frequent exports or large amounts of exported file data are detected, the export function adds a distributed lock for exports from the same user with the same query conditions, ensuring that only one export from the same user with the same query conditions is allowed at any given time.

[0049] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A financial platform export system based on Java reflection and Spring IOC, comprising a financial platform (1), a comprehensive processing module (2), a file export function module (3), a field mapping unit (4), a file generation unit (5), a file splitting unit (6), and a concurrency protection unit (7), characterized in that: The financial platform (1) is connected to the integrated processing module (2), and the integrated processing module (2) is connected to the file export function module (3); The integrated processing module (2) is based on SpringIOC injection and constructs a corresponding field mapping unit (4), file generation unit (5), file splitting unit (6) and concurrency protection unit (7) according to the file export information. The input ends of the file generation unit (5) and the file splitting unit (6) are connected to the financial platform (1). The file generation unit (5) is used to receive the signal sent by the file export function module (3) and process the files that need to be exported in the financial platform (1). The field mapping unit (4) is used to map the file fields in the financial platform (1). The concurrency protection unit (7) ensures that only one export is allowed for the same user and the same query conditions at the same time.

2. The financial platform export system based on Java reflection and Spring IOC as described in claim 1, characterized in that: The file generation unit (5) is connected to the file splitting unit (6), which is used to split the query file into multiple file units, wherein the file units are transmitted to the file generation unit (5).

3. The financial platform export system based on Java reflection and Spring IOC as described in claim 2, characterized in that: The file names of the file units are recorded and written in the order of 0, 1, 2, ...

4. The financial platform export system based on Java reflection and Spring IOC as described in claim 1, characterized in that: The field mapping unit (4) uses JSON interaction and uses VO objects for data encapsulation. The field mapping unit (4) uses the @CsvColumn annotation for field mapping to reduce additional mapping encoding.

5. A financial platform export system based on Java reflection and Spring IOC as described in claim 1, characterized in that: The file generation unit (5) uses paginated queries. After each query, the content is written in the form of addition, and then the file is closed to ensure stable performance consumption of the entire system.

6. A financial platform export system based on Java reflection and Spring IOC as described in claim 1, characterized in that: The file generation unit (5) includes an email sending unit (501) and a front-end export unit (502). The front-end export unit (502) is connected to the file export function module (3). The file generation unit (5) selects email sending or front-end export according to the file data volume. The file name generated in the file generation unit (5) is generated in the format of: file name_timestamp_exporting user_file number.

7. A financial platform export system based on Java reflection and Spring IOC as described in claim 1, characterized in that: The file export function module (3) includes a query unit (301) and an export unit (302). The query unit (301) and the export unit (302) share a common API, so that when the query unit (301) performs the query function, the export unit (302) performs the query function at the same time, reducing the need to write additional export interfaces and reducing the number of interfaces in the system.

8. A financial platform export system based on Java reflection and Spring IOC as described in claim 1, characterized in that: When the concurrency protection unit (7) detects frequent exports or a large amount of exported file data, the export function adds a distributed lock for exports from the same user and under the same query conditions, so that only one export from the same user and under the same query conditions is allowed at the same time.