Flow processing method, apparatus and network device
Through communication between the process system and the business system, the progressive nodes are used to automatically obtain and execute virtual child nodes, which solves the problem that top service developers need to obtain intermediate service subservice information, and realizes the automatic drawing of topological structure diagrams and the improvement of process processing efficiency.
Patent Information
- Application Number
- CN202210459904.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-04-28
AI Technical Summary
The developers of the top service need to obtain the information of their directly associated subservices from the developers of the intermediate service before they can complete the drawing of the topological structure diagram, resulting in increased development complexity and reduced efficiency.
Through communication between the process system and the business system, the progressive nodes are used to obtain detailed information of virtual child nodes, and the virtual child node services at different levels are automatically obtained and executed based on this information, thereby automatically generating a topological structure diagram.
It simplifies the work of service developers, reduces dependence on lower-level service developers, improves process efficiency, and can automatically draw topological structure diagrams.
Smart Images

Figure CN114860311B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technologies, and in particular, to a process processing method, apparatus, and network device. Background Art
[0002] Currently, when designing the architecture of a project for unified management of the overall life cycle of artificial intelligence (AI) service requirements, considering that the upper-layer AI services are connected to multiple lower-layer sub-services, many of which are not directly connected, and go through multiple intermediate services. For example, a four-layer topology diagram includes: a first layer, a second layer, a third layer, and a fourth layer. The problem caused by this is that developers of the top-level service are prone to draw the topology diagram incorrectly, and they need to consult the developers of the intermediate services (the intelligent cropping service in the second layer and the asynchronous face recognition service in the third layer) and obtain the information of their directly connected sub-services before they can complete the drawing of the overall topology structure. Summary of the Invention
[0003] The purpose of the embodiments of the present invention is to provide a process processing method, apparatus, and network device, so as to solve, to a certain extent, the problem that developers of the top-level service need to obtain the information of the directly connected sub-services from the developers of the intermediate services before they can complete the topology diagram. The specific technical solutions are as follows:
[0004] In the first aspect of the present invention, first, a process processing method is provided, which is applied to a process system. The process system communicates with a service system, and the service system dynamically configures the detailed information of virtual sub-nodes; the method includes:
[0005] Obtain the attribute data of a task node, where the attribute data includes: the node type and the corresponding execution parameters;
[0006] When the node type is a progressive type, the following operations are repeatedly executed until no more detailed information of virtual sub-nodes can be obtained from the service system:
[0007] According to the hypertext transfer protocol address for accessing the service system included in the execution parameters, obtain the detailed information of virtual sub-nodes from the service system, and according to the detailed information of the virtual sub-nodes, obtain the virtual sub-nodes of the task node and the corresponding virtual sub-node services, and execute the virtual sub-node services; where the virtual sub-nodes obtained in the (i + 1)-th time are the next-level virtual sub-nodes of the virtual sub-nodes that have completed the corresponding virtual sub-node services among the virtual sub-nodes obtained in the i-th time, and i is an integer greater than or equal to 0;
[0008] When all the virtual sub-node services of the task node are completed, it is determined that the service of the task node is completed.
[0009] In the second aspect of the implementation of the present invention, a process processing device is further provided, which is set in a process system. The process system communicates with a service system, and the service system dynamically configures the detailed information of virtual sub-nodes; the device includes:
[0010] An acquisition module, configured to acquire the attribute data of a task node, where the attribute data includes: a node type and corresponding execution parameters;
[0011] A first execution module, configured to repeatedly execute the following operations until no more detailed information of virtual sub-nodes can be obtained from the service system:
[0012] According to the Hypertext Transfer Protocol address for accessing the service system included in the execution parameters, obtain the detailed information of virtual sub-nodes from the service system, and according to the detailed information of the virtual sub-nodes, obtain the virtual sub-nodes of the task node and the corresponding virtual sub-node services, and execute the virtual sub-node services; wherein, the virtual sub-nodes obtained in the (i + 1)-th acquisition are the next-level virtual sub-nodes of the virtual sub-nodes that have completed the corresponding virtual sub-node services among the virtual sub-nodes obtained in the i-th acquisition, and i is an integer greater than or equal to 0;
[0013] A first determination module, configured to determine that the service of the task node is completed when all the virtual sub-node services of the task node are completed.
[0014] In the third aspect of the embodiments of the present invention, a network device is further provided, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete mutual communication through the communication bus;
[0015] The memory is used to store a computer program;
[0016] The processor is configured to implement the above-mentioned process processing method when executing the program stored on the memory.
[0017] In the fourth aspect of the implementation of the present invention, a computer-readable storage medium is further provided. Instructions are stored in the computer-readable storage medium, and when it runs on a computer, it causes the computer to execute any one of the above-mentioned process processing methods.
[0018] In the fifth aspect of the implementation of the present invention, a computer program product containing instructions is further provided. When it runs on a computer, it causes the computer to execute any one of the above-mentioned process processing methods.
[0019] In the process handling method according to an embodiment of the present invention, since the process system communicates with the business system, when the node type of the task node is a progressive type, the process system accesses the business system through the hypertext transfer protocol address and obtains the detailed information of the virtual sub-node from the business system; since the business system dynamically configures the detailed information of the virtual sub-node, the detailed information of the virtual sub-node obtained by the process system each time is different, and different levels of virtual sub-nodes and corresponding virtual sub-node services can be obtained according to the detailed information of different virtual sub-nodes, and the virtual sub-node services are executed. Thus, when the process system obtains the detailed information of the virtual sub-node from the business system for the first time, the first-level virtual sub-node can be obtained according to the detailed information of the virtual sub-node obtained for the first time; when the process system obtains the detailed information of the virtual sub-node from the business system for the second time, the second-level virtual sub-node can be obtained according to the detailed information of the virtual sub-node obtained for the second time, and multiple levels of virtual sub-nodes are obtained in a progressive manner according to the service level until no detailed information of the virtual sub-node is obtained; in this process, the developers of the top service do not need to obtain the sub-service information from the developers of the lower-level service, and only need to obtain the detailed information of different virtual sub-nodes multiple times to automatically generate different levels of virtual self-sub-nodes, and then complete the topology structure diagram of the virtual sub-nodes, which simplifies the work of the service developers and improves the efficiency of the process handling. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art.
[0021] Figure 1 It is one of the step flowcharts of the process handling method provided by the embodiment of the present invention;
[0022] Figure 2 It is the second step flowchart of the process handling method provided by the embodiment of the present invention;
[0023] Figure 3 It is the schematic diagram of the execution manner provided by the embodiment of the present invention;
[0024] Figure 4 It is the structural block diagram of the process handling device provided by the embodiment of the present invention;
[0025] Figure 5 It is the structural block diagram of the network device provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0026] The following will describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention.
[0027] As Figure 1As shown in the figure, an embodiment of the present invention provides a process processing method, which can be applied to a process system that communicates with a business system, and the business system dynamically configures the detailed information of virtual sub-nodes. The above process processing method may specifically include the following steps:
[0028] Step 101, obtain the attribute data of the task node, where the attribute data includes: node type and corresponding execution parameters.
[0029] Specifically, a business process template is configured in the process system, and the attribute data of each task node is configured in the business process template, and the attribute data includes node type, execution parameters corresponding to the node type, etc. Among them, the node type mainly includes 3 types, request type, email type, and progressive type (i.e., dynamic progressive).
[0030] In the case where the node type is the request type, the execution parameters configured corresponding to the request type may include: parameter name, parameter serial number, Hypertext Transfer Protocol (HTTP) address, first request parameter, synchronous or asynchronous request type, etc. The process system sends a request carrying the first request parameter to the business system, obtains the request result, and determines whether to execute the service of the next task node according to the request result. Among them, the above HTTP address may be a synchronous HTTP address or an asynchronous HTTP address, which is not specifically limited herein.
[0031] In the case where the node type is the email type, the execution parameters configured corresponding to the email type may include: parameter name, parameter serial number, email template address, dynamic recipient, email dynamic content parameter, email type for notification or review, etc. The process system sends an email (carrying email dynamic content parameters, parameter name, parameter serial number, etc.) to the dynamic recipient, obtains the email sending result, and determines whether to execute the service of the next task node according to the email sending result.
[0032] Step 102, in the case where the node type is the progressive type, loop to execute the following operations until no detailed information of the virtual sub-node can be obtained from the business system:
[0033] According to the Hypertext Transfer Protocol address for accessing the business system included in the execution parameters, obtain the detailed information of the virtual sub-node from the business system, and according to the detailed information of the virtual sub-node, obtain the virtual sub-node of the task node and the corresponding virtual sub-node service, and execute the virtual sub-node service; where the virtual sub-node obtained in the (i + 1)-th time is the next-level virtual sub-node of the virtual sub-node that has completed the corresponding virtual sub-node service among the virtual sub-nodes obtained in the i-th time, and i is an integer greater than or equal to 0.
[0034] Specifically, when the node type is a progressive type, the configured execution parameters corresponding to the progressive type may include: the hypertext transfer protocol address for accessing the business system, the second request parameter, and the like.
[0035] When the node type is a progressive type, the process system accesses the business system through the hypertext transfer protocol address, which carries the second request parameter for requesting to obtain the detailed information of the virtual sub-node. The process system obtains the detailed information of the dynamically configured virtual sub-node from the business system for the i-th time. After obtaining the detailed information of the virtual sub-node for the i-th time, according to the detailed information of the virtual sub-node obtained for the i-th time, the process system obtains the virtual sub-node of the task node (i.e., the virtual sub-node at the i-th level of the task node) and the corresponding virtual sub-node service, and executes the virtual sub-node service.
[0036] Among them, each virtual sub-node executes the corresponding virtual sub-node service through the process system. During the execution of the virtual sub-node service, for the virtual sub-node services at the same level, the multi-threaded method can be used to execute the virtual sub-node services in parallel.
[0037] It should be noted that when multiple virtual sub-node services are executed in parallel, the start times are the same, but the end times are not necessarily the same. Therefore, the multiple virtual sub-node services executed in parallel do not necessarily complete at the same time.
[0038] If the virtual sub-node service corresponding to one of the virtual sub-nodes obtained for the i-th time is completed, the above steps are looped to obtain the virtual sub-node at the next level of the virtual sub-node that has completed the virtual sub-node service and the corresponding virtual sub-node service. That is, the process system obtains the detailed information of the dynamically configured virtual sub-node from the business system for the (i + 1)-th time through the hypertext transfer protocol address. After obtaining the detailed information of the virtual sub-node for the (i + 1)-th time, according to the detailed information of the virtual sub-node obtained for the (i + 1)-th time, the process system obtains the virtual sub-node of the task node for the (i + 1)-th time (i.e., the virtual sub-node at the (i + 1)-th level of the task node) and the corresponding virtual sub-node service, and executes the virtual sub-node service, and so on, until the process system no longer obtains the detailed information of the virtual sub-node from the business system.
[0039] It should be noted that since new virtual sub-nodes and their virtual sub-node services may dynamically appear in the business system during the process from the process system obtaining the detailed information of the virtual sub-service to executing the virtual sub-node service, the detailed information of the virtual sub-node obtained for the (i + 1)-th time is the detailed information of the newly added virtual sub-node in the business system relative to the detailed information of the virtual sub-node obtained for the i-th time.
[0040] Step 103, when all the virtual sub-node services of the task node are completed, determine that the service of the task node is completed.
[0041] Specifically, if at least one virtual sub-node service fails, the process system obtains the information that the virtual sub-node service of the above virtual sub-node fails, and sets the status of the virtual sub-node where the virtual sub-node service fails to the failure status, and the failure time can be recorded to know the time when each virtual sub-node service fails. Also, if at least one virtual sub-node service fails, it means that the service of the task node fails, and the status of the task node can be set to the failure status. If the virtual sub-node service corresponding to one of the virtual sub-nodes is successfully executed, the status of the virtual sub-node where the virtual sub-node service is successfully executed can be set to the completed status, and the completion time is recorded to know the time when each virtual sub-node service is completed.
[0042] If the virtual sub-node services corresponding to all virtual sub-nodes are successfully executed, it means that the virtual sub-node services corresponding to all virtual sub-nodes of the task node have been completed. The status of the task node can be set to the completed status, indicating that the service of the task node has been completed, and the completion time is recorded to know the time when the service of the task node is completed, and the service of the next task node can be continued to be processed.
[0043] The following uses a specific embodiment to elaborate on the above Step 102 and Step 103 in detail:
[0044] If i is equal to 1 and the node type is the progressive type, the process system accesses the service system for the first time through the Hypertext Transfer Protocol address, obtains the detailed information of the dynamically configured virtual sub-nodes from the service system for the first time, and after obtaining the detailed information of the virtual sub-nodes for the first time, according to the detailed information of the virtual sub-nodes obtained for the first time, obtains the virtual sub-nodes of the task node (i.e., the first-level virtual sub-nodes of the task node) and the corresponding first-level virtual sub-node services for the first time, and executes the first-level virtual sub-node services.
[0045] If one of the virtual sub-node services at the first level is completed, the process system accesses the service system for the second time through the hypertext transfer protocol address, obtains the detailed information of the dynamically configured virtual sub-nodes from the service system for the second time, and after obtaining the detailed information of the virtual sub-nodes twice, according to the detailed information of the virtual sub-nodes obtained twice, obtains the virtual sub-nodes of the task node (i.e., the virtual sub-nodes at the second level of the task node) and the corresponding virtual sub-node services at the second level, and executes the virtual sub-node services at the second level. Among them, the virtual sub-nodes at the second level are the virtual sub-nodes at the next level (i.e., the second level) of the virtual sub-node services at the first level, and so on, flowing down progressively according to the service level to obtain the virtual sub-nodes at all levels of the task node, and automatically complete the topology diagram of the virtual sub-nodes at all levels of the task node.
[0046] In the above solution, since the process system communicates with the service system, when the node type of the task node is a progressive type, the process system accesses the service system through the hypertext transfer protocol address and obtains the detailed information of the virtual sub-nodes from the service system; since the service system dynamically configures the detailed information of the virtual sub-nodes, the detailed information of the virtual sub-nodes obtained by the process system each time is different, and different levels of virtual sub-nodes and the corresponding virtual sub-node services can be obtained according to the detailed information of different virtual sub-nodes, and the virtual sub-node services are executed. Thus, when the process system obtains the detailed information of the virtual sub-nodes from the service system for the first time, the virtual sub-nodes at the first level can be obtained according to the detailed information of the virtual sub-nodes obtained for the first time; when the process system obtains the detailed information of the virtual sub-nodes from the service system for the second time, the virtual sub-nodes at the second level can be obtained according to the detailed information of the virtual sub-nodes obtained for the second time, and multiple levels of virtual sub-nodes are obtained by flowing down progressively according to the service level until no detailed information of the virtual sub-nodes can be obtained; in this process, the developers of the top service do not need to obtain sub-service information from the developers of the lower-level services, and only need to obtain the detailed information of different virtual sub-nodes multiple times to automatically generate virtual sub-nodes at different levels, and then complete the topology diagram of the virtual sub-nodes, which simplifies the work of service developers and improves the efficiency of process processing.
[0047] As an optional embodiment, the step 101 of obtaining the attribute data of the task node may specifically include: obtaining the identifier of the task node; obtaining the attribute data corresponding to the identifier of the task node.
[0048] Specifically, for the data related to the configuration of the business system, the business system generates new tasks based on the relevant data, that is, the operations of the task nodes, and sends the identifiers of the task nodes to the process system. Since there is a business process template configured in the process system, and the business process template is configured with the attribute data of each task node, therefore, after the process system obtains the identifier of the task node, it obtains the attribute data of the task node from the business process template according to the identifier.
[0049] As an optional embodiment, the detailed information of the virtual sub-node includes: sub-business data;
[0050] Among them, in step 102, according to the Hypertext Transfer Protocol address for accessing the business system included in the execution parameters, the detailed information of the virtual sub-node is obtained from the business system, and according to the detailed information of the virtual sub-node, the virtual sub-nodes of the task node and the corresponding virtual sub-node operations are obtained. Specifically, it may include the following steps A1 to A5:
[0051] Step A1: Obtain the sub-business data from the business system according to the Hypertext Transfer Protocol address.
[0052] Specifically, in the case where the node type is a progressive type, the process system accesses the business system through the Hypertext Transfer Protocol address and obtains the dynamically configured sub-business data from the business system. Among them, the above Hypertext Transfer Protocol address is a synchronous HTTP address. The sub-business data is the response data returned by the business system according to the HTTP address, and may include, but is not limited to, the following content: the attribute data of all virtual sub-nodes of the task node and the corresponding virtual sub-node operations, etc.
[0053] Step A2: Parse the sub-business data to obtain a sub-business array.
[0054] Specifically, the process system obtains the attribute data of all virtual sub-nodes, parses the attribute data of all virtual sub-nodes, and obtains a set of strings of the attribute data of all virtual sub-nodes, that is, the sub-business array.
[0055] Step A3: Perform a first data conversion on N strings in the sub-business array to obtain N sub-business objects; where N is a positive integer.
[0056] Specifically, the sub-business array contains N strings, and the process system performs a first data conversion on the N strings to obtain the corresponding N sub-business objects. Among them, one string contains all the execution parameters of a virtual sub-node. The first data conversion represents the conversion of the data format between the string and the array.
[0057] Step A4: Determine N virtual sub-nodes through the N sub-business objects.
[0058] Specifically, the process system can determine N virtual child nodes through the above N sub-business objects, that is, one sub-business object corresponds to one virtual child node. Moreover, the process system establishes an association relationship between the N virtual child nodes and the task node, and this association relationship indicates that the parent node of the N virtual child nodes is the task node.
[0059] Step A5: Obtain the virtual child node services corresponding to the N virtual child nodes.
[0060] Specifically, after determining the N virtual child nodes, according to the virtual child node services in the sub-business data, the virtual child node services corresponding to each virtual child node can be obtained, that is, each virtual child node among the N virtual child nodes has a corresponding virtual child node service, and the N virtual child nodes correspond to N virtual child node services.
[0061] It should be noted that since the sub-business data is dynamically configured, the sub-business data obtained by the process system is dynamically changing, and the number of virtual child nodes obtained by the process system based on the sub-business data is also dynamically changing. Moreover, since an association relationship is established between the task node and the virtual child nodes, the number of virtual child nodes associated with the task node is dynamically changing, and thus the number of sub-businesses of the task node is also dynamically changing.
[0062] For the above steps A1 to A5, since the process system can access the task system through a pre-configured Hypertext Transfer Protocol address, the process system can obtain the sub-business data dynamically configured by the task system, parse the sub-business data to obtain a sub-business array, and perform a first data conversion on the N strings in the sub-business array, thereby obtaining N sub-business objects. Through the N sub-business objects, the required N virtual child nodes can be determined, and the virtual child node services corresponding to each virtual child node can be obtained through the sub-business data. The N virtual child nodes execute their respective virtual child node services through the process system. The entire process can automatically generate N virtual child nodes and execute the virtual child node services corresponding to each virtual child node, which can not only reduce the error rate of manual work but also improve the process processing efficiency.
[0063] As an optional embodiment, the step A2 of parsing the sub-business data to obtain a sub-business array may specifically include:
[0064] Parse the sub-business data to obtain the string data corresponding to the sub-business array parameter name included in the execution parameters;
[0065] Perform a second data conversion on the string data to obtain a sub-business array.
[0066] Specifically, when the node type is the batch type, the execution parameter may further include: the sub-business array parameter name. The process system obtains the sub-business array parameter name included in the execution parameter from the business process template, parses the sub-business data according to the sub-business array parameter name, and extracts the value corresponding to the sub-business array parameter name in the sub-business data, that is, the string data. By performing a second data conversion on the string data, the converted sub-business array can be obtained. Here, the second data conversion represents the data format conversion between a string and an array.
[0067] As an optional embodiment, before the step 103 determines to complete the business of the task node when all virtual sub-node services of the task node are completed, the method may further include:
[0068] When a virtual sub-node service is completed, it is judged whether there are any uncompleted virtual sub-node services among all virtual sub-node services of the task node;
[0069] When it is determined that there are no uncompleted virtual sub-node services, it is determined that all virtual sub-node services of the task node are completed.
[0070] Specifically, during the execution of the virtual sub-node service, if the virtual sub-node service corresponding to one of the virtual sub-nodes is successfully executed and the process system no longer obtains the detailed information of the virtual sub-node from the business system through the hypertext transfer protocol address, it can be judged whether there are any uncompleted virtual sub-node services among all virtual sub-node services of the task node. If it is judged that there are no uncompleted virtual sub-node services, it means that all virtual sub-node services of the task node have been completed, and at this time, it means that the business of the task node has been completed.
[0071] Among them, the method for judging whether a virtual sub-node service is completed may be: before each virtual sub-node service is completed, the status of the virtual sub-node is set to the uncompleted state. During the execution of the virtual sub-node service, the status of the virtual sub-node whose virtual sub-node service is executed successfully is set to the completed state, and the status of the virtual sub-node whose virtual sub-node service fails is set to the failed state. Thus, the process system can know whether each virtual sub-node has completed the corresponding virtual sub-node service according to the status of each virtual sub-node.
[0072] As an optional embodiment, after the step of judging whether there are any uncompleted virtual sub-node services among all virtual sub-node services of the task node, the method may further include:
[0073] In the case of determining that there are unfinished virtual sub - node services, execute the unfinished virtual sub - node services until all virtual sub - node services of the task node are completed.
[0074] Specifically, in the process of determining whether there are unfinished virtual sub - node services among all virtual sub - node services of a task node, if it is determined that there are still unfinished virtual sub - node services, then the unfinished virtual sub - node services need to be continuously executed until all unfinished virtual sub - node services are completed. When all virtual sub - node services of the task node have been completed, it indicates that the services of the task node have been completed.
[0075] The above - mentioned solution will be described in detail through a specific embodiment as follows:
[0076] The process system specifically includes: the request node implementation class RequestNodeServiceImpl, the mail node implementation class MailNodeServiceImpl, and the mail utility class MailUtil; as Figure 2 shown, the process system may also include: the receiving class FlowController, the execution class FlowService, the dynamic progressive node implementation class BatchNodeServiceImpl, and the request utility class RequestUtil.
[0077] Among them, the process system configures relevant data (i.e., the business process template), the business system sends the business data corresponding to the business process template to the process system. After the process system receives the business data, the process system generates new tasks according to the business data and the business process template, that is, the business collection of all task nodes. The specific implementation steps are as follows:
[0078] Step a1: The receiving class FlowController receives the identifier of the task node sent by the business system, and according to the identifier of the task node, obtains the attribute data of the task node from the business process template, and sends the attribute data to the execution class FlowService.
[0079] Step a2: If the node type in the attribute data is determined to be the progressive type, the execution class FlowService sends the attribute data to the dynamic progressive node implementation class ProgressiveNodeServiceImpl according to the attribute data, triggering the execution of the services of the task node.
[0080] It should be noted that if the node type in the attribute data is the request type, a request is sent to the business system to obtain the request result, and whether to execute the services of the next task node is determined according to the request result.
[0081] If the node type in the attribute data is of the email type, send an email to the dynamic recipient, obtain the email sending result, and determine whether to execute the business of the next task node based on the email sending result.
[0082] Step a3: The dynamic progressive node implementation class ProgressiveNodeServiceImpl sends a Hypertext Transfer Protocol address for accessing the business system to the business system through the request utility class RequestUtil according to the attribute data. When the business system receives the Hypertext Transfer Protocol address, it returns the i-th sub-business data (i.e., the sub-business data obtained for the i-th time).
[0083] Step a4: The request utility class RequestUtil obtains the i-th sub-business data and sends the i-th sub-business data to the dynamic progressive node implementation class ProgressiveNodeServiceImpl.
[0084] Step a5: The dynamic progressive node implementation class ProgressiveNodeServiceImpl parses the i-th sub-business data to obtain the i-th sub-business array; and performs a first data conversion on the strings in the i-th sub-business array to obtain the i-th sub-business object; determines the i-th virtual sub-node (i.e., the virtual sub-node at the i-th level) through the i-th sub-business object, associates the i-th virtual sub-node with the task node, and notifies the execution class FlowService of the determined i-th virtual sub-node.
[0085] Step a6: The execution class FlowService executes the virtual sub-node business corresponding to the i-th virtual sub-node. If the type of this virtual sub-node is of the request type, the request node implementation class RequestNodeServiceImpl executes the virtual sub-node business; if the type of this virtual sub-node is of the email type, the email node implementation class MailNodeServiceImpl executes the virtual sub-node business.
[0086] It should be noted that if the type of the virtual sub-node is of the request type, the request node implementation class RequestNodeServiceImpl executes the request logic, that is, sends an execution request to the business system. After the business system processes the execution request, if there is a virtual sub-node business at the next level, it can automatically configure the virtual sub-node business at the next level.
[0087] If the type of the virtual child node is the mail type, the mail node implementation class MailNodeServiceImpl executes the mail logic, that is, sends an email to the dynamic recipient. The business system obtains the mail processing operation of the dynamic recipient. After the mail processing is completed, if there is a virtual child node business at the next level, the business system can configure the virtual child node business at the next level.
[0088] Step a7: If the virtual child node business is executed completed, the receiving class FlowController obtains the execution completion result, sets the status of the virtual child node to completed, obtains the attribute data of the task node of the virtual child node, and sends the attribute data to the execution class FlowService.
[0089] Step a8: The execution class FlowService determines the node type of the task node according to the attribute data. If the node type of the task node is the progressive type, it notifies the dynamic progressive node implementation class ProgressiveNodeServiceImpl. If the node type is the request type or the mail type, it executes the business of the next task node.
[0090] Among them, when the node type of the task node is the progressive type, steps a3 to a8 are looped. Each time steps a3 to a8 are looped, the value of i increases by 1. That is, if the value of i is 1 during the previous execution of steps a3 to a8, the virtual child node at the first level is obtained and the virtual child node business at the first level is executed. After step a8 is executed, return to step a3 and continue to execute steps a3 to a8, where the value of i is 2, the virtual child node at the second level is obtained and the virtual child node business at the second level is executed, and so on, until after step a8 is executed, return to step a3 and continue to send the hypertext transfer protocol address to the business system through the request utility class RequestUtil. Stop if the i-th sub-business data is not obtained in step a4 and no longer loop steps a3 to a8. At this time, it is necessary to determine whether there is an unfinished virtual child node business among all the virtual child node businesses of the task node. If it is determined that there is no unfinished virtual child node business, it means that the business of the task node has been completed; if it is determined that there is still an unfinished virtual child node business, it is necessary to continue to execute the unfinished virtual child node business until all the unfinished virtual child node businesses are executed.
[0091] For example: such as Figure 3As shown, obtain the node type of task node A and the corresponding execution parameters. If the node type of task node A is a progressive type, the process system accesses the business system through the hypertext transfer protocol address, obtains the first sub-business data, parses the first sub-business data to obtain the first sub-business array, performs the first data conversion on 1 string in the first sub-business array to obtain 1 first sub-business object, and determines 1 first virtual sub-node, that is, the virtual sub-node B at the first level, through 1 first sub-business object, and obtains and executes the virtual sub-node service corresponding to the virtual sub-node B.
[0092] When the virtual sub-node service corresponding to the virtual sub-node B is completed, the process system accesses the business system again through the hypertext transfer protocol address, obtains the second sub-business data, parses the second sub-business data to obtain the second sub-business array, performs the first data conversion on 2 strings in the second sub-business array to obtain 2 second sub-business objects, and determines 2 second virtual sub-nodes, that is, the virtual sub-nodes C and D at the next level of the virtual sub-node B, through 2 second sub-business objects, and obtains and executes the virtual sub-node services corresponding to the virtual sub-nodes C and D.
[0093] Similarly, when the virtual sub-node service corresponding to the virtual sub-node C is completed, the process system accesses the business system again through the hypertext transfer protocol address, obtains the third sub-business data, parses the third sub-business data to obtain the third sub-business array, performs the first data conversion on 3 strings in the third sub-business array to obtain 3 third sub-business objects, and determines 3 third virtual sub-nodes, that is, the virtual sub-nodes E, F, and G at the next level of the virtual sub-node C, through 3 third sub-business objects, and obtains and executes the virtual sub-node services corresponding to the virtual sub-nodes E, F, and G.
[0094] Similarly, when the virtual sub-node service corresponding to the virtual sub-node D is completed, the process system accesses the business system again through the hypertext transfer protocol address, obtains the fourth sub-business data, parses the fourth sub-business data to obtain the fourth sub-business array, performs the first data conversion on 2 strings in the fourth sub-business array to obtain 2 fourth sub-business objects, and determines 2 fourth virtual sub-nodes, that is, the virtual sub-nodes H and S at the next level of the virtual sub-node D, through 2 fourth sub-business objects, and obtains and executes the virtual sub-node services corresponding to the virtual sub-nodes H and S.
[0095] It should be noted that the virtual child nodes E, F, G, H, and S are all virtual child nodes at the second level of the task node A. Among them, the virtual child nodes E, F, and G are virtual child nodes at the second level of the virtual child node C at the first level, and the virtual child nodes H and S are virtual child nodes at the second level of the virtual child node D at the first level.
[0096] Similarly, when the virtual child node service corresponding to the virtual child node F is completed, the process system accesses the service system again through the hypertext transfer protocol address, obtains the fifth sub-service data, parses the fifth sub-service data to obtain the fifth sub-service array, performs the first data conversion on 1 string in the fifth sub-service array to obtain 1 fifth sub-service object, determines 1 fifth virtual child node, that is, the virtual child node W at the next level of the virtual child node F, through 1 fifth sub-service object, and obtains and executes the virtual child node service corresponding to the virtual child node W.
[0097] If the virtual child node service corresponding to the virtual child node W is completed and the process system fails to obtain the sub-service data through the hypertext transfer protocol address, it means that the virtual child node W has no virtual child node at the next level. It is necessary to determine whether there is an unfinished virtual child node service among all the virtual child node services of the task node. If it is determined that there is no unfinished virtual child node service, it means that the service of the task node has been completed; if it is determined that there is still an unfinished virtual child node service, it is necessary to continue to execute the unfinished virtual child node service until all the unfinished virtual child node services are completed. At this time, it can be determined that the service of the task node has been completed.
[0098] In summary, in the embodiment of the present application, since the process system communicates with the business system, when the node type of the task node is a progressive type, the process system can access the task system through the pre-configured Hypertext Transfer Protocol address to obtain sub-business data from the business system; since the business system dynamically configures the sub-business data, during the process of obtaining and executing the virtual sub-nodes and the corresponding virtual sub-node services at the current level, the sub-business data in the business system will be updated. Therefore, the sub-business obtained by the process system each time is dynamically changing, and different levels of virtual sub-nodes and the corresponding virtual sub-node services can be obtained according to the dynamically changing sub-business data, and the virtual sub-node services are executed. Therefore, when the process system obtains sub-business data from the business system for the first time, the first-level virtual sub-nodes can be obtained according to the sub-business data obtained for the first time; when the process system obtains sub-business data from the business system for the second time, the second-level virtual sub-nodes can be obtained according to the sub-business data obtained for the second time, and multiple levels of virtual sub-nodes are obtained in a progressive manner according to the service level until no updated sub-business data is obtained; in this process, the developers of the top-level service do not need to obtain sub-service information from the developers of the lower-level service. Only by obtaining the detailed information of different virtual sub-nodes multiple times, different levels of virtual self-sub-nodes can be automatically generated, and then the topology structure diagram of the virtual sub-nodes can be completed, which simplifies the work of service developers and improves the efficiency of process processing.
[0099] As Figure 4 shown, an embodiment of the present invention provides a process processing device 400, which is set in a process system. The process system communicates with a business system, and the business system dynamically configures the detailed information of virtual sub-nodes; the device may specifically include:
[0100] An acquisition module 401, configured to acquire attribute data of a task node, where the attribute data includes: a node type and corresponding execution parameters;
[0101] A first execution module 402, configured to repeatedly execute the following operations until no detailed information of virtual sub-nodes can be obtained from the business system:
[0102] According to the Hypertext Transfer Protocol address for accessing the business system included in the execution parameters, obtain the detailed information of the virtual sub-nodes from the business system, and according to the detailed information of the virtual sub-nodes, obtain the virtual sub-nodes of the task node and the corresponding virtual sub-node services, and execute the virtual sub-node services; where the virtual sub-nodes obtained in the (i + 1)-th acquisition are the next-level virtual sub-nodes of the virtual sub-nodes that have completed the corresponding virtual sub-node services among the virtual sub-nodes obtained in the i-th acquisition, and i is an integer greater than or equal to 0;
[0103] The first determination module 403 is configured to determine the completion of the service of the task node when all virtual sub-node services of the task node are completed.
[0104] Optionally, the detailed information of the virtual sub-node includes: sub-service data;
[0105] Among them, the first execution module 402 is specifically configured to:
[0106] Obtain sub-service data from the service system according to the hypertext transfer protocol address;
[0107] Parse the sub-service data to obtain a sub-service array;
[0108] Perform a first data conversion on N strings in the sub-service array to obtain N sub-service objects;
[0109] Determine N virtual sub-nodes through the N sub-service objects;
[0110] Obtain the virtual sub-node services corresponding to the N virtual sub-nodes;
[0111] Where N is a positive integer.
[0112] Optionally, when the first execution module 402 parses the sub-service data to obtain a sub-service array, it is specifically configured to:
[0113] Parse the sub-service data to obtain the string data corresponding to the sub-service array parameter name included in the execution parameters;
[0114] Perform a second data conversion on the string data to obtain a sub-service array.
[0115] Optionally, the device further includes:
[0116] A judgment module, configured to judge whether there are uncompleted virtual sub-node services among all virtual sub-node services of the task node when a virtual sub-node service is completed;
[0117] A second determination module, configured to determine the completion of all virtual sub-node services of the task node when it is determined that there are no uncompleted virtual sub-node services.
[0118] Optionally, the device further includes:
[0119] A second execution module, configured to execute the uncompleted virtual sub-node services until all virtual sub-node services of the task node are completed when it is determined that there are uncompleted virtual sub-node services.
[0120] It should be noted that the embodiment of the process processing device corresponds to the above-mentioned process processing method. All implementation manners of the above embodiments are applicable to the device embodiment, and can achieve the same technical effects, which will not be elaborated here.
[0121] In summary, in the embodiment of the present application, since the process system communicates with the business system, when the node type of the task node is a progressive type, the process system can access the task system through a pre-configured Hypertext Transfer Protocol address to obtain sub-business data from the business system; since the business system dynamically configures the sub-business data, during the process of obtaining and executing the virtual sub-nodes and the corresponding virtual sub-node services at the current level, the sub-business data will be updated in the business system. Therefore, the sub-business obtained by the process system each time is dynamically changed, and different levels of virtual sub-nodes and the corresponding virtual sub-node services can be obtained according to the dynamically changed sub-business data, and the virtual sub-node services are executed. Therefore, when the process system obtains sub-business data from the business system for the first time, the first-level virtual sub-nodes can be obtained according to the sub-business data obtained for the first time; when the process system obtains sub-business data from the business system for the second time, the second-level virtual sub-nodes can be obtained according to the sub-business data obtained for the second time, and multiple levels of virtual sub-nodes are obtained in a progressive manner according to the service level until no updated sub-business data is obtained; in this process, the developers of the top-level service do not need to obtain sub-service information from the developers of the lower-level service, and only need to obtain the detailed information of different virtual sub-nodes multiple times to automatically generate different levels of virtual self-sub-nodes, and then complete the topology structure diagram of the virtual sub-nodes, which simplifies the work of service developers and improves the efficiency of process processing.
[0122] An embodiment of the present invention further provides a network device, which can be a process system. The process system communicates with a business system, and the business system dynamically configures the detailed information of virtual sub-nodes. The following embodiments are described by taking the network device as a process system as an example.
[0123] As Figure 5 shown, the network device includes a processor 51, a communication interface 52, a memory 53, and a communication bus 54. Among them, the processor 51, the communication interface 52, and the memory 53 communicate with each other through the communication bus 54;
[0124] The memory 53 is used to store a computer program;
[0125] When the processor 51 is used to execute the program stored in the memory 53, the following steps are implemented:
[0126] Obtain the attribute data of the task node, where the attribute data includes: the node type and the corresponding execution parameters;
[0127] In the case where the node type is a progressive type, the following operations are repeatedly executed until no more detailed information about virtual child nodes can be obtained from the service system:
[0128] According to the hypertext transfer protocol address for accessing the service system included in the execution parameters, obtain the detailed information of virtual child nodes from the service system, and based on the detailed information of the virtual child nodes, obtain the virtual child nodes of the task node and the corresponding virtual child node services, and execute the virtual child node services; wherein, the virtual child nodes obtained in the (i + 1)-th acquisition are the next-level virtual child nodes of the virtual child nodes that have completed the corresponding virtual child node services among the virtual child nodes obtained in the i-th acquisition, and i is an integer greater than or equal to 0;
[0129] When all the virtual child node services of the task node are completed, determine that the service of the task node is completed.
[0130] Optionally, the detailed information of the virtual child nodes includes: sub-service data;
[0131] Wherein, when the processor 51 obtains the detailed information of virtual child nodes from the service system according to the hypertext transfer protocol address for accessing the service system included in the execution parameters, and based on the detailed information of the virtual child nodes, obtains the virtual child nodes of the task node and the corresponding virtual child node services, it is specifically used for:
[0132] Obtain sub-service data from the service system according to the hypertext transfer protocol address;
[0133] Parse the sub-service data to obtain a sub-service array;
[0134] Perform a first data conversion on N strings in the sub-service array to obtain N sub-service objects;
[0135] Determine N virtual child nodes through the N sub-service objects;
[0136] Obtain the virtual child node services corresponding to the N virtual child nodes;
[0137] Wherein, N is a positive integer.
[0138] Optionally, when the processor 51 parses the sub-service data to obtain a sub-service array, it is specifically used for:
[0139] Parse the sub-service data to obtain the string data corresponding to the sub-service array parameter name included in the execution parameters;
[0140] Perform a second data conversion on the string data to obtain a sub-service array.
[0141] Optionally, before determining that the service of the task node is completed when the processor 51 has completed all virtual sub-node services of the task node, it is further configured to:
[0142] When a virtual sub-node service is completed, determine whether there are any uncompleted virtual sub-node services among all virtual sub-node services of the task node;
[0143] When it is determined that there are no uncompleted virtual sub-node services, determine that all virtual sub-node services of the task node are completed.
[0144] Optionally, after determining whether there are any uncompleted virtual sub-node services among all virtual sub-node services of the task node, the processor 51 is further configured to:
[0145] When it is determined that there are uncompleted virtual sub-node services, execute the uncompleted virtual sub-node services until all virtual sub-node services of the task node are completed.
[0146] The communication bus mentioned in the above network device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used in the figure to represent it, but it does not mean that there is only one bus or one type of bus.
[0147] The memory may include a Random Access Memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0148] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU for short), a Network Processor (NP for short), etc.; it may also be a Digital Signal Processor (DSP for short), an Application Specific Integrated Circuit (ASIC for short), a Field-Programmable Gate Array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0149] In another embodiment provided by the present invention, there is also provided a computer-readable storage medium storing instructions, which when running on a computer, cause the computer to execute the process processing method described in any one of the above embodiments.
[0150] In another embodiment provided by the present invention, there is also provided a computer program product containing instructions, which when running on a computer, cause the computer to execute the process processing method described in any one of the above embodiments.
[0151] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present invention are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a Solid State Disk (SSD)).
[0152] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
[0153] Each embodiment in this specification is described in a related manner. For the same and similar parts among the embodiments, reference can be made to each other, and the differences between each embodiment and other embodiments are mainly described. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and reference can be made to the relevant parts of the method embodiments for the relevant content.
[0154] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A process processing method, characterized in that, it is applied to a process system, the process system communicates with a business system, and the business system dynamically configures the detailed information of virtual sub-nodes; the method includes: obtaining the attribute data of a task node, the attribute data including: the node type and the corresponding execution parameters; the node type includes: request type, progressive type; when the node type is the progressive type, the following operations are repeatedly executed until no more detailed information of virtual sub-nodes can be obtained from the business system: according to the hypertext transfer protocol address for accessing the business system included in the execution parameters, obtaining the detailed information of virtual sub-nodes from the business system, and according to the detailed information of the virtual sub-nodes, obtaining the virtual sub-nodes of the task node and the corresponding virtual sub-node services, and executing the virtual sub-node services; wherein, the virtual sub-nodes obtained in the (i + 1)-th acquisition are the next-level virtual sub-nodes of the virtual sub-nodes that have completed the corresponding virtual sub-node services among the virtual sub-nodes obtained in the i-th acquisition, and i is an integer greater than or equal to 1; when all the virtual sub-node services of the task node are completed, it is determined that the service of the task node is completed; when the node type is the request type, sending a request to the business system to obtain a request result; the request result is used to determine whether to execute the service of the next task node; the detailed information of the virtual sub-nodes includes: sub-business data; wherein, the obtaining the detailed information of virtual sub-nodes from the business system according to the hypertext transfer protocol address for accessing the business system included in the execution parameters, and according to the detailed information of the virtual sub-nodes, obtaining the virtual sub-nodes of the task node and the corresponding virtual sub-node services includes: obtaining sub-business data from the business system according to the hypertext transfer protocol address; analyzing the sub-business data to obtain a sub-business array; performing a first data conversion on N strings in the sub-business array to obtain N sub-business objects; determining N virtual sub-nodes through the N sub-business objects; obtaining the virtual sub-node services corresponding to the N virtual sub-nodes; wherein, N is a positive integer.
2. The method according to claim 1, characterized in that, the analyzing the sub-business data to obtain a sub-business array includes: analyzing the sub-business data to obtain the string data corresponding to the sub-business array parameter name included in the execution parameters; performing a second data conversion on the string data to obtain a sub-business array.
3. The method according to claim 1, characterized in that, before determining that the service of the task node is completed when all the virtual sub-node services of the task node are completed, the method further includes: when a virtual sub-node service is completed, determining whether there are uncompleted virtual sub-node services among all the virtual sub-node services of the task node; when it is determined that there are no uncompleted virtual sub-node services, it is determined that all the virtual sub-node services of the task node are completed.
4. The method according to claim 3, wherein, after determining whether there is an unfinished virtual sub - node service among all the virtual sub - node services of the task node, the method further includes: in the case of determining that there is an unfinished virtual sub - node service, executing the unfinished virtual sub - node service until all the virtual sub - node services of the task node are completed.
5. A process processing device, wherein, it is set in a process system, the process system communicates with a business system, and the business system dynamically configures detailed information of virtual sub - nodes; the device includes: an acquisition module, configured to acquire attribute data of a task node, the attribute data including: node type and corresponding execution parameters; the node type includes: request type, progressive type; a first execution module, configured to repeatedly execute the following operations until no more detailed information of virtual sub - nodes can be obtained from the business system: acquiring detailed information of virtual sub - nodes from the business system according to the hypertext transfer protocol address for accessing the business system included in the execution parameters, and according to the detailed information of the virtual sub - nodes, acquiring virtual sub - nodes of the task node and corresponding virtual sub - node services, and executing the virtual sub - node services; wherein, the virtual sub - nodes acquired at the (i + 1)-th time are the next - level virtual sub - nodes of the virtual sub - nodes that have completed the corresponding virtual sub - node services among the virtual sub - nodes acquired at the i - th time, and i is an integer greater than or equal to 1; a first determination module, configured to determine that the service of the task node is completed when all the virtual sub - node services of the task node are completed; the device is further configured to, when the node type is a request type, send a request to the business system to obtain a request result; the request result is used to determine whether to execute the service of the next task node; the detailed information of the virtual sub - nodes includes: sub - service data; wherein, the acquiring detailed information of virtual sub - nodes from the business system according to the hypertext transfer protocol address for accessing the business system included in the execution parameters, and according to the detailed information of the virtual sub - nodes, acquiring virtual sub - nodes of the task node and corresponding virtual sub - node services includes: acquiring sub - service data from the business system according to the hypertext transfer protocol address; parsing the sub - service data to obtain a sub - service array; performing a first data conversion on N strings in the sub - service array to obtain N sub - service objects; determining N virtual sub - nodes through the N sub - service objects; acquiring virtual sub - node services corresponding to the N virtual sub - nodes; wherein, N is a positive integer.
6. The device according to claim 5, wherein, the device further includes: a judgment module, configured to, when a virtual sub - node service is completed, judge whether there is an unfinished virtual sub - node service among all the virtual sub - node services of the task node; a second determination module, configured to determine that all the virtual sub - node services of the task node are completed when it is determined that there is no unfinished virtual sub - node service.
7. The device according to claim 6, wherein, the device further comprises: a second execution module, configured to execute the unfinished virtual sub-node service until all the virtual sub-node services of the task node are completed when it is determined that there is an unfinished virtual sub-node service.
8. A network device, wherein, it includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used for storing a computer program; the processor is configured to implement the process processing method according to any one of claims 1-4 when executing the program stored on the memory.
9. A computer-readable storage medium, on which a computer program is stored, wherein, the program, when executed by a processor, implements the process processing method according to any one of claims 1-4.
Citation Information
Patent Citations
Method and device for acquiring topological graph data object, and electronic equipment
CN114116065A