Java service logic visualization method and device, electronic equipment and storage medium

Through the Java business logic visualization method, the EL expression logical structure is generated using drag and drop operations and parameter configuration, which solves the repetition and maintenance problems of business logic encoding in Java Web services, realizes efficient development and maintenance, and reduces costs and Workload.

CN119512530APending Publication Date: 2025-02-25北京艾迪信科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411668958.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art has problems with repetitive work and maintenance difficulties in business logic encoding in Java Web services, and the generated code cannot be effectively maintained and edited.

Method used

By providing a Java business logic visualization method, a flow chart is generated using drag and drop operations and parameter configuration, and converted into an EL expression logic structure to realize the visual definition and maintenance of business logic.

Benefits of technology

It effectively reduces the duplicate coding work of Java application projects, saves development costs, reduces development thresholds, avoids coding errors and testing workload, and the business logic can take effect immediately without restarting the service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512530A_ABST
    Figure CN119512530A_ABST
Patent Text Reader

Abstract

The invention discloses a Java service logic visualization method, which comprises the following steps of: displaying a service logic visualization flow chart in response to a dragging operation and a flow direction indication line generation operation of an initialization execution module and a service execution module; in response to a configuration operation of the parameter configuration unit, obtaining a target service execution module and a target initialization execution module; generating a set array according to the json object; generating an EL expression logic structure according to the set array; and transmitting the EL expression parameters in the set array to the function correspondingly to obtain a target EL expression. According to the method, logic definition is carried out in a visual configuration mode, repeated coding work of Java application items is further effectively reduced, and the test workload can also be greatly reduced. According to the business logic developed by using the method disclosed by the invention, the service does not need to be restarted, and the operation and maintenance cost for updating and upgrading the Java service is saved. The invention further discloses a device for implementing the method, electronic equipment and a computer readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic and computer technology, and in particular to a Java business logic visualization method, device, electronic equipment and storage medium. Background Art

[0002] Currently, most Web applications and mobile application services are implemented in Java. The emergence of various Spring components has effectively saved some time writing Java Web framework-related codes. In fact, the business logic codes in most Java Web applications also have relatively fixed patterns, such as: getting data from a data source, responding to requests after looping, and reading and writing files. With the development of Java technology, common operations such as getting data from various data sources, writing data to various data sources, and reading and writing files to various file systems have been implemented in relatively standard ways and relatively fixed codes.

[0003] For the business logic of Java Web services, the main method is to use code templates and project-related parameters to generate corresponding common codes to reduce some repetitive work. However, this solution still requires modification or continued coding on the generated code to meet the needs of the project. Moreover, this solution is only used when the code is initialized, and the generated code cannot be maintained. Editing the main code is time-consuming and labor-intensive, which affects work efficiency. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention provides a Java business logic visualization method, device, electronic device and storage medium. The technical problem to be solved by the present invention is achieved by the following technical solutions: A first aspect of an embodiment of the present invention provides a Java business logic visualization method, comprising the following steps: In response to the dragging operation of the initialization execution module and the business execution module and the operation of generating a process flow direction indicator line, a business logic visualization flow chart is displayed; wherein the process flow direction indicator line is used to indicate the process flow between the initialization execution module and the business execution module; In response to the configuration operation of the parameter configuration unit of the business execution module and the initialization execution module in the business logic visualization flowchart, a target business execution module and a target initialization execution module are obtained; wherein the target initialization execution module includes a target initialization json object, and the target business execution module includes a target business execution json object; both the target initialization json object and the target business execution json object include EL expression parameters and function identifiers; Generate a collection array according to the target initialization json object and the target business execution json object; wherein the collection array includes: data of the target initialization json object, data of the target business execution json object, and data of the process flow direction indication line; Generate an EL expression logic structure according to the set array; wherein the EL expression logic structure includes a logic keyword and a function corresponding to a function identifier, and the outermost layer of the EL expression logic structure is a logic keyword; The EL expression parameters in the collection array are correspondingly passed to the function of the EL expression logic structure to obtain the target EL expression.

[0005] In one embodiment of the present invention, the business execution module includes: at least one processing execution submodule and at least one return execution submodule; The target service execution module includes: at least one target processing execution submodule and at least one target return execution submodule.

[0006] In one embodiment of the present invention, the target initialization json object and the target business execution json object also include: node identification, node type, node name; wherein, a processing execution submodule or a return execution submodule is a node.

