SOA-oriented online transaction message processing apparatus and method

CN115291847BActive Publication Date: 2026-08-07CHINA CONSTRUCTION BANK
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2022-07-28
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]在面向SOA的系统中,随着业务需求的不断增长,系统页面越来越呈现出个性化,多样化,现有联机交易报文处理装置的接口注册过多,重复的配置项增多,由此带来重复工作量的增加

Benefits of technology

[0018]本发明实施例中,前端在通过前端页面收到用户的点击菜单命令后,触发一次联机交易,生成请求报文,并发送至后端,所述请求报文包括事件编号;在接收到响应报文后,将html代码渲染至空白jsp上;后端接收到请求报文后,通过事件分发器,获得请求报文中的事件编号对应的业务逻辑,基于所述业务逻辑,获得html代码,并添加至响应报文中,将响应报文反馈至前端。与现有技术中每次都采用不同的注册接口,且前后端耦合的技术方案相比,后端通过事件分发器,直接进行业务处理,不用调用不同的注册接口,可以实现前后端解耦,便于扩展和修改。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115291847B_ABST
    Figure CN115291847B_ABST
Patent Text Reader

Abstract

The application discloses a kind of online transaction message processing device and method for SOA, it is applied to software design technical field, the device includes: front end, for after receiving the click menu command of user by front end page, trigger once online transaction, generate request message, and send to rear end, the request message includes event number;After receiving response message, html code is rendered to blank jsp;Rear end, for after receiving request message, obtain the business logic corresponding to the event number in request message by event distributor, obtain html code based on the business logic, and add to response message, response message is fed back to front end.The application can realize the online transaction message processing for SOA, reduce the coupling of front end and rear end, facilitate extension and modification, and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software design technology, and in particular to an online transaction message processing apparatus and method for SOA. Background Technology

[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.

[0003] Application platform online transaction messages are data units for message exchange and transmission in online transactions, containing complete data information that needs to be sent.

[0004] In SOA-oriented systems, as business needs continue to grow, system pages are becoming increasingly personalized and diversified. Existing online transaction message processing devices have too many interface registrations and more duplicate configuration items, resulting in an increase in repetitive workload. Summary of the Invention

[0005] This invention provides an online transaction message processing apparatus for SOA, which reduces the coupling between the front-end and back-end, facilitates expansion and modification, and has high efficiency. The apparatus includes:

[0006] The front-end is used to trigger an online transaction after receiving a user's click menu command through the front-end page, generate a request message, and send it to the back-end. The request message includes an event number. After receiving the response message, the front-end renders the HTML code onto a blank JSP.

[0007] The backend, upon receiving a request message, obtains the business logic corresponding to the event number in the request message through the event dispatcher; based on the business logic, it obtains the HTML code and adds it to the response message; and then sends the response message back to the frontend.

[0008] This invention also provides an online transaction message processing method for SOA, applied to the front end, to implement SOA-oriented online transaction message processing, reduce the coupling between the front end and the back end, facilitate expansion and modification, and achieve high efficiency. The method includes:

[0009] After receiving a user's click menu command through the front-end page, an online transaction is triggered, a request message is generated, and sent to the back-end. The request message includes an event number. After receiving the request message, the back-end obtains the business logic corresponding to the event number in the request message through the event dispatcher, obtains the HTML code based on the business logic, adds it to the response message, and sends the response message back to the front-end.

[0010] After receiving the response message, render the HTML code onto a blank JSP.

[0011] This invention also provides an online transaction message processing method for SOA, applied to the backend, to implement SOA-oriented online transaction message processing, reduce the coupling between the frontend and backend, facilitate expansion and modification, and achieve high efficiency. The method includes:

[0012] After receiving the request message, the business logic corresponding to the event number in the request message is obtained through the event dispatcher; the request message is generated by the front end after receiving the user's click menu command through the front end page, triggering an online transaction, and the request message includes the event number;

[0013] Based on the aforementioned business logic, obtain the HTML code and add it to the response message;

[0014] The response message is sent back to the front end; after receiving the response message, the front end renders the HTML code onto a blank JSP.

[0015] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described online transaction message processing method for SOA.

[0016] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described SOA-oriented online transaction message processing method.

[0017] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described SOA-oriented online transaction message processing method.

[0018] In this embodiment of the invention, after receiving a user's click menu command through the front-end page, the front-end triggers an online transaction, generates a request message, and sends it to the back-end. The request message includes an event number. After receiving the response message, the front-end renders HTML code onto a blank JSP. Upon receiving the request message, the back-end obtains the business logic corresponding to the event number in the request message through an event dispatcher. Based on this business logic, it obtains the HTML code, adds it to the response message, and sends the response message back to the front-end. Compared to existing technologies that use different registration interfaces each time and have a highly coupled front-end and back-end, the back-end directly processes business logic through the event dispatcher without calling different registration interfaces, achieving decoupling between the front-end and back-end and facilitating expansion and modification. Attached Figure Description

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

[0020] Figure 1 This is a schematic diagram of an online transaction message processing device for SOA in an embodiment of the present invention;

[0021] Figure 2 This is a schematic diagram of the message structure in an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of the front-end page in an embodiment of the present invention;

[0023] Figure 4 This is an example of configuring a response page template in the database in an embodiment of the present invention;

[0024] Figure 5 This is an example of a response message in an embodiment of the present invention;

[0025] Figure 6 The flowchart below illustrates the online transaction message processing method for SOA in this embodiment of the invention.

[0026] Figure 7 This is a flowchart of another SOA-oriented online transaction message processing method in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0028] First, the terminology involved in this invention will be explained.

[0029] Transaction interface: This is an online service function provided by a platform or component to the outside world. It is used to constrain the message structure, communication protocol, and interaction method of the two parties involved in the interaction. It is an identifier for providing services between various components of the system and has global uniqueness.

[0030] Figure 1 This is a schematic diagram of an online transaction message processing device for SOA in an embodiment of the present invention, including:

[0031] Frontend 101 is used to trigger an online transaction after receiving a user's click menu command through the frontend page, generate a request message, and send it to the backend. The request message includes an event number. After receiving the response message, it renders the HTML code onto a blank JSP.

[0032] Backend 102 is used to receive a request message, obtain the business logic corresponding to the event number in the request message through the event dispatcher, obtain the HTML code based on the business logic, add it to the response message, and send the response message back to the frontend.

[0033] In this embodiment of the invention, the front-end and back-end are deployed separately. Referring to the MVC pattern, the front-end is only responsible for displaying the menus and data of various business functions and the logic for navigation between pages, which can be called the view layer. The back-end is responsible for providing business logic processing, data querying, core interface calls, etc., which are the control layer and model layer. This achieves decoupling between the front-end and back-end, facilitating expansion and modification.

[0034] Figure 2 This is a schematic diagram of the message structure in an embodiment of the present invention, including request messages and response messages.

[0035] Logical header: Contains technical information related to message transmission and control, used to solve message transmission and control problems, and its element definitions are usually fixed.

[0036] The logical message body contains information about the business elements required for the transaction, and these elements vary depending on the service.

[0037] Logical piggyback message portion: Piggyback information transmitted along with the message at the end of the message, usually defined end-to-end.

[0038] Figure 3 This is a schematic diagram of the front-end page in an embodiment of the present invention. There are three menus that can be clicked: Menu 1, Menu 2, and Menu 3. The user can obtain the menu command by clicking any one of the menus. In addition, the user can also obtain the menu command through button clicks, a drop-down box's onChange action, an input box's onBlur action, and so on.

[0039] Menu commands can trigger an online transaction, generate a request message, and send it to the backend. The request message includes a menu number, an event number, and a parameter list.

[0040] Menu ID (menu_id): Used to identify the parent menu item of the page. The menu ID should be globally unique within the device.

[0041] Event ID (event_id): Used to identify the request message generated when an online transaction is triggered on the page. The request message is an HTTP request.

[0042] Parameter list: (param_list): The parameters that need to be passed to the backend for this event are placed in the parameter list tag as JSON strings.

[0043] Specifically, after receiving the request message, the backend obtains the business logic corresponding to the event number in the request message through the event dispatcher.

[0044] In one embodiment, the event dispatcher is a registration online service interface, which can be implemented using a Java class method. That is, unlike traditional interface registration methods, this invention only requires registering one registration online service interface. This registration online service interface serves as the backend entry point. The Java class obtains the corresponding business logic based on the event number. During development, each business logic corresponds to an action and is implemented separately.

[0045] In this embodiment of the invention, the backend needs to obtain the HTML code based on the business logic. One embodiment is given below.

[0046] In one embodiment, the backend is specifically used for:

[0047] Execute the business logic to obtain the business parameter value corresponding to the event number;

[0048] Obtain the response page template corresponding to the event number in the request message;

[0049] Match the business parameter values ​​with the response page template to obtain the HTML code.

