Service management method, device and electronic equipment
Through the global service registration server to update and push global service information, the problem of information out-of-synchronization between microservice platforms is solved, and information synchronization and service management functions are retained.
Patent Information
- Application Number
- CN202211738141.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The service information of different microservice platforms cannot be communicated, resulting in the problem of out-of-synchronization.
The global service registration server receives the service information of the target microservice platform, updates the global service information, and pushes the updated global service information to multiple microservice platforms to achieve information synchronization.
Without invading multiple microservice platforms, service information synchronization between multiple microservice platforms is realized, and their respective service management and governance functions are retained.
Smart Images

Figure CN116074372B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a service management method, device, and electronic device. Background Art
[0002] With the advancement of technology, businesses are expanding. To facilitate management of these businesses, they can be uploaded to the cloud. Currently, most cloud-based businesses utilize a microservices architecture. Businesses can be deployed on microservices platforms such as SpringCloud, Kubernetes, and Istio, and many businesses can be deployed on all three platforms simultaneously. However, because different microservices platforms provide different service discovery and registration mechanisms, services on these platforms cannot communicate with each other. This means that service information on different microservices platforms is out of sync. Summary of the Invention
[0003] In view of the above problems, the present application proposes a service management method, device, electronic device and computer program product to improve the above problems.
[0004] In a first aspect, the present application provides a service management method, applied to a global service registration server, the method comprising: receiving service information sent by a target microservice platform, the target microservice platform being a microservice platform whose service information is updated; updating global service information in the global service registration server based on the service information, the global service information including service information of multiple microservice platforms;
[0005] The updated global service information is pushed to the multiple microservice platforms, so that the multiple microservice platforms can update their local global service information.
[0006] Optionally, the global service registration server includes a service viewing interface, and the multiple microservice platforms each include a local registration module and a service management module. Pushing the updated global service information to the multiple microservice platforms so that the multiple microservice platforms can update the local global service information includes: the service viewing interface pushes the updated global service information to the local registration modules corresponding to the multiple microservice platforms, so that the local registration modules corresponding to the multiple microservice platforms synchronize the updated global service information to the service management modules corresponding to the multiple microservice platforms.
[0007] In an embodiment of the present application, through the information interaction between the global service registration server and the local registration modules of multiple microservice platforms, as well as the information interaction between the local registration modules and the corresponding service management modules, global service information synchronization can be achieved without intruding into multiple microservice platforms, and the service registration and discovery, and service governance functions of the service management modules of multiple microservice platforms are retained.
[0008] Optionally, the multiple microservice platforms are heterogeneous.
[0009] In the second aspect, the present application provides a service management method applied to a microservice platform, the method comprising: in response to an update of the included service information, sending service information to a global service registration server, so that the global service registration server updates the global service information based on the service information, the global service information including service information of multiple microservice platforms; receiving the updated global service information sent by the global service registration server for updating the local global service information.
[0010] Optionally, the microservice platform includes a local registration module and a service management module, and in response to an update of the included service information, the service information is sent to the global service registration server, so that the global service registration server updates the global service information based on the service information, including: in response to the service being successfully registered in the service management module, the service management module updates the service information of the microservice platform; the local registration module obtains all service information of the microservice platform from the service management module; the local registration module sends the service information to the global service registration server, so that the global service registration server updates the global service information based on the service information.
[0011] In an embodiment of the present application, through the information interaction between the local registration module of the microservice platform and the global service registration server, as well as the information interaction between the local registration module and the corresponding service management module, all service information of the microservice platform can be obtained without intruding the microservice platform, so that the global service registration server can update the global service information based on the service information, and retain the service registration and discovery, and service governance functions of the service management modules of multiple microservice platforms.
[0012] Optionally, the receiving of updated global service information sent by the global service registration server for updating local global service information includes: the local registration module receiving the updated global service information; the local registration module sending the updated global service information to the service management module for updating local global service information.
[0013] Optionally, the local registration module sends the updated global service information to the service management module for updating the local global service information, including: the local registration module filters the updated global service information to obtain target service information, where the target service information is the service information of the external microservice platform; and sends the target service information to the service management module for updating the local global service information.
[0014] In a third aspect, the present application provides a service management system, the system including a global service registration server and multiple microservice platforms, wherein: a target microservice platform is configured to send service information to the global service registration server in response to an update to the included service information; the global service registration server is configured to receive the service information sent by the target microservice platform, the target microservice platform being the microservice platform whose service information has been updated; the global service registration server is configured to update the global service information in the global service registration server based on the service information, the global service information including the service information of the multiple microservice platforms; the global service registration server is configured to push the updated global service information to the multiple microservice platforms, so that the multiple microservice platforms can each update their local global service information. The target microservice platform is configured to receive the updated global service information sent by the global service registration server, so as to update its local global service information.
[0015] In a fourth aspect, the present application provides a service management device that runs on a global service registration server, the device comprising: a service information receiving unit for receiving service information sent by a target microservice platform, the target microservice platform being a microservice platform whose service information is updated; a global service information updating unit for updating the global service information in the global service registration server based on the service information, the global service information including service information of multiple microservice platforms; a global service information pushing unit for pushing updated global service information to the multiple microservice platforms, so that the multiple microservice platforms can each update their local global service information.
[0016] In the fifth aspect, the present application provides a service management device that runs on a microservice platform, and the device includes: a service information sending unit for sending service information to a global service registration server in response to an update of the included service information, so that the global service registration server can update the global service information based on the service information, and the global service information includes service information of multiple microservice platforms; a global service information receiving unit for receiving the updated global service information sent by the global service registration server, so as to update the local global service information.
[0017] In a sixth aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.
[0018] In a seventh aspect, the present application provides a computer program product, comprising a computer program / instruction, characterized in that the computer program / instruction implements the steps of the above method when executed by a processor.
[0019] In an eighth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores program code, wherein the above method is executed when the program code is run.
[0020] The present application provides a service management method, apparatus, electronic device, computer program product, and storage medium. After receiving service information sent by a microservice platform whose service information has been updated, the global service information including the service information of multiple microservice platforms in the global service registration server is updated based on the service information, and the updated global service information is pushed to the multiple microservice platforms so that the multiple microservice platforms can each update their local global service information. Through the above-mentioned method, the global service registration server can update the global service information based on the service information of the target microservice platform, and push the updated global service information to the multiple microservice platforms, so that each microservice platform can obtain the service information of multiple microservice platforms, thereby realizing information synchronization between the multiple microservice platforms. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1A schematic diagram showing an application scenario proposed in this application is shown;
[0023] Figure 2 A hardware schematic diagram of an application environment proposed in this application is shown;
[0024] Figure 3 A flow chart of a service management method proposed in an embodiment of the present application is shown;
[0025] Figure 4 A flow chart of a service management method proposed in another embodiment of the present application is shown;
[0026] Figure 5 A flowchart of a service management method proposed in another embodiment of the present application is shown;
[0027] Figure 6 A structural block diagram of a service management device proposed in an embodiment of the present application is shown;
[0028] Figure 7 A structural block diagram of another service management device proposed in an embodiment of the present application is shown;
[0029] Figure 8 The following is a structural diagram of a service management system proposed in an embodiment of the present application;
[0030] Figure 9 Shows a structural block diagram of an electronic device proposed in this application;
[0031] Figure 10 It is a storage unit for storing or carrying program codes for implementing the service management method according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0033] With the rapid development of technology, more and more businesses are being developed. In order to facilitate management, people have begun to deploy many businesses on microservice platforms such as SpringCloud, k8s, and Istio.
[0034] The inventors discovered during their research that this approach also suffers from the problem of service information being out of sync across different microservice platforms. For example, microservices registered on SpringCloud cannot be accessed by services on Kubernetes.
[0035] Therefore, the inventors have proposed a service management method, device, and electronic device in this application. After receiving service information sent by a microservice platform whose service information has been updated, the global service information including the service information of multiple microservice platforms in the global service registration server is updated based on the service information, and the updated global service information is pushed to the multiple microservice platforms so that the multiple microservice platforms can each update their local global service information. Through the above-mentioned method, the global service registration server can update the global service information based on the service information of the target microservice platform, and push the updated global service information to the multiple microservice platforms, so that each microservice platform can obtain the service information of multiple microservice platforms, thereby realizing information synchronization between the multiple microservice platforms.
[0036] In order to better understand the solutions of the embodiments of the present application, the application scenarios of the present application are first introduced below.
[0037] See also Figure 1 The service management system 10 of the present application may include a global service registration server 100 and multiple microservice platforms 200.
[0038] The global service registration server 100 may include a global registration module 101 . The global service registration server 100 may communicate with multiple microservice platforms 200 and store global service information through the global registration module 101 . The global service information may refer to service information of multiple microservice platforms 200 .
[0039] Multiple microservice platforms 200 can each include a local registration module 201 and a service management module 202. The local registration module 201 can communicate with the global registration module 101 to synchronize service information. The service management module 202 can be used to manage services within the microservice platform, such as service discovery and service registration. The multiple microservice platforms 200 can include Kubernetes, Istio, and SpringCloud. Kubernetes (full name: Kubernetes) is a portable, scalable, open-source platform that can be used to manage containerized workloads and services across multiple hosts within a cloud platform, providing services such as application deployment, planning, updates, and maintenance. Istio is an open platform for service governance in the form of a service mesh, tightly integrated with Kubernetes and suitable for cloud-native scenarios. SpringCloud is an ordered collection of frameworks. It leverages the development convenience of Spring Boot to cleverly simplify the development of distributed system infrastructure, such as service discovery and registration, configuration center, message bus, load balancing, circuit breakers, and data monitoring. All of these can be started and deployed with one click using the Spring Boot development style.
[0040] Kubernetes can include a local registration module, a service management module called API Server, CoreDNS, a component that provides DNS (Domain Name System) services, and various services. Istio can include a local registration module, a service management module called Pilot, a data plane component called Sidecar that provides service governance, an API Server that provides an external interface in Kubernetes, and various services. SpringCloud can include a local registration module, a service management module called Consul, components that provide service discovery called Eureka / Nacos, a programming framework (Software Development Kit) for application development, the DiscoveryClient / getServices interface for obtaining service information, the ServiceRegistry / register interface for receiving service information, and various services.
[0041] In the embodiments of this application, Figure 2 As shown, the global service registry server 100 can be a server used to maintain and update global information, and the multiple microservice platforms 200 can be a server cluster that can include physical machines (i.e., real servers) and virtual machines. To enable communication between the global service registry server 100 and the multiple microservice platforms 200, an aggregation switch 300 and multiple access switches 400 can also be provided.
[0042] The embodiments of the present application will be described below with reference to the accompanying drawings.
[0043] See also Figure 3 The present application provides a service management method, which is applied to a global service registration server, and the method includes:
[0044] S110: Receive service information sent by a target microservice platform, where the target microservice platform is a microservice platform whose service information is updated.
[0045] The service information may refer to the information of all services in the microservice platform. The service information may include the identifier, IP (Internet Protocol) address, port number, URL (Uniform Resource Locator), etc. of each service in the microservice platform. The target microservice platform may refer to Figure 1 A microservice platform where service information in the service system is updated.
[0046] In an embodiment of the present application, the global service registration server may include a global registration module, which may store global service information. The global registration module may also provide two GRPC (Google Remote Procedure Call) interfaces to communicate with the microservice platform, one of which may be a registration service interface (RegisterService), which may be used to receive service information from the microservice platform; and the other may be a service viewing interface (WatchService), which may be used to pull service information of a specified service or all services from the global registration module and push the pulled service information to the microservice platform.
[0047] As a method, the global service registration server can receive service information sent by the target microservice platform through the registration service interface (RegisterService), and the target microservice platform is the microservice platform whose service information is updated.
[0048] S120: Update the global service information in the global service registration server based on the service information, where the global service information includes service information of multiple microservice platforms.
[0049] Among them, multiple microservice platforms can be heterogeneous, and multiple microservice platforms can refer to Istio, k8s, and SpringCloud.
[0050] As a way, the global registration module can mix the service information of multiple microservice platforms together for storage. After receiving the service information, the global registration module can match the identifier of the service information with the identifier of the current global service information, and then replace the matched global service information with the service information, thereby realizing the update of the global service information.
[0051] Optionally, if the identifier of the existing service information does not match the identifier of the current global service information, it can indicate that the service corresponding to the service information is a new service in the target microservice platform, and the service information can be directly stored to achieve the update of the global service information.
[0052] As another way, the global registration module can classify and store the service information of multiple microservice platforms according to the different microservice platforms. After receiving the service information, the global registration module can determine the target microservice platform corresponding to the service information based on the IP address or port number of the service information, so that the service information can be directly used to replace the service information of the same microservice platform in the current global service information to achieve the update of the global service information.
[0053] S130: Pushing the updated global service information to the multiple microservice platforms, so that the multiple microservice platforms can update their local global service information.
[0054] Multiple microservice platforms can each include a local registration module and a service management module. The local registration module can be used to communicate with the global service registry server to synchronize service information. The service management module can be used to manage services in the microservice platform. The service management module for Istio can be Pilot, the service management module for SpringCloud can be Consul, and the service management module for Kubernetes can be API Server.
[0055] As a way, the service viewing interface can push the updated global service information to the local registration modules corresponding to multiple microservice platforms, so that the local registration modules corresponding to multiple microservice platforms can synchronize the updated global service information to the service management modules corresponding to multiple microservice platforms.
[0056] In an embodiment of the present application, through the information interaction between the global service registration server and the local registration modules of multiple microservice platforms, as well as the information interaction between the local registration modules and the corresponding service management modules, global service information synchronization can be achieved without intruding into multiple microservice platforms, and the service registration and discovery, and service governance functions of the service management modules of multiple microservice platforms are retained.
[0057] This embodiment provides a service management method that, upon receiving service information from a microservice platform whose service information has been updated, updates the global service information in the global service registration server, including the service information of multiple microservice platforms, based on the service information, and pushes the updated global service information to the multiple microservice platforms, allowing each of the multiple microservice platforms to update its local global service information. This method allows the global service registration server to update the global service information based on the service information of the target microservice platform and push the updated global service information to the multiple microservice platforms, so that each microservice platform can obtain the service information of multiple microservice platforms, thereby achieving information synchronization between the multiple microservice platforms.
[0058] See also Figure 4 , this application provides a service management method, which is applied to a microservice platform, and the method includes:
[0059] S210: In response to the existence of an update in the included service information, the service information is sent to the global service registration server, so that the global service registration server updates the global service information based on the service information, where the global service information includes service information of multiple microservice platforms.
[0060] As a method, in response to the successful registration of the service in the service management module, the service management module can update the service information of the microservice platform; the local registration module obtains all the service information of the microservice platform from the service management module; the local registration module sends all the service information of the microservice platform to the global service registration server, so that the global service registration server can update the global service information based on all the service information of the microservice platform.
[0061] In an embodiment of the present application, when a new service appears on the microservice platform or an existing service is updated, the new service or the updated existing service can be registered with the service management module. When the registration is successful, the service management module can store the service information of the new service or update the service information of the corresponding existing service to update the service information of the microservice platform. After the service management module updates the service information of the microservice platform, the local registration module can obtain all the service information of the microservice platform from the service management module and send all the service information of the microservice platform to the global service registration server through the registration service interface (RegisterService), so that the global service registration server can update the global service information based on all the service information of the microservice platform.
[0062] Optionally, when the microservice platform is Istio, the service management module can be Pilot, and the local registration module can obtain all Istio service information from Pilot using the XDS (X Discovery Service) protocol. When the microservice platform is Spring Cloud, the local registration module can obtain all Spring Cloud service information from Consul using discoveryClient.getServices. When the microservice platform is Kubernetes, the service management module can be the API server, and the local registration module can obtain all Kubernetes service information from the API server.
[0063] In an embodiment of the present application, through the information interaction between the local registration module of the microservice platform and the global service registration server, as well as the information interaction between the local registration module and the corresponding service management module, all service information of the microservice platform can be obtained without intruding the microservice platform, so that the global service registration server can update the global service information based on the service information, and retain the service registration and discovery, and service governance functions of the service management modules of multiple microservice platforms.
[0064] S220: Receive updated global service information sent by the global service registration server to update local global service information.
[0065] As a method, the local registration module receives the updated global service information; the local registration module sends the updated global service information to the service management module for updating the local global service information.
[0066] Optionally, the local registration module may receive updated global service information sent by the global service registration server based on the service viewing interface (WatchService).
[0067] Optionally, when the microservice platform is Istio, the service management module can be Pilot, and the local registration module can send the acquired global service information to Pilot via the XDS protocol. When the microservice platform is SpringCloud, the local registration module can send the acquired global service information to Consul via the ServiceRegistry.register interface of SpringCloudCommon. When the microservice platform is Kubernetes, the service management module can be APIServer, and the local registration module can be used to implement the DNS server function and modify the coreDNS configuration to forward DNS queries from the global service registry server to the APIServer, so that the APIServer can obtain global service information.
[0068] Optionally, the local registration module filters the updated global service information to obtain target service information, which is the service information of the external microservice platform; and sends the target service information to the service management module for updating the local global service information.
[0069] A service management method provided in this embodiment enables, through the above-mentioned method, a microservice platform to send all service information of the microservice platform to a global service registration server when there is an update to the included service information, so that the global service registration server can update the global service information based on all service information of the microservice platform.
[0070] See also Figure 5 The present application provides a service management system 100, characterized in that the system includes a global service registration server 110 and multiple microservice platforms 120, wherein:
[0071] S310: In response to the update of the included service information, the target microservice platform sends the service information to the global service registration server.
[0072] S320: The global service registration server receives service information sent by a target microservice platform, where the target microservice platform is a microservice platform whose service information is updated.
[0073] S330: The global service registration server updates the global service information in the global service registration server based on the service information, where the global service information includes service information of the multiple microservice platforms.
[0074] S340: The global service registration server pushes the updated global service information to the multiple microservice platforms, so that the multiple microservice platforms can update their local global service information.
[0075] S350: The target microservice platform receives the updated global service information sent by the global service registration server to update the local global service information.
[0076] See also Figure 6 The present application provides a service management device 400, which runs on a global service registration server. The device 400 includes:
[0077] The service information receiving unit 410 is configured to receive service information sent by a target microservice platform, where the target microservice platform is a microservice platform whose service information is updated.
[0078] The global service information updating unit 420 is configured to update the global service information in the global service registration server based on the service information, where the global service information includes service information of multiple microservice platforms.
[0079] The global service information pushing unit 430 is configured to push the updated global service information to the multiple microservice platforms, so that the multiple microservice platforms can update their local global service information.
[0080] As a method, the global service registration server includes a service viewing interface, and the multiple microservice platforms each include a local registration module and a service management module. The global service information push unit 430 is specifically used for the service viewing interface to push the updated global service information to the local registration modules corresponding to the multiple microservice platforms, so that the local registration modules corresponding to the multiple microservice platforms synchronize the updated global service information to the service management modules corresponding to the multiple microservice platforms.
[0081] Optionally, the multiple microservice platforms are heterogeneous.
[0082] See also Figure 7 The present application provides a service management device 600, which runs on a microservice platform. The device 600 includes:
[0083] The service information sending unit 610 is used to send service information to the global service registration server in response to the existence of an update in the included service information, so that the global service registration server updates the global service information based on the service information, and the global service information includes service information of multiple microservice platforms.
[0084] The global service information receiving unit 620 is configured to receive the updated global service information sent by the global service registration server, so as to update the local global service information.
[0085] As a method, the microservice platform includes a local registration module and a service management module, and the service information sending unit 610 is specifically used to respond to the successful registration of the service in the service management module, and the service management module updates the service information of the microservice platform; the local registration module obtains all service information of the microservice platform from the service management module; the local registration module sends the service information to the global service registration server, so that the global service registration server updates the global service information based on the service information.
[0086] As a method, the global service information receiving unit 620 is specifically used for the local registration module to receive the updated global service information; the local registration module sends the updated global service information to the service management module for updating the local global service information.
[0087] Among them, optionally, the global service information receiving unit 620 is specifically used for the local registration module to filter out the updated global service information to obtain target service information, where the target service information is the service information of the external microservice platform; and send the target service information to the service management module for updating the local global service information.
[0088] See also Figure 8 , the present application provides a service management system 100, characterized in that the system includes a global registration server 110 and multiple microservice platforms 120.
[0089] The following will be combined Figure 9 An electronic device provided by this application is described.
[0090] See also Figure 9 Based on the above-mentioned service management method and device, the embodiment of the present application also provides another electronic device 200 that can execute the above-mentioned service management method. The electronic device 200 includes one or more (only one is shown in the figure) processors 202 and a memory 204 coupled to each other. The memory 204 stores a program that can execute the contents of the above-mentioned embodiments, and the processor 202 can execute the program stored in the memory 204. The processor 202 may include one or more processing cores. The processor 202 uses various interfaces and lines to connect various parts within the entire electronic device 200, and executes various functions of the electronic device 200 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 204, and calling data stored in the memory 204.
[0091] Optionally, the processor 202 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 202 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 202, but may be implemented separately through a communication chip.
[0092] The memory 204 may include a random access memory (RAM) or a read-only memory (ROM). The memory 204 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 204 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the terminal 100 during use (such as a phone book, audio and video data, chat history data, etc.).
[0093] Please refer to Figure 10 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 800 stores program code, which can be called by a processor to execute the method described in the above method embodiment.
[0094] The computer-readable storage medium 800 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for program code 810 for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 800 can be compressed, for example, in a suitable form.
[0095] In summary, the present application provides a service management method, device, electronic device, computer program product, and storage medium. After receiving service information sent by a microservice platform whose service information has been updated, the global service information including the service information of multiple microservice platforms in the global service registration server is updated based on the service information, and the updated global service information is pushed to the multiple microservice platforms so that the multiple microservice platforms can each update their local global service information. Through the above-mentioned method, the global service registration server can update the global service information based on the service information of the target microservice platform, and push the updated global service information to the multiple microservice platforms, so that each microservice platform can obtain the service information of multiple microservice platforms, thereby realizing information synchronization between multiple microservice platforms.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A service management method, characterized in that: Applied to a global service registration server, the global service registration server includes a global registration module, the global registration module provides a registration service interface and a service viewing interface, the method includes: Calling the registration service interface to receive service information sent by the target microservice platform, where the target microservice platform is the microservice platform whose service information is updated; updating global service information in the global service registration server based on the service information, wherein the global service information includes service information of multiple microservice platforms, wherein the multiple microservice platforms belong to multiple open source platforms, and each of the multiple microservice platforms includes a local registration module and a service management module; Pushing the updated global service information to the multiple microservice platforms so that the multiple microservice platforms can update their local global service information; The pushing of the updated global service information to the multiple microservice platforms so that the multiple microservice platforms can each update the local global service information includes: The service viewing interface is called to push the updated global service information to the local registration modules corresponding to the multiple microservice platforms, so that the local registration modules corresponding to the multiple microservice platforms synchronize the updated global service information to the service management modules corresponding to the multiple microservice platforms.
2. The method according to claim 1, characterized in that The multiple microservice platforms are heterogeneous.
3. A service management method, characterized in that: Applied to a microservice platform, the method includes: In response to an update to the included service information, sending the service information to a registration service interface of a global service registration server, so that the global service registration server updates the global service information based on the service information, wherein the global service information includes service information of multiple microservice platforms, the global service registration server includes a global registration module, the global registration module provides a service viewing interface and the registration service interface, the multiple microservice platforms belong to multiple open source platforms, and each of the microservice platforms includes a local registration module and a service management module; The local registration module of the microservice platform is called to receive the updated global service information sent by the service viewing interface of the global service registration server, so as to update the local global service information.
4. The method according to claim 3, characterized in that The microservice platform includes a local registration module and a service management module, and in response to an update of the included service information, sends the service information to the global service registration server, so that the global service registration server updates the global service information based on the service information, including: In response to the service being successfully registered in the service management module, the service management module updates the service information of the microservice platform; The local registration module obtains all service information of the microservice platform from the service management module; The local registration module sends the service information to the global service registration server, so that the global service registration server updates global service information based on the service information.
5. The method according to claim 4, characterized in that The receiving the updated global service information sent by the global service registration server to update the local global service information includes: The local registration module receives the updated global service information; The local registration module sends the updated global service information to the service management module for updating the local global service information.
6. The method according to claim 5, characterized in that The local registration module sends the updated global service information to the service management module for updating the local global service information, including: The local registration module filters the updated global service information to obtain target service information, where the target service information is service information of the external microservice platform; The target service information is sent to the service management module for updating the local global service information.
7. A service management system, characterized in that: The system includes a global service registration server and multiple microservice platforms, wherein: The target microservice platform is configured to send service information to a registration service interface of the global service registration server in response to an update of the included service information, wherein the global service registration server includes a global registration module, and the global registration module provides a service viewing interface and the registration service interface; The global service registration server is used to receive service information sent by a target microservice platform, where the target microservice platform is the microservice platform whose service information is updated; The global service registration server is configured to update global service information in the global service registration server based on the service information, wherein the global service information includes service information of the multiple microservice platforms, the multiple microservice platforms belong to multiple open source platforms, and each of the microservice platforms includes a local registration module and a service management module; The global service registration server is used to call the service viewing interface to push the updated global service information to the multiple microservice platforms, so that the multiple microservice platforms can update their local global service information. The local registration module of the target microservice platform is used to receive the updated global service information sent by the global service registration server, so as to update the local global service information.
8. A service management device, characterized in that: Running on a global service registration server, the global service registration server includes a global registration module, the global registration module provides a registration service interface and a service viewing interface, the device includes: A service information receiving unit, configured to call the registration service interface to receive service information sent by a target microservice platform, wherein the target microservice platform is a microservice platform whose service information is updated; a global service information updating unit, configured to update global service information in the global service registration server based on the service information, wherein the global service information includes service information of multiple microservice platforms, wherein the multiple microservice platforms belong to multiple open source platforms, and each of the multiple microservice platforms includes a local registration module and a service management module; The global service information pushing unit is used to call the service viewing interface to push the updated global service information to the local registration modules corresponding to the multiple microservice platforms, so that the local registration modules corresponding to the multiple microservice platforms synchronize the updated global service information to the service management modules corresponding to the multiple microservice platforms.
9. A service management device, characterized in that: Running on a microservice platform, the device includes: a service information sending unit, configured to send the service information to a registration service interface of a global service registration server in response to an update of the included service information, so that the global service registration server updates the global service information based on the service information, wherein the global service information includes service information of multiple microservice platforms, the global service registration server includes a global registration module, the global registration module provides a service viewing interface and the registration service interface, the multiple microservice platforms belong to multiple open source platforms, and the multiple microservice platforms each include a local registration module and a service management module; The global service information receiving unit is used to call the local registration module of the microservice platform to receive the updated global service information sent by the service viewing interface of the global service registration server, so as to update the local global service information.
10. An electronic device, characterized in that: including one or more processors and memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 6.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program code, wherein when the program code is run, the method according to any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
Method, device and equipment for discovering services among multi-container clusters of cross-processor architecture
CN114153566A