[0007] In one embodiment of the present invention, the data of the process flow indication line includes: an edge identifier, a source node identifier and a target node identifier.

[0008] A second aspect of an embodiment of the present invention provides a Java business logic visualization device, including a logic visualization definition module and a logic definition management module; The logic visualization definition module includes: an interactive interface module and a configuration interface module; An interactive interface module, used to display a business logic visualization flowchart in response to the dragging operation of the initialization execution module and the business execution module and the operation of generating a process flow direction indicator line; wherein the process flow direction indicator line is used to indicate the process flow between the initialization execution module and the business execution module; A configuration interface module, for obtaining a target business execution module and a target initialization execution module in response to configuration operations of the parameter configuration units of the business execution module and the initialization execution module in the business logic visualization flowchart; wherein the target initialization execution module includes a target initialization json object, and the target business execution module includes a target business execution json object; both the target initialization json object and the target business execution json object include EL expression parameters and function identifiers; The logic definition management module includes: A first generating module is used to generate a collection array according to the target initialization json object and the target business execution json object; wherein the collection array includes: data of the target initialization json object, data of the target business execution json object, and data of a process flow direction indication line; A second generating module is used to generate an EL expression logic structure according to the set array; wherein the EL expression logic structure includes a logic keyword and a function corresponding to a function identifier, and the outermost layer of the EL expression logic structure is a logic keyword; The transfer module is used to transfer the EL expression parameters in the set array to the function of the EL expression logic structure to obtain the target EL expression.

[0009] In one embodiment of the present invention, the business execution module includes: at least one processing execution submodule and at least one return execution submodule; The target service execution module includes: at least one target processing execution submodule and at least one target return execution submodule.

[0010] In one embodiment of the present invention, the target initialization json object and the target business execution json object also include: node identification, node type, node name; wherein, a processing execution submodule or a return execution submodule is a node.

[0011] In one embodiment of the present invention, the data of the process flow indication line includes: an edge identifier, a source node identifier and a target node identifier.

[0012] A third aspect of an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a Java business logic visualization method provided by the first aspect of an embodiment of the present invention is implemented.

[0013] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for visualizing Java business logic provided by the first aspect of an embodiment of the present invention is implemented.

[0014] Beneficial effects of the present invention: The present invention performs logic definition through visual configuration, which can further effectively reduce the repeated coding work of Java application projects, save the labor cost of development, and lower the threshold of development. It avoids the possibility of problems caused by developers handwriting code to implement the same logic, and can also greatly reduce the workload of testing. The target EL expression does not need to be compiled, and the business logic developed using the method of the present invention can take effect immediately without restarting the service, saving the operation and maintenance costs of Java service updates and upgrades.

[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0016] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of a Java business logic visualization method provided by an embodiment of the present invention; Figure 2 A schematic diagram of a visualized flow chart of business logic provided by an embodiment of the present invention; Figure 3 A schematic diagram of the code execution process and modules provided for an embodiment of the present invention; Figure 4 A schematic block diagram of a Java business logic visualization device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0019] like Figure 1 As shown, a first aspect of an embodiment of the present invention provides a Java business logic visualization method, comprising the following steps: Step 11, in response to the dragging operation of the initialization execution module and the business execution module and the operation of generating a process flow direction indication line, a business logic visualization flowchart is displayed.

[0020] The process flow indicator line is used to indicate the process flow between the initialization execution module and the business execution module.

[0021] Step 12, in response to the configuration operation of the parameter configuration unit of the business execution module and the initialization execution module in the business logic visualization flowchart, obtain the target business execution module and the target initialization execution module.

[0022] Among them, the target initialization execution module includes a target initialization json object, and the target business execution module includes a target business execution json object; both the target initialization json object and the target business execution json object include EL expression parameters and function identifiers.

[0023] Step 13, generate a collection array according to the target initialization json object and the target business execution json object.

[0024] The collection array includes: data of the target initialization json object, data of the target business execution json object, and data of the process flow indication line.

[0025] Step 14, generating an EL expression logic structure according to the collection array.

[0026] The EL expression logic structure includes logic keywords and functions corresponding to function identifiers, and the outermost layer of the EL expression logic structure is the logic keywords.

[0027] Step 15, passing the EL expression parameters in the collection array to the function of the EL expression logic structure to obtain the target EL expression.

