CN112286503A - Multi-registration center micro-service unified management method, device, equipment and medium - Google Patents

Multi-registration center micro-service unified management method, device, equipment and medium Download PDF

Info

Publication number
CN112286503A
CN112286503A CN202011175929.XA CN202011175929A CN112286503A CN 112286503 A CN112286503 A CN 112286503A CN 202011175929 A CN202011175929 A CN 202011175929A CN 112286503 A CN112286503 A CN 112286503A
Authority
CN
China
Prior art keywords
service
micro
unified
services
codes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011175929.XA
Other languages
Chinese (zh)
Inventor
吴超勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011175929.XA priority Critical patent/CN112286503A/en
Publication of CN112286503A publication Critical patent/CN112286503A/en
Priority to PCT/CN2021/082595 priority patent/WO2021203968A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/328Computer systems status display

Abstract

The invention relates to the technical field of pedestal operation and maintenance, and discloses a method, a device, equipment and a storage medium for unified management of micro services of multiple registration centers. The method comprises the following steps: dividing the micro-service into different micro-service modes according to preset conditions; according to the change of the service state of the micro service, a service discovery mechanism is dynamically triggered to acquire service information of different micro service modes; converting the service information of different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry; and intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the service codes into corresponding application program interfaces for consumption of consumers. The problem of data collaboration among a plurality of different sets of registration centers can be effectively solved. The coupling of micro-service cooperative management among multiple frames is reduced, the unified management of micro-services is facilitated, and the operation and maintenance cost is reduced.

Description

Multi-registration center micro-service unified management method, device, equipment and medium
Technical Field
The invention relates to the technical field of pedestal operation and maintenance, in particular to a micro-service unified management method for multiple registration centers.
Background
The micro-service registration is a very important module in the field of micro-service architecture, and for a complex IT system, the advantages and disadvantages of a micro-service registration mechanism directly affect the availability, the partition tolerance and the data consistency of the whole system. Generally, the selection of the registry is strongly associated with the service framework, and it is a common situation that one service framework has a default service registry, so that although the trouble of user in type selection is avoided, the limitation of a single registry causes that when a user uses a plurality of service frameworks, a plurality of completely different registries must be deployed, and data collaboration among the registries is a problem.
Disclosure of Invention
In view of this, a method for unified management of micro services in multiple registration centers is provided, which solves the problem of data collaboration among multiple completely different registration centers.
The embodiment of the application provides a micro-service unified management method for multiple registration centers, which is characterized by comprising the following steps:
dividing the micro-service into different micro-service modes according to preset conditions;
according to the change of the service state of the micro service, a service discovery mechanism is dynamically triggered to acquire service information of the different micro service modes;
converting the service information of the different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry;
and intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the service codes into corresponding application program interfaces for consumption of consumers.
Optionally, the service information is an attribute corresponding to a service instance in each registry, where the attribute includes at least one of: internet protocol address, port number, whether it is a temporary service instance, weight for selecting optimal service instance invocation, health status and metadata.
Optionally, the converting the service information of the different micro service modes into service codes in a unified format through a preset unified coding rule includes:
selecting attributes to apply to the unified encoding rule;
presetting the number of coding bits corresponding to each selected attribute;
and connecting the selected attributes in series according to a preset sequence to obtain the service codes with the uniform format.
Optionally, the converting the service information of the different micro service modes into service codes in a unified format through a preset unified coding rule further includes:
and when the selected attribute in the unified coding rule is missing in the service information, performing zero padding operation on the missing attribute.
Optionally, the intelligently parsing the service code with the uniform format includes:
acquiring the service code in the unified format corresponding to the service name from the service registry in real time;
and sequentially acquiring corresponding attributes according to the encoding bit number corresponding to each attribute.
Optionally, the selecting an attribute applied to the unified encoding rule includes:
and selecting a complete set of attributes corresponding to each service instance to be applied to the unified coding rule.
Optionally, the dividing the micro service into different micro service modes according to the preset condition includes:
and dividing the micro-service into different micro-service modes according to the integration mode to which the micro-service belongs or the used calling protocol.
To achieve the above object, there is also provided an apparatus comprising:
the division module is used for dividing the micro-service into different micro-service modes according to preset conditions;
the service information acquisition module is used for dynamically triggering a service discovery mechanism according to the change of the service state of the micro service to acquire the service information of the different micro service modes;
the uniform coding module is used for converting the service information of the different micro service modes into service codes with uniform formats through a preset uniform coding rule and storing the service codes in a service registry;
and the application module is used for intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services and packaging the micro-services into corresponding application program interfaces for consumption of consumers.
To achieve the above object, there is also provided a computer readable storage medium having a program of a unified management method for micro services of a multi-registry stored thereon, where the program of the unified management method for micro services of the multi-registry realizes the steps of any one of the above methods when executed by a processor.
In order to achieve the above object, there is also provided an apparatus including a memory, a processor, and a program of a unified management method for micro services of multiple registration centers, stored in the memory and operable on the processor, where the processor implements any of the steps of the method when executing the program of the unified management method for micro services of multiple registration centers.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: dividing the micro-service into different micro-service modes according to preset conditions; the micro service mode is divided, and possibility is provided for subsequently acquiring service information and uniformly coding the service information. According to the change of the service state of the micro service, a service discovery mechanism is dynamically triggered to acquire service information of the different micro service modes; and acquiring service information of different micro service modes to provide data support for subsequent uniform coding according to a uniform coding rule. Converting the service information of the different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry; a service management mechanism compatible with various protocol services can greatly reduce the consumption of later calling of each component in the architecture and enhance the whole stability and availability. And intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the service codes into corresponding application program interfaces for consumption of consumers. The problem of data collaboration among multiple completely different registration centers can be effectively solved. When a user uses a plurality of service frames, the limitation that the user does not rely on a single registration center is avoided, the coupling of micro-service cooperative management among the plurality of frames is reduced, the unified management of micro-services is facilitated, and the operation and maintenance cost is reduced.
Drawings
Fig. 1 is a schematic hardware architecture diagram of a unified management method for micro services of multiple registration centers according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a first embodiment of a unified management method for micro services in a multi-registry according to the present invention;
FIG. 3 is a flowchart illustrating a method for unified management of microservice in multiple registration centers according to the present application;
fig. 4 is a schematic flowchart of a second embodiment of the unified management method for micro services of multiple registries according to the present application, illustrating step S130 in the first embodiment;
fig. 5 is a schematic flowchart illustrating a specific process of step S130 in the first embodiment of the method for unified management of micro services of multiple registries according to the present application;
fig. 6 is a schematic flowchart illustrating a specific process of step S140 in the first embodiment of the method for unified management of micro services of multiple registries according to the present application;
fig. 7 is a flowchart illustrating a detailed process of step S110 in the first embodiment of the method for unified management of micro services in multiple registration centers according to the present application;
FIG. 8 is a flowchart illustrating a unified management method for microservices of multiple registries according to a second embodiment of the present invention;
fig. 9 is a schematic structural diagram of an apparatus of a unified management method for micro services of multiple registries according to the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: dividing the micro-service into different micro-service modes according to preset conditions; according to the change of the service state of the micro service, a service discovery mechanism is dynamically triggered to acquire service information of the different micro service modes; converting the service information of the different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry; and intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the service codes into corresponding application program interfaces for consumption of consumers. The problem of data collaboration among multiple completely different registration centers can be effectively solved. When a user uses a plurality of service frames, the limitation that the user does not rely on a single registration center is avoided, the coupling of micro-service cooperative management among the plurality of frames is reduced, the unified management of micro-services is facilitated, and the operation and maintenance cost is reduced.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
The present application relates to a device comprising as shown in fig. 1: at least one processor 12, a memory 11.
The processor 12 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 12. The processor 12 described above may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 11, and the processor 12 reads the information in the memory 11 and completes the steps of the method in combination with the hardware thereof.
It will be appreciated that memory 11 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 11 of the systems and methods described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
Referring to fig. 2, fig. 2 is a first embodiment of a unified management method for micro services of a multiple registration center according to the present application, where the unified management method for micro services of a multiple registration center includes the following steps:
step S110: and dividing the micro-service into different micro-service modes according to preset conditions.
The preset condition is to divide the micro service into different micro service modes according to different integration modes or calling protocols, the number of the micro service modes may be multiple, and the preset condition is not limited herein, and may be other dividing methods.
Microservice (or microservice architecture) is a cloud-native architecture approach in which a single application is composed of many loosely-coupled and independently deployable smaller components or services. These services typically have their own stack, including databases and data models; the combination of event streams and message brokers communicate with each other through an application program interface; they are organized by business capabilities, and the lines separating services are often referred to as bounded contexts. Under the micro-service architecture, three roles are mainly provided, namely a service provider, a service consumer and a service registration center.
A service Registry (Registry) is a database that stores instances of services, a service Registry should be highly available, and the data up to date. After querying the service registry, the consumer caches data for a portion of the network address.
Each registry corresponds to a plurality of service instances, and the service instances under each registry use the same integration mode or the same calling protocol or the same attribute.
Step S120: and dynamically triggering a service discovery mechanism according to the change of the service state of the micro service to acquire the service information of the different micro service modes.
The service state is used for monitoring the service state change of the microservice, and comprises a service offline event, a service registration event, a service renewal event, a registration center starting event, a starting event and the like, and when the change of any one service state is monitored, a service discovery mechanism is dynamically triggered.
The service discovery mechanism may be a mechanism for a Consumer (Consumer) of a service to discover a Provider (Provider) of the service, wherein the core of the schema of the service discovery mechanism is a Proxy (Proxy), and where the Proxy is located in the architecture. A layer of proxy is added between a service consumer and a service provider, the proxy is responsible for service discovery, and the consumer indirectly accesses a target service through the proxy. According to the position of the agent on the structure, three different service discovery modes can be distinguished: traditional centralized agents, client-side embedded agents, and host-independent process agents.
In this embodiment, the present invention employs a service discovery mechanism combining a traditional centralized agent and a service registry, which reduces the complexity of manual configuration. When the service is started, the service registration center is automatically registered and the heartbeat is reported regularly, and the agent synchronizes the service instance with the service registration center regularly. Under the service discovery mechanism, a domain name does not need to be applied for each service, and only one universal domain name is needed.
Step S130: and converting the service information of the different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry.
The service information is an attribute corresponding to each service instance, and may be one or a plurality of service instances.
The service code with the unified format is converted by the preset unified coding rule, wherein the unified coding rule is not limited to the one provided by the invention and can be other unified coding rules.
Step S140: and intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the service codes into corresponding application program interfaces for consumption of consumers.
Application Programming Interface (API) is a predefined function or a convention for linking different components of a software system. To provide a set of routines that applications and developers give certain software or hardware access without having to access source code or understand the details of the content work mechanism.
In the embodiment, the service codes with the uniform format are intelligently analyzed and matched with the corresponding micro-services, and are packaged into the corresponding application program interfaces for consumption of consumers, the consumers directly use the API interfaces for consumption without accessing source codes or understanding details of a micro-service working mechanism, and the problem of data collaboration among multiple completely different registration centers can be effectively solved.
The beneficial effects present in the above embodiments: fig. 3 is a work flow chart of the micro-service unified management method of the multi-registry. Dividing the micro-service into different micro-service modes according to preset conditions; the micro service mode is divided, and possibility is provided for subsequently acquiring service information and uniformly coding the service information. According to the change of the service state of the micro service, a service discovery mechanism is dynamically triggered to acquire service information of the different micro service modes; and acquiring service information of different micro service modes to provide data support for subsequent uniform coding according to a uniform coding rule. Converting the service information of the different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry; a service management mechanism compatible with various protocol services can greatly reduce the consumption of later calling of each component in the architecture and enhance the whole stability and availability. And intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the service codes into corresponding application program interfaces for consumption of consumers. The problem of data collaboration among multiple completely different registration centers can be effectively solved. When a user uses a plurality of service frames, the limitation that the user does not rely on a single registration center is avoided, the coupling of micro-service cooperative management among the plurality of frames is reduced, the unified management of micro-services is facilitated, and the operation and maintenance cost is reduced.
In one embodiment, the service information is an attribute corresponding to a service instance in each registry, and the attribute includes at least one of the following: internet protocol address, port number, whether it is a temporary service instance, weight for selecting optimal service instance invocation, health status and metadata.
An Internet Protocol Address (Internet Protocol Address) refers to an IP Address and is translated into an Internet Protocol Address.
The IP address is a uniform address format provided by the IP protocol, and it allocates a logical address to each network and each host on the internet, so as to mask the difference of physical addresses.
The port is just like a house number, the client can find the corresponding server through the IP address, but the server has a plurality of ports, each application program corresponds to a port number, and the client can only really access the server through the port number similar to the house number. To distinguish the ports, each port is numbered, which is the port number.
The network locations of the service instances are dynamically allocated, and the service instances are frequently dynamically changed due to requirements of expansion, failure, upgrade and the like, and some service instances may be temporary service instances, so that the attribute judges whether the corresponding service instances are temporary service instances.
The weight for selecting the optimal service instance call is calculated every 30 seconds by default, and if the average response time of one service is shorter, the weight is larger, so that the probability that the service instance is selected to execute the task is higher.
The health status can provide information about the state of the server running the microservice instance, and can also be an indicator of whether the microservice is running, so that a richer monitoring experience can be obtained.
The Metadata (Metadata) may be default data of the microservice mode or may be custom data.
The beneficial effects present in the above embodiments: and providing data support for the unified coding rule by acquiring the attribute corresponding to the service instance in each registration center in the service information, wherein the attribute is a necessary condition for carrying out unified coding.
Referring to fig. 4, fig. 4 is a schematic specific flowchart of step S130 in the first embodiment of the method for unified management of micro services of multiple registration centers according to the present application, where the converting the service information of different micro service modes into service codes with a unified format through a preset unified coding rule includes:
step S131: selecting an attribute to apply to the unified encoding rule.
Step S132: and presetting the number of coding bits corresponding to each selected attribute.
Step S133: and connecting the selected attributes in series according to a preset sequence to obtain the service codes with the uniform format.
In this embodiment, the preset unicode rule may be that the unicode consists of 20 decimal numeric characters, and includes an IP address (for example, IPv4, the text format of the address is nnn.nnn.nnn, which occupies 12 bits altogether), a port number (XXXX, which occupies 4 bits altogether), whether the address is a temporary service instance (1 bit), a weight (1 bit), a health status (1 bit), and metadata (2 bits), that is, whether the preset unicode is an IP address + port number + is a temporary service instance + weight + health status + metadata. The service information of different micro service modes can be converted into service codes with a uniform format through a preset uniform coding rule.
The preset order of the service instance attributes in the preset encoding rule may be dynamically adjusted, which is not limited herein. For example: the preset encoding rule may be that the unified encoding is composed of 20 decimal numeric characters, and includes a port (XXXX, which is 4 in total), an IP address (for example, IPv4, the text format of the address is nnn. nnn, which is 12 in total), a weight (1 in total), whether the address is a temporary service instance (1 in total), a health state (1 in total), and metadata (2 in total), that is, the preset unified encoding is port + IP address + weight + whether the address is a temporary service instance + health state + metadata. The service information of different micro service modes can be converted into service codes with a uniform format through a preset uniform coding rule.
If the IP address can also be in IPv6 format, the character bit number of the preset uniform coding rule is adaptively adjusted to ensure uniform coding.
The beneficial effects present in the above embodiments: the service information of different micro-service modes is converted into service codes with a uniform format through a preset uniform coding rule, and the service management mechanism of various service modes can be compatible with the service codes, so that the consumption of later calling of each component in the architecture can be greatly reduced, and the whole stability and usability are enhanced.
Referring to fig. 5, fig. 5 is a schematic specific flowchart of step S130 in the first embodiment of the method for unified management of micro services of multiple registration centers according to the present application, where the converting the service information of different micro service modes into service codes with a unified format through a preset unified coding rule further includes:
step S131': selecting an attribute to apply to the unified encoding rule.
Step S132': and presetting the number of coding bits corresponding to each selected attribute.
Step S133': and connecting the selected attributes in series according to a preset sequence to obtain the service codes with the uniform format.
Step S134': and when the selected attribute in the unified coding rule is missing in the service information, performing zero padding operation on the missing attribute.
The attributes of the service information in the unified encoding rule may be a complete set of attributes of the service instance in different micro service modes, where, for example, the unified encoding rule is IP address + port + weight + health status + metadata, and one service instance attribute includes that IP is 192.168.1.1, port is 0066, and weight is 0.2, then the unified encoding of the service instance should be 192.168.001.001+0066+0.2+0+00 (zero padding operation is performed on health status and metadata). If a service instance attribute includes an IP of 192.168.2.1 and a health status of 1, then the unified encoding for the service instance should be 192.168.002.001+0000+0+1+00 (zero padding for port, weight, and metadata). Where the health status may be 1 or 0 to represent both states.
Step S131', step S132', and step S133' are included in the above embodiment, and are not described herein again.
The above is the beneficial effect present in the embodiment: and when the selected attribute in the unified coding rule is lost in the service information, the step of zero padding operation is executed on the lost attribute, so that the correctness and comprehensiveness of the unified coding rule are ensured.
Referring to fig. 6, fig. 6 is a schematic specific flowchart of step S140 in the first embodiment of the method for unified management of micro services of multiple registries according to the present application, where the intelligently analyzing the service codes in the unified format includes:
step S141: and acquiring the service code in the unified format corresponding to the service name from the service registry in real time.
A set of service registries, i.e. a database comprising services, instances of services and their location information, is created. Each service instance needs to be registered to the service registry at startup and deregistered at shutdown. Clients and/or routers of the service query this service registry to find available service instances.
The service instance registration in the service registry includes two modes, a self-registration mode and a third party registration mode.
The self-registration mode is that the service instance completes registration by itself. And the third party registration mode registers each service instance to the service registry by a third party registration tool. In this embodiment, a third-party registration mode is selected to store the service codes in the unified format obtained after the coding into the service registration table, and the third-party registration tool may correspondingly adjust the service codes in the unified format obtained after the coding and store the service codes in the unified format, so as to provide more reliable data support during the subsequent intelligent analysis.
The consumer may propose the micro service to be invoked by the service name, or may use other manners, such as an IP address, which may uniquely determine the attribute of the micro service location, so as to facilitate the consumer to invoke the required micro service, which is not limited herein.
Step S142: and sequentially acquiring corresponding attributes according to the encoding bit number corresponding to each attribute.
And acquiring the service code in the unified format corresponding to the service name from the service registry in real time, and extracting the attribute of the service instance in the service code according to the service code format, the code bit number corresponding to each attribute and the code sequence corresponding to each attribute. For example, the unified code of the service instance may be 192.168.001.001+6060+0.2+0+00, and then the attribute of the service instance extracted by the corresponding intelligent analysis is 192.168.1.1 for IP, 0066 for port, and 0.2 for weight, and the corresponding micro service is executed according to the extracted attribute of the service instance.
The beneficial effects present in the above embodiments: and intelligently analyzing the service codes with the uniform format to match with corresponding microservices, providing data support for the packaged application program interface, and ensuring the attribute obtained by intelligent analysis and the correctness of the packaged application program interface.
In one embodiment, the selecting the attribute applied to the unified encoding rule includes:
and selecting a complete set of attributes corresponding to each service instance to be applied to the unified coding rule.
For example, if one service instance attribute includes that the IP is 192.168.1.1, the port is 0066, and the weight is 0.2, and another service instance attribute includes that the IP is 192.168.2.1 and the health status is 1, the attributes in the unified encoding rule include the IP, the port, the weight, and the health status, and the dynamic adjustment of the unified encoding order is not limited.
The beneficial effects present in the above embodiments: and selecting a complete set of attributes corresponding to each service instance to be applied to the unified coding rule, so that any one service instance can be subjected to unified coding and converted into service coding with a unified format.
Referring to fig. 7, fig. 7 is a detailed flowchart illustrating step S110 of the method for unified management of micro services in multiple registration centers according to the present application, where the dividing of micro services into different micro service modes according to preset conditions includes:
step S111: and dividing the micro-service into different micro-service modes according to the integration mode to which the micro-service belongs or the used calling protocol.
The integration mode of the micro-service can be divided into an aggregator micro-service design mode, a proxy micro-service design mode, a chain micro-service design mode, a branch micro-service design mode, a data sharing micro-service design mode and an asynchronous message transfer micro-service related mode. The micro service modes can be divided into the above 6 types according to different integration modes, but the integration mode is not limited herein.
The calling protocol of the microservice may include, but is not limited to, the following 5 types:
1. the semantics aimed at by the protocol are divided into:
resource-oriented: REST;
command-oriented: SOAP, RMI, RPC;
facing to events: XMPP, JMS, AMQP;
2. the encoding according to the remote invocation protocol can be divided into:
text protocol: HTTP + JSON/XML, SIP;
binary protocol: WebSocket + BSon/Protobuf;
3. the uses according to the protocol can be divided into:
signaling and control protocols SIP, SDP, Jingle, ROAP;
media transmission protocol: HTTP, RTP, RTMP;
security related protocol: TLS, DTLS, oAuth 2;
4. the method is divided into the following steps according to an interactive mode:
request/response;
request/receipt;
request/negotiation/acknowledgement;
publish/subscribe;
5. the method is divided into the following steps according to data transmission formats:
the text format comprises key value pair, Json and Xml;
the binary format includes Proto buffer, BSON, Thrift, PDU.
In the implementation, the micro-services of the IT system are divided into different micro-service modes according to different integration modes or calling protocols, so that possibility is provided for carrying out service unified coding subsequently. Different integration modes or calling protocols correspond to different registries. Firstly, services of the IT system are divided into different micro-service modes according to different integration modes or calling protocols, and similar registries in the micro-services are divided together to form a registry in the same micro-service mode.
Referring to fig. 8, fig. 8 is a second embodiment of a unified management method for micro services of multiple registries according to the present application, where the unified management method for micro services of multiple registries includes the following steps:
step S210: and dividing the micro-service into different micro-service modes according to preset conditions.
Step S220: and dynamically triggering a service discovery mechanism according to the change of the service state of the micro service to acquire the service information of the different micro service modes.
Step S230: and converting the service information of the different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry.
Step S240: and intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the micro-services into corresponding application program interfaces.
Step S250: performing multi-dimensional management on the application program interfaces packaged into the corresponding application program interfaces; wherein the multidimensional management comprises at least one of: state management of microservices, request throttling, and fusing.
Compared to the first embodiment, the second embodiment includes step S250. Other steps are the same as those in the first embodiment, and are not described again.
The state management of the micro-service is to manage the running state of the service instance of the micro-service, and if the agent finds that the service instance has a problem, corrective measures can be taken, such as shutting down the failed instance or starting another service instance.
The request current limiting selectively limits certain requests for more than expected flow through preset current limiting rules and current limiting algorithms.
The fusing is to close the current path in a specific scene, thereby protecting the whole system.
Here, the present invention is not limited to the above-described multidimensional management, and may be other microservice management.
The beneficial effects present in the above embodiments: the program interface corresponding to the encapsulation can be consumed by a consumer, and multi-dimensional management can be performed, including state management of micro-services, current limiting request or fusing, so that the unified management method has higher applicability.
The present invention also provides an apparatus, characterized by comprising:
the division module is used for dividing the micro-service into different micro-service modes according to preset conditions;
the service information acquisition module is used for dynamically triggering a service discovery mechanism according to the change of the service state of the micro service to acquire the service information of the different micro service modes;
the uniform coding module is used for converting the service information of the different micro service modes into service codes with uniform formats through a preset uniform coding rule and storing the service codes in a service registry;
and the application module is used for intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services and packaging the micro-services into corresponding application program interfaces for consumption of consumers.
The apparatus shown in fig. 9 includes a dividing module 21, a service information obtaining module 22, a uniform coding module 23, and an application module 24, and the apparatus may perform the method of the embodiments shown in fig. 2 to 8, and reference may be made to the related description of the embodiments shown in fig. 2 to 8 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 2 to fig. 8, and are not described herein again.
The present invention also provides a computer-readable storage medium having stored thereon a program of a unified management method of micro-services for a multi-registry, which when executed by a processor implements any of the above-described methods.
The invention also provides equipment comprising a memory, a processor and a program of the micro-service unified management method of the multi-registry, wherein the program of the micro-service unified management method of the multi-registry is stored in the memory and can run on the processor, and the processor realizes any one of the methods when executing the program of the micro-service unified management method of the multi-registry.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A unified management method for micro services of multiple registration centers is characterized by comprising the following steps:
dividing the micro-service into different micro-service modes according to preset conditions;
according to the change of the service state of the micro service, a service discovery mechanism is dynamically triggered to acquire service information of the different micro service modes;
converting the service information of the different micro service modes into service codes with a uniform format through a preset uniform coding rule, and storing the service codes in a service registry;
and intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services, and packaging the service codes into corresponding application program interfaces for consumption of consumers.
2. The micro-service unified management method for multiple registries of claim 1, wherein the service information is an attribute corresponding to a service instance in each registry, and the attribute comprises at least one of the following: internet protocol address, port number, whether it is a temporary service instance, weight for selecting optimal service instance invocation, health status and metadata.
3. The micro-service unified management method for multiple registration centers according to claim 2, wherein said converting the service information of different micro-service modes into service codes with unified format via a preset unified coding rule comprises:
selecting attributes to apply to the unified encoding rule;
presetting the number of coding bits corresponding to each selected attribute;
and connecting the selected attributes in series according to a preset sequence to obtain the service codes with the uniform format.
4. The micro-service unified management method for multiple registration centers according to claim 3, wherein said converting the service information of different micro-service modes into service codes with unified format via a preset unified coding rule further comprises:
and when the selected attribute in the unified coding rule is missing in the service information, performing zero padding operation on the missing attribute.
5. The method for unified management of micro-services of multi-registry as claimed in claim 3 wherein said intelligent parsing of said service code of unified format comprises:
acquiring the service code in the unified format corresponding to the service name from the service registry in real time;
and sequentially acquiring corresponding attributes according to the encoding bit number corresponding to each attribute.
6. The method for unified management of micro-services of multi-registry as claimed in claim 3 wherein said selecting attributes to apply to said unified coding rules comprises:
and selecting a complete set of attributes corresponding to each service instance to be applied to the unified coding rule.
7. The method for uniformly managing the micro-services of the multi-registry as claimed in claim 1, wherein the dividing the micro-services into different micro-service modes according to the preset condition comprises:
and dividing the micro-service into different micro-service modes according to the integration mode to which the micro-service belongs or the used calling protocol.
8. An apparatus, comprising:
the division module is used for dividing the micro-service into different micro-service modes according to preset conditions;
the service information acquisition module is used for dynamically triggering a service discovery mechanism according to the change of the service state of the micro service to acquire the service information of the different micro service modes;
the uniform coding module is used for converting the service information of the different micro service modes into service codes with uniform formats through a preset uniform coding rule and storing the service codes in a service registry;
and the application module is used for intelligently analyzing the service codes with the uniform format to match with the corresponding micro-services and packaging the micro-services into corresponding application program interfaces for consumption of consumers.
9. A computer-readable storage medium, on which a program of a unified management method of micro-services of a multi-registry is stored, which program, when executed by a processor, implements the steps of the method of any one of claims 1 to 7.
10. An apparatus comprising a memory, a processor and a program for a method for micro-services unified management of a multi-registry stored on the memory and executable on the processor, the processor implementing the steps of the method of any of claims 1-7 when executing the program for the method for micro-services unified management of a multi-registry.
CN202011175929.XA 2020-10-28 2020-10-28 Multi-registration center micro-service unified management method, device, equipment and medium Pending CN112286503A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011175929.XA CN112286503A (en) 2020-10-28 2020-10-28 Multi-registration center micro-service unified management method, device, equipment and medium
PCT/CN2021/082595 WO2021203968A1 (en) 2020-10-28 2021-03-24 Method for unified management of micro-services of multiple registration centers, and apparatus, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011175929.XA CN112286503A (en) 2020-10-28 2020-10-28 Multi-registration center micro-service unified management method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN112286503A true CN112286503A (en) 2021-01-29

Family

ID=74373173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011175929.XA Pending CN112286503A (en) 2020-10-28 2020-10-28 Multi-registration center micro-service unified management method, device, equipment and medium

Country Status (2)

Country Link
CN (1) CN112286503A (en)
WO (1) WO2021203968A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407382A (en) * 2021-06-15 2021-09-17 北京城建设计发展集团股份有限公司 Dynamic regulation and control method and system for service fault
WO2021203968A1 (en) * 2020-10-28 2021-10-14 平安科技(深圳)有限公司 Method for unified management of micro-services of multiple registration centers, and apparatus, device and medium
CN114827295A (en) * 2022-04-26 2022-07-29 北京奇艺世纪科技有限公司 Service registration method, registration center, system and readable storage medium
CN114979274A (en) * 2022-04-12 2022-08-30 深圳追一科技有限公司 Control method and device for micro-service scheduling, computer equipment and storage medium
CN115292022A (en) * 2022-09-29 2022-11-04 泰豪软件股份有限公司 Workflow engine system, implementation method, storage medium and computer equipment

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114138504A (en) * 2021-11-15 2022-03-04 百果园技术(新加坡)有限公司 Data processing method, device, equipment and storage medium for multi-registration center
CN114237704B (en) * 2021-11-15 2023-06-09 贵州大学 Method for integrating Istio by spring-closed-alibaba sacos framework
CN114124695A (en) * 2021-11-23 2022-03-01 上海帆一尚行科技有限公司 Data acquisition method and device and electronic equipment
CN114257497B (en) * 2021-12-22 2023-04-28 上海中通吉网络技术有限公司 Method for dynamically replacing Dubbo micro service
CN114547052B (en) * 2022-02-14 2024-03-22 山东浪潮超高清视频产业有限公司 Method for updating cache of distributed system
CN115134413A (en) * 2022-05-16 2022-09-30 中国人民财产保险股份有限公司 Registration method of micro service cluster, service request processing method and micro service cluster
CN114817821B (en) * 2022-06-30 2022-09-16 数字广东网络建设有限公司 Display method and device of government affair information, electronic equipment and storage medium
CN114942856B (en) * 2022-07-22 2022-11-04 浙江中控技术股份有限公司 Data processing method and device of micro-service system and electronic equipment
CN115941772A (en) * 2022-11-07 2023-04-07 平安国际融资租赁有限公司 Third-party service access method, device, equipment and medium
CN115757552B (en) * 2022-11-29 2023-07-21 广发银行股份有限公司 Bank historical data management system based on distributed microservice
CN116155957B (en) * 2023-04-19 2023-07-14 华芯(嘉兴)智能装备有限公司 Operation method and device of sorting machine control program and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911430A (en) * 2017-11-06 2018-04-13 上海电机学院 A kind of micro services infrastructure equipment
US20180109634A1 (en) * 2014-10-21 2018-04-19 Twilio, Inc. System and method for providing a micro-services communication platform
CN109547570A (en) * 2018-12-29 2019-03-29 深圳云天励飞技术有限公司 Service registration method, apparatus, registration center's management equipment and storage medium
CN110324177A (en) * 2019-05-31 2019-10-11 中国人民解放军国防科技大学 Service request processing method, system and medium under micro-service architecture
CN110636093A (en) * 2018-06-25 2019-12-31 中兴通讯股份有限公司 Microservice registration and discovery method, microservice registration and discovery device, storage medium and microservice system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10742748B2 (en) * 2016-08-12 2020-08-11 Oracle International Corporation System and method for supporting live addition of a tenant in a connection pool environment
CN106610836B (en) * 2016-12-23 2019-12-31 国网信息通信产业集团有限公司 Micro-service operation management tool
CN109257440A (en) * 2018-10-29 2019-01-22 南京南瑞信息通信科技有限公司 A kind of service discovery and client load equalization methods based on service register center
CN111147588A (en) * 2019-12-27 2020-05-12 上海浦东发展银行股份有限公司 Method and system for realizing cross-domain and cross-center communication in enterprise-level micro service platform
CN112286503A (en) * 2020-10-28 2021-01-29 平安科技(深圳)有限公司 Multi-registration center micro-service unified management method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180109634A1 (en) * 2014-10-21 2018-04-19 Twilio, Inc. System and method for providing a micro-services communication platform
CN107911430A (en) * 2017-11-06 2018-04-13 上海电机学院 A kind of micro services infrastructure equipment
CN110636093A (en) * 2018-06-25 2019-12-31 中兴通讯股份有限公司 Microservice registration and discovery method, microservice registration and discovery device, storage medium and microservice system
CN109547570A (en) * 2018-12-29 2019-03-29 深圳云天励飞技术有限公司 Service registration method, apparatus, registration center's management equipment and storage medium
CN110324177A (en) * 2019-05-31 2019-10-11 中国人民解放军国防科技大学 Service request processing method, system and medium under micro-service architecture

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021203968A1 (en) * 2020-10-28 2021-10-14 平安科技(深圳)有限公司 Method for unified management of micro-services of multiple registration centers, and apparatus, device and medium
CN113407382A (en) * 2021-06-15 2021-09-17 北京城建设计发展集团股份有限公司 Dynamic regulation and control method and system for service fault
CN113407382B (en) * 2021-06-15 2022-04-01 北京城建设计发展集团股份有限公司 Dynamic regulation and control method and system for service fault
CN114979274A (en) * 2022-04-12 2022-08-30 深圳追一科技有限公司 Control method and device for micro-service scheduling, computer equipment and storage medium
CN114827295A (en) * 2022-04-26 2022-07-29 北京奇艺世纪科技有限公司 Service registration method, registration center, system and readable storage medium
CN115292022A (en) * 2022-09-29 2022-11-04 泰豪软件股份有限公司 Workflow engine system, implementation method, storage medium and computer equipment

Also Published As

Publication number Publication date
WO2021203968A1 (en) 2021-10-14

Similar Documents

Publication Publication Date Title
CN112286503A (en) Multi-registration center micro-service unified management method, device, equipment and medium
US7571208B2 (en) Creating proxies from service description metadata at runtime
US10432704B2 (en) Translation of messages using sensor-specific and unified protocols
US8930409B2 (en) System and method for supporting named operations in a distributed data grid
US7908317B2 (en) System and method for URL compression
US9722862B2 (en) Computer system to support failover in an event stream processing system
CN111309374B (en) Micro-service system and service calling method in micro-service system
WO2016184175A1 (en) Database processing method and apparatus
US8838821B2 (en) Dynamic transaction protocol upgrades
US9715451B2 (en) System and method for caching service results in a distributed caching system in a transactional processing environment
US11115913B2 (en) Wireless communication core network and method for analyzing user equipment mobility in the same
CN111064626B (en) Configuration updating method, device, server and readable storage medium
US8375399B2 (en) Method, apparatus and computer program to perform dynamic selection of serialization processing schemes
WO2016107120A1 (en) Application programming interface calling method and device
US7849472B1 (en) System for instrumenting resources utilizing WS-management resource MBean wrappers for JAXB beans
CN113297305A (en) Session state processing method, device, equipment and storage medium
CN116016667A (en) Unified management method and system for multiple types of registries of cloud native platform
CN115269228A (en) Data adaptive transmission method, device, equipment and medium
US8132189B1 (en) WS-management resource MBean wrapper for JAXB beans
US7912922B2 (en) Globally unique instance identification
US7792921B2 (en) Metadata endpoint for a generic service
CN113918245A (en) Data calling method, device, equipment and computer readable storage medium
CN117956029A (en) Data processing method, device, electronic equipment and storage medium
CN117118821A (en) Multi-data source management method based on client-server mode
CN117971516A (en) Access method, system, equipment and storage medium of message queue

Legal Events

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