Visual service logic generation method and device, equipment and storage medium
By introducing a visual business logic generation method, using the engineering, class and method design interfaces to perform simple touch operations on different interfaces, realizing the hierarchical relationship construction of engineering, class and method and visualizing the business logic structure, solving the complex code development The problem of sexuality improves the convenience and flexibility of business logic generation.
Patent Information
- Application Number
- CN202410959930.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-12
AI Technical Summary
With the optimization of business scenarios and the increase in development requirements, developers need to frequently develop and design code in new business scenarios, resulting in a complex code development process and a lack of convenient business logic generation methods.
Provide a visual business logic generation method, through engineering design interface, class design interface and method design interface, display and edit engineering elements, class canvas and code views through touch operations. , realize the visual construction of business logic and flexible editing of code logic.
The business logic generation process is simplified, the convenience and flexibility of generation is improved, and the generated business logic can effectively support the target project and reduce development complexity.
Smart Images

Figure CN118939249A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a visualized business logic generation method, apparatus, device and storage medium. Background Art
[0002] With the development of computer technology, various application services are becoming more and more widespread, and application services need to rely on developers to develop codes as the operating basis of application services. Code development can refer to the process of writing, testing and maintaining computer programs using programming languages according to requirements and specifications.
[0003] However, with the continuous optimization of business scenarios and the increasing demand for scenario development, developers need to frequently develop the code needed for new business scenarios and design the code logic for new business scenarios, making the development process complicated. Summary of the invention
[0004] Based on this, it is necessary to provide a visual business logic generation method, device, equipment and storage medium to address the above technical problems, which can facilitate the business logic generation process.
[0005] In a first aspect, the present application provides a visual business logic generation method, the method comprising:
[0006] In response to a touch operation in the engineering design interface, the engineering graphics of at least one target project under the target project are displayed on the engineering canvas; in response to a touch operation in the class design interface corresponding to any engineering graphics, the class graphics of at least one target class under the target project to which the engineering graphics belong are displayed on the class canvas; in response to a touch operation in the method design interface corresponding to any class graphics, the code structure of at least one target method under the target class to which the class graphics belong is displayed in the code view; based on the code editing operation on any code structure, the code logic of the target method to which the code structure belongs is generated.
[0007] In one embodiment, in response to a touch operation in the engineering design interface, displaying engineering elements of at least one target engineering under the target project on the engineering canvas includes:
[0008] In response to a click operation on a target project on a code tree displayed in a menu bar on an engineering design interface, engineering elements of at least one target project under the target project are displayed on an engineering canvas; wherein, the level to which the at least one target project belongs in the code tree is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on an engineering series icon displayed in a toolbar on an engineering design interface, engineering elements of at least one target project are generated on the engineering canvas, and an engineering identifier of at least one target project is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the engineering design interface.
[0009] In one embodiment, if the number of engineering entities displayed on the engineering canvas is at least two, the method further includes:
[0010] In response to a relationship binding operation between at least two engineering entities, a connection line from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
[0011] In one embodiment, in response to a touch operation in a class design interface corresponding to any engineering graphic element, displaying a class graphic element of at least one target class under a target engineering to which the engineering graphic element belongs on a class canvas includes:
[0012] In response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element, a class element of at least one target class under the target project is displayed on a class canvas; wherein, at least one target class belongs to a level in the code tree that is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on a class series icon displayed in a toolbar on a class design interface, a class element of at least one target class is generated on a class canvas, and at least one class identifier of the target class is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the class design interface.
[0013] In one embodiment, in response to a touch operation in a method design interface corresponding to any class primitive, a code structure of at least one target method in a target class to which the class primitive belongs is displayed in a code view, including:
[0014] In response to a click operation on at least one target method on the code tree displayed in the menu bar on the method design interface corresponding to any class element, the code structure of at least one target method under the target class to which the class element belongs is displayed in the code view; wherein, the level to which the at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
[0015] In one embodiment, it includes:
[0016] According to each code logic in the code view, a flowchart of each code logic is displayed in the process view; in response to an editing operation on the flowchart in the process view, the code logic in the code view is adjusted.
[0017] In a second aspect, the present application further provides a visual business logic generation device, the device comprising:
[0018] The engineering module is used to display engineering graphics of at least one target engineering under the target project on the engineering canvas in response to a touch operation in the engineering design interface;
[0019] The class module is used to display the class element of at least one target class under the target project to which the engineering element belongs on the class canvas in response to a touch operation in the class design interface corresponding to any engineering element;
[0020] A method module, for displaying the code structure of at least one target method under the target class to which the class element belongs in a code view in response to a touch operation in a method design interface corresponding to any class element;
[0021] The editing module is used to generate the code logic of the target method to which the code structure belongs according to the code editing operation on any code structure.
[0022] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0023] In response to a touch operation in the engineering design interface, the engineering graphics of at least one target project under the target project are displayed on the engineering canvas; in response to a touch operation in the class design interface corresponding to any engineering graphics, the class graphics of at least one target class under the target project to which the engineering graphics belong are displayed on the class canvas; in response to a touch operation in the method design interface corresponding to any class graphics, the code structure of at least one target method under the target class to which the class graphics belong is displayed in the code view; based on the code editing operation on any code structure, the code logic of the target method to which the code structure belongs is generated.
[0024] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0025] In response to a touch operation in the engineering design interface, the engineering graphics of at least one target project under the target project are displayed on the engineering canvas; in response to a touch operation in the class design interface corresponding to any engineering graphics, the class graphics of at least one target class under the target project to which the engineering graphics belong are displayed on the class canvas; in response to a touch operation in the method design interface corresponding to any class graphics, the code structure of at least one target method under the target class to which the class graphics belong is displayed in the code view; based on the code editing operation on any code structure, the code logic of the target method to which the code structure belongs is generated.
[0026] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0027] In response to a touch operation in the engineering design interface, the engineering graphics of at least one target project under the target project are displayed on the engineering canvas; in response to a touch operation in the class design interface corresponding to any engineering graphics, the class graphics of at least one target class under the target project to which the engineering graphics belong are displayed on the class canvas; in response to a touch operation in the method design interface corresponding to any class graphics, the code structure of at least one target method under the target class to which the class graphics belong is displayed in the code view; based on the code editing operation on any code structure, the code logic of the target method to which the code structure belongs is generated.
[0028] The above-mentioned visualized business logic generation method, device, equipment and storage medium touch the target project and target project through the engineering design interface, and display the engineering graphics of the target project under the target project on the engineering canvas; further, touch the target class under the target project through the class design interface, and display the class graphics of the target class under the target project on the class canvas; then, touch the target method under the target class through the method design interface, and display the code structure of the target method under the target class under the code view; further, in order to implement the target method, edit the code structure of the target method and form the code logic of the code structure. This solution introduces the engineering design interface, class design interface and method design interface, and can realize the hierarchical relationship construction of projects, classes and methods through simple touch operations on different interfaces. In the construction process, the visualization of the business logic structure is realized by designing the engineering canvas, class canvas and code view, which improves the convenience of business logic generation. In addition, this solution also realizes flexible editing of the code logic of the target method by editing the code structure of the target method of the class element displayed in the code view, avoiding the situation where the generated business logic cannot support the target project, thereby improving the flexibility of business logic generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 An application environment diagram of a visual business logic generation method provided in an embodiment of the present application;
[0031] Figure 2 A flowchart of a visual business logic generation method provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of an engineering design interface provided in an embodiment of the present application;
[0033] Figure 4 This is a schematic diagram of editing an engineering design interface provided in an embodiment of the present application;
[0034] Figure 5 A schematic diagram of a class design interface provided in an embodiment of the present application;
[0035] Figure 6 This is a schematic diagram of editing a class design interface provided in an embodiment of the present application;
[0036] Figure 7 A schematic diagram of a code view provided in an embodiment of the present application;
[0037] Figure 8 A schematic diagram of a code logic provided in an embodiment of the present application;
[0038] Fig. 9 A flowchart of another method for generating visualized business logic provided in an embodiment of the present application;
[0039] Fig.10 A structural block diagram of a visual business logic generation device provided in an embodiment of the present application;
[0040] Fig.11 This is a diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] The visualized business logic generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 realizes touch control of the engineering design interface, class design interface and method design interface, as well as code editing and other operations; then, the server 104 responds to the operation of the terminal 102. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0043] In an exemplary embodiment, Figure 2 As shown, a visual business logic generation method is provided, which is applied to Figure 1 Taking the terminal 102 in the example as an example, the following steps may be included:
[0044] S201, in response to a touch operation in an engineering design interface, displaying engineering graphics of at least one target engineering under a target project on an engineering canvas.
[0045] The engineering design interface may include but is not limited to a menu bar and an engineering canvas, etc.; the menu bar may be used to select a target project; the engineering canvas may include but is not limited to a toolbar and a canvas, etc., which may be used to construct a target project.
[0046] Optionally, the touch operation may include but is not limited to operations such as clicking on a target project in the menu bar and dragging a series of project icons in the toolbar.
[0047] Exemplarily, the business logic of a target project is constructed, and the project includes at least one target project. Optionally, a touch operation is performed on the project in the project design interface; further, in response to the touch operation, the engineering elements of at least one target project under the project are displayed on the project canvas; further, by clicking on the engineering element of any target project, the target project can be viewed and edited.
[0048] S202, in response to a touch operation in a class design interface corresponding to any engineering graphic element, displaying a class graphic element of at least one target class under a target project to which the engineering graphic element belongs on a class canvas.
[0049] The class design interface may include but is not limited to a menu bar and a class canvas, etc.; the menu bar may be used to select a target class; the class canvas may include but is not limited to a toolbar and a canvas, etc., which may be used to construct a target class.
[0050] Optionally, the touch operation may include but is not limited to operations such as clicking on a target category in a menu bar and dragging a category series icon in a toolbar.
[0051] As shown in the above example, you can click on the engineering graphics element of any target project to view and edit the target project; further, you can perform touch operations on the target project in the class design interface corresponding to the target project; further, respond to the touch operation and display class graphics elements of at least one target class under the target project on the class canvas; further, you can view and edit the target class by clicking on the class graphics element of any target class.
[0052] S203, in response to a touch operation in a method design interface corresponding to any class primitive, displaying a code structure of at least one target method in a target class to which the class primitive belongs in a code view.
[0053] Among them, the method design interface may include but is not limited to a menu bar, a code view, and a code logic view; the menu bar can be used to select a target method; the code view can be used to edit the code; the code logic view may include but is not limited to a toolbar and a canvas, which can be used to construct a target method; the code structure may be the implementation process of the target method, which may be expressed in the form of pseudocode.
[0054] Optionally, the touch operation may include but is not limited to operations such as clicking on a target method in a menu bar and dragging an icon in a toolbar.
[0055] As shown in the above example, you can click on the class element of any target class to view and edit the target class; further, you can perform touch operations on the target class in the method design interface corresponding to the target class; further, in response to the touch operation, the code structure of at least one target method under the target class is displayed in the code view, and the code logic of at least one target method under the target class is also displayed in the code logic view.
[0056] S204: Generate code logic of a target method to which the code structure belongs according to a code editing operation on any code structure.
[0057] The code logic may represent the logical structure of the target method, and may be another form of expression of the code structure; optionally, the code logic may be displayed in the form of a flow chart.
[0058] As shown in the above example, the code structure of any target method can be edited to implement the target method; further, based on the code structure of the target method after editing, the code logic of the code structure of the target method is generated for viewing and editing the logic of the target method.
[0059] It is worth noting that the above scheme can generate the code logic of each target method corresponding to each target class under each target project under the target project. Based on the hierarchical structure of "target project-target project-target class-target method", the business logic corresponding to the target project can be obtained by combining the code logic of each target method corresponding to each target class under different target projects.
[0060] The above-mentioned visual business logic generation method touches the target project and the target project through the engineering design interface, and displays the engineering elements of the target project under the target project on the engineering canvas; further, touches the target class under the target project through the class design interface, and displays the class elements of the target class under the target project on the class canvas; further, touches the target method under the target class through the method design interface, and displays the code structure of the target method under the target class under the code view; further, in order to realize the target method, the code structure of the target method is edited and the code logic of the code structure is formed. This scheme introduces the engineering design interface, the class design interface and the method design interface, and can realize the hierarchical relationship of the project, class and method through simple touch operations on different interfaces. In the process of building, the business logic structure is visualized by designing the engineering canvas, the class canvas and the code view, which improves the convenience of business logic generation. In addition, this scheme also realizes the flexible editing and processing of the code logic of the target method through the code editing operation of the code structure of the target method of the class element displayed under the code view, avoiding the situation that the generated business logic cannot support the target project, thereby improving the flexibility of business logic generation.
[0061] Based on the above embodiment, the present application embodiment explains the above embodiment S201 in detail. Specifically, the present application embodiment involves a process of displaying engineering graphics of at least one target project under a target project, which specifically includes:
[0062] In one possible implementation, in response to a click operation on a target item on a code tree displayed in a menu bar on an engineering design interface, engineering graphics of at least one target project under the target item are displayed on an engineering canvas.
[0063] The code tree may represent the initial hierarchical structure of the target project. Optionally, the code tree may represent the hierarchical relationship between the target project, target class, and target method under the target project. It should be noted that the code tree is a simple structural framework of the target project that is predetermined before starting the detailed design of the target project (i.e., generating business logic), and the code tree can be determined in the application service design module.
[0064] It should be noted that at least one target project is located at a level below the target project in the code tree. That is, each target project under the target project level is displayed in the project canvas, and there is a nested or hierarchical relationship between the target project and each target project.
[0065] Exemplarily, in response to clicking a target project in a menu bar in an engineering design interface, various engineering elements under the clicked target project may be displayed in an engineering canvas; wherein each engineering element represents a target project; and a target project includes at least one target project.
[0066] Another possible implementation method is to generate engineering elements of at least one target project on the engineering canvas in response to a drag operation of the engineering series icon displayed in the toolbar on the engineering design interface, and to add an engineering identifier of at least one target project at a level below the level to which the target project of the code tree displayed in the menu bar in the engineering design interface belongs.
[0067] Among them, the engineering series icons may include but are not limited to engineering icons, package icons, annotation icons, annotation icons, text icons, picture icons, and rectangular icons.
[0068] Exemplarily, when a new target project needs to be created, the required project series icons in the toolbar on the project design interface can be dragged to the appropriate location on the project canvas, and the clicked icons can be edited, such as the name, by clicking on the project series icons in the project canvas. Among them, while dragging the project series icons to the project canvas, the icon logo can be added to the code tree displayed in the menu bar on the engineering design interface; after editing the name of the project series icon in the project canvas, the name of the newly added icon logo in the code tree is displayed in the menu bar in the engineering design interface. That is, the structure of the code tree displayed in the menu bar in the engineering design interface is consistent with the operation in the project canvas. It can be done as follows Figure 3 shown.
[0069] Optionally, if the number of engineering entities displayed on the engineering canvas is at least two, you may also:
[0070] In response to a relationship binding operation between at least two engineering entities, a connection line from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
[0071] For example, Figure 4 As shown, if the project hygl-starer in the code tree depends on the project ecds-base, it is necessary to perform a relationship binding between the project hygl-starer and the project ecds-base. The relationship binding operation can be to connect the engineering graphics of the project hygl-starer and the engineering graphics of the project ecds-base with a single arrow in the project canvas, and the arrow of the connection line points to the engineering graphics of the dependent project, or the relationship binding operation can be set in the code tree. This application does not specifically limit the relationship binding operation. Among them, the second target project can be the dependent project, that is, the project ecds-base; the first target project can be the dependent project, that is, the project hygl-starer.
[0072] Optional, Figure 4 There may also be a hierarchical relationship between the projects in the project canvas. For example, the projects at the same horizontal coordinate in the project canvas may be at the same level, such as project hygl, project ecds-base, project scd-resource, and project scd-cerificate are at the same level, while the other projects in the project canvas are projects at the levels of project hygl, project ecds-base, project scd-resource, and project scd-cerificate, respectively, and therefore, are not displayed in the code tree (are folded up); the embodiment of the present application does not specifically limit the display form of the hierarchical relationship between the projects in the project canvas.
[0073] In the embodiment of the present application, by explaining in detail the different touch operations of the engineering design interface and the relationship binding operations between engineering graphics elements, the code generation process is facilitated and the business logic is visualized.
[0074] Based on the above embodiment, the present application embodiment explains the above embodiment S202 in detail. Specifically, the present application embodiment involves a process of displaying a class element of at least one target class under a target project to which the engineering element belongs, specifically including:
[0075] One possible implementation method is to display class elements of at least one target class under the target project on the class canvas in response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element.
[0076] Among them, at least one target class belongs to a level in the code tree, which is located at a level below the level of the target project in the code tree. That is, each target class under the target project level is displayed in the class canvas, and there is a nested or hierarchical relationship between the target project and each target class.
[0077] Exemplarily, click on the target project in the menu bar of the class design interface, and then display various types of graphics under the clicked target project in the class canvas; wherein each class graphic element represents a target class; and the target project includes at least one target class.
[0078] Another possible implementation method is to generate at least one class element of a target class on a class canvas in response to a drag operation of a class series icon displayed in a toolbar on a class design interface, and to add at least one class identifier of a target class at a level below the level to which a target project belongs in a code tree displayed in a menu bar in the class design interface.
[0079] Among them, the class series icons may include but are not limited to class icons, interface icons, annotation icons, enumeration icons, exception class icons, package icons, annotation icons, label icons, text icons, picture icons and rectangular icons.
[0080] Exemplarily, when a new target class needs to be created, you can drag the required class series icons in the toolbar on the class design interface to the appropriate position on the class canvas, and click the class series icons in the class canvas to edit the clicked icons; for example, edit basic information (name and inheritance relationship, etc.), construction methods (construction with parameters and construction without parameters, etc.), properties (property name and property type, etc.) and methods (method name and method return value, etc.). Furthermore, you can also build lines between the various series icons in the class canvas to indicate the relationship between the icons. For example, the inheritance relationship between target classes, and the implementation relationship between the target class and the interface. Specifically, it can be as follows: Figure 5 and Figure 6 shown.
[0081] When you drag a class series icon to the class canvas, the menu bar in the class design interface displays the newly added icon in the code tree; after editing the name of the class series icon in the class canvas, the menu bar in the class design interface displays the name of the newly added icon in the code tree. That is, the structure of the code tree displayed in the menu bar in the class design interface is consistent with the operation in the class canvas.
[0082] In the embodiment of the present application, by explaining in detail the different touch operations of the class design interface, multiple possibilities are provided for the generation of the target class, while simplifying the editing process of the target class code, further laying the foundation for realizing the convenience of the business logic generation process.
[0083] Based on the above-mentioned embodiment, the embodiment of the present application explains the above-mentioned embodiment S203 in detail. Specifically, the process of displaying the code structure of at least one target method under the target class to which the class element belongs in the embodiment of the present application specifically includes: in response to a click operation of at least one target method on the code tree displayed in the menu bar on the method design interface corresponding to any class element, displaying the code structure of at least one target method under the target class to which the class element belongs in the code view.
[0084] The level to which at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
[0085] For example, click any target method in the menu bar of the method design interface; then, in response to the click operation, the code structure of the clicked target method can be displayed in the code view for code editing. Figure 7 shown.
[0086] In the embodiment of the present application, by explaining in detail the display process of the code structure of the target method, a foundation is laid for viewing and editing the logical structure of the target method, and data support is provided for the implementation of business logic.
[0087] Based on the above-mentioned embodiment, the embodiment of the present application explains the above-mentioned embodiment S204 in detail. Specifically, the process of generating the code logic of the target method belonging to the code structure in the embodiment of the present application specifically includes: displaying the flowchart of each code logic in the process view according to each code logic in the code view; and adjusting the code logic in the code view in response to the editing operation of the flowchart in the process view.
[0088] Exemplarily, for any target method, after the code editing is completed in the code view, the implementation logic of the target method, that is, the code logic, can be displayed in the process view; the specific form of the display can be a flowchart of the target method implementation; correspondingly, the flowchart of the target method can also be edited in the process view (for example, by dragging the icons (such as variable nodes and conditional branches, etc.) in the toolbar in the code logic view to the appropriate position in the code logic view), and the code logic in the code view can be automatically adjusted according to the editing in the process view. That is, after the code structure is edited through the code logic, the code of the code structure in the code view is synchronously updated to keep pace with the editing of the code logic; vice versa, after the code structure is edited through the code view, the form of the code structure in the code logic is synchronously updated to keep pace with the editing of the code structure in the code view. The code view can be as follows Figure 7 As shown, the code logic can be as follows Figure 8 shown.
[0089] In the embodiment of the present application, by introducing a flowchart, synchronous adjustment of the flowchart and code logic is achieved, which facilitates the viewing and adjustment of the method implementation logic, thereby ensuring the accuracy of the business logic.
[0090] Based on the above embodiment, this embodiment provides an optional example of a method for generating a visualized business logic. Fig. 9 As shown, the specific implementation process is as follows:
[0091] S901, in response to a click operation on a target item on a code tree displayed in a menu bar on an engineering design interface, display engineering graphics of at least one target project under the target item on an engineering canvas; and continue to execute S903 or S904.
[0092] The level to which at least one target project belongs in the code tree is located at a level below the level to which the target project belongs in the code tree.
[0093] S902, in response to the dragging operation of the engineering series icon displayed in the toolbar on the engineering design interface, generate at least one engineering element of the target project on the engineering canvas, add at least one engineering identifier of the target project at the next level of the level to which the target project of the code tree displayed in the menu bar in the engineering design interface belongs; continue to execute S903 or S904.
[0094] Optionally, in response to a relationship binding operation between at least two engineering entities, a connection line pointing from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
[0095] S903, in response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element, display a class element of at least one target class under the target project on a class canvas; and continue to execute S905.
[0096] The level to which at least one target class belongs in the code tree is located at a level below the level to which the target project belongs in the code tree.
[0097] S904, in response to the dragging operation of the class series icon displayed in the toolbar on the class design interface, generate at least one class element of the target class on the class canvas, add at least one class identifier of the target class at the next level of the level to which the target project of the code tree displayed in the menu bar in the class design interface belongs; continue to execute S905.
[0098] S905, in response to a click operation on at least one target method on the code tree displayed in the menu bar on the method design interface corresponding to any class element, the code structure of at least one target method under the target class to which the class element belongs is displayed in the code view.
[0099] The level to which at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
[0100] S906, displaying a flowchart of each code logic in the process view according to each code logic in the code view.
[0101] S907: In response to the editing operation on the flowchart in the process view, adjust the code logic in the code view.
[0102] Among them, code logic and code structure can be converted into each other.
[0103] The specific process of the above S901-S907 can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0105] Based on the same inventive concept, the embodiment of the present application also provides a visual business logic generation device for implementing the visual business logic generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more visual business logic generation device embodiments provided below can refer to the limitations of the visual business logic generation method above, and will not be repeated here.
[0106] In an exemplary embodiment, Fig.10 As shown, a visual business logic generation device 1 is provided, comprising: an engineering module 10, a class module 20, a method module 30 and an editing module 40, wherein:
[0107] The engineering module 10 is used to display engineering graphics of at least one target engineering under the target project on the engineering canvas in response to a touch operation in the engineering design interface;
[0108] The class module 20 is used to display the class element of at least one target class under the target project to which the engineering element belongs on the class canvas in response to a touch operation in the class design interface corresponding to any engineering element;
[0109] A method module 30, for displaying, in a code view, a code structure of at least one target method of a target class to which the class primitive belongs in response to a touch operation in a method design interface corresponding to any class primitive;
[0110] The editing module 40 is used to generate the code logic of the target method to which the code structure belongs according to the code editing operation on any code structure.
[0111] In one embodiment, the engineering module 10 is specifically used for:
[0112] In response to a click operation on a target project on a code tree displayed in a menu bar on an engineering design interface, engineering elements of at least one target project under the target project are displayed on an engineering canvas; wherein, the level to which the at least one target project belongs in the code tree is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on an engineering series icon displayed in a toolbar on an engineering design interface, engineering elements of at least one target project are generated on the engineering canvas, and an engineering identifier of at least one target project is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the engineering design interface.
[0113] In one embodiment, the engineering module 10 is further used to:
[0114] In response to a relationship binding operation between at least two engineering entities, a connection line from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
[0115] In one embodiment, the class module 20 is specifically used for:
[0116] In response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element, a class element of at least one target class under the target project is displayed on a class canvas; wherein, at least one target class belongs to a level in the code tree that is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on a class series icon displayed in a toolbar on a class design interface, a class element of at least one target class is generated on a class canvas, and at least one class identifier of the target class is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the class design interface.
[0117] In one embodiment, the method module 30 is specifically used to:
[0118] In response to a click operation on at least one target method on the code tree displayed in the menu bar on the method design interface corresponding to any class element, the code structure of at least one target method under the target class to which the class element belongs is displayed in the code view; wherein, the level to which the at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
[0119] In one embodiment, the editing module 40 is specifically used for:
[0120] According to each code logic in the code view, a flowchart of each code logic is displayed in the process view; in response to an editing operation on the flowchart in the process view, the code logic in the code view is adjusted.
[0121] Each module in the above-mentioned visualized business logic generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0122] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.11 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a visual business logic generation method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0123] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0124] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0125] In response to a touch operation in the engineering design interface, the engineering graphics of at least one target project under the target project are displayed on the engineering canvas; in response to a touch operation in the class design interface corresponding to any engineering graphics, the class graphics of at least one target class under the target project to which the engineering graphics belong are displayed on the class canvas; in response to a touch operation in the method design interface corresponding to any class graphics, the code structure of at least one target method under the target class to which the class graphics belong is displayed in the code view; based on the code editing operation on any code structure, the code logic of the target method to which the code structure belongs is generated.
[0126] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0127] In response to a click operation on a target project on a code tree displayed in a menu bar on an engineering design interface, engineering elements of at least one target project under the target project are displayed on an engineering canvas; wherein, the level to which the at least one target project belongs in the code tree is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on an engineering series icon displayed in a toolbar on an engineering design interface, engineering elements of at least one target project are generated on the engineering canvas, and an engineering identifier of at least one target project is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the engineering design interface.
[0128] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0129] In response to a relationship binding operation between at least two engineering entities, a connection line from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
[0130] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0131] In response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element, a class element of at least one target class under the target project is displayed on a class canvas; wherein, at least one target class belongs to a level in the code tree that is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on a class series icon displayed in a toolbar on a class design interface, a class element of at least one target class is generated on a class canvas, and at least one class identifier of the target class is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the class design interface.
[0132] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0133] In response to a click operation on at least one target method on the code tree displayed in the menu bar on the method design interface corresponding to any class element, the code structure of at least one target method under the target class to which the class element belongs is displayed in the code view; wherein, the level to which the at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
[0134] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0135] According to each code logic in the code view, a flowchart of each code logic is displayed in the process view; in response to an editing operation on the flowchart in the process view, the code logic in the code view is adjusted.
[0136] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0137] In response to a touch operation in the engineering design interface, the engineering graphics of at least one target project under the target project are displayed on the engineering canvas; in response to a touch operation in the class design interface corresponding to any engineering graphics, the class graphics of at least one target class under the target project to which the engineering graphics belong are displayed on the class canvas; in response to a touch operation in the method design interface corresponding to any class graphics, the code structure of at least one target method under the target class to which the class graphics belong is displayed in the code view; based on the code editing operation on any code structure, the code logic of the target method to which the code structure belongs is generated.
[0138] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0139] In response to a click operation on a target project on a code tree displayed in a menu bar on an engineering design interface, engineering elements of at least one target project under the target project are displayed on an engineering canvas; wherein, the level to which the at least one target project belongs in the code tree is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on an engineering series icon displayed in a toolbar on an engineering design interface, engineering elements of at least one target project are generated on the engineering canvas, and an engineering identifier of at least one target project is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the engineering design interface.
[0140] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0141] In response to a relationship binding operation between at least two engineering entities, a connection line from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
[0142] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0143] In response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element, a class element of at least one target class under the target project is displayed on a class canvas; wherein, at least one target class belongs to a level in the code tree that is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on a class series icon displayed in a toolbar on a class design interface, a class element of at least one target class is generated on a class canvas, and at least one class identifier of the target class is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the class design interface.
[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0145] In response to a click operation on at least one target method on the code tree displayed in the menu bar on the method design interface corresponding to any class element, the code structure of at least one target method under the target class to which the class element belongs is displayed in the code view; wherein, the level to which the at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0147] According to each code logic in the code view, a flowchart of each code logic is displayed in the process view; in response to an editing operation on the flowchart in the process view, the code logic in the code view is adjusted.
[0148] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0149] In response to a touch operation in the engineering design interface, the engineering graphics of at least one target project under the target project are displayed on the engineering canvas; in response to a touch operation in the class design interface corresponding to any engineering graphics, the class graphics of at least one target class under the target project to which the engineering graphics belong are displayed on the class canvas; in response to a touch operation in the method design interface corresponding to any class graphics, the code structure of at least one target method under the target class to which the class graphics belong is displayed in the code view; based on the code editing operation on any code structure, the code logic of the target method to which the code structure belongs is generated.
[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0151] In response to a click operation on a target project on a code tree displayed in a menu bar on an engineering design interface, engineering elements of at least one target project under the target project are displayed on an engineering canvas; wherein, the level to which the at least one target project belongs in the code tree is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on an engineering series icon displayed in a toolbar on an engineering design interface, engineering elements of at least one target project are generated on the engineering canvas, and an engineering identifier of at least one target project is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the engineering design interface.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0153] In response to a relationship binding operation between at least two engineering entities, a connection line from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0155] In response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element, a class element of at least one target class under the target project is displayed on a class canvas; wherein, at least one target class belongs to a level in the code tree that is located at a level below the level to which the target project belongs in the code tree; or, in response to a drag operation on a class series icon displayed in a toolbar on a class design interface, a class element of at least one target class is generated on a class canvas, and at least one class identifier of the target class is added at a level below the level to which the target project belongs in the code tree displayed in the menu bar on the class design interface.
[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0157] In response to a click operation on at least one target method on the code tree displayed in the menu bar on the method design interface corresponding to any class element, the code structure of at least one target method under the target class to which the class element belongs is displayed in the code view; wherein, the level to which the at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0159] According to each code logic in the code view, a flowchart of each code logic is displayed in the process view; in response to an editing operation on the flowchart in the process view, the code logic in the code view is adjusted.
[0160] It should be noted that the project information and data involved in this application (including but not limited to data used for analysis, storage, display, etc.) are all information and data fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0162] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A visual business logic generation method, characterized in that: The method comprises: In response to a touch operation in the engineering design interface, displaying engineering graphics of at least one target engineering under the target project on the engineering canvas; In response to a touch operation in a class design interface corresponding to any engineering graphic element, displaying a class graphic element of at least one target class under a target project to which the engineering graphic element belongs on a class canvas; In response to a touch operation in a method design interface corresponding to any class primitive, displaying a code structure of at least one target method in a target class to which the class primitive belongs in a code view; According to a code editing operation on any code structure, code logic of a target method to which the code structure belongs is generated.
2. The method according to claim 1, characterized in that The method of displaying engineering graphics of at least one target engineering project under the target project on the engineering canvas in response to the touch operation in the engineering design interface includes: In response to a click operation on a target item on the code tree displayed in the menu bar on the engineering design interface, displaying engineering graphics of at least one target project under the target item on the engineering canvas; wherein the at least one target project belongs to a level in the code tree that is located at a level below the level in the code tree to which the target item belongs; or, In response to a drag operation of the engineering series icon displayed in the toolbar on the engineering design interface, an engineering element of at least one target project is generated on the engineering canvas, and an engineering identifier of the at least one target project is added to a next level of the level to which the target project of the code tree displayed in the menu bar in the engineering design interface belongs.
3. The method according to claim 1, characterized in that If the number of engineering graphics elements displayed on the engineering canvas is at least two, the method further includes: In response to a relationship binding operation between at least two engineering entities, a connection line from the bound engineering entity of the first target project to the engineering entity of the second target project is displayed on the engineering canvas; wherein the at least two engineering entities include the engineering entity of the first target project and the engineering entity of the second target project; and the second target project allows calling various target classes and target methods under the first target project.
4. The method according to claim 1, characterized in that: The method of displaying, in response to a touch operation in a class design interface corresponding to any engineering graphic element, a class graphic element of at least one target class under a target engineering to which the engineering graphic element belongs on a class canvas comprises: In response to a click operation on a target project on a code tree displayed in a menu bar on a class design interface corresponding to any engineering element, a class element of at least one target class under the target project is displayed on the class canvas; wherein the level to which the at least one target class belongs in the code tree is located at a level below the level to which the target project belongs in the code tree; or, In response to a drag operation of the class series icons displayed in the toolbar on the class design interface, a class graphic element of at least one target class is generated on the class canvas, and a class identifier of the at least one target class is added to the next level of the level to which the target project of the code tree displayed in the menu bar in the class design interface belongs.
5. The method according to claim 1, characterized in that In response to a touch operation in a method design interface corresponding to any class primitive, displaying a code structure of at least one target method in a target class to which the class primitive belongs in a code view includes: In response to a click operation on at least one target method on a code tree displayed in a menu bar on a method design interface corresponding to any class element, a code structure of at least one target method under a target class to which the class element belongs is displayed in the code view; wherein, the level to which the at least one target method belongs in the code tree is located at a level below the level to which the target class belongs in the code tree.
6. The method according to claim 1, characterized in that The method further comprises: According to each code logic in the code view, a flowchart of each code logic is displayed in a flow view; In response to an editing operation on the flowchart in the process view, the code logic in the code view is adjusted.
7. A visual business logic generation device, characterized in that: The device comprises: The engineering module is used to display engineering graphics of at least one target engineering under the target project on the engineering canvas in response to a touch operation in the engineering design interface; A class module, for displaying, in response to a touch operation in a class design interface corresponding to any engineering graphic element, a class graphic element of at least one target class under a target engineering to which the engineering graphic element belongs on a class canvas; A method module, for displaying, in a code view, a code structure of at least one target method under a target class to which the class element belongs in response to a touch operation in a method design interface corresponding to any class element; The editing module is used to generate the code logic of the target method to which any code structure belongs according to the code editing operation on the code structure.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
