Configurable service management method and device

By adopting the configurable service framework on the web server, the service plug -in configuration and routing registration of the service are solved, and the difficulty and flexibility of the service provision solution in the existing technology service provider when facing the increase of business complexity will achieve business Flexible combination and system stability.

CN114489754BActive Publication Date: 2025-01-28QI AN XIN TECHNOLOGY GROUP INC +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111599814.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-01-28
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

When existing service provision solutions face increased business complexity, they increase the complexity of program, increase the difficulty of later maintenance, and when business changes and combinations are required, the service program needs to be rewrite, resulting in inflexibility.

Method used

By using the configurable service framework on the web server, the service plug -in configuration is used to use the effective function plug -in list, and the routing registration is performed to achieve a flexible combination of business functions and quick addition and deletion.

Benefits of technology

Enhance the independence of business logic, avoid the interaction between business code, increase the stability of the system, and facilitate system maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114489754B_ABST
    Figure CN114489754B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a configurable service management method and device. The method is applied to a Web server, which adopts a configurable service framework and provides services isolated from each other, including: monitoring the interface call request of the client through the service provided by the Web server; the service provided by the Web server configures the function plug-in based on the effective function plug-in list and performs routing registration; the target service provided by the Web server responds to the interface call request monitored, determines the routing registration information of the function plug-in configured by the target service; determines the processing function based on the determined routing registration information, transmits the monitored interface call request to the determined processing function for corresponding processing, and returns the processing result to the client. The embodiment of the present invention can enhance the independence of business logic, avoid the mutual influence of business codes, increase the stability of the system, and facilitate system maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a configurable service management method and device. Background Art

[0002] With the development of network scale and the continuous increase of business types, the corresponding service provision procedures are becoming larger and more complex. Since all businesses must eventually be implemented in corresponding programs, the complexity of the programs continues to increase with the business.

[0003] The existing service provision scheme is to unify the business into one process and provide services through a network interface, or to unify the business into several processes and provide services through several network interfaces.

[0004] The existing service provision solutions have the following problems: 1. Adding new business logic to a process will affect other businesses in the process; 2. As the business complexity increases, the program complexity increases, which will increase the difficulty of subsequent maintenance; 3. When it is necessary to change and combine the business, the service program can only be rewritten. For example, if a service A has function a, and another service B also wants to add function a, the program of function a can only be rewritten in B. Summary of the invention

[0005] In view of the problems in the prior art, an embodiment of the present invention provides a configurable service management method and device.

[0006] Specifically, the embodiment of the present invention provides the following technical solutions:

[0007] In a first aspect, an embodiment of the present invention provides a configurable service management method, which is applied to a Web server, wherein the Web server adopts a configurable service framework, and the services provided by the Web server are isolated from each other, including:

[0008] The interface call request of the client is monitored through the service provided by the Web server; wherein the service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and perform routing registration;

[0009] The target service provided by the Web server determines, in response to monitoring the interface call request, the routing registration information of the function plug-in configured by the target service;

[0010] A processing function is determined based on the determined routing registration information, the monitored interface call request is transmitted to the determined processing function, corresponding processing is performed, and the processing result is returned to the client.

[0011] Furthermore, the service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and perform routing registration, including:

[0012] In the effective function plug-in list, function plug-in configuration is performed on the service provided by the Web server, so that the service provided by the Web server has the function provided by the configured function plug-in;

[0013] Compiling the code of the service provided by the Web server, and compiling the code of the configured function plug-in based on the effective function plug-in list to generate an executable file;

[0014] Performing route registration on the configured function plug-in based on the effective function plug-in list to obtain corresponding route registration information;

[0015] Before the service provided by the Web server monitors the client's interface call request, the method further includes:

[0016] The service provided by the Web server is started based on the executable file.

[0017] Further, after performing route registration for the configured function plug-in based on the effective function plug-in list and obtaining corresponding route registration information, the method further includes:

[0018] Sending the executable file and the routing registration information to the Web server;

[0019] Before starting the service provided by the Web server based on the executable file, the method further includes:

[0020] The Web server receives the executable file and the routing registration information.

[0021] Furthermore, in the effective function plug-in list, function plug-in configuration is performed on the service provided by the Web server, including:

[0022] Based on the function plug-ins in the preset plug-in set, in the effective function plug-in list, function plug-in configuration is performed on the service provided by the Web server.

[0023] Furthermore, in the effective function plug-in list, before configuring the function plug-in for the service provided by the Web server, the method further includes:

[0024] Functional plug-ins in other servers that use the same service framework as the Web server are migrated to the plug-in set as functional plug-ins in the plug-in set.

[0025] Furthermore, the service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and perform routing registration, and also includes:

[0026] In the effective function plug-in list, a target function plug-in is removed from the function plug-ins configured for the target service provided by the Web server, and the function plug-in configured for the target service is updated.

[0027] Furthermore, the Web server adopts the gin service framework.

[0028] In a second aspect, an embodiment of the present invention further provides a configurable service management device, which is applied to a Web server. The Web server adopts a configurable service framework. The services provided by the Web server are isolated from each other, including:

[0029] A service monitoring module is used to monitor the interface call request of the client through the service provided by the Web server; wherein the service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and perform routing registration;

[0030] A route matching module, configured to determine the route registration information of the function plug-in configured for the target service provided by the Web server in response to monitoring an interface call request;

[0031] The service processing module is used to determine a processing function based on the determined routing registration information, transmit the monitored interface call request to the determined processing function, perform corresponding processing, and return the processing result to the client.

[0032] Furthermore, the configurable service management device further includes:

[0033] A plug-in configuration module, used to perform function plug-in configuration on the service provided by the Web server in the effective function plug-in list, so that the service provided by the Web server has the function provided by the configured function plug-in;

[0034] A file generation module, used to compile the code of the service provided by the Web server, and compile the code of the configured function plug-in based on the effective function plug-in list to generate an executable file;

[0035] A routing registration module, used to perform routing registration on the configured functional plug-in based on the effective functional plug-in list to obtain corresponding routing registration information;

[0036] A service startup module is used to start the service provided by the Web server based on the executable file.

[0037] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the configurable service management method described in the first aspect are implemented.

[0038] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the configurable service management method as described in the first aspect.

[0039] In a fifth aspect, an embodiment of the present invention further provides a computer program product having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the steps of the configurable service management method described in the first aspect.

[0040] The configurable service management method and device provided in the embodiment of the present invention configure the function plug-in of the service provided by the Web server through the effective function plug-in list, and perform routing registration for the function plug-in configured for the service provided by the Web server. Based on the unified underlying service of routing, the plug-in and its routing registration information are used to realize flexible combination and quick addition and deletion of business functions according to needs, thereby enhancing the independence of business logic, avoiding mutual influence between business codes, increasing the stability of the system, and facilitating the maintenance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 It is a flowchart of the configurable service management method provided by the present invention;

[0043] Figure 2 It is a schematic diagram of a flow chart of configuring services provided by a Web server provided by the present invention;

[0044] Figure 3 It is another flow chart of configuring the services provided by the Web server provided by the present invention;

[0045] Figure 4 It is a schematic diagram of an application scenario of the configurable service management method provided by the present invention;

[0046] Figure 5 is a schematic diagram of another application scenario of the configurable service management method provided by the present invention;

[0047] Figure 6 It is a schematic diagram of the composition structure of the configurable service management device provided by the present invention;

[0048] Figure 7 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] Combine the following Figure 1-Figure 5 The configurable service management method of the present invention is described.

[0051] See also Figure 1 , Figure 1 is a flow chart of the configurable service management method provided by the present invention, Figure 1 The configurable service management method shown can be applied to a Web server. The Web server adopts a configurable service framework. The services provided by the Web server are isolated from each other. Figure 1 As shown, the configurable service management method at least includes:

[0052] 101. Listen to the interface call request of the client through the service provided by the Web server. The service provided by the Web server configures the function plug-in based on the effective function plug-in list and registers the route.

[0053] In the embodiment of the present invention, the Web server is used to connect with the client, receive the service request sent by the client through the Web browser, process the service request and feed back the processing result to the Web browser. Usually, the Web server uses the Hyper Text Transfer Protocol (HTTP) to exchange information with the client, so the Web server can also be called an HTTP server. The Web server can be a physical server including an independent host, a virtual server carried by a host cluster, a cloud server, etc. The embodiment of the present invention does not limit the implementation method of the Web server. The service provided by the Web server can be provided to the client in the form of an application programming interface (API) for the client to call. The service provided by the Web server can provide services to the client by monitoring the client's interface call request to the application programming interface.

[0054] In an embodiment of the present invention, the services provided by the Web server can be determined according to the application scenario of the Web server. The embodiment of the present invention does not limit the application scenario of the Web server. For example, the Web server can be a server applied to a bank, or a server applied to an ordinary company, etc. Each service provided by the Web server can include basic functions provided by the system itself and extended functions provided by functional plug-ins. For example, the system login service can include a system login function and a rule filtering function, wherein the system login function is a basic function provided by the system itself, and the rule filtering function is an extended function provided by a functional plug-in. Two or more services provided by the Web server can include extended functions provided by the same functional plug-in. For example, the system login service can include a rule filtering function, and the resource management service can also include a rule filtering function. The rule filtering function can be provided to the system login service and the resource management service through the same functional plug-in. The service provided by the Web server can be to configure the functional plug-in through the effective functional plug-in list and perform routing registration.

[0055] 102. The target service provided by the Web server determines the routing registration information of the function plug-in configured for the target service in response to monitoring the interface call request.

[0056] In an embodiment of the present invention, the target service provided by the Web server may be any service that the Web server can provide. For example, the target service may be a system login service provided by the Web server. The embodiment of the present invention does not limit the type of target service provided by the Web server. When the target service provided by the Web server monitors an interface call request from a client, the target service provided by the Web server will respond to the interface call request and determine the function plug-in configured for the target service and the routing registration information of the function plug-in configured for the target service. Optionally, the services that the Web server can provide may be different for clients with different permissions. In this case, the interface call request monitored by the target service provided by the Web server may be an interface call request from a client that has permission for the target service.

[0057] 103 , determining a processing function based on the determined routing registration information, transmitting the monitored interface call request to the determined processing function, performing corresponding processing, and returning the processing result to the client.

[0058] In an embodiment of the present invention, after determining the routing registration information of the function plug-in configured by the target service, the processing function corresponding to the configured function plug-in can be determined according to the determined routing registration information, and the monitored interface call request can be transmitted to the determined processing function, and corresponding processing can be performed to obtain corresponding processing results, and the obtained processing results can be returned to the client. Optionally, the target service can be configured with only one function plug-in, or the target service can also be configured with multiple function plug-ins. The embodiment of the present invention does not limit the number of function plug-ins configured by the target service. When the target service is configured with multiple function plug-ins, the routing registration information of each function plug-in configured by the target service can be determined according to the monitored interface call request, and the corresponding processing function can be determined according to the routing registration information of each function plug-in, and the monitored interface call request can be transmitted to the determined multiple processing functions respectively, and corresponding processing can be performed to obtain corresponding processing results, and the obtained multiple processing results can be returned to the client as the response result of the target service to the client interface call request.

[0059] The configurable service management method provided by the embodiment of the present invention configures function plug-ins for services provided by a Web server through a list of effective function plug-ins, and performs routing registration for function plug-ins configured for services provided by the Web server. Based on routing-based unified underlying services, plug-ins and their routing registration information are utilized to realize flexible combination and quick addition and deletion of business functions according to requirements, thereby enhancing the independence of business logics, avoiding mutual influence between business codes, increasing system stability, and facilitating system maintenance.

[0060] See also Figure 2 , Figure 2 It is a flow chart of configuring the services provided by the Web server provided by the present invention, such as Figure 2 As shown, configuring the services provided by the Web server includes at least:

[0061] 201 , in the effective function plug-in list, configure the function plug-in for the service provided by the Web server, so that the service provided by the Web server has the functions provided by the configured function plug-in.

[0062] In an embodiment of the present invention, a corresponding function plug-in configuration can be performed for each service provided by the Web server through an effective function plug-in list according to the functions of each service provided by the Web server. Optionally, a plug-in set or a plug-in database can be pre-set, and a function plug-in in the plug-in set or the plug-in database can be used to configure a function plug-in for each service provided by the Web server in the effective function plug-in list. Optionally, when configuring function plug-ins for the services provided by the Web server through the effective function plug-in list, a function of the service provided by the Web server can be provided through a function plug-in in a pre-set plug-in set or the plug-in database, or a function of the service provided by the Web server can be provided through a combination of several function plug-ins in a pre-set plug-in set or the plug-in database, which is not limited in the embodiment of the present invention.

[0063] Optionally, function plug-ins in other servers that use the same service framework as the Web server can also be migrated to a pre-set plug-in collection or plug-in database as function plug-ins in the plug-in collection or plug-in database of the Web server, and the function plug-ins are configured for the services provided by the Web server to implement the configuration of new functions of the Web server. For example, the Web server and other servers all use the gin service framework, which is an HTTP Web service framework written in the Go (Golang) language with efficient performance and concise interface.

[0064] 202 , compile the code of the service provided by the Web server, and compile the code of the configured function plug-in based on the effective function plug-in list to generate an executable file.

[0065] In an embodiment of the present invention, after the effective function plug-in list is configured, the code of the service provided by the Web server can be compiled to generate an executable file of the service provided by the Web server. When the code of the service provided by the Web server is compiled to generate the executable file of the service provided by the Web server, the configured effective function plug-in list can be read and the code of the function plug-in in the configured effective function plug-in list can be compiled to make the function plug-in in the configured effective function plug-in list effective in the generated executable file, thereby making the service provided by the Web server have the functions of the function plug-in configured by the configured effective function plug-in list.

[0066] 203 , performing route registration for the configured function plug-in based on the effective function plug-in list to obtain corresponding route registration information.

[0067] In an embodiment of the present invention, after generating an executable file of a service provided by a Web server, the function plug-in configured in the configured effective function plug-in list can be routed and registered according to the configured effective function plug-in list, and the route registration information corresponding to the function plug-in configured in the configured effective function plug-in list can be obtained. According to the route registration information corresponding to the function plug-in configured in the configured effective function plug-in list, the processing function corresponding to the function plug-in configured in the configured effective function plug-in list can be determined, and the function possessed by the function plug-in can be realized by performing corresponding processing through the determined processing function.

[0068] 204: Start the service provided by the Web server based on the executable file.

[0069] In an embodiment of the present invention, after obtaining the executable file of the service provided by the Web server and the corresponding route registration information, the Web server can start the service provided by the Web server according to the executable file, and after the service provided by the Web server is started, the client's interface call request is monitored through the service provided by the Web server. Optionally, after the service provided by the Web server is started, the function plug-in configuration and route registration information of the service provided by the Web server can also be initialized, and after the function plug-in configuration and route registration information of the service provided by the Web server are initialized, the monitoring of the client's interface call request is started.

[0070] In the embodiment of the present invention, the function plug-in of the service provided by the Web server is directly configured on the Web server through the effective function plug-in list, so as to facilitate timely adjustment of the function of the service provided by the Web server according to demand.

[0071] See also Figure 3 , Figure 3FIG. 1 is another flow chart of configuring the services provided by the Web server provided by the present invention, such as Figure 3 As shown, configuring the services provided by the Web server includes at least:

[0072] 301 , in the effective function plug-in list, remove the target function plug-in from the function plug-ins configured for the target service provided by the Web server, and update the function plug-in configured for the target service.

[0073] In an embodiment of the present invention, for a configured effective function plug-in list, according to different application scenarios, in the effective function plug-in list, a target function plug-in can be removed from the function plug-ins configured for the target service provided by the Web server, and the function plug-in configured for the target service in the effective function plug-in list can be updated, so that the target service provided by the Web server no longer has the function provided by the target function plug-in. The embodiment of the present invention does not limit the number and type of target function plug-ins and the type of target service.

[0074] 302 , compile the code of the service provided by the Web server, and compile the code of the configured function plug-in based on the effective function plug-in list to generate an executable file.

[0075] In the embodiment of the present invention, the description of 302 can be found in Figure 2 The description about 202 is given in the specification, so it will not be repeated here.

[0076] 303 , performing route registration for the configured function plug-in based on the effective function plug-in list to obtain corresponding route registration information.

[0077] In the embodiment of the present invention, the description of 303 can be found in Figure 2 The description about 203 is given in the specification, so it will not be repeated here.

[0078] 304, sending the executable file and routing registration information to the Web server.

[0079] 305, the Web server receives the executable file and the routing registration information.

[0080] In the embodiment of the present invention, the function plug-in of the service provided by the Web server is configured through the effective function plug-in list, and the executable file of the service provided by the Web server is generated according to the configured effective function plug-in list, and the route registration is performed according to the configured effective function plug-in list to obtain the route registration information corresponding to the configured function plug-in. This is not performed on the Web server, but on a dedicated configuration server. After obtaining the executable file of the service provided by the Web server and the corresponding route registration information, the dedicated configuration server can encapsulate the obtained executable file of the service provided by the Web server and the corresponding route registration information, and send the encapsulated file to the Web server. The Web server can then receive the encapsulated file of the executable file and the corresponding route registration information sent by the dedicated configuration server, and configure the service provided by the Web server.

[0081] 306, starting the service provided by the Web server based on the executable file.

[0082] In the embodiment of the present invention, the description of 306 can be found in Figure 2 The description of 204 is given in the manual, so it will not be repeated here.

[0083] In an embodiment of the present invention, a dedicated configuration server is used to configure the functional plug-ins of the services provided by the Web server through a list of effective functional plug-ins, and the configuration of the services provided by the Web server is isolated from the Web server, which is convenient for ensuring the stability of the services provided by the Web server. At the same time, the configuration of the Web server can be reduced, and different service configurations for multiple Web servers can be implemented through a dedicated configuration server.

[0084] See also Figure 4 and Figure 5 , Figure 4 is a schematic diagram of an application scenario of the configurable service management method provided by the present invention, Figure 5 It is a schematic diagram of another application scenario of the configurable service management method provided by the present invention.

[0085] The interface is the entry point for triggering a service / operation of the Web server. The interface call is usually a client sending an http request, such as a system login request. The client needs to send an http request to the system login interface.

[0086] make is a compilation command required by a compiled language, and makefile is a compilation rule required by a compiled language. In response to the compilation command, the code of the service provided by the Web server can be compiled according to the compilation rule to generate an executable file of the service provided by the Web server;

[0087] The effective function plug-in list is configured with function plug-ins of services provided by the Web server, such as function plug-ins ModuleA and ModuleB. When the code of the service provided by the Web server is compiled to generate an executable file of the service provided by the Web server, the effective function plug-in list is read and the code of the function plug-in configured in the effective function plug-in list is compiled, so that the service provided by the Web server has the corresponding functions provided by the configured function plug-in;

[0088] Route_ModuleA.go and Route_ModuleB.go are the route registration information obtained by performing route registration on the function plug-ins configured in the effective function plug-in list according to the effective function plug-in list after the executable file of the service provided by the Web server is generated;

[0089] The ModuleA service logic is used to perform service logic processing of the functional plug-in ModuleA, and the ModuleB service logic is used to perform service logic processing of the functional plug-in ModuleB.

[0090] After the dedicated configuration server generates the executable file of the service provided by the Web server and the corresponding routing registration information, the executable file of the service provided by the Web server and the corresponding routing registration information can be encapsulated and sent to the Web server. The Web server can start the service provided by the Web server according to the executable file, initialize the function plug-in configured for the service provided by the Web server, initialize the routing registration information, and then start monitoring, monitor the interface call request of the client through the service provided by the Web server, and after the target service monitors the interface call request, determine the routing registration information of the function plug-in configured for the target service, determine the processing function according to the determined routing registration information, transmit the monitored interface call request to the determined processing function, perform corresponding processing, and return the processing result to the client.

[0091] like Figure 4 As shown, in an application scenario, it is necessary to add a new business B to a service provided by the Web server while ensuring that other old businesses are stable and available, for example, when testing the newly added business B; a new business function plug-in ModuleB can be configured for the service provided by the Web server in the effective function plug-in list, wherein the function plug-in ModuleA in the effective function plug-in list is the function plug-in for the old business; and the B service logic is added through the routing registration information Route_ModuleB.go, and the function plug-in ModuleB is made effective by compiling the code of the function plug-in in the effective function plug-in list.

[0092] like Figure 5 As shown, in another application scenario, it is necessary to remove a service B in a service provided by the Web server. For example, when repairing a problem existing in an existing service A, it is necessary to ensure that the system is stable and reliable, and it is necessary to remove the newly added service B. It is only necessary to remove the function plug-in ModuleB configured in the service provided by the Web server in the effective function plug-in list. When compiling the function plug-in in the effective function plug-in list, the function plug-in ModuleB will no longer be compiled into the service, even if the function plug-in ModuleB fails, and there is no need to remove the route registration information Route_ModuleB.go and B service logic of the service B.

[0093] See also Figure 6 , Figure 6 is a schematic diagram of the composition structure of the configurable service management device provided by the present invention, Figure 6 The configurable service management device shown is applied to a Web server and can be used to execute Figure 1 The configurable service management method of the Web server adopts a configurable service framework, and the services provided by the Web server are isolated from each other, such as Figure 6 As shown, the configurable service management device at least includes:

[0094] The service monitoring module 610 is used to monitor the interface call request of the client through the service provided by the Web server; wherein the service provided by the Web server configures the function plug-in based on the effective function plug-in list and performs routing registration.

[0095] The route matching module 620 is used for the target service provided by the Web server to respond to the interface call request monitored and determine the route registration information of the function plug-in configured for the target service.

[0096] The service processing module 630 is used to determine a processing function based on the determined routing registration information, transmit the monitored interface call request to the determined processing function, perform corresponding processing, and return the processing result to the client.

[0097] Optionally, the configurable service management device further includes:

[0098] The plug-in configuration module is used to configure the function plug-in for the service provided by the Web server in the effective function plug-in list, so that the service provided by the Web server has the functions provided by the configured function plug-in.

[0099] The file generation module is used to compile the code of the service provided by the Web server, and compile the code of the configured function plug-in based on the effective function plug-in list to generate an executable file.

[0100] The routing registration module is used to perform routing registration on the configured functional plug-in based on the effective functional plug-in list to obtain corresponding routing registration information.

[0101] The service startup module is used to start the service provided by the Web server based on the executable file.

[0102] Optionally, the configurable service management device further includes a configuration server, the plug-in configuration module, the file generation module and the routing registration module are arranged on the configuration server, and the configuration server further includes:

[0103] The sending module is used to send the executable file and the routing registration information to the Web server.

[0104] The web server also includes:

[0105] The receiving module is used by the Web server to receive executable files and routing registration information.

[0106] Optionally, the plug-in configuration module is used to perform function plug-in configuration on the service provided by the Web server based on the function plug-in in the preset plug-in set and in the effective function plug-in list.

[0107] Optionally, the plug-in configuration module is further used to migrate functional plug-ins in other servers that use the same service framework as the Web server to the plug-in collection as functional plug-ins in the plug-in collection.

[0108] Optionally, the configurable service management device further includes:

[0109] The plug-in removal module is used to remove the target function plug-in from the function plug-ins configured for the target service provided by the Web server in the effective function plug-in list, and update the function plug-in configured for the target service.

[0110] Optionally, the Web server adopts a gin service framework.

[0111] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 complete mutual communication through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the following method: monitor the interface call request of the client through the service provided by the Web server; wherein the service provided by the Web server configures the function plug-in based on the effective function plug-in list and performs route registration; the target service provided by the Web server responds to the interface call request monitored, determines the route registration information of the function plug-in configured by the target service; determines the processing function based on the determined route registration information, transmits the monitored interface call request to the determined processing function, performs corresponding processing, and returns the processing result to the client.

[0112] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0113] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the methods provided in the above embodiments, for example, including: monitoring an interface call request of a client through a service provided by a Web server; wherein the service provided by the Web server configures a function plug-in based on a list of effective function plug-ins and performs routing registration; in response to monitoring the interface call request, a target service provided by the Web server determines the routing registration information of the function plug-in configured by the target service; based on the determined routing registration information, a processing function is determined, the monitored interface call request is transmitted to the determined processing function, corresponding processing is performed, and the processing result is returned to the client.

[0114] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0116] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A configurable service management method, characterized in that: Applied to a Web server, the Web server adopts a configurable service framework, and the services provided by the Web server are isolated from each other, including: The interface call request of the client is monitored through the service provided by the Web server; wherein the service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and perform routing registration; The target service provided by the Web server determines, in response to monitoring the interface call request, the routing registration information of the function plug-in configured by the target service; Determine a processing function based on the determined routing registration information, transmit the monitored interface call request to the determined processing function, perform corresponding processing, and return the processing result to the client; The service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and register the route, including: In the effective function plug-in list, function plug-in configuration is performed on the service provided by the Web server, so that the service provided by the Web server has the function provided by the configured function plug-in; Compiling the code of the service provided by the Web server, and compiling the code of the configured function plug-in based on the effective function plug-in list to generate an executable file; Based on the effective function plug-in list, the configured function plug-in is route registered to obtain corresponding route registration information.

2. The configurable service management method according to claim 1, characterized in that: Before the service provided by the Web server monitors the client's interface call request, the method further includes: The service provided by the Web server is started based on the executable file.

3. The configurable service management method according to claim 2, characterized in that: The configured function plug-in is route-registered based on the effective function plug-in list to obtain corresponding route registration information, and the method further includes: Sending the executable file and the routing registration information to the Web server; Before starting the service provided by the Web server based on the executable file, the method further includes: The Web server receives the executable file and the routing registration information.

4. The configurable service management method according to any one of claims 2 or 3, characterized in that: In the effective function plug-in list, function plug-in configuration is performed on the service provided by the Web server, including: Based on the function plug-ins in the preset plug-in set, in the effective function plug-in list, function plug-in configuration is performed on the service provided by the Web server.

5. The configurable service management method according to claim 4, characterized in that: In the effective function plug-in list, before configuring the function plug-in for the service provided by the Web server, the method further includes: Functional plug-ins in other servers that use the same service framework as the Web server are migrated to the plug-in set as functional plug-ins in the plug-in set.

6. The configurable service management method according to claim 2, 3 or 5, characterized in that: The feature is that the service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and perform routing registration, and also includes: In the effective function plug-in list, a target function plug-in is removed from the function plug-ins configured for the target service provided by the Web server, and the function plug-in configured for the target service is updated.

7. The configurable service management method according to any one of claims 1 to 3 and 5, characterized in that: The Web server adopts the gin service framework.

8. A configurable service management device, characterized in that: Applied to a Web server, the Web server adopts a configurable service framework, and the services provided by the Web server are isolated from each other, including: A service monitoring module is used to monitor the interface call request of the client through the service provided by the Web server; wherein the service provided by the Web server is to configure the function plug-in based on the effective function plug-in list and perform routing registration; A route matching module, configured to determine the route registration information of the function plug-in configured for the target service provided by the Web server in response to monitoring an interface call request; The service processing module is used to determine the processing function based on the determined routing registration information, transmit the monitored interface call request to the determined processing function, perform corresponding processing, and return the processing result to the client; The service monitoring module is specifically used to configure the function plug-in for the service provided by the Web server in the effective function plug-in list, so that the service provided by the Web server has the function provided by the configured function plug-in; The service monitoring module is further configured to compile the code of the service provided by the Web server, and compile the code of the configured function plug-in based on the effective function plug-in list to generate an executable file; The service monitoring module is further configured to perform routing registration on the configured function plug-in based on the effective function plug-in list to obtain corresponding routing registration information.

9. The configurable service management device according to claim 8, characterized in that: Also includes: A plug-in configuration module, used to perform function plug-in configuration on the service provided by the Web server in the effective function plug-in list, so that the service provided by the Web server has the function provided by the configured function plug-in; A file generation module, used to compile the code of the service provided by the Web server, and compile the code of the configured function plug-in based on the effective function plug-in list to generate an executable file; A routing registration module, used to perform routing registration on the configured functional plug-in based on the effective functional plug-in list to obtain corresponding routing registration information; A service startup module is used to start the service provided by the Web server based on the executable file.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the configurable service management method according to any one of claims 1 to 7 are implemented.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the configurable service management method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Route updating method and device

    CN111314141A