Process orchestration method, scale control method, device, equipment and storage medium
By defining process orchestration documents and managing delay metrics, the high level of expertise required for business process design and implementation was addressed, resulting in improved business delivery efficiency, reduced operational costs, simplified process orchestration, and optimized resource utilization.
Patent Information
- Application Number
- CN202310198683.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2043-03-01
AI Technical Summary
In existing technologies, the design and implementation of business processes require different personnel, resulting in low business delivery efficiency, high operation and maintenance costs, and high levels of specialization.
By using process orchestration definition files, the process orchestration working layer converts the process orchestration definition files into process data that the workflow engine can recognize, simplifying the process orchestration process. This enables business personnel to independently complete process design and implementation, and allows for scaling control of the working layer in the process orchestration framework through delay metric management.
It improved business delivery efficiency, reduced operation and maintenance costs, and reduced resource waste through accurate scaling management.
Smart Images

Figure CN116166309B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information technology, in particular to a process orchestration method, a scale-out and scale-in control method, a device, an apparatus and a storage medium. BACKGROUND
[0002] A business process is a main way to describe business logic, and through the design and execution of a business process, business delivery and service provision can be achieved.
[0003] A business process is usually defined and executed through process orchestration, and the mainstream solution for implementing a business process is to implement the business process in a workflow engine through code writing after a flowchart of the business process is determined. However, the implementation of a business process based on code writing has the problem of high professionalism, which is usually completed by a developer. However, the process design of a business process is usually completed by a business person, which leads to the fact that process design and process implementation need to be completed by different people, thereby reducing business delivery efficiency and increasing operation and maintenance costs. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a process orchestration method, a scale-out and scale-in control method, a device, an apparatus and a storage medium, so as to improve business delivery efficiency and reduce operation and maintenance costs.
[0005] The embodiments of the present application provide a process orchestration method, comprising: obtaining a process orchestration definition file to be orchestrated; inputting the process orchestration definition file into a preset process orchestration framework for execution; wherein the process orchestration framework comprises a process orchestration work layer and a workflow engine; the process orchestration work layer is used to convert the process orchestration definition file into process data recognizable by the workflow engine; and the workflow engine is used to execute the process data to implement process orchestration.
[0006] In the above implementation manner, the process orchestration definition file in the form of a file is input, the process orchestration work layer is used to convert the process orchestration definition file into process data recognizable by the workflow engine, and then the workflow engine is executed to implement process orchestration. In this way, for the relevant personnel of process orchestration, process orchestration can be achieved only by writing a simple process orchestration definition file, which is easier than code writing and is more friendly to business personnel, so that the process design and the process implementation can be completed by the same person, thereby improving business delivery efficiency and reducing the operation and maintenance costs.
[0007] Further, the process orchestration definition file includes each model required by the process, control flow logic between each model, and basic attributes of the process; and the process orchestration work layer is configured to convert the process orchestration definition file into process data recognizable by the workflow engine according to each model included in the process orchestration definition file, control flow logic between each model, and basic attributes of the process.
[0008] In the above implementation, the relevant personnel only need to write each model required by the process, control flow logic between each model, and basic attributes of the process in the process orchestration definition file according to the specification, so that the process orchestration work layer can convert the process orchestration definition file into process data recognizable by the workflow engine, which is more friendly to business personnel and easier to write.
[0009] Further, each model required by the process is included in the process orchestration definition file in the form of a collection according to type; and control flow logic between each model is included in the process orchestration definition file in the form of a state collection; wherein each state constituting the state collection is configured to define control flow logic of the process.
[0010] In actual application, the same model may be repeatedly used in a process, for example, the same function may be repeatedly called. If the process is written according to the calling order of the model, the process orchestration definition file will be lengthy and readability will be poor. In the above implementation, each model required by the process is written in the process orchestration definition file in the form of a collection according to type, and control flow logic between each model is defined in the form of a state collection, so that the model repeatedly used only needs to be recorded once, which effectively reduces the complexity of the process orchestration definition file, improves readability, and is also more conducive to later operation and maintenance.
[0011] Further, the method further includes registering a general Activity to the workflow engine; and the workflow engine is specifically configured to call the required Activity according to the control flow logic of the process data in the process of executing the process data.
[0012] It can be understood that many functions or features can be implemented by Activity, so by registering a general Activity (for example, some functions or features provided by a third party) to the workflow engine, the calling of the required functions or features can be implemented by calling the Activity, reducing the work of developing related functions and features.
[0013] Further, the model comprises at least one of: an error model, the error model being used to define a case where an error occurs in the process; a timeout model, the timeout model being used to define a case where an overall execution of the process is timed out, and a case where an execution of a part of the process is timed out; a retry model, the retry model being used to define a retry strategy in the process.
[0014] In the above implementation, by defining the error model, automatic discovery and processing of errors in the process of process orchestration by the process orchestration framework can be realized (for example, actively ending the process of process orchestration and reporting errors, etc.); correspondingly, by defining the timeout model, the timeout behavior of the process orchestration framework in the process of process orchestration can be effectively monitored; by defining the retry model, the entire process or part of the process can be retried in cooperation with other various models. Therefore, through the setting of the above models, the process of process orchestration can be made more intelligent, and the process of process orchestration can be made more user-friendly.
[0015] Further, the process orchestration definition file is a yaml file conforming to a process orchestration specification.
[0016] Further, the method further comprises: obtaining a delay index based on process orchestration by the process orchestration framework; the delay index reflecting a delay performance of the process orchestration framework in currently performing process orchestration work; when the delay index meets a preset capacity expansion standard, creating a new process orchestration work layer; when the delay index meets a preset capacity reduction standard, deleting the process orchestration work layer.
[0017] It can be understood that if the delay performance of the process orchestration framework in currently performing process orchestration work is poor, it means that there are too many process orchestration tasks (i.e., process orchestration definition files to be orchestrated), and thus capacity expansion should be performed; on the contrary, if the delay performance of the process orchestration framework in currently performing process orchestration work is too good, it means that the process orchestration work layer currently created can be excessive, and thus capacity reduction can be performed. In this way, in the above implementation, whether the process orchestration work layer currently created in the process orchestration framework is sufficient can be easily and more accurately determined by the delay index reflecting the delay performance of the process orchestration framework in currently performing process orchestration work, so that the capacity expansion and reduction management of the process orchestration work layer in the process orchestration framework can be realized.
[0018] Further, the delay index comprises: a time difference T1 between a planned start time of a workflow task and an actual start time of the workflow task; a time difference T2 between a planned start time of an activity task and an actual start time of the activity task.
[0019] It can be understood that the time difference between the scheduled start time of the workflow task and the actual start time of the workflow task, and the time difference between the scheduled start time of the activity task and the actual start time of the activity task can clearly reflect the waiting condition of the process arrangement task, so that whether the process arrangement work layer currently created in the process arrangement framework is sufficient can be more accurately reflected.
[0020] Further, when the delay indicator does not meet the preset expansion standard, a new process arrangement work layer is created, including: in the case that the T1 is greater than the preset first time threshold or the T2 is greater than the preset second time threshold in the delay indicators obtained for n consecutive times, a new process arrangement work layer is created.
[0021] It can be understood that if the T1 is greater than the preset first time threshold or the T2 is greater than the preset second time threshold in the delay indicators obtained for n consecutive times, it indicates that the delay performance of the process arrangement framework in currently performing the process arrangement work is persistent rather than sudden, and therefore the expansion control through the above implementation manner can avoid unnecessary expansion caused by occasional situations and reduce resource waste.
[0022] Further, creating a new process arrangement work layer includes: determining a first target number of the process arrangement work layers based on the number of the process arrangement work layers currently available and a preset expansion ratio; if the first target number is less than a preset maximum number of the process arrangement work layers, creating a new process arrangement work layer so that the number of the process arrangement work layers reaches the first target number; and if the first target number is greater than the maximum number, creating a new process arrangement work layer so that the number of the process arrangement work layers reaches the maximum number.
[0023] In the above implementation manner, the expansion control is performed based on the preset expansion ratio and the maximum number of the process arrangement work layers, which can quickly realize the expansion control while meeting the limitation of the maximum number of the process arrangement work layers, and the implementation manner is simple and beneficial to use in actual industrial applications.
[0024] Further, when the delay indicator meets the preset contraction standard, the process arrangement work layer is deleted, including: in the case that the T1 is less than a preset third time threshold or the T2 is less than a preset fourth time threshold in the delay indicators obtained for m consecutive times, the process arrangement work layer is deleted.
[0025] It can be understood that if T1 is less than the preset third time threshold or T2 is less than the preset fourth time threshold in the delay indicators obtained for m consecutive times, it indicates that the delay performance of the current process arrangement work in the process arrangement framework is too good and is persistently too good. Therefore, the shrinkage control through the above implementation manner can avoid unnecessary shrinkage caused by accidental circumstances and reduce resource waste.
[0026] Further, the deleting the process arrangement work layer comprises: determining a second target number of the process arrangement work layer based on a currently existing number of the process arrangement work layer and a preset shrinkage ratio; if the second target number is greater than a preset minimum number of the process arrangement work layer, deleting the process arrangement work layer so that the number of the process arrangement work layer reaches the second target number; if the second target number is less than or equal to the minimum number, deleting the process arrangement work layer so that the number of the process arrangement work layer reaches the minimum number.
[0027] In the above implementation manner, the shrinkage control is performed based on the preset shrinkage ratio and the minimum number of the process arrangement work layer, so that the shrinkage control can be quickly realized under the condition of meeting the limitation of the minimum number of the process arrangement work layer, and the implementation manner is simple and beneficial to use in actual industrial applications.
[0028] The embodiment of the application further provides a method for expansion and shrinkage control, comprising: obtaining a delay indicator based on process arrangement performed by a preset process arrangement framework; the delay indicator reflects the delay performance of the current process arrangement work in the process arrangement framework; the process arrangement framework comprises a process arrangement work layer and a workflow engine; the process arrangement work layer is used to convert a process arrangement definition file to be arranged into process data recognizable by the workflow engine; the workflow engine is used to execute the process data to realize process arrangement; when the delay indicator meets a preset expansion standard, a new process arrangement work layer is created; when the delay indicator meets a preset shrinkage standard, the process arrangement work layer is deleted.
[0029] It can be understood that the delay performance of the current process orchestration work in the process orchestration framework is poor, that is, there are too many process orchestration tasks (i.e., process orchestration definition files to be arranged), and thus expansion should be performed; on the contrary, the delay performance of the current process orchestration work in the process orchestration framework is too good, which reflects that the current created process orchestration work layer may be excessive, and thus contraction can be performed. In this way, in the embodiment of the present application, whether the process orchestration work layer currently created in the process orchestration framework is sufficient is determined by the delay index reflecting the delay performance of the current process orchestration work in the process orchestration framework, so that the expansion and contraction management of the process orchestration work layer in the process orchestration framework is easily and more accurately realized.
[0030] Further, the delay index includes: a time difference T1 between a planned start time of a workflow task and an actual start time of the workflow task; a time difference T2 between a planned start time of an activity task and an actual start time of the activity task.
[0031] Further, when the delay index meets a preset expansion standard, a new process orchestration work layer is created, including: in the case that the T1 is greater than a preset first time threshold or the T2 is greater than a preset second time threshold in the delay index obtained for n consecutive times, the new process orchestration work layer is created.
[0032] Further, creating the new process orchestration work layer includes: determining a first target number of the process orchestration work layers based on a number of the process orchestration work layers currently existing and a preset expansion ratio; if the first target number is less than a preset maximum number of the process orchestration work layers, the new process orchestration work layer is created so that the number of the process orchestration work layers reaches the first target number; if the first target number is greater than the maximum number, the new process orchestration work layer is created so that the number of the process orchestration work layers reaches the maximum number.
[0033] Further, when the delay index meets a preset contraction standard, the process orchestration work layer is deleted, including: in the case that the T1 is less than a preset third time threshold or the T2 is less than a preset fourth time threshold in the delay index obtained for m consecutive times, the process orchestration work layer is deleted.
[0034] Further, the deleting the process orchestration worker layer comprises: determining a second target number of the process orchestration worker layer based on a current number of the process orchestration worker layer and a preset scaling-down ratio; if the second target number is greater than a preset minimum number of the process orchestration worker layer, deleting the process orchestration worker layer so that the number of the process orchestration worker layer reaches the second target number; if the second target number is less than or equal to the minimum number, deleting the process orchestration worker layer so that the number of the process orchestration worker layer reaches the minimum number.
[0035] The embodiment of the present application further provides a process orchestration device, comprising: a first obtaining module, configured to obtain a process orchestration definition file to be orchestrated; and an output module, configured to input the process orchestration definition file into a preset process orchestration framework for execution; wherein the process orchestration framework comprises a process orchestration worker layer and a workflow engine; the process orchestration worker layer is configured to convert the process orchestration definition file into process data recognizable by the workflow engine; and the workflow engine is configured to execute the process data to realize process orchestration.
[0036] The embodiment of the present application further provides a scaling control device, comprising: a second obtaining module, configured to obtain a delay index when process orchestration is performed based on a preset process orchestration framework; the delay index reflects a delay performance when a process orchestration worker layer in the process orchestration framework is currently executed; the process orchestration framework comprises the process orchestration worker layer and a workflow engine; the process orchestration worker layer is configured to convert a process orchestration definition file to be orchestrated into process data recognizable by the workflow engine; the workflow engine is configured to execute the process data to realize process orchestration; and a control module, configured to create a new process orchestration worker layer when the delay index meets a preset scaling-up standard; and the control module is further configured to delete the process orchestration worker layer when the delay index meets a preset scaling-down standard.
[0037] The embodiment of the present application further provides an electronic device, comprising a processor and a memory; the processor is configured to execute one or more programs stored in the memory to realize any of the process orchestration methods.
[0038] The embodiment of the present application further provides a computer readable storage medium, which stores one or more programs; the one or more programs can be executed by one or more processors to realize any of the process orchestration methods. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those of ordinary skill in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0040] Figure 1 A flowchart of a process orchestration method provided in the embodiments of the present application;
[0041] Figure 2 A flowchart of a scale-out / in control method provided in the embodiments of the present application;
[0042] Figure 3 A flowchart of a process orchestration work layer creation method provided in the embodiments of the present application;
[0043] Figure 4 A flowchart of a process orchestration work layer deletion method provided in the embodiments of the present application;
[0044] Figure 5 A structural diagram of a process orchestration device provided in the embodiments of the present application;
[0045] Figure 6 A structural diagram of a scale-out / in control device provided in the embodiments of the present application;
[0046] Figure 7 A structural diagram of an electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be described below in combination with the drawings in the embodiments of the present application.
[0048] In order to improve the efficiency of service delivery and reduce the operation and maintenance cost, a process orchestration method is provided in the embodiments of the present application. It can be seen from Figure 1 Figure 1 A flowchart of the process orchestration method provided in the embodiments of the present application, including:
[0049] S101: Obtain a process orchestration definition file to be orchestrated.
[0050] In the embodiments of the present application, the process orchestration definition file can include various models required by the process, control flow logic between the models, and basic attributes of the process.
[0051] It can be understood that the model described in the embodiments of the present application refers to a module such as a function, an event, etc. which can be pre-stored in a device and can be called to realize a certain function.
[0052] Exemplarily, in the embodiments of the present application, the model can include a function, an event, a state and the like basic model, and can also include at least one of an error model, a timeout model, a retry model and the like model.
[0053] The meanings of the above-mentioned models are as follows:
[0054] 1. Function: a reusable function set by default, used for declaring a service that needs to be called.
[0055] The function includes the following basic attributes:
[0056] 1.1 Function name;
[0057] 1.2 Function type, such as rest, rpc, graphql and the like type;
[0058] 1.3 Function operation, which is specific information for calling a function according to the function type. For example, for a rest request, information such as a request http url and parameters needs to be provided.
[0059] 2. Event: a reusable event declaration. In the process of flow arrangement, an instance can be started by consuming an event, and the execution of a corresponding function / service is triggered. For example, in a flow, function B can be executed only after it is detected that the value of parameter A is written, and then the writing of the value of parameter A is an event, which is used to trigger the execution of function B.
[0060] 3. Retry model: used for defining a retry strategy in a flow, which is reusable. After the retry model is called, a retry strategy can be specified for a service call.
[0061] The retry model can include the following basic attributes:
[0062] 3.1 Retry strategy name
[0063] 3.2 Maximum number of retries
[0064] 3.3 Maximum delay time
[0065] 3.4 Retry interval strategy, used for limiting the interval time between two adjacent retries.
[0066] 4. Timeout model: used for defining the overall execution timeout of a flow, and used for defining the execution timeout of a part of a flow (for example, the execution timeout of a state, action or branch in a flow), which is reusable. The timeout model can be used in cooperation with the retry model and the error model.
[0067] 5. Error Model: used to define the error condition of the flow, can provide specific domain error definition, can be referenced in the error handling of the state, to execute the corresponding processing strategy after the error occurs. Error model can be reused.
[0068] 6. State: used to define the control flow logic of the flow, is the building block representing the control flow logic. State can reference reusable functions, events, retry models, timeout models, error models, etc.
[0069] In the embodiments of the present application, the state can include but is not limited to the following control flow:
[0070] 6.1 Switch: execute the corresponding operation according to the expression result;
[0071] 6.2 Sleep: sleep for a specified time;
[0072] 6.3 Parallel: concurrently execute operations;
[0073] 6.4 Foreach: concurrently or sequentially execute elements in an array.
[0074] It can be understood that in an optional implementation of the embodiments of the present application, the various models required by the flow can be included in the flow orchestration definition file in the form of a collection by type; the control flow logic between the models can be included in the flow orchestration definition file in the form of a state collection. In this way, by writing the various models required by the flow in the form of a collection by type in the flow orchestration definition file, and defining the control flow logic between the models in the form of a state collection, the model that is repeatedly used only needs to be recorded once, effectively reducing the complexity of the flow orchestration definition file, improving readability, and being more conducive to later operation and maintenance.
[0075] Of course, in another optional implementation of the embodiments of the present application, the various models required by the flow can also be written in the flow orchestration definition file in the order of model calling.
[0076] In the embodiments of the present application, the basic attributes of the flow can include at least one of the following: the identifier of the flow, the name of the flow, the basic description of the flow, the definition of the start of the flow (for example, when to start running), the timeout setting (for example, which timeout model to set), the error handling setting (the processing strategy when an error occurs), whether to run long-term, whether to automatically call the retry model, etc., but not as a limitation.
[0077] S102: input the flow orchestration definition file into a preset flow orchestration framework for execution.
[0078] In the embodiments of the present application, the process orchestration framework comprises a process orchestration work layer and a workflow engine; the process orchestration work layer is configured to convert the process orchestration definition file into process data recognizable by the workflow engine; and the workflow engine is configured to execute the process data to realize process orchestration.
[0079] It can be understood that the process orchestration work layer can convert the process orchestration definition file into process data recognizable by the workflow engine according to each model included in the process orchestration definition file, the control flow logic between the models, and the basic attributes of the process.
[0080] For example, generally, the workflow engine can recognize and execute program codes, and thus the corresponding program codes can be generated based on each model included in the process orchestration definition file, the control flow logic between the models, and the basic attributes of the process defined in the program codes. It can be understood that in the embodiments of the present application, the specific content of each model is predefined, and thus the overall logic of the program codes and the related functions, events and other functional modules required to be called can be obtained based on the control flow actually represented by the state set in the process orchestration definition file, so that the corresponding program codes can be converted based on the set language.
[0081] In the embodiments of the present application, the workflow engine can be implemented by using an open source system temporal, but not as a limitation.
[0082] In the embodiments of the present application, the process orchestration framework can further comprise a process orchestration management layer configured to manage the process orchestration definition file. For example, an interface for creating the process orchestration definition file can be provided to enable an engineer to directly write the process orchestration definition file. In addition, the engineer can be provided with a front-end display module of each model, so that the engineer can connect the front-end display modules into a flowchart to create the process orchestration definition file, and the interface for creating the process orchestration definition file can automatically convert the flowchart into the process orchestration definition file. For another example, one or more of the following interfaces can be provided: an interface for querying the existing process orchestration definition file in the system, an interface for updating the process orchestration definition file, an interface for deleting the process orchestration definition file, an interface for obtaining the content of the process orchestration definition file and calling the process orchestration work layer to run the process orchestration definition file, an interface for stopping the running process orchestration definition file, an interface for querying the running details of the process orchestration definition file, and the like.
[0083] In the embodiments of the present application, the process orchestration work layer can be implemented based on a temporal sdk (software development kit provided by the temporal engine), but is not limited thereto. In addition to providing an interface for parsing a process orchestration definition file and generating process data executable by a workflow engine according to the basic attributes of each model required by the process, the control flow logic between the models, and the process included in the parsed process orchestration definition file, the interface for registering an Activity (activity) with the workflow engine can also be provided. In addition, considering that the process orchestration framework can support the simultaneous orchestration of multiple process orchestration definition files at the same time, and that a process orchestration work layer is responsible for the processing of one process orchestration definition file, the interface for registering the process orchestration work layer with the workflow engine can also be provided in the process orchestration work layer.
[0084] In the embodiments of the present application, the process orchestration work layer can register a general Activity with the workflow engine before converting the process orchestration definition file into process data recognizable by the workflow engine and providing it to the workflow engine for processing, so that the workflow engine can call the required Activity according to the control flow logic of the process data during the execution of the process data. It can be understood that many functions or functions are implemented through Activity, so by registering the Activity for the workflow engine to call, the number of functions required to be developed or set can be reduced.
[0085] When the interface for registering the process orchestration work layer with the workflow engine is provided in the process orchestration work layer, the process orchestration work layer can also be automatically registered with the workflow engine after being created, so as to be managed subsequently, for example, to facilitate subsequent expansion and contraction control of the process orchestration work layer.
[0086] It can be understood that in the embodiments of the present application, the process orchestration framework can also include a storage layer responsible for storing data.
[0087] It can also be understood that in the embodiments of the present application, the process orchestration definition file can be implemented using DSL (Domain Specific Language).
[0088] Optionally, the process orchestration definition file can be a yaml file conforming to the process orchestration specification.
[0089] The process arrangement method provided in the embodiments of the present application takes a process arrangement definition file in a file form as input, converts the process arrangement definition file into process data recognizable by a workflow engine through a process arrangement work layer, and then provides the workflow engine for execution to realize process arrangement. In this way, for the relevant personnel of process arrangement, process arrangement can be realized only by writing a simple process arrangement definition file, and compared with writing code, the difficulty is reduced, which is more friendly to business personnel, so that the process design and process implementation can be completed by the same person, thereby improving the business delivery efficiency and reducing the later operation and maintenance cost.
[0090] In the embodiments of the present application, a scaling control method is also provided. It can be understood that in the process arrangement framework, process arrangement of multiple process arrangement definition files to be arranged can be performed at the same time, and each process arrangement definition file needs a process arrangement work layer to support and process. Then, in order to better utilize device resources, the process arrangement work layers in the process arrangement framework need to be dynamically adjusted, so that the number of process arrangement work layers in the process arrangement framework is adapted to the number of process arrangement definition files to be arranged.
[0091] The current conventional scaling control scheme is to control based on CPU (Central Processing Unit) occupancy and memory occupancy of a device where the process arrangement framework is located. However, since in addition to running the process arrangement framework, other programs can also run in a device, and CPU, memory and other resources are shared by all programs in the device, the scaling control based on CPU (Central Processing Unit) occupancy and memory occupancy can not be accurate.
[0092] Therefore, in the embodiments of the present application, a scaling control method is also provided, please refer to Figure 2 as shown, comprising:
[0093] S201: Obtain a delay index when process arrangement is performed based on a preset process arrangement framework.
[0094] In the embodiments of the present application, the delay index reflects the delay performance when the process arrangement work in the process arrangement framework is currently executed.
[0095] Optionally, in the embodiments of the present application, the delay index can include, but is not limited to, at least one of a time difference T1 between a planned start time of a workflow task and an actual start time of the workflow task, and a time difference T2 between a planned start time of an activity task and an actual start time of the activity task.
[0096] It can be understood that the scheduled start time of the workflow task and the scheduled start time of the activity task are two parameters existing in the execution of the process orchestration in the workflow engine. The so-called workflow task refers to a task of performing process orchestration on a process orchestration definition file to be orchestrated, and the actual start time of the workflow task is the time when the workflow engine actually starts to execute the process data obtained by converting the process orchestration definition file to be orchestrated. The so-called activity task refers to a task of calling Activity for execution, and the actual start time of the activity task refers to the time when Activity is actually called.
[0097] In the embodiments of the present application, the specific implementation of the process orchestration framework can be referred to as described above, and will not be described here.
[0098] S202: When the delay indicator meets the preset expansion standard, a new process orchestration working layer is created; and when the delay indicator meets the preset shrinkage standard, the process orchestration working layer is deleted.
[0099] In an embodiment of the present application, a new process orchestration working layer can be created when T1 is greater than a preset first time threshold or T2 is greater than a preset second time threshold.
[0100] It can be understood that the first time threshold and the second time threshold can be reasonably set according to a large number of experiments, for example, the first time threshold can be set to 30 seconds, and the second time threshold can be set to 10 seconds, but not as a limitation.
[0101] In another embodiment of the present application, a query interval can be set, so that the delay indicator is queried according to the query interval. For example, the delay indicator can be queried every 5 seconds.
[0102] At this time, a new process orchestration working layer can be created when T1 is greater than a preset first time threshold or T2 is greater than a preset second time threshold in the delay indicators obtained continuously n times. The value of n can be set by an engineer according to actual needs, for example, n can be set to 3, but not as a limitation.
[0103] In this way, if T1 is greater than a preset first time threshold or T2 is greater than a preset second time threshold in the delay indicators obtained continuously n times, it indicates that the delay performance of the current process orchestration working in the process orchestration framework is not good and is persistent rather than sudden, and therefore the expansion control in the above manner can avoid unnecessary expansion caused by accidental circumstances and reduce resource waste.
[0104] Similarly, in an embodiment of the present application, the process orchestration working layer can be deleted when T1 is less than a preset third time threshold or T2 is less than a preset fourth time threshold.
[0105] It can be understood that the third time threshold and the fourth time threshold can be set reasonably after a large number of experiments, for example, the third time threshold can be set to 5 seconds, and the fourth time threshold can be set to 1 second, but not as a limitation.
[0106] It can also be understood that the third time threshold can be set to be less than or equal to the first time threshold, and the fourth time threshold can be set to be less than or equal to the second time threshold.
[0107] Similarly, in another embodiment of the application, a query interval can be set, so that the query of the delay index is performed according to the query interval.
[0108] At this time, the process orchestration work layer can be deleted in the case that T1 is less than the preset third time threshold or T2 is less than the preset fourth time threshold in the delay index obtained for m consecutive times. The value of m can be set by an engineer according to actual needs, for example, it can be set to 3, but not as a limitation. It can be understood that the value of m can be the same as the value of n, or different.
[0109] It can be understood that if T1 is less than the preset third time threshold or T2 is less than the preset fourth time threshold in the delay index obtained for m consecutive times, it indicates that the delay performance of the current execution of the process orchestration work in the process orchestration framework is persistent rather than sudden, and therefore the expansion control by the above-mentioned manner can avoid unnecessary shrinkage caused by accidental circumstances and reduce resource waste.
[0110] In an optional embodiment of the application, referring to FIG. 6, the process of creating a new process orchestration work layer can include: Figure 3
[0111] S301: Determine the first target number of process orchestration work layers based on the number of currently existing process orchestration work layers and the preset expansion ratio.
[0112] S302: If the first target number is less than the maximum number of process orchestration work layers, create a new process orchestration work layer to make the number of process orchestration work layers reach the first target number; if the first target number is greater than the maximum number, create a new process orchestration work layer to make the number of process orchestration work layers reach the maximum number.
[0113] For example, assuming that the number of currently existing process orchestration work layers is 100, and the expansion ratio is 5%, the first target number of process orchestration work layers is 105.
[0114] On the basis, assuming that the maximum number of process orchestration work layers allowed by the device is 110, since 105 is less than 110, 5 new process orchestration work layers can be created, so that the number of existing process orchestration work layers reaches 105.
[0115] On the contrary, assuming that the maximum number of process orchestration work layers allowed by the device is 102, since 105 is greater than 102, only 2 new process orchestration work layers can be created at this time, so that the number of existing process orchestration work layers reaches 102.
[0116] It can be understood that in the embodiments of the present application, if the number of currently existing process orchestration work layers is equal to the maximum number of process orchestration work layers allowed by the device, at this time since expansion cannot be performed, the operation shown in Figure 3 may not be performed.
[0117] It can also be understood that in the embodiments of the present application, in addition to being able to determine the first target number of process orchestration work layers based on the number of currently existing process orchestration work layers and the preset expansion ratio, the first target number of process orchestration work layers can also be determined based on the number of currently existing process orchestration work layers and the preset capacity increase number. The capacity increase number refers to the number of process orchestration work layers increased each time. The operation after determining the first target number is still consistent with the foregoing.
[0118] Correspondingly, in an optional implementation of the embodiments of the present application, referring to Figure 4 , the process of deleting process orchestration work layers can include:
[0119] S401: Determine the second target number of process orchestration work layers based on the number of currently existing process orchestration work layers and the preset capacity reduction ratio.
[0120] S402: If the second target number is greater than the preset minimum number of process orchestration work layers, delete process orchestration work layers so that the number of process orchestration work layers reaches the second target number; if the second target number is less than or equal to the minimum number, delete process orchestration work layers so that the number of process orchestration work layers reaches the minimum number.
[0121] For example, assuming that the number of currently existing process orchestration work layers is 20, and assuming that the capacity reduction ratio is 10%, the second target number of process orchestration work layers is 18.
[0122] On the basis, assuming that the minimum number of process orchestration work layers allowed by the device is 10, since 18 is greater than 10, 2 process orchestration work layers can be deleted, so that the number of existing process orchestration work layers is reduced to 18.
[0123] In contrast, assuming that the minimum number of process orchestration work layers allowed by the device is 19, since 18 is less than 19, only 1 process orchestration work layer can be deleted at this time, so that the number of existing process orchestration work layers is reduced to 19.
[0124] It can be understood that in the embodiments of the present application, if the number of currently existing process orchestration work layers is equal to the minimum number of process orchestration work layers allowed by the device, at this time since the capacity cannot be reduced any more, the operation shown in Figure 4 may not be performed.
[0125] It can also be understood that in the embodiments of the present application, in addition to determining the second target number of process orchestration work layers based on the number of currently existing process orchestration work layers and the preset capacity reduction ratio, the second target number of process orchestration work layers can also be determined based on the number of currently existing process orchestration work layers and the preset capacity reduction number. The capacity reduction number refers to the number of process orchestration work layers deleted each time. The operation after the second target number is determined is still consistent with the foregoing.
[0126] The capacity expansion and reduction control method provided by the embodiments of the present application can easily and more accurately achieve the capacity expansion and reduction management of the process orchestration work layers in the process orchestration framework by reflecting the delay index of the delay performance of the current process orchestration work in the process orchestration framework.
[0127] It can be understood that the process orchestration method and the capacity expansion and reduction control method in the embodiments of the present application can be independently implemented or simultaneously implemented, and the embodiments of the present application do not limit this.
[0128] Based on the same inventive concept, the embodiments of the present application further provide a process orchestration device 500 and a capacity expansion and reduction control device 600. Please refer to Figure 5 and Figure 6 , which show that the process orchestration device Figure 5 shows the process orchestration device using the method shown in Figure 1 , and Figure 6 shows the capacity expansion and reduction control device using the method shown in Figure 2 . It should be understood that the specific functions of the device 500 and the device 600 can be referred to the description in the foregoing, and the detailed description is appropriately omitted here to avoid repetition. The device 500 and the device 600 include at least one software function module that can be stored in the memory in the form of software or firmware or solidified in the operating system of the device 500 and the device 600. Specifically:
[0129] Please refer to Figure 5 , the device 500 includes a first acquisition module 501 and an output module 502. Wherein:
[0130] The first obtaining module 501 is configured to obtain a process arrangement definition file to be arranged;
[0131] The output module 502 is configured to input the process arrangement definition file into a preset process arrangement framework for execution.
[0132] The process arrangement framework comprises a process arrangement work layer and a workflow engine; the process arrangement work layer is configured to convert the process arrangement definition file into process data recognizable by the workflow engine; and the workflow engine is configured to execute the process data to realize process arrangement.
[0133] In an implementation of the embodiment of the present application, the process arrangement definition file comprises various models required by the process, control flow logic between the various models, and basic attributes of the process; the process arrangement work layer is configured to convert the process arrangement definition file into process data recognizable by the workflow engine according to the various models, the control flow logic between the various models, and the basic attributes of the process included in the process arrangement definition file.
[0134] In an implementation of the embodiment of the present application, the various models required by the process are included in the process arrangement definition file in the form of a set according to type; and the control flow logic between the various models is included in the process arrangement definition file in the form of a state set; wherein each state constituting the state set is configured to define the control flow logic of the process.
[0135] In an implementation of the embodiment of the present application, the process arrangement work layer is further configured to register a general Activity to the workflow engine; and the workflow engine is specifically configured to call the required Activity according to the control flow logic of the process data in the process of executing the process data.
[0136] In an implementation of the embodiment of the present application, the model comprises at least one of the following:
[0137] An error model, the error model being configured to define a case where an error occurs in the process;
[0138] A timeout model, the timeout model being configured to define a case where the overall execution of the process is timed out, and a case where the execution of a part of the process is timed out;
[0139] A retry model, the retry model being configured to define a retry strategy in the process.
[0140] In the embodiment of the present application, the process arrangement definition file is a yaml file conforming to a process arrangement specification.
[0141] In an implementation of the embodiment of the present application, the device 500 can further comprise a control unit. The first obtaining module 501 is further configured to obtain a delay index when the process orchestration framework is used for process orchestration; the delay index reflects a delay performance when a current process orchestration work is executed in the process orchestration framework; and the control unit is configured to: create a new process orchestration work layer when the delay index meets a preset expansion standard; and delete the process orchestration work layer when the delay index meets a preset contraction standard.
[0142] In the implementation, the delay index comprises: a time difference T1 between a planned start time of a workflow task and an actual start time of the workflow task; and a time difference T2 between a planned start time of an activity task and an actual start time of the activity task.
[0143] In the implementation, the control unit is specifically configured to: create a new process orchestration work layer when the T1 is greater than a preset first time threshold or the T2 is greater than a preset second time threshold in the delay index obtained for n consecutive times.
[0144] In the implementation, the control unit is specifically configured to: determine a first target number of the process orchestration work layers based on a number of the process orchestration work layers currently available and a preset expansion ratio; create a new process orchestration work layer to make the number of the process orchestration work layers reach the first target number when the first target number is less than a preset maximum number of the process orchestration work layers; and create a new process orchestration work layer to make the number of the process orchestration work layers reach the maximum number when the first target number is greater than the maximum number.
[0145] In the implementation, the control unit is specifically configured to: delete the process orchestration work layer when the T1 is less than a preset third time threshold or the T2 is less than a preset fourth time threshold in the delay index obtained for m consecutive times.
[0146] In the implementation, the control unit is specifically configured to: determine a second target number of the process orchestration work layers based on a number of the process orchestration work layers currently available and a preset contraction ratio; delete the process orchestration work layer to make the number of the process orchestration work layers reach the second target number when the second target number is greater than a preset minimum number of the process orchestration work layers; and delete the process orchestration work layer to make the number of the process orchestration work layers reach the minimum number when the second target number is less than or equal to the minimum number.
[0147] Referring to Figure 6As shown in FIG. 6, the apparatus 600 includes a second obtaining module 601 and a control module 602. In this embodiment of the present application, the second obtaining module 601 is configured to obtain a delay index when a process orchestration is performed based on a preset process orchestration framework; the delay index reflects a delay performance when a current process orchestration work is performed in the process orchestration framework; the process orchestration framework includes a process orchestration work layer and a workflow engine; the process orchestration work layer is configured to convert a process orchestration definition file to be orchestrated into process data recognizable by the workflow engine; and the workflow engine is configured to perform the process data to realize process orchestration.
[0148] The control module 602 is configured to create a new process orchestration work layer when the delay index meets a preset expansion standard.
[0149] The control module 602 is further configured to delete the process orchestration work layer when the delay index meets a preset contraction standard.
[0150] The control module 602 is further configured to delete the process orchestration work layer when the delay index meets a preset contraction standard.
[0151] In this embodiment of the present application, the delay index includes a time difference T1 between a planned start time of a workflow task and an actual start time of the workflow task, and a time difference T2 between a planned start time of an activity task and an actual start time of the activity task.
[0152] In one feasible implementation of the embodiment of the present application, the control unit is specifically configured to: in a case where the T1 is greater than a preset first time threshold value or the T2 is greater than a preset second time threshold value in the delay index obtained for n consecutive times, create a new process orchestration work layer.
[0153] In the above feasible implementation, the control unit is specifically configured to: determine a first target number of the process orchestration work layers based on a number of the process orchestration work layers currently available and a preset expansion ratio; if the first target number is less than a preset maximum number of the process orchestration work layers, create a new process orchestration work layer so that the number of the process orchestration work layers reaches the first target number; and if the first target number is greater than the maximum number of the process orchestration work layers, create a new process orchestration work layer so that the number of the process orchestration work layers reaches the maximum number.
[0154] In one feasible implementation of the embodiment of the present application, the control unit is specifically configured to: in a case where the T1 is less than a preset third time threshold value or the T2 is less than a preset fourth time threshold value in the delay index obtained for m consecutive times, delete the process orchestration work layer.
[0155] In the foregoing implementation, the control unit is specifically configured to: determine a second target number of the process orchestration worker layers based on a current number of the process orchestration worker layers and a preset scaling-down ratio; if the second target number is greater than a preset minimum number of the process orchestration worker layers, delete the process orchestration worker layers so that the number of the process orchestration worker layers reaches the second target number; and if the second target number is less than or equal to the minimum number of the process orchestration worker layers, delete the process orchestration worker layers so that the number of the process orchestration worker layers reaches the minimum number.
[0156] It should be understood that, for the sake of brevity of description, some of the content described in the method embodiments will not be repeated in the device embodiments.
[0157] Based on the same inventive concept, the embodiments of the present application also provide an electronic device, as shown in Figure 7 The electronic device includes a processor 701 and a memory 702. Wherein:
[0158] The processor 701 is configured to execute one or more programs stored in the memory 702 to implement the process orchestration method or the scaling control method provided in the above embodiments.
[0159] It should be understood that the processor 701 can be a processor core or a processor chip, or other circuitry that can be configured and run programs. The memory 702 can be a RAM (Random Access Memory), a ROM (Read-Only Memory), a flash memory, etc., but not as a limitation.
[0160] It should also be understood that the electronic device can include more or less components than those shown in Figure 7 The structure shown is only schematic, and the electronic device can include more or less components than those shown in Figure 7 or have a different configuration from that shown in Figure 7 For example, it can also have an internal communication bus for realizing communication between the processor 701 and the memory 702; for another example, it can also have an external communication interface, such as a USB (Universal Serial Bus) interface, a CAN (Controller Area Network) bus interface, etc.; for another example, it can also have a display screen and other information display components, but not as a limitation.
[0161] The embodiment further provides a computer readable storage medium, such as a floppy disk, an optical disk, a hard disk, a flash memory, a U disk, an SD (Secure Digital Memory Card) card, an MMC (Multimedia Card) card, and the like, in which one or more programs for implementing the above steps are stored, and the one or more programs can be executed by one or more processors to implement the flow arrangement method or the scale control method in the above embodiment one and / or embodiment two. Details are not described herein.
[0162] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. The embodiments described above are merely schematic, for example, the division of the units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0163] In addition, the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0164] Further, the function modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0165] In this document, the terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations.
[0166] In this document, plural refers to two or more.
[0167] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A process orchestration method, characterized by, The method comprises the following steps: obtaining a process arrangement definition file to be arranged; inputting the process arrangement definition file into a preset process arrangement framework for execution; wherein the process arrangement framework comprises a process arrangement work layer and a workflow engine; the process arrangement work layer is used for converting the process arrangement definition file into process data recognizable by the workflow engine; and the workflow engine is used for executing the process data to realize process arrangement; the process arrangement definition file comprises various models required by the process, control flow logic between the various models, and basic attributes of the process; the models comprise functions, events, and states; the functions are pre-set reusable functions used for declaring services to be called; the events are reusable event declarations, and the events trigger execution of corresponding functions / services when consumed; the states are used for defining control flow logic of the process and are building blocks representing the control flow logic; and the basic attributes of the process comprise at least one of the following: identification of the process, name of the process, basic description of the process, definition of process start running, timeout setting, error handling setting, whether to run for a long time, and whether to automatically call a retry model; the process arrangement work layer is used for converting the process arrangement definition file into process data recognizable by the workflow engine according to the various models included in the process arrangement definition file, the control flow logic between the various models, and the basic attributes of the process; converting the process arrangement definition file into process data recognizable by the workflow engine comprises generating corresponding program code based on the various models included in the process arrangement definition file and the control flow logic between the various models, and defining the basic attributes of the process in the program code.
2. The method of claim 1, wherein: the various models required by the process are included in the process arrangement definition file in the form of a collection according to types; and the control flow logic between the various models is included in the process arrangement definition file in the form of a state collection. Each state constituting the state collection is used to define the control flow logic of the process.
3. The method of claim 1, wherein, The method further comprises registering a general Activity to the workflow engine. The workflow engine is specifically used for calling required Activities according to the control flow logic of the process data during execution of the process data.
4. The method of claim 1, wherein, The models comprise at least one of the following: an error model used for defining a case where the process has an error; a timeout model used for defining a case where overall execution of the process is timed out, and a case where execution of a part of the process is timed out; a retry model used for defining a retry strategy in the process.
5. The method according to any one of claims 1 to 4, wherein The process arrangement definition file is a yaml file conforming to a process arrangement specification.
6. The method according to any one of claims 1 to 4, wherein The method further comprises: obtaining a delay index when process arrangement is performed based on the process arrangement framework; the delay index reflects a delay performance when current process arrangement work is performed in the process arrangement framework. create a new process orchestration working layer when the delay index meets a preset capacity expansion standard; delete the process orchestration working layer when the delay index meets a preset capacity reduction standard.
7. The method of claim 5, wherein, The method further comprises: obtaining a delay index based on process orchestration performed by the process orchestration framework; the delay index reflects a delay performance of currently performing process orchestration work in the process orchestration framework; create a new process orchestration working layer when the delay index meets a preset capacity expansion standard; delete the process orchestration working layer when the delay index meets a preset capacity reduction standard.
8. The method of claim 6, wherein, The delay index comprises: a time difference T1 between a scheduled start time of a workflow task and an actual start time of the workflow task; a time difference T2 between a scheduled start time of an activity task and an actual start time of the activity task.
9. The method of claim 8, wherein, create a new process orchestration working layer when the delay index does not meet a preset capacity expansion standard, comprising: create a new process orchestration working layer when, in the delay indexes obtained for n consecutive times, the T1 is greater than a preset first time threshold or the T2 is greater than a preset second time threshold.
10. The method of claim 9, wherein, Creating a new process orchestration working layer comprises: determining a first target number of the process orchestration working layers based on a number of currently existing process orchestration working layers and a preset capacity expansion ratio; if the first target number is less than a preset maximum number of the process orchestration working layers, create a new process orchestration working layer to make the number of the process orchestration working layers reach the first target number; if the first target number is greater than the maximum number, create a new process orchestration working layer to make the number of the process orchestration working layers reach the maximum number.
11. The method of claim 8, wherein, delete the process orchestration working layer when the delay index meets a preset capacity reduction standard, comprising: delete the process orchestration working layer when, in the delay indexes obtained for m consecutive times, the T1 is less than a preset third time threshold or the T2 is less than a preset fourth time threshold.
12. The method of claim 11, wherein, Deleting the process orchestration working layer comprises: determining a second target number of the process orchestration working layers based on a number of currently existing process orchestration working layers and a preset capacity reduction ratio; if the second target number is greater than a preset minimum number of the process orchestration working layers, delete the process orchestration working layer to make the number of the process orchestration working layers reach the second target number; if the second target number is less than or equal to the minimum number, delete the process orchestration working layer to make the number of the process orchestration working layers reach the minimum number.
13. A method of controlling scale-out / in, characterized by, comprise: obtaining a delay index based on process orchestration performed by a preset process orchestration framework; the delay index reflects a delay performance of currently performing process orchestration work in the process orchestration framework; the process orchestration framework comprises a process orchestration working layer and a workflow engine; the process orchestration working layer is configured to convert a process orchestration definition file to be orchestrated into process data recognizable by the workflow engine; the workflow engine is configured to execute the process data to implement process orchestration; The process orchestration definition file includes various models required by the process, control flow logic between the models, and basic attributes of the process; the models include functions, events, and states; the functions are pre-set reusable functions for declaring services that need to be called; the events are reusable event declarations, and the events are triggered when consumed to execute corresponding functions / services; the states are used to define the control flow logic of the process, which are building blocks representing the control flow logic; the basic attributes of the process include at least one of the following: identification of the process, name of the process, basic description of the process, definition of the process starting to run, timeout setting, error handling setting, whether to run long-term, and whether to automatically call a retry model; The process orchestration working layer is used to convert the process orchestration definition file into process data recognizable by the workflow engine according to the various models included in the process orchestration definition file, the control flow logic between the models, and the basic attributes of the process; wherein: converting the process orchestration definition file into process data recognizable by the workflow engine includes: generating corresponding program code based on the various models included in the process orchestration definition file, the control flow logic between the models, and defining the basic attributes of the process in the program code; When the delay indicator meets the preset capacity expansion standard, a new process orchestration working layer is created; When the delay indicator meets the preset capacity reduction standard, the process orchestration working layer is deleted.
14. The method of claim 13, wherein, The delay indicator includes: A time difference T1 between a planned start time of a workflow task and an actual start time of the workflow task; A time difference T2 between a planned start time of an activity task and an actual start time of the activity task.
15. The method of claim 14, wherein, When the delay indicator meets the preset capacity expansion standard, a new process orchestration working layer is created, including: In the case that the T1 is greater than a preset first time threshold or the T2 is greater than a preset second time threshold in the delay indicators obtained for n consecutive times, a new process orchestration working layer is created.
16. The method of claim 15, wherein, Creating a new process orchestration working layer includes: Determining a first target number of the process orchestration working layers based on a current number of the process orchestration working layers and a preset capacity expansion ratio; If the first target number is less than a preset maximum number of the process orchestration working layers, a new process orchestration working layer is created to make the number of the process orchestration working layers reach the first target number; If the first target number is greater than the maximum number, a new process orchestration working layer is created to make the number of the process orchestration working layers reach the maximum number.
17. The method of any one of claims 14-16, wherein, When the delay indicator meets the preset capacity reduction standard, the process orchestration working layer is deleted, including: In the case that the T1 is less than a preset third time threshold or the T2 is less than a preset fourth time threshold in the delay indicators obtained for m consecutive times, the process orchestration working layer is deleted.
18. The method of claim 17, wherein, Deleting the process orchestration working layer includes: determine a second target number of the process orchestration work layers based on a current number of the process orchestration work layers and a preset shrinkage ratio; if the second target number is greater than a preset minimum number of the process orchestration work layers, delete the process orchestration work layers so that the number of the process orchestration work layers reaches the second target number; if the second target number is less than or equal to the minimum number, delete the process orchestration work layers so that the number of the process orchestration work layers reaches the minimum number.
19. A process orchestration apparatus, characterized by comprise: a first obtaining module, configured to obtain a process orchestration definition file to be orchestrated; an output module, configured to input the process orchestration definition file into a preset process orchestration framework for execution; wherein: the process orchestration framework comprises a process orchestration work layer and a workflow engine; the process orchestration work layer is configured to convert the process orchestration definition file into process data recognizable by the workflow engine; the workflow engine is configured to execute the process data to realize process orchestration; the process orchestration definition file comprises various models required by a process, control flow logic between the various models, and basic attributes of the process; the models comprise functions, events, and states; the functions are pre-set reusable functions for declaring services to be invoked; the events are reusable event declarations, and the events trigger execution of corresponding functions / services when consumed; the states are configured to define control flow logic of the process, and are building blocks representing the control flow logic; the basic attributes of the process comprise at least one of the following: identification of the process, name of the process, basic description of the process, definition of process start running, timeout setting, error handling setting, whether to run long-term, and whether to automatically invoke a retry model; the process orchestration work layer is configured to convert the process orchestration definition file into process data recognizable by the workflow engine according to the various models included in the process orchestration definition file, the control flow logic between the various models, and the basic attributes of the process; converting the process orchestration definition file into process data recognizable by the workflow engine comprises: generating corresponding program code based on the various models included in the process orchestration definition file and the control flow logic between the various models, and defining the basic attributes of the process in the program code.
20. A scale-out / in control apparatus characterized by comprising: comprise: a second obtaining module, configured to obtain a delay index when process orchestration is performed based on a preset process orchestration framework; the delay index reflects a delay performance when a process orchestration work is currently executed in the process orchestration framework; the process orchestration framework comprises a process orchestration work layer and a workflow engine; the process orchestration work layer is configured to convert a process orchestration definition file to be orchestrated into process data recognizable by the workflow engine; the workflow engine is configured to execute the process data to realize process orchestration; The process orchestration definition file includes various models required by the process, control flow logic between the models, and basic attributes of the process; the models include functions, events, and states; the functions are pre-set reusable functions for declaring services to be called; the events are reusable event declarations, and the events are triggered when consumed to execute corresponding functions / services; the states are used to define the control flow logic of the process, and are building blocks representing the control flow logic; the basic attributes of the process include at least one of the following: identification of the process, name of the process, basic description of the process, definition of starting running of the process, timeout setting, error handling setting, whether to run long-term, and whether to automatically call a retry model; The process orchestration working layer is used to convert the process orchestration definition file into process data recognizable by the workflow engine according to various models included in the process orchestration definition file, control flow logic between the models, and basic attributes of the process; wherein: converting the process orchestration definition file into process data recognizable by the workflow engine includes: generating corresponding program code based on various models included in the process orchestration definition file and control flow logic between the models, and defining the basic attributes of the process in the program code; The control module is configured to create a new process orchestration working layer when the delay indicator meets a preset capacity expansion standard. The control module is further configured to delete the process orchestration working layer when the delay indicator meets a preset capacity reduction standard.
21. An electronic device, comprising: Comprise: A processor and a memory; The processor is configured to execute one or more programs stored in the memory to implement the method of any one of claims 1-18.
22. A computer-readable storage medium, characterized in that, The computer readable storage medium stores one or more programs, which can be executed by one or more processors to implement the method of any one of claims 1-18.
Citation Information
Patent Citations
Elastic adjustment method and device for task processing parallelism degree
CN114691324A
Workflow arrangement system and method
CN115600977A