Method, system, storage medium and electronic device for generating request message

By obtaining and processing the tree-like association data body in the business order and generating the request message, it solves the development complexity problem caused by the difference in synchronization message content of different business orders, and realizes message generation that can quickly adapt to a variety of business information. Improved development efficiency and reduced costs.

CN117556801BActive Publication Date: 2024-10-18WORLDCOM HENGQI (BEIJING) TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311635170.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2024-10-18
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

During the project business flow process, because the synchronization message content of each business order is different, different messages need to be developed separately, which increases the time cost and development complexity.

Method used

By obtaining the tree-like association data body in the business order information, select the target node, label it, input the business field and label information into the template engine, generate a request message, and use the Velocity template engine to generate a template that adapts to a variety of business information. message.

Benefits of technology

It achieves rapid generation of request messages, reduces the calculation process, improves development efficiency, saves maintenance costs, and reduces server power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117556801B_ABST
    Figure CN117556801B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, system, storage medium, and electronic device for generating request messages. The method includes: obtaining business fields and a data body containing a tree-like relationship based on business order information; the data body including the node containing the business field and multiple associated nodes; selecting a target node from the multiple associated nodes; labeling the node containing the business field and the target node; and inputting the original template of the business field and the fields at the labeled locations into a template engine to generate a request message. This method can adapt to business information from various business scenarios, reduce computational processes, improve development efficiency, save maintenance costs, reduce service usage, and reduce server power consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, system, storage medium and electronic device for generating a request message. Background Art

[0002] In the process of project business flow, the order synchronization process will be involved, but since the business information synchronized in each business order is different, the content of the order synchronization message is also different accordingly. If different messages need to be developed separately for different businesses each time, it will inevitably increase the time cost. Summary of the invention

[0003] In view of this, the purpose of the present disclosure is to provide a method, system, electronic device and storage medium for generating a request message, which can also quickly generate a request message when processing different services.

[0004] In order to achieve one of the above disclosed purposes, the present disclosure provides a method for generating a request message, the method comprising:

[0005] Based on the business order information, a business field and a data body containing a tree-like association relationship are obtained, wherein the data body contains a node where the business field is located and a plurality of associated nodes;

[0006] Selecting a target node from the plurality of associated nodes;

[0007] Labeling the node where the business field is located and the target node;

[0008] The original template of the business field and the field at the label are input into the template engine to generate a request message.

[0009] As a further improvement of an implementation manner of the present disclosure, the step of labeling the node where the business field is located and the target node includes:

[0010] Label the business field; traverse multiple associated nodes according to the tree-like association relationship of the data body to determine whether the associated node is a target node; in response to the associated node being a target node, determine whether the target node is labeled; in response to the target node not being labeled, label the target node; in response to the target node being labeled, trace back to the starting node of the edge where the current node is located in the data body along the edge, and query other associated nodes of the starting node; repeat the backtracking process until all the target nodes are traversed.

[0011] As a further improvement of an implementation mode of the present disclosure, the information at the tag is input into the template engine to generate a request message; including: obtaining the context of the Velocity template engine; filling the field at the tag into the context; the Velocity template engine generates the request message.

[0012] As a further improvement of an embodiment of the present disclosure, the business field and a data body containing a tree-like association relationship are obtained based on the order information, and the data body contains a node where the business field is located and multiple associated nodes; including: based on the order information, selecting a matching business field; the business field is connected to a parent node, and the parent node is connected to a parent node at an upper level, and multiple levels of parent nodes and their multiple levels of child nodes constitute the associated node.

[0013] As a further improvement of an implementation mode of the present disclosure, selecting a target node from the plurality of associated nodes further includes: selecting a parent node of the business field, and continuously selecting the parent node of the parent node at the previous level until the last parent node is selected.

[0014] In order to achieve another of the above disclosed objectives, the present disclosure provides a system for generating a request message, including:

[0015] A first acquisition module, based on the business order information, acquires a business field and a data body containing a tree-like association relationship, wherein the data body includes a node where the business field is located and a plurality of associated nodes;

[0016] A selection module, used for selecting a target node from the plurality of associated nodes;

[0017] A first labeling module, used to label the node where the business field is located and the target node;

[0018] The first generating module is used to input the original template of the business field and the field at the label into the template engine to generate a request message.

[0019] As a further improvement of an implementation mode of the present disclosure, the first marking module includes: a second marking module, configured to mark the business field with the label;

[0020] A first traversal module is used to traverse the plurality of associated nodes according to the tree-like association relationship of the data body, and determine whether the associated node is a target node;

[0021] A first response module, configured to determine whether the target node is marked in response to the associated node being the target node;

[0022] A second response module is used for, in response to the target node being marked, tracing back to the starting node of the connection edge along the connection edge where the current node is located in the data body, and querying other associated nodes of the starting node;

[0023] A third response module is used for, in response to the target node being marked, tracing back to the starting node of the connection edge along the connection edge where the current node is located in the data body, and querying other associated nodes of the starting node;

[0024] The second traversal module is used to repeat the backtracking process until all the target nodes are traversed.

[0025] As a further improvement of an embodiment of the present disclosure, the first generating module further includes:

[0026] The second acquisition module is used to obtain the context of the Velocity template engine;

[0027] A filling module, used to fill the fields at the tag into the context;

[0028] The second generating module is used for the Velocity template engine to generate the request message.

[0029] Based on the same inventive concept, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute any of the above-mentioned methods for generating a request message.

[0030] Based on the same inventive concept, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating a request message as described in any one of the above items is implemented.

[0031] Compared with the prior art, the technical effect of the present invention is: obtaining a data body containing related nodes according to business information and selecting the target node in the related nodes, and marking the label, inputting the font at the business field and the label into the template engine, and using the template engine to generate a request message, which can adapt to the business information of various businesses in turn, reduce the calculation process, improve development efficiency, save maintenance costs, reduce service occupancy and reduce server power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the implementation methods or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only implementation methods of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A flow chart of a method for generating a request message provided in one embodiment of the present disclosure;

[0034] Figure 2 A flowchart of obtaining a data body provided by another embodiment of the present disclosure;

[0035] Figure 3 A flowchart of labeling provided for another embodiment of the present disclosure;

[0036] Figure 4 A flowchart of utilizing a template engine provided for another embodiment of the present disclosure;

[0037] Figure 5 A schematic diagram of a system for generating a request message provided in an embodiment of the present disclosure;

[0038] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.

[0040] Embodiments It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

[0041] The embodiment of the present disclosure provides a method for generating a request message, which can improve the speed of generating a request message. Figure 1 As shown, the method for generating a request message includes the following steps:

[0042] Step S100, based on the business order information, obtain the business field and a data body containing a tree-like association relationship, the data body including a node where the business field is located and a plurality of associated nodes.

[0043] Specifically, the business order information is given as an example:

[0044] Business 1:

[0045] {"CREATE_DATE":"Generation time","INVOICE_TITLE_CODE":"Invoice type","ORDER_STATUS":"Order status","SEND_PROVINCE_NAME":"Delivery province name","USER_ID":"User id","OFFER_ID":"Product code","SEND_ADDRESS":"Consignee address","SEND_CUSNAME":"Consignee name","ORDER_ID":"Order number","ORDER_PAY_TIME":Payment time,"SEND_COUNTY_NAME":"Delivery area name","SOURCE":"Order source","PROV_CODE":"Province code","CUST_NAME":"Customer name","SEND_CITY_NAME":"Delivery city name"}.

[0046] Business 2:

[0047] {"CREATE_DATE":"Generation time","INVOICE_TITLE_CODE":"Invoice type","ORDER_STATUS":"Order status","SEND_PROVINCE_NAME":shipping province name","USER_ID":"user id","OFFER_ID":"product code","SEND_ADDRESS":"consignee address","SEND_CUSNAME":"consignee name","ORDER_ID":"order number","USER_EMAIL":"user email","ALTERNATE_NUMBER":"alternative contact person","BUSINESS_TYPE":"business type"}.

[0048] The categories such as generation time and invoice type are business fields, and the business field is part of the data body of the tree-like association relationship. The specific content of the business field also has a higher-level concept.

[0049] In one possible implementation of the present disclosure, for step S100, Figure 2 As shown, it also includes:

[0050] Step S110, selecting a matching business field based on the order information.

[0051] Specifically, the order information refers to specific information, and the matching business field is the type of its information. For example, if the order information is a specific time, the matching business field is the generation time. If the order information also has another specific time, the matching business field is the payment time, etc.

[0052] Step S120, the business field is connected to the parent node, the parent node is connected to the parent node of the next higher level, and the multi-level parent nodes and their multi-level child nodes constitute an associated node.

[0053] Specifically, in an ordering system, the hierarchical relationship of business fields can be used to represent complex business data and information to better organize and manage data.

[0054] It should be noted that business fields have complex hierarchical relationships. Examples of hierarchical relationships of business fields include nested fields, hierarchical structures, or association relationships. Nested fields refer to certain business fields that may contain other fields as their subfields. Hierarchical structures refer to the existence of hierarchical structures between business fields, that is, one field may be the parent field or child field of another field. Data association refers to the existence of data associations between business fields, that is, the value of one field may be associated with the values ​​of other fields.

[0055] In a hierarchical relationship, the parent node is the parent node and the child node is the next node. Parent nodes are used to organize and manage data in data structures and business fields, establish hierarchical relationships between data, and support operations such as query, update, and delete data. At the same time, parent nodes can also be used to associate different data records and entities and establish a relationship network between data to better understand and manage business processes.

[0056] Step S200: selecting a target node from a plurality of associated nodes.

[0057] Specifically, the selected associated node to be displayed is the target node, that is, the associated node where the business information to be displayed is located.

[0058] It should be noted that, according to order requirements, any associated node may be selected as the target node, and specific examples may include any associated nodes in the data body, such as the parent node of the business field, the parent node of the parent node, and other child nodes of the parent node.

[0059] In one possible implementation of the present disclosure, step S200 further includes:

[0060] Step S210 , selecting the parent node of the business field, and continuously selecting the parent node of the parent node until the last parent node is selected.

[0061] In some embodiments of the process of selecting the target node, the parent node of the business field and the parent node of the parent node are directly followed to select the upper level associated node as the target node, that is, directly displaying the upper level information and the upper level information of the business information in the request message.

[0062] Step S300: label the node where the business field is located and the target node.

[0063] Specifically, the marked tag refers to a display tag, and the information marked by the displayed tag will be displayed in the final request message and selected as reference information for generating the request message.

[0064] In one possible implementation of the present disclosure, for step S300, Figure 3 As shown, it also includes:

[0065] Step S310: label the business field.

[0066] Step S320, traverse multiple associated nodes according to the tree-like association relationship of the data body, and determine whether the associated node is a target node.

[0067] Specifically, the business field follows the edge of the tree-like association relationship to query whether the upper-level association node is the target node.

[0068] Step S330 , in response to the associated node being a target node, determining whether the target node is marked.

[0069] Step S340: In response to the target node not being labeled, label the target node.

[0070] Specifically, after marking the label, continue to query the associated node of the previous level, continue to mark the label of the previous level, traverse the associated nodes along the depth of the tree, and query the branches of the data body as deep as possible.

[0071] Step S350, in response to the target node being marked, trace back along the edge where the current node is located in the data body to the starting node of the edge, and query other associated nodes of the starting node.

[0072] Specifically, if all the edges where the current target node is located have been queried, trace back along the edge to the starting node of the edge, and continue to query whether other associated nodes are target nodes and whether they have been marked.

[0073] Step S360, repeat the backtracking process until all target nodes are traversed.

[0074] Specifically, the backtracking process is the process of backtracking and querying the starting node of the edge in step S350, and the marking ends when all target nodes are queried.

[0075] Step S400: input the original template of the business field and the field at the tag into the template engine to generate a request message.

[0076] Specifically, the original template refers to a template file that is not processed by a template engine. It is usually a simple text file that contains static text content and some placeholders. The original template file is loaded into the template engine. The template engine parses the original template and provides fields at the tags to replace the placeholders in the original template, thereby generating the final request message.

[0077] In one possible implementation of the present disclosure, for step S400, Figure 4 As shown, it also includes:

[0078] Step S 410, obtaining the context of the Velocity template engine.

[0079] Step S420, fill the field at the tag into the context.

[0080] Step S430: The Velocity template engine generates a request message.

[0081] Specifically, Velocity template engine is used to generate request message. Velocity is a Java-based template engine. It can simply use template language to reference objects defined by Java code, referred to as VTL. When Velocity template engine is applied to web development, interface designers can develop a web site that follows MVC architecture simultaneously with Java program developers. That is to say, page designers can only focus on the display effect of the page, while Java program developers focus on business logic coding. Velocity template engine separates Java code from web pages, which facilitates the long-term maintenance of web sites and provides us with an alternative solution besides JSP and PHP. The capabilities of Velocity template engine are far more than just web site development. For example, it can generate SQL, PostScript, and XML from templates, and can also be used as an independent tool to generate source code and reports, or as an integrated component of other systems. Velocity can also provide template service (templateservice) for Turbine web development architecture. Velocity+Turbine provides a template service to allow a web application to be developed in a true MVC model.

[0082] By using the Velocity template engine, you can use template files and data to generate dynamic text content, thereby improving development efficiency and content maintainability. The Velocity template engine provides rich syntax and functions, which can more easily handle complex text generation tasks.

[0083] Another embodiment of the present disclosure discloses a system for generating a request message, such as Figure 5 As shown, including:

[0084] The first acquisition module 100 is used to acquire a business field and a data body containing a tree-like association relationship based on the business order information, wherein the data body includes a node where the business field is located and multiple associated nodes;

[0085] A selection module 200 is used to select a target node from a plurality of associated nodes;

[0086] The first labeling module 300 is used to label the node where the business field is located and the target node.

[0087] The first generating module 400 is used to input the original template of the business field and the field at the tag into the template engine to generate a request message.

[0088] In a feasible implementation manner, the first marking module 300 in the system for generating a request message further includes:

[0089] The second marking module is used to mark the business field with the label.

[0090] The first traversal module is used to traverse the plurality of associated nodes according to the tree-like association relationship of the data body, and determine whether the associated node is a target node.

[0091] The first response module is used for determining whether the target node is marked in response to the associated node being the target node.

[0092] The second response module is used for tracing back to the starting node of the connection edge along the connection edge where the current node is located in the data body in response to the target node being marked, and querying other associated nodes of the starting node.

[0093] The third response module is used for tracing back to the starting node of the connection edge along the connection edge where the current node is located in the data body in response to the target node being marked, and querying other associated nodes of the starting node.

[0094] The second traversal module is used to repeat the backtracking process until all the target nodes are traversed.

[0095] In a feasible implementation manner, the first generation module further includes:

[0096] The second acquisition module is used to obtain the context of the Velocity template engine.

[0097] A filling module is used to fill the fields at the tag into the context.

[0098] The second generating module is used for the Velocity template engine to generate the request message.

[0099] Based on the same inventive concept, corresponding to any of the above-mentioned implementation methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating an order request described in any of the above implementation methods is implemented.

[0100] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0101] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the implementation methods of this specification.

[0102] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0103] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0104] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0105] The bus 1050 includes pathways that transmit information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0106] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the implementation scheme of this specification, and does not necessarily include all the components shown in the figure.

[0107] The electronic device of the above-mentioned embodiment is used to implement the corresponding method of generating an order request in any of the above-mentioned embodiments, and has the beneficial effects of the corresponding method implementation, which will not be repeated here.

[0108] Based on the same inventive concept, corresponding to any of the above-mentioned implementation methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method of generating a request message as described in any of the above implementation methods.

[0109] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0110] The computer instructions stored in the storage medium of the above-mentioned embodiments are used to enable the computer to execute the method of generating an order request as described in any of the above-mentioned embodiments, and have the beneficial effects of the corresponding method implementation methods, which will not be repeated here.

[0111] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. This narrative style of the specification is only for the sake of clarity, and those skilled in the art should take the specification as a whole. Under the concept of the present disclosure, the above embodiments or the technical features in different embodiments may be appropriately combined, the steps may be implemented in any order, and there are many other variations of different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.

[0112] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0113] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0114] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and principles of the embodiments of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

1. A method for generating a request message, characterized in that: The method comprises: Based on the business order information, a business field and a data body containing a tree-like association relationship are obtained, wherein the data body contains a node where the business field is located and a plurality of associated nodes; Selecting a target node from the plurality of associated nodes; Labeling the node where the business field is located and the target node; Inputting the original template of the business field and the field at the label into the template engine to generate a request message; The labeling of the node where the business field is located and the target node includes: Labeling the business fields; According to the tree-like association relationship of the data body, traverse the plurality of association nodes to determine whether the association node is a target node; In response to the associated node being a target node, determining whether the target node is marked; In response to the target node not being labeled, labeling the target node; In response to the target node being marked, tracing back along the edge where the current node is located in the data body to the starting node of the edge, and querying other associated nodes of the starting node; Repeat the backtracking process until all the target nodes are traversed; Based on the order information, a business field and a data body containing a tree-like association relationship are obtained, wherein the data body contains a node where the business field is located and multiple associated nodes; including: Based on the order information, select matching business fields; The business field is connected to a parent node, the parent node is connected to a parent node at a higher level, and multiple levels of parent nodes and their multiple levels of child nodes constitute the associated node; The step of inputting the original template of the business field and the field at the label into the template engine to generate a request message comprises: The original template file is loaded into the template engine. The template engine parses the original template and provides the fields at the tags to replace the placeholders in the original template, thereby generating the final request message. The selecting a target node from the plurality of associated nodes comprises: Select the associated node where the business information to be displayed is located; The tag refers to a display tag, and the information marked by the displayed tag will be displayed in the request message and selected as reference information for generating the request message.

2. The method for generating a request message according to claim 1, characterized in that: Inputting the original template of the business field and the field at the label into the template engine to generate a request message, including: Get the context of the Velocity template engine; Fill the fields at the tag into the context; The Velocity template engine generates the request message.

3. The method for generating a request message according to claim 1, characterized in that: Selecting a target node from the plurality of associated nodes also includes: The parent node of the business field is selected, and the parent node of the parent node of the previous level is continuously selected until the last parent node is selected.

4. A system for generating a request message, applied to the method for generating a request message according to any one of claims 1 to 3, characterized in that: include: A first acquisition module, based on the business order information, acquires a business field and a data body containing a tree-like association relationship, wherein the data body includes a node where the business field is located and a plurality of associated nodes; A selection module, used for selecting a target node from the plurality of associated nodes; A first labeling module, used to label the node where the business field is located and the target node; A first generating module, used for inputting the original template of the business field and the field at the label into a template engine to generate a request message; The first marking module includes: A second marking module, used for marking the business field with the label; A first traversal module is used to traverse the plurality of associated nodes according to the tree-like association relationship of the data body, and determine whether the associated node is a target node; A first response module, configured to determine whether the target node is marked in response to the associated node being the target node; A second response module is used for, in response to the target node being marked, tracing back to the starting node of the connection edge along the connection edge where the current node is located in the data body, and querying other associated nodes of the starting node; A third response module is used for, in response to the target node being marked, tracing back to the starting node of the connection edge along the connection edge where the current node is located in the data body, and querying other associated nodes of the starting node; A second traversal module, used for repeating the backtracking process until all the target nodes are traversed; Based on the order information, a business field and a data body containing a tree-like association relationship are obtained, wherein the data body contains a node where the business field is located and multiple associated nodes; including: Based on the order information, select matching business fields; The business field is connected to a parent node, the parent node is connected to a parent node at a higher level, and multiple levels of parent nodes and their multiple levels of child nodes constitute the associated node; The step of inputting the original template of the business field and the field at the label into the template engine to generate a request message comprises: The original template file is loaded into the template engine. The template engine parses the original template and provides the fields at the tags to replace the placeholders in the original template, thereby generating the final request message. The selecting a target node from the plurality of associated nodes comprises: Select the associated node where the business information to be displayed is located; The tag refers to a display tag, and the information marked by the displayed tag will be displayed in the request message and selected as reference information for generating the request message.

5. The system for generating a request message according to claim 4, characterized in that: The first generation module also includes: The second acquisition module is used to obtain the context of the Velocity template engine; A filling module, used to fill the fields at the tag into the context; The second generating module is used for the Velocity template engine to generate the request message.

6. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 3.

7. An electronic device, characterized in that: include: Processor and memory; The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Report generation method and device and electronic equipment

    CN111708801A

  • Message storage method and device based on structured document

    CN112785284A

  • Customs message generation method and device

    CN115526587A

  • Method and device for generating request message, storage medium and electronic equipment

    CN115686499A

  • Processing method and device for payment process, medium and electronic device

    WO2020029971A1