A method, device and medium for automatically arranging software processes

By automatically selecting and adjusting components in the microservice process, the cumbersome step orchestration problem in the development of microservice process is solved, the development efficiency and accuracy are improved, and the development cost is reduced.

CN119225701BActive Publication Date: 2025-03-04YNET INTERACTIVE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411747725.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-04
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

In the development of microservice process, the process of selecting input parameters, mapping of output parameters and orchestrating the steps of the process, which leads to low development efficiency and high cost.

Method used

Through a software process automatic orchestration method, multiple components and their input and output parameters are obtained, components that meet the preset component selection rules are selected, and the acceptance relationship between components is adjusted according to the parameter dependency relationship to realize automatic orchestration of component serial and parallel sequences.

Benefits of technology

It realizes automatic and intelligent orchestration process steps, improves development efficiency, reduces development costs, and avoids inconsistent problems of manual orchestration results for different developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225701B_ABST
    Figure CN119225701B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and medium for automatic arrangement of software processes, which relate to the field of software development. The method comprises: obtaining multiple components and corresponding input parameters and output parameters of each component, initial parameters and result parameters of a target process, and setting the initial values ​​of known parameters as the initial parameters; cyclically selecting components that meet preset component selection rules from multiple components as target components, serially appending the target components to a component serial sequence, and adding the output parameters of the target components to the known parameters, until the cycle is terminated when a preset cycle end condition is met, and obtaining a component serial sequence after the cycle update; and adjusting the connection relationship between components in the component serial sequence in parallel according to parameter dependency to obtain a component serial parallel sequence, and using the obtained component serial parallel sequence as the arrangement result corresponding to the target process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software development, and in particular to a method, device and medium for automatically arranging software processes. Background Art

[0002] Microservices are an architectural and organizational approach to developing software, where the software consists of independent services that communicate through well-defined APIs. Microservice architecture makes applications easier to scale and faster to develop, which accelerates innovation and reduces time to market for new features. How to provide high-performance, highly reliable microservices more quickly has become a prerequisite for the rapid and stable delivery of systems. Due to the rapid development of Internet applications, PC-based Web applications, mobile apps, WeChat applets and other applications all need to be developed and updated quickly; back-end applications generally adopt the microservice model, and in microservice development, the microservice process is constructed by dragging and dropping, and the microservice code is finally generated through the microservice process, which has been widely adopted.

[0003] In the process of implementing the present invention, the applicant found that there are at least the following problems in the prior art: in the process of dragging and dropping microservice process development, the selection of input parameters for each step of the process, the mapping of output parameters to the parameters of the next step, and the process of arranging and connecting the sequence of multiple process steps are still relatively cumbersome, and the processes arranged by different developers are different and varied, which wastes development time and development costs. How to automatically and intelligently arrange process steps to solve the cumbersomeness of the process arrangement based on manual dragging in traditional technology, and the problems of different developers arranging different processes, low development efficiency and high development costs have become one of the technical problems that need to be solved in the prior art. Summary of the invention

[0004] The embodiments of the present invention provide a method, device and medium for automatically arranging software processes, which solve the problem of how to automatically and intelligently arrange process steps, so as to solve the problems of tedious process arrangement based on manual dragging in traditional technologies, and different processes arranged by different developers are different, resulting in low development efficiency and high development cost.

[0005] To achieve the above-mentioned purpose, in a first aspect, an embodiment of the present invention provides a method for automatically arranging software processes, comprising:

[0006] Obtain multiple components and their corresponding input parameters and output parameters, initial parameters and result parameters of the target process, and set the initial values ​​of the known parameters as the initial parameters;

[0007] Selecting a component that satisfies a preset component selection rule from among the multiple components that have not been added to the component serial sequence as a target component; the initial state of the component serial sequence is empty;

[0008] Append the target component serially to the end of the component serial sequence;

[0009] Adding the output parameters of the target component to the known parameters;

[0010] Determine whether a preset loop end condition is satisfied. If it is determined that the preset loop end condition is not satisfied, return to the step of selecting a component that satisfies a preset component selection rule as a target component from the components that have not been appended to the component serial sequence among the multiple components; otherwise,

[0011] If it is determined that the preset loop end condition is met, the connection relationship between the components in the component serial sequence is adjusted in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and the obtained component serial parallel sequence is used as the orchestration result corresponding to the target process;

[0012] Wherein, the preset component selection rule includes: a first rule and a second rule;

[0013] The first rule includes: components whose input parameters are already included in known parameters or components whose input parameters are empty;

[0014] The second rule includes: if the output parameter is added to the known parameters, the component that will result in the largest number of newly added result parameters in the known parameters;

[0015] The selecting a component that satisfies a preset component selection rule as a target component includes:

[0016] Selecting a component that meets the first rule from components that have not been appended to the component serial sequence among the plurality of components as a first selected component;

[0017] Determine whether the number of components included in the first selection component is one;

[0018] If it is determined that the number of components included in the first selected component is one, taking the first selected component as the target component;

[0019] If it is determined that the number of components included in the first selection component is greater than 1, a component satisfying the second rule is selected from the first selection component as a target component.

[0020] In a second aspect, an embodiment of the present invention provides a software process automatic arrangement device, comprising:

[0021] An initialization unit, used to obtain multiple components and corresponding input parameters and output parameters of each component, initial parameters and result parameters of the target process, and set the initial values ​​of known parameters as initial parameters;

[0022] A target component selection unit, used to select a component that satisfies a preset component selection rule from among the multiple components that have not been added to the component serial sequence as a target component; the initial state of the component serial sequence is empty;

[0023] A component serial sequence updating unit, used for appending the target component serially to the end of the component serial sequence;

[0024] A parameter record updating unit, used for adding the output parameters of the target component to the known parameters;

[0025] A loop end judgment unit, used to judge whether a preset loop end condition is met, and if it is judged that the preset loop end condition is not met, triggering the target component selection unit;

[0026] A parallel adjustment unit, configured to, if it is determined that the preset loop end condition is met, perform parallel adjustment on the connection relationship between the components in the component serial sequence according to the parameter dependency relationship to obtain a component serial parallel sequence, and use the obtained component serial parallel sequence as the orchestration result corresponding to the target process;

[0027] Wherein, the preset component selection rule includes: a first rule and a second rule;

[0028] The first rule includes: components whose input parameters are already included in known parameters or components whose input parameters are empty;

[0029] The second rule includes: if the output parameter is added to the known parameters, the component that will result in the largest number of newly added result parameters in the known parameters;

[0030] The target component selection unit includes:

[0031] A first selection module, configured to select a component that meets the first rule from components that have not been added to the component serial sequence among the plurality of components as a first selected component;

[0032] A first component number determination module, used to determine whether the number of components included in the first selection component is one;

[0033] A first target component determination module, configured to use the first selected component as the target component if the number of components included in the first selected component is one;

[0034] The second selection module selects a component satisfying the second rule from the first selection components as a target component if the number of components included in the first selection components is greater than 1.

[0035] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described above.

[0036] The above technical solution has the following beneficial effects: each time a component is selected, the first rule is used to select the component that can currently meet the execution condition, and the second rule is used to select the component whose output parameter is closest to the expected result parameter of the target process from the components that have met the execution condition, thereby realizing sorting by fuzzy selection, without relying on the clear logical relationship sorting between pre-determined components. Thus, the embodiment of the present invention can automatically arrange a component serial sequence that is closest to or can completely obtain the expected result parameter of the target process from multiple components, input the initial parameters to the component serial sequence, and execute the component serial sequence to obtain the result parameter of the target process. The embodiment of the present invention further adjusts the connection relationship between the components in the component serial sequence in parallel according to the parameter dependency relationship, thereby further improving the execution efficiency of the target process. The orchestration result of the target process is automatically generated, and the inconsistency problem of manual orchestration results of different developers is also avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 It is a flowchart of a method for automatically arranging software processes according to one embodiment of the present invention;

[0039] Figure 2 This is an architectural diagram of a software process automatic arrangement device according to one embodiment of the present invention;

[0040] Figure 3 It is a schematic diagram of the initial state of an arrangement embodiment based on a method for automatic arrangement of software processes according to one embodiment of the present invention;

[0041] Figure 4 It is a state diagram after arranging a component according to an arrangement embodiment based on a method for automatic arrangement of software flow according to one embodiment of the present invention;

[0042] Figure 5 It is a state diagram of a first optional component when arranging a second component in an arrangement embodiment based on a method for automatic arrangement of software flow according to one of the embodiments of the present invention;

[0043] Figure 6It is a state diagram of a second optional component when arranging a second component in an arrangement embodiment based on a method for automatic arrangement of software flow according to one of the embodiments of the present invention;

[0044] Figure 7 It is a state diagram of a third optional component when arranging a second component in an arrangement embodiment based on a method for automatic arrangement of software flow according to one embodiment of the present invention;

[0045] Figure 8 It is a state diagram of a first optional component when arranging a third component in an arrangement embodiment based on a method for automatic arrangement of software flow according to one of the embodiments of the present invention;

[0046] Fig. 9 It is a state diagram of a second optional component when arranging a third component in an arrangement embodiment based on a method for automatic arrangement of software flow according to one of the embodiments of the present invention;

[0047] Fig.10 This is a state diagram after arranging the fourth component of an arrangement embodiment based on a method for automatic arrangement of software flow according to one of the embodiments of the present invention;

[0048] Fig.11 This is a schematic diagram of an orchestration result of an orchestration embodiment based on a method for automatically arranging a software process according to one of the embodiments of the present invention;

[0049] Fig.12 It is a schematic diagram of an arrangement embodiment of an automatic arrangement method for software flow according to one embodiment of the present invention after parallel processing;

[0050] Fig.13 It is a schematic diagram of an arrangement embodiment based on a method for automatic arrangement of software flow according to one embodiment of the present invention after being parallelized again. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] First, as Figure 1 As shown, an embodiment of the present invention provides a method for automatically arranging software processes, including:

[0053] Step S10, obtaining multiple components and corresponding input parameters and output parameters of each component, initial parameters and result parameters of the target process, and setting the initial values ​​of the known parameters as the initial parameters;

[0054] Step S11, selecting a component that satisfies a preset component selection rule from among the multiple components that have not been added to the component serial sequence as a target component; the initial state of the component serial sequence is empty;

[0055] Step S12, appending the target component serially to the end of the component serial sequence;

[0056] Step S13, adding the output parameters of the target component to the known parameters;

[0057] Step S14, judging whether the preset loop end condition is satisfied. If it is judged that the preset loop end condition is not satisfied, returning to the step of selecting a component satisfying the preset component selection rule as the target component from the components that have not been appended to the component serial sequence among the multiple components; otherwise,

[0058] Step S15, if it is determined that the preset loop end condition is met, the connection relationship between the components in the component serial sequence is adjusted in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and the obtained component serial parallel sequence is used as the orchestration result corresponding to the target process;

[0059] Wherein, the preset component selection rule includes: a first rule and a second rule;

[0060] The first rule includes: components whose input parameters are already included in known parameters or components whose input parameters are empty;

[0061] The second rule includes: if the output parameter is added to the known parameters, the component that will result in the largest number of newly added result parameters in the known parameters;

[0062] The selecting a component that satisfies a preset component selection rule as a target component includes:

[0063] Selecting a component that meets the first rule from components that have not been appended to the component serial sequence among the plurality of components as a first selected component;

[0064] Determine whether the number of components included in the first selection component is one;

[0065] If it is determined that the number of components included in the first selected component is one, taking the first selected component as the target component;

[0066] If it is determined that the number of components included in the first selection component is greater than 1, a component satisfying the second rule is selected from the first selection component as a target component.

[0067] In some embodiments, the components include but are not limited to microservices, subroutines, modules, HTTP service interfaces, and other functional components that can provide input parameters and output parameters for external interface functions. The input parameters and output parameters of multiple components and middleware that may be used in the target process (such as a transaction process), as well as the initial parameters and result parameters of the target process can be configured by the technician. The initial parameters of the target process are the parameters that the target process needs to provide externally when the target process is regarded as a black box as a whole, and the result parameters are the parameters that the target process feeds back to the outside. The input parameters of a component may be empty or may include one or more parameters, and the output parameters of a component include one or more parameters. All parameters included in the input parameters, output parameters, initial parameters and result parameters in the embodiments of the present invention are uniquely distinguished by the English names of the parameters. The English name of the same parameter represents a unique business meaning, and parameters with different English names have different business meanings. The initial parameters of the target process include one or more parameters, and the result parameters of the target process include one or more parameters. All parameters are distinguished from each other by parameter names. Each time a target component is selected from multiple components and the target component is serially appended to the component serial sequence, the output parameters of the target component can be considered to be known, and the output parameters of the target component are added to the known parameters. As the known parameters contain more parameters, the known parameters can meet the input parameter requirements of more components, so that new components that can meet their required input parameters can be found from the remaining components.The loop termination conditions include: all result parameters are included in the known parameters, or all components are arranged into the component serial sequence, or the input parameters of the remaining components not arranged into the component serial sequence are not in the known parameters; for example, the following judgment can be made to determine whether all result parameters are included in the known parameters. If it is determined that all result parameters are included in the known parameters, it means that if the currently arranged component serial sequence is executed, all result parameters can be obtained, and the loop of arranging (appending) the component serial sequence can be ended; if it is determined that all result parameters are not yet included in the known parameters, it continues to determine whether all components are arranged into the component serial sequence and whether the input parameters of the remaining components not arranged into the component serial sequence are not in the known parameters. If it is determined that all components are arranged into the component serial sequence or the input parameters of the remaining components not arranged into the component serial sequence are not in the known parameters, then it is said that It is clear that the multiple components currently provided cannot successfully arrange the component serial sequence that can obtain all the result parameters, but the currently arranged component serial sequence is the closest to the target process, which can also be used to generate the arrangement result; the technician can use the unsuccessfully arranged target process as a subsequence or a whole component, use the initial parameters of the target process as the input parameters of the subsequence or the whole component, and use the known parameters obtained by arrangement as the output parameters of the subsequence or the whole component, and then combine the newly added additional components to continue to use the embodiment of the present invention to complete the arrangement result that can obtain all the result parameters; if it is determined that there are still components that have not been arranged into the component serial sequence and there are still components whose input parameters are all in the known parameters among the remaining components that have not been arranged into the component serial sequence, then continue to select components that meet the preset component selection rules from the components that have not been arranged (appended) into the component serial sequence in a cycle to continue to arrange (append). When selecting the next component, the embodiment of the present invention does not rely solely on the output parameters of the previous component, but relies on the output parameters and initial parameters of all components that have been in the component serial sequence before, so that the target component can be selected in a fuzzy manner in a larger range. The embodiment of the present invention relies on preset component selection rules to implement sorting in a fuzzy selection manner. Before sorting the components, there is no need to clearly know the specific logical functions of each component, and there is no need to pre-establish the functional logic connection relationship between the components. Through the first rule, the components whose input parameters are all included in the known parameters or whose input parameters are empty are used to select components that can currently meet the execution conditions, wherein the components whose input parameters are empty are components that do not need to input any parameters during execution. Through the second rule, if the output parameters are added to the known parameters, the component with the largest number of parameters in the newly added result parameters in the known parameters is selected to select the component whose output parameters are closest to the result parameters expected by the target process from the components that have met the execution conditions.For example, if there is only one component that satisfies the first rule in the current cycle, then the only component is used as the target component; if there are two components, Za and Zb, that satisfy the first rule in the current cycle, the specific parameters included in the input parameters of Za and Zb may be the same, partially the same, or completely different, but the input parameters of Za and Zb are all in the current known parameters; the output parameters of Za include parameters in 3 result parameters, but the parameters in two of the result parameters are already in the known parameters, and only the parameter in one result parameter is not in the known parameters; the output parameters of Zb include parameters in 2 result parameters, and neither of them is in the known parameters. Based on the second rule, Zb is selected as the target component. Thus, the embodiment of the present invention can automatically arrange the component serial sequence that is closest to or can completely obtain the result parameters expected by the target process from multiple components with high efficiency, input the initial parameters to the component serial sequence, and execute the component serial sequence to obtain the result parameters of the target process. In order to improve the execution efficiency of the target process, the embodiment of the present invention further adjusts the connection relationship between components in the component serial sequence in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and uses the obtained component serial parallel sequence as the orchestration result corresponding to the target process.

[0068] The embodiments of the present invention have the following technical effects: the embodiments of the present invention can automatically and efficiently arrange a component serial sequence from multiple components that is closest to or can completely obtain the expected result parameters of the target process, input initial parameters into the component serial sequence, and execute the component serial sequence to obtain the result parameters of the target process. The embodiments of the present invention further adjust the connection relationship between components in the component serial sequence in parallel based on the parameter dependency relationship, thereby further improving the execution efficiency of the target process.

[0069] Furthermore, the preset component selection rule also includes: a third rule;

[0070] The third rule includes: the component whose output parameters account for the highest proportion of unknown parameters;

[0071] Selecting a component satisfying the second rule from the first selected components as a target component includes:

[0072] Selecting a component that meets the second rule from the first selected components as a second selected component;

[0073] Determine whether the number of components included in the second selection component is one;

[0074] If it is determined that the number of components included in the second selected component is one, taking the second selected component as the target component;

[0075] If it is determined that the number of components included in the second selected component is greater than 1, selecting a component satisfying the third rule from the second selected component as a target component;

[0076] Among them, the initial value of the unknown parameter is set to the union of the result parameter and the input parameters of all components, and the parameter set is obtained after deleting the initial parameter from the obtained union; after the output parameter of the target component is added to the known parameters, the parameters that are the same as the output parameters of the target component are deleted from the unknown parameters.

[0077] In some embodiments, in step S10, the initial value of the unknown parameter can be set to the union of the result parameter and the input parameters of all components, and in the process of the union, only one copy of the repeated parameter (name) is retained in the unknown parameter, and the parameters in the initial parameter are deleted from the obtained union; the reason for deleting the initial parameter is that the target process may include some initial parameters in the result parameter in order to facilitate the use of the returned result parameter, so that when the result parameter is used, it is convenient to determine the correspondence between the result parameter and the initial parameter, and ensure that the unknown parameter does not contain any known parameters, so that the most preferred component can be selected more accurately and efficiently. In step S13, after adding the output parameter of the target component to the known parameter, the parameters that are the same as the output parameter of the target component can be deleted from the unknown parameter; thereby, the unknown parameter only includes the remaining unknown input parameters of the components that have not been appended to the component serial sequence. When selecting components that meet the second rule from the first selection components as the second selection components, it may happen that if the output parameters of each component in the first selection components are added to the known parameters, the number of newly added result parameters in the known parameters is 0. In this case, they are all the maximum, just all 0. At this time, all components in the first selection components meet the second rule, that is, all components in the first selection components are used as second selection components; it may also happen that if the output parameters of only one component in the first selection components are added to the known parameters, the number of newly added result parameters in the known parameters is the largest. In this case, only this component in the first selection components meets the second rule, that is, this component in the first selection components can be used as the only choice of the second selection component; it may also happen that if the output parameters of some of the multiple components in the first selection components are added to the known parameters, the number of newly added result parameters in the known parameters is the same and the largest. In this case, this part of the multiple components in the first selection components meets the second rule, that is, this part of the multiple components in the first selection components can be used as the second selection components; when the number of components of the second selection component is not one, the third rule is used to select within the range of the second selection component.For example, two components Za and Zb are obtained in the second selection component; the output parameters of Za include the parameters xa1, xa2 and xa3 among the three result parameters, and three other parameters ya1, ya2 and ya3; the output parameters of Zb include the parameters xb1 and xb2 among the two result parameters, and two other parameters yb1 and yb2; it is assumed that the known parameters at this time already include but are not limited to xa3, but do not include xa1, xa2, ya1, ya2, ya3, xb1, xb2, yb1 and yb2; since the second selection component is obtained by selection according to the second rule, that is, since Za has the largest number of result parameters in the output parameters that are not in the known parameters, including xa1 and xa2, relative to the other components in the first selection component, Zb has the largest number of result parameters in the output parameters that are not in the known parameters, including There are also two xb1 and xb2, so Za and Zb are selected as the second selection components; at this time, the number of components of the second selection component is not unique; if the parameters in the result parameters are not in the known parameters, they must be in the unknown parameters, so at this time the unknown parameters include: xa1, xa2, xb1 and xb2. In order to illustrate the embodiment of the present invention, it is assumed that yb1 is an input parameter required by other components, and ya1, ya2, ya3, and yb2 are not input parameters required by other components, then the unknown parameters also include yb1. Based on the third rule, Za has two parameters xa1 and xa2 in the unknown parameters, and Zb has three parameters xb1, xb2 and yb1 in the unknown parameters, so the component Zb that meets the third rule is selected as the target component; wherein, the parameters in the result parameters included in the output parameters of Za and Zb may have the same or different parameters (parameter names). There may be more than one second selection component that meets both the first rule and the second rule. The output parameters of each component that satisfies both the first rule and the second rule may include different parts of the result parameters, or may include other parameters other than the result parameters. Other parameters may be used as input parameters of other components. Therefore, based on the second selection of components, components are selected according to the third rule, which can directly point the purpose of selecting components to the goal of providing more available known parameters for subsequent selection of components, thereby improving the success rate and efficiency of process orchestration. From the above examples of Za and Zb, it can be seen that although Za outputs more parameters that are not in the known parameters, such as five parameters xa1, xa2, ya1, ya2, and ya3, and Zb only outputs four parameters, xb1, xb2, yb1, and yb2, only two parameters in Za are in the unknown parameters, while three parameters in Zb are in the unknown parameters, so the preferred Zb has a greater chance of expanding the optional range of subsequent selection components. For each rule of the preset component selection rule, the component that fails to be selected in each cycle may become the optimal choice in the next cycle when the rule is matched again in the next cycle.The first and second rules control the general direction of process orchestration, that is, to obtain the result parameters as the goal, and each time select the component closest to the result parameters to increase the speed of approaching the result parameters, improve the orchestration efficiency, and obtain the result parameters with the shortest component path. The third rule can expand the range of choices when selecting components later, so that the most suitable components will not be missed when executing the first and second rules in the subsequent selection steps. The first, second and third rules complement each other, making the orchestration efficient and achieving the best results.

[0078] Furthermore, the preset component selection rule also includes: a fourth rule;

[0079] The fourth rule includes: the component with the smallest time complexity;

[0080] Selecting a component satisfying the third rule from the second selected components as a target component includes:

[0081] Selecting a component that meets the third rule from the second selected components as a third selected component;

[0082] Determining whether the number of components included in the third selected component is one;

[0083] If it is determined that the number of components included in the third selected component is one, taking the third selected component as the target component;

[0084] If it is determined that the number of components included in the third selected component is greater than 1, a component satisfying the fourth rule is selected from the third selected component as a target component.

[0085] In some embodiments, the number of components in the third selection component may not be 1. At this time, you can continue to filter according to the fourth rule of the component with the smallest time complexity. The components obtained in the third selection component are all preferred components. When they are not unique, you can continue to select the component with the smallest time complexity, that is, the highest execution efficiency, according to the fourth rule, so as to ensure that the overall execution efficiency of the orchestrated process is the highest.

[0086] Furthermore, the preset component selection rule also includes: a fifth rule; the fifth rule includes: a component with the smallest component number;

[0087] Selecting a component satisfying the fourth rule from the third selected components as a target component includes:

[0088] Selecting a component that meets the fourth rule from the third selected components as a fourth selected component;

[0089] Determining whether the number of components included in the fourth selected component is one;

[0090] If it is determined that the number of components included in the fourth selected component is one, taking the fourth selected component as the target component;

[0091] If it is determined that the number of components included in the fourth selected component is greater than 1, then selecting a component satisfying the fifth rule from the fourth selected component as a target component;

[0092] Here, a sequential component number is set in advance for each component.

[0093] In some embodiments, the components in the fourth selection component may not be unique. In this case, the fifth rule of the component with the smallest component number can continue to be screened, so that each time a component is selected, a unique component can be selected for arrangement, thereby improving the arrangement efficiency. If it is not ensured that the target component selected in each cycle is unique, then each time a cycle is completed, the types of component serial sequences will increase exponentially according to the number of currently available target components. The component serial sequences that need to be maintained will eventually generate new branches and grow like a tree structure as the number of cycles increases, which will significantly increase the complexity of the arrangement and reduce the arrangement efficiency. Moreover, since the preset component selection rule selects the best one each time, the unique component serial sequence obtained according to the embodiment of the present invention is itself the best, so there is no need to arrange in a more complex way.

[0094] Furthermore, the preset component selection rule also includes: a fifth rule;

[0095] The fifth rule includes: the component with the smallest component number;

[0096] Selecting a component satisfying the third rule from the second selected components as a target component includes:

[0097] Selecting a component that meets the third rule from the second selected components as a third selected component;

[0098] Determining whether the number of components included in the third selected component is one;

[0099] If it is determined that the number of components included in the third selected component is one, taking the third selected component as the target component;

[0100] If it is determined that the number of components included in the third selected component is greater than 1, then selecting a component satisfying the fifth rule from the third selected component as a target component;

[0101] Here, a sequential component number is set in advance for each component.

[0102] In some embodiments, the components in the third selection component may not be unique. In this case, the fifth rule of the component with the smallest component number can continue to be screened, so that each time a component is selected, a unique component can be selected for arrangement, thereby improving the arrangement efficiency. If it is not ensured that the target component selected in each cycle is unique, then each time a cycle is completed, the types of component serial sequences will increase exponentially according to the number of currently available target components. The component serial sequences that need to be maintained will eventually generate new branches and grow like a tree structure as the number of cycles increases, which will significantly increase the complexity of the arrangement and reduce the arrangement efficiency. Moreover, since the preset component selection rule selects the best one each time, the unique component serial sequence obtained according to the embodiment of the present invention is itself the best, so there is no need to arrange in a more complex way.

[0103] Furthermore, the connection relationship between components in the component serial sequence is adjusted in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and the obtained component serial parallel sequence is used as the orchestration result corresponding to the target process, including:

[0104] For a component in a component serial sequence, if the input parameter of the component is not included in the newly added known parameters brought by the predecessor component of the component, the component and the predecessor component of the component are adjusted to a parallel execution relationship, wherein the newly added known parameters brought by the predecessor component represent the increased parameters in the known parameters caused by adding the output parameters of the predecessor component to the known parameters.

[0105] In some embodiments, when constructing a component serial sequence, each time a component is selected, a component whose input parameters are among the known parameters is selected, rather than a component whose output parameters directly depend on the last component in the component serial sequence. As a result, there may be no direct parameter dependency relationship between the component at the current position and its predecessor component. In this case, the component at the current position can be adjusted to be connected in parallel with its predecessor component, thereby adjusting the components that can be executed in parallel with each other in the component serial sequence to be in a parallel relationship, thereby improving execution efficiency.

[0106] Furthermore, the connection relationship between components in the component serial sequence is adjusted in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and the obtained component serial parallel sequence is used as the orchestration result corresponding to the target process, including:

[0107] If the input parameters of a subsequence in a parallel sequence of a component string are not included in the newly added known parameters brought by the predecessor component or predecessor subsequence of the subsequence, the subsequence is adjusted to be in a parallel execution relationship with the predecessor component or predecessor subsequence of the subsequence; the subsequence is composed of a plurality of serially connected and / or parallel components; the newly added known parameters brought by the predecessor component or predecessor subsequence represent the added parameters in the known parameters caused by adding the output parameters of the predecessor component or predecessor subsequence to the known parameters.

[0108] In some embodiments, when constructing a component serial sequence, each time a component is selected, a component whose input parameter is among the known parameters is selected, rather than a component that directly depends on the output parameter of the last component in the component serial sequence, so that each component in the subsequence composed of the current position and the subsequent multiple components may not depend on the previous component of the subsequence or the component in the previous subsequence. In this case, the subsequence corresponding to the current position can be adjusted to be connected in parallel with its previous component or previous subsequence to improve execution efficiency. The meaning of "not dependent" can be understood as the input parameter of component A does not need to be obtained from the output parameter of component B, that is, component A does not depend on component B.

[0109] Furthermore, the method further comprises:

[0110] Determining whether the known parameters include all of the result parameters;

[0111] If it is determined that the known parameters include all of the result parameters, the orchestration result corresponding to the target process is marked as successful, otherwise it is marked as failed.

[0112] In some embodiments, after the orchestration obtains the orchestration result corresponding to the target process, the known parameters record all the parameters that can be obtained after the target process is executed. If the known parameters include all the result parameters, it means that the expected result parameters can be obtained after the target process is executed, then the orchestration is successful. Otherwise, it means that the orchestration has failed. However, the failed orchestration result is still the orchestration result of the target process that is closest to the result parameters that can be achieved among the currently given multiple components, so it still has certain use value. The technician can continue to manually supplement other components for orchestration based on the difference between the failed orchestration result and the expected result parameters, or can use the current failed orchestration result as a component, continue to apply the embodiments of the present invention, add other components, and continue to orchestrate until the expected result parameters are obtained.