[0028] In this embodiment, with the development of Java application technology, part of the business logic code is visualized and abstracted, and the standardization of business logic implementation can be gradually realized. The logic definition is performed by visual configuration, which can further effectively reduce the repeated coding work of Java application projects, and can also lower the threshold of development. Even if you do not understand the Java language, you can develop business logic. The present invention uses EL expressions to describe Java logic. In order to expand the capabilities of EL expressions so that more logical scenarios can be expressed, the EL expressions are added with a function representation method. Through the function, the EL expression has the ability to describe complex business logic, and the function can be freely expanded according to demand. In addition, in order to facilitate more people who do not understand Java and EL expressions to develop their own business logic, a visual definition function is added to the expression.

[0029] A second aspect of an embodiment of the present invention provides a Java business logic visualization method, comprising the following steps: The present invention uses the EL expression engine as the core component. EL expression (Expression Language) is an expression language used to simplify data access and operation in Java Web applications. It has concise syntax and is widely used in Java development. It is stable, efficient, flexible, and has good scalability. It can describe common serial, parallel, loop, branch, conditional, loop and other logical execution modes, and these execution modes can also be nested with each other, which can meet most logical execution scenarios. For example: Serial: THEN(a, b, c, d) Parallel: THEN(a,WHEN(b, c, d),e) Branch: SWITCH(x).TO(a, b, c).DEFAULT(y) Condition: IF(x, a).ELSE(b) Loop: FOR(f).DO(THEN(a, b)) Nesting: THEN(a,WHEN(b,SWITCH(c).to(d,e)),f) Therefore, it is chosen as the description language for business logic.

[0030] First, the common business logic in Java Web applications is abstracted into common functions, and these abstract functions are registered to the expression engine so that the expression engine can call these functions, such as mathematical operation functions, string concatenation functions, string content search and replacement functions, file reading and writing functions, database SQL execution functions, etc.

[0031] Then use EL expressions to describe specific business logic content. The expression engine parses the specific expression, obtains data through data interaction functions, then calls data calculation functions to perform operations on the obtained data, and then updates the data to the specified location through data interaction functions. For example, the business scenario: by obtaining the input parameter value, querying the matching student information, and returning the result, the logic can be described as follows using EL expressions: THEN(start('{"source":[{"sourceType":1,"sourceName":"studentVo"},{"sourceType":2,"sourceName":"jsonArray"}]}'),dmlsql('{"sql":"select code,name,age from student where code = #{studentVo.code}","dataSource":{"url": "jdbc:mysql: / / xxx / school_system","user":"xxx","password":"xxx"},"inParameters":["_1$studentVo"],"receiveSouce":"_2$jsonArray"}'),return('{"returnType":"_2$jsonArray"}')) Among them, start(), dmlsql(), and return() are three functions. start() is used to initialize the execution environment and construct the information needed before the expression is executed, including the passed-in parameters. dmlsql() means to execute a SQL statement in the specified database and put the execution result into the specified variable. The return() function outputs the content of the specified variable as the execution result of the expression.

[0032] When business logic can be broken down into various combinations of multiple standard functions, it can be represented visually. Therefore, through this solution, part of the business logic can be developed by visually dragging and configuring on the page.

[0033] Step 21, in response to the dragging operation of the initialization execution module and the business execution module and the operation of generating a process flow direction indication line, a business logic visualization flowchart is displayed.

[0034] The process flow indicator line is used to indicate the process flow between the initialization execution module and the business execution module.

[0035] In this step, in the visual interactive interface, the specific business logic is defined by combining standard functions in various orders in a visual drag-and-drop configuration. In the interactive interface, the preset initialization execution module and business execution module are dragged to the editing area. The business execution module may include: at least one processing execution submodule and at least one return execution submodule. Figure 2As shown, the start frame is an initialization execution module, the SQL execution frame is a processing execution submodule, and the return frame is a return execution submodule. After dragging each module, the process arrow shown is drawn according to the required data flow direction, which is the process flow direction indicator line. Figure 2 That is, the above visualization example of obtaining the input parameter value, querying the matching student information, and returning the result. According to actual needs, the processing execution submodule can be a module of other functions, and the initialization execution module is a must-use module, corresponding to the start() function.

[0036] Figure 2 The logic in the code points from the start node to the SQL execution node (each module or submodule is a node), and finally to the return node. The logic flow is roughly as follows: first, the initial environment for the execution of this logic is constructed in the "start" node, and constants and variables used in the execution process are created. Then, according to the sql parameters configured in the "SQL execution" node, an executable SQL statement is constructed, and SQL is executed on the specified database. Finally, the "return" node returns the result output by the "sql execution" node to the caller. The start frame corresponds to the start() function, the SQL execution frame corresponds to the dmlsql() function, and the return frame corresponds to the return() function.

[0037] Step 22, in response to the configuration operation of the parameter configuration unit of the business execution module and the initialization execution module in the business logic visualization flow chart, a target business execution module and a target initialization execution module are obtained.

[0038] Among them, the target initialization execution module includes a target initialization json object, and the target business execution module includes a target business execution json object; both the target initialization json object and the target business execution json object include EL expression parameters and function identifiers.

[0039] The target business execution module includes: at least one target processing execution submodule and at least one target return execution submodule.

[0040] In this step, each module and submodule has a parameter configuration unit, through which the parameters of each module and submodule can be configured. Each module and submodule corresponds to a json object, and the parameter configuration unit is used to configure the parameters in the json object, that is, to configure the EL expression parameters. The business execution module and the initialization execution module include a business execution json object and an initialization json object, respectively. After the configuration is completed, the target business execution module and the target initialization execution module are obtained, which correspond to the target initialization json object and the target business execution json object, respectively.

[0041] The business execution json object, initialization json object, target initialization json object and target business execution json object also include: node identifier, node type, node name, which can be configured or automatically generated. A module or submodule is a node. The node identifier is the unique identifier of the node. The node identifier, node type, node name, EL expression parameters and function identifier constitute a complete json object.

[0042] For example, if the processing execution submodule corresponds to a dmlsql() function, the parameter configuration unit can configure EL expression parameters, such as database address, database login user name and password, and other related parameters.

[0043] An example of a target initialization json object for the start node (target initialization execution module) is as follows: { "id": "9ae4d1af-34f7-4f0c-8f54-76077cfe2a54", "type": "CommonNode", "properties": { "nodeId": "start", "text": "Start", "nodeData": "{\"source\":[{\"sourceType\":1,\"scopeType\":\"rule\",\,\"sourceName\":\"studentVo\",\"inputFlag\":1,\"sourceCategory \":1},{\"sourceType\":2,\"scopeType\":\"rule\",\,\"sourceName\":\"jsonArray\",\"inputFlag\":1,\"sourceCategory\":1}]}" } } An example of a target initialization json object for a SQL execution node (target processing execution submodule) is as follows: { "id": "36259177-1b45-4131-a761-95835e2e0dc3", "type": "CommonNode", "properties": { "nodeId": "dmlsql", "text": "SQL execution", "nodeData": "{\"inParameters\":[\"_1$studentVo\"],\"dataSourceId\":\"111171b0b9e946f9aa22d998046d65cf\",\"dbName\":\"adsp_core\",\"exportFlag\":false,\"exportSource\":\"\",\" inputFlag\":false,\"sql\":\"select%20code,name,age%20from%20student%20where%20code%20=%20#{studentVo.code}\",\"receiveSouce\":\"_2$jsonArray\",\"fileName\":\"\"}" } } An example of a target initialization json object for a return node (target return execution submodule) is as follows: { "id": "5f2eb514-106d-4504-8fb2-ab245c04cfbb", "type": "CommonNode", "properties": { "nodeId": "return", "text": "return", "nodeData": "{\"returnType\":\"_2$jsonArray\"}" } } Among them, id is the node identifier, which is globally unique in the logic, type is the node type, nodeid is the function identifier, text is the node name, and nodeData is the EL expression parameter to be bound to the function.

[0044] Step 23, generating a collection array according to the target initialization json object and the target business execution json object.

[0045] The collection array includes: data of the target initialization json object, data of the target business execution json object, and data of the process flow indication line.

[0046] The collection array also includes edge data edges, where the data indicates which node points to which node, that is, the data indicating the flow direction of the process. The edge data edges includes an edge identifier id, a node type polyline, a source node identifier sourceNodeId, and a target node identifier targetNodeId.

[0047] For example, an example of collection data is as follows: { "nodes": [ { "id": "9ae4d1af-34f7-4f0c-8f54-76077cfe2a54", "type": "CommonNode", "properties": { "nodeId": "start", "text": "Starting Node", "nodeData": "{\"source\":[{\"sourceType\":1,\"scopeType\":\"rule\",\,\"sourceName\":\"studentVo\",\"inputFlag\":1,\"sourceCategory \":1},{\"sourceType\":2,\"scopeType\":\"rule\",\,\"sourceName\":\"jsonArray\",\"inputFlag\":1,\"sourceCategory\":1}]}" } }, { "id": "5f2eb514-106d-4504-8fb2-ab245c04cfbb", "type": "CommonNode", "properties": { "nodeId": "return", "text": "Return", "nodeData": "{\"returnType\":\"_2$jsonArray\"}" } }, { "id": "36259177-1b45-4131-a761-95835e2e0dc3", "type": "CommonNode", "properties": { "nodeId": "dmlsql", "text": "SQL Execution", "nodeData": "{\"inParameters\":[\"_1$studentVo\"],\"dataSourceId\":\"111171b0b9e946f9aa22d998046d65cf\",\"dbName\":\"adsp_core\",\"exportFlag\":false,\"exportSource\":\"\",\"inputFlag\":false,\"sql\":\"select%20code,name,age%20from%20student%20where%20code%20=%20#{studentVo.code}\",\"receiveSouce\":\"_2$jsonArray\",\"fileName\":\"\"}" } } , "edges": { "id": "b02b6843-447a-4b3c-ad0c-506425d1b885", "type": "polyline", "sourceNodeId": "9ae4d1af-34f7-4f0c-8f54-76077cfe2a54", "targetNodeId": "36259177-1b45-4131-a761-95835e2e0dc3" }, { "id": "7d243bd5-fc2b-4bb6-8f0b-ab92b9791c43", "type": "polyline", "sourceNodeId":"36259177-1b45-4131-a761-95835e2e0dc3", "targetNodeId": "5f2eb514-106d-4504-8fb2-ab245c04cfbb" } ] } Here, the id in edges is the edge identifier, the type is polyline, the first id: "b02b6843-447a-4b3c-ad0c-506425d1b885 corresponding sourceNodeId is the source node identifier, that is, the id of the start node: "9ae4d1af-34f7-4f0c-8f54-76077cfe2a54", targetNodeId is the target node identifier, that is, the id of the target node SQL execution node: "36259177-1b45-4131-a761-95835e2e0dc3", the data source node identifier in another edge is the id of the SQL execution node, and the target node identifier is the id of the returned execution node, which is the same as Figure 2 Nodes is an array, which is the data set of all nodes. The data of the three nodes, start, SQL execution, and return, are stored here.

[0048] Step 24, generating an EL expression logic structure according to the collection array.

[0049] The EL expression logic structure includes logic keywords and functions corresponding to function identifiers, and the outermost layer of the EL expression logic structure is the logic keywords.

[0050] In this step, the collection array is parsed to generate the body of the EL expression (the logical structure of the EL expression). The logical structure of the EL expression in the above example is: THEN(start, dmlsql, return). THEN is a serial logic keyword, which can be obtained according to edges.

[0051] Step 25, passing the EL expression parameters in the collection array to the functions of the EL expression logic structure to obtain the target EL expression. The outermost layer of the EL expression logic structure is the logic keyword.

[0052] In this step, the EL expression parameters are then filled into the corresponding functions in the expression to generate the final target EL expression.

[0053] The target EL expression for the above example is: THEN(start('"{\"source\":[{\"sourceType\":1,\"scopeType\":\"rule\",\"sourceName\":\"studentVo\",\"inputFlag\":1,\"sourceCategory\":1},{\"sourceType\":2,\"scopeTyp e\":\"rule\",\"sourceName\":\"jsonArray\",\"inputFlag\":1,\"sourceCategory\":1}]}"'),dmlsql('"{\"inParameters\":[\"_1$studentVo\"],\"dataSource\":{\"url\":\"jdbc: mysql: / / xxx / school_system\",\"user\":\"xxx\",\"password\":\"xxx\"},\"exportFlag\":false,\"exportSource\":\"\",\"inputFlag\":false,\"sql\":\"update%20tttt%20set%20 create_user_name%20=%20%222%22%20where%20id%20=%20%221%22\",\"receiveSouce\":\"_2$jsonArray\",\"fileName\":\"\"}"'),return('"{\"returnType\":\"_2$jsonArray\"}"')) Here, the target EL expression is not yet a code and cannot be executed. The target EL expression and the initial parameters (the query conditions entered by the caller) need to be given to the logic engine for execution. After completion, the logic engine returns the execution result to the caller.

[0054] In this embodiment, most of the business logic in Java Web applications can be defined intuitively through visualization, saving the manpower cost of development; using this embodiment to develop business logic lowers the development threshold, and people who do not understand Java language can also define business logic through visualization; this embodiment splits common Web businesses and abstracts more general functions. The logic implemented by various assemblies of these standard functions avoids the possibility of problems caused by developers handwriting code to implement the same logic, and can also greatly reduce the workload of testing; the business logic written in Java needs to be compiled into a class file before it can be run. Due to the feature that expressions do not need to be compiled, the business logic developed through this embodiment can take effect immediately without restarting the service, saving the operation and maintenance costs of Java service updates and upgrades. For example, when some code needs to be modified, the relevant nodes or expressions can also be intuitively found and modified in a high-level manner.

[0055] In one possible implementation, Figure 3 As shown, you can also set the logic triggering method and conditions. Specifically, before using the logic, you need to create the logic through the visual interface, and the created logic can set the triggering method and conditions. When the conditions are met, the logic execution will be triggered. At this time, you need to first find the target EL expression content to be executed in the logic management module (find the corresponding target EL expression as needed), and then give the target EL expression and initial parameters to the logic engine, which will be executed by the engine. After completion, the logic engine will return the execution result to the caller.

[0056] Logic visual definition: Define specific business logic through the interactive interface, by visually dragging and dropping configuration, and by combining standard functions in various orders; Logical definition management: Save the logical diagram defined in a visual way, convert the diagram into a corresponding executable expression, and provide maintenance functions for the diagram and expression; Logic application: the entry point for externally triggered logic execution. All logic execution is initiated by this module. Whether it is an external event, an external call request, or other means to trigger logic execution, it all goes through this module; Logical execution engine: To execute the specified logical expression, it is necessary to construct the environment and initial data required for expression execution, and return the result to the caller after execution.

[0057] The creation of the target EL expression is completed by the logic visualization definition module. The logic definition management module generates the target EL logic expression. The logic application module sets the way to trigger the logic execution. When the set trigger logic execution conditions are met, the corresponding target EL logic expression is searched in the logic definition management module. Then the logic application module constructs the engine instance and executes it. The logic engine module executes the target EL logic expression, and the execution result is returned to the logic application module.

[0058] On this basis, standard function management can also be included: the interaction with the outside world during the logic execution process is realized through functions, such as reading and writing databases, reading and writing files, and requesting other interfaces.

[0059] This embodiment uses EL expressions to represent Java business logic. EL syntax is concise and widely used in the Java field. Even without a visual interface, developers can use EL to write their own logic; since expressions do not need to be compiled, they can run normally after loading the content into the engine, so the expression content can be stored in a file or in a database and then loaded into memory when used. It is more flexible than generating Java code.

[0060] like Figure 4 As shown, the third aspect of the embodiment of the present invention provides a Java business logic visualization device, including: a logic visualization definition module and a logic definition management module; The logic visualization definition module includes: an interactive interface module and a configuration interface module; The interactive interface module 41 is used to display a business logic visualization flowchart in response to the dragging operation of the initialization execution module and the business execution module and the operation of generating a process flow direction indicator line; wherein the process flow direction indicator line is used to indicate the process flow between the initialization execution module and the business execution module; The configuration interface module 42 is used to obtain the target business execution module and the target initialization execution module in response to the configuration operation of the parameter configuration unit of the business execution module and the initialization execution module in the business logic visualization flow chart; wherein the target initialization execution module includes a target initialization json object, and the target business execution module includes a target business execution json object; both the target initialization json object and the target business execution json object include EL expression parameters and function identifiers; Logical definition management module, including: The first generating module 43 is used to generate a collection array according to the target initialization json object and the target business execution json object; wherein the collection array includes: data of the target initialization json object, data of the target business execution json object, and data of the process flow direction indication line; The second generating module 44 is used to generate an EL expression logic structure according to the set array; wherein the EL expression logic structure includes a logic keyword and a function corresponding to a function identifier, and the outermost layer of the EL expression logic structure is the logic keyword; The transfer module 45 is used to transfer the EL expression parameters in the collection array to the function of the EL expression logic structure to obtain the target EL expression.

[0061] In one embodiment of the present invention, the service execution module includes: at least one processing execution submodule and at least one return execution submodule; The target service execution module includes: at least one target processing execution submodule and at least one target return execution submodule In one embodiment of the present invention, the target initialization json object and the target business execution json object also include: node identification, node type, node name; wherein, a processing execution submodule or a return execution submodule is a node.

[0062] In one embodiment of the present invention, the data of the process flow indication line includes: an edge identifier, a source node identifier and a target node identifier.

[0063] A fourth aspect of an embodiment of the present invention 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, a Java business logic visualization method provided in the above-mentioned embodiment of the present invention is implemented.

[0064] A fifth aspect of an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of a Java business logic visualization method provided by the above-mentioned embodiment of the present invention are implemented.

[0065] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0066] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware systems.

[0067] The method provided in the embodiment of the present invention can be applied to electronic devices. Specifically, the electronic device can be: a desktop computer, a portable computer, an intelligent mobile terminal, a server, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.

[0068] As for the device / electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0069] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0070] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0071] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0072] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A Java business logic visualization method, characterized in that: The following steps are involved: In response to the dragging operation of the initialization execution module and the business execution module and the operation of generating a process flow direction indicator line, a business logic visualization flow chart is displayed; wherein the process flow direction indicator line is used to indicate the process flow between the initialization execution module and the business execution module; In response to the configuration operation of the parameter configuration unit of the business execution module and the initialization execution module in the business logic visualization flowchart, a target business execution module and a target initialization execution module are obtained; wherein the target initialization execution module includes a target initialization json object, and the target business execution module includes a target business execution json object; both the target initialization json object and the target business execution json object include EL expression parameters and function identifiers; Generate a collection array according to the target initialization json object and the target business execution json object; wherein the collection array includes: data of the target initialization json object, data of the target business execution json object, and data of the process flow direction indication line; Generate an EL expression logic structure according to the set array; wherein the EL expression logic structure includes a logic keyword and a function corresponding to a function identifier, and the outermost layer of the EL expression logic structure is a logic keyword; The EL expression parameters in the collection array are correspondingly passed to the function of the EL expression logic structure to obtain the target EL expression.

2. The method according to claim 1, characterized in that The business execution module includes: at least one processing execution submodule and at least one return execution submodule; The target service execution module includes: at least one target processing execution submodule and at least one target return execution submodule.

3. The method according to claim 2, characterized in that The target initialization json object and the target business execution json object also include: node identification, node type, node name; wherein, a processing execution submodule or a return execution submodule is a node.

4. The method according to claim 2, characterized in that The data of the process flow direction indicator line includes: an edge identifier, a source node identifier and a target node identifier.

5. A Java business logic visualization device, characterized in that: It includes a logic visualization definition module and a logic definition management module; The logic visualization definition module includes: an interactive interface module and a configuration interface module; An interactive interface module, used to display a business logic visualization flowchart in response to the dragging operation of the initialization execution module and the business execution module and the operation of generating a process flow direction indicator line; wherein the process flow direction indicator line is used to indicate the process flow between the initialization execution module and the business execution module; A configuration interface module, for obtaining a target business execution module and a target initialization execution module in response to configuration operations of the parameter configuration units of the business execution module and the initialization execution module in the business logic visualization flowchart; wherein the target initialization execution module includes a target initialization json object, and the target business execution module includes a target business execution json object; both the target initialization json object and the target business execution json object include EL expression parameters and function identifiers; The logic definition management module includes: A first generating module is used to generate a collection array according to the target initialization json object and the target business execution json object; wherein the collection array includes: data of the target initialization json object, data of the target business execution json object, and data of a process flow direction indication line; A second generating module is used to generate an EL expression logic structure according to the set array; wherein the EL expression logic structure includes a logic keyword and a function corresponding to a function identifier, and the outermost layer of the EL expression logic structure is a logic keyword; The transfer module is used to transfer the EL expression parameters in the set array to the function of the EL expression logic structure to obtain the target EL expression.

6. The device according to claim 5, characterized in that The business execution module includes: at least one processing execution submodule and at least one return execution submodule; The target service execution module includes: at least one target processing execution submodule and at least one target return execution submodule.

7. The device according to claim 6, characterized in that The target initialization json object and the target business execution json object also include: node identification, node type, node name; wherein, a processing execution submodule or a return execution submodule is a node.

8. The device according to claim 5, characterized in that The data of the process flow direction indicator line includes: an edge identifier, a source node identifier and a target node identifier.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the Java business logic visualization method according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the Java business logic visualization method according to any one of claims 1 to 4 is implemented.