CN111159198A - Parameter transaction processing method and device, computer equipment and readable storage medium - Google Patents

Parameter transaction processing method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN111159198A
CN111159198A CN201911415764.6A CN201911415764A CN111159198A CN 111159198 A CN111159198 A CN 111159198A CN 201911415764 A CN201911415764 A CN 201911415764A CN 111159198 A CN111159198 A CN 111159198A
Authority
CN
China
Prior art keywords
parameter
data
transformation
transaction
parameter transaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911415764.6A
Other languages
Chinese (zh)
Other versions
CN111159198B (en
Inventor
戴翔
张凤玲
冯琦淇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN201911415764.6A priority Critical patent/CN111159198B/en
Publication of CN111159198A publication Critical patent/CN111159198A/en
Application granted granted Critical
Publication of CN111159198B publication Critical patent/CN111159198B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a parameter transaction processing method and device, computer equipment and a readable storage medium, wherein the method comprises the following steps: acquiring parameter transaction data, wherein the parameter transaction data comprises functional parameter data and information parameter data; carrying out field name transformation on the information parameter data, and carrying out table entity class assignment according to a transformation result; and obtaining a path and a parameter table name stored in the table entity class by using Java reflection, obtaining a table operation class according to the path and the parameter table name, and performing database operation by using the table operation class according to the functional parameter data. The invention can process the parameter transaction according to a unified mode, and reduces the workload of development and maintenance of the parameter transaction.

Description

Parameter transaction processing method and device, computer equipment and readable storage medium
Technical Field
The present invention relates to the field of parameter transactions, and in particular, to a parameter transaction processing method and apparatus, a computer device, and a readable storage medium.
Background
The parameter transaction in the prior art is a set of realization methods for one type of parameter transaction, and a set of realization method needs to be developed independently for each type of parameter transaction.
Disclosure of Invention
In order to solve the defects of large development workload and high modification cost of the parameter transaction implementation method in the prior art, the first aspect of the invention provides a parameter transaction processing method, which comprises the following steps:
acquiring parameter transaction data, wherein the parameter transaction data comprises functional parameter data and information parameter data;
carrying out field name transformation on the information parameter data, and carrying out table entity class assignment according to a transformation result;
and obtaining a path and a parameter table name stored in the table entity class by using Java reflection, obtaining a table operation class according to the path and the parameter table name, and performing database operation by using the table operation class according to the functional parameter data.
In a further embodiment, obtaining parametric transaction data comprises:
parameter transaction data is obtained using a unified interface, wherein the unified interface utilizes a generic definition.
In a further embodiment, the field name transformation of the information parameter data includes:
and performing field name transformation on the information parameter data according to a preset transformation rule, wherein the transformation rule comprises the association relation between the information parameter field and the unified field in each parameter transaction data.
In a further embodiment, performing table entity class assignment according to the transformation result includes:
and acquiring data corresponding to each field name in the conversion result by using Java reflection, and assigning the data to the table entity class.
A second aspect of the present invention provides a parameter transaction processing apparatus, comprising:
the system comprises an entrance module, a data processing module and a data processing module, wherein the entrance module is used for acquiring parameter transaction data, and the parameter transaction data comprises functional parameter data and information parameter data;
the parameter processing module is used for carrying out field name transformation on the information parameter data and carrying out table entity class assignment according to a transformation result;
and the database operation module is used for acquiring the path and the parameter table name stored in the table entity class by using Java reflection, acquiring the table operation class according to the path and the parameter table name, and performing database operation by using the table operation class according to the functional parameter data.
In a further embodiment, the portal module obtains parametric transaction data, including:
parameter transaction data is obtained using a unified interface, wherein the unified interface utilizes a generic definition.
In a further embodiment, the processing module performs field name transformation on the information parameter data, including:
and performing field name transformation on the information parameter data according to a preset transformation rule, wherein the transformation rule comprises the association relation between the information parameter field and the unified field in each parameter transaction data.
In a further embodiment, the operation module performs table entity class assignment according to the transformation result, including:
and acquiring data corresponding to each field name in the conversion result by using Java reflection, and assigning the data to the table entity class.
A third aspect of the invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the parameter transaction processing method according to any of the preceding embodiments when executing the computer program.
A fourth aspect of the present invention provides a computer-readable storage medium storing an executable computer program which, when executed by a processor, implements a parameter transaction processing method according to any one of the preceding embodiments.
The invention provides a parameter transaction processing method and device, a computer device and a readable storage medium, wherein parameter transaction data are acquired, wherein the parameter transaction data comprise functional parameter data and information parameter data; carrying out field name transformation on the information parameter data, and carrying out table entity class assignment according to a transformation result; the path and the parameter table name stored in the table entity class are obtained by Java reflection, the table operation class is obtained according to the path and the parameter table name, the database operation is carried out by the table operation class according to the functional parameter data, the parameter transaction can be processed according to a unified mode, and the workload of development and maintenance of the parameter transaction is reduced.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 illustrates a flow diagram of a parameter transaction processing method according to an embodiment of the invention;
fig. 2 is a block diagram showing a parameter transaction processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical features and effects of the invention more obvious, the technical solution of the invention is further described below with reference to the accompanying drawings, the invention can also be described or implemented by other different specific examples, and any equivalent changes made by those skilled in the art within the scope of the claims are within the scope of the invention.
The exemplary embodiments of the present invention and the description thereof are provided to explain the present invention and not to limit the present invention. Additionally, the same or similar numbered elements/components used in the drawings and the embodiments are used to represent the same or similar parts.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," or "some examples," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the various embodiments is provided to schematically illustrate the practice of the invention, and the sequence of steps is not limited and can be suitably adjusted as desired.
It should be noted that the Java reflection in the present invention refers to that in the running state, for any class, we can know what methods and attributes are in this class. For any object, we can make calls to its methods and properties. The Java generalization described herein refers to parameterization of variable types.
In view of the defects of the prior art that the parameter transaction has a large development workload and a high modification cost, an embodiment of the present invention provides a parameter transaction processing method, as shown in fig. 1, including:
step 110, obtaining parameter transaction data, wherein the parameter transaction data includes functional parameter data and information parameter data.
In particular, the parameter transaction data may be obtained using a unified interface, wherein the unified interface utilizes a generic definition.
The function parameter data is used for indicating the functions of parameter transaction implementation, including parameter query, parameter addition and parameter maintenance. The information parameter data is determined according to parameter transaction, for example, agent parameter transaction, and the information parameter data includes bank number, organization number and agent BIC.
And 120, carrying out field name transformation on the information parameter data, and carrying out table entity class assignment according to a transformation result.
In one embodiment, the field name transformation of the information parameter data includes: and performing field name transformation on the information parameter data according to a preset transformation rule, wherein the transformation rule comprises the association relation between the information parameter field and the unified field in each parameter transaction data. The names of the fields in the database table corresponding to the unified fields can be set by developers, the specific values of the fields are not limited by the invention, such as the parameters of bank number, organization number and agent line BIC, and the corresponding unified fields are bank _ no, branch _ no and agent _ BIC.
In a specific embodiment, performing table entity class assignment according to a transformation result includes: and acquiring data corresponding to each field name in the conversion result by using Java reflection, and assigning the data to the table entity class.
And step 130, obtaining a path and a parameter table name stored in the table entity class by using Java reflection, obtaining a table operation class according to the path and the parameter table name, and performing database operation by using the table operation class according to the functional parameter data.
In detail, the table operation class and the table entity class exist in the same directory, and the table operation class names are both parameter table names + Dao (upper package names), so that the path and the parameter table stored in the table entity class are obtained through Java reflection.
The parameter transaction processing method provided by the invention comprises the steps of acquiring parameter transaction data, wherein the parameter transaction data comprises functional parameter data and information parameter data; carrying out field name transformation on the information parameter data, and carrying out table entity class assignment according to a transformation result; the path and the parameter table name stored in the table entity class are obtained by Java reflection, the table operation class is obtained according to the path and the parameter table name, the database operation is carried out by the table operation class according to the functional parameter data, the parameter transaction can be processed according to a unified mode, and the workload of development and maintenance of the parameter transaction is reduced.
Based on the same inventive concept, embodiments of the present invention further provide a parameter transaction processing apparatus, as described in the following embodiments. Because the principle of the device for solving the problems is similar to the parameter transaction processing method, the implementation of the device can refer to the implementation of the parameter transaction processing method, and repeated details are not repeated.
Specifically, as shown in fig. 2, the parameter transaction processing apparatus includes:
the entry module 210 is configured to obtain parameter transaction data, where the parameter transaction data includes function parameter data and information parameter data;
the parameter processing module 220 is used for performing field name transformation on the information parameter data and performing table entity class assignment according to a transformation result;
the operation module 330 is configured to obtain a path and a parameter table name stored in the table entity class by using Java reflection, obtain a table operation class according to the path and the parameter table name, and perform a database operation according to the functional parameter data by using the table operation class.
In an embodiment of the present invention, the entry module 310 obtains the parameter transaction data, which includes:
parameter transaction data is obtained using a unified interface, wherein the unified interface utilizes a generic definition.
In an embodiment of the present invention, the field name transformation performed on the information parameter data by the parameter processing module 320 includes:
and performing field name transformation on the information parameter data according to a preset transformation rule, wherein the transformation rule comprises the association relation between the information parameter field and the unified field in each parameter transaction data.
In an embodiment of the present invention, the database operation module 330 performs table entity class assignment according to the transformation result, including:
and acquiring data corresponding to each field name in the conversion result by using Java reflection, and assigning the data to the table entity class.
The parameter transaction processing device provided by the invention can process the parameter transaction according to a unified mode, and reduces the workload of development and maintenance of the parameter transaction.
In an embodiment of the present invention, there is further provided a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the parameter transaction processing method according to any one of the foregoing embodiments when executing the computer program.
In an embodiment of the present invention, a computer-readable storage medium is further provided, where the computer-readable storage medium stores an executable computer program, and the computer program, when executed by a processor, implements the parameter transaction processing method according to any of the foregoing embodiments.
In order to more clearly illustrate the technical solution of the present invention, the following is a detailed description of the parameter transaction of the agent bank. The transaction name of the agent row parameter is 31000, the name of the parameter table is AgentInfo, the corresponding functional parameter data is one of inquiry, addition, deletion and maintenance, and the information parameter comprises three fields of a bank number, an organization number and an agent row BIC.
The parameter transaction processing process comprises the following steps:
1) and acquiring agent row parameter transaction data.
2) And performing field transformation on information parameters in the agent row parameter transaction data, and transforming the field bank number, the organization number and the agent row BIC into bank _ no, branch _ no and agent _ BIC.
3) And acquiring data corresponding to each field name in the conversion result by using Java reflection, and assigning the data to the table entity class AgentInfoEntity.
4) The method comprises the steps of obtaining a storage path p and a table parameter name of an entity table AgentInfoEntity by Java reflection, finding a table operation type AgentInfoDao of the entity table AgentInfoEntity under a same-level directory according to the path p and the table parameter name (the table mainly comprises three operation methods, inquiring a data table according to a main key, inserting data into the data table, and modifying the data table according to the main key), and operating a database by using the table operation type according to functional parameter data.
Taking the functional parameter as an example of inserting data, the call table operation class AgentInfoDao checks whether the data to be inserted exists in the parameter table, and if so, an error is reported. If the AgentInfoDao does not exist, the AgentInfoDao is called to execute the updating operation, the inserting success returns to ok, and the failure processing is carried out in failure.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the purpose of illustrating the present invention, and any person skilled in the art can modify and change the above embodiments without departing from the spirit and scope of the present invention. Therefore, the scope of the claims should be accorded the full scope of the claims.

