Method and system for defining flow of microcontroller in non-coding flow chart mode
The method of defining the microcontroller process through the uncoded flow chart solves the problem of coding workload in the development and maintenance of business process systems, and realizes the function of users to configure the business process system by themselves, reducing costs and time, and improving system flexibility.
Patent Information
- Application Number
- CN202510341496.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the development, update, and maintenance of business process systems require a lot of coding work, resulting in a long development cycle and high cost, and business personnel are not familiar with the code, making it difficult for them to upgrade and maintain the system by themselves.
The method of defining the microcontroller process using an uncoded flowchart method is used to design the configuration interface of the flowchart, and component nodes and non-component nodes are added. These nodes are used to draw the execution flowchart, and the properties of nodes and edges are configured. The data is encapsulated and saved in the database. The microcontroller performs corresponding actions based on these data.
Users can configure their own business process system according to their usage needs, reducing the cost and time of development, update and maintenance, making them simple to operate, reducing dependence on developers, and improving the flexibility and adaptability of the system.
Smart Images

Figure CN120144111A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microcontrollers, and more specifically, it relates to a method and system for defining the microcontroller process in a non-coded flowchart manner. Background Art
[0002] In the existing software development process, most business process systems are implemented by writing code. However, there are many defects in implementing business processes by writing code. For example, developers need to spend a lot of time writing code, which makes the system development cycle long and requires a large amount of R & D costs; since most business personnel are not familiar with code, the upgrading, updating, maintenance, etc. of the system all need to be completed by developers, or developers need to give a lot of explanations to business personnel before it can be realized, which brings great inconvenience to the actual use process; the portability of code is relatively poor. When adding new functions or developing new software systems, developers still need to spend a lot of time writing code, etc. These defects also make the development and use of the entire business system extremely inconvenient.
[0003] Of course, there have also been business systems in the prior art that simplify the development for business personnel to operate. However, these business systems have to spend a lot of effort on the user-friendliness and convenience of the operation interface, and the nodes of the entire business system are very numerous and the operation is very complicated, making it extremely inconvenient to use. Summary of the Invention
[0004] One of the technical problems to be solved by the present invention is to provide a method for defining the microcontroller process in a non-coded flowchart manner, through which users can configure the business process system by drawing a flowchart according to the changes in usage requirements.
[0005] The present invention realizes the first technical problem in the following way: A method for defining the microcontroller process in a non-coded flowchart manner, the method comprising the following steps: Design a configuration interface for the flowchart; Add component nodes and non-component nodes on the configuration interface; Use the component nodes and non-component nodes to draw the execution flowchart of the microcontroller, and form edges between the nodes by dragging; Configure the node attributes of each node and the edge attributes of each edge; Package the data of the configured node attributes and edge attributes, and save the packaged data into a database table; The microcontroller obtains the packaged data from the database table, parses the packaged data, and performs corresponding actions according to the parsed data.
[0006] Further, the configuration interface includes a flowchart drawing window, a node adding window, an attribute configuration window, and a debugging information window.
[0007] Further, the "adding component nodes and non-component nodes on the configuration interface" specifically refers to: Adding component nodes and non-component nodes in the node adding window of the configuration interface. Each different node is represented by a different type of graphic, and a mouse dragging event is bound to each component node and non-component node. The component nodes include control component nodes and data source component nodes. Among them, the control component nodes are element nodes for front-end interface visualization, and the data source component nodes are nodes for back-end database processing and logical data processing. The non-component nodes include form nodes, judgment nodes, branch nodes, parallel nodes, start nodes, end nodes, and zoning nodes. Among them, the form nodes are nodes for interacting with other configuration interfaces; the judgment nodes are nodes for judging process branches; the branch nodes are nodes for executing process branches; the parallel nodes are nodes for executing parallel processes; the start nodes are nodes for starting the process; the end nodes are nodes for ending the process; the zoning nodes are nodes for performing process area division.
[0008] Further, the "drawing the execution flowchart of the microcontroller using component nodes and non-component nodes, and forming edges between nodes by dragging" specifically refers to: Using the mouse to drag the required component nodes and non-component nodes from the node adding window to the flowchart drawing window, and drawing the execution flowchart of the microcontroller on the flowchart drawing window. At the same time, draw edges between two nodes with a control relationship by dragging. The specific implementation method is as follows: Bind click selection events and mouse dragging events to the edges of each node. When the edge of a node is clicked and selected and the mouse is dragged, an edge pointing to the next node is generated along the direction of the mouse drag. When the mouse drag stops after touching the edge of the next node, an edge connecting from one node to the next node is generated.
[0009] Further, the "configuring the node attributes of each node and the edge attributes of each edge" specifically refers to: Configure the node attributes of each node. If the node is a component node, configure the component bound to the node, as well as the basic attributes included in the bound component and other attributes defined according to the usage requirements of the component. If the node is a form node among non-component nodes, configure other configuration interfaces to be interacted with bound to the node; if the node is a judgment node, branch node, parallel node, start node, end node or zoning node among non-component nodes, there is no need to configure node attributes. Configure the edge attributes on each side, including configuring the trigger event of the previous node of the edge, the transmission data that the previous node needs to transfer to the next node, and the execution method of the next node.
[0010] Furthermore, the components include control components and data source components. The control component includes a rule object unit, a component event unit, a component behavior unit, and a data output unit; the data source component includes an input unit, a function unit, and an output unit; the microcontroller includes a rule parsing unit, a process operation control unit, a relationship control unit, a data extraction unit, and a component operation unit.
[0011] Furthermore, after configuring the edge attributes of the edge, according to the differences in the configured edge attributes, use different types of marks to represent the edge.
[0012] Furthermore, after configuring the edge attributes of the edge, when the mouse hovers over the edge, dynamically display the configuration content of the edge in the form of a tooltip.
[0013] Furthermore, the "encapsulating the data of the configured node attributes and edge attributes" is specifically: encapsulating the data of the configured node attributes and edge attributes into the Json format.
[0014] The second technical problem to be solved by the present invention lies in providing a system for defining the microcontroller process in a non-coded flowchart manner, through which users can configure the business process system by drawing a flowchart according to changes in usage requirements.
[0015] The present invention realizes the second technical problem in the following way: a system for defining the microcontroller process in a non-coded flowchart manner, the system includes an interface design module, a node addition module, a drawing module, an attribute configuration module, a data encapsulation module, and an action execution module; The interface design module is used to design the configuration interface of the flowchart. The node addition module is used to add component nodes and non-component nodes on the configuration interface. The drawing module is used to draw the execution flowchart of the microcontroller using component nodes and non-component nodes, and the edges are formed by dragging between the nodes. The attribute configuration module is used to configure the node attributes of each node and the edge attributes of each edge. The data encapsulation module is used to encapsulate the configured data of node attributes and edge attributes, and save the encapsulated data into a database table; The action execution module is used for the microcontroller to obtain the encapsulated data from the database table, parse the encapsulated data, and execute corresponding actions according to the parsed data.
[0016] The present invention has the following advantages: 1. When in use, users can configure the business process system by themselves in the way of drawing a flow chart according to the changes in usage requirements, which can greatly reduce the costs of developing, updating, maintaining, etc. of the business process system; 2. When making a flow chart, users only need to use the method of dragging with the mouse and clicking to draw; when configuring, only need to simply configure the attributes of several nodes and several edges to implement complex business processes. Therefore, the operation is very convenient, simple and fast. For users, they only need simple training to operate independently; 3. The configured data is encapsulated in Json format. Since the data length of Json format is relatively short, it has strong versatility and a mature processing mechanism, so data errors can be effectively avoided; 4. After configuring the edge attributes of the edge, different types of marks are used to represent the edge, which can facilitate users to visually distinguish. And when the mouse hovers over the edge, the configuration content of the edge is dynamically displayed in the form of a tooltip, which can facilitate the configurator to view the relevant configuration at any time. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is the execution flow chart of the method for defining the microcontroller flow in the way of the non-coded flow chart of the present invention; Figure 2 It is the schematic diagram of the configuration interface in the present invention; Figure 3 It is the structural block diagram of the system for defining the microcontroller flow in the way of the non-coded flow chart of the present invention; Figure 4 It is the schematic diagram of drawing the execution flow chart on the flow chart drawing window of the present invention; Figure 5 It is the schematic diagram of configuring the selected edge in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0018] Embodiment 1: Please refer to Figure 1 as shown, a method for defining a microcontroller flow in a non-coded flowchart manner, the method comprising the following steps: Step 1, design the configuration interface of the flowchart; Step 2, add component nodes and non-component nodes on the configuration interface; Step 3: Use component nodes and non-component nodes to draw the execution flow chart of the microcontroller, and form edges between the nodes by dragging and dropping. Step 4: Configure the node attributes of each node and the edge attributes of each edge. Step 5: Package the data of the configured node attributes and edge attributes, and save the packaged data into a database table. Step 6: The microcontroller obtains the packaged data from the database table, parses the packaged data, and performs corresponding actions according to the parsed data.
[0019] In the said Step 1, the configuration interface includes a flow chart drawing window, a node addition window, an attribute configuration window, and a debugging information window (as Figure 2 shown); in implementation, the user can draw the required flow chart on the flow chart drawing window by himself / herself, and the nodes required for drawing the flow chart can be added and obtained from the node addition window; the user can also configure the attributes of each node through the attribute configuration window, and after configuring the attributes of each node, the corresponding configuration can be debugged through the microcontroller, and the debugging results will be presented in the debugging information window for the user to view. At the same time, in order to make the configuration interface look more concise and beautiful, the present invention arranges the flow chart drawing window in the middle position of the entire configuration interface, arranges the node addition window in the left position of the configuration interface, arranges the attribute configuration window in the right position of the configuration interface, and arranges the debugging information window in the bottom position of the configuration interface. Of course, each window on the configuration interface can also implement functions such as dragging to different positions and zooming in to achieve customized user-friendliness.
[0020] The said Step 2 is specifically as follows: Add component nodes and non-component nodes in the node addition window of the configuration interface, and each different node is represented by a different type of graph, so that different types of nodes can be easily distinguished. In implementation, hatching can also be added to each node so that each node can present a three-dimensional effect, and a mouse dragging event is bound to each component node and non-component node. After binding the mouse dragging event, the required component node or non-component node can be easily dragged into the flow chart drawing window. The component nodes include control component nodes and data source component nodes; among them, the control component nodes are element nodes for front-end interface visualization. When setting, for example, a rectangle can be used to represent the control component node, so that the control component node can be displayed in the front-end interface in the form of a button; the data source component nodes are nodes for background database processing and logical data processing. When setting, for example, a cylindrical shape can be used to represent the data source component node. The non-component nodes include form nodes, judgment nodes, branch nodes, parallel nodes, start nodes, end nodes, and zoning nodes. Among them, the form node is a node used to interact with other configuration interfaces. When setting, for example, a fluid rectangle can be used to represent the form node. The judgment node is a node used to judge process branches. When setting, for example, a diamond can be used to represent the judgment node. The branch node is a node used to execute process branches. When setting, for example, a rectangle with inward depressions at both ends can be used to represent the branch node. The parallel node is a node used to execute parallel processes. When setting, for example, a square can be used to represent the parallel node. The start node is a node used to start the process. When setting, for example, a circle without filling inside can be used to represent the start node. The end node is a node used to end the process. When setting, for example, a circle with filling inside can be used to represent the end node. The zoning node is a node used to divide process areas. When setting, for example, a dotted rectangle can be used to represent the zoning node.
[0021] Step 3 is specifically as follows: Use the mouse to drag the component nodes and non-component nodes that need to be used from the node addition window to the flowchart drawing window, and draw the execution flowchart of the microcontroller on the flowchart drawing window (as Figure 4 shown. This Figure 4 drawn execution flowchart is only for illustrative purposes); at the same time, draw an edge between two nodes with a control relationship by dragging. For example, if there is a control relationship between node A and node B, then draw an edge between node A and node B. The specific implementation method is as follows: Bind click selection events and mouse drag events to the edges of each node. When the edge of a node is clicked and selected and the mouse is dragged, an edge pointing to the next node is generated along the direction of the mouse drag. When the mouse drag stops after touching the edge of the next node and the mouse is released, an edge connecting from one node to the next node is generated.
[0022] Embodiment 2: Based on Embodiment 1, Embodiment 2 of the present application provides a more specific method for defining the microcontroller process in a non-coded flowchart manner, including: Step 1: Design the configuration interface of the flowchart; Step 2: Add component nodes and non-component nodes on the configuration interface; Step 3: Use the component nodes and non-component nodes to draw the execution flowchart of the microcontroller, and form edges between the nodes by dragging; Step 4: Configure the node attributes of each node and the edge attributes of each edge; Step 5: Package the data of the configured node attributes and edge attributes, and save the packaged data into the database table; Step 6: The microcontroller obtains the packaged data from the database table, parses the packaged data, and performs corresponding actions according to the parsed data.
[0023] The specific content of step 4 is as follows: Configure the node attributes of each node (a node can contain multiple attributes). If the node is a component node, configure the component bound to the node. After binding, the node is equivalent to a component. For example, if a certain node is a control component node, configure the control component bound to the node. During implementation, only need to click on the control component node with the mouse, and the attribute configuration options will be displayed in the attribute configuration window for the definer to select and configure, and configure the basic attributes included in binding the component (such as data storage method, data output method, etc.) and other attributes defined according to the usage requirements of the component; for example, when the component bound to a certain node belongs to a visible control component on the page (such as a button), attributes such as the color and size of the control component can be configured.
[0024] If the node is a form node among the non-component nodes, configure other configuration interfaces to be interacted with bound to the node; if the node is a judgment node, branch node, parallel node, start node, end node or zoning node among the non-component nodes, there is no need to configure node attributes; Configure the edge attributes of each edge, including configuring the trigger event of the previous node of the edge, the transmission data that the previous node needs to transfer to the next node, and the execution method of the next node. As Figure 5 shown, when the definer clicks on edge 1 with the mouse, the attribute configuration options will be displayed in the attribute configuration window for the definer to select and configure.
[0025] After the flowchart configuration is completed, in order to facilitate the user to visually distinguish the control relationships between different nodes, after configuring the edge attributes of the edges, according to the different configured edge attributes, use different types of marks to represent the edges, specifically as follows: A. Reflect the presence or absence of the trigger event of the previous node at the starting point of the edge. For example, when the previous node has a trigger event, add a lightning symbol at the starting point position of the edge; when the previous node has no trigger event, do not add a lightning symbol; B. Reflect the presence or absence of the transmission data that the previous node needs to transfer to the next node in the line type of the edge. For example, when the previous node has transmission data that needs to be transferred to the next node, use a solid line to represent the edge; when the previous node has no transmission data that needs to be transferred to the next node, use a dotted line to represent the edge; C. Reflect whether the next node is a data source component node at the end point of the edge. For example, when the next node is a data source component node, a green arrow is used to represent it at the end point of the edge; when the next node is not a data source component node, a gray arrow is used to represent it at the end point of the edge. Of course, the above is only one implementation mode of the present invention, but the present invention is not limited thereto. Users can also choose different marking methods according to their own preferences.
[0026] Since the configuration of the edge is the key point of the entire process, in order to facilitate users to view the relevant configuration, after the edge attributes of the edge are configured, when the mouse hovers over the edge, the configuration content of the edge is dynamically displayed in the form of a tooltip. For example, when the configuration of deleting a data component is completed on an edge and the mouse hovers over the edge, the following content will be displayed on the tooltip: Trigger event:
Delete
Click the button
Table
Selected row of the control
Delete data component j3
Delete data by primary key
[0027] The component event unit: provides the trigger event configuration options that the control component can recognize; the trigger event configuration options are for business definition personnel to configure trigger events; The component behavior unit: provides the behavior configuration options that the control component needs to execute, and the behavior configuration options are for business definition personnel to configure execution methods; when the component event unit does not configure a trigger event, the component directly runs the execution method. When the component event unit configures a trigger event, only when the trigger event is triggered, the component behavior unit runs the execution method; The data output unit: provides the data that the control component needs to output and the output configuration options, and the output configuration options are for business definition personnel to configure the data output method; The business definition personnel configure the above units according to the business to be implemented by the control component, and the custom development of the control component can be realized, that is, the function of the control component can be customized according to the needs of software development; In the above, the effects of the interface to be implemented in the software development process are segmented into the smallest units, and a single business is implemented through a control component. The business definition personnel can configure each required control component one by one according to the software development requirements without writing code, and the required single function or interface effect can be obtained. When complex business logic needs to be implemented, multiple components can be combined together by configuring the component event unit and the component behavior unit, and the required business logic can be implemented.
[0028] The data source component includes an input unit, a function unit, and an output unit; The input unit is responsible for receiving data or extracting the currently required data from the received data according to the receiving rules configured by the business personnel; in implementation, the input unit further includes a receiving configuration subunit for the business personnel to configure the required receiving parameters to obtain the receiving rules, and the receiving parameters are displayed through the declaration layer of the input unit for the business personnel to configure.
[0029] The function unit parses the data processing function configured by the business personnel and generates the corresponding computer code, and then runs the computer code to obtain the data processing result; The output unit extracts the data processing result and then transfers it according to the call command; For example, if the business personnel need to obtain a data conversion component, that is, replace the B field in Table A with the D field in Table C in the memory, the business personnel only need to make the following configurations to achieve it: First, in the input unit, configure the receiving parameters as: the source field is configured as the B field of Table A, and the target field is configured as the D field of Table C; second, in the function unit, the business personnel select: the data conversion component; this data processing function does not require additional function parameter configuration, so no configuration is required; When the business personnel configure the above information, the input unit extracts the B field from Table A in the input data according to the source field configuration and then passes it to the function unit. The function unit parses the data conversion function, generates the corresponding computer code, creates the data format of the D field of Table C through the computer instruction code, and then copies the B field data over and marks it as the D field data of Table C. The data remains unchanged, only the data identifier is changed; then the data marked as the D field data of Table C (the D field data of Table C is the original B field data of Table A) is put into the cache pool. When the output unit receives the call command, it extracts the data marked as the D field data of Table C from the cache pool and then transfers it according to the call command.
[0030] Through the input unit, functional unit, and output unit above, the data processing in the software development process is encapsulated into individual data source components. The changing parameters are opened for the business personnel to configure, and the underlying instruction codes are encapsulated in the functional unit of the component, enabling the functional unit to have a parsing function. Thus, the business personnel can operate data without coding, greatly reducing the amount of code in software development and correspondingly reducing the workload of software maintenance in the later stage.
[0031] The microcontroller includes a rule parsing unit, a process operation control unit, a relationship control unit, a data extraction unit, and a component operation unit; The rule parsing unit: parses the rule object of the component, then generates code instructions to control the component, runs the code instructions, and completes the initialization of the component, thereby achieving the function of controlling the component; for example, setting the rule object of a button component to configure the font on the button to be red, after the rule parsing unit runs, a button with a red font will be generated, that is, the initialization of the component is completed.
[0032] The process operation control unit: parses the process data, generates a process node diagram (that is, generates a process node diagram corresponding to the execution flow diagram according to the parsed process data), and finds the start node, controls the process operation direction from the start node, and calls the relationship control unit to run the edges in the process node diagram; the process data includes edge objects and node objects, and the edge object records: edge condition data, edge start node and edge end node, transmission data transmitted from the edge start node to the edge end node, event triggered by the edge start node for the process, and execution method called by the edge start node for the edge end node; the node object records the node type, and the node type includes component nodes and non-component nodes. If it is a component node, the node object also includes the component; the content of the edge object and the node object are both custom-configured by the business definition personnel.
[0033] The relationship control unit: parses the two node objects connected by the edge on the process, judges the relationship between the two node objects, and then determines the next node object or the next edge to be run according to the relationship; The data extraction unit: when the process runs to a component node, the data extraction unit is responsible for extracting the data required by the component node, and its basis is: according to the transmission data recorded in the edge object of the previous edge connected to the component node; The component operation unit: When the relationship control unit determines that the next node to be run is a component node and the event of the process triggered by the edge start node recorded on the edge object is triggered, the component operation unit calls the execution method of the edge end node according to the edge start node recorded on the edge object, uses the transmission data extracted by the data extraction unit as input data, runs the component on the component node, and notifies the process operation control unit after the operation ends, so that the process operation control unit can continue to control the process operation direction downward; the edge objects described in the component operation unit are all the edge objects of the previous edge connected to the component node.
[0034] In the software development process, any business logic can manage the control relationship, data transmission relationship, and feedback relationship between components through a microcontroller, so as to flexibly control the software system and flexibly configure a software system that can meet the complex and changeable needs of users.
[0035] In step 5, the "encapsulating the configured node attribute and edge attribute data" is specifically: encapsulating the configured node attribute and edge attribute data into the Json format. Here, the reason for encapsulating the data into the Json format is that the Json data length is relatively short, it is relatively common, and the processing mechanism is very mature, which can ensure that data processing is not prone to errors. After encapsulating the data into the Json format and saving it to the database table, the microcontroller can obtain the required data from the database table according to the control flow of the execution flowchart, parse out the rule attributes configured in the node or edge, and execute corresponding actions according to the parsed rule attributes.
[0036] It should be noted that the parts that are the same as or similar to those in Embodiment 1 in this embodiment can be referred to each other and will not be elaborated in this application. Embodiment 3:
[0037] Based on Embodiment 2, please refer to Figure 3 As shown, a system for defining the microcontroller process in a non-coded flowchart manner, the system includes an interface design module, a node addition module, a drawing module, an attribute configuration module, a data encapsulation module, and an action execution module; The interface design module is used to design the configuration interface of the flowchart; The node addition module is used to add component nodes and non-component nodes on the configuration interface; The drawing module is used to draw the execution flowchart of the microcontroller using component nodes and non-component nodes, and the edges are formed by dragging between the nodes; The attribute configuration module is used to configure the node attributes of each node and the edge attributes of each edge; The data encapsulation module is used to encapsulate the configured node attributes and edge attribute data, and save the encapsulated data into a database table; The action execution module is used for the microcontroller to obtain the encapsulated data from the database table, parse the encapsulated data, and execute corresponding actions according to the parsed data.
[0038] In the interface design module, the configuration interface includes a flowchart drawing window, a node addition window, an attribute configuration window, and a debugging information window (as Figure 2 shown); in implementation, the user can draw the required flowchart on the flowchart drawing window by himself / herself, and the nodes required for drawing the flowchart can be added and obtained from the node addition window; the user can also configure the attributes of each node through the attribute configuration window, and after configuring the attributes of each node, the corresponding configuration can be debugged through the microcontroller, and the debugging results will be presented in the debugging information window for the user to view. At the same time, in order to make the configuration interface look more concise and beautiful, the present invention arranges the flowchart drawing window in the middle position of the entire configuration interface, arranges the node addition window on the left side of the configuration interface, arranges the attribute configuration window on the right side of the configuration interface, and arranges the debugging information window at the bottom of the configuration interface. Of course, each window on the configuration interface can also implement functions such as dragging to different positions and zooming to achieve customized humanization.
[0039] The node addition module is specifically: Add component nodes and non-component nodes in the node addition window of the configuration interface, and each different node is represented by a different type of graph, so that different types of nodes can be easily distinguished. In implementation, hatching can also be added to each node so that each node can present a three-dimensional effect, and a mouse drag event is bound to each component node and non-component node. After binding the mouse drag event, the required component node or non-component node can be easily dragged into the flowchart drawing window; The component nodes include control component nodes and data source component nodes; among them, the control component nodes are element nodes for front-end interface visualization. When setting, for example, a rectangle can be used to represent the control component node, so that the control component node can appear in the front-end interface in the form of a button; the data source component nodes are nodes for back-end database processing and logical data processing. When setting, for example, a cylinder can be used to represent the data source component node; The non-component nodes include form nodes, judgment nodes, branch nodes, parallel nodes, start nodes, end nodes, and zoning nodes; among them, the form node is a node used to interact with other configuration interfaces. When setting, for example, a fluid rectangle can be used to represent the form node; the judgment node is a node used to judge process branches. When setting, for example, a rhombus can be used to represent the judgment node; the branch node is a node used to execute process branches. When setting, for example, a rectangle with inward depressions at both ends can be used to represent the branch node; the parallel node is a node used to execute parallel processes. When setting, for example, a square can be used to represent the parallel node; the start node is a node used to start the process. When setting, for example, a circle without filling inside can be used to represent the start node; the end node is a node used to end the process. When setting, for example, a circle with filling inside can be used to represent the end node; the zoning node is a node used to divide process areas. When setting, for example, a dotted rectangle can be used to represent the zoning node.
[0040] The drawing module is specifically: Use the mouse to drag the component nodes and non-component nodes that need to be used from the node addition window to the flowchart drawing window, and draw the execution flowchart of the microcontroller on the flowchart drawing window (as Figure 4 shown, the Figure 4 drawn execution flowchart is only for illustrative purposes); at the same time, draw an edge between two nodes with a control relationship by dragging. For example, if there is a control relationship between node C and node D, then draw an edge between node C and node D. The specific implementation method is as follows: Bind click selection events and mouse drag events to the edges of each node. When the edge of a node is clicked and selected and the mouse is dragged, an edge pointing to the next node is generated along the direction of the mouse drag. When the mouse drag stops after touching the edge of the next node and the mouse is released, an edge connecting from one node to the next node is generated.
[0041] It should be noted that the system provided in this embodiment is the system corresponding to the method provided in Embodiment 2. Therefore, for the parts that are the same or similar in this embodiment and Embodiment 2, they can be referred to each other and will not be repeated in this application.
[0042] Embodiment 4: Based on Embodiment 3, Embodiment 4 of the present application provides a more specific system for defining the microcontroller process in a non-coding flowchart manner. The system includes an interface design module, a node addition module, a drawing module, an attribute configuration module, a data encapsulation module, and an action execution module; The interface design module is used to design the configuration interface of the flowchart; The node adding module is used to add component nodes and non-component nodes on the configuration interface; The drawing module is used to draw the execution flow chart of the microcontroller by using component nodes and non-component nodes, and edges are formed between nodes by dragging; The attribute configuration module is used to configure the node attributes of each node and the edge attributes of each edge; The data encapsulation module is used to encapsulate the data of the configured node attributes and edge attributes, and save the encapsulated data into a database table; The action execution module is used for the microcontroller to obtain the encapsulated data from the database table, parse the encapsulated data, and execute corresponding actions according to the parsed data.
[0043] Specifically, the attribute configuration module is as follows: Configure the node attributes of each node (a node can contain multiple attributes). If the node is a component node, configure the component bound to the node. After binding, the node is equivalent to a component. For example, if a certain node is a control component node, configure the control component bound to the node. During implementation, only need to click on the control component node with the mouse, and the attribute configuration options will be displayed in the attribute configuration window for the definers to select and configure, and configure the basic attributes included in binding the component (such as data storage method, data output method, etc.) and other attributes defined according to the usage needs of the component; for example, when the component bound to a certain node belongs to a page control element, the attributes such as the color and size of the page control element can be configured.
[0044] If the node is a form node among non-component nodes, configure other configuration interfaces to be interacted with bound to the node; if the node is a judgment node, branch node, parallel node, start node, end node or zoning node among non-component nodes, there is no need to configure node attributes; Configure the edge attributes of each edge, including configuring the trigger event of the previous node of the edge, the transmission data that the previous node needs to transfer to the next node, and the execution method of the next node. As Figure 5 shown, when the definer clicks on edge 1 with the mouse, the attribute configuration options will be displayed in the attribute configuration window for the definers to select and configure.
[0045] After the flowchart configuration is completed, in order to facilitate users to visually distinguish the control relationships between different nodes, after configuring the edge attributes of the edges, different types of marks are used to represent the edges according to the different configured edge attributes, specifically as follows: 1. Reflect the presence or absence of the trigger event of the previous node at the starting point of the edge. For example, when the previous node has a trigger event, add a lightning symbol at the starting point of the edge; when the previous node has no trigger event, do not add a lightning symbol. 2. Reflect the presence or absence of the transmission data that needs to be passed from the previous node to the next node in the line type of the edge. For example, when the previous node has transmission data that needs to be passed to the next node, use a solid line to represent the edge; when the previous node has no transmission data that needs to be passed to the next node, use a dashed line to represent the edge. 3. Reflect whether the next node is a data source component node at the ending point of the edge. For example, when the next node is a data source component node, use a green arrow to represent it at the ending point of the edge; when the next node is not a data source component node, use a gray arrow to represent it at the ending point of the edge. Of course, the above is only one implementation mode of the present invention, but the present invention is not limited thereto, and users can also choose different marking methods according to their own preferences.
[0046] Since the configuration of the edge is the key point of the whole process, in order to facilitate users to view the relevant configuration, after the edge attributes of the edge are configured, when the mouse hovers over the edge, the configuration content of the edge is dynamically displayed in the form of a tooltip. For example, when the configuration of adding a data component is completed on an edge, when the mouse hovers over the edge, the following content will be displayed on the tooltip: Trigger event:
Add
Click the button
Table
Rows selected by the control
Add data component s3
Add data with the primary key
[0047] The component event unit: provides action configuration options that the control component can recognize; the action configuration options are for business definition personnel to configure actions; The component behavior unit: provides task configuration options for the control component to execute. The task configuration options are for business definition personnel to configure tasks. When the actions configured by the component event unit are triggered, the tasks configured by the component behavior unit are executed; The output data unit: provides the data to be output by the control component and output configuration options. The output configuration options are for business definition personnel to configure the data output method; The status unit: provides status configuration options for the status of the control component; Business definition personnel can achieve custom development of the control component by configuring the above units, that is, the functions of the control component can be customized according to the needs of software development; In the above, the effects of the interface that need to be realized in the software development process are segmented into the smallest units, and a single business is realized through a control component. Business definition personnel can configure each required control component one by one according to the software development needs. Without writing code, the required single function or interface effect can be obtained. When complex business logic needs to be realized, multiple components can be combined together by configuring the component event unit and the component behavior unit, and the required business logic can be realized.
[0048] The data source component includes an input unit, a function unit, and an output unit; The input unit is responsible for receiving data or extracting the currently required data from the received data according to the receiving rules configured by business personnel; In implementation, the input unit further includes a receiving configuration subunit. The receiving configuration subunit is for business personnel to configure the required receiving parameters to obtain the receiving rules. The receiving parameters are displayed through the declaration layer of the input unit for business personnel to configure.
[0049] The function unit parses the data processing function configured by business personnel, generates the corresponding computer code, and then runs the computer code to obtain the data processing result; The output unit extracts the data processing result and then transfers it according to the call command; For example, if business personnel need to obtain a data conversion component, that is, replace field B in table A with field D in table C in memory, business personnel only need to make the following configurations to achieve it: First, in the input unit, configure the receiving parameters as: source field configures table A field B, target field configures table C field D; Second, in the function unit, business personnel select: data conversion component; This data processing function does not require configuring additional function parameters, so no configuration is needed; When the business personnel have configured the above information, the input unit extracts field B from Table A in the input data according to the source field configuration, and then transmits it to the function unit. The function unit parses the data conversion function, generates the corresponding computer code, creates the data format of field D in Table C through this computer instruction code, and then copies the data of field B over, marking it as the data of field D in Table C. The data remains unchanged, only the identification of the data is changed; then the data marked as the data of field D in Table C (the data of field D in Table C is the original data of field B in Table A) is placed in the cache pool. When the output unit receives a call command, it extracts the data marked as the data of field D in Table C from the cache pool and then transmits it according to the call command.
[0050] Through the above input unit, function unit, and output unit, the data processing in the software development process is encapsulated into individual data source components. The changing parameters are opened for the business personnel to configure, and the underlying instruction code is encapsulated in the function unit of the component, enabling the function unit to have a parsing function, thereby realizing that the business personnel can operate data without coding, greatly reducing the amount of code in software development and correspondingly reducing the workload of software maintenance in the later stage.
[0051] The microcontroller includes a rule parsing unit, a process operation control unit, a relationship control unit, a data extraction unit, and a component operation unit; The rule parsing unit: parses the rule object of the component, then generates the code instruction to control the component, runs the code instruction to complete the initialization of the component, thereby achieving the function of controlling the component; for example, setting the rule object of a button component to configure the font on the button to be red, then after the rule parsing unit runs, a button with a red font will be generated, that is, the initialization of the component is completed.
[0052] The process operation control unit: parses the process data, generates a process node diagram (that is, generates a process node diagram corresponding to the execution flow diagram according to the parsed process data), and finds the start node, controls the process running direction from the start node, and calls the relationship control unit to run the edge in the process node diagram; the process data includes an edge object and a node object. The edge object records: edge condition data, edge start node and edge end node, transmission data from the edge start node to the edge end node, event for the edge start node to trigger the process, and execution method for the edge start node to call the edge end node; the node object records the node type, and the node type includes a component node and a non-component node. If it is a component node, the node object also includes the component; the content of the edge object and the node object are both custom-configured by the business definition personnel.
[0053] The relationship control unit: parses the two node objects connected by the edge on the process, judges the relationship between these two node objects, and then determines the next node object or the next edge to run according to the relationship; The data extraction unit: When the process runs to a component node, the data extraction unit is responsible for extracting the data required by the component node, based on: the transmission data recorded in the edge object of the previous edge connected to the component node. The component operation unit: When the relationship control unit determines that the next node to be run is a component node, and the event of the edge start node recorded on the edge object that triggers the process is triggered, the component operation unit calls the execution method of the edge end node according to the edge start node recorded on the edge object, uses the transmission data extracted by the data extraction unit as input data, runs the component on the component node, and notifies the process operation control unit after the operation ends, so that the process operation control unit can continue to control the process operation direction downward; the edge objects described in the component operation unit are all the edge objects of the previous edge connected to the component node.
[0054] In the software development process, any business logic can manage the control relationship, data transmission relationship, and feedback relationship between components through a microcontroller, so as to flexibly control the software system and flexibly configure a software system that can meet the complex and changeable needs of users.
[0055] In the data encapsulation module, the specific operation of "encapsulating the data of the configured node attributes and edge attributes" is: encapsulating the data of the configured node attributes and edge attributes into the Json format. Here, the reason for using the Json format for data encapsulation is that the length of Json data is relatively short, it is relatively common, and its processing mechanism is very mature, which can ensure that data processing is not prone to errors. After encapsulating the data into the Json format and saving it to the database table, the microcontroller can obtain the required data from the database table according to the control flow of the execution flow chart, parse out the rule attributes configured in the node or edge, and execute corresponding actions according to the parsed rule attributes.
[0056] It should be noted that the same or similar parts in this embodiment and Embodiment 3 can be referred to each other, and will not be elaborated in this application.
[0057] Although the specific implementation manners of the present invention have been described above, those skilled in the art of this technology should understand that the specific embodiments we described are illustrative rather than used to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered by the scope protected by the claims of the present invention.
Claims
1. A method for defining a microcontroller process in a non-coding flowchart manner, characterized in that: The method comprises the following steps: Design the configuration interface of the flow chart; Add component nodes and non-component nodes to the configuration interface; The execution flow chart of the microcontroller is drawn using component nodes and non-component nodes, and edges are formed between nodes by dragging and dropping; Configure the node attributes of each node and the edge attributes of each edge; Encapsulate the configured node attribute and edge attribute data, and save the encapsulated data into the database table; The microcontroller obtains the packaged data from the database table and parses the packaged data, and performs corresponding actions according to the parsed data.
2. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 1, characterized in that: The configuration interface includes a flow chart drawing window, a node adding window, a property configuration window and a debugging information window.
3. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 2, characterized in that: The “adding component nodes and non-component nodes on the configuration interface” is specifically: Add component nodes and non-component nodes in the node adding window of the configuration interface, and each different node is represented by a different type of graphics, and a mouse drag event is bound to each component node and non-component node; The component nodes include control component nodes and data source component nodes; wherein the control component nodes are element nodes used for front-end interface visualization, and the data source component nodes are nodes used for back-end database processing and logical data processing; The non-component nodes include form nodes, judgment nodes, branch nodes, parallel nodes, start nodes, end nodes and partition nodes; wherein the form node is a node used to interact with other configuration interfaces; the judgment node is a node used to judge process branches; the branch node is a node used to execute process branches; the parallel node is a node used to execute parallel processes; the start node is a node used to execute the start of a process; the end node is a node used to execute the end of a process; and the partition node is a node used to execute process area division.
4. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 3, characterized in that: The "using component nodes and non-component nodes to draw an execution flow chart of a microcontroller, and forming edges between nodes by dragging and dropping" is specifically: Use the mouse to drag the component nodes and non-component nodes that need to be used from the node addition window to the flowchart drawing window, and draw the execution flowchart of the microcontroller on the flowchart drawing window; at the same time, draw edges between two nodes that have a control relationship by dragging, and the specific implementation method is as follows: bind click selection events and mouse drag events to the edges of each node. When the edge of a node is clicked and selected and the mouse is dragged, an edge pointing to the next node is generated along the direction of the mouse drag. When the edge of the next node is encountered and the mouse is released to stop dragging, an edge connecting one node to the next node is generated.
5. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 3, characterized in that: The "configure the node attributes of each node and the edge attributes of each edge" is specifically: Configure the node properties of each node, and if the node is a component node, configure the component bound to the node, as well as configure the basic properties included in the bound component and other properties defined according to the use requirements of the component; If the node is a form node in a non-component node, configure other configuration interfaces bound to the node for interaction; If the node is a judgment node, branch node, parallel node, start node, end node or partition node in a non-component node, you do not need to configure the node properties; Configure the edge properties of each edge, including the trigger event of the previous node of the edge, the transmission data that the previous node needs to pass to the next node, and the execution method of the next node.
6. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 5, characterized in that: The components include a control component and a data source component; The control component includes a rule object unit, a component event unit, a component behavior unit and a data output unit; The data source component includes an input unit, a functional unit and an output unit; The microcontroller comprises a rule parsing unit, a process operation control unit, a relationship control unit, a data extraction unit and a component operation unit.
7. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 5, characterized in that: After configuring the edge attributes, different types of tags are used to represent the edge according to the configured edge attributes.
8. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 5, characterized in that: After configuring the edge properties, when you move the mouse over the edge, the edge configuration content is dynamically displayed in the form of a prompt bar.
9. The method for defining a microcontroller process in a non-coding flowchart manner according to claim 1, characterized in that: The “encapsulating the configured node attribute and edge attribute data” specifically includes: encapsulating the configured node attribute and edge attribute data into a Json format.
10. A system for defining a microcontroller process in a non-coding flowchart manner, characterized in that: The system includes an interface design module, a node adding module, a drawing module, an attribute configuration module, a data encapsulation module and an action execution module; The interface design module is used to design the configuration interface of the flow chart; The node adding module is used to add component nodes and non-component nodes on the configuration interface; The drawing module is used to draw the execution flow chart of the microcontroller using component nodes and non-component nodes, and edges are formed between nodes by dragging; The attribute configuration module is used to configure the node attributes of each node and the edge attributes of each edge; The data encapsulation module is used to encapsulate the configured node attribute and edge attribute data and save the encapsulated data into a database table; The action execution module is used by the microcontroller to obtain the encapsulated data from the database table and parse the encapsulated data, and execute corresponding actions according to the parsed data.
Citation Information
Patent Citations
Task flow configuration method and device and electronic equipment
CN111949170A
Business flow chart generation method and device
CN115857884A
Lightweight and completely cross-browser process design method
CN116204164A
Cloud high-performance scientific calculation workflow design control system and graphical user interface
WO2022056735A1