CN117291534A - Service arrangement-based flow processing method, device and equipment - Google Patents

Service arrangement-based flow processing method, device and equipment Download PDF

Info

Publication number
CN117291534A
CN117291534A CN202311258527.XA CN202311258527A CN117291534A CN 117291534 A CN117291534 A CN 117291534A CN 202311258527 A CN202311258527 A CN 202311258527A CN 117291534 A CN117291534 A CN 117291534A
Authority
CN
China
Prior art keywords
flow
sub
node
main
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311258527.XA
Other languages
Chinese (zh)
Inventor
刘宝多
王海萌
潘镇
杨景景
李曦凌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311258527.XA priority Critical patent/CN117291534A/en
Publication of CN117291534A publication Critical patent/CN117291534A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Software Systems (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Operations Research (AREA)
  • Data Mining & Analysis (AREA)
  • Tourism & Hospitality (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a flow processing method, device and equipment based on service arrangement, which can be used in the technical field of distributed systems. The method comprises the following steps: acquiring a flow description file corresponding to a service arrangement flow; the service scheduling process comprises a main process and at least one sub-process, and the process description file comprises main process description information corresponding to the main process and sub-process description information corresponding to the sub-process; determining the position of the sub-process in the main process according to the main process description information and the sub-process description information, and determining the mapping information of each process node in the sub-process; inserting each flow node into an execution path of the main flow according to the mapping information; and executing the service arranging flow according to the execution paths inserted with the flow nodes. The method and the device solve the technical problems that the existing service arrangement mode is high in processing cost and high in processing difficulty when distributed transactions are involved.

Description

Service arrangement-based flow processing method, device and equipment
Technical Field
The present disclosure relates to the field of distributed systems, and in particular, to a method, an apparatus, and a device for processing a flow based on service orchestration.
Background
In many business process management systems, service orchestration may combine multiple different services into one large business process according to certain rules and sequences to achieve a particular business objective. Under the distributed architecture, the application architecture mode is split into a micro-service architecture by a centralized service architecture, service granularity is finer, service responsibilities are clearer, and it is more important to program a complex service combination meeting a service scene based on the existing service.
Among the service orchestration models currently developed, most are the process orchestration tools developed based on business process modeling annotation (Business Process Modeling Notation, BPMN) models, which may exist in sub-processes that represent a portion of the process in a main process, which is typically made up of another independent service or process.
However, existing service orchestration approaches create additional processing overhead when processing sub-flows, while processing difficulties are greater when distributed transactions are involved.
Disclosure of Invention
The application provides a flow processing method, device and equipment based on service arrangement, which can solve the technical problems of high processing cost and high processing difficulty when distributed transactions are involved in the existing service arrangement mode.
In a first aspect, the present application provides a service orchestration-based flow processing method, where the method includes:
acquiring a flow description file corresponding to a service arrangement flow; the service scheduling process comprises a main process and at least one sub-process, and the process description file comprises main process description information corresponding to the main process and sub-process description information corresponding to the sub-process;
determining the position of the sub-process in the main process according to the main process description information and the sub-process description information, and determining mapping information of each process node in the sub-process;
inserting each flow node into an execution path of the main flow according to the mapping information;
and executing the service arranging process according to the execution paths inserted with the process nodes.
In a second aspect, the present application provides a service orchestration-based flow processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a flow description file corresponding to the service arrangement flow; the service scheduling process comprises a main process and at least one sub-process, and the process description file comprises main process description information corresponding to the main process and sub-process description information corresponding to the sub-process;
a determining module, configured to determine a position of the sub-flow in the main flow according to the main flow description information and the sub-flow description information, and determine mapping information of each flow node in the sub-flow;
the inserting module is used for inserting each flow node into the execution path of the main flow according to the mapping information;
and the execution module is used for executing the service arrangement flow according to the execution paths inserted with the flow nodes.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the service orchestration-based flow processing method as provided in the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having stored therein computer executable instructions which when executed by a processor are for implementing a service orchestration based flow handling method as provided in the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements a service orchestration based flow handling method as provided in the first aspect.
According to the flow processing method, the device and the equipment based on service arrangement, the sub-flows are fused into the execution path of the main flow, so that the main flow does not need to be suspended in the process of executing the flow, and therefore extra sub-flow processing expenditure can be avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic step flow diagram of a service orchestration-based flow processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a service orchestration-based flow process according to embodiments of the present application;
FIG. 3 is a schematic diagram of a program module of a service orchestration-based flow processing device according to an embodiment of the present application;
fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
The flow processing method, the device and the equipment based on the service arrangement provided by the embodiment of the application can be used in the technical field of the distributed system, can also be used in any field except the technical field of the distributed system, and are not limited in application field.
Under the distributed architecture, the application architecture mode is split into a micro-service architecture by a centralized service architecture, service granularity is finer, service responsibilities are clearer, and it is more important to program a complex service combination capability meeting service scenes based on the existing service. The service arrangement can provide quick arrangement of atomic service capability, can provide flow control, flow connection, sub-flow and other modes to complete tasks of service combination, can integrate technical component capability of distributed transactions and the like, helps atomic service to quickly cooperate, and quickly completes development of complex service.
In some currently developed service orchestration models, most of the service orchestration models are flow orchestration tools developed based on business flow modeling annotation (Business Process Modeling Notation, BPMN) models, sub-flow nodes exist in the models, and sub-flow nodes can be added in a main flow to complete the work of connecting the main flow with the sub-flow and transferring parameters.
However, the existing service orchestration model regards the sub-process as an independent process, when the sub-process is executed to the sub-process node, the process execution engine suspends the main process and then executes the sub-process node, and after the sub-process is executed, the main process is executed again, thereby bringing about additional sub-process processing cost; meanwhile, when distributed transaction processing is involved, the sub-flows are generally regarded as independent distributed sub-transaction processing to form transaction nesting, so that the difficulty of the distributed transaction processing is increased.
In view of the above technical problems, in the embodiments of the present application, a flow processing method based on service orchestration is provided, where a sub-flow is merged into a main flow by identifying a position of the sub-flow in the main flow, so that the main flow does not need to be suspended in a process of executing the flow, and thus, processing overhead of the flow is reduced, and when distributed transactions exist in the flow, a transaction node of the sub-flow is merged into the main flow, thereby, it is ensured that only one distributed transaction exists in one flow, transaction nesting of the distributed transaction of the flow is avoided, distributed transaction processing logic is greatly simplified, and distributed transaction processing difficulty is reduced.
Some terms involved in the embodiments of the present application are explained below:
micro-services: a service-oriented architecture calls for partitioning a single application into a small set of services that coordinate and interact with each other to provide a final value to the user. Each service runs in an independent process, and the service communicate with each other by adopting a lightweight communication mechanism; in addition, each service is built around a specific business and can be deployed independently to a production environment, class production environment, etc.
Distributed system: refers to a system formed by the connection of a plurality of scattered computers through an interconnection network, and the processing and control functions of the system are distributed on each computer.
Service: i.e., a micro-service application, is a collection of a set of service interfaces.
An interface: a set of application programming interfaces (Application Programming Interface, APIs) for service calls. From the perspective of publishing, the interfaces can be divided into external publishing/non-publishing interfaces; from the arrangement perspective, interfaces are classified into atomic interfaces and arrangement interfaces.
Extensible markup language (Extensible Markup Language, XML): a standard cross-platform language in the internet that can describe data using a simple series of tags.
Service orchestration: by connecting the atomic interfaces in series, the functional tasks of interface cooperation, distributed transaction, flow sequence and the like involved in the interface are completed.
The sub-process is as follows: an orchestration interface may be embedded in other orchestration interfaces and cannot be run alone.
Flow description file: an XML file describing a service orchestration flow.
Service orchestration engine: and executing the program of the service orchestration flow.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Referring to fig. 1, fig. 1 is a schematic step flow diagram of a service orchestration-based flow processing method according to an embodiment of the present application, where in some embodiments of the present application, the service orchestration-based flow processing method includes:
s101, acquiring a flow description file corresponding to a service arrangement flow; the service scheduling process comprises a main process and at least one sub-process, and the process description file comprises main process description information corresponding to the main process and sub-process description information corresponding to the sub-process.
Where the main flow and the sub-flow are two concepts in the flow, their relationships are generally nested and combined relationships in the flow. The main flow is the main body of the whole flow, describes a complete working process or defines the whole business process, and can call other sub-flows. The sub-flow is part of the main flow and describes a relatively simple task or work process. The sub-processes may be invoked by the main process to complete the business process defined by the main process.
In the main flow, the sub-flow is defined as a task or step, the sub-flow is operated by calling an execution file or function of the sub-flow, after the sub-flow is executed, a result is returned to the main flow, and the main flow continues to execute the subsequent task or call other sub-flows.
In some embodiments, the above-described process description information is one way of describing a business process, which includes a plurality of links and steps, and involves a plurality of departments and personnel.
Optionally, in the flow description information, the following is generally included:
business objective: the goals and purposes of the business process, and the customer needs it serves, are described.
The process links are as follows: each link of the business process is described, including information such as targets, responsible persons, inputs and outputs of the link.
The flow path is as follows: various possible paths for the business process are described, including normal paths, abnormal paths, and branch paths, among others.
The flow rule is as follows: rules and constraints describing business processes, including time, order, conditions, and quantity.
Flow participants: participants describing a business process and their relationships, including departments, posts, roles, and the like.
The flow chart is as follows: and each link and path of the business process are described in a graphical mode, so that the business process is convenient to understand and analyze.
S102, determining the position of the sub-process in the main process according to the main process description information and the sub-process description information, and determining the mapping information of each process node in the sub-process.
In some embodiments, the tag information in the main flow description information and the tag information in the sub flow description information may be resolved separately; and determining the position of the sub-process in the main process according to the label information in the main process description information and the label information in the sub-process description information.
Alternatively, the flow description file may be an XML file.
In some embodiments, the tag information in the main flow description information and the tag information in the sub-flow description information may be parsed by using a custom parsing XML file function in the Spring framework, where the tag information includes at least one of a flow tag, an interface tag, and a connection tag.
The process label is used for identifying each process node in the main process or the sub-process, the interface label is used for identifying interfaces between different process nodes in the main process or the sub-process, and the connection label is used for identifying connection relations between different process nodes in the main process or the sub-process.
In some embodiments, the flow label may also be used to identify a particular link or step in the flow. Interface tags may be used to represent points of interaction between different systems or components in a flow model, as well as to identify interfaces between different flows in a flow chart. The connection tags can be used to identify connection relationships between different links or steps in a process and to identify dependency relationships between different links or steps in a process model.
In some embodiments, the input parameters and the output parameters of each flow node in the main flow and the sub flow may be determined respectively; determining source nodes of the input parameters of all flow nodes in the sub-flow and source nodes of the input parameters of all flow nodes in the main flow according to the input parameters and the output parameters of all flow nodes in the main flow and the sub-flow; and determining mapping information of each flow node in the sub-flow according to the source node of the input parameters of each flow node in the sub-flow and the source node of the input parameters of each flow node in the main flow.
S103, inserting each flow node into an execution path of the main flow according to the mapping information.
In some embodiments, the head-to-tail nodes of the sub-flows may be connected to the main flow, ensuring that the sub-flows are tiled in the sub-flows.
And S104, executing the service scheduling process according to the execution paths inserted with the process nodes.
It can be understood that the head and tail nodes of the sub-process are connected with the main process, so that the main process can obtain a complete process, and the goal that only one distributed transaction pipeline exists in one process is realized.
According to the service arrangement-based flow processing method, the sub-flows are fused into the execution paths of the main flows, so that the main flows do not need to be suspended in the process of executing the flows, and therefore extra sub-flow processing expenditure can be avoided.
Based on the description in the foregoing embodiments, in some embodiments of the present application, when determining the mapping information of each flow node in the sub-flow, the first flow node and the last flow node in the sub-flow may be determined first, and then the mapping information of the first flow node and the first flow node in the main flow, the mapping information of the last flow node and the second flow node in the main flow, and the mapping information of the remaining flow nodes and the source nodes of the input parameters thereof in the sub-flow are generated respectively according to the source nodes of the input parameters of each flow node in the sub-flow and the source nodes of the input parameters of each flow node in the main flow; the output parameter of the first flow node is the input parameter of the first flow node, and the input parameter of the second flow node is the output parameter of the last flow node.
In some embodiments of the present application, the manner of inserting each flow node into the execution path of the main flow may be: connecting the input interface of the first flow node to the output interface of the first flow node, and connecting the output interface of the last flow node to the input interface of the second flow node.
In some embodiments of the present application, after the above-mentioned process nodes are inserted into the execution paths of the main process, the execution paths of the main process are updated, and then the service orchestration process may be executed according to the updated execution paths.
In some embodiments of the present application, the above-mentioned service orchestration-based flow processing method may include the following steps:
step one, obtaining a flow description file corresponding to a service arrangement flow.
The method can analyze the label information in the main flow description information and the flow labels, interface labels and connection labels in the sub-flow description information by utilizing the self-defined XML file analysis function in the Spring framework, and store the label information, the interface labels and the connection labels in the memory. The sub-flows in the main flow are identified by local identification of the flow interface, whether the identification is orchestrated.
Step two, determining mapping information of each flow node related to the sub-flow, including input information and output information of each flow node, and inputting and outputting information of the sub-flow in the main flow.
For a better understanding of the embodiments of the present application, reference is made to fig. 2, and fig. 2 is a schematic diagram of a service orchestration-based flow process provided in the embodiments of the present application.
In fig. 2, the service orchestration process includes a main process and a sub-process S, the main process includes process nodes of M1, M2, M3, M4, and the sub-process S includes process nodes of S1, S2, S3, and the like.
In the conventional flow processing manner, after the main flow has executed the flow node M2, the flow execution engine suspends the main flow, then executes the sub-flow S, and after the sub-flow S is executed, continues to execute the flow node M3 in the main flow, thereby bringing about additional sub-flow processing overhead.
In comparison with the conventional flow processing manner, in the embodiment of the present application, the step two may include the following steps:
s21, according to the flow description file, loading parameter information of the flow node of the sub-flow (S) into a sub-flow node object.
S22, loading judgment condition information of the flow nodes of the sub-flow (S) into the node memory object according to the flow description file.
S23, judging whether the current flow node is a flow node of the sub-flow (S) when the flow data is analyzed by the main flow, and if so, setting a preset prefix in the main flow.
S24, finding a first flow node S1 of the sub-flow (S), taking out the input parameters of the S1 node, if the input parameters of the S1 node come from M2, finding an input parameter source M2 of the S1 in the main flow, and modifying the input parameter source of the S1 node into M2.
S25, repeating the step S24, and re-determining the parameter entering sources of all process nodes in the sub-process (S).
S26, when the main flow node M3 uses the output parameters of the sub-flow (S), the output source of the ending node in the sub-flow (S) is found, and if the output source is S3, the data source of the input parameters of M3 is modified to be S3.
S27, if nested sub-flows exist in the sub-flows, the steps S23-S26 are recursively performed.
And S28, similar to the loading parameter mapping, if the judging condition exists in the main flow, the judging condition of the main flow is transmitted to the sub-flow, and the AND operation is carried out on the judging condition of the sub-flow, the condition parameter mapping in the judging condition is the same as that in the steps S24-S27, and the parameters in the condition judgment are recalculated.
S29, reloading the recalculated parameters and the condition judgment data into the flow node object.
And step three, connecting the head and tail nodes of the sub-process with the main process so as to ensure that the sub-process is tiled in the sub-process.
In an embodiment of the present application, the step three may include the following steps:
s31, connecting all nodes of the main flow, finding the position of the sub-flow (S) in the main flow, and recording the preamble node M2 of the sub-flow (S).
S32, finding a head node S1 connected with a start node of the sub-process (S), and marking a preamble node of the S1 as M2.
And S33, finding a preamble node S3 of the ending node of the sub-process (S), and connecting the preamble node S3 with a successor node M3 of the sub-process (S).
S34, if the nested sub-flow still exists in the sub-flow, recursively connecting flow nodes of the nested sub-flow.
And S35, storing the connection data of the final flow node for use in the execution of the flow.
In some embodiments, from a development perspective, the main flow and sub-flows may be identified from the flow description file, and the sub-flows do the following:
1) Checking whether the sub-process exists and is valid;
2) Analyzing the sub-process;
3) Assigning main flow node parameters to the sub-flow parameters;
4) Condition judgment of the sub-process condition judgment and the additional main process;
5) Reconnecting the sub-process with the main process.
The method comprises the steps that a node of a process entering parameter is used in a sub-process, parameter input in a main process is required to be found recursively, meanwhile, the input of the sub-process serves as a parameter source of other nodes of the main process, the parameter source is required to be reassigned to the node of the main process, and a table is marked as output of a certain node in the sub-process; the first node of the sub-process needs to recursively search for and connect with the former node of the sub-process of the main process, and the last node of the sub-process needs to recursively search for and connect with the latter node of the sub-process of the main process, so as to ensure accurate determination of process execution.
In some embodiments, before service orchestration, a series of atomic interfaces needed for orchestration need to be created for use in orchestration of services; after the orchestration is completed, the orchestration process needs to be embedded into an executable micro-service application.
According to the flow processing method based on service arrangement, the sub-flow nodes are tiled into the main flow and serve as node connection in the main flow, and the main flow is fused with flow control conditions and flow parameter assignment of the sub-flow, so that no query error can be caused in flow control and flow data; in addition, when distributed transactions exist in the process, the transaction nodes of the sub-process are integrated into the main process, so that only one distributed transaction exists in one process, only one distributed transaction running water is recorded, the occurrence of transaction nesting of the distributed transactions in the process is avoided, and the distributed transaction processing logic is greatly simplified.
Based on the descriptions in the foregoing embodiments, the embodiments of the present application further provide a service orchestration-based flow processing device, and referring to fig. 3, fig. 3 is a schematic program module diagram of a service orchestration-based flow processing device provided in the embodiments of the present application, where in some implementations, the service orchestration-based flow processing device 30 includes:
an obtaining module 301, configured to obtain a flow description file corresponding to a service orchestration flow; the service scheduling process comprises a main process and at least one sub-process, and the process description file comprises main process description information corresponding to the main process and sub-process description information corresponding to the sub-process;
a determining module 302, configured to determine a position of the sub-flow in the main flow according to the main flow description information and the sub-flow description information, and determine mapping information of each flow node in the sub-flow;
an inserting module 303, configured to insert each flow node into an execution path of the main flow according to the mapping information;
an execution module 304, configured to execute the service orchestration procedure according to the execution paths inserted with the respective procedure nodes.
According to the service arrangement-based flow processing device, the sub-flows are fused into the execution path of the main flow, so that the main flow is not required to be suspended in the process of executing the flow, and therefore extra sub-flow processing expenditure can be avoided.
In some embodiments, the determining module 302 is to:
respectively analyzing the label information in the main flow description information and the label information in the sub-flow description information;
and determining the position of the sub-process in the main process according to the label information in the main process description information and the label information in the sub-process description information.
In some embodiments, the flow description file is an extensible markup language XML file, and the determining module 302 is configured to:
analyzing label information in the main flow description information and label information in the sub-flow description information by utilizing a self-defined XML file analysis function in a Spring framework, wherein the label information comprises at least one of a flow label, an interface label and a connection label;
the process label is used for identifying each process node in the main process or the sub-process, the interface label is used for identifying interfaces between different process nodes in the main process or the sub-process, and the connection label is used for identifying connection relations between different process nodes in the main process or the sub-process.
In some embodiments, the determining module 302 is to:
respectively determining input parameters and output parameters of each flow node in the main flow and the sub-flow;
determining source nodes of the input parameters of all flow nodes in the sub-flow and source nodes of the input parameters of all flow nodes in the main flow according to the input parameters and the output parameters of all flow nodes in the main flow and the sub-flow;
and determining mapping information of each flow node in the sub-flow according to the source node of the input parameter of each flow node in the sub-flow and the source node of the input parameter of each flow node in the main flow.
In some embodiments, the determining module 302 is to:
determining a first flow node and a last flow node in the sub-flow;
generating mapping information of the first flow node and the first flow node in the main flow, mapping information of the last flow node and the second flow node in the main flow, and mapping information of the rest flow nodes and the source nodes of the input parameters thereof in the sub flow respectively according to the source nodes of the input parameters of the flow nodes in the sub flow and the source nodes of the input parameters of the flow nodes in the main flow; the output parameter of the first flow node is an input parameter of the first flow node, and the input parameter of the second flow node is an output parameter of the last flow node.
In some embodiments, the insertion module 303 is to:
according to the mapping information, connecting the input interface of the first flow node to the output interface of the first flow node, and connecting the output interface of the last flow node to the input interface of the second flow node.
In some embodiments, the system further comprises an update module for:
and after each flow node is inserted into the execution path of the main flow, updating the execution path of the main flow.
In some embodiments, the execution module 304 is to:
and executing the service arrangement flow according to the updated execution path.
It should be noted that, in the embodiment of the present application, the specific execution contents of the acquiring module 301, the determining module 302, the inserting module 303, and the executing module 304 may refer to each step in the service orchestration-based flow processing method described in the above embodiment, which is not described herein.
Further, based on the descriptions in the above embodiments, there is also provided an electronic device including at least one processor and a memory; wherein the memory stores computer-executable instructions; the at least one processor executes computer-executable instructions stored in the memory to perform the steps in the service orchestration-based flow processing method described in the above embodiments.
For a better understanding of the embodiments of the present application, referring to fig. 4, fig. 4 is a schematic hardware structure of an electronic device according to the embodiments of the present application.
As shown in fig. 4, the electronic device 40 of the present embodiment includes: a processor 401 and a memory 402; wherein:
memory 402 for storing computer-executable instructions;
a processor 401 for executing computer-executable instructions stored in a memory to implement the steps in the service orchestration-based flow processing method described in the above embodiments.
Alternatively, the memory 402 may be separate or integrated with the processor 401.
When the memory 402 is provided separately, the device further comprises a bus 403 for connecting said memory 502 and the processor 401.
The present embodiment provides a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the steps in the service orchestration-based flow processing method described in the above embodiments.
Embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the service orchestration based flow handling method described in the embodiments above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or processor to perform some of the steps of the methods described in various embodiments of the present application.
It is understood that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may include a high-speed memory, and may further include nonvolatile storage, such as at least one magnetic disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic disk, or an optical disk.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as static random access memory, electrically erasable programmable read only memory, magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for processing a service orchestration-based flow, the method comprising:
acquiring a flow description file corresponding to a service arrangement flow; the service scheduling process comprises a main process and at least one sub-process, and the process description file comprises main process description information corresponding to the main process and sub-process description information corresponding to the sub-process;
determining the position of the sub-process in the main process according to the main process description information and the sub-process description information, and determining mapping information of each process node in the sub-process;
inserting each flow node into an execution path of the main flow according to the mapping information;
and executing the service arranging process according to the execution paths inserted with the process nodes.
2. The method of claim 1, wherein determining the position of the sub-process in the main process based on the main process description information and the sub-process description information comprises:
respectively analyzing the label information in the main flow description information and the label information in the sub-flow description information;
and determining the position of the sub-process in the main process according to the label information in the main process description information and the label information in the sub-process description information.
3. The method according to claim 2, wherein the flow description file is an XML file, and the parsing the tag information in the main flow description information and the tag information in the sub-flow description information respectively includes:
analyzing label information in the main flow description information and label information in the sub-flow description information by utilizing a self-defined XML file analysis function in a Spring framework, wherein the label information comprises at least one of a flow label, an interface label and a connection label;
the process label is used for identifying each process node in the main process or the sub-process, the interface label is used for identifying interfaces between different process nodes in the main process or the sub-process, and the connection label is used for identifying connection relations between different process nodes in the main process or the sub-process.
4. The method of claim 1, wherein said determining mapping information for each flow node in the sub-flow comprises:
respectively determining input parameters and output parameters of each flow node in the main flow and the sub-flow;
determining source nodes of the input parameters of all flow nodes in the sub-flow and source nodes of the input parameters of all flow nodes in the main flow according to the input parameters and the output parameters of all flow nodes in the main flow and the sub-flow;
and determining mapping information of each flow node in the sub-flow according to the source node of the input parameter of each flow node in the sub-flow and the source node of the input parameter of each flow node in the main flow.
5. The method of claim 4, wherein the determining the mapping information of each flow node in the sub-flow according to the source node of the input parameter of each flow node in the sub-flow and the source node of the input parameter of each flow node in the main flow comprises:
determining a first flow node and a last flow node in the sub-flow;
generating mapping information of the first flow node and the first flow node in the main flow, mapping information of the last flow node and the second flow node in the main flow, and mapping information of the rest flow nodes and the source nodes of the input parameters thereof in the sub flow respectively according to the source nodes of the input parameters of the flow nodes in the sub flow and the source nodes of the input parameters of the flow nodes in the main flow; the output parameter of the first flow node is an input parameter of the first flow node, and the input parameter of the second flow node is an output parameter of the last flow node.
6. The method of claim 5, wherein inserting the respective flow nodes into the execution path of the main flow according to the mapping information comprises:
according to the mapping information, connecting the input interface of the first flow node to the output interface of the first flow node, and connecting the output interface of the last flow node to the input interface of the second flow node.
7. The method as recited in claim 1, further comprising:
after each flow node is inserted into the execution path of the main flow, updating the execution path of the main flow;
the service orchestration process is executed according to the execution path inserted with each process node, and the service orchestration process comprises the following steps:
and executing the service arrangement flow according to the updated execution path.
8. A service orchestration-based flow processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a flow description file corresponding to the service arrangement flow; the service scheduling process comprises a main process and at least one sub-process, and the process description file comprises main process description information corresponding to the main process and sub-process description information corresponding to the sub-process;
a determining module, configured to determine a position of the sub-flow in the main flow according to the main flow description information and the sub-flow description information, and determine mapping information of each flow node in the sub-flow;
the inserting module is used for inserting each flow node into the execution path of the main flow according to the mapping information;
and the execution module is used for executing the service arrangement flow according to the execution paths inserted with the flow nodes.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory to implement the service orchestration-based flow processing method according to any one of claims 1 to 7.
10. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to implement the service orchestration based flow handling method according to any one of claims 1 to 7.
CN202311258527.XA 2023-09-26 2023-09-26 Service arrangement-based flow processing method, device and equipment Pending CN117291534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311258527.XA CN117291534A (en) 2023-09-26 2023-09-26 Service arrangement-based flow processing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311258527.XA CN117291534A (en) 2023-09-26 2023-09-26 Service arrangement-based flow processing method, device and equipment

Publications (1)

Publication Number Publication Date
CN117291534A true CN117291534A (en) 2023-12-26

Family

ID=89256795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311258527.XA Pending CN117291534A (en) 2023-09-26 2023-09-26 Service arrangement-based flow processing method, device and equipment

Country Status (1)

Country Link
CN (1) CN117291534A (en)

Similar Documents

Publication Publication Date Title
US7058588B2 (en) Dependency-based work flow integration and reduction
US7721252B2 (en) Apparatus and method for product-line architecture description and verification
US8219971B2 (en) System and method for source code sectional locking for improved management
US20060129418A1 (en) Method and apparatus for analyzing functionality and test paths of product line using a priority graph
US8051404B2 (en) Software development
US10275234B2 (en) Selective bypass of code flows in software program
Kienzle et al. A unifying framework for homogeneous model composition
US7444618B2 (en) Automatic generation of batch programs with identification, insertion of invariables, declarative statements and variables with the use of place-marks
US20050137839A1 (en) Methods, apparatus and programs for system development
US7475400B2 (en) Database system and information processing system with process code information
US10878185B2 (en) Annotation-based dependency calculations
Oliveira et al. Using REO on ETL conceptual modelling: a first approach
US8539496B1 (en) Method and apparatus for configuring network systems implementing diverse platforms to perform business tasks
CN117291534A (en) Service arrangement-based flow processing method, device and equipment
CN116340940A (en) Code identification method, terminal device and storage medium
US7840452B2 (en) Application, method and process for managing part exchangeability across functional boundaries
CN114063982A (en) Method for automatically constructing functional components based on multi-scenario application
EP3301527A2 (en) Method to extend mes functionalities in a message routing system
Goulão et al. Streamlining scenario modeling with model-driven development: A case study
Redlich et al. Introducing a framework for scalable dynamic process discovery
CN114168565B (en) Backtracking test method, device and system of business rule model and decision engine
Forsell Improving component reuse in software development
CN115878163A (en) Automatic annotation method, terminal device, and computer-readable storage medium
US7743076B2 (en) Extensible action sequences coordinating independently created components
Gurschler et al. Towards Abstraction and Automation in Software Engineering

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination