Business circulation method, device, computer equipment and storage medium
By separating the business content in the business circulation system from the business circulation nodes and adopting a general business circulation method, the problem of poor commonality of business process nodes in the existing technology is solved, and efficient business circulation and development efficiency are achieved.
Patent Information
- Application Number
- CN202111290751.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-02
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-11-02
AI Technical Summary
In the prior art, the commonality of business process nodes is poor, resulting in low development efficiency and inability to adapt to the needs of different business contents.
By separating the business content in the business flow system from the business flow nodes, a general business flow method is adopted to obtain the current status and preset flow order of the services to be transferred, determine the current execution node and the next execution node, and update the business status until the business flow is completed.
It realizes the universality of the business flow system, reduces development costs, improves development efficiency, and simplifies the subsequent maintenance process.
Smart Images

Figure CN113919821B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a business circulation method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of science and technology, computer technology is increasingly used in parent-child process-type businesses such as emergency command and security command. In actual application scenarios, business process nodes need to be defined in advance based on business information. Therefore, for different business contents, business process nodes need to be redefined according to different business contents, resulting in poor versatility of business process nodes and low development efficiency. Summary of the invention
[0003] Based on this, it is necessary to provide a universal business circulation method, device, computer equipment and storage medium to address the above technical issues.
[0004] In a first aspect, the present invention provides a business flow method, the method is used in a business flow system, the business content in the business flow system is separated from the business flow node, the method comprises:
[0005] Acquire the current business status of the business to be transferred and a preset business transfer order, where the preset business transfer order is the execution order of the business transfer nodes;
[0006] According to the current business state, determining a current execution node from the business flow nodes;
[0007] Obtaining execution completion information of the current execution node, and determining a next execution node and a business execution parameter corresponding to the next execution node according to the execution completion information and the preset business flow sequence;
[0008] The current service state is updated according to the next execution node and the service execution parameter corresponding to the next execution node until the flow of the service is completed.
[0009] In one embodiment, the data form corresponding to the current execution node includes a parent node data form and a child node data form; the method further includes:
[0010] Get the identity of the current execution node;
[0011] If the current execution node is a parent node, the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node are stored in a parent node data form;
[0012] If the current execution node is a child node, the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node are stored in a child node data form.
[0013] In one embodiment, the method further comprises:
[0014] If the current business state is a preset initial state, a parent process corresponding to the parent node is created in the parent node data form, wherein the preset initial state is the business state when the business to be transferred is received;
[0015] According to the flow information corresponding to the parent process, a flow log corresponding to the flow information is generated.
[0016] In one embodiment, after the step of creating a parent process corresponding to the parent node, the method further includes:
[0017] When receiving the service to be transferred, determining the service type of the service to be transferred and the target number of subnodes;
[0018] The identity of the parent node is obtained, and in the child node data form corresponding to each child node, a target number of child processes are created according to the identity of the parent node.
[0019] In one embodiment, the method further comprises:
[0020] If the current execution node is a node in the sub-process, the business status information of the sub-process is synchronized to the parent process corresponding to the sub-process according to the execution completion information of the current execution node and a preset status synchronization function.
[0021] In one embodiment, the method further comprises:
[0022] The business flow nodes include creating a business flow node, issuing a business flow node, signing for a business flow node, handling a business flow node, feedback a business flow node, verifying a business flow node, and archiving one or more business flow nodes.
[0023] In one embodiment, the method further comprises:
[0024] Obtain business process information of target type business;
[0025] Determine, according to the business process information, business process information of a parent node involved in the target type business, and business process information of a child node involved in the target type business;
[0026] A preset business flow sequence corresponding to the target type business is determined according to the business process information of the parent node and the business process information of the child node.
[0027] In one embodiment, the business flow system provides a business interface to the outside, and the method further includes:
[0028] The service request sent by the service module is received through the service interface, and the service request is implemented; the service interface includes: at least one of creation, query, and statistics.
[0029] In a second aspect, the present invention further provides a service flow device, the device is used in a service flow system, the service content in the service flow system is separated from the service flow node, and the device comprises:
[0030] The first acquisition module is used to obtain the current business status and the preset business flow sequence;
[0031] A first determination module is used to obtain the current business status of the business to be transferred and a preset business transfer order, where the preset business transfer order is the execution order of the business transfer nodes;
[0032] A current execution node determination module, used to determine a current execution node from the business flow nodes according to the current business state;
[0033] A second determination module is used to obtain the execution completion information of the current execution node, and determine the next execution node and the business execution parameters corresponding to the next execution node according to the execution completion information and the preset business flow sequence;
[0034] An updating module is used to update the current business state according to the next execution node and the business execution parameters corresponding to the next execution node until the flow of the business is completed.
[0035] In one embodiment, the data form corresponding to the current execution node includes a parent node data form and a child node data form; the device further includes:
[0036] The second acquisition module is used to obtain the identity of the current execution node;
[0037] A first storage module is used to store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a parent node data form if the current execution node is a parent node;
[0038] The second storage module is used to store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a subnode data form if the current execution node is a subnode.
[0039] In one embodiment, the device further comprises:
[0040] A creation module, used for creating a parent process corresponding to the parent node in the parent node data form if the current business state is a preset initial state, wherein the preset initial state is the business state when the business to be transferred is received;
[0041] The log determination module is used to generate a flow log corresponding to the flow information according to the flow information corresponding to the parent process.
[0042] In one embodiment, the device further comprises:
[0043] A target number of sub-nodes determining module, configured to determine the service type of the service to be transferred and the target number of sub-nodes upon receiving the service to be transferred;
[0044] The sub-process creation module is used to obtain the identity identifier of the parent node, and create a target number of sub-processes in the sub-node data form corresponding to each sub-node according to the identity identifier of the parent node.
[0045] In one embodiment, the device further comprises:
[0046] A synchronization module is used to synchronize the business status information of the sub-process to the parent process corresponding to the sub-process according to the execution completion information of the current execution node and a preset status synchronization function if the current execution node is a node in the sub-process.
[0047] In one embodiment, the device further comprises:
[0048] A first business process information determination module is used to obtain business process information of a target type of business;
[0049] A second business process information determination module is used to determine the business process information of the parent node involved in the target type business and the business process information of the child node involved in the target type business according to the business process information;
[0050] The preset business flow sequence determination module is used to determine the preset business flow sequence corresponding to the target type business according to the business process information of the parent node and the business process information of the child node.
[0051] In one embodiment, the business flow system provides a business interface to the outside, and the device also includes: a request module, which is used to receive a business request sent by a business module through the business interface and implement the business request; the business interface includes: at least one of creation, query, and statistics.
[0052] In a third aspect, the present invention further provides a computer device, comprising 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:
[0053] Get the current business status and preset business flow sequence;
[0054] Determine a current execution node and a service execution parameter corresponding to the current execution node according to the current service state;
[0055] Sending an execution instruction corresponding to the service execution parameter to the current execution node, wherein the execution instruction is used to instruct the current execution node to execute the execution instruction;
[0056] Determine the next execution node and the service execution parameters corresponding to the next execution node according to the execution completion information of the current execution node and the preset service flow order;
[0057] The current service state is updated according to the next execution node and the service execution parameter corresponding to the next execution node until the service is completed.
[0058] In a fourth aspect, the present invention 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:
[0059] Get the current business status and preset business flow sequence;
[0060] Determine a current execution node and a service execution parameter corresponding to the current execution node according to the current service state;
[0061] Sending an execution instruction corresponding to the service execution parameter to the current execution node, wherein the execution instruction is used to instruct the current execution node to execute the execution instruction;
[0062] Determine the next execution node and the service execution parameters corresponding to the next execution node according to the execution completion information of the current execution node and the preset service flow order;
[0063] The current service state is updated according to the next execution node and the service execution parameter corresponding to the next execution node until the service is completed.
[0064] The above-mentioned business flow method, device, computer equipment and storage medium obtain the current business state of the business to be circulated and the preset business flow order, and the preset business flow order is the execution order of the business flow node; according to the current business state, determine the current execution node from the business flow node; obtain the execution completion information of the current execution node, and determine the next execution node and the business execution parameters corresponding to the next execution node according to the execution completion information and the preset business flow order; according to the next execution node and the business execution parameters corresponding to the next execution node, update the current business state until the business flow is completed. By separating the business content and the business flow node in the business flow system, that is, abstracting each business node to obtain the business flow node, the business nodes serving different business contents can complete the business flow and business through the same business flow system. Since the business flow system is adapted to various types of business flow nodes, the repeated development of the business flow system can be avoided, thereby reducing the system development cost, that is, improving the business development efficiency, and avoiding the coupling of business content and business flow nodes, which can simplify the modification process of subsequent programs and reduce the maintenance cost in the subsequent use process. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A schematic diagram of a flow chart of a business flow method in an embodiment;
[0066] Figure 2 A schematic diagram of a storage step in an embodiment;
[0067] Figure 3 A schematic diagram of a flow chart of a flow log generation step in an embodiment;
[0068] Figure 4 A schematic diagram of a process for creating sub-process steps in one embodiment;
[0069] Figure 5 A schematic diagram of a process for determining a preset business flow sequence in an embodiment;
[0070] Figure 6 is a schematic diagram of business process information in an embodiment;
[0071] Figure 7 A schematic diagram of a business process involving a parent node and a child node in an embodiment;
[0072] Figure 8 A schematic diagram of the state influence between a parent node and a child node in one embodiment;
[0073] Fig. 9 is a structural block diagram of a service flow device in an embodiment;
[0074] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0075] 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.
[0076] This embodiment provides a business flow system, which includes a parent-child process state machine, business content, and multiple business flow nodes. The business content in the business flow system is separated from each business flow node. The multiple business flow nodes may include a parent node and one or more child nodes. The parent-child process state machine can execute the method described in the embodiment, control the parent node and the child node to execute various types of business, and complete the flow of business.
[0077] In one embodiment, Figure 1 As shown, a business flow method is provided. This embodiment takes the method applied to a control device in a business flow system as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a control device and a server, and is implemented through the interaction between the control device and the server. The above-mentioned control device can be but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server can be implemented with an independent server or a server cluster consisting of multiple servers.
[0078] like Figure 1 As shown, the service transfer method provided in this embodiment includes:
[0079] Step 101, obtaining the current business status of the business to be transferred and the preset business transfer sequence, where the preset business transfer sequence is the execution sequence of the business transfer nodes.
[0080] Specifically, the business to be circulated may be a business that requires the cooperation of multiple nodes to be completed, for example, it may be an approval-type business (such as a leave business). The current business status of the business to be circulated includes what tasks the node is currently performing and what operations it has completed. In other words, the current business status of the business to be circulated includes the type of business flow node that is currently processing the business to be circulated, and the state of the business flow node. The preset business flow order is the process sequence required to complete the business, which is determined in advance according to the type of the business to be circulated, that is, the execution order of the business flow nodes.
[0081] For example, when the business to be transferred is a data transmission business type between a parent node and each child node, the preset business flow order can be: ① the parent node creates a blocking IP address instruction, ② the parent node sends the blocking IP address instruction to the target child node, ③ the target child node executes the blocking IP address instruction, ④ the target child node returns the execution result to the parent node, ⑤ the parent node verifies and archives the received execution result to complete the flow of the business.
[0082] Step 102: determine the current execution node from the business flow nodes according to the current business status.
[0083] Specifically, the control device needs to determine the current execution node that is currently performing business flow from multiple business flow nodes included in the business flow system according to the current business state of the business to be transferred. The execution order included in the preset business flow order can correspond to multiple business flow nodes, and the control device parses the current business state to determine the current execution node.
[0084] Optionally, the control device may also determine the service execution parameters of the current execution node, and the service execution parameters corresponding to the current execution node are the data required for the current execution node to perform service flow. For example, the current execution node may be a parent node, and the service that the current execution node is performing service flow may be "creating a work order for blocking an IP address", and the service execution parameters corresponding to the current execution node may be a certification document for blocking an IP address, blocked IP address information, and node identification information corresponding to the operation of performing the blocking IP address.
[0085] Optionally, the control device generates an execution instruction based on the current execution node and the business execution parameters corresponding to the execution node, and sends the execution instruction to the current execution node. The execution instruction is used to instruct the current execution node to execute the execution instruction. For example, the control device sends the execution instruction corresponding to "create a work order for blocking IP address" to the parent node. After receiving the execution instruction, the parent node performs the corresponding operation according to the above-mentioned business execution parameters (such as the proof document for blocking IP address, the blocked IP address information, and the node identification information corresponding to the operation of blocking IP address). In this way, the parent node can determine whether it is necessary to create a work order for blocking IP address at this time based on the proof document for blocking IP address. If the parent node determines that the above-mentioned work order needs to be created at this time based on the proof document, the parent node creates the work order corresponding to the blocked IP address based on the blocked IP address information and the node identification information corresponding to the operation of blocking IP address, that is, determines which child node performs the operation of blocking IP address.
[0086] Step 103, obtaining the execution completion information of the current execution node, and determining the next execution node and the business execution parameters corresponding to the next execution node according to the execution completion information and the preset business flow sequence.
[0087] Specifically, the execution completion information of the current execution node may be the business flow result information generated after the current execution node performs business flow, that is, feedback information. The feedback information may include information indicating that the business has successfully flowed at the current execution node and information indicating that the business has failed to flow at the current execution node. That is to say, after the current execution node completes the flow of the business to be transferred, it generates feedback information (that is, execution completion information) in real time and feeds the feedback information back to the control device. In this way, after receiving the execution completion information, the control device can determine the next execution node that needs to perform business flow and the business execution parameters required for the next execution node to perform business flow according to the preset business flow order. The business execution parameters required by the next execution node are the data information required for the next execution node to perform business flow.
[0088] For example, when the execution device receives the execution completion information fed back by the parent node, it can determine the next execution node of the "parent node creates an instruction to block the IP address" and the business execution parameters corresponding to the next execution node according to the preset business flow order, that is, "the parent node sends the execution of blocking the IP address to the target child node." In this way, the next execution node is the parent node, and the business execution parameters corresponding to the next execution node are the blocking instruction for blocking the IP address generated by the parent node, and the address information of the target child node corresponding to the execution of the blocking instruction, etc.
[0089] Step 104: Update the current service state according to the next execution node and the service execution parameters corresponding to the next execution node until the service flow is completed.
[0090] Specifically, the control device updates the current service state according to the determined next execution node and the service execution parameters corresponding to the next execution node, that is, the service state of the control device itself is updated. In this way, the control device can control the next execution node to perform the corresponding operation according to the service execution parameters corresponding to the next execution node until the flow of the service is completed.
[0091] In the above-mentioned business flow method, the current business state of the business to be circulated and the preset business flow order are obtained, and the preset business flow order is the execution order of the business flow node; according to the current business state, the current execution node is determined from the business flow node; the execution completion information of the current execution node is obtained, and the next execution node and the business execution parameters corresponding to the next execution node are determined according to the execution completion information and the preset business flow order; according to the next execution node and the business execution parameters corresponding to the next execution node, the current business state is updated until the business flow is completed. By separating the business content and the business flow node in the business flow system, that is, abstracting each business node to obtain the business flow node, the business nodes serving different business contents can complete the business flow and business through the same business flow system. Since the business flow system is adapted to various types of business flow nodes, the repeated development of the business flow system can be avoided, thereby reducing the system development cost, that is, improving the business development efficiency, and avoiding the coupling of business content and business flow nodes, which can simplify the modification process of subsequent programs and reduce the maintenance cost in the subsequent use process.
[0092] In one embodiment, the business flow method also includes: storing the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a data form corresponding to the current execution node, and generating an operation log of the current execution node.
[0093] Specifically, the data form corresponding to the current execution node can be a preset data form corresponding to different types of business flow nodes. Different types of business flow nodes include parent nodes and child nodes. The parent node is provided with a preset parent node data form corresponding to the business flow of the parent node, and each child node is provided with a preset child node data form corresponding to the business flow of the child node. The control device can store the business execution parameters corresponding to the parent node execution operation and the execution completion information corresponding to the current execution node in the data form corresponding to the current execution node. And the flow log corresponding to the node can be generated in the preset log form (operate_log table).
[0094] In this embodiment, by storing operations corresponding to different types of business nodes in corresponding preset data forms and generating operation logs in real time, the business processing process can be clearly recorded to facilitate subsequent maintenance.
[0095] In one embodiment, the data form corresponding to the current execution node includes a parent node data form and a child node data form; accordingly, Figure 2 As shown, the business circulation method also includes:
[0096] Step 201, obtaining the identity of the current execution node.
[0097] Specifically, the identity of the current execution node is used to characterize the type of the current execution node. For example, the identity can be the identity ID (Identity document) of each execution node. The control device determines the type of the current execution node and the data form corresponding to the type according to the identity of the current execution node.
[0098] Specifically, the node type may include a parent node (main node) and a child node. The parent node may be an upper-level node, and the child node is a lower-level node of the parent node. The identity of the parent node may be ticket_id, and the identity of the child node may be receive_id. The control device may determine, based on the identity of the current execution node, whether the execution node corresponds to a preset parent node data form or a preset child node data form.
[0099] If the control device determines that the current execution node is a parent node, the method of step 202 is executed; if the control device determines that the current execution node is a child node, the method of step 203 is executed.
[0100] Step 202: store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a parent node data table.
[0101] Step 203: store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a sub-node data form.
[0102] In this embodiment, by storing operations corresponding to different types of business nodes in corresponding preset data forms and generating operation logs in real time, the business processing process can be clearly recorded to facilitate subsequent maintenance.
[0103] In one embodiment, Figure 3 As shown, the business flow method also includes:
[0104] Step 301: If the current business state is a preset initial state, a parent process corresponding to the parent node is created in the parent node data form. The preset initial state is the business state when receiving the business to be transferred.
[0105] Specifically, the preset initial state may be a state that is at the first position in the preset business process sequence. The preset initial state may also be the business state of the business to be transferred when the control device receives the business to be transferred. If the control device determines that the current business state is the preset initial state, that is, determines that the operation that the current execution node needs to perform is an initial operation, then the control device can determine that the node type of the business flow node that currently needs to perform business flow is a parent node. That is, the current execution node is a parent node. In this way, the control device needs to create a parent process corresponding to the parent node in the preset parent node data form.
[0106] For example, if the current business status is: when the parent node needs to execute the business operation of "creating a blocking IP address instruction", the control device can determine that the business to be transferred is in a preset initial state. In this way, the control device needs to create a parent process in the parent node data form corresponding to the parent node.
[0107] It should be noted that if the business to be transferred is a leave approval type business, the control device can determine that the current execution node corresponding to the preset initial state is the business flow node corresponding to the leave applicant. That is, the business node corresponding to the leave applicant is the parent node (initiating node), and the business node corresponding to the approval personnel is the child node (receiving node and approval node).
[0108] Step 302: Generate a flow log corresponding to the flow information according to the flow information corresponding to the parent process.
[0109] Specifically, the control device can record information related to the business flow of the parent process in a preset parent process data form according to the flow information corresponding to the generated parent process, including node type information, time information for the node to carry out business flow, and specific information about the business content involved in the node's business flow. For example, if it is a leave approval type of pending business, the flow information can be the leave person information, leave initiation time information, leave business specific information (leave time, leave reason, leave type and leave certificate, etc.), then the flow log can be xx employee submitted a leave approval of xx vacation type at xx time. The control device will also store the generated flow log in the parent process data form corresponding to the parent process.
[0110] In one embodiment, Figure 4 As shown, after the step of creating the parent process corresponding to the parent node, the business flow method further includes:
[0111] Step 401: upon receiving a service to be transferred, determining the service type of the service to be transferred and the target number of subnodes.
[0112] Specifically, when the control device receives the service to be transferred, the service type of the service to be transferred and the target number of child nodes corresponding to the service to be transferred can be determined according to the service identification information carried by the received service to be transferred. The target number of child nodes is the number of receivers. In this way, the sender is the parent node, and the control device determines the target number of receivers (child nodes) according to the service type of the service to be transferred.
[0113] For example, if the service to be transferred is a "blocking IP address" service, the control device can determine the number of corresponding sub-nodes according to the number of IP addresses to be blocked. In other words, the number of IP addresses to be blocked is consistent with the number of sub-nodes.
[0114] Step 402, obtaining the identity of the parent node, and creating a target number of sub-processes in the child node data form corresponding to each child node according to the identity of the parent node.
[0115] Specifically, the preset parent node data form can be a ticket form, and the preset child node data form can be a receiver form. The control device can store the parent process and the flow log when the parent process performs business flow in the ticket form, and store the flow logs when multiple sub-processes and each sub-process performs business flow in the corresponding receiver form. The control device also needs to obtain the identity of the parent node, that is, ticket_id, and associate the process identifier of each sub-process with the identity of the parent node (that is, ticket_id). For example, the identity of the parent node can be used as prefix data and marked in front of the identity of the parent node.
[0116] It should be noted that when the control device executes the parent process and each sub-process, it is necessary to record the flow log corresponding to the parent process and the operation log corresponding to each sub-process in the preset log form (operate_log table). Optionally, the operation log may include the type identification of the current execution node, the operation time of the current execution node, the current business status, and the previous business status.
[0117] In this embodiment, by storing the corresponding sub-processes in the preset sub-node data forms corresponding to the different sub-processes, the current business status and the current business processing flow can be clearly and accurately recorded, which facilitates the recording and display of subsequent business processing processes.
[0118] In one embodiment, the business transfer method further includes:
[0119] If the current execution node is a node in a sub-process, the business status information of the sub-process is synchronized to the parent process corresponding to the sub-process according to the execution completion information of the current execution node and a preset status synchronization function.
[0120] Specifically, if the control device determines that the current execution node is a business flow node in a sub-process, that is, determines that the type of the current execution node is a sub-node, then the control device needs to obtain the execution completion information fed back by the current execution node to determine the business status of the current execution node, that is, whether the business flow of the business to be transferred has been successfully completed or failed. In this way, the control device can synchronize the business status of the child node to the parent node corresponding to the child node through a pre-configured state synchronization function. In other words, the control device needs to synchronize the business status information of the sub-process to the parent process corresponding to the sub-process.
[0121] In one embodiment, the business transfer method further includes:
[0122] The business flow nodes include creating a business flow node, issuing a business flow node, signing for a business flow node, handling a business flow node, feedback a business flow node, verifying a business flow node, and archiving one or more business flow nodes.
[0123] In one embodiment, Figure 5 As shown, the business flow method also includes:
[0124] Step 501: Acquire business process information of a target type of business.
[0125] Specifically, the target type of business can be a business with a parent-child process relationship, such as blocking IP address business, leave approval business, reimbursement approval business, etc. The control device needs to control the business process information of the target type of business, that is, the business processing flow when the type of business is executed. Among them, the business process information is the business flow between the sender and the receiver.
[0126] Step 502: Determine the business process information of the parent node involved in the target type business and the business process information of the child node involved in the target type business according to the business process information.
[0127] Specifically, the control device may determine, according to the service process information, the parent node and child nodes involved in processing the target type service, as well as the service process information of each service node in processing the target type service.
[0128] Step 503: Determine a preset business flow sequence corresponding to the target type business according to the business process information of the parent node and the business process information of the child node.
[0129] Specifically, the control device may determine a preset service flow sequence corresponding to the service according to the flow of the service between the parent node and each child node, that is, the process information of the parent node executing the service and the process information of each child node executing the service.
[0130] Optionally, the business circulation system provides one or more business interfaces to the outside world, and the business circulation method also includes: receiving business requests sent by business modules through business interfaces, and implementing business requests; business interfaces include: at least one of creation, query, and statistics. In other words, the business circulation system provides a unified API operation interface for other business systems to call on demand. The unified API operation interface mainly includes API interfaces such as creation, query, and statistics, and the API can be expanded according to specific businesses.
[0131] In one embodiment, the business transfer method further includes:
[0132] If the feedback information of the current execution node is execution failure information, the preset state synchronization function is called to restore the current business state to the previous business state.
[0133] Specifically, if the current execution node determines that it does not need to execute the execution instruction at present after receiving the execution instruction, then the current execution node can generate execution failure information and send the execution failure information to the control device. In this way, the control device can call the preset state synchronization function according to the execution failure information to keep the business processing state unchanged.
[0134] For example, the business processing status may include the business processing status of the child node and the business processing status of the parent node. If the target type of business is the "blocking IP address" business, then the number of child nodes can be multiple. The preset business flow order can be parent node creation, parent node pending issuance status, each child node pending receipt status, each child node pending feedback status, parent node pending verification and archiving status.
[0135] Optionally, the current business execution state can be the state to be signed for by each child node, the current execution node can be the target child node, and the target child node can be any one of the multiple child nodes. If the target child node determines that the IP address does not need to be blocked after receiving the blocking IP address instruction of the parent node, at this time, the target child node will reject the blocking IP address instruction, generate execution failure information, and return the execution failure information to the control device. After receiving the execution failure information, the control device can call the preset state synchronization function (i.e., call the function of the main process on the child process node) to restore the current business execution state to the previous business state, that is, to restore the parent node to be issued. In this way, the parent node will re-execute the operation of sending the blocking IP address instruction to the child node. It should be noted that the parent node will re-send the blocking IP address instruction only to the child node whose feedback information is the execution failure information. That is, the parent node will send the execution instruction to the child node that refuses to execute the execution instruction (blocking IP address instruction) again.
[0136] It should be noted that if the business processing status of the sub-process is synchronized with the business processing status of the parent (main) process, for example, how to synchronize the status of pending issuance, pending receipt, pending feedback, and pending verification in the sub-process to the parent (main) process, that is, by calling back the main process function on the sub-process node, the main process function will calculate the current node status of the corresponding sub-process. When one of the sub-process status is pending issuance, the parent (main) process status is pending issuance; when one of the sub-process status is pending receipt, the parent (main) process status is pending issuance; pending feedback and pending verification are similar, that is, the earliest process status value in the corresponding sub-process status is taken and synchronized to the main process.
[0137] The following describes in detail the execution process of the above-mentioned service transfer method in conjunction with a specific embodiment. For example, the target type service is the "blocking IP address" service. In this way, when the control device determines that the current target type service is a parent-child process service involving blocking IP addresses, it will obtain the service process information of the "blocking IP address" service. Specifically, the service process information can be as follows: Figure 6 As shown: the sender creates a basic work order, and the work order content includes basic business information and attachment information uploaded by the user. The basic business information can be the address information of the recipient who blocks the IP address, the blocked IP address information, etc. The uploaded attachment information can be the blocking reason of the blocked IP address, such as the violation evidence information of the IP address, etc. The sender saves the created work order content, and can edit the work order content again after saving. The sender sends the generated work order content to multiple receivers. Each receiver can sign for the work order content, or reject the operation. In this way, the receiver can return the feedback information corresponding to the signing operation and the feedback information corresponding to the rejection operation to the sender. The sender can verify the feedback information, and after verification, the feedback information and the work order content can be archived and saved, so as to facilitate the retrieval or viewing of the work order content in the subsequent process.
[0138] The control device determines the business process information of the parent node involved in the "blocking IP address" business and the business process information of the child node involved in the target type business based on the business process information, that is, classifies the business process information according to the type of execution node, such as Figure 7As shown: For example, the sender can be a parent node, and the receiver can be N child nodes. The business process information of the parent node can be ① the parent node creates and saves the instruction to block the IP address (parent node creation status), ② the parent node sends the instruction to block the IP address to the target child node (parent node pending issuance status). The business process information of the child node can be ③ the target child node executes the instruction to block the IP address or does not execute the instruction to block the IP address (each child node is pending receipt status), ④ the target child node returns the execution result to the parent node (each child node is pending feedback status). The business process information of the parent node also includes ⑤ the parent node verifies and archives the received execution results (parent node pending verification and archiving status).
[0139] Then, the preset business flow order can be: ① The parent node creates a blocking IP address instruction (parent node creation status), ② The parent node sends the blocking IP address instruction to the target child node (parent node waiting to send status), ③ The target child node executes the blocking IP address instruction or does not execute the blocking IP address instruction (each child node is waiting for receipt status), ④ The target child node returns the execution result to the parent node (each child node is waiting for feedback status), ⑤ The parent node verifies and archives the received execution results (parent node is waiting for verification and archiving status) to complete the business.
[0140] In this way, the control device can obtain the current business state and the preset business flow order corresponding to the type of business. When it is determined that the current business state is the initial business state, that is, the parent node creation state. The control device determines that the current execution node is the parent node, and the business execution parameters corresponding to the current execution node are information related to the parent node creating the work order content, for example, the address information of the recipient of the blocked IP address, the blocked IP address information, the blocking reason of the blocked IP address, etc. In this way, the control device can generate an execution instruction for instructing the parent node to create the work order content, and send the execution instruction to the parent node. After the parent node receives the execution instruction, it creates the work order content according to the business execution parameters. After the creation is completed, the parent node generates execution completion information and returns the execution completion information to the control device. After receiving the execution completion information, the control device determines that the parent node has executed the above-mentioned execution instruction. In this way, the control device can determine that the next state of the "parent node creation state" is the "parent node to be issued state" according to the preset business flow order, that is, determine that the next execution node is the parent node, and the business execution parameters corresponding to the next execution node are the address information of each recipient who receives the work order content. The control device can update the current service state according to the next execution node and the service execution parameters corresponding to the next execution node. When the current service state is updated, the control device will generate a sending instruction and send the sending instruction to the parent node to instruct the parent node to complete the sending instruction. The execution process of other steps is similar to the execution process described above, and will not be repeated here until the "blocking IP address" service is completed.
[0141] Alternatively, if Figure 8 As shown, the sender is the parent (main) process and has its own process state; the receiver is the sub-process and also has its own process state. When there are multiple receivers, there will be N sub-processes. When the sub-process has the status of pending issuance and the status of pending verification, that is, when a sub-process is in the status of pending issuance, the corresponding parent (main) process is also in the status of pending issuance, and when a sub-process is in the status of pending verification, the corresponding parent (main) process is also in the status of pending verification, so as to remind the sender to perform business operations from the perspective of the parent (main) process. In other words, when the child node is in the status of pending receipt, if the child node refuses to sign the work order content sent by the parent node, the status of the child node will be restored to the previous status of pending receipt, that is, the status of pending issuance, and the corresponding parent node status will also be restored to the status of pending issuance. If the parent node determines that the feedback information sent by the child node fails to pass the verification, the status of the parent node and the status of the child node are both in the status of pending verification.
[0142] The business flow method provided by the embodiment of the present disclosure abstracts the business flow of the work order content between each sender and receiver, so that each business node can use the same set of microservice work order system, avoiding repeated development and reducing development costs; by separating the process nodes and business forms, it avoids the process nodes and business forms using process-oriented programming and development, which leads to problems such as difficulty in subsequent program modification and high maintenance costs. The state flow of the parent (main) process node and the child process node is completed based on the process state machine, so that the process definition is clear and the subsequent node expansion is convenient. By providing a unified business work order API interface, it can be used for other business modules to operate, avoiding the repeated development of the same operation interface in each system module.
[0143] It should be understood that although Figure 1-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-5 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0144] In one embodiment, Fig. 9 As shown, a business flow device is provided, the device is used in a business flow system, the business content in the business flow system is separated from the business flow node, and the device includes:
[0145] The first determination module 601 is used to obtain the current business status of the business to be transferred and the preset business transfer sequence, where the preset business transfer sequence is the execution sequence of the business transfer nodes;
[0146] The current execution node determination module 602 is used to determine the current execution node from the business flow nodes according to the current business state;
[0147] The second determination module 603 is used to obtain the execution completion information of the current execution node, and determine the next execution node and the business execution parameters corresponding to the next execution node according to the execution completion information and the preset business flow sequence;
[0148] The updating module 604 is used to update the current service state according to the next execution node and the service execution parameters corresponding to the next execution node until the service flow is completed.
[0149] In one embodiment, the data form corresponding to the current execution node includes a parent node data form and a child node data form; the device further includes:
[0150] The second acquisition module is used to obtain the identity of the current execution node;
[0151] A first storage module is used to store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a parent node data form if the current execution node is a parent node;
[0152] The second storage module is used to store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in the subnode data form if the current execution node is a subnode.
[0153] In one embodiment, the device further comprises:
[0154] A creation module is used to create a parent process corresponding to the parent node in the parent node data form if the current business state is a preset initial state, and the preset initial state is the business state when receiving the business to be transferred;
[0155] The log determination module is used to generate a flow log corresponding to the flow information according to the flow information corresponding to the parent process.
[0156] In one embodiment, the device further comprises:
[0157] A target number determination module for subnodes, used to determine the business type of the business to be transferred and the target number of subnodes when receiving the business to be transferred;
[0158] The sub-process creation module is used to obtain the identity of the parent node, and create a target number of sub-processes in the sub-node data form corresponding to each sub-node according to the identity of the parent node.
[0159] In one embodiment, the device further comprises:
[0160] The synchronization module is used to synchronize the business status information of the sub-process to the parent process corresponding to the sub-process according to the execution completion information of the current execution node and the preset status synchronization function if the current execution node is a node in the sub-process.
[0161] In one embodiment, the device further comprises:
[0162] A first business process information determination module is used to obtain business process information of a target type of business;
[0163] A second business process information determination module is used to determine the business process information of the parent node involved in the target type business and the business process information of the child node involved in the target type business according to the business process information;
[0164] The preset business flow sequence determination module is used to determine the preset business flow sequence corresponding to the target type business according to the business process information of the parent node and the business process information of the child node.
[0165] In one of the embodiments, the business flow system provides a business interface to the outside, and the device also includes: a request module, which is used to receive a business request sent by the business module through the business interface and implement the business request; the business interface includes: at least one of creation, query, and statistics.
[0166] For the specific definition of the business circulation device, please refer to the definition of the business circulation method above, which will not be repeated here. Each module in the above-mentioned business circulation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0167] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, 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, a computer program and a data form. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The data form of the computer device is used to store business flow related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business flow method is implemented.
[0168] Those skilled in the art will understand that Fig.10 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.
[0169] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0170] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0171] Those of ordinary skill 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 memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. 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).
[0172] The technical features of the above embodiments may be arbitrarily combined. 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.
[0173] The above 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 invention patent. 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 patent of the present application shall be subject to the attached claims.
Claims
1. A business circulation method, characterized in that: The method is used in a business flow system, in which business content is separated from a business flow node, and the method includes: Acquire the current business status of the business to be transferred and a preset business transfer order, where the preset business transfer order is the execution order of the business transfer nodes; According to the current business state, determining a current execution node from the business flow nodes; Obtaining execution completion information of the current execution node, and determining a next execution node and a business execution parameter corresponding to the next execution node according to the execution completion information and the preset business flow sequence; According to the next execution node and the business execution parameters corresponding to the next execution node, the current business state is updated until the flow of the business is completed; the data form corresponding to the current execution node includes a parent node data form and a child node data form; The method further includes: obtaining an identity identifier of the current execution node; if the current execution node is a parent node, storing the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a parent node data form; if the current execution node is a child node, storing the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a child node data form; Obtain business process information of the target type business; determine the business process information of the parent node involved in the target type business and the business process information of the child node involved in the target type business based on the business process information; determine the preset business flow order corresponding to the target type business based on the business process information of the parent node and the business process information of the child node.
2. The method according to claim 1, characterized in that The method further comprises: If the current business state is a preset initial state, a parent process corresponding to the parent node is created in the parent node data form, wherein the preset initial state is the business state when the business to be transferred is received; According to the flow information corresponding to the parent process, a flow log corresponding to the flow information is generated.
3. The method according to claim 2, characterized in that After the step of creating a parent process corresponding to the parent node, the method further includes: When receiving the service to be transferred, determining the service type of the service to be transferred and the target number of subnodes; The identity of the parent node is obtained, and in the child node data form corresponding to each child node, a target number of child processes are created according to the identity of the parent node.
4. The method according to claim 3, characterized in that The method further comprises: If the current execution node is a node in the sub-process, the business status information of the sub-process is synchronized to the parent process corresponding to the sub-process according to the execution completion information of the current execution node and a preset status synchronization function.
5. The method according to claim 4, characterized in that The method further comprises: The business flow nodes include creating a business flow node, issuing a business flow node, signing for a business flow node, handling a business flow node, feedback a business flow node, verifying a business flow node, and archiving one or more business flow nodes.
6. The method according to claim 1, characterized in that The business flow system provides a business interface to the outside, and the method further includes: The service request sent by the service module is received through the service interface, and the service request is implemented; the service interface includes: at least one of creation, query, and statistics.
7. A business circulation device, characterized in that: The device is used in a business flow system, in which business content is separated from a business flow node, and the device includes: The acquisition module is used to obtain the current business status and preset business flow sequence; A first determination module is used to obtain the current business status of the business to be transferred and a preset business transfer order, where the preset business transfer order is the execution order of the business transfer nodes; A current execution node determination module, used to determine a current execution node from the business flow nodes according to the current business state; A second determination module is used to obtain the execution completion information of the current execution node, and determine the next execution node and the business execution parameters corresponding to the next execution node according to the execution completion information and the preset business flow sequence; An update module, used to update the current business state according to the next execution node and the business execution parameters corresponding to the next execution node until the flow of the business is completed; the data form corresponding to the current execution node includes a parent node data form and a child node data form; The device further includes: a second acquisition module, used to acquire the identity of the current execution node; a first storage module, used to store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a parent node data form if the current execution node is a parent node; a second storage module, used to store the current execution node, the business execution parameters corresponding to the current execution node, and the execution completion information corresponding to the current execution node in a child node data form if the current execution node is a child node; The first business process information determination module is used to obtain the business process information of the target type business; the second business process information determination module is used to determine the business process information of the parent node involved in the target type business and the business process information of the child node involved in the target type business based on the business process information; the preset business flow sequence determination module is used to determine the preset business flow sequence corresponding to the target type business based on the business process information of the parent node and the business process information of the child node.
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.
Citation Information
Patent Citations
Self adaptive flow method based on rule constrain in office automation
CN101051364A
Method for publishing tree -type structure database as distributed XML database
CN101216824A