CN116700754A - Process scheduling method and system based on JSON dynamic configuration - Google Patents
Process scheduling method and system based on JSON dynamic configuration Download PDFInfo
- Publication number
- CN116700754A CN116700754A CN202310601624.8A CN202310601624A CN116700754A CN 116700754 A CN116700754 A CN 116700754A CN 202310601624 A CN202310601624 A CN 202310601624A CN 116700754 A CN116700754 A CN 116700754A
- Authority
- CN
- China
- Prior art keywords
- flow
- json
- configuration file
- model
- json configuration
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 206
- 230000008569 process Effects 0.000 title claims abstract description 170
- 230000008859 change Effects 0.000 claims abstract description 22
- 238000004458 analytical method Methods 0.000 claims abstract description 17
- 238000012545 processing Methods 0.000 claims description 20
- 238000012544 monitoring process Methods 0.000 claims description 17
- 238000005206 flow analysis Methods 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 5
- 235000010627 Phaseolus vulgaris Nutrition 0.000 claims description 4
- 244000046052 Phaseolus vulgaris Species 0.000 claims description 4
- 238000004891 communication Methods 0.000 claims description 2
- 238000011161 development Methods 0.000 abstract description 15
- 230000018109 developmental process Effects 0.000 abstract description 15
- 230000006870 function Effects 0.000 abstract description 13
- 238000012423 maintenance Methods 0.000 abstract description 8
- 230000000694 effects Effects 0.000 abstract description 6
- 230000033772 system development Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 6
- 230000014509 gene expression Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a process scheduling method and system based on JSON dynamic configuration, and relates to the technical field of system development. According to the method, a flow model is predefined, a flow JSON configuration file is written according to service requirements, then the flow model and the flow JSON configuration file are correspondingly registered in a server virtual machine, then the flow JSON configuration file is monitored in real time, the flows in the flow model are analyzed and rearranged according to the change of the flow JSON configuration file, and finally the corresponding flows are reloaded from the flow model to an application component according to analysis and arrangement results to update the component, so that the effect of adding and modifying online functions without reissuing the application can be achieved, the efficiency from development to online of the requirements is greatly improved, and the time and labor cost of application release are reduced. And the process nodes are organized and managed through the process JSON configuration file, so that the complex business process becomes clear, readable and easy to maintain, the time cost of development and maintenance is saved, and the efficiency is improved.
Description
Technical Field
The application relates to the technical field of system development, in particular to a process arrangement method and system based on JSON dynamic configuration.
Background
In the process of project development, a general project is realized, the assumption is made that the flow is A, B, C, a class is newly built for a developer to firstly execute the logic synchronization of the flow A to wait for execution, then execute the logic synchronization of the flow B to wait for the result, then execute the logic of the flow C, and then process and return all the results; however, the above logic often needs to be adjusted and changed according to the service logic, and sometimes needs to add a judgment logic of the process D between the process B and the process C, or sometimes needs to make a logic of adding or deleting the service process in the previous service code; with the increase of time and the increase of service functions, codes are more and more complex, the system becomes more and more difficult to maintain, various hard codes are judged, and branch conditions are more and more, so that the abstract degree of the codes is higher and the multiplexing rate is lower and higher, the coupling degree between all modules is higher, and the project is slightly modified to be subjected to test and release application again, thereby increasing the workload of development and maintenance of the project of development and maintenance personnel, and leading to lower working efficiency and higher cost of the development and maintenance personnel.
Disclosure of Invention
The application aims to provide a process arrangement method and a system based on JSON dynamic configuration, which are characterized in that a process model is predefined, a process JSON configuration file is written according to service requirements, then the process model and the process JSON configuration file are correspondingly registered in a server virtual machine, then the process JSON configuration file is monitored in real time, the processes in the process model are analyzed and rearranged according to the change of the process JSON configuration file, and finally the corresponding processes are reloaded from the process model to an application component according to analysis and arrangement results to update the component, so that the effect of newly adding and modifying functions on line without reissuing an application can be realized, the efficiency from development to online of the requirements is greatly improved, and the time and labor cost of application release are reduced.
Monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file, and performing process analysis arrangement;
and reloading the corresponding flow from the flow model to the application component according to the flow analysis and arrangement result.
Embodiments of the present application are implemented as follows:
in a first aspect, an embodiment of the present application provides a process arrangement method based on JSON dynamic configuration, including the following steps:
defining a flow model;
writing a flow JSON configuration file according to service requirements, and registering the flow model and the flow JSON configuration file;
monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file, and performing process analysis arrangement;
and reloading the corresponding flow from the flow model to the application component according to the flow analysis and arrangement result.
In some embodiments of the application, the flow model includes context information, request parameters, output parameters, temporary variables, flow information, and node information.
In some embodiments of the application, the flow model includes a flow registration interface for registering flows defined according to business requirements with the flow model.
In some embodiments of the present application, the steps of registering the flow model and the flow JSON configuration file specifically include:
analyzing the process JSON configuration file through a JSON analyzer;
and registering the flow JSON configuration file and the flow components of the flow model in the server virtual machine in a one-to-one correspondence manner.
In some embodiments of the present application, the node information includes node types including method nodes, bean nodes, service nodes, condition nodes, loop nodes, and sub-flow nodes.
In some embodiments of the present application, the steps of obtaining the flow identifier according to the change of the flow JSON configuration file and performing flow analysis and arrangement specifically include:
acquiring a process identifier of a process JSON configuration file which changes;
loading a flow model according to the acquired flow identification, processing a main flow in the flow model and analyzing all flow nodes;
and sequentially processing all the flow nodes in a recursion mode, calling the flow components corresponding to each node and returning.
In some embodiments of the present application, the written process JSON configuration file is configured in a configuration management center Apollo, and the process JSON configuration file is monitored by an event monitor of the configuration management center Apollo.
In a second aspect, an embodiment of the present application provides a process orchestration system based on JSON dynamic configuration, including:
the definition module is used for defining a flow model;
the compiling and registering module is used for compiling a flow JSON configuration file according to business requirements and registering the flow model and the flow JSON configuration file;
the monitoring and analyzing module is used for monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file and carrying out process analysis arrangement;
and the reloading module is used for reloading the corresponding flow from the flow model to the application component according to the flow analysis arrangement result.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory for storing one or more programs; a processor, when the one or more programs are executed by the processor, implementing a method as described in any one of the first aspects.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as described in any of the first aspects above.
Compared with the prior art, the embodiment of the application has at least the following advantages or beneficial effects:
the embodiment of the application provides a process arrangement method based on JSON dynamic configuration, which comprises the steps of writing a process JSON configuration file according to service requirements through predefining a process model, correspondingly registering the process model and the process JSON configuration file in a server virtual machine, then monitoring the process JSON configuration file in real time, analyzing and rearranging the process in the process model according to the change of the process JSON configuration file, and finally reloading the corresponding process from the process model to an application component according to analysis and arrangement results to update the component, thereby realizing the effect of newly adding and modifying functions on line without reissuing the application, greatly improving the efficiency from development to online of the requirements, and reducing the time and labor cost of application release. And the process nodes are organized and managed through the process JSON configuration file, so that the complex business process becomes clear, readable and easy to maintain, the time cost of development and maintenance is saved, and the efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an embodiment of a process orchestration method based on JSON dynamic configuration according to the present application;
FIG. 2 is a detailed flow chart of the steps of registering a flow model and a flow JSON configuration file in an embodiment of the present application;
FIG. 3 is a specific flowchart of steps for acquiring a flow identifier and performing flow analysis layout according to a change of a flow JSON configuration file in an embodiment of the present application;
FIG. 4 is a block diagram illustrating an embodiment of a process orchestration system based on JSON dynamic configuration according to the present application;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Example 1
Referring to fig. 1-3, an embodiment of the present application provides a process orchestration method based on JSON dynamic configuration, which includes writing a process JSON configuration file according to service requirements by defining a process model in advance, then correspondingly registering the process model and the process JSON configuration file in a server virtual machine, then monitoring the process JSON configuration file in real time, analyzing and rescheduling the process in the process model according to the change of the process JSON configuration file, and finally reloading the corresponding process from the process model to an application component according to analysis and orchestration results to update the component, thereby realizing the effect of newly adding and modifying functions on line without reissuing an application, greatly improving the efficiency from development to online demand, and reducing the time and labor cost of application publishing. And the process nodes are organized and managed through the process JSON configuration file, so that the complex business process becomes clear, readable and easy to maintain, the time cost of development and maintenance is saved, and the efficiency is improved.
As shown in fig. 1, the above-mentioned process scheduling method based on JSON dynamic configuration includes the following steps:
step S101: a flow model is defined.
In the above steps, the process model includes context information, request parameters, output parameters, temporary variables, process information and node information, and correspondingly defining the process model includes:
context definition: the process needs to define a Context parameter, which can be realized by a class ProcessContext of JAVA program, and is used for transferring various parameters in the process of running the process, such as request (input) parameters and output parameters of a process model, and the specific content can be defined according to business abstraction;
request parameter definition: the request parameters are defined into the class ProcessContext of the Context according to the service abstraction, and are used for defining a data transmission object DTO (Data Transfer Object) which is uniformly input by the flow;
output parameter definition: the output parameters are defined into the class ProcessContext of the Context according to the service abstraction and are used for defining a data transmission object DTO of the unified response of the flow;
temporary variable definition: for context management during execution of a process, including parsing the torsional transfer of variables and parameters between processes through EL expressions (Expression Language );
the process is defined as follows: defining a flow identification ID for identifying each flow in the flow model, defining a flow name for defining a flow alias, defining a flow description to describe the function of the whole flow, and storing the flow nodes in Map form for all nodes;
node definition: the node ID is required to be defined for identifying the node, the node name is used for defining the node alias, the node description is used for describing the role of the node in the whole process, the node type is used for representing the node type with different functions, including a method node, a bean node, a service node, a condition node, a circulation node, a sub-process node and the like, the next node identification is used for representing the node to be executed in a recursion mode, the definition of the component is used for specifically pointing to the node to be executed, the combination of different nodes and the node can form the components with different functions, so that the process model can provide rich process components for forming various logic processes and applications according to service requirements, the complex logic is decoupled, the nodes and the components can be multiplexed, thereby being convenient for developers to quickly construct the processes and the applications through the nodes and the components of the process model, efficiently manage the processes and the applications, and the work efficiency of development and maintenance staff is improved.
Step S102: and writing a flow JSON configuration file according to service requirements, and registering the flow model and the flow JSON configuration file.
In the above steps, after designing the flow according to the service requirement, the flow can be written into a JSON configuration file in a key value pair mode and can be named as flow. JSON, different flows in the JSON configuration file are distinguished by different flow identification IDs, one flow can internally comprise a plurality of different nodes, the nodes can be mutually related through fields, and the flow nodes are organized and managed through the flow JSON configuration file, so that the complex service flow becomes clear, readable and easy to maintain, the time cost of development and maintenance is saved, and the efficiency is improved. For example, for an application scenario where a user opens an account, the following flow is required: checking parameters, checking account opening states, and processing results by walking different account opening interfaces according to the ages of users; to implement such a service function, the process orchestration may be implemented by compiling the process JSON configuration file:
if the service requirement is changed, if different account opening interfaces are needed to be moved according to gender, a flow node can be directly added into the flow JSON configuration file to judge that gender is not moved; and the flow branches, and then the updated flow JSON configuration file is monitored to cover the original configuration file, so that the service logic change realized without releasing the application can be realized.
And then the written flow json configuration file is configured into an Apollo configuration center, and specifically, an Apollo configuration can be added into the code of the Apollo configuration center to store the json file. Further, the process model includes a process registration interface, where the process registration interface is configured to register a process defined according to a service requirement with the process model, and the process registration is convenient for directly using a corresponding process in development and use of an application. Apollo (apollo) is a reliable distributed configuration management center, can intensively manage the configuration of different environments and different clusters of applications, can be pushed to an application end in real time after configuration modification, and has the characteristics of normative authority, flow management and the like.
As shown in fig. 2, the steps of registering the flow model and the flow JSON configuration file specifically include:
step S201: analyzing the process JSON configuration file through a JSON analyzer;
step S202: and registering the flow JSON configuration file and the flow components of the flow model in the server virtual machine in a one-to-one correspondence manner.
In the above steps, after the JSON parser parses the flow JSON configuration file, each flow scan in the flow JSON configuration file is registered into the flow model through the flow registration interface; and registering the information of each flow in the flow JSON configuration file and the flow components in the flow model in a one-to-one correspondence manner into the server virtual machine so as to directly load the components corresponding to the flows when the application is started.
Step S103: and monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file, and performing process analysis arrangement.
In the above steps, a single Apollo monitoring class may be newly added in the configuration center Apollo to implement a monitor, and then the monitor is registered to monitor the change of the flow JSON configuration file in the configuration center Apollo. The Command LineRunner interface can be realized, a task class is customized, and the task class is submitted to a spring container management object; then, a Config object is injected in the task class by using an @ ApolloConfig annotation, and a configuration object with a namespace of application (other namespaces can be configured) is injected by default; adding an event monitor by using an addchange Listener () method in the injected config object, and realizing logic of a specific monitoring flow JSON configuration file in the monitor; if the monitor monitors that the Apollo configuration has the change of the flow JSON configuration file, the monitor acquires the changed flow identification according to the newly configured content in the flow JSON configuration file, analyzes and schedules the flow, and loads the flow again, so that the effect similar to hot deployment is realized, namely, the simple service logic is changed without reissuing the application.
Further, as shown in fig. 3, the steps of acquiring the flow identifier according to the change of the flow JSON configuration file and performing flow analysis and arrangement specifically include:
step S301: acquiring a process identifier of a process JSON configuration file which changes;
step S302: loading a flow model according to the acquired flow identification, processing a main flow in the flow model and analyzing all flow nodes;
step S303: and sequentially processing all the flow nodes in a recursion mode, calling the flow components corresponding to each node and returning.
In the above steps, when the monitor monitors that the process JSON configuration file is changed, obtaining a changed process identifier according to the newly configured content in the process JSON configuration file, loading a process model to process a main process, and analyzing the request parameters, the output parameters and the context of the process model to instantiate an object; then loading all the flow nodes, and starting to find the first defined flow node; then, node analysis is carried out, and according to the defined node type, the node analysis device and the node analysis devices which are needed can be known to do node processing, so that the process is rearranged; the node processing comprises the following steps: the method node calls a basic component through a reflection mechanism; the method node is used for mapping the bean into the class more than the method node, and the method node is also used for executing the component through reflection; the condition nodes are matched through the EL expression, and a plurality of conditions can be configured, so that a plurality of application scenes are met. After the node processing is completed, the next node identifier is acquired for node processing, and then the node processing is called in a recursion mode, and how many nodes are called recursively and return to the corresponding components until the next node identifier is not available. In addition, the process node processing further comprises an exception handling mechanism, and the global customizable exception handling mechanism rolls back operation when the process node processing is abnormal, and the process node processing is performed again.
Step S104: and reloading the corresponding flow from the flow model to the application component according to the flow analysis and arrangement result.
In the above steps, the process identifier is obtained according to the change of the process JSON configuration file, the process analysis, the node processing and the rearrangement are performed to obtain a new process arrangement result, and then the corresponding process is loaded from the process model to the application according to the new process arrangement result to update the components thereof, so that the process in the process model is updated and the components in the application are covered by monitoring the change of the process JSON configuration file in real time, the effect of newly adding and modifying the functions on the line without reissuing the application can be realized, the efficiency from development to online of the demand is greatly improved, and the time and labor cost of application release are reduced.
It should be noted that, in the embodiment of the present application, the technical content that is not specifically described in the embodiment of the present application may be implemented by using the existing related technology, which belongs to the prior art, and is not described in detail in the embodiment of the present application.
Example 2
Accordingly, referring to fig. 4, an embodiment of the present application provides a process scheduling system based on JSON dynamic configuration, which includes:
a definition module 1, configured to define a flow model; the compiling and registering module 2 is used for compiling a flow JSON configuration file according to business requirements and registering the flow model and the flow JSON configuration file; the monitoring and analyzing module 3 is used for monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file and carrying out process analysis arrangement; and the reloading module 4 is used for reloading the corresponding flow from the flow model to the application component according to the flow analysis arrangement result.
The specific implementation process of the above system refers to a process arrangement method based on JSON dynamic configuration provided in embodiment 1, and is not described herein.
Example 3
Referring to fig. 5, an embodiment of the present application provides an electronic device comprising at least one processor 5, at least one memory 6 and a data bus 7; wherein: the processor 5 and the memory 6 complete the communication with each other through the data bus 7; the memory 6 stores program instructions executable by the processor 5, which the processor 5 invokes to perform a JSON dynamic configuration based flow orchestration method. For example, implementation:
defining a flow model; writing a flow JSON configuration file according to service requirements, and registering the flow model and the flow JSON configuration file; monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file, and performing process analysis arrangement; and reloading the corresponding flow from the flow model to the application component according to the flow analysis and arrangement result.
The Memory 6 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.
The processor 5 may be an integrated circuit chip with signal processing capabilities. The processor 5 may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
It will be appreciated that the configuration shown in fig. 5 is merely illustrative, and that the electronic device may also include more or fewer components than shown in fig. 5, or have a different configuration than shown in fig. 5. The components shown in fig. 5 may be implemented in hardware, software, or a combination thereof.
Example 4
The present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor 5, implements a JSON dynamic configuration based flow orchestration method. For example, implementation:
defining a flow model; writing a flow JSON configuration file according to service requirements, and registering the flow model and the flow JSON configuration file; monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file, and performing process analysis arrangement; and reloading the corresponding flow from the flow model to the application component according to the flow analysis and arrangement result.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
It will be evident to those skilled in the art that the application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Claims (10)
1. A process arrangement method based on JSON dynamic configuration is characterized by comprising the following steps:
defining a flow model;
writing a flow JSON configuration file according to service requirements, and registering the flow model and the flow JSON configuration file;
monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file, and performing process analysis arrangement;
and reloading the corresponding flow from the flow model to the application component according to the flow analysis and arrangement result.
2. The process orchestration method according to claim 1, wherein the process model comprises context information, request parameters, output parameters, temporary variables, process information, and node information.
3. The process orchestration method according to any one of claims 2, wherein the process model comprises a process registration interface for registering a process defined according to business requirements with the process model.
4. A process orchestration method based on JSON dynamic configuration according to claim 3, wherein the steps of registering a process model and a process JSON configuration file specifically comprise:
analyzing the process JSON configuration file through a JSON analyzer;
and registering the flow JSON configuration file and the flow components of the flow model in the server virtual machine in a one-to-one correspondence manner.
5. The method for arranging a flow based on JSON dynamic configuration according to claim 4, wherein the node information comprises node types, and the node types comprise method nodes, bean nodes, service nodes, condition nodes, loop nodes and sub-flow nodes.
6. The method for arranging a flow based on JSON dynamic configuration according to claim 5, wherein the steps of acquiring the flow identifier according to the change of the JSON configuration file and arranging the flow resolution specifically comprise:
acquiring a process identifier of a process JSON configuration file which changes;
loading a flow model according to the acquired flow identification, processing a main flow in the flow model and analyzing all flow nodes;
and sequentially processing all the flow nodes in a recursion mode, calling the flow components corresponding to each node and returning.
7. The process scheduling method based on JSON dynamic configuration according to any one of claims 1 to 6, wherein the compiled process JSON configuration file is configured in a configuration management center Apollo, and the process JSON configuration file is monitored by an event monitor of the configuration management center Apollo.
8. A JSON dynamic configuration-based process orchestration system, comprising:
the definition module is used for defining a flow model;
the compiling and registering module is used for compiling a flow JSON configuration file according to business requirements and registering the flow model and the flow JSON configuration file;
the monitoring and analyzing module is used for monitoring the process JSON configuration file, acquiring a process identifier according to the change of the process JSON configuration file and carrying out process analysis arrangement;
and the reloading module is used for reloading the corresponding flow from the flow model to the application component according to the flow analysis arrangement result.
9. An electronic device comprising at least one processor, at least one memory, and a data bus; wherein: the processor and the memory complete communication with each other through the data bus; the memory stores program instructions for execution by the processor, the processor invoking the program instructions to perform the method of any of claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310601624.8A CN116700754A (en) | 2023-05-25 | 2023-05-25 | Process scheduling method and system based on JSON dynamic configuration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310601624.8A CN116700754A (en) | 2023-05-25 | 2023-05-25 | Process scheduling method and system based on JSON dynamic configuration |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116700754A true CN116700754A (en) | 2023-09-05 |
Family
ID=87830398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310601624.8A Pending CN116700754A (en) | 2023-05-25 | 2023-05-25 | Process scheduling method and system based on JSON dynamic configuration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116700754A (en) |
-
2023
- 2023-05-25 CN CN202310601624.8A patent/CN116700754A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
De Santis et al. | Zero-knowledge proofs of knowledge without interaction | |
CN110908738B (en) | Method and device for running small program | |
US7120896B2 (en) | Integrated business process modeling environment and models created thereby | |
Margara et al. | On the semantics of distributed reactive programming: the cost of consistency | |
US20080235682A1 (en) | Defining and executing processes using declarative programming language constructs | |
CN111897539A (en) | Method and device for deploying applications according to service roles | |
CN108965375B (en) | Service call proxy control system, method, server and readable storage medium | |
CN112860260A (en) | Web-based cross-platform application construction tool and method in college scene | |
US20160321038A1 (en) | Method of Adding Client Server Automation to Computer languages for Cloud Computing | |
US11381638B1 (en) | System and method for parallel execution of activites in an integration flow | |
CN114217887A (en) | Micro-service arranging method, micro-service executing method, micro-service arranging device and micro-service executing server | |
Kruger et al. | Evaluation of JADE multi-agent system and Erlang holonic control implementations for a manufacturing cell | |
CN116719622A (en) | Service flow arranging method and service flow arranging system | |
CN116257438A (en) | Updating method of interface test case and related equipment | |
Dennert et al. | Advanced concepts for flexible data integration in heterogeneous production environments | |
CN112631563A (en) | System development method and device based on framework, computer equipment and storage medium | |
CN113553250A (en) | Code testing method and device | |
Balasubramanian et al. | Drems ml: A wide spectrum architecture design language for distributed computing platforms | |
CN116680003A (en) | Front-end plug-in system | |
CN112418796B (en) | Sub-process task node activation method and device, electronic equipment and storage medium | |
CN116700754A (en) | Process scheduling method and system based on JSON dynamic configuration | |
CN114721929A (en) | Test method, test device, storage medium and equipment | |
CN112052035A (en) | Version packaging method and device based on bank back-line system | |
Tudruj et al. | PEGASUS DA framework for distributed program execution control based on application global states monitoring | |
Straesser et al. | Kubernetes-in-the-Loop: Enriching Microservice Simulation Through Authentic Container Orchestration |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination |