Cloud native application development platform interface management system
By adopting an interface management system on the cloud-native application development platform, and using Maven and Velocity to automatically generate and manage transaction interface classes, the problem of flexibility, performance and maintainability trade-offs in trading system development is solved, and efficient and reliable interface management and version control are achieved.
Patent Information
- Application Number
- CN202411659718.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-07
AI Technical Summary
In the development of trading systems, the existing technology faces the trade-offs of flexibility, performance and maintainability, resulting in low development efficiency, difficult version control and complex configuration.
The interface management system adopts the cloud-native application development platform, and uses the interface trading configuration file module, the interface management plug-in module and the transaction interface class usage module, combined with the open source tool Maven and the template engine Velocity, to achieve automated generation and management of transaction interface classes.
It simplifies the configuration of transaction interfaces, reduces the complexity brought about by the difference in packet formats, improves development efficiency and reliability, ensures the consistency and correctness of interface implementation, and simplifies the version management and release process.
Smart Images

Figure CN119576397A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of interface management, and specifically is an interface management system for a cloud native application development platform. Background Art
[0002] In the development of trading systems, facing the ever-changing business needs, developers need to balance flexibility, performance and maintainability in system design. There are usually two main ways to implement new trading requirements: statically typed trading object (Java Bean) development and dynamically configured XML file parsing.
[0003] Specifically, the existing technical solutions are as follows:
[0004] 1. Create a transaction object (Java Bean) based on the fields of the new transaction in the requirement document, and then set the transaction field data by constructing the transaction object.
[0005] 1. Create transaction objects: According to the requirements document, developers create corresponding Java Beans. For example, suppose a new transaction named NewTransaction is added, and the fields involved are transactionId, amount, and timestamp. You can create the following Java Bean.
[0006] 2. Processing transactions: When processing transactions, construct a NewTransaction object and set its field values.
[0007] 2. Configure the XML file according to the field information of the newly added transaction in the requirement document, load the XML file when the project starts, and obtain the transaction field information in the XML file for field parsing when parsing the message.
[0008] 1. Define XML configuration: The developer defines the XML configuration file of the transaction field according to the requirement document. Assuming that the same transaction NewTransaction is added, the following configuration can be defined in the XML file.
[0009] 2. Load and parse XML files: When the system starts, load and parse the XML configuration file and save the transaction field information into memory. You can use Java's SAX or DOM parser to process XML.
[0010] 3. Process transactions: Dynamically parse the fields configured in XML.
[0011] Technical problems of existing solutions:
[0012] The first form of creating transaction objects generally leads to slower development and affects the development progress of multiple developers reusing transaction interface services. In addition, transaction versions are difficult to control.
[0013] The second form of configuring XML files usually leads to different configuration methods due to different message formats, which increases the difficulty of configuration. In addition, this method is highly coupled with the platform and cannot be used independently of the platform. Summary of the invention
[0014] In view of the above problems, the present invention is proposed to provide a cloud-native application development platform interface management system that overcomes the above problems or at least partially solves the above problems.
[0015] To achieve the above object, the present invention adopts the following technical solutions:
[0016] A cloud native application development platform interface management system, the system comprising:
[0017] The interface transaction configuration file module is used to configure the transaction system file and generate the parameter configuration class of the transaction system;
[0018] The interface management plug-in module is used to create an interface management plug-in using the open source tool Maven and the open source template engine Velocity;
[0019] The transaction interface class uses modules to construct transaction business data and assemble messages according to the transaction interface class.
[0020] Optionally, the interface transaction profile module includes:
[0021] System file configuration unit, mainly configures the transaction communication protocol, transaction message format and business module version number, and is used to generate parameter configuration classes for the transaction system;
[0022] The common request and response message header file configuration unit of the transaction mainly configures the common message header fields of the transaction request and response, and is used to generate the common request and response classes of the transaction;
[0023] The transaction request and response message body file unit mainly configures the message body fields of the transaction request and response, and is used to generate the transaction request and response message body class and the transaction basic class.
[0024] Optional interface management plug-in modules include:
[0025] The historical file cleaning unit is used to clean up and delete the historically generated source code files and compiled files;
[0026] Generate source code unit, which is used to load the transaction interface file configured by the developer and generate source code project;
[0027] Compile and install to the local warehouse unit, which is used to compile the system business module source code project of the transaction and package it, and then install it to the local warehouse;
[0028] Deploy to remote warehouse unit, used to publish the transaction system business module source code project package to the remote warehouse.
[0029] Optionally, the interface management plug-in module generates Java source code by parsing the configuration file and using the template engine. The generated source code is the main output of the plug-in.
[0030] Optionally, the generated source code is integrated into the Maven project and becomes part of the project compilation and packaging. The Maven project uses the standard Maven build process to compile the source code and package it into a business module package.
[0031] Optionally, through Maven's dependency management mechanism, reference the business module package in the local or remote repository, and use the interface class generated in the business module package to construct transaction data.
[0032] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0033] 1. The configuration of the present invention is simple, and the transaction interface configurations of different message formats are the same, which reduces the complexity caused by the differences in message formats; it is easy to operate, and can be operated with one click through visual plug-in commands, which reduces the difficulty of operation, and can also be operated through Maven command scripting to reduce the difficulty of operation for version managers.
[0034] 2. The present invention can automatically generate transaction interface classes. Developers only need to reference these classes, construct business data, and call standardized tools to assemble transaction messages, thereby reducing complexity and improving reliability. For the same interface, different systems can reuse existing interfaces by directly referencing interface packages.
[0035] 3. The present invention can automatically generate a source code project that complies with the specifications based on the transaction interface file configured by the project personnel, ensure the consistency and correctness of the interface implementation, and reduce human errors; the publishing command provided by the plug-in automatically publishes the generated transaction business module package to the remote warehouse, simplifies the version management and publishing process of the module, and ensures that the dependencies between different modules are correct and the versions are controllable. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A schematic diagram of a cloud-native application development platform interface management system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0038] See also Figure 1 , this embodiment provides a cloud native application development platform interface management system, the system comprising:
[0039] The interface transaction configuration file module is used to configure the transaction system files and generate the parameter configuration class of the transaction system.
[0040] The interface transaction profile module includes:
[0041] The system file configuration unit mainly configures the transaction communication protocol, transaction message format, business module version number, etc., and is used to generate the parameter configuration class of the transaction system.
[0042] The common request and response message header file configuration unit of the transaction mainly configures the common message header fields of the transaction request and response, and is used to generate the common request and response classes of the transaction.
[0043] The transaction request and response message body file unit mainly configures the message body fields of the transaction request and response, and is used to generate the transaction request and response message body class and the transaction basic class.
[0044] The interface management plug-in module is used to create an interface management plug-in using the open source tool Maven and the open source template engine Velocity.
[0045] The interface management plug-in modules include:
[0046] The historical file cleaning unit is used to clean up and delete historically generated source code files and compiled files.
[0047] Generate source code unit, which is used to load the transaction interface file configured by the developer in the resources / comm-engine / interface directory and generate source code project.
[0048] Compile and install to the local warehouse unit, which is used to compile the system business module source code project of the transaction and package it, and then install it to the local warehouse.
[0049] Deploy to remote warehouse unit, used to publish the transaction system business module source code project package to the remote warehouse.
[0050] The interface management plug-in module generates Java source code by parsing the configuration file and using the template engine. The generated source code is the main output of the plug-in and is directly used as the code in the Maven (project management tool) project.
[0051] The generated source code is integrated into the Maven project and becomes part of the project compilation and packaging. The Maven project uses the standard Maven build process to compile these codes and package them into business module packages.
[0052] The compiled and packaged business module package is first installed to the local warehouse for local development. If sharing is required, the module package can be published to the remote warehouse through the deployment command of the interface management plug-in for reference by other team projects.
[0053] Developers use Maven's dependency management mechanism in their projects to reference business module packages in local or remote repositories, and use the interface classes generated in the business module packages to construct transaction data.
[0054] The cleanup command is responsible for cleaning up old versions of files and no longer needed builds throughout the process to ensure that the project and repository are clean.
[0055] The transaction interface class uses a module to construct transaction business data and assemble it into a message of the corresponding format according to the transaction interface class.
[0056] Developers use the transaction interface class by adding a reference to the transaction system business module package in the application project configuration file to construct transaction business data, and then assemble it into a message of the corresponding format based on the transaction interface class.
[0057] Specific implementation steps:
[0058] By using the open source tool Maven and combining it with the open source template engine Velocity, the interface management plug-in is created. Four commands are provided in the interface management plug-in: generate source code (generate), compile and install source code (install), deploy to remote warehouse (deploy), and clean up historical files (clean). The command to generate source code will generate source code projects according to the granularity of business modules based on the transaction interface file (csv file format) configured by the developer. The command to compile and install source code will compile and package the generated source code projects and install them to the local warehouse. The command to deploy to the remote warehouse will deploy the transaction business module package to the remote warehouse.
[0059] Transaction interface file configuration: Instructions for storing transaction files. Add a comm-engine / interface directory under the resources directory of the project to place the transaction interface files in a unified manner for easy migration and management. Under the interface directory, a system directory can be created according to the system. The system directory stores the public message header and system configuration files of the interface. If there are multiple modules in the system, a subdirectory can be created according to the module name. The module directory stores the interface message body configuration files.
[0060] System files are stored in the interface / *** / directory (*** represents the system name, such as interface / wechat / for WeChat banking system). The system files are used to configure the system communication protocol, message format, module version number and other parameters. When executing the next step of transaction business module code generation, the adapted code template will be selected according to the configuration to generate the source code project.
[0061] Transaction public message header file, which is stored in the interface / *** / directory (*** represents the system name, such as the WeChat banking system interface / wechat / ), mainly includes the public request transaction message header and response transaction message header. The transaction public message header file is used to configure the fields of the public part request and response messages of the transaction, and is used to assemble the message header part of the request and response messages.
[0062] Transaction message body files are stored in the interface / *** / xxx / directory (*** represents the system name, xxx represents the business module, for example, interface / wechat / beai / represents the beai business module of the wechat system). Transaction message body files are mainly used to configure the fields of the request and response message bodies in the transaction interface, and generate the basic class and message body object of the transaction object based on the configuration.
[0063] Interface management plug-in usage and implementation logic: The interface management plug-in (beanMaker) is created by using the open source tool Maven and the open source template engine Velocity. The interface management plug-in provides four commands: clean (clean historical files), generate (generate source code), install (compile and install to the local warehouse), and deploy (deploy to the remote warehouse).
[0064] The usage and implementation logic of the interface management plug-in operation command are as follows:
[0065] clean (clean historical files) is used to clean and delete historically generated source code files and compiled files. The implementation logic is to provide a clean command for a custom plug-in written in the open source tool Maven. When developers execute this command, they will obtain the source in the resources / comm-engine directory of the project where the plug-in is located and delete it to clean up historically generated source code and compiled temporary files.
[0066] generate (generate source code), the function is to load the transaction interface file configured by the developer in the resources / comm-engine / interface directory to generate the source code project by executing this command. The implementation logic is that when the developer executes this command, the first step is to load the configuration file in the resources / comm-engine / interface directory of the project where the interface management plug-in is located, the second step is to traverse the configuration files in all system folders under the interface directory, obtain the open source template engine Velocity template used to generate the system configuration class according to the communication protocol, assemble the system file field name and field value, and then generate the system configuration class; the third step is to assemble the transaction public message header data, and generate the transaction public message header class according to the transaction public message header template; the fourth step is to assemble the transaction message body data, and generate the transaction message body class and base according to the message body template and the base class template; the fifth step is to generate the project object model configuration file (pom.xml) through the template according to the system directory and module directory name and the version number configured in the system file, and the generation of the transaction system business module source code project is completed.
[0067] Install (compile and install to local warehouse) is used to compile the system business module source code project of the transaction and package it, and then install it to the local warehouse. The implementation logic is to call the installation command (install) of the open source software Maven, compile according to the object model configuration file (pom.xml) in the system business module source code project, and then install it to the local warehouse.
[0068] Deploy (deploy to remote warehouse) is used to publish the source code project package of the transaction system business module to the remote warehouse. The implementation logic is to call the deployment command (deploy) of the open source software Maven, and deploy the transaction system business module package to the remote private warehouse according to the project object model configuration file (pom.xml).
[0069] The configuration of this embodiment is concise, and the transaction interface configurations of different message formats are the same, which reduces the complexity caused by the differences in message formats; it is easy to operate, and can be operated with one click through visual plug-in commands, which reduces the difficulty of operation, and can also be operated through Maven command scripting to reduce the difficulty of operation for version managers.
[0070] This embodiment can automatically generate transaction interface classes. Developers only need to reference these classes, construct business data, and call standardized tools to assemble transaction messages, which reduces complexity and improves reliability. For the same interface, different systems can reuse existing interfaces by directly referencing interface packages.
[0071] This embodiment can automatically generate a source code project that complies with the specifications based on the transaction interface file configured by the project personnel, ensure the consistency and correctness of the interface implementation, and reduce human errors; the publishing command provided by the plug-in automatically publishes the generated transaction business module package to the remote warehouse, simplifies the version management and publishing process of the module, and ensures that the dependencies between different modules are correct and the versions are controllable.
[0072] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A cloud native application development platform interface management system, characterized in that: The system comprises: The interface transaction configuration file module is used to configure the transaction system file and generate the parameter configuration class of the transaction system; The interface management plug-in module is used to create an interface management plug-in using the open source tool Maven and the open source template engine Velocity; The transaction interface class uses modules to construct transaction business data and assemble messages according to the transaction interface class.
2. A cloud native application development platform interface management system as claimed in claim 1, characterized in that: The interface transaction profile module includes: System file configuration unit, mainly configures the transaction communication protocol, transaction message format and business module version number, and is used to generate parameter configuration classes for the transaction system; The common request and response message header file configuration unit of the transaction mainly configures the common message header fields of the transaction request and response, and is used to generate the common request and response classes of the transaction; The transaction request and response message body file unit mainly configures the message body fields of the transaction request and response, and is used to generate the transaction request and response message body class and the transaction basic class.
3. A cloud native application development platform interface management system as claimed in claim 1, characterized in that: The interface management plug-in modules include: The historical file cleaning unit is used to clean up and delete the historically generated source code files and compiled files; Generate source code unit, which is used to load the transaction interface file configured by the developer and generate source code project; Compile and install to the local warehouse unit, which is used to compile the system business module source code project of the transaction and package it, and then install it to the local warehouse; Deploy to remote warehouse unit, used to publish the transaction system business module source code project package to the remote warehouse.
4. A cloud native application development platform interface management system as claimed in claim 1, characterized in that: The interface management plug-in module generates Java source code by parsing the configuration file using the template engine. The generated source code is the main output of the plug-in.
5. A cloud native application development platform interface management system as claimed in claim 4, characterized in that: The generated source code is integrated into the Maven project and becomes part of the project compilation and packaging. The Maven project uses the standard Maven build process to compile the source code and package it into a business module package.
6. A cloud native application development platform interface management system as claimed in claim 5, characterized in that: Through Maven's dependency management mechanism, reference the business module package in the local or remote repository, and use the interface class generated in the business module package to construct transaction data.