[0113] Second, as Figure 2 As shown, an embodiment of the present invention provides a software process automatic arrangement device, comprising:

[0114] The initialization unit 200 is used to obtain multiple components and the input parameters and output parameters corresponding to each component, the initial parameters and result parameters of the target process, and set the initial values ​​of the known parameters as the initial parameters;

[0115] A target component selection unit 201 is used to select a component that satisfies a preset component selection rule from among the multiple components that have not been added to the component serial sequence as a target component; the initial state of the component serial sequence is empty;

[0116] A component serial sequence updating unit 202, configured to append the target component serial to the end of the component serial sequence;

[0117] A parameter record updating unit 203, used for adding the output parameters of the target component to the known parameters;

[0118] A loop end judgment unit 204 is used to judge whether a preset loop end condition is met, and if it is judged that the preset loop end condition is not met, the target component selection unit is triggered;

[0119] A parallel adjustment unit 205 is used to adjust the connection relationship between the components in the component serial sequence in parallel according to the parameter dependency relationship if it is determined that the preset loop end condition is met, so as to obtain a component serial parallel sequence, and use the obtained component serial parallel sequence as the orchestration result corresponding to the target process;

[0120] Wherein, the preset component selection rule includes: a first rule and a second rule;

[0121] The first rule includes: components whose input parameters are already included in known parameters or components whose input parameters are empty;

[0122] The second rule includes: if the output parameter is added to the known parameters, the component that will result in the largest number of newly added result parameters in the known parameters;

[0123] The target component selection unit 201 includes:

[0124] A first selection module, configured to select a component that meets the first rule from components that have not been added to the component serial sequence among the plurality of components as a first selected component;

[0125] A first component number determination module, used to determine whether the number of components included in the first selection component is one;

[0126] A first target component determination module, configured to use the first selected component as the target component if the number of components included in the first selected component is one;

[0127] The second selection module is used to select a component that meets the second rule from the first selection components as a target component if the number of components included in the first selection components is greater than 1.

[0128] Furthermore, the preset component selection rule also includes: a third rule;

[0129] The third rule includes: the component whose output parameters account for the highest proportion of unknown parameters;

[0130] The second selection module comprises:

[0131] A second selection submodule, configured to select a component that meets the second rule from the first selection components as a second selection component;

[0132] A second component number determination module, used to determine whether the number of components included in the second selected component is one;

[0133] A second target component determination module, configured to use the second selected component as the target component if it is determined that the number of components included in the second selected component is one;

[0134] A third selection module is configured to select a component satisfying the third rule from the second selected components as a target component if it is determined that the number of components included in the second selected components is greater than 1;

[0135] Among them, the initial value of the unknown parameter is set to the union of the result parameter and the input parameters of all components, and the parameter set is obtained after deleting the initial parameter from the obtained union; the parameter record update unit 203 also includes: deleting the parameters that are the same as the output parameters of the target component from the unknown parameters.

[0136] Furthermore, the preset component selection rule also includes: a fourth rule;

[0137] The fourth rule includes: the component with the smallest time complexity;

[0138] The third selection module comprises:

[0139] The thirty-first selection submodule is used to select a component that meets the third rule from the second selection components as a third selection component;

[0140] A thirty-first component number determination module, used to determine whether the number of components included in the third selection component is one;

[0141] A thirty-first target component determination module, configured to use the third selected component as the target component if it is determined that the number of components included in the third selected component is one;

[0142] The fourth selection module is used to select a component that meets the fourth rule as a target component from the third selection component if it is determined that the number of components included in the third selection component is greater than 1.

[0143] Furthermore, the preset component selection rule also includes: a fifth rule; the fifth rule includes: a component with the smallest component number;

[0144] Fourth choice module, including:

[0145] A fourth selection submodule, used to select a component that meets the fourth rule from the third selection components as a fourth selection component;

[0146] A fourth component number determination module, used to determine whether the number of components included in the fourth selected component is one;

[0147] a fourth target component determination module, configured to use the fourth selected component as the target component if it is determined that the number of components included in the fourth selected component is one;

[0148] a fifth selection module, configured to select a component satisfying the fifth rule from the fourth selected component as a target component if it is determined that the number of components included in the fourth selected component is greater than 1;

[0149] Here, a sequential component number is set in advance for each component.

[0150] Furthermore, the preset component selection rule also includes: a fifth rule;

[0151] The fifth rule includes: the component with the smallest component number;

[0152] The third selection module comprises:

[0153] A thirty-second selection submodule, configured to select a component that meets the third rule from the second selection components as a third selection component;

[0154] A thirty-second component number determination module, used to determine whether the number of components included in the third selection component is one;

[0155] A thirty-second target component determination module, configured to use the third selected component as the target component if it is determined that the number of components included in the third selected component is one;

[0156] a sixth selection module, configured to select a component satisfying the fifth rule from the third selection component as a target component if it is determined that the number of components included in the third selection component is greater than 1;

[0157] Here, a sequential component number is set in advance for each component.

[0158] Furthermore, the parallel adjustment unit 205 is configured as follows:

[0159] For a component in a component serial sequence, if the input parameter of the component is not included in the newly added known parameters brought by the predecessor component of the component, the component and the predecessor component of the component are adjusted to a parallel execution relationship, wherein the newly added known parameters brought by the predecessor component represent the increased parameters in the known parameters caused by adding the output parameters of the predecessor component to the known parameters.

[0160] Furthermore, the parallel adjustment unit 205 is configured as follows:

[0161] If the input parameters of a subsequence in a parallel sequence of a component string are not included in the newly added known parameters brought by the predecessor component or predecessor subsequence of the subsequence, the subsequence is adjusted to be in a parallel execution relationship with the predecessor component or predecessor subsequence of the subsequence; the subsequence is composed of a plurality of serially connected and / or parallel components; the newly added known parameters brought by the predecessor component or predecessor subsequence represent the added parameters in the known parameters caused by adding the output parameters of the predecessor component or predecessor subsequence to the known parameters.

[0162] Furthermore, the device also includes:

[0163] A result determination unit, used for determining whether the known parameters include all the result parameters;

[0164] The result marking unit is used to mark the orchestration result corresponding to the target process as successful if it is determined that the known parameters include all the result parameters, otherwise mark it as failed.

[0165] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described above.

[0166] As for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0167] The above technical solution of the embodiment of the present invention is described in detail below in conjunction with specific application examples. For technical details not introduced during the implementation process, please refer to the relevant description in the previous text.

[0168] The embodiment of the present invention relates to the field of software development, which may specifically include software development fields such as finance, management, and / or business, and provides a method, device, and medium for automatic arrangement of software processes, which is also a method, device, and medium for intelligent arrangement of microservice processes. According to the input parameters and output parameters of the microservice transaction process, and the input parameters and output parameters of the components of each step of the construction process, the arrangement and order of the steps (components) of the specific process of serial arrangement or parallel arrangement are automatically calculated, so as to automatically construct a microservice process or a fragment of the microservice process; that is, a method and system for automatic arrangement of microservice transaction processes. The embodiment of the present invention constructs the components of each step of the microservice, and according to the input and output parameters of the components, automatically connects the steps composed of the components of the process in a specific order, and automatically constructs a microservice process or a fragment of the microservice process. How to build such a system, first of all, it is necessary to unify the parameters, which involves the input and output parameters of the microservice process and the input and output parameters of its constituent steps (components), and it is necessary to have a unified parameter identification rule. How to identify the consistency of the meaning of the parameters, the embodiment of the present invention identifies the parameters by the English name of the parameters, and if the names of the parameters are the same, they are considered to be the same parameter. The first step of input parameters can be called "start", and the last step can be called "end"; the input parameters of the microservice are given in the "start" step, and the output parameters of the microservice are also the input of the "end" step. According to the business logic, one or more specific components that need to be called in this business process need to be selected (it can be a specific business encapsulation and technical encapsulation to form a specific input and output parameter processing function module, or it can be another microservice); after selecting these logically required components, through the "automatic orchestration" function, the system automatically orchestrates the component process according to the input and output parameters of the component, and constructs the process from "start->step 1->step 2->step 3->...->step n->end", where step 1, step 2, step 3,...step n. are manually added by developers according to the business functions of the business and business components, and the parameter input and output of step 1, step 2, step 3,...step n, as well as the order of steps and process orchestration are completed by the "intelligent orchestration" function. By calling a step (component) with known parameters, new parameters can be obtained. Then the (new) parameters returned by the call are known again, which is equivalent to obtaining more known parameters. Then, by calling a specific step (component) with known parameters, more known parameters can be obtained. When the known parameters match (or contain) the parameters of the returned result (that is, the result parameters of the microservice expected by the orchestration), the orchestration ends.

[0169] A microservice process may consist of many steps (components). Some steps may not be "intelligently orchestrated" through input and output parameters. The process sequence must be determined according to business rules for orchestration. The process fragments that can be "intelligently orchestrated" through input and output parameters can be extracted and completed by the "intelligent orchestration" function. A complete microservice process may consist of multiple process branches, or even nested branches; however, the process fragments of the local process in the branch that meet the requirements of "intelligent orchestration" through input and output parameters can be extracted and completed by the "intelligent orchestration" function. A complete microservice process may have loops, or even nested loops; some steps, but the process fragments of the local process in the loop that meet the requirements of "intelligent orchestration" through input and output parameters can be extracted and completed by the "intelligent orchestration" function.

[0170] The following are the algorithmic rules for implementing the "intelligent orchestration" of microservice processes:

[0171] Rule 1: The known parameters at the end of the current step (component) of the transaction process (target process) include: the transaction process input parameters (initial parameters) and the output parameters added by this step (component) and several steps (components) before this step (component). The current known parameters meet the return parameters of the transaction process (that is, the known parameters contain all result parameters), which means that the transaction process is successfully orchestrated. Rule 2: When the known parameters cannot find any candidate subsequent steps that meet the conditions or there are no candidate subsequent steps to choose from (that is, all components are orchestrated into the serial process orchestration results, and / or there are no components whose input parameters are in the known parameters), and the known parameters still cannot meet the return parameters of the transaction process, the transaction process orchestration fails. Rule 3: For steps that are not added to the process, if their input parameters (input parameters) are within the known parameter set, this step can be used as the next step of the current step. If there are multiple steps, they can be arranged and combined. Each arrangement will gradually select the next step through the rules until the process orchestration succeeds or fails. Rule 4: In order to reduce the time of deducing the permutations and combinations, when there are multiple steps that can be used as the next step, the step with the highest proportion of the number of the latest parameters output in the transaction process output parameters (result parameters) is preferred for the next step deduction. If the proportions in the process output parameters are the same, the step with the largest number of the latest parameters output is the best choice for the next step deduction. If the above are the same, the step with the smallest sequence number is the preferred choice for the next step deduction. Rule 5: According to the above rules, when there is no permutation and combination of process orchestration, the orchestration of the transaction process is finally completed, that is, all permutations and combinations fail, the one with the highest proportion of the known parameters in the transaction process output parameters is returned as the "intelligent orchestration" result (and the process orchestration failure is marked). If multiple orchestrations have the same proportion, the first one is given as the "intelligent orchestration" result according to the order of deduction priority (and the process orchestration failure is marked). Rule 6: For the process or process fragment of "intelligent orchestration", if the newly added known parameters output by the current step are not the input parameters of the subsequent steps, the two steps are modified to parallel mode. Rule 7: Several consecutive steps in a serial process can also be regarded as a logical step, and several steps in parallel processing can be regarded as a logical step. The input parameters of a logical step are the union of the input parameters of each step, and the output parameters are also the union of the output parameters of each step. Rule 8: "Logical steps" can be regarded as ordinary "steps" of the process. Rules 1 to 7 are applicable to ordinary steps, and they are also applicable to "logical steps".

[0172] The following example "Querying the Assets and Liabilities of the User's Institution" introduces the above arrangement rules and algorithms, and how to implement "intelligent arrangement". Figure 3As shown in the figure, the input and output parameters of the microservice transaction interface, as well as the "start" and "end" steps, are given, and multiple steps (components) that may be used are given. The multiple steps (components) here are manually selected by the developer. The initial parameters (input parameters) and result parameters (output parameters) of the target process are given in the parameter table corresponding to the start step. The table corresponding to each specific step gives the input parameters (input parameters) and output parameters (output parameters) of the "component" that calls the specific step, and the steps of component formation are numbered.

[0173] "Start" and "End" are defined as 0 and 9999 respectively; other steps are incremented by 0 and gradually added by 1 to form non-repeated step numbers in the process (here it is assumed that the number of steps will not exceed 9999).

[0174] Through "Rule 1" and "Rule 3", the subsequent steps (components) to be selected are queried according to the current known parameters of the transaction process. The initial known parameters include the initial parameters corresponding to the start step. In this example, the initial known parameters include the user code (userId). By searching the parameter table corresponding to the multiple steps (components) provided in this embodiment, it can be found that the input parameter of the user information query is the user code (userId). The input parameters of the user information query are all in the known parameters. The next available step (component) is the user information query. Therefore, Figure 4 As shown, the user information query of step 4 is added to the start number, and the output parameters of the user information query of step 4 are added to the known parameters. At this time, the known parameters include user ID (userId), institution (deptId, institution code), user name (userName), and contact number (userTell). By appending the "user information query" step to the component serial sequence, more known parameters are obtained; continue to query the subsequent steps (components) to be selected through "Rule 1" and "Rule 3" with the current known parameters of the transaction process. Figure 5 , Figure 6 ,and Figure 7 There are three situations: Figure 5 The next step (component) selected is the institution information query. Figure 6 The next step (component) selected is the total assets query of the institution. Figure 7 The next step (component) selected is the total debt query of the institution. According to "Rule 4", the newly added known parameters in the three cases have the same proportion in the result parameters returned by the process. Figure 5 The output parameters of the steps in bring the most new parameters to the known parameters, so Figure 5The mechanism information query step is taken as the preferred choice, and the subsequent deduction of this situation is given priority. The step mechanism information query is added to the component serial sequence, and the output parameters of the step mechanism information query are added to the known parameters. According to "Rule 1" and "Rule 3", the subsequent arrangement still exists as follows Figure 8 and Fig. 9 In both cases, according to "Rule 4", the newly added known parameters in the two cases account for the same proportion in the result parameters returned by the process, and the newly added known parameters are also the same. According to the step number, select Figure 8 The step agency total asset query is performed, and the subsequent deduction of this situation is performed. The step agency total asset query is added to the component serial sequence, and the output parameters of the step agency total asset query are added to the known parameters. According to "Rule 1" and "Rule 3", the subsequent arrangement only exists as follows Fig.10 In one case, according to "Rule 1", the current known parameters meet the return parameters of the transaction process, that is, the transaction process is successfully arranged. That is, the current process arrangement is the final "intelligent arrangement" result. Of course, other permutations and combinations can also complete the transaction process arrangement. The only difference is the order of the process steps, but the result is the same. For example, Fig.11 , giving the current "intelligent orchestration" result. Through the algorithmic rules of "intelligent orchestration", the intelligent orchestration of the transaction process of the above transaction was quickly completed. For computers, it is relatively simple to deduce the above process arrangement based on the above rules.

[0175] For "Rule 5", the rule described is to provide a process arrangement that is closest to the process result when the process arrangement fails. I will not give a separate example here. As long as the "Total Institution Liabilities Query" step is deleted in the above example and "intelligent arrangement" is performed, the final process arrangement of the process cannot be completed. Figure 8 The process fragments (component serial sequence) in will be the optimal process arrangement result. This intelligently arranged process is executed in the order of steps in the program. How to better solve the execution efficiency of the process, minimize the running transaction time, and save transaction execution time has become a further problem that needs to be solved.

[0176] Due to the rapid development of current computer technology, multi-core CPUs have been widely used. In order to avoid independent occupation of CPU cores by threads, for example, the GOLANG language supports coroutines. The latest OracleJDK23 of the JAVA language has launched virtual threads. In this way, when using the CPU, "coroutines" or "virtual threads" do not occupy the CPU independently, and support idle CPUs to be scheduled to process other "coroutines" or "virtual threads". This makes the maximum number of "coroutines" or "virtual threads" relatively unrestricted by the number of CPU cores, effectively improving the execution efficiency of the application. Early software development was limited by the physical CPU and could not use a large number of parallel process processing; with the support of "coroutines" or "virtual threads", parallel processing is no longer restricted by the number of physical CPU cores, and the following process parallel optimization can be performed. Such as Fig.11 As shown in the figure, according to "Rule 6", the parallel optimization rules of the transaction process are given. The output parameters of step 1 are the new parameters brought by the known parameters, not the input parameters of step 2, such as Fig.12 As shown, the serial processing model can be optimized into a parallel processing model. According to the rule given in "Rule 7", the parallel of step 1 and step 2 is regarded as "logical step 1". Similarly, according to "Rule 6", the output parameter of "logical step 1" is the additional parameter brought by the known parameters, not the input parameter of step 3, such as Fig.13 As shown in Figure 1, the serial processing model of "Logical Step 1" and Step 3 is optimized to a parallel processing model. Fig.13 The optimized process shortens the original execution time of step 1, step 2, and step 3 from the sum of the three steps to the maximum transaction execution time of the three steps, thereby improving the execution efficiency of the system.

[0177] The embodiment of the present invention has the following technical effects: According to the algorithm rules and actual examples given in the embodiment of the present invention, it is obvious that "intelligent orchestration" improves the speed and efficiency of microservice process orchestration. Low-code process programming on the market currently generally uses a manual drag-and-drop method to orchestrate processes, which is relatively arbitrary; the embodiment of the present invention solves the program automation of process orchestration through an objective algorithm. Generally, the results of traditional manual process orchestration are subjective, and the results of process orchestration by different developers may be different. However, in the embodiment of the present invention, for multiple microservices and candidate steps, the final process orchestration is deterministic and accurate, which reduces the time for manual process orchestration and improves the accuracy and quality of microservice processes. The embodiment of the present invention also performs parallel processing. Since traditional processes are generally linear serial processing, the reason is that the CPU core limits the number of threads that can be run, and large-scale use of parallelism has defects. With the support of virtual threads by GOLANG coroutines and JDK23 (OpenJdk, OracleJdk) and above. Parallel processing is no longer limited by the number of CPU cores, and parallel processing will effectively improve the operating efficiency of the system. The embodiment of the present invention clearly provides an optimization algorithm for parallel processing, which greatly shortens the transaction time for the operation of the process, reduces the transaction response time of the service, improves the concurrency of the system, and improves the performance of the system operation. In the process of visual process development, the specific steps are generally composed of some technical components and business components (the sub-process call is encapsulated into a specific component, and the call to the microservice is also encapsulated into a specific component). A specific system component set is specific, so that components can be automatically selected from the system component set according to the input parameters and output parameters of the newly created microservice, and the microservice process orchestration can be automatically constructed. Secondly, the above steps added to the transaction process are manually added; if the specific system component is regarded as a component to be selected; according to the known parameters of the process or the parameters of the process output result, through "Rule 1" and "Rule 3", the optional subsequent step component list of the next step can be automatically screened from the system component, and then manually selected, which is more intelligent and convenient than manually selecting technical components or business components. The automatic orchestration provided by the embodiment of the present invention improves development efficiency; the parallel process optimization of the transaction process improves the performance and efficiency of the running system; and reduces development costs and system operation costs. The embodiments of the present invention can greatly reduce transaction development time and customer usage costs, and have good economic and social value.

[0178] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.

[0179] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.

[0180] The disclosed embodiments are described above to enable any person skilled in the art to implement or use the present invention. Various modifications of these embodiments are obvious to those skilled in the art, and the general principles defined herein may also be applied to other embodiments without departing from the spirit and scope of the present disclosure. Therefore, the present disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.

[0181] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including". In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".

[0182] Those skilled in the art may also understand that the various illustrative logical blocks, units, and steps listed in the embodiments of the present invention may be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly demonstrate the interchangeability of hardware and software, the various illustrative components, units, and steps mentioned above have generally described their functions. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present invention.

[0183] The various illustrative logic blocks or units described in the embodiments of the present invention can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of the above. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any conventional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.

[0184] The steps of the method or algorithm described in the embodiments of the present invention can be directly embedded in hardware, a software module executed by a processor, or a combination of the two. The software module can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM, or other storage media of any form in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a user terminal. Optionally, the processor and the storage medium can also be arranged in different components in the user terminal.

[0185] In one or more exemplary designs, the above functions described in the embodiments of the present invention can be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, these functions can be stored on a computer-readable medium, or transmitted in the form of one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media that facilitate the transfer of computer programs from one place to another. The storage medium can be any available medium that can be accessed by any general or special computer. For example, such computer-readable media can include but are not limited to RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program codes in the form of instructions or data structures and other forms that can be read by general or special computers, or general or special processors. In addition, any connection can be appropriately defined as a computer-readable medium, for example, if the software is transmitted from a website site, server or other remote resource through a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wirelessly, such as infrared, wireless and microwave, it is also included in the defined computer-readable medium. The disk and disc include compact disk, laser disk, optical disk, DVD, floppy disk and Blu-ray disk. Disks usually copy data magnetically, while discs usually copy data optically with lasers. Combinations of the above may also be included in computer-readable media.

