WO2021203968A1 - Method for unified management of micro-services of multiple registration centers, and apparatus, device and medium - Google Patents

Method for unified management of micro-services of multiple registration centers, and apparatus, device and medium Download PDF

Info

Publication number
WO2021203968A1
WO2021203968A1 PCT/CN2021/082595 CN2021082595W WO2021203968A1 WO 2021203968 A1 WO2021203968 A1 WO 2021203968A1 CN 2021082595 W CN2021082595 W CN 2021082595W WO 2021203968 A1 WO2021203968 A1 WO 2021203968A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
unified
microservice
microservices
computer
Prior art date
Application number
PCT/CN2021/082595
Other languages
French (fr)
Chinese (zh)
Inventor
吴超勇
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021203968A1 publication Critical patent/WO2021203968A1/en

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

Definitions

  • This application relates to the technical field of scaffolding operation and maintenance, and in particular to a method, device, equipment, and medium for unified management of microservices with multiple registration centers.
  • Microservice registration is an extremely important module in the field of microservice architecture.
  • the quality of the microservice registration mechanism directly affects the availability, segmentation tolerance, and data consistency of the entire system.
  • the choice of a general registry is strongly related to the service framework.
  • a common situation is that a service framework will bring a default service registry.
  • the inventor realized that although this saves users from the trouble of selection, a single registry Due to the limitations of, when users use multiple service frameworks, they must deploy multiple sets of completely different registries. The data coordination between these registries is a problem.
  • a unified management method for microservices with multiple registries is provided to solve the problem of data coordination between multiple sets of completely different registries.
  • the first aspect of this application provides a method for unified management of microservices with multiple registration centers, including: dividing microservices into different microservice modes according to preset conditions; Change, dynamically trigger the service discovery mechanism to obtain the service information of the different microservice modes; convert the service information of the different microservice modes into a unified format service code through a preset unified coding rule, and store it in the service registration In the table; intelligent analysis of the uniform format of the service code to match the corresponding microservices, and encapsulate the corresponding application program interface for consumption by the consumer.
  • the second aspect of the present application provides a multi-registration center microservice unified management device, including a memory, a processor, and computer-readable instructions stored on the memory and running on the processor.
  • the processor The following steps are implemented when the computer-readable instructions are executed: the microservices are divided into different microservice modes according to preset conditions; the service discovery mechanism is dynamically triggered according to the changes in the service status of the microservices, and the different microservices are obtained.
  • the service information of the service mode; the service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry; the service code of the unified format is intelligently analyzed Match the corresponding microservices and encapsulate them into corresponding application program interfaces for consumption by consumers.
  • the third aspect of the present application provides a computer-readable storage medium that stores computer instructions.
  • the computer executes the following steps: Microservices are divided into different microservice modes; according to changes in the service status of the microservices, the service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes; and the service information of the different microservice modes After preset unified coding rules, it is transformed into a unified format service code and stored in the service registry; the unified format service code is intelligently analyzed to match the corresponding microservice, and packaged into a corresponding application program interface for consumers Make consumption.
  • the fourth aspect of the present application provides a unified management device for microservices with multiple registration centers, including: a division module for dividing microservices into different microservice modes according to preset conditions; a service information acquisition module for The change of the service status of the microservices dynamically triggers the service discovery mechanism to obtain the service information of the different microservice modes; the unified coding module is used to pass the service information of the different microservice modes through preset unified coding rules The service code is converted into a unified format and stored in the service registry; the application module is used to intelligently analyze the service code of the unified format to match the corresponding microservice, and encapsulate it into a corresponding application program interface for the consumer to perform Consumption.
  • One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: dividing microservices into different microservice modes according to preset conditions; dividing the microservice modes for subsequent acquisition of service information and It is possible to uniformly code service information.
  • the service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes; the service information of the different microservice modes is obtained to provide data for subsequent unified coding in accordance with the unified coding rules support.
  • the service information of the different microservice modes is converted into a unified format service code through preset unified coding rules, and stored in the service registry; a service management mechanism compatible with various protocol services can greatly reduce the structure
  • the consumption of each component in subsequent calls enhances the overall stability and usability.
  • the service code in the unified format is intelligently analyzed and matched to the corresponding microservice, and encapsulated into a corresponding application program interface for consumption by the consumer. It can effectively solve the problem of data coordination between multiple sets of completely different registration centers.
  • users use multiple service frameworks, they are no longer strongly dependent on the limitations of a single registry, which reduces the coupling of microservice collaborative management between multiple frameworks, facilitates the unified management of microservices, and reduces operation and maintenance costs.
  • FIG. 1 is a schematic diagram of the hardware architecture of the method for unified management of microservices with multiple registration centers involved in an embodiment of the application;
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for unified management of microservices with multiple registration centers of the application;
  • Figure 3 is a work flow chart of applying for a unified management method of microservices with multiple registration centers
  • step S130 is a schematic diagram of the specific flow of step S130 in the first embodiment of the second embodiment of the method for unified management of microservices with multiple registration centers under this application;
  • FIG. 5 is a schematic diagram of the specific flow of step S130 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application;
  • step S140 is a schematic diagram of the specific flow of step S140 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application;
  • FIG. 7 is a schematic diagram of the specific flow of step S110 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application;
  • FIG. 8 is a schematic flowchart of a second embodiment of a method for unified management of microservices with multiple registration centers of the application;
  • FIG. 9 is a schematic structural diagram of an apparatus for a unified management method for microservices with multiple registration centers according to the present application.
  • the main solution of the embodiment of the present application is: divide microservices into different microservice modes according to preset conditions; dynamically trigger a service discovery mechanism according to changes in the service status of the microservices, and obtain the different microservice modes
  • the service information of the different microservice modes; the service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry; the service code of the unified format is intelligently parsed and matched
  • the microservices are packaged into corresponding application program interfaces for consumption by consumers. It can effectively solve the problem of data coordination between multiple sets of completely different registration centers. When users use multiple service frameworks, they are no longer strongly dependent on the limitations of a single registry, which reduces the coupling of microservice collaborative management between multiple frameworks, facilitates the unified management of microservices, and reduces operation and maintenance costs.
  • This application relates to a device including as shown in FIG. 1: at least one processor 12 and a memory 11.
  • the processor 12 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 12 or instructions in the form of software.
  • the above-mentioned processor 12 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 devices, discrete gates or transistor logic devices, discrete hardware Components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • 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 above method in combination with its hardware.
  • the memory 11 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read only memory (Read Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), erasable programmable read only memory (Erasable PROM, EPROM), and electrically erasable Except for programmable read-only memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DDRSDRAM Double Data Rate Synchronous Dynamic Random Access Memory
  • Enhanced SDRAM, ESDRAM Synchronous Dynamic Random Access Memory
  • Synchronous Link Dynamic Random Access Memory Synchronous Link Dynamic Random Access Memory (Synch link DRAM, SLDRAM)
  • DRRAM Direct Rambus RAM
  • the memory 11 of the system and method described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
  • Figure 2 is a first embodiment of a method for unified management of microservices with multiple registries under this application.
  • the method for unified management of microservices with multiple registries includes the following steps:
  • Step S110 Divide the microservices into different microservice modes according to preset conditions.
  • the preset condition is to divide microservices into different microservice modes according to different integration modes or calling protocols. There can be multiple microservice modes.
  • the preset conditions are not limited here, and other division methods may also be used.
  • Microservice is a cloud-native architecture method in which a single application consists of many smaller components or services that are loosely coupled and independently deployable. These services usually have their own stack, including databases and data models; they communicate with each other through a combination of application program interfaces, event streams, and message brokers; they are organized by business capabilities, and the lines separating services are usually called bounded contexts. Under the microservice architecture, there are three main roles: service provider, service consumer, and service registry.
  • the service registry (Registry) is a database that stores service instances.
  • a service registry should be highly available and the data should be up-to-date. After the consumer queries the service registry, it will cache part of the network address data.
  • Each registry corresponds to multiple service instances, and the multiple service instances corresponding to each registry use the same integration mode or the same calling protocol or the same attributes.
  • Step S120 According to the change of the service status of the microservice, a service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes.
  • Service status is used to monitor changes in the service status of microservices, including service offline events, service registration events, service renewal events, registry startup events, and startup events.
  • the service discovery mechanism is triggered dynamically.
  • the service discovery mechanism can be a mechanism by which the consumer of the service discovers the provider of the service.
  • the core of the service discovery mechanism model is the proxy and the position of the proxy in the architecture.
  • An agent is added between the service consumer and the service provider.
  • the agent is responsible for service discovery, and the consumer indirectly accesses the target service through the agent. According to the different location of the agent structure, it can be divided into three different service discovery modes: traditional centralized agent, client embedded agent, and host independent process agent.
  • this application adopts a service discovery mechanism that combines a traditional centralized agent and a service registry to reduce the complexity of manual configuration.
  • the service When the service starts, it will automatically register to the service registry and report the heartbeat regularly, and the agent will periodically synchronize the service instance to the service registry.
  • this service discovery mechanism there is no need to apply for a domain name for each service, only a generic domain name is required.
  • Step S130 The service information of the different microservice modes is converted into a service code of a unified format through a preset unified coding rule, and stored in the service registry.
  • Service information is an attribute corresponding to each service instance, and it can be one or multiple.
  • the uniform coding rule After a preset uniform coding rule is converted into a uniform format service code, the uniform coding rule does not limit what is proposed in this application, and may also be other uniform coding rules.
  • Step S140 Perform intelligent analysis on the service code in the unified format to match the corresponding microservice, and encapsulate it into a corresponding application program interface for consumption by the consumer.
  • API Application Programming Interface
  • API Application Programming Interface
  • the service code in the unified format is intelligently analyzed to match the corresponding microservice, and packaged into a corresponding application program interface for consumption by the consumer.
  • the consumer does not need to access the source code nor understand the working mechanism of the microservice.
  • directly use the API interface for consumption which can effectively solve the problem of data coordination between multiple sets of completely different registries.
  • FIG. 3 is a work flow chart of a method for unified management of microservices with multiple registration centers. Divide microservices into different microservice modes according to preset conditions; divide the microservice modes to provide the possibility for subsequent acquisition of service information and uniform coding of service information. According to the change of the service status of the microservice, the service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes; the service information of the different microservice modes is obtained to provide data for subsequent unified coding in accordance with the unified coding rules support.
  • the service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry; a service management mechanism compatible with various protocol services can greatly reduce the structure
  • the consumption of each component in subsequent calls enhances the overall stability and usability.
  • the service code in the unified format is intelligently analyzed and matched to the corresponding microservice, and encapsulated into a corresponding application program interface for consumption by the consumer. It can effectively solve the problem of data coordination between multiple sets of completely different registration centers.
  • users use multiple service frameworks, they are no longer strongly dependent on the limitations of a single registry, which reduces the coupling of microservice collaborative management between multiple frameworks, facilitates the unified management of microservices, and reduces operation and maintenance costs.
  • 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, and is used to select the best The weight, health status, and metadata of the service instance invocation.
  • Internet Protocol Address refers to IP address, which is also translated as Internet Protocol address.
  • the IP address is a unified address format provided by the IP protocol. It assigns a logical address to each network and each host on the Internet to shield differences in physical addresses.
  • the so-called port is like a house number.
  • the client can find the corresponding server through the IP address, but the server has many ports.
  • Each application corresponds to a port number.
  • In order to distinguish the ports, each port is numbered. This is the port number.
  • the network locations of service instances are dynamically allocated, and service instances often change dynamically due to requirements such as expansion, failure, and upgrade.
  • Some service instances may be temporary service instances, so this attribute determines whether the corresponding service instance is a temporary service instance.
  • the weight of each service instance is calculated every 30 seconds. If the average response time of a service is shorter, the weight is greater, and then the service instance is selected to perform the task. The probability is greater.
  • the health status can provide information about the status of the server running the microservice instance, or it can be an indicator of whether the microservice is running, so that a richer monitoring experience can be obtained.
  • Metadata can be the default data of the microservice model or custom data.
  • the above-mentioned embodiment has the beneficial effect: by obtaining the attribute corresponding to the service instance in each registry in the service information, providing data support for the unified coding rule is a necessary condition for the unified coding.
  • Figure 4 is a schematic diagram of the specific flow of step S130 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application.
  • the service information of the different microservice modes is subjected to preset uniform coding rules.
  • the service code transformed into a unified format, including:
  • Step S131 Select the attribute applied to the unified coding rule.
  • Step S132 preset the number of coding bits corresponding to the selected attributes.
  • Step S133 Concatenate the selected attributes in a preset order to obtain the service code in the unified format.
  • the service information of different microservice modes can be converted into uniform format service codes.
  • the preset order of service instance attributes in the preset coding rules can be dynamically adjusted, which is not limited here.
  • the service information of different microservice modes can be converted into uniform format service codes.
  • the IP address can also be in the IPv6 format, and the number of characters in the unified encoding rule is preset for adaptive adjustment to ensure that the unified encoding can be performed.
  • the above-mentioned embodiment has the beneficial effect: the service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, which can be compatible with various service modes.
  • the service management mechanism can greatly reduce the structure The consumption of each component in subsequent calls enhances the overall stability and usability.
  • FIG. 5 is a schematic diagram of the specific process of step S130 in the first embodiment of the method for unified management of microservices with multiple registration centers of this application.
  • the service information of the different microservice modes is subjected to preset unified coding rules
  • the service code converted into a unified format also includes:
  • Step S131' Select the attribute applied to the unified coding rule.
  • Step S132' preset the number of coding bits corresponding to the selected attributes.
  • Step S133' the selected attributes are concatenated according to the preset order to obtain the service code in the unified format.
  • Step S134' When the attribute selected in the uniform coding rule is missing in the service information, perform a zero-padded operation on the missing attribute.
  • the attributes of the service information in the uniform coding rule can be the complete set of service instance attributes in different microservice modes.
  • the uniform coding rule is IP address + port + weight + health status + metadata
  • the attribute of a service instance includes IP 192.168. 1.1
  • the port is 0066
  • the weight is 0.2
  • the uniform code of the service instance should be 192.168.001.001+0066+0.2+0+00 (zero padding for health status and metadata).
  • the attributes of a service instance include the IP of 192.168.2.1 and the health status of 1
  • the uniform code of the service instance should be 192.168.002.001+0000+0+1+00 (port, weight, and metadata are zero-filled).
  • the health status can be 1 or 0 to indicate two states.
  • step S131' step S132', and step S133', which will not be repeated here.
  • the step of zero-filling the missing attribute is added to ensure the correctness and comprehensiveness of the uniform coding rule. sex.
  • Fig. 6 is a schematic diagram of the specific flow of step S140 in the first embodiment of the method for unified management of microservices with multiple registration centers of this application.
  • the intelligent analysis of the service code in the unified format includes:
  • Step S141 Acquire the service code in the unified format corresponding to the service name from the service registration table in real time.
  • a service registry that is, a database that includes services, service instances and their location information. Each service instance needs to be registered to the service registry when it is started, and to be deregistered when it is shut down.
  • the client and/or router of the service can find available service instances by querying the service registry.
  • the self-registration mode is that the service instance completes the registration by itself.
  • the third-party registration tool registers each service instance to the service registry.
  • the third-party registration mode is selected to store the service code in the uniform format obtained after encoding in the service registry.
  • the third-party registration tool can correspondingly adjust the service code in the uniform format obtained after encoding, according to the uniform format of the service code.
  • the service code is stored to provide more reliable data support for subsequent intelligent analysis.
  • the consumer can propose the microservice to be called by the service name, or other methods, such as IP address and other attributes that can uniquely determine the location of the microservice, which makes it more convenient for the consumer to call the required microservice, which is not limited here.
  • Step S142 According to the number of code bits corresponding to each attribute, the corresponding attributes are sequentially acquired.
  • the service code in the uniform format corresponding to the service name is obtained from the service registration table in real time, and then according to the service coding format, the number of coding bits corresponding to each attribute, and the coding sequence corresponding to each attribute, the number of service instances in the service code
  • the attributes are extracted.
  • the uniform code of the service instance can be 192.168.001.001+6060+0.2+0+00
  • the attribute of the service instance extracted by the corresponding intelligent analysis is 192.168.1.1
  • the port is 0066
  • the weight is 0.2.
  • the attributes of the service instance come out to execute the corresponding microservice.
  • the beneficial effects in the above embodiments intelligently analyze the service code in the unified format to match the corresponding microservices, provide data support for the encapsulated application program interface, and ensure that the attributes obtained by the intelligent analysis are consistent with the encapsulated application program interface. Correctness.
  • the attribute that the selection is applied to the unified coding rule includes:
  • the full set of attributes corresponding to each service instance is selected to be applied to the unified coding rule.
  • the attributes of a service instance include IP 192.168.1.1, port 0066, and weight 0.2
  • another service instance attribute includes IP 192.168.2.1 and health status 1
  • the attributes in the uniform coding rule include IP and port , Weight, health status, the dynamic adjustment of the unified coding sequence is not limited.
  • the beneficial effect existing in the above-mentioned embodiment is that the full set of attributes corresponding to each service instance is selected to be applied to the unified coding rule so that any service instance can be uniformly coded and converted into a service code of a unified format.
  • FIG. 7 is a schematic diagram of the specific process of step S110 in the first embodiment of the method for unified management of microservices with multiple registration centers of this application.
  • the division of microservices into different microservice modes according to preset conditions includes:
  • Step S111 Divide the microservice into different microservice modes according to the integration mode to which the microservice belongs or the calling protocol used.
  • the integration mode of microservices can be divided into aggregator microservice design mode, agent microservice design mode, chain microservice design mode, branch microservice design mode, data sharing microservice design mode, and asynchronous messaging microservice related mode.
  • the microservice mode can be divided into the above 6 types, but the above integration mode is not limited here.
  • the calling protocol of microservices can include the following 5 types, but is not limited to the following 5 types:
  • Event-oriented XMPP, JMS, AMQP;
  • the microservices of the IT system are divided into different microservice modes according to different integration modes or calling protocols, which provides the possibility for subsequent uniform coding of services.
  • Different integration modes or calling protocols correspond to different registration centers.
  • the IT system's services are divided into different microservice modes according to different integration modes or invocation protocols, which is to divide similar registries in each microservice together to become a registrar under the same microservice mode.
  • Fig. 8 is a second embodiment of the unified management method for microservices with multiple registries under this application.
  • the unified management method for microservices with multiple registries includes the following steps:
  • Step S210 Divide the microservices into different microservice modes according to preset conditions.
  • Step S220 According to the change of the service status of the microservice, a service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes.
  • Step S230 The service information of the different microservice modes is converted into a service code of a unified format through a preset unified coding rule, and stored in the service registry.
  • Step S240 Perform intelligent analysis on the service code in the unified format to match the corresponding microservice, and encapsulate it into a corresponding application program interface.
  • Step S250 Perform multi-dimensional management on the encapsulated corresponding application program interface; wherein, the multi-dimensional management includes at least one of the following: state management of microservices, request current limiting, and fusing.
  • the second embodiment includes step S250.
  • the other steps are the same as those in the first embodiment, and will not be repeated here.
  • State management of microservices is to manage the running status of service instances of microservices. If the agent finds a problem with the service instance, it can take corrective measures, such as shutting down the failed instance or starting another service instance.
  • Request flow limiting is used to selectively limit certain requests for traffic exceeding expectations through preset flow limiting rules and flow limiting algorithms.
  • Fuse is to turn off the current path in a specific scenario, so as to protect the entire system.
  • the program interface corresponding to the package can not only be consumed by the consumer, but also can be managed in multiple dimensions, including the state management of microservices, request current limiting or fuse, so that the unified management of this application
  • the method has greater applicability.
  • the application also provides a device, which is characterized in that it comprises:
  • the division module is used to divide microservices into different microservice modes according to preset conditions
  • the service information acquisition module is configured to dynamically trigger a service discovery mechanism according to the change of the service status of the microservice to acquire the service information of the different microservice modes;
  • the unified coding module is used to convert the service information of the different microservice modes into a unified format service code through preset unified coding rules, and store it in the service registry;
  • the application module is used for intelligently analyzing and matching the corresponding microservices on the service code in the unified format, and encapsulating it into a corresponding application program interface for consumption by the consumer.
  • the device shown in Fig. 9 includes a division module 21, a service information acquisition module 22, a unified coding module 23, and an application module 24.
  • the device can execute the methods of the embodiments shown in Figs. 2 to 8, and the parts not described in detail in this embodiment are Reference may be made to the related descriptions of the embodiments shown in FIG. 2 to FIG. 8. For the implementation process and technical effects of this technical solution, please refer to the description in the embodiment shown in FIG. 2 to FIG. 8, which will not be repeated here.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on the computer, the computer executes the following steps:
  • the service information of the service mode is converted into a unified format service code through preset unified coding rules, and stored in the service registry; the unified format service code is intelligently analyzed to match the corresponding microservice, and packaged into a corresponding application
  • the program interface is for the consumer to consume.
  • the present application also provides a device including a memory, a processor, and a program of a method for unified management of microservices of multiple registries stored in the memory and running on the processor, and the processor executes the microservices of the multiple registries.
  • the program of the unified service management method implements any of the above-mentioned methods.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • any reference signs located between parentheses should not be constructed as limitations on the claims.
  • the word “comprising” does not exclude the presence of parts or steps not listed in the claims.
  • the word “a” or “an” preceding a component does not exclude the presence of multiple such components.
  • the application can be realized by means of hardware including several different components and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices may be embodied in the same hardware item.
  • the use of the words first, second, and third, etc. do not indicate any order. These words can be interpreted as names.

Abstract

A method for the unified management of micro-services of multiple registration centers, and an apparatus, a device and a medium. The method comprises: dividing micro-services into different micro-service modes according to a preset condition (S110); dynamically triggering a service discovery mechanism according to changes in service states of the micro-services, and acquiring service information of the different micro-service modes (S120); by means of a preset unified encoding rule, converting the service information of the different micro-service modes into service codes in a unified format, and storing same in a service registry (S130); and performing intelligent parsing on the service codes in the unified format so as to match corresponding micro-services, and then encapsulating same into corresponding application program interfaces for consumption by consumers (S140). The problem of data collaboration between multiple sets of different registration centers can be effectively solved. The coupling of micro-service collaborative management between multiple frameworks is reduced, thereby facilitating the unified management of micro-services, and reducing the operation and maintenance costs.

Description

多注册中心的微服务统一管理方法、装置、设备及介质Multi-registration center microservice unified management method, device, equipment and medium
本申请要求于2020年10月28日提交中国专利局、申请号为202011175929.X、发明名称为“多注册中心的微服务统一管理方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application requires the priority of a Chinese patent application filed with the Chinese Patent Office on October 28, 2020, the application number is 202011175929.X, and the invention title is "Multi-registration center microservice unified management method, device, equipment and medium". The entire content is incorporated into the application by reference.
技术领域Technical field
本申请涉及基架运维技术领域,尤其涉及一种多注册中心的微服务统一管理方法、装置、设备及介质。This application relates to the technical field of scaffolding operation and maintenance, and in particular to a method, device, equipment, and medium for unified management of microservices with multiple registration centers.
背景技术Background technique
微服务注册是微服务架构领域极为重要的一个模块,对于复杂的IT系统而言,微服务注册机制的优劣直接影响整个系统的可用性、分割容忍度以及数据的一致性。一般注册中心的选择与服务框架强关联,普遍的情况是一种服务框架会带一个默认的服务注册中心,发明人意识到,这样虽然免去了用户在选型上的烦恼,但是单个注册中心的局限性,导致用户使用多个服务框架时,必须部署多套完全不同的注册中心,这些注册中心之间的数据协同是一个问题。Microservice registration is an extremely important module in the field of microservice architecture. For complex IT systems, the quality of the microservice registration mechanism directly affects the availability, segmentation tolerance, and data consistency of the entire system. The choice of a general registry is strongly related to the service framework. A common situation is that a service framework will bring a default service registry. The inventor realized that although this saves users from the trouble of selection, a single registry Due to the limitations of, when users use multiple service frameworks, they must deploy multiple sets of completely different registries. The data coordination between these registries is a problem.
发明内容Summary of the invention
有鉴于此,提供一种多注册中心的微服务统一管理方法,解决多套完全不同的注册中心之间的数据协同的问题。In view of this, a unified management method for microservices with multiple registries is provided to solve the problem of data coordination between multiple sets of completely different registries.
为实现上述目的,本申请第一方面提供了一种多注册中心的微服务统一管理方法,包括:根据预设条件将微服务划分为不同的微服务模式;根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。In order to achieve the above objective, the first aspect of this application provides a method for unified management of microservices with multiple registration centers, including: dividing microservices into different microservice modes according to preset conditions; Change, dynamically trigger the service discovery mechanism to obtain the service information of the different microservice modes; convert the service information of the different microservice modes into a unified format service code through a preset unified coding rule, and store it in the service registration In the table; intelligent analysis of the uniform format of the service code to match the corresponding microservices, and encapsulate the corresponding application program interface for consumption by the consumer.
本申请第二方面提供了一种多注册中心的微服务统一管理设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:根据预设条件将微服务划分为不同的微服务模式;根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The second aspect of the present application provides a multi-registration center microservice unified management device, including a memory, a processor, and computer-readable instructions stored on the memory and running on the processor. The processor The following steps are implemented when the computer-readable instructions are executed: the microservices are divided into different microservice modes according to preset conditions; the service discovery mechanism is dynamically triggered according to the changes in the service status of the microservices, and the different microservices are obtained. The service information of the service mode; the service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry; the service code of the unified format is intelligently analyzed Match the corresponding microservices and encapsulate them into corresponding application program interfaces for consumption by consumers.
本申请的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:根据预设条件将微服务划分为不同的微服务模式;根据所述微服务的服务状态的变化,动态触发服 务发现机制,获取所述不同的微服务模式的服务信息;将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The third aspect of the present application provides a computer-readable storage medium that stores computer instructions. When the computer instructions run on the computer, the computer executes the following steps: Microservices are divided into different microservice modes; according to changes in the service status of the microservices, the service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes; and the service information of the different microservice modes After preset unified coding rules, it is transformed into a unified format service code and stored in the service registry; the unified format service code is intelligently analyzed to match the corresponding microservice, and packaged into a corresponding application program interface for consumers Make consumption.
本申请第四方面提供了一种多注册中心的微服务统一管理装置,包括:划分模块,用于根据预设条件将微服务划分为不同的微服务模式;服务信息获取模块,用于根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;统一编码模块,用于将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;应用模块,用于对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The fourth aspect of the present application provides a unified management device for microservices with multiple registration centers, including: a division module for dividing microservices into different microservice modes according to preset conditions; a service information acquisition module for The change of the service status of the microservices dynamically triggers the service discovery mechanism to obtain the service information of the different microservice modes; the unified coding module is used to pass the service information of the different microservice modes through preset unified coding rules The service code is converted into a unified format and stored in the service registry; the application module is used to intelligently analyze the service code of the unified format to match the corresponding microservice, and encapsulate it into a corresponding application program interface for the consumer to perform Consumption.
本申请实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:根据预设条件将微服务划分为不同的微服务模式;对微服务模式进行划分,为后续获取服务信息及对服务信息进行统一编码提供可能。根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;获取不同给的微服务模式的服务信息为后续按照统一编码规则进行统一编码提供数据支持。将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;一个能够兼容各种协议服务的服务管理机制能够极大地降低架构内各组件之后调用的消耗,增强整个稳定性和可用性。对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。能有效解决多套完全不同的注册中心之间的数据协同的问题。在用户使用多个服务框架不再强依赖于单个注册中心的局限性,降低了多框架之间微服务协同管理的耦合性,有利于微服务的统一管理,降低了运维成本。One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: dividing microservices into different microservice modes according to preset conditions; dividing the microservice modes for subsequent acquisition of service information and It is possible to uniformly code service information. According to the change of the service status of the microservice, the service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes; the service information of the different microservice modes is obtained to provide data for subsequent unified coding in accordance with the unified coding rules support. The service information of the different microservice modes is converted into a unified format service code through preset unified coding rules, and stored in the service registry; a service management mechanism compatible with various protocol services can greatly reduce the structure The consumption of each component in subsequent calls enhances the overall stability and usability. The service code in the unified format is intelligently analyzed and matched to the corresponding microservice, and encapsulated into a corresponding application program interface for consumption by the consumer. It can effectively solve the problem of data coordination between multiple sets of completely different registration centers. When users use multiple service frameworks, they are no longer strongly dependent on the limitations of a single registry, which reduces the coupling of microservice collaborative management between multiple frameworks, facilitates the unified management of microservices, and reduces operation and maintenance costs.
附图说明Description of the drawings
图1为本申请实施例中涉及的多注册中心的微服务统一管理方法的硬件架构示意图;FIG. 1 is a schematic diagram of the hardware architecture of the method for unified management of microservices with multiple registration centers involved in an embodiment of the application;
图2为本申请多注册中心的微服务统一管理方法的第一实施例的流程示意图;2 is a schematic flowchart of a first embodiment of a method for unified management of microservices with multiple registration centers of the application;
图3为本申请多注册中心的微服务统一管理方法的工作流程图;Figure 3 is a work flow chart of applying for a unified management method of microservices with multiple registration centers;
图4为本申请多注册中心的微服务统一管理方法第二实施例对第一实施例中步骤S130的具体流程示意图;4 is a schematic diagram of the specific flow of step S130 in the first embodiment of the second embodiment of the method for unified management of microservices with multiple registration centers under this application;
图5为本申请多注册中心的微服务统一管理方法的第一实施例中步骤S130的具体流程示意图;FIG. 5 is a schematic diagram of the specific flow of step S130 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application;
图6为本申请多注册中心的微服务统一管理方法的第一实施例中步骤S140的具体流程示意图;6 is a schematic diagram of the specific flow of step S140 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application;
图7为本申请多注册中心的微服务统一管理方法的第一实施例中步骤S110的具体流程示意图;FIG. 7 is a schematic diagram of the specific flow of step S110 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application;
图8为本申请多注册中心的微服务统一管理方法的第二实施例的流程示意图;FIG. 8 is a schematic flowchart of a second embodiment of a method for unified management of microservices with multiple registration centers of the application;
图9为本申请多注册中心的微服务统一管理方法的装置的结构示意图。FIG. 9 is a schematic structural diagram of an apparatus for a unified management method for microservices with multiple registration centers according to the present application.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
本申请实施例的主要解决方案是:根据预设条件将微服务划分为不同的微服务模式;根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。能有效解决多套完全不同的注册中心之间的数据协同的问题。在用户使用多个服务框架不再强依赖于单个注册中心的局限性,降低了多框架之间微服务协同管理的耦合性,有利于微服务的统一管理,降低了运维成本。The main solution of the embodiment of the present application is: divide microservices into different microservice modes according to preset conditions; dynamically trigger a service discovery mechanism according to changes in the service status of the microservices, and obtain the different microservice modes The service information of the different microservice modes; the service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry; the service code of the unified format is intelligently parsed and matched The microservices are packaged into corresponding application program interfaces for consumption by consumers. It can effectively solve the problem of data coordination between multiple sets of completely different registration centers. When users use multiple service frameworks, they are no longer strongly dependent on the limitations of a single registry, which reduces the coupling of microservice collaborative management between multiple frameworks, facilitates the unified management of microservices, and reduces operation and maintenance costs.
为了更好的理解上述技术方案,下面将结合说明书附图以及具体的实施方式对上述技术方案进行详细的说明。In order to better understand the above technical solutions, the above technical solutions will be described in detail below in conjunction with the accompanying drawings of the specification and specific implementations.
本申请涉及一种设备包括如图1所示:至少一个处理器12、存储器11。This application relates to a device including as shown in FIG. 1: at least one processor 12 and a memory 11.
处理器12可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器12中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器12可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器11,处理器12读取存储器11中的信息,结合其硬件完成上述方法的步骤。The processor 12 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 12 or instructions in the form of software. The above-mentioned processor 12 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 devices, discrete gates or transistor logic devices, discrete hardware Components. The methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like. The software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers. 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 above method in combination with its hardware.
可以理解,本申请实施例中的存储器11可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例描述的系统和 方法的存储器11旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 11 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory can be read only memory (Read Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), erasable programmable read only memory (Erasable PROM, EPROM), and electrically erasable Except for programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache. By way of exemplary but not restrictive description, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Link Dynamic Random Access Memory (Synch link DRAM, SLDRAM) ) And Direct Rambus RAM (DRRAM). The memory 11 of the system and method described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
参照图2,图2为本申请多注册中心的微服务统一管理方法的第一实施例,所述多注册中心的微服务统一管理方法,包括以下步骤:Referring to Figure 2, Figure 2 is a first embodiment of a method for unified management of microservices with multiple registries under this application. The method for unified management of microservices with multiple registries includes the following steps:
步骤S110:根据预设条件将微服务划分为不同的微服务模式。Step S110: Divide the microservices into different microservice modes according to preset conditions.
预设条件是按照不同集成模式或者调用协议将微服务划分为不同的微服务模式,微服务模式可以是多个,预设条件在此不作限定,也可以是其他的划分方法。The preset condition is to divide microservices into different microservice modes according to different integration modes or calling protocols. There can be multiple microservice modes. The preset conditions are not limited here, and other division methods may also be used.
微服务(或微服务架构)是一种云原生架构方法,其中单个应用程序由许多松散耦合且可独立部署的较小组件或服务组成。这些服务通常有自己的堆栈,包括数据库和数据模型;通过应用程序接口,事件流和消息代理的组合相互通信;它们是按业务能力组织的,分隔服务的线通常称为有界上下文。微服务架构下,主要有三种角色,服务提供方、服务消费方和服务注册中心。Microservice (or microservice architecture) is a cloud-native architecture method in which a single application consists of many smaller components or services that are loosely coupled and independently deployable. These services usually have their own stack, including databases and data models; they communicate with each other through a combination of application program interfaces, event streams, and message brokers; they are organized by business capabilities, and the lines separating services are usually called bounded contexts. Under the microservice architecture, there are three main roles: service provider, service consumer, and service registry.
服务注册中心(Registry)是一个存储服务实例的数据库,一个服务注册中心应该是高可用,而且数据是最新的。消费方在查询服务注册中心后,会缓存一部分网络地址的数据。The service registry (Registry) is a database that stores service instances. A service registry should be highly available and the data should be up-to-date. After the consumer queries the service registry, it will cache part of the network address data.
每个注册中心对应多个服务实例,每个注册中心下对应的多个服务实例,其使用的是相同的集成模式或者相同的调用协议或者相同的属性。Each registry corresponds to multiple service instances, and the multiple service instances corresponding to each registry use the same integration mode or the same calling protocol or the same attributes.
步骤S120:根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息。Step S120: According to the change of the service status of the microservice, a service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes.
服务状态是用来监听微服务的服务状态变化的,包括服务下线事件、服务注册事件、服务续约事件、注册中心启动事件和启动事件等,当监听到上述任一服务状态的变化,则动态触发服务发现机制。Service status is used to monitor changes in the service status of microservices, including service offline events, service registration events, service renewal events, registry startup events, and startup events. When any of the above service status changes are monitored, The service discovery mechanism is triggered dynamically.
服务发现机制可以是服务的消费方(Consumer)发现服务的提供方(Provider)的机制,其中,服务发现机制的模式的核心是代理(Proxy),以及代理在架构中所处的位置。在服务消费方和服务提供方之间增加一层代理,由代理负责服务发现,消费方通过代理间接访问目标服务。根据代理在结构上所处的位置不同,可以分为三种不同的服务发现模式:传统集中式代理,客户端嵌入式代理,以及主机独立进程代理。The service discovery mechanism can be a mechanism by which the consumer of the service discovers the provider of the service. The core of the service discovery mechanism model is the proxy and the position of the proxy in the architecture. An agent is added between the service consumer and the service provider. The agent is responsible for service discovery, and the consumer indirectly accesses the target service through the agent. According to the different location of the agent structure, it can be divided into three different service discovery modes: traditional centralized agent, client embedded agent, and host independent process agent.
在本实施例中,本申请采用的是传统集中式代理和服务注册中心结合的服务发现机制,降低手工配置的复杂性。服务启动时,自动注册到服务注册中心并定期报心跳,代理则定期到服务注册中心同步服务实例。这种服务发现机制下,不需要为每个服务申请一个域名,只需要一个泛域名即可。In this embodiment, this application adopts a service discovery mechanism that combines a traditional centralized agent and a service registry to reduce the complexity of manual configuration. When the service starts, it will automatically register to the service registry and report the heartbeat regularly, and the agent will periodically synchronize the service instance to the service registry. Under this service discovery mechanism, there is no need to apply for a domain name for each service, only a generic domain name is required.
步骤S130:将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中。Step S130: The service information of the different microservice modes is converted into a service code of a unified format through a preset unified coding rule, and stored in the service registry.
服务信息是各服务实例对应的属性,可以是一个,也可以是多个。Service information is an attribute corresponding to each service instance, and it can be one or multiple.
经过预设统一编码规则转化为统一格式的服务编码,其中统一编码规则并不限定本申请提出的,也可以是其他的统一编码规则。After a preset uniform coding rule is converted into a uniform format service code, the uniform coding rule does not limit what is proposed in this application, and may also be other uniform coding rules.
步骤S140:对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。Step S140: Perform intelligent analysis on the service code in the unified format to match the corresponding microservice, and encapsulate it into a corresponding application program interface for consumption by the consumer.
应用程序接口即API(Application Programming Interface)是一些预先定义的函数,或者指软件系统不同组成部分衔接的约定。用来提供应用程序与开发人员给予某软件或硬件得以访问的一组例程,而无需访问源码,或理解内容工作机制的细节。API (Application Programming Interface) is some pre-defined functions, or refers to the agreement of the connection of different components of the software system. It is used to provide a set of routines that applications and developers give to certain software or hardware to access without having to access the source code or understand the details of the working mechanism of the content.
在本实施例中,将对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费,消费方无需访问源码也不用理解微服务工作机制的细节,直接使用API接口进行消费,能够有效解决多套完全不同的注册中心之间的数据协同的问题。In this embodiment, the service code in the unified format is intelligently analyzed to match the corresponding microservice, and packaged into a corresponding application program interface for consumption by the consumer. The consumer does not need to access the source code nor understand the working mechanism of the microservice. For details, directly use the API interface for consumption, which can effectively solve the problem of data coordination between multiple sets of completely different registries.
在上述实施例中存在的有益效果:如图3所示为多注册中心的微服务统一管理方法的工作流程图。根据预设条件将微服务划分为不同的微服务模式;对微服务模式进行划分,为后续获取服务信息及对服务信息进行统一编码提供可能。根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;获取不同给的微服务模式的服务信息为后续按照统一编码规则进行统一编码提供数据支持。将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;一个能够兼容各种协议服务的服务管理机制能够极大地降低架构内各组件之后调用的消耗,增强整个稳定性和可用性。对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。能有效解决多套完全不同的注册中心之间的数据协同的问题。在用户使用多个服务框架不再强依赖于单个注册中心的局限性,降低了多框架之间微服务协同管理的耦合性,有利于微服务的统一管理,降低了运维成本。The beneficial effect existing in the above-mentioned embodiment: FIG. 3 is a work flow chart of a method for unified management of microservices with multiple registration centers. Divide microservices into different microservice modes according to preset conditions; divide the microservice modes to provide the possibility for subsequent acquisition of service information and uniform coding of service information. According to the change of the service status of the microservice, the service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes; the service information of the different microservice modes is obtained to provide data for subsequent unified coding in accordance with the unified coding rules support. The service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry; a service management mechanism compatible with various protocol services can greatly reduce the structure The consumption of each component in subsequent calls enhances the overall stability and usability. The service code in the unified format is intelligently analyzed and matched to the corresponding microservice, and encapsulated into a corresponding application program interface for consumption by the consumer. It can effectively solve the problem of data coordination between multiple sets of completely different registration centers. When users use multiple service frameworks, they are no longer strongly dependent on the limitations of a single registry, which reduces the coupling of microservice collaborative management between multiple frameworks, facilitates the unified management of microservices, and reduces operation and maintenance costs.
在其中一个实施例中,所述服务信息为每个注册中心中服务实例对应的属性,所述属性包括以下至少之一:互联网协议地址、端口号、是否为临时服务实例、用于选择最优服务实例调用的权重、健康状态和元数据。In one of the embodiments, 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, and is used to select the best The weight, health status, and metadata of the service instance invocation.
互联网协议地址(Internet Protocol Address)是指IP地址,又译为网际协议地址。Internet Protocol Address (Internet Protocol Address) refers to IP address, which is also translated as Internet Protocol address.
IP地址是IP协议提供的一种统一的地址格式,它为互联网上的每一个网络和每一台主机分配一个逻辑地址,以此来屏蔽物理地址的差异。The IP address is a unified address format provided by the IP protocol. It assigns a logical address to each network and each host on the Internet to shield differences in physical addresses.
所谓的端口,就好像是门牌号一样,客户端可以通过IP地址找到对应的服务器端,但是服务器端是有很多端口的,每个应用程序对应一个端口号,通过类似门牌号的端口号,客户端才能真正的访问到该服务器。为了对端口进行区分,将每个端口进行了编号,这就是端口号。The so-called port is like a house number. The client can find the corresponding server through the IP address, but the server has many ports. Each application corresponds to a port number. Through the port number similar to the house number, the client Only the end can actually access the server. In order to distinguish the ports, each port is numbered. This is the port number.
服务实例的网络位置都是动态分配的,而且因为扩展、失效和升级等需求,服务实例会经常动态改变,有些服务实例可能为临时服务实例,所以该属性判断对应服务实例是否为临时服务实例。The network locations of service instances are dynamically allocated, and service instances often change dynamically due to requirements such as expansion, failure, and upgrade. Some service instances may be temporary service instances, so this attribute determines whether the corresponding service instance is a temporary service instance.
用于选择最优服务实例调用的权重,默认情况下每隔30秒会计算一次各个服务实例的权重,如果一个服务的平均响应时间越短则权重越大,那么该服务实例被选中执行任务的概率也就越大。It is used to select the weight of the optimal service instance call. By default, the weight of each service instance is calculated every 30 seconds. If the average response time of a service is shorter, the weight is greater, and then the service instance is selected to perform the task. The probability is greater.
健康状态可以提供有关运行微服务实例的服务器状态的信息,也可以是微服务是否在运行的指示器,这样可以获得更丰富的监控体验。The health status can provide information about the status of the server running the microservice instance, or it can be an indicator of whether the microservice is running, so that a richer monitoring experience can be obtained.
元数据(Metadata)可以是微服务模式的默认数据,也可以是自定义的数据。Metadata can be the default data of the microservice model or custom data.
在上述实施例中存在的有益效果:通过获取所述服务信息中每个注册中心中服务实例对应的属性,为统一编码规则提供数据支持,是进行统一编码的必要条件。The above-mentioned embodiment has the beneficial effect: by obtaining the attribute corresponding to the service instance in each registry in the service information, providing data support for the unified coding rule is a necessary condition for the unified coding.
参照图4,图4为本申请多注册中心的微服务统一管理方法的第一实施例中步骤S130的具体流程示意图,所述将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,包括:Referring to Figure 4, Figure 4 is a schematic diagram of the specific flow of step S130 in the first embodiment of the method for unified management of microservices with multiple registration centers under this application. The service information of the different microservice modes is subjected to preset uniform coding rules. The service code transformed into a unified format, including:
步骤S131:选择应用于所述统一编码规则的属性。Step S131: Select the attribute applied to the unified coding rule.
步骤S132:预设所选择的各属性对应的编码位数。Step S132: preset the number of coding bits corresponding to the selected attributes.
步骤S133:按照预设顺序串联选择的属性得到所述统一格式的服务编码。Step S133: Concatenate the selected attributes in a preset order to obtain the service code in the unified format.
在本实施例中,预设统一编码规则可以是统一编码由20位十进制数字字符组成,由IP地址(以IPv4为例,地址的文本格式为nnn.nnn.nnn.nnn,共占12位)、端口号(XXXX,共占4为)、是否为临时服务实例(1位)、权重(占1位)、健康状态(占1位)和元数据(占2位),即预设统一编码=IP地址+端口号+是否为临时服务实例+权重+健康状态+元数据。经过预设统一编码规则可以将不同的微服务模式的服务信息转化为统一格式的服务编码。In this embodiment, the preset unified encoding rule may be that the unified encoding consists of 20 decimal digits and consists of an IP address (taking IPv4 as an example, the text format of the address is nnn.nnn.nnn.nnn, which occupies 12 digits in total) , Port number (XXXX, a total of 4), whether it is a temporary service instance (1 digit), weight (1 digit), health status (1 digit) and metadata (2 digits), that is, the default uniform code = IP address + port number + whether it is a temporary service instance + weight + health status + metadata. After preset uniform coding rules, the service information of different microservice modes can be converted into uniform format service codes.
其中预设编码规则中服务实例属性的预设顺序可以动态调整,在此不作限定。例如:预设编码规则可以是统一编码由20位十进制数字字符组成,由端口(XXXX,共占4为)、IP地址(以IPv4为例,地址的文本格式为nnn.nnn.nnn.nnn,共占12位)、权重(占1位)、是否为临时服务实例(占1位)、健康状态(占1位)和元数据(占2位),即预设统一编码=端口+IP地址+权重+是否为临时服务实例+健康状态+元数据。经过预设统一编码规则可以将不同的微服务模式的服务信息转化为统一格式的服务编码。The preset order of service instance attributes in the preset coding rules can be dynamically adjusted, which is not limited here. For example: the preset encoding rule can be a unified encoding consisting of 20 decimal digits, port (XXXX, a total of 4), IP address (taking IPv4 as an example, the text format of the address is nnn.nnn.nnn.nnn, A total of 12 digits), weight (1 digit), whether it is a temporary service instance (1 digit), health status (1 digit), and metadata (2 digits), that is, the default unified code = port + IP address +Weight+Whether it is a temporary service instance+Health status+Metadata. After preset uniform coding rules, the service information of different microservice modes can be converted into uniform format service codes.
在此IP地址也可以是IPv6的格式,则预设统一编码规则的字符位数作适应性调整,以保证可以进行统一编码。Here, the IP address can also be in the IPv6 format, and the number of characters in the unified encoding rule is preset for adaptive adjustment to ensure that the unified encoding can be performed.
在上述实施例中存在的有益效果:将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码能够兼容各种服务模式的服务管理机制能够极大地降低架构内各组件之后调用的消耗,增强整个稳定性和可用性。The above-mentioned embodiment has the beneficial effect: the service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, which can be compatible with various service modes. The service management mechanism can greatly reduce the structure The consumption of each component in subsequent calls enhances the overall stability and usability.
参照图5,图5为本申请多注册中心的微服务统一管理方法的第一实施例中步骤S130的具体流程示意图,所述将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,还包括:Referring to FIG. 5, FIG. 5 is a schematic diagram of the specific process of step S130 in the first embodiment of the method for unified management of microservices with multiple registration centers of this application. The service information of the different microservice modes is subjected to preset unified coding rules The service code converted into a unified format also includes:
步骤S131':选择应用于所述统一编码规则的属性。Step S131': Select the attribute applied to the unified coding rule.
步骤S132':预设所选择的各属性对应的编码位数。Step S132': preset the number of coding bits corresponding to the selected attributes.
步骤S133':按照预设顺序串联选择的属性得到所述统一格式的服务编码。Step S133': the selected attributes are concatenated according to the preset order to obtain the service code in the unified format.
步骤S134':当所述服务信息中缺失统一编码规则中所选择的属性时,对缺失的属性执行补零操作。Step S134': When the attribute selected in the uniform coding rule is missing in the service information, perform a zero-padded operation on the missing attribute.
统一编码规则中的服务信息的属性可以是不同微服务模式下服务实例属性的全集,其中例如统一编码规则为IP地址+端口+权重+健康状态+元数据,一个服务实例属性包括IP为192.168.1.1,端口为0066,权重为0.2,则该服务实例的统一编码应该是192.168.001.001+0066+0.2+0+00(健康状态和元数据进行补零操作)。若一个服务实例属性包括IP为192.168.2.1,健康状态为1,则该服务实例的统一编码应该是192.168.002.001+0000+0+1+00(端口、权重和元数据进行补零操作)。其中,健康状态可以是1或0来表示两种状态。The attributes of the service information in the uniform coding rule can be the complete set of service instance attributes in different microservice modes. For example, the uniform coding rule is IP address + port + weight + health status + metadata, and the attribute of a service instance includes IP 192.168. 1.1, the port is 0066, and the weight is 0.2, then the uniform code of the service instance should be 192.168.001.001+0066+0.2+0+00 (zero padding for health status and metadata). If the attributes of a service instance include the IP of 192.168.2.1 and the health status of 1, the uniform code of the service instance should be 192.168.002.001+0000+0+1+00 (port, weight, and metadata are zero-filled). Among them, the health status can be 1 or 0 to indicate two states.
在上述实施例中包括步骤S131'、步骤S132'和步骤S133',在此不再赘述。The foregoing embodiment includes step S131', step S132', and step S133', which will not be repeated here.
在上述是实施例中存在的有益效果:补充了当所述服务信息中缺失统一编码规则中所选择的属性时,对缺失的属性执行补零操作的步骤,保证统一编码规则的正确性和全面性。The above is the beneficial effect of the embodiment: when the selected attribute in the uniform coding rule is missing in the service information, the step of zero-filling the missing attribute is added to ensure the correctness and comprehensiveness of the uniform coding rule. sex.
参照图6,图6为本申请多注册中心的微服务统一管理方法的第一实施例中步骤S140的具体流程示意图,所述对所述统一格式的服务编码进行智能解析,包括:Referring to Fig. 6, Fig. 6 is a schematic diagram of the specific flow of step S140 in the first embodiment of the method for unified management of microservices with multiple registration centers of this application. The intelligent analysis of the service code in the unified format includes:
步骤S141:实时从所述服务注册表中获取与服务名对应的所述统一格式的服务编码。Step S141: Acquire the service code in the unified format corresponding to the service name from the service registration table in real time.
建立一套服务注册表,即一个包括服务、服务的实例和其位置信息的数据库。各服务实例需要在启动时注册至该服务注册表,并在关闭时进行注销。该服务的客户端以及/或者路由器通过查询此服务注册表以找到可用的服务实例。Establish a service registry, that is, a database that includes services, service instances and their location information. Each service instance needs to be registered to the service registry when it is started, and to be deregistered when it is shut down. The client and/or router of the service can find available service instances by querying the service registry.
服务实例在服务注册表中进行注册包括两种模式,自注册模式和第三方注册模式。There are two modes for service instance registration in the service registry, self-registration mode and third-party registration mode.
自注册模式是服务实例自行完成注册。而第三方注册模式由第三方注册工具将各服务实例注册至服务注册表。在本实施例中,选用第三方注册模式将编码后获得的统一格式的服务编码存储至服务注册表中,第三方注册工具可以根据编码后获得的统一格式的服务编码对应调整,按照统一格式的服务编码进行储存,以便后续进行智能解析时提供更加可靠的数据支持。The self-registration mode is that the service instance completes the registration by itself. In the third-party registration mode, the third-party registration tool registers each service instance to the service registry. In this embodiment, the third-party registration mode is selected to store the service code in the uniform format obtained after encoding in the service registry. The third-party registration tool can correspondingly adjust the service code in the uniform format obtained after encoding, according to the uniform format of the service code. The service code is stored to provide more reliable data support for subsequent intelligent analysis.
消费方可以以服务名提出需要调用的微服务,也可以是其他的方式,比如IP地址等可以唯一确定微服务位置的属性,更加方便消费方调用所需的微服务,在此不作限定。The consumer can propose the microservice to be called by the service name, or other methods, such as IP address and other attributes that can uniquely determine the location of the microservice, which makes it more convenient for the consumer to call the required microservice, which is not limited here.
步骤S142:根据所述各属性对应的编码位数,顺序获取对应属性。Step S142: According to the number of code bits corresponding to each attribute, the corresponding attributes are sequentially acquired.
实时从所述服务注册表中获取与服务名对应的所述统一格式的服务编码,然后根据服务编码格式、各属性对应的编码位数以及各属性对应的编码顺序将服务编码中的服务实例的属性提取出来。例如,该服务实例的统一编码可以是192.168.001.001+6060+0.2+0+00,则对应智能解析提取出来的服务实例的属性为IP为192.168.1.1,端口为0066,权重为0.2, 根据提取出来的服务实例的属性执行对应的微服务。The service code in the uniform format corresponding to the service name is obtained from the service registration table in real time, and then according to the service coding format, the number of coding bits corresponding to each attribute, and the coding sequence corresponding to each attribute, the number of service instances in the service code The attributes are extracted. For example, the uniform code of the service instance can be 192.168.001.001+6060+0.2+0+00, then the attribute of the service instance extracted by the corresponding intelligent analysis is 192.168.1.1, the port is 0066, and the weight is 0.2. According to the extracted The attributes of the service instance come out to execute the corresponding microservice.
在上述实施例中存在的有益效果:对所述统一格式的服务编码进行智能解析以匹配对应的微服务,为封装应用程序接口提供数据支持,保证智能解析获得的属性与封装的应用程序接口的正确性。The beneficial effects in the above embodiments: intelligently analyze the service code in the unified format to match the corresponding microservices, provide data support for the encapsulated application program interface, and ensure that the attributes obtained by the intelligent analysis are consistent with the encapsulated application program interface. Correctness.
在其中一个实施例中,所述选择应用于所述统一编码规则的属性,包括:In one of the embodiments, the attribute that the selection is applied to the unified coding rule includes:
选择各服务实例对应的属性的全集应用于所述统一编码规则。The full set of attributes corresponding to each service instance is selected to be applied to the unified coding rule.
例如,一个服务实例属性包括IP为192.168.1.1,端口为0066,权重为0.2,而另一个服务实例属性包括IP为192.168.2.1,健康状态为1,则统一编码规则中的属性包括IP、端口、权重、健康状态,其统一编码顺序动态调整不作限定。For example, if the attributes of a service instance include IP 192.168.1.1, port 0066, and weight 0.2, while another service instance attribute includes IP 192.168.2.1 and health status 1, then the attributes in the uniform coding rule include IP and port , Weight, health status, the dynamic adjustment of the unified coding sequence is not limited.
在上述实施例中存在的有益效果:选择各服务实例对应的属性的全集应用于所述统一编码规则使得任一一个服务实例都能够进行统一编码转化成统一格式的服务编码。The beneficial effect existing in the above-mentioned embodiment is that the full set of attributes corresponding to each service instance is selected to be applied to the unified coding rule so that any service instance can be uniformly coded and converted into a service code of a unified format.
参照图7,图7为本申请多注册中心的微服务统一管理方法的第一实施例中步骤S110的具体流程示意图,所述根据预设条件将微服务划分为不同的微服务模式,包括:Referring to FIG. 7, FIG. 7 is a schematic diagram of the specific process of step S110 in the first embodiment of the method for unified management of microservices with multiple registration centers of this application. The division of microservices into different microservice modes according to preset conditions includes:
步骤S111:根据所述微服务所属的集成模式或使用的调用协议将微服务划分为不同的微服务模式。Step S111: Divide the microservice into different microservice modes according to the integration mode to which the microservice belongs or the calling protocol used.
其中微服务的集成模式可以分为聚合器微服务设计模式、代理微服务设计模式、链式微服务设计模式、分支微服务设计模式、数据共享微服务设计模式、异步消息传递微服务涉及模式。按照不同的集成模式可以将微服务模式划分为上述6种,但此处并不限定上述的集成模式。Among them, the integration mode of microservices can be divided into aggregator microservice design mode, agent microservice design mode, chain microservice design mode, branch microservice design mode, data sharing microservice design mode, and asynchronous messaging microservice related mode. According to different integration modes, the microservice mode can be divided into the above 6 types, but the above integration mode is not limited here.
微服务的调用协议可以包括以下5种,但不限定于以下5种:The calling protocol of microservices can include the following 5 types, but is not limited to the following 5 types:
1、按照协议所针对的语义分为:1. According to the semantics targeted by the agreement, it is divided into:
面向资源:REST;Resource-oriented: REST;
面向命令:SOAP、RMI、RPC;Command-oriented: SOAP, RMI, RPC;
面向事件:XMPP、JMS、AMQP;Event-oriented: XMPP, JMS, AMQP;
2、按照远程调用协议的编码可以分为:2. According to the coding of the remote call protocol, it can be divided into:
文本协议:HTTP+JSON/XML、SIP;Text protocol: HTTP+JSON/XML, SIP;
二进制协议:WebSocket+BSon/Protobuf;Binary protocol: WebSocket+BSon/Protobuf;
3、按照协议的用途可以分为:3. According to the purpose of the agreement, it can be divided into:
信令及控制协议:SIP、SDP、Jingle、ROAP;Signaling and control protocols: SIP, SDP, Jingle, ROAP;
媒体传输协议:HTTP、RTP、RTMP;Media transmission protocol: HTTP, RTP, RTMP;
安全相关协议:TLS、DTLS、oAuth2;Security related protocols: TLS, DTLS, oAuth2;
4、按照交互方式分为:4. Divided into according to the interactive mode:
请求/响应;Request/response
请求/收到;Request/receive;
请求/协商/确认;Request/negotiation/confirmation;
发布/订阅;Publish/subscribe;
5、按照数据传输格式分为:5. According to the data transmission format, it is divided into:
文本格式:键值对、Json、Xml;Text format: key-value pairs, Json, Xml;
二进制格式:Proto buffer、BSON、Thrift、PDU。Binary format: Proto buffer, BSON, Thrift, PDU.
在本实施中,按照不同的集成模式或者调用协议将IT系统的微服务划分为不同的微服务模式,为后续进行服务统一编码提供可能。不同的集成模式或者调用协议对应不同的注册中心。首先按照不同的集成模式或者调用协议将IT系统的服务划分为不同的微服务模式,是将各微服务中类似的注册中心划分到一起,成为一个相同的微服务模式下的注册中心。In this implementation, the microservices of the IT system are divided into different microservice modes according to different integration modes or calling protocols, which provides the possibility for subsequent uniform coding of services. Different integration modes or calling protocols correspond to different registration centers. First, the IT system's services are divided into different microservice modes according to different integration modes or invocation protocols, which is to divide similar registries in each microservice together to become a registrar under the same microservice mode.
参照图8,图8为本申请多注册中心的微服务统一管理方法的第二实施例,所述多注册中心的微服务统一管理方法,包括以下步骤:Referring to Fig. 8, Fig. 8 is a second embodiment of the unified management method for microservices with multiple registries under this application. The unified management method for microservices with multiple registries includes the following steps:
步骤S210:根据预设条件将微服务划分为不同的微服务模式。Step S210: Divide the microservices into different microservice modes according to preset conditions.
步骤S220:根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息。Step S220: According to the change of the service status of the microservice, a service discovery mechanism is dynamically triggered to obtain the service information of the different microservice modes.
步骤S230:将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中。Step S230: The service information of the different microservice modes is converted into a service code of a unified format through a preset unified coding rule, and stored in the service registry.
步骤S240:对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口。Step S240: Perform intelligent analysis on the service code in the unified format to match the corresponding microservice, and encapsulate it into a corresponding application program interface.
步骤S250:对封装成对应的应用程序接口进行多维度管理;其中,所述多维度管理包括以下至少之一:微服务的状态管理、请求限流和熔断。Step S250: Perform multi-dimensional management on the encapsulated corresponding application program interface; wherein, the multi-dimensional management includes at least one of the following: state management of microservices, request current limiting, and fusing.
与第一实施例相比,第二实施例包括步骤S250。其他步骤和第一实施例相同,不再赘述。Compared with the first embodiment, the second embodiment includes step S250. The other steps are the same as those in the first embodiment, and will not be repeated here.
微服务的状态管理是对微服务的服务实例的运行状态进行管理,若代理发现服务实例存在问题,则可以采取纠正措施,如关闭出现故障的实例或启动另外的服务实例。State management of microservices is to manage the running status of service instances of microservices. If the agent finds a problem with the service instance, it can take corrective measures, such as shutting down the failed instance or starting another service instance.
请求限流针对超过预期的流量,通过预先设定的限流规则和限流算法选择性的对某些请求进行限流。Request flow limiting is used to selectively limit certain requests for traffic exceeding expectations through preset flow limiting rules and flow limiting algorithms.
熔断就是在特定的场景下关掉当前的通路,从而起到保护整个系统的效果。Fuse is to turn off the current path in a specific scenario, so as to protect the entire system.
在此并不限定于上述多维度管理,还可以是其他的微服务管理。This is not limited to the above-mentioned multi-dimensional management, and may also be other microservice management.
在上述实施例中存在的有益效果:封装对应的程序接口不仅仅可以供消费方进行消费,还可以进行多维度管理,包括微服务的状态管理、请求限流或熔断,使得本申请的统一管理方法具有更大的适用性。The beneficial effect in the above-mentioned embodiment: the program interface corresponding to the package can not only be consumed by the consumer, but also can be managed in multiple dimensions, including the state management of microservices, request current limiting or fuse, so that the unified management of this application The method has greater applicability.
本申请还提供一种装置,其特征在于,包括:The application also provides a device, which is characterized in that it comprises:
划分模块,用于根据预设条件将微服务划分为不同的微服务模式;The division module is used to divide microservices into different microservice modes according to preset conditions;
服务信息获取模块,用于根据所述微服务的服务状态的变化,动态触发服务发现机制, 获取所述不同的微服务模式的服务信息;The service information acquisition module is configured to dynamically trigger a service discovery mechanism according to the change of the service status of the microservice to acquire the service information of the different microservice modes;
统一编码模块,用于将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;The unified coding module is used to convert the service information of the different microservice modes into a unified format service code through preset unified coding rules, and store it in the service registry;
应用模块,用于对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The application module is used for intelligently analyzing and matching the corresponding microservices on the service code in the unified format, and encapsulating it into a corresponding application program interface for consumption by the consumer.
图9所示装置包括划分模块21、服务信息获取模块22、统一编码模块23、应用模块24,该装置可以执行图2至图8所示实施例的方法,本实施例未详细描述的部分,可参考对图2至图8所示实施例的相关说明。该技术方案的执行过程和技术效果参见图2至图8所示实施例中的描述,在此不再赘述。The device shown in Fig. 9 includes a division module 21, a service information acquisition module 22, a unified coding module 23, and an application module 24. The device can execute the methods of the embodiments shown in Figs. 2 to 8, and the parts not described in detail in this embodiment are Reference may be made to the related descriptions of the embodiments shown in FIG. 2 to FIG. 8. For the implementation process and technical effects of this technical solution, please refer to the description in the embodiment shown in FIG. 2 to FIG. 8, which will not be repeated here.
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,也可以为易失性计算机可读存储介质。计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:The present application also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on the computer, the computer executes the following steps:
根据预设条件将微服务划分为不同的微服务模式;根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。Divide microservices into different microservice modes according to preset conditions; dynamically trigger a service discovery mechanism according to changes in the service status of the microservices to obtain service information of the different microservice modes; divide the different microservices The service information of the service mode is converted into a unified format service code through preset unified coding rules, and stored in the service registry; the unified format service code is intelligently analyzed to match the corresponding microservice, and packaged into a corresponding application The program interface is for the consumer to consume.
本申请还提供一种设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的多注册中心的微服务统一管理方法的程序,所述处理器执行所述多注册中心的微服务统一管理方法的程序时实现上述任一所述的方法。The present application also provides a device including a memory, a processor, and a program of a method for unified management of microservices of multiple registries stored in the memory and running on the processor, and the processor executes the microservices of the multiple registries. The program of the unified service management method implements any of the above-mentioned methods.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置 的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
应当注意的是,在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的部件或步骤。位于部件之前的单词“一”或“一个”不排除存在多个这样的部件。本申请可以借助于包括有若干不同部件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that in the claims, any reference signs located between parentheses should not be constructed as limitations on the claims. The word "comprising" does not exclude the presence of parts or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of multiple such components. The application can be realized by means of hardware including several different components and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices may be embodied in the same hardware item. The use of the words first, second, and third, etc. do not indicate any order. These words can be interpreted as names.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本发Obviously, those skilled in the art can make various changes and modifications to this application without departing from the present invention.
明的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Ming’s spirit and scope. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, then this application is also intended to include these modifications and variations.

Claims (20)

  1. 一种多注册中心的微服务统一管理方法,所述多注册中心的微服务统一管理方法包括:A method for unified management of microservices with multiple registries. The method for unified management of microservices with multiple registries includes:
    根据预设条件将微服务划分为不同的微服务模式;Divide microservices into different microservice modes according to preset conditions;
    根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;According to the change of the service status of the microservice, dynamically trigger a service discovery mechanism to obtain the service information of the different microservice modes;
    将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;The service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry;
    对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The service code in the unified format is intelligently analyzed and matched to the corresponding microservice, and encapsulated into a corresponding application program interface for consumption by the consumer.
  2. 如权利要求1所述的多注册中心的微服务统一管理方法,其中,所述服务信息为每个注册中心中服务实例对应的属性,所述属性包括以下至少之一:互联网协议地址、端口号、是否为临时服务实例、用于选择最优服务实例调用的权重、健康状态和元数据。The method for unified management of microservices with multiple registration centers according to claim 1, wherein the service information is an attribute corresponding to a service instance in each registration center, and the attribute includes at least one of the following: Internet Protocol address, port number , Whether it is a temporary service instance, the weight used to select the optimal service instance call, health status and metadata.
  3. 如权利要求2所述的多注册中心的微服务统一管理方法,其特征在于,所述将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,包括:The method for unified management of microservices with multiple registries according to claim 2, characterized in that said converting the service information of the different microservice modes into service codes of a unified format through a preset unified coding rule comprises:
    选择应用于所述统一编码规则的属性;Selecting attributes applied to the unified coding rule;
    预设所选择的各属性对应的编码位数;Preset the number of coding bits corresponding to each attribute selected;
    按照预设顺序串联选择的属性得到所述统一格式的服务编码。The selected attributes are concatenated in a preset order to obtain the service code in the unified format.
  4. 如权利要求3所述的多注册中心的微服务统一管理方法,其中,所述将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,还包括:The method for unified management of microservices with multiple registries according to claim 3, wherein said converting the service information of the different microservice modes into service codes in a unified format through preset unified coding rules, further comprises:
    当所述服务信息中缺失统一编码规则中所选择的属性时,对缺失的属性执行补零操作。When the attribute selected in the uniform coding rule is missing in the service information, a zero-padded operation is performed on the missing attribute.
  5. 如权利要求3所述的多注册中心的微服务统一管理方法,其中,所述对所述统一格式的服务编码进行智能解析,包括:The method for unified management of microservices with multiple registration centers according to claim 3, wherein the intelligent analysis of the service code in the unified format comprises:
    实时从所述服务注册表中获取与服务名对应的所述统一格式的服务编码;Obtaining the uniform format service code corresponding to the service name from the service registration table in real time;
    根据所述各属性对应的编码位数,顺序获取对应属性。According to the coding digits corresponding to each attribute, the corresponding attributes are sequentially obtained.
  6. 如权利要求3所述的多注册中心的微服务统一管理方法,其中,所述选择应用于所述统一编码规则的属性,包括:The method for unified management of microservices with multiple registries according to claim 3, wherein the selection of the attributes applied to the unified coding rule includes:
    选择各服务实例对应的属性的全集应用于所述统一编码规则。The full set of attributes corresponding to each service instance is selected to be applied to the unified coding rule.
  7. 如权利要求1所述的多注册中心的微服务统一管理方法,其中,所述根据预设条件将微服务划分为不同的微服务模式,包括:The method for unified management of microservices with multiple registries according to claim 1, wherein said dividing microservices into different microservice modes according to preset conditions comprises:
    根据所述微服务所属的集成模式或使用的调用协议将微服务划分为不同的微服务模式。According to the integration mode to which the microservice belongs or the calling protocol used, the microservice is divided into different microservice modes.
  8. 一种多注册中心的微服务统一管理设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:A unified management device for microservices with multiple registration centers, including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor, and the processor executes the computer-readable instructions When implementing the following steps:
    根据预设条件将微服务划分为不同的微服务模式;Divide microservices into different microservice modes according to preset conditions;
    根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;According to the change of the service status of the microservice, dynamically trigger a service discovery mechanism to obtain the service information of the different microservice modes;
    将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;The service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry;
    对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The service code in the unified format is intelligently analyzed and matched to the corresponding microservice, and encapsulated into a corresponding application program interface for consumption by the consumer.
  9. 如权利要求8所述的多注册中心的微服务统一管理设备,其中,所述处理器执行所述计算机可读指令实现所述服务信息为每个注册中心中服务实例对应的属性时,所述属性包括以下至少之一:The device for unified management of microservices with multiple registration centers according to claim 8, wherein when the processor executes the computer-readable instructions to realize that the service information is the attribute corresponding to the service instance in each registration center, the The attributes include at least one of the following:
    互联网协议地址、端口号、是否为临时服务实例、用于选择最优服务实例调用的权重、健康状态和元数据。Internet protocol address, port number, whether it is a temporary service instance, the weight used to select the optimal service instance call, health status, and metadata.
  10. 如权利要求9所述的多注册中心的微服务统一管理设备,其中,所述处理器执行所述计算机可读指令实现所述将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码时,包括以下步骤:The device for unified management of microservices with multiple registration centers according to claim 9, wherein the processor executes the computer-readable instructions to implement the process of passing the service information of the different microservice modes through a preset unified coding rule When converting to a uniform format service code, the following steps are included:
    选择应用于所述统一编码规则的属性;Selecting attributes applied to the unified coding rule;
    预设所选择的各属性对应的编码位数;Preset the number of coding bits corresponding to each attribute selected;
    按照预设顺序串联选择的属性得到所述统一格式的服务编码。The selected attributes are concatenated in a preset order to obtain the service code in the unified format.
  11. 如权利要求10所述的多注册中心的微服务统一管理设备,其中,所述处理器执行所述计算机可读指令实现所述将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码时,还包括以下步骤:The device for unified management of microservices with multiple registration centers according to claim 10, wherein the processor executes the computer-readable instructions to implement the process of passing the service information of the different microservice modes through a preset unified coding rule When converting to a uniform format service code, the following steps are also included:
    当所述服务信息中缺失统一编码规则中所选择的属性时,对缺失的属性执行补零操作。When the attribute selected in the uniform coding rule is missing in the service information, a zero-padded operation is performed on the missing attribute.
  12. 如权利要求10所述的多注册中心的微服务统一管理设备,其中,所述处理器执行所述计算机可读指令实现所述对所述统一格式的服务编码进行智能解析时,包括以下步骤:10. The device for unified management of microservices with multiple registration centers according to claim 10, wherein when the processor executes the computer-readable instructions to realize the intelligent analysis of the service code in the unified format, the method comprises the following steps:
    实时从所述服务注册表中获取与服务名对应的所述统一格式的服务编码;Obtaining the uniform format service code corresponding to the service name from the service registration table in real time;
    根据所述各属性对应的编码位数,顺序获取对应属性。According to the coding digits corresponding to each attribute, the corresponding attributes are sequentially obtained.
  13. 如权利要求10所述的多注册中心的微服务统一管理设备,其中,所述处理器执行所述计算机可读指令实现所述选择应用于所述统一编码规则的属性时,包括以下步骤:The device for unified management of microservices with multiple registration centers according to claim 10, wherein, when the processor executes the computer-readable instructions to implement the selection of the attributes applied to the unified coding rule, the method comprises the following steps:
    选择各服务实例对应的属性的全集应用于所述统一编码规则。The full set of attributes corresponding to each service instance is selected to be applied to the unified coding rule.
  14. 如权利要求8所述的多注册中心的微服务统一管理设备,所述处理器执行所述计算机可读指令实现所述根据预设条件将微服务划分为不同的微服务模式时,包括以下步骤:The device for unified management of microservices with multiple registration centers according to claim 8, when the processor executes the computer-readable instructions to realize the division of microservices into different microservice modes according to preset conditions, comprising the following steps :
    根据所述微服务所属的集成模式或使用的调用协议将微服务划分为不同的微服务模式。According to the integration mode to which the microservice belongs or the calling protocol used, the microservice is divided into different microservice modes.
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:A computer-readable storage medium in which computer instructions are stored, and when the computer instructions are executed on a computer, the computer executes the following steps:
    根据预设条件将微服务划分为不同的微服务模式;Divide microservices into different microservice modes according to preset conditions;
    根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;According to the change of the service status of the microservice, dynamically trigger a service discovery mechanism to obtain the service information of the different microservice modes;
    将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;The service information of the different microservice modes is converted into a service code of a unified format through preset unified coding rules, and stored in the service registry;
    对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The service code in the unified format is intelligently analyzed and matched to the corresponding microservice, and encapsulated into a corresponding application program interface for consumption by the consumer.
  16. 如权利要求15所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:The computer-readable storage medium according to claim 15, when the computer instructions are executed on the computer, the computer is caused to further execute the following steps:
    所述服务信息为每个注册中心中服务实例对应的属性,所述属性包括以下至少之一:互联网协议地址、端口号、是否为临时服务实例、用于选择最优服务实例调用的权重、健康状态和元数据。The service information is an attribute corresponding to the 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, the weight used to select the optimal service instance call, and health Status and metadata.
  17. 如权利要求16所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:The computer-readable storage medium according to claim 16, when the computer instructions are executed on the computer, the computer is caused to further perform the following steps:
    选择应用于所述统一编码规则的属性;Selecting attributes applied to the unified coding rule;
    预设所选择的各属性对应的编码位数;Preset the number of coding bits corresponding to each attribute selected;
    按照预设顺序串联选择的属性得到所述统一格式的服务编码。The selected attributes are concatenated in a preset order to obtain the service code in the unified format.
  18. 如权利要求17所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:The computer-readable storage medium according to claim 17, when the computer instructions are executed on the computer, the computer is caused to further perform the following steps:
    当所述服务信息中缺失统一编码规则中所选择的属性时,对缺失的属性执行补零操作。When the attribute selected in the uniform coding rule is missing in the service information, a zero-padded operation is performed on the missing attribute.
  19. 如权利要求17所述的计算机可读存储介质,当所述计算机指令在计算机上运行时,使得计算机还执行以下步骤:The computer-readable storage medium according to claim 17, when the computer instructions are executed on the computer, the computer is caused to further perform the following steps:
    实时从所述服务注册表中获取与服务名对应的所述统一格式的服务编码;Obtaining the uniform format service code corresponding to the service name from the service registration table in real time;
    根据所述各属性对应的编码位数,顺序获取对应属性。According to the coding digits corresponding to each attribute, the corresponding attributes are sequentially obtained.
  20. 一种多注册中心的微服务统一管理装置,所述多注册中心的微服务统一管理装置包括:A unified management device for microservices with multiple registration centers. The unified management device for microservices with multiple registration centers includes:
    划分模块,用于根据预设条件将微服务划分为不同的微服务模式;The division module is used to divide microservices into different microservice modes according to preset conditions;
    服务信息获取模块,用于根据所述微服务的服务状态的变化,动态触发服务发现机制,获取所述不同的微服务模式的服务信息;The service information acquisition module is used to dynamically trigger the service discovery mechanism according to the change of the service status of the microservice to acquire the service information of the different microservice modes;
    统一编码模块,用于将所述不同的微服务模式的服务信息经过预设统一编码规则转化为统一格式的服务编码,并存储于服务注册表中;The unified coding module is used to convert the service information of the different microservice modes into a unified format service code through preset unified coding rules, and store it in the service registry;
    应用模块,用于对所述统一格式的服务编码进行智能解析匹配对应的微服务,并封装成对应的应用程序接口供消费方进行消费。The application module is used for intelligently analyzing and matching the corresponding microservices on the service code in the unified format, and encapsulating it into a corresponding application program interface for consumption by the consumer.
PCT/CN2021/082595 2020-10-28 2021-03-24 Method for unified management of micro-services of multiple registration centers, and apparatus, device and medium WO2021203968A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011175929.X 2020-10-28
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
WO2021203968A1 true WO2021203968A1 (en) 2021-10-14

Family

ID=74373173

Family Applications (1)

Application Number Title Priority Date Filing Date
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

Country Status (2)

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

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124695A (en) * 2021-11-23 2022-03-01 上海帆一尚行科技有限公司 Data acquisition method and device and electronic equipment
CN114237704A (en) * 2021-11-15 2022-03-25 贵州大学 Method for integrating spring-closed-alibaba nacos framework with istio
CN114257497A (en) * 2021-12-22 2022-03-29 上海中通吉网络技术有限公司 Method for dynamically replacing Dubbo micro service
CN114547052A (en) * 2022-02-14 2022-05-27 山东浪潮超高清视频产业有限公司 Method for updating cache of distributed system
CN114817821A (en) * 2022-06-30 2022-07-29 数字广东网络建设有限公司 Display method and device of government affair information, electronic equipment and storage medium
CN114942856A (en) * 2022-07-22 2022-08-26 浙江中控技术股份有限公司 Data processing method and device of micro-service system and electronic equipment
CN115134413A (en) * 2022-05-16 2022-09-30 中国人民财产保险股份有限公司 Registration method of micro service cluster, service request processing method and micro service cluster
CN115292022A (en) * 2022-09-29 2022-11-04 泰豪软件股份有限公司 Workflow engine system, implementation method, storage medium and computer equipment
CN115757552A (en) * 2022-11-29 2023-03-07 广发银行股份有限公司 Bank historical data management system based on distributed micro-service
CN115941772A (en) * 2022-11-07 2023-04-07 平安国际融资租赁有限公司 Third-party service access method, device, equipment and medium
WO2023083038A1 (en) * 2021-11-15 2023-05-19 百果园技术(新加坡)有限公司 Multi-registration center data processing method and apparatus, device, and storage medium
CN116155957A (en) * 2023-04-19 2023-05-23 华芯(嘉兴)智能装备有限公司 Operation method and device of sorting machine control program and electronic equipment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112286503A (en) * 2020-10-28 2021-01-29 平安科技(深圳)有限公司 Multi-registration center micro-service unified management method, device, equipment and medium
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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106610836A (en) * 2016-12-23 2017-05-03 国网信息通信产业集团有限公司 Micro-service operation management tool
US20180048717A1 (en) * 2016-08-12 2018-02-15 Oracle International Corporation System and method for supporting live addition of a tenant in a connection pool environment
CN109257440A (en) * 2018-10-29 2019-01-22 南京南瑞信息通信科技有限公司 A kind of service discovery and client load equalization methods based on service register center
CN109547570A (en) * 2018-12-29 2019-03-29 深圳云天励飞技术有限公司 Service registration method, apparatus, registration center's management equipment and storage medium
CN110636093A (en) * 2018-06-25 2019-12-31 中兴通讯股份有限公司 Microservice registration and discovery method, microservice registration and discovery device, storage medium and microservice system
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016065080A1 (en) * 2014-10-21 2016-04-28 Twilio, Inc. System and method for providing a miro-services communication platform
CN107911430A (en) * 2017-11-06 2018-04-13 上海电机学院 A kind of micro services infrastructure equipment
CN110324177B (en) * 2019-05-31 2022-05-24 中国人民解放军国防科技大学 Service request processing method, system and medium under micro-service architecture

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180048717A1 (en) * 2016-08-12 2018-02-15 Oracle International Corporation System and method for supporting live addition of a tenant in a connection pool environment
CN106610836A (en) * 2016-12-23 2017-05-03 国网信息通信产业集团有限公司 Micro-service operation management tool
CN110636093A (en) * 2018-06-25 2019-12-31 中兴通讯股份有限公司 Microservice registration and discovery method, microservice registration and discovery device, storage medium and microservice system
CN109257440A (en) * 2018-10-29 2019-01-22 南京南瑞信息通信科技有限公司 A kind of service discovery and client load equalization methods based on service register center
CN109547570A (en) * 2018-12-29 2019-03-29 深圳云天励飞技术有限公司 Service registration method, apparatus, registration center's management equipment and storage medium
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

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023083038A1 (en) * 2021-11-15 2023-05-19 百果园技术(新加坡)有限公司 Multi-registration center data processing method and apparatus, device, and storage medium
CN114237704A (en) * 2021-11-15 2022-03-25 贵州大学 Method for integrating spring-closed-alibaba nacos framework with istio
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
CN114257497A (en) * 2021-12-22 2022-03-29 上海中通吉网络技术有限公司 Method for dynamically replacing Dubbo micro service
CN114547052A (en) * 2022-02-14 2022-05-27 山东浪潮超高清视频产业有限公司 Method for updating cache of distributed system
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
CN114817821A (en) * 2022-06-30 2022-07-29 数字广东网络建设有限公司 Display method and device of government affair information, electronic equipment and storage medium
CN114942856A (en) * 2022-07-22 2022-08-26 浙江中控技术股份有限公司 Data processing method and device of micro-service system and electronic equipment
CN115292022A (en) * 2022-09-29 2022-11-04 泰豪软件股份有限公司 Workflow engine system, implementation method, storage medium and computer equipment
CN115941772A (en) * 2022-11-07 2023-04-07 平安国际融资租赁有限公司 Third-party service access method, device, equipment and medium
CN115757552A (en) * 2022-11-29 2023-03-07 广发银行股份有限公司 Bank historical data management system based on distributed micro-service
CN116155957A (en) * 2023-04-19 2023-05-23 华芯(嘉兴)智能装备有限公司 Operation method and device of sorting machine control program and electronic equipment

Also Published As

Publication number Publication date
CN112286503A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
WO2021203968A1 (en) Method for unified management of micro-services of multiple registration centers, and apparatus, device and medium
WO2021244211A1 (en) Blockchain message processing method and apparatus, computer and readable storage medium
CN111447103B (en) Virtual device management system, electronic device, virtual device management method, and medium
US8321450B2 (en) Standardized database connectivity support for an event processing server in an embedded context
US7908317B2 (en) System and method for URL compression
WO2021013058A1 (en) Exception prompting method, apparatus, system and device for big data product, and medium
JP2010531481A (en) Transfer of tabular parameters via tabular data stream protocol
WO2021073202A1 (en) Intelligent contract processing method, computer device and storage medium
JP2004303214A (en) System and method for requesting and receiving database change notification
WO2018184535A1 (en) Insurance service processing method and device, server, and storage medium
US11115913B2 (en) Wireless communication core network and method for analyzing user equipment mobility in the same
US8375399B2 (en) Method, apparatus and computer program to perform dynamic selection of serialization processing schemes
WO2016107120A1 (en) Application programming interface calling method and device
CN112804289A (en) Resource synchronization method, device, equipment and storage medium
WO2022214012A1 (en) System and method for implementing multi-language translation of application program, device and medium
US9723091B1 (en) Variable length protocol using serialized payload with compression support
US7849472B1 (en) System for instrumenting resources utilizing WS-management resource MBean wrappers for JAXB beans
WO2023208132A1 (en) Api conversion system and access request processing method therefor, and electronic device and medium
US7366960B2 (en) Use of incarnation number for resource state cycling
CN112783909B (en) Data updating method, device, terminal equipment and storage medium
CN115269228A (en) Data adaptive transmission method, device, equipment and medium
US8132189B1 (en) WS-management resource MBean wrapper for JAXB beans
US10904357B1 (en) Optimizing request dispatching between services
CN111049723A (en) Message pushing method, message management system, server and computer storage medium
CN113194150B (en) Long connection push service processing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21784641

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21784641

Country of ref document: EP

Kind code of ref document: A1