Claims (10)

1. A method for processing a parameter transaction, comprising:
acquiring parameter transaction data, wherein the parameter transaction data comprises functional parameter data and information parameter data;
carrying out field name transformation on the information parameter data, and carrying out table entity class assignment according to a transformation result;
and obtaining a path and a parameter table name stored in the table entity class by using Java reflection, obtaining a table operation class according to the path and the parameter table name, and performing database operation by using the table operation class according to the functional parameter data.
2. The parametric transaction processing method of claim 1, wherein obtaining parametric transaction data comprises:
parameter transaction data is obtained using a unified interface, wherein the unified interface utilizes a generic definition.
3. The parameter transaction processing method of claim 1, wherein performing field name transformation on the information parameter data comprises:
and performing field name transformation on the information parameter data according to a preset transformation rule, wherein the transformation rule comprises the association relation between the information parameter field and the unified field in each parameter transaction data.
4. The method of claim 1, wherein performing table entity class assignments based on the transformation results comprises:
and acquiring data corresponding to each field name in the conversion result by using Java reflection, and assigning the data to the table entity class.
5. A parameter transaction processing apparatus, comprising:
the system comprises an entrance module, a data processing module and a data processing module, wherein the entrance module is used for acquiring parameter transaction data, and the parameter transaction data comprises functional parameter data and information parameter data;
the parameter processing module is used for carrying out field name transformation on the information parameter data and carrying out table entity class assignment according to a transformation result;
and the database operation module is used for acquiring the path and the parameter table name stored in the table entity class by using Java reflection, acquiring the table operation class according to the path and the parameter table name, and performing database operation by using the table operation class according to the functional parameter data.
6. The parametric transaction processing apparatus of claim 5, wherein the portal module obtains parametric transaction data comprising:
parameter transaction data is obtained using a unified interface, wherein the unified interface utilizes a generic definition.
7. The parameter transaction processing apparatus of claim 5, wherein the processing module performs field name transformation on the information parameter data, comprising:
and performing field name transformation on the information parameter data according to a preset transformation rule, wherein the transformation rule comprises the association relation between the information parameter field and the unified field in each parameter transaction data.
8. The parameter transaction processing apparatus of claim 5, wherein the database operation module performs table entity class assignment based on the transformation result, including:
and acquiring data corresponding to each field name in the conversion result by using Java reflection, and assigning the data to the table entity class.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the parameter transaction processing method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores an executable computer program, which when executed by a processor implements the parameter transaction processing method of any one of claims 1 to 4.
CN201911415764.6A 2019-12-31 2019-12-31 Parameter transaction processing method and device, computer equipment and readable storage medium Active CN111159198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911415764.6A CN111159198B (en) 2019-12-31 2019-12-31 Parameter transaction processing method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911415764.6A CN111159198B (en) 2019-12-31 2019-12-31 Parameter transaction processing method and device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111159198A true CN111159198A (en) 2020-05-15
CN111159198B CN111159198B (en) 2024-04-19

Family

ID=70560166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911415764.6A Active CN111159198B (en) 2019-12-31 2019-12-31 Parameter transaction processing method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111159198B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339559A (en) * 2008-07-18 2009-01-07 北京航空航天大学 Long lasting implementing method for data
CN108304463A (en) * 2017-12-26 2018-07-20 中国广核电力股份有限公司 A kind of data managing method and its database application component for database
CN108845793A (en) * 2018-05-03 2018-11-20 蔡廷超 A kind of ORM design method and device
CN109725953A (en) * 2018-12-11 2019-05-07 山东浪潮通软信息科技有限公司 A kind of data interconnection method and system based on Java reflection technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339559A (en) * 2008-07-18 2009-01-07 北京航空航天大学 Long lasting implementing method for data
CN108304463A (en) * 2017-12-26 2018-07-20 中国广核电力股份有限公司 A kind of data managing method and its database application component for database
CN108845793A (en) * 2018-05-03 2018-11-20 蔡廷超 A kind of ORM design method and device
CN109725953A (en) * 2018-12-11 2019-05-07 山东浪潮通软信息科技有限公司 A kind of data interconnection method and system based on Java reflection technology

Also Published As

Publication number Publication date
CN111159198B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN109840429B (en) Intelligent contract deployment and calling method and device
US20140006459A1 (en) Rule-based automated test data generation
CN106033439A (en) Method and system for processing distributed transaction
US20130332449A1 (en) Generating data processing code from a directed acyclic graph
CN107704511B (en) A kind of SQL optimization method and equipment
CN110287170B (en) Database upgrading method, state data calling method, device and storage medium
CN110599341A (en) Transaction calling method and system
US20080115135A1 (en) Supporting ETL Processing in BPEL-Based Processes
CN112114818B (en) JAVA compiling method and device for expression
US9971794B2 (en) Converting data objects from multi- to single-source database environment
CN112380192B (en) Method and system for realizing object-oriented framework in database
CN115525534A (en) Test case generation method and platform based on swagger interface test
CN109766125B (en) Identification method and device for leveling conflict among batches
US11016830B2 (en) Entity-based service operation for object-based persistence
CN111159198A (en) Parameter transaction processing method and device, computer equipment and readable storage medium
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
US7007280B1 (en) Schema driven management of a component-based application
US20090144752A1 (en) Unmanaged-to-managed aggregation
CN107622070B (en) Database management method and device
CN112418796B (en) Sub-process task node activation method and device, electronic equipment and storage medium
CN113434435A (en) Test case logic automatic generation method and device
CN113656433A (en) Entity object extension method and device, electronic equipment and storage medium
CN113495723A (en) Method and device for calling functional component and storage medium
CN111160403A (en) Method and device for multiplexing and discovering API (application program interface)
CN111259047A (en) Data loading method, device, equipment and storage medium thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant