Disclosure of Invention
The technical problem to be solved by the present invention is to provide a middle station system based on micro-service and a software defined middle station system construction method, aiming at the above defects in the prior art, so as to solve the problems of complex implementation and poor control flexibility of the existing middle station system.
The technical scheme adopted by the invention for solving the technical problems is as follows: there is provided a microservice-based middlebox system comprising:
the reusable service component module is used for abstracting reusable processing logics of a plurality of service systems;
the configuration item module is used for defining and realizing configuration items; and
the configuration item synchronization component module is respectively connected with the reusable service component module and the configuration item module; wherein the content of the first and second substances,
the configuration item synchronization component module acquires the configuration item definition and the configuration item implementation, outputs the configuration item definition and the configuration item implementation, and acquires a configuration item set value, and the reusable service component module executes the reusable processing logic and the configuration item implementation corresponding to the configuration item set value.
Further preferred embodiments of the present invention are: the configuration item module comprises a configuration item definition unit and a configuration item implementation unit, the configuration item definition unit is used for defining the connection mode of the reusable service component module and the configuration item module, and the configuration item implementation unit is used for abstracting the personalized processing logic of a plurality of service systems.
Further preferred embodiments of the present invention are: the middlebox system also comprises a middlebox console and a commercial operation platform, wherein,
the middle console is connected with the configuration item synchronization component module;
the business operation platform is used for carrying out operation management on a plurality of business systems, acquiring business requirement feedback of business system operation and transmitting the business requirement feedback to the middle console;
the middle console control console obtains configuration item definitions and configuration item realization through the configuration item synchronization component module, and outputs configuration item set values to the configuration item synchronization component module in combination with service requirement feedback of the commercial operation platform, and the reusable service component module executes reusable processing logic and configuration item realization corresponding to the configuration item set values.
Further preferred embodiments of the present invention are: the middle console comprises a configuration item collection module, a configuration item setting module and a set value output module, wherein the configuration item collection module is used for receiving configuration item definitions and configuration item realizations reported by the configuration item synchronization component module, the configuration item setting module is used for setting corresponding configuration item set values according to the configuration item definitions and the configuration item realizations received by the configuration item collection module, and the set value output module is used for providing the capacity required by the configuration item synchronization component module when reading the configuration item set values and outputting the configuration item set values to the configuration item synchronization component module.
Further preferred embodiments of the present invention are: the configuration item setting module is a graphical interactive setting interface used for setting configuration item setting values.
Further preferred embodiments of the present invention are: the business operation platform comprises a standard design module, a login management module and a global management module, wherein the standard design module is used for setting operation standards of the business systems, the login management module is used for providing login and switching entries of a plurality of business systems, the global management module is used for managing operation information of the business systems, acquiring business requirement feedback and transmitting the business requirement feedback to the console, and the operation information comprises tenant information, application information, organization information, user information, resource information and authority information.
The technical scheme adopted by the invention for solving the technical problems is as follows: the method for constructing the software-defined middle platform system based on the micro-service is characterized by comprising the following steps of:
acquiring a service scene and a service flow;
acquiring reusable processing logics and configuration items of a plurality of service systems according to the service scene and the service flow;
setting a configuration item set value by combining the configuration item and service requirement feedback;
executing the realization of the configuration items corresponding to the reusable processing logic and the configuration item set values;
and realizing the construction of the software defined middle station system.
Further preferred embodiments of the present invention are: the method for acquiring the reusable processing logic and the configuration items of the plurality of service systems according to the service scene and the service flow comprises the following steps:
decomposing the service logic of the service flow into processing flows and processing logics of flow nodes;
distinguishing personalized processing logic differences under different service scenes;
encapsulating the common processing logic to obtain reusable processing logic;
and packaging the individual processing logic to obtain the configuration item.
Further preferred embodiments of the present invention are: before setting the setting value of the configuration item, the configuration item is automatically scanned and reported.
Further preferred embodiments of the present invention are: the implementation of the configuration item corresponding to the execution reusable processing logic and the configuration item set value comprises the following steps:
executing the reusable processing logic;
reading a configuration item set value;
and adding a configuration item corresponding to the setting value of the execution configuration item when the personalized processing logic is needed.
Further preferred embodiments of the present invention are: the configuration items comprise service parameters, a system dictionary and service logic extension points.
Compared with the prior art, the method has the advantages that on the basis of a layered thought, on the basis of micro services, the execution and control of the middle platform system are decoupled in a separating manner, the service requirement feedback of service system operation is combined, the definition value of the configuration item is obtained in real time, the execution of the configuration item corresponding to the reusable processing logic and the setting value of the configuration item is realized, the flexible control of the middle platform system is realized, the stable operation of the system is ensured, the change of the service according to needs is realized, the service innovation is assisted, the systematic cooperation, the flexible operation, the dynamic expansion and the scene autonomy are realized, and the control is flexible and efficient.
Detailed Description
The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
As shown in FIG. 1, the present invention provides a preferred embodiment of a microservice-based staging system.
Referring to fig. 1, the micro-service based middle platform system includes a reusable service component module 100, a configuration item module 200, and a configuration item synchronization component module 300, where the reusable service component module 100 is used to abstract reusable processing logic of a plurality of service systems; the configuration item module 200 is used for defining configuration items and realizing the configuration items; the configuration item synchronization component module 300 is respectively connected with the reusable service component module 100 and the configuration item module 200; the configuration item synchronization component module 300 obtains the configuration item definition and the configuration item implementation, outputs the configuration item definition and the configuration item implementation, and obtains the configuration item setting value, and the reusable service component module 100 executes the reusable processing logic and the configuration item implementation corresponding to the configuration item setting value.
Configuration item definition and implementation are carried out through the configuration item module 200, the configuration item definition and implementation of the configuration item acquired by the configuration item synchronization component module 300 are output, the configuration item set value is acquired, reusable processing logic is executed, and implementation of the configuration item corresponding to the configuration item set value is carried out, so that flexible control of the middle platform system is realized, stable operation of the system is guaranteed, service innovation is assisted and based on service change as needed, systematic cooperation, flexible operation, dynamic expansion and scene autonomy are realized, and control is flexible and efficient.
The reusable service component module 100 abstracts reusable processing logics of a plurality of service systems, is processing logics corresponding to reusable service processing flows and flow nodes in the plurality of service systems, has different contents according to different specific service ranges, and is abstracted mainly through reusability. The configuration item module 200 is an abstraction of the personalization processing logic in the different business systems.
Further, referring to fig. 2, the configuration item module 200 includes a configuration item defining unit 210 and a configuration item implementing unit 220, where the configuration item defining unit 210 is configured to define a connection manner between the reusable service component module 100 and the configuration item module 200, and the configuration item implementing unit 220 is configured to abstract personalized processing logic of a plurality of service systems. The configuration item definition unit 210 can declare through an interface, where the interface is used as a connection point of the reusable service component module 100 and the configuration item module 200. Of course, the configuration item definition unit 210 can also be defined by other means, such as abstract class definition. The personalization processing logic abstracted by the configuration item implementation unit 220 corresponds to concrete business processing logic derived from the business processing requirements personalized for each business system.
Further, referring to fig. 1, the middlebox system further comprises a middlebox console 400 and a business operation platform 500, wherein the middlebox console 400 is connected with the configuration item synchronization component module 300; the business operation platform 500 is configured to perform operation management on a plurality of service systems, acquire service requirement feedback of service system operation, and transmit the service requirement feedback to the middle console 400; the middle console 400 obtains the configuration item definition and the configuration item implementation through the configuration item synchronization component module 300, and outputs the configuration item setting value to the configuration item synchronization component module 300 in combination with the service requirement feedback of the business operation platform 500, and the reusable service component module 100 executes the reusable processing logic and the configuration item implementation corresponding to the configuration item setting value.
The reusable service component module 100, the configuration item module 200 and the configuration item synchronization component module 300 are assembled to the same microservice, the configuration item synchronization component module 300 is connected in series with the reusable service component module 100, the configuration item module 200 and the console 400, after the microservice is started, the configuration item synchronization component module 300 automatically scans and reports configuration item definition and configuration item implementation to the console 400, raw materials for setting configuration item set values are provided for the console 400, and when the reusable service component module 100 is executed, the configuration item synchronization component module 300 obtains the configuration item set values output by the console 400, so that the console system can dynamically determine the configuration item implementation required to be used during operation. The business operation platform 500 can assist the middle desk console 400 to better realize the unified management of centralized enterprise applications, and through centralized operation, the requirement feedback of the front-end business system to the software-defined middle desk system is gathered, and the software-defined middle desk system is flexibly operated and controlled.
Referring to fig. 3, the console 400 in this embodiment includes a configuration item collection module 410, a configuration item setting module 420, and a setting value output module 430, where the configuration item collection module 410 is configured to receive the configuration item definition and the configuration item implementation reported by the configuration item synchronization component module 300, the configuration item setting module 420 sets a corresponding configuration item setting value according to the configuration item definition and the configuration item implementation received by the configuration item collection module 410, and the setting value output module 430 is configured to provide a capability required when the configuration item synchronization component module 300 reads the configuration item setting value, and output the configuration item setting value to the configuration item synchronization component module 300.
The configuration item setting module 420 provides a friendly graphical interactive setting interface for a central administrator for a graphical interactive setting interface for setting configuration item setting values, and the central administrator achieves the purpose of setting configuration item setting values through the graphical interactive setting interface. Certainly, in other embodiments, the middle station administrator can also achieve the same purpose by directly operating the data source (such as a database and a configuration file), and the like, so that the implementation cost can be effectively reduced, but the fault tolerance is low, and the requirement on the user is higher.
Referring to fig. 4, the business operation platform 500 in this embodiment includes a specification design module 510, a login management module 520, and a global management module 530, where the specification design module 510 is configured to set an operation specification of a business system, the login management module 520 is configured to provide entries for login and switching of multiple business systems, the global management module 530 is configured to manage operation information of the business systems, obtain business requirement feedback, and transmit the business requirement feedback to the console 400, where the operation information includes tenant information, application information, organization information, user information, resource information, and permission information. The operation specification of the service system covers interface interaction, modularization customization, application assembly, site aggregation and the like.
As shown in fig. 5, the present invention also provides a preferred embodiment of a method for building a middleware system in software definition based on microservices.
The method for constructing the software defined middle platform system based on the microservice comprises the following steps:
s100, acquiring a service scene and a service process;
s200, acquiring reusable processing logics and configuration items of a plurality of service systems according to service scenes and service flows;
s400, setting a configuration item set value by combining the configuration item and service requirement feedback;
s500, executing realization of a configuration item corresponding to the reusable processing logic and the configuration item set value;
and S600, realizing the construction of a software defined middle station system.
Based on the layered thought, the execution and control of the middle platform system are decoupled separately, the configuration item set value is obtained in real time according to the service scene and the service flow and combined with the service requirement feedback actually applied by the service system, the reusable processing logic is executed, the configuration item corresponding to the configuration item set value is implemented, the flexible control of the middle platform system is realized, the stable operation of the system is ensured, the service innovation is assisted based on the change of the service according to the requirement, the systematic cooperation, the flexible operation, the dynamic expansion and the scene autonomy are realized, and the control is flexible and efficient.
Before setting the setting value of the configuration item, the method further comprises the step S300 of automatically scanning and reporting the configuration item. The configuration item adopts an automatic scanning reporting mechanism, so that the overall reliability is higher. Specifically, corresponding to the middle desk system, the middle desk console acquires the reported configuration item and sets a configuration item set value by combining service requirement feedback through scanning and reporting the configuration item of the micro service by the configuration item synchronization component module. The configuration items are the definition and implementation of the configuration items, in the actual execution process, the configuration items can be subdivided into a plurality of sub items such as service parameters, system dictionaries, service logic expansion points and the like, and the development and use process can be more accurate by introducing different sub items. In other embodiments, the console may also provide a management interface for the console to obtain configuration items, and the configuration items are manually entered or imported by a development designer, but when the number of configuration items is large, manual operation is prone to errors.
The reporting process of the configuration items comprises the following steps: starting the micro service; broadcasting service initiation information; the middle console receives service starting information; reading configuration items of the microservices; and storing the configuration items of the corresponding services, and reporting the configuration items.
Referring to fig. 6, step S200 includes the following specific steps:
s210, decomposing the service logic of the service flow into a processing flow and a processing logic of a flow node;
s220, distinguishing personalized processing logic differences under different service scenes;
s230, packaging the common processing logic to obtain reusable processing logic;
s240, encapsulating the individual processing logic to obtain a configuration item.
Referring to fig. 7, step S500 includes the following specific steps:
s510, executing reusable processing logic;
s520, reading a configuration item set value transmitted by a console of the middle station;
s530, adding a configuration item corresponding to the setting value of the execution configuration item when the personalized processing logic is needed.
By reading the set value of the configuration item when executing the reusable processing logic and the system runs, the realization of the configuration item needing to be used is dynamically determined, and the flexibility is improved by magnitude.
The following describes the specific implementation of the method for constructing the middleware system in the software definition based on microservice according to the present invention:
A. in the design stage, the service logic of the system is decomposed into processing logics of processing flows and flow nodes, so that individualized processing logic differences under different service scenes are distinguished, and common processing logics are designed according to a reusable service component module; the personalized processing logic is packaged in a configuration item mode of an extension point, a service parameter and the like, and is packaged into a configuration item module.
B. In the development stage, the reusable service component module and the configuration item module are developed in parallel. The reusable service component module is responsible for the series connection of the service process and the realization of common processing logic in the process, and configuration items are added at the places needing individual processing logic according to the design; the development of the configuration item module mainly focuses on the implementation of the configuration item, namely different logic processing is carried out according to the requirements of different scenes. And after the coding is finished, the reusable service component module, the configuration item module and the configuration item synchronization component module are assembled to the same microservice for subsequent deployment.
C. In the control stage, when the micro-service is installed and deployed, the configuration item synchronization component module automatically reports the configuration item definition and the configuration item implementation of the service to the middle console, and a middle console administrator and a service administrator set the configuration items according to the requirements of service scenes. When in setting, the service scene requirements of different granularities are met through the range from large to small of the four layers of the whole situation, the tenant, the service space and the service identity, and multi-level sharing and fine-grained isolation services are realized.
D. And in the execution stage, aiming at different service requests, the configuration item synchronization component module calls the related capability of the console to identify the tenant, the service space and the service identity of the request based on the specific request, preferentially reads the configuration item set values which are hit first according to the sequence from small to large, and determines the individualized processing logic to be executed according to the configuration item set values, thereby realizing the flexible adjustment of the service logic.
E. In the operation stage, operators log in and manage respective responsible services uniformly through the commercial operation platform, and the shared operation requirements are processed uniformly through the global management function of the commercial operation platform.
In the actual landing process of the configuration item module, a plurality of different levels of settings may occur (for example, the levels in the above specific implementation process are set as global > tenant > service space > service identity), and introducing different levels can make the flexibility of the platform system in software definition more orderly, but also can make the complexity of the system earlier to a certain extent, and reduce the execution efficiency.
The evolution and execution logic of the middle station system is defined and controlled by separating the control, execution and operation of the middle station system and combining a parameter configuration and a software openness programmable mechanism, so that the flexible control of the service of the middle station system is realized, and the change of the foreground service as required is supported more efficiently.
The specific process from the middle station system to the specific service request accepting to the processing is as follows: the front-end service system accepts a user request; the micro-service calls the dependent bottom-layer service; executing the first common service logic and positioning to the individual service logic; the middle console reads and inquires the setting value of the configuration item according to the individual service logic; setting a configuration item set value and returning to the micro service; the micro service selects and executes the individual service logic according to the set value of the configuration item; and executing the second common service logic to realize the processing of the service request.
It should be understood that the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same, and those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some technical features; and all such modifications and alterations are intended to fall within the scope of the appended claims.