[0050] In one embodiment, the backend is further configured to: store the business parameter value corresponding to the obtained event number in the database; query the response page template corresponding to the event number in the request message from the database; and read the business parameter value corresponding to the event number from the database and match it with the queried response page template.

[0051] In addition, the backend is specifically used to execute the business logic based on the parameter list.

[0052] The response page template can be configured in the database, and the response page template engine can be implemented using FreeMarker. Other configurations can also be made within the response page template. Figure 4This example illustrates configuring a response page template in the database according to an embodiment of the present invention. The database fields should include: Menu ID (MENU_ID), Event ID (EV_ID), Event Name (EV_DSC), and Page Content (PGFC_DEF). The primary key and unique index design can be customized based on actual business needs, combining the Menu ID and Event ID, or the Event ID can be set as a globally unique identifier. Since the page content is stored in the HTML template file, which is quite long, it can be loaded using a CLOB (Oracle) or TEXT (MySQL) database.

[0053] Figure 5 As an example of a response message in an embodiment of the present invention, after the front end receives the response message, it renders the HTML code onto a blank JSP, thus completing a complete HTTP request process.

[0054] In summary, the device proposed in the embodiments of the present invention has the following beneficial effects:

[0055] 1. Reduce collaboration between the front-end and back-end, especially since front-end page development and back-end logic development belong to different teams, thereby reducing communication costs.

[0056] 2. By using responsive page templates, rapid iterative development can be achieved, shortening the development cycle and reducing the waiting time for services to start after changes.

[0057] 3. Store response page templates and business parameter values ​​in a database to avoid excessive API registrations and JSP pages, while enabling dynamic page expansion without service changes. Business logic is moved to the backend, with the frontend only responsible for rendering and displaying the pages, achieving decoupling and facilitating expansion and modification.

[0058] This invention also proposes an online transaction message processing method for SOA, the principle of which is similar to that of the online transaction message processing device for SOA, and will not be described in detail here.

[0059] Figure 6 The flowchart of the online transaction message processing method for SOA in this embodiment of the invention, applied to the front end, includes:

[0060] Step 601: After receiving the user's click menu command through the front-end page, an online transaction is triggered, a request message is generated, and sent to the back-end. The request message includes an event number. After receiving the request message, the back-end obtains the business logic corresponding to the event number in the request message through the event dispatcher, obtains the HTML code based on the business logic, adds it to the response message, and sends the response message back to the front-end.

[0061] Step 602: After receiving the response message, render the HTML code onto a blank JSP.

[0062] In one embodiment, the event dispatcher is a registered online service interface.

[0063] In one embodiment, the backend is specifically used for:

[0064] Execute the business logic to obtain the business parameter value corresponding to the event number;

[0065] Obtain the response page template corresponding to the event number in the request message;

[0066] Match the business parameter values ​​with the response page template to obtain the HTML code.

[0067] In one embodiment, the backend is further configured to: store the business parameter value corresponding to the obtained event number in the database; query the response page template corresponding to the event number in the request message from the database; and read the business parameter value corresponding to the event number from the database and match it with the queried response page template.

[0068] In one embodiment, the request message further includes a menu number and a parameter list.

[0069] The backend is specifically used to execute the business logic based on the parameter list.

[0070] Figure 7 This is a flowchart of another SOA-oriented online transaction message processing method in an embodiment of the present invention, applied to the backend, including:

[0071] Step 701: After receiving the request message, the business logic corresponding to the event number in the request message is obtained through the event dispatcher; the request message is generated by the front end after receiving the user's click menu command through the front end page, triggering an online transaction, and the request message includes the event number;

[0072] Step 702: Based on the business logic, obtain the HTML code and add it to the response message;

[0073] Step 703: The response message is sent back to the front end; after receiving the response message, the front end renders the HTML code onto a blank JSP.

[0074] In one embodiment, the event dispatcher is a registered online service interface.

[0075] In one embodiment, obtaining HTML code based on the business logic includes:

[0076] Execute the business logic to obtain the business parameter value corresponding to the event number;

[0077] Obtain the response page template corresponding to the event number in the request message;

[0078] Match the business parameter values ​​with the response page template to obtain the HTML code.

[0079] In one embodiment, after obtaining the business parameter value corresponding to the event number, the method further includes: storing the obtained business parameter value corresponding to the event number in a database;

[0080] Obtain the response page template corresponding to the event number in the request message, including: querying the database for the response page template corresponding to the event number in the request message;

[0081] Matching the business parameter values ​​and the response page template includes: reading the business parameter values ​​corresponding to the event number from the database and matching them with the queried response page template.

[0082] In one embodiment, the request message further includes a menu number and a parameter list.

[0083] Executing the business logic includes: executing the business logic according to the parameter list.

[0084] In summary, the method proposed in the embodiments of the present invention has the following beneficial effects:

[0085] 1. Reduce collaboration between the front-end and back-end, especially since front-end page development and back-end logic development belong to different teams, thereby reducing communication costs.

[0086] 2. By using responsive page templates, rapid iterative development can be achieved, shortening the development cycle and reducing the waiting time for services to start after changes.

[0087] 3. Store response page templates and business parameter values ​​in a database to avoid excessive API registrations and JSP pages, while enabling dynamic page expansion without service changes. Business logic is moved to the backend, with the frontend only responsible for rendering and displaying the pages, achieving decoupling and facilitating expansion and modification.

[0088] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described online transaction message processing method for SOA.

[0089] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described SOA-oriented online transaction message processing method.

[0090] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described SOA-oriented online transaction message processing method.

[0091] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can 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, etc.) containing computer-usable program code.

[0092] This 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 block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0095] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An online transaction message processing device for SOA, characterized in that, include: The front-end is used to trigger an online transaction after receiving a user's click menu command through the front-end page, generate a request message, and send it to the back-end. The request message includes an event number. After receiving the response message, the front-end renders the HTML code onto a blank JSP. The backend, upon receiving a request message, obtains the business logic corresponding to the event number in the request message through an event dispatcher; based on the business logic, it obtains the HTML code and adds it to the response message; and then sends the response message back to the frontend. The front-end and back-end are decoupled; Specifically, the backend is used to: execute the business logic, obtain the business parameter value corresponding to the event number; and obtain the response page template corresponding to the event number in the request message. Match the business parameter values ​​with the response page template to obtain the HTML code; Store the business parameter values ​​corresponding to the obtained event numbers in the database; The database fields include menu number, event number, event name, and page content; the database is used to retrieve the response page template corresponding to the event number in the request message. The business parameter values ​​corresponding to the event numbers read from the database are matched with the queried response page templates.

2. The apparatus as claimed in claim 1, characterized in that, The event dispatcher is a registered online service interface.

3. The apparatus as described in claim 1, characterized in that, The request message also includes a menu number and a parameter list. The backend is specifically used to execute the business logic based on the parameter list.

4. A method for processing online transaction messages for SOA, characterized in that, Applied to front-end, including: After receiving a user's click menu command through the front-end page, an online transaction is triggered, a request message is generated, and sent to the back-end. The request message includes an event number. After receiving the request message, the back-end obtains the business logic corresponding to the event number in the request message through the event dispatcher, obtains the HTML code based on the business logic, adds it to the response message, and sends the response message back to the front-end. After receiving the response message, render the HTML code onto a blank JSP; The front-end and back-end are decoupled; The backend executes the business logic to obtain the business parameter value corresponding to the event number; obtains the response page template corresponding to the event number in the request message; matches the business parameter value and the response page template to obtain the HTML code; stores the obtained business parameter value corresponding to the event number in the database; the database fields include menu number, event number, event name, and page content; queries the database for the response page template corresponding to the event number in the request message; and matches the business parameter value corresponding to the event number read from the database with the queried response page template.

5. A method for processing online transaction messages for SOA, characterized in that, Applied to the backend, including: After receiving the request message, the business logic corresponding to the event number in the request message is obtained through the event dispatcher; the request message is generated by the front end after receiving the user's click menu command through the front end page, triggering an online transaction, and the request message includes the event number; Based on the aforementioned business logic, obtain the HTML code and add it to the response message; The response message is sent back to the front end; after receiving the response message, the front end renders the HTML code onto a blank JSP. The front-end and back-end are decoupled; The method further includes: Execute the business logic to obtain the business parameter value corresponding to the event number; obtain the response page template corresponding to the event number in the request message; match the business parameter value and the response page template to obtain the HTML code; store the obtained business parameter value corresponding to the event number in the database; the database fields include menu number, event number, event name, and page content; query the database for the response page template corresponding to the event number in the request message; match the business parameter value corresponding to the event number read from the database with the queried response page template.

6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the method of claim 4 or 5.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of claim 4 or 5.

8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of claim 4 or 5.

Citation Information

Patent Citations

  • System testing method and device and electronic equipment

    CN111427796A