[0186] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for automatically arranging software processes, characterized in that: include: Obtain multiple components and their corresponding input parameters and output parameters, initial parameters and result parameters of the target process, and set the initial values ​​of the known parameters as the initial parameters; Selecting a component that satisfies a preset component selection rule from among the plurality of components that have not been appended to the component serial sequence as a target component; The initial state of the component serial sequence is empty; Append the target component serially to the end of the component serial sequence; Adding the output parameters of the target component to the known parameters; Determining whether a preset loop end condition is satisfied, and if it is determined that the preset loop end condition is not satisfied, returning to the step of selecting a component that satisfies a preset component selection rule as a target component from the components that have not been appended to the component serial sequence among the multiple components; otherwise, If it is determined that the preset loop end condition is met, the connection relationship between the components in the component serial sequence is adjusted in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and the obtained component serial parallel sequence is used as the orchestration result corresponding to the target process; Wherein, the preset component selection rule includes: a first rule and a second rule; The first rule includes: components whose input parameters are already included in known parameters or components whose input parameters are empty; The second rule includes: if the output parameter is added to the known parameters, the component that will result in the largest number of newly added result parameters in the known parameters; The selecting a component that satisfies a preset component selection rule as a target component includes: Selecting a component that meets the first rule from components that have not been appended to the component serial sequence among the plurality of components as a first selected component; Determine whether the number of components included in the first selection component is one; If it is determined that the number of components included in the first selected component is one, taking the first selected component as the target component; If it is determined that the number of components included in the first selection component is greater than 1, a component satisfying the second rule is selected from the first selection component as a target component.

2. The software process automatic arrangement method according to claim 1, characterized in that: The preset component selection rules also include: a third rule; The third rule includes: the component whose output parameters account for the highest proportion of unknown parameters; Selecting a component satisfying the second rule from the first selected components as a target component includes: Selecting a component that meets the second rule from the first selected components as a second selected component; Determine whether the number of components included in the second selection component is one; If it is determined that the number of components included in the second selected component is one, taking the second selected component as the target component; If it is determined that the number of components included in the second selected component is greater than 1, selecting a component satisfying the third rule from the second selected component as a target component; Among them, the initial value of the unknown parameter is set to the union of the result parameter and the input parameters of all components, and the parameter set is obtained after deleting the initial parameter from the obtained union; after the output parameter of the target component is added to the known parameters, the parameters that are the same as the output parameters of the target component are deleted from the unknown parameters.

3. The software process automatic arrangement method according to claim 2, characterized in that: The preset component selection rules also include: a fourth rule; The fourth rule includes: the component with the smallest time complexity; Selecting a component satisfying the third rule from the second selected components as a target component includes: Selecting a component that meets the third rule from the second selected components as a third selected component; Determining whether the number of components included in the third selected component is one; If it is determined that the number of components included in the third selected component is one, taking the third selected component as the target component; If it is determined that the number of components included in the third selected component is greater than 1, a component satisfying the fourth rule is selected from the third selected component as a target component.

4. The software process automatic arrangement method according to claim 3, characterized in that: The preset component selection rules also include: a fifth rule; The fifth rule includes: the component with the smallest component number; Selecting a component satisfying the fourth rule from the third selected components as a target component includes: Selecting a component that meets the fourth rule from the third selected components as a fourth selected component; Determining whether the number of components included in the fourth selected component is one; If it is determined that the number of components included in the fourth selected component is one, taking the fourth selected component as the target component; If it is determined that the number of components included in the fourth selected component is greater than 1, then selecting a component satisfying the fifth rule from the fourth selected component as a target component; Here, a sequential component number is set in advance for each component.

5. The software process automatic arrangement method according to claim 2, characterized in that: The preset component selection rules also include: a fifth rule; The fifth rule includes: the component with the smallest component number; Selecting a component satisfying the third rule from the second selected components as a target component includes: Selecting a component that meets the third rule from the second selected components as a third selected component; Determining whether the number of components included in the third selected component is one; If it is determined that the number of components included in the third selected component is one, taking the third selected component as the target component; If it is determined that the number of components included in the third selected component is greater than 1, then selecting a component satisfying the fifth rule from the third selected component as a target component; Here, a sequential component number is set in advance for each component.

6. The software process automatic arrangement method according to claim 1, characterized in that: The step of adjusting the connection relationship between components in the component serial sequence in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and using the obtained component serial parallel sequence as the orchestration result corresponding to the target process, includes: For a component in a component serial sequence, if the input parameter of the component is not included in the newly added known parameters brought by the predecessor component of the component, the component and the predecessor component of the component are adjusted to a parallel execution relationship, wherein the newly added known parameters brought by the predecessor component represent the increased parameters in the known parameters caused by adding the output parameters of the predecessor component to the known parameters.

7. The method for automatically arranging software processes according to claim 6, characterized in that: The step of adjusting the connection relationship between components in the component serial sequence in parallel according to the parameter dependency relationship to obtain a component serial parallel sequence, and using the obtained component serial parallel sequence as the orchestration result corresponding to the target process, includes: If the input parameters of a subsequence in a parallel sequence of a component string are not included in the newly added known parameters brought by the predecessor component or predecessor subsequence of the subsequence, the subsequence is adjusted to be in a parallel execution relationship with the predecessor component or predecessor subsequence of the subsequence; the subsequence is composed of a plurality of serially connected and / or parallel components; the newly added known parameters brought by the predecessor component or predecessor subsequence represent the added parameters in the known parameters caused by adding the output parameters of the predecessor component or predecessor subsequence to the known parameters.

8. The software process automatic arrangement method according to claim 1, characterized in that: The method further comprises: Determining whether the known parameters include all of the result parameters; If it is determined that the known parameters include all of the result parameters, the orchestration result corresponding to the target process is marked as successful, otherwise it is marked as failed.

9. A software process automatic arrangement device, characterized in that: include: An initialization unit, used to obtain multiple components and corresponding input parameters and output parameters of each component, initial parameters and result parameters of the target process, and set the initial values ​​of known parameters as initial parameters; A target component selection unit, configured to select a component that satisfies a preset component selection rule from among the multiple components that have not been added to the component serial sequence as a target component; The initial state of the component serial sequence is empty; A component serial sequence updating unit, used for appending the target component serially to the end of the component serial sequence; A parameter record updating unit, used for adding the output parameters of the target component to the known parameters; A loop end judgment unit, used to judge whether a preset loop end condition is met, and if it is judged that the preset loop end condition is not met, triggering the target component selection unit; A parallel adjustment unit, configured to, if it is determined that the preset loop end condition is met, perform parallel adjustment on the connection relationship between the components in the component serial sequence according to the parameter dependency relationship to obtain a component serial parallel sequence, and use the obtained component serial parallel sequence as the orchestration result corresponding to the target process; Wherein, the preset component selection rule includes: a first rule and a second rule; The first rule includes: components whose input parameters are already included in known parameters or components whose input parameters are empty; The second rule includes: if the output parameter is added to the known parameters, the component that will result in the largest number of newly added result parameters in the known parameters; The target component selection unit includes: A first selection module, configured to select a component that meets the first rule from components that have not been appended to the component serial sequence among the plurality of components as a first selected component; A first component number determination module, used to determine whether the number of components included in the first selection component is one; A first target component determination module, configured to use the first selected component as the target component if the number of components included in the first selected component is one; The second selection module selects a component satisfying the second rule from the first selection components as a target component if the number of components included in the first selection components is greater than 1.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Micro-service arrangement method, device and equipment and computer readable storage medium

    CN110286884A

  • Micro-service arrangement method and device, terminal equipment and storage medium

    CN111026367A