CN111026367A - Micro-service arranging method and device, terminal equipment and storage medium - Google Patents

Micro-service arranging method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN111026367A
CN111026367A CN201911159209.1A CN201911159209A CN111026367A CN 111026367 A CN111026367 A CN 111026367A CN 201911159209 A CN201911159209 A CN 201911159209A CN 111026367 A CN111026367 A CN 111026367A
Authority
CN
China
Prior art keywords
execution
component
flow
service
micro
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911159209.1A
Other languages
Chinese (zh)
Other versions
CN111026367B (en
Inventor
陈鑫晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdom Financial Nanjing Technology Co ltd
Original Assignee
Kingdom Financial Nanjing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdom Financial Nanjing Technology Co ltd filed Critical Kingdom Financial Nanjing Technology Co ltd
Priority to CN201911159209.1A priority Critical patent/CN111026367B/en
Publication of CN111026367A publication Critical patent/CN111026367A/en
Application granted granted Critical
Publication of CN111026367B publication Critical patent/CN111026367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a micro-service arranging method, which comprises the following steps: acquiring a service calling request of an external system, and acquiring a flow definition corresponding to a request parameter of the service calling request; initializing a process execution environment corresponding to the process definition, wherein the process execution environment comprises an execution process and an execution component; under the process execution environment, calling each execution component corresponding to the execution process according to the execution process; when all execution component calls are finished, the external system is responded. The calling logic and the business flow are packaged into the flow definition, the flow definition is placed in the flow program arrangement, the micro-service granularity and the function coupling are reduced, and the subsequent business logic can be packaged into the flow definition and added into the flow definition repository, so that the method is favorable for rapid development and system expansion.

Description

Micro-service arranging method and device, terminal equipment and storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a micro-service arranging method, a micro-service arranging device, terminal equipment and a storage medium.
Background
In the micro-service architecture, the application system is decomposed into a plurality of micro-services, so that each micro-service needs to be called to perform a complete business process of cooperative processing. However, at present, the calling logic of the micro-services is basically coupled in the micro-services, and as the system is continuously updated iteratively, the service flow is more and more complex, so that the calling logic between the micro-services is more and more complex, and the coupling is more and more, which is not beneficial to rapid development, maintenance and service monitoring.
Disclosure of Invention
The embodiment of the application provides a micro-service arranging method, a micro-service arranging device, terminal equipment and a storage medium, and can solve the problem that the calling logic of the existing micro-service is coupled in the service.
In a first aspect, an embodiment of the present application provides a micro-service orchestration method, including:
acquiring a service calling request of an external system, and acquiring a flow definition corresponding to a request parameter of the service calling request;
initializing a process execution environment corresponding to the process definition, wherein the process execution environment comprises an execution process and an execution component;
under the process execution environment, calling each execution component corresponding to the execution process according to the execution process;
and responding to the external system when all the execution component calls are finished.
The method and the system have the advantages that the calling logic and the business process are packaged into the process definition, the process definition is placed in the process arrangement, the micro-service granularity and the function coupling are reduced, the follow-up business logic can be packaged into the process definition and added into the process definition repository, and the method and the system are favorable for rapid development and system expansion. Initializing a flow execution environment corresponding to the flow definition by acquiring the flow definition corresponding to the request parameter of the service call request, calling each execution component corresponding to the execution flow according to the execution flow, and responding to the external system when the calling of all the execution components is finished to realize the procedural micro-service arrangement.
In a second aspect, an embodiment of the present application provides a micro service orchestration device, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a service calling request of an external system and acquiring a flow definition corresponding to a request parameter of the service calling request;
the initialization module is used for initializing a process execution environment corresponding to the process definition, and the process execution environment comprises an execution process and an execution component;
the calling module is used for calling each execution component corresponding to the execution flow according to the execution flow in the flow execution environment;
and the response module is used for responding to the external system when all the execution component calls are finished.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the micro-service orchestration method according to any one of the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the micro-service orchestration method according to any one of the first aspect.
In a fifth aspect, the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the micro-service orchestration method according to any one of the first aspect.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a system provided by an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for orchestrating micro-services according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for orchestrating microservice according to another embodiment of the present application;
FIG. 4 is a flowchart illustrating a method for orchestrating microservice according to another embodiment of the present application;
FIG. 5 is a flowchart illustrating a method for orchestrating microservice according to another embodiment of the present application;
FIG. 6 is a flowchart illustrating a method for orchestrating microservice according to another embodiment of the present application;
FIG. 7 is a flowchart illustrating a method for orchestrating microservice according to another embodiment of the present application;
FIG. 8 is a schematic structural diagram of a microservice orchestration device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
As described in the related art, in the micro service architecture, the application system is decomposed into a plurality of micro services, so that each micro service needs to be called to perform a complete business process of cooperative processing. At present, however, the calling logic of the micro-service is basically coupled in the micro-service. For example, a business process performed in sequence: a business request needs to call the micro-service A, B and C to complete in a cooperation mode, the specific calling logic is to allocate the business request to the micro-service A to process business data of the business request, the micro-service B needs to be called to assist in processing the business data in the processing process of the micro-service A, and the micro-service C needs to be called to assist in processing the business data in the processing process of the micro-service B, wherein the calling logic of the micro-service A calling the micro-service B is coupled in the micro-service A, and the calling logic of the micro-service B calling the micro-service C is coupled in the micro-service B. Therefore, with the continuous iterative upgrade of the system, the service flows (branch execution flow, parallel execution flow and sub-flow) are more and more complex, so that the calling logic between the micro services is more and more complex, and the calling logic coupled with the micro services is more and more, so that the micro services become overstaffed, and the quick development, maintenance and service monitoring of the micro services are not facilitated.
Therefore, the embodiment of the present application provides a method for orchestrating a micro service, which implements decoupling of a calling logic of the micro service from the micro service and packaging the decoupling into a flow definition, and stores the flow definition into a preset database, so as to call the flow definition to perform a streamlined micro service orchestration when processing an external service calling request, thereby implementing a complete service flow processing and solving the problem of multiple calling logic couplings of the existing micro service.
Fig. 1 shows a schematic structural diagram of a microservice orchestration system 100 according to an embodiment of the present application. As shown in FIG. 1, the system includes a process definition library 101 and a process control module 102. It should be understood that the drawings only show the system structure related to the present application, and that it may also include more or less structures shown, without limitation.
The flow definition library 101 is used for storing flow definitions corresponding to various request parameters, and each flow definition is packaged with a call logic decoupled from a related micro service. Specifically, according to the calling logic of the micro service corresponding to each service request, the component definition of the execution component corresponding to each flow definition is defined based on XML. The component definition includes but is not limited to a component type, an input parameter of the component, an output parameter of the component, an execution result branch of the component, and an operation attribute of the component; the component types include control components and microservice components, and the operational attributes of the components include, but are not limited to, synchronous execution, asynchronous execution, timeout, transaction control, supervisory control, current limit control, and fusing style.
The flow control module 102 is used to execute the control component 103 and the micro-service component 104 according to a flow definition. The control component 103 is a component for controlling the execution flow, such as a sequential component for controlling the sequential execution flow, a branch component for controlling the branch execution flow, a parallel component for controlling the parallel execution flow, a sub-flow component for controlling the sub-flow, a monitoring component for monitoring the execution flow, and an exception handling component for handling an exception of the abnormal execution flow.
The micro-service component 104 is a component for calling micro-services, and is configured to remotely call different micro-services by adapting to different micro-service frameworks, rpc (remote Procedure call), and perform load balancing, fusing and current limiting, and exception control on the call of the micro-services.
The micro-service arranging method provided by the application can be applied to terminal devices, the terminal devices include but are not limited to tablet computers, wearable devices, vehicle-mounted devices, Augmented Reality (AR)/Virtual Reality (VR) devices, notebook computers, ultra-mobile personal computers (UMPC), netbooks, desktop computers, independent servers, cluster servers and other terminal devices, and the embodiment of the application does not limit the specific types of the terminal devices at all.
Fig. 2 shows a schematic flow chart of the microservice orchestration method provided by the present application, which may be applied to the terminal device described above, by way of example and not limitation. As shown in fig. 2, the method includes steps S201 to S204, and the steps of the method are explained in detail below.
S201, acquiring a service calling request of an external system, and acquiring a flow definition corresponding to a request parameter of the service calling request;
in the above S201, the external system may be a business system, such as a bank transfer system; the service call request can be a service request sent by a service system or a call request sent by a certain system process; the request parameters contain the service data to be processed.
Optionally, according to the service flow when each service invocation request is processed, a flow definition corresponding to each service flow is preset, a mapping relation table of each request parameter and the flow definition is preset, and the mapping relation table is stored in a database for storing the flow definitions. And when the service calling request is obtained, obtaining the corresponding flow definition according to the request parameter of the service calling request.
S202, initializing a process execution environment corresponding to the process definition, wherein the process execution environment comprises an execution process and an execution component;
in the above S202, the process execution environment is a configuration environment (or a configuration file) when the business data in the request parameter is executed according to the corresponding process definition, and may include, but is not limited to, a process execution context object (execution component), a process instance ID (execution process), a process input request parameter (business input interface parameter), an associated process definition, a running state of the process execution environment (initialization, in execution, successful and end execution, abnormal and end execution), and an execution component list that has been executed completely.
Optionally, initializing the process execution environment may include: according to the flow definition and the request parameter, a mapping relation is established between a starting component (a preset starting component before the execution component is called) and a first called execution component in the execution flow, so that the starting component calls the first called execution component to start executing the service data.
S203, in the process execution environment, calling each execution component corresponding to the execution process according to the execution process;
in the above S203, the control component in the flow control module controls the execution flow, and the execution flow includes sequential execution, branch execution, parallel execution, or sub-flow execution. And the micro-service component in the flow control model calls the corresponding micro-service execution service data according to the execution flow controlled by the control component. It should be understood that calling an execution component is an execution process for executing a business logic, that is, each time an execution component is called, one or more business logics are executed by the execution component, and the corresponding execution context is recorded after each call is finished.
Optionally, before executing each micro service component, it is required to obtain an input parameter, an output parameter, and an operation attribute of the micro service component, where the input parameter is a service execution result output by a previous micro service component, and the output parameter is a result required to invoke a next micro service component and the service execution result.
And S204, when all the execution component calls are finished, responding to the external system.
In the above S204, all the execution component calls are ended, which indicates that the complete service flow has been completed, so that the external system can be responded to at this time, and the execution result corresponding to the service data in the request parameter is returned to the external system.
The method and the system have the advantages that the calling logic and the business process are packaged into the process definition, the process definition is placed in the process arrangement, the micro-service granularity and the function coupling are reduced, the follow-up business logic can be packaged into the process definition and added into the process definition repository, and the method and the system are favorable for rapid development and system expansion. Initializing a flow execution environment corresponding to the flow definition by acquiring the flow definition corresponding to the request parameter of the service call request, calling each execution component corresponding to the execution flow according to the execution flow, and responding to the external system when the calling of all the execution components is finished to realize the procedural micro-service arrangement.
On the basis of the embodiment shown in fig. 2, fig. 3 is a flowchart illustrating another micro-service orchestration method provided by the embodiment of the present application. As shown in fig. 3, the step S201 specifically includes steps S301 and S302. It should be noted that, the steps that are the same as those in the embodiment of fig. 2 are not repeated herein, please refer to the foregoing description.
S301, analyzing a request parameter of the service calling request;
in the above S301, each service call request may correspond to a process number, a process id, and a process version, and the service data, the process id, and the process version corresponding to the service call request are analyzed.
S302, acquiring the process definition corresponding to the request parameter from a preset database.
In the above S302, the preset database may be the above process definition library. The corresponding process definition can be obtained from the process definition library according to the process ID, the process version and the preset mapping relation of the process definition.
On the basis of the embodiment shown in fig. 2, fig. 4 is a flowchart illustrating another micro-service orchestration method provided by the embodiment of the present application. As shown in fig. 4, S203 specifically includes steps S401h and S402. It should be noted that, the steps that are the same as those in the embodiment of fig. 2 are not repeated herein, please refer to the foregoing description.
S401, acquiring component parameters and operation attributes of each execution component corresponding to the flow sequence of the execution flow according to the execution flow;
in S401, the component parameters include, but are not limited to, component type, input parameters, and branch of execution result. Specifically, the process definition defines the parameter type of the input parameter, wherein the input parameter may be the service data or the service execution result of the last execution component.
S402, acquiring an execution input parameter corresponding to each component parameter;
in the above S402, the execution input parameter is data to be processed. Optionally, according to a preset parameter mapping relationship, an execution input parameter corresponding to an input parameter in the component parameter is obtained. For example, if the input parameter in the component parameters is an account parameter (derived from the account in the request parameter), the execution input parameter may be a customer number parameter (derived from the customer number corresponding to the output parameter of the customer information query microservice in the account parameter).
And S403, controlling each execution component to execute the execution input parameters according to the corresponding operation attributes.
In S403, the control execution component calls the micro service to execute the execution input parameters according to the corresponding execution attributes, that is, the execution component can perform operations of load balancing, fusing and limiting current, synchronous execution, asynchronous execution, object control, and other execution attributes when calling the micro service.
It should be understood that each execution component of the present embodiment starts to acquire component parameters and run attributes after the execution of the last execution component ends, but there may be execution components that execute in parallel.
On the basis of the embodiment shown in fig. 4, fig. 5 shows a flowchart of another micro-service orchestration method provided by the embodiment of the present application. As shown in fig. 5, S402 specifically includes steps S501 and S502. It should be noted that, the steps that are the same as those in the embodiment of fig. 4 are not repeated herein, please refer to the foregoing description.
S501, acquiring a preset component input and output parameter list, wherein the component input and output parameter list comprises a mapping relation between component parameters and execution input parameters;
s502, according to the component input and output parameter list, acquiring an execution input parameter corresponding to each component parameter corresponding to the flow sequence of the execution flow.
In the above S501 and S502, the component input/output parameter list defines parameter mapping relationships between various component input parameters and component output parameters (execution input parameters). Optionally, the component input and output parameter list is referred to by a preset tag.
On the basis of the embodiment shown in fig. 2, fig. 6 is a flowchart illustrating another micro-service orchestration method provided in the embodiment of the present application. As shown in fig. 6, steps S601 to S603 are further included after S203. It should be noted that, the steps that are the same as those in the embodiment of fig. 2 are not repeated herein, please refer to the foregoing description.
S601, acquiring the execution context after each execution component is called;
in S601, the execution context may arrange a running log of the system for the microservice, which records a call chain corresponding to each service call request and an execution condition of each execution component in the call chain. It should be appreciated that each execution component, when invoked, performs one or more operations.
S602, detecting the execution state of each execution component according to the execution context;
in S602, the execution status includes, but is not limited to, an execution exception and an execution success, wherein the execution exception may include an execution timeout of the execution component, no processing of the business data by the execution component, or an execution of the input data.
S603, when the execution state of any execution component is execution abnormity, carrying out abnormity processing on the execution component.
In S603 described above, the exception handling may be a rollback operation based on transaction control. Since the execution exception of a certain execution component may be caused by an error in the execution result of the previous execution component, the execution component which executes the exception and the execution component which precedes the execution component are rolled back to find out the cause of the execution exception.
On the basis of the embodiment shown in fig. 6, a flowchart of another micro-service orchestration method provided in the embodiment of the present application is schematically shown. The step S603 specifically includes a step S6031. It should be noted that, the steps that are the same as those in the embodiment of fig. 6 are not repeated herein, please refer to the foregoing description.
S6031, according to the reverse flow of the execution flow, executing the execution component whose execution state is abnormal and all the execution components whose execution sequence is before the execution component by using a preset transaction compensation mechanism.
In S6031, a rollback operation is performed on the execution component that executed the exception and the execution component that has completed before the execution component based on the transaction compensation mechanism, wherein whether the execution component executes the completion query may refer to the execution component table in the flow execution environment. Specifically, the rollback operation may include starting from the execution component with the execution exception as the first execution component to the first execution component in the execution flow, verifying whether each transaction of the execution group price is successful, if both the transactions are successful, starting to execute a preset transaction, and after the execution of the preset transaction is finished, identifying the rollback as successful.
On the basis of the embodiment shown in fig. 6, fig. 7 is a flowchart illustrating another micro-service orchestration method provided in the embodiment of the present application. As shown in fig. 7, step S701 and step S702 are further included after step S603. It should be noted that, the steps that are the same as those in the embodiment of fig. 6 are not repeated herein, please refer to the foregoing description.
S701, recording the execution time and the execution state of each execution component;
s702, according to the execution time and the execution state, dynamically adjusting the corresponding execution component.
In the above S701 and S702, since the execution timeout of the execution component may cause an avalanche effect, the performance of the micro service component is controlled, and the execution component is dynamically adjusted by setting a timeout event and a service fusing policy, so as to ensure that the micro service orchestration system operates normally.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 8 shows a block diagram of a micro-service orchestration device 800 provided in an embodiment of the present application, corresponding to the micro-service orchestration method described in the above embodiment, and only shows portions related to the embodiment of the present application for convenience of description.
Referring to fig. 8, the apparatus includes:
an obtaining module 801, configured to obtain a service invocation request of an external system, and obtain a flow definition corresponding to a request parameter of the service invocation request;
an initialization module 802, configured to initialize a process execution environment corresponding to the process definition, where the process execution environment includes an execution process and an execution component;
a calling module 803, configured to call, in the process execution environment, each execution component corresponding to the execution process according to the execution process;
a response module 804, configured to respond to the external system when all the execution component calls are finished.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 9 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 9, the terminal device 9 of this embodiment includes: at least one processor 90 (only one shown in fig. 9), a memory 91, and a computer program 92 stored in the memory 91 and executable on the at least one processor 90, the processor 90 implementing the steps in any of the various micro-service orchestration method embodiments described above when executing the computer program 92.
The terminal device 9 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 90, a memory 91. Those skilled in the art will appreciate that fig. 9 is only an example of the terminal device 9, and does not constitute a limitation to the terminal device 9, and may include more or less components than those shown, or combine some components, or different components, for example, and may further include an input/output device, a network access device, and the like.
The Processor 90 may be a Central Processing Unit (CPU), and the Processor 90 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 91 may in some embodiments be an internal storage unit of the terminal device 9, such as a hard disk or a memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device 9. Further, the memory 91 may also include both an internal storage unit and an external storage device of the terminal device 9. The memory 91 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 91 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, and software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of microservice orchestration, comprising:
acquiring a service calling request of an external system, and acquiring a flow definition corresponding to a request parameter of the service calling request;
initializing a process execution environment corresponding to the process definition, wherein the process execution environment comprises an execution process and an execution component;
under the process execution environment, calling each execution component corresponding to the execution process according to the execution process;
and responding to the external system when all the execution component calls are finished.
2. The micro-service orchestration method according to claim 1, wherein the obtaining of the flow definition corresponding to the request parameter of the service invocation request comprises:
analyzing a request parameter of the service calling request;
and acquiring the process definition corresponding to the request parameter from a preset database.
3. The micro-service orchestration method according to claim 1, wherein the invoking each of the execution components corresponding to the execution flow according to the execution flow comprises:
acquiring component parameters and operation attributes of each execution component corresponding to the flow sequence of the execution flow according to the execution flow;
acquiring an execution input parameter corresponding to each component parameter;
and controlling each execution component to execute the execution input parameters according to the corresponding operation attributes.
4. The micro-service orchestration method according to claim 3, wherein the obtaining of the execution input parameter corresponding to each of the component parameters corresponding to the flow sequence of the execution flow comprises:
acquiring a preset component input and output parameter list, wherein the component input and output parameter list comprises a mapping relation between component parameters and execution input parameters;
and acquiring an execution input parameter corresponding to each component parameter corresponding to the flow sequence of the execution flow according to the component input and output parameter list.
5. The micro-service orchestration method according to claim 1, wherein after invoking each of the execution components corresponding to the execution flow according to the execution flow, the method further comprises:
acquiring an execution context after each execution component is called;
detecting an execution state of each of the execution components according to the execution context;
and when the execution state of any execution component is execution exception, exception processing is carried out on the execution component.
6. The micro-service orchestration method according to claim 5, wherein the exception handling of the execution component comprises:
and executing the execution component with the execution state being abnormal execution and all the execution components with the execution sequence before the execution component by a preset transaction compensation mechanism according to the reverse flow of the execution flow.
7. The micro-service orchestration method according to claim 5, wherein after exception handling of the execution component, further comprising:
recording the execution time and the execution state of each execution component;
and dynamically adjusting the corresponding execution component according to the execution time and the execution state.
8. A microservice orchestration device, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a service calling request of an external system and acquiring a flow definition corresponding to a request parameter of the service calling request;
the initialization module is used for initializing a process execution environment corresponding to the process definition, and the process execution environment comprises an execution process and an execution component;
the calling module is used for calling each execution component corresponding to the execution flow according to the execution flow in the flow execution environment;
and the response module is used for responding to the external system when all the execution component calls are finished.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN201911159209.1A 2019-11-22 2019-11-22 Micro-service arrangement method, device, terminal equipment and storage medium Active CN111026367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911159209.1A CN111026367B (en) 2019-11-22 2019-11-22 Micro-service arrangement method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911159209.1A CN111026367B (en) 2019-11-22 2019-11-22 Micro-service arrangement method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111026367A true CN111026367A (en) 2020-04-17
CN111026367B CN111026367B (en) 2023-12-29

Family

ID=70207078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911159209.1A Active CN111026367B (en) 2019-11-22 2019-11-22 Micro-service arrangement method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111026367B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538493A (en) * 2020-04-28 2020-08-14 京东数字科技控股有限公司 Streaming data processing method, system, storage medium and electronic equipment
CN111767047A (en) * 2020-06-28 2020-10-13 北京思特奇信息技术股份有限公司 Micro-service component management method and device
CN113760226A (en) * 2020-11-25 2021-12-07 北京沃东天骏信息技术有限公司 Service construction method and device, electronic equipment and storage medium
CN114153444A (en) * 2021-12-09 2022-03-08 中国建设银行股份有限公司 Method and device for constructing combined service
CN114244729A (en) * 2021-12-01 2022-03-25 中国邮政储蓄银行股份有限公司 Funnel-type timeout control method and device suitable for service arrangement
CN114501391A (en) * 2020-10-26 2022-05-13 中国移动通信集团设计院有限公司 Micro service business processing system and method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766166A (en) * 2018-12-29 2019-05-17 优刻得科技股份有限公司 Business flow processing method, apparatus, storage medium and equipment
CN110457143A (en) * 2019-07-25 2019-11-15 腾讯科技(深圳)有限公司 The call method and device of micro services

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766166A (en) * 2018-12-29 2019-05-17 优刻得科技股份有限公司 Business flow processing method, apparatus, storage medium and equipment
CN110457143A (en) * 2019-07-25 2019-11-15 腾讯科技(深圳)有限公司 The call method and device of micro services

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538493A (en) * 2020-04-28 2020-08-14 京东数字科技控股有限公司 Streaming data processing method, system, storage medium and electronic equipment
CN111767047A (en) * 2020-06-28 2020-10-13 北京思特奇信息技术股份有限公司 Micro-service component management method and device
CN114501391A (en) * 2020-10-26 2022-05-13 中国移动通信集团设计院有限公司 Micro service business processing system and method
CN114501391B (en) * 2020-10-26 2023-07-21 中国移动通信集团设计院有限公司 Micro-service business processing system and method
CN113760226A (en) * 2020-11-25 2021-12-07 北京沃东天骏信息技术有限公司 Service construction method and device, electronic equipment and storage medium
CN114244729A (en) * 2021-12-01 2022-03-25 中国邮政储蓄银行股份有限公司 Funnel-type timeout control method and device suitable for service arrangement
CN114153444A (en) * 2021-12-09 2022-03-08 中国建设银行股份有限公司 Method and device for constructing combined service

Also Published As

Publication number Publication date
CN111026367B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN111026367B (en) Micro-service arrangement method, device, terminal equipment and storage medium
CN110601880A (en) Cloud platform, service processing method, command interface and computer equipment
CN111427971B (en) Business modeling method, device, system and medium for computer system
CN111694638A (en) Rule package loading method, rule package executing method and terminal equipment
CN111638983A (en) Interface calling method, interface calling device and terminal equipment
CN108897729B (en) Transaction template sharing method and device, electronic equipment and storage medium
CN114564294A (en) Intelligent service arranging method and device, computer equipment and storage medium
CN116302708A (en) Data backup method, device, equipment and storage medium based on load balancing
US11157690B2 (en) Techniques for asynchronous execution of computationally expensive local spreadsheet tasks
CN111666166B (en) Service providing method, device, equipment and storage medium
CN112445860B (en) Method and device for processing distributed transaction
US11861214B2 (en) Memory device forensics and preparation
CN111190750A (en) Data processing method and system
CN115934537A (en) Interface test tool generation method, device, equipment, medium and product
CN115599401A (en) Publishing method, device, equipment and medium of user-defined model
CN112650598B (en) Multi-application access method for workflow system
CN115170152A (en) Data distribution method, device, equipment and storage medium
CN111061576B (en) Method and system for creating entity object
CN111176588B (en) Service bill issuing method, device, medium and electronic equipment
CN112261072B (en) Service calling method, device, equipment and storage medium
CN112818336A (en) Data access method, data access device and computer readable storage medium
CN110955599A (en) Object creation method and device, electronic equipment and computer-readable storage medium
CN113055250B (en) Networking communication method, device, terminal equipment and storage medium
CN113268230B (en) Feedback information generation method and device, terminal and storage medium
CN113935613A (en) Equipment inspection method and device, electronic equipment and computer readable medium

Legal Events

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