WO2022134358A1 - Microservice data processing method, apparatus, microservice processing platform, and medium - Google Patents

Microservice data processing method, apparatus, microservice processing platform, and medium Download PDF

Info

Publication number
WO2022134358A1
WO2022134358A1 PCT/CN2021/084251 CN2021084251W WO2022134358A1 WO 2022134358 A1 WO2022134358 A1 WO 2022134358A1 CN 2021084251 W CN2021084251 W CN 2021084251W WO 2022134358 A1 WO2022134358 A1 WO 2022134358A1
Authority
WO
WIPO (PCT)
Prior art keywords
microservice
data
target
registry
registration
Prior art date
Application number
PCT/CN2021/084251
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 WO2022134358A1 publication Critical patent/WO2022134358A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present application is suitable for the technical field of big data and provides a microservice data processing method, an apparatus, a microservice processing platform, and a medium. The method comprises: determining a target registration center containing registration information for a microservice and a target registration type of the target registration center; generating a target call interface in a microservice registration adaptation engine of a microservice processing platform according to the target registration type; obtaining microservice data of a microservice according to the target call interface and a target open interface; and writing the microservice data into a database of the microservice processing platform and performing centralized processing. Utilizing the described method to obtain microservice data of various microservices by means of performing interface adaptation with registration centers of different registration types, an effect of performing effective processing directly on a plurality of pieces of microservice data when pieces of registration information for a plurality of microservices are respectively deployed on registration centers of different registration types can be achieved.

Description

微服务数据的处理方法、装置、微服务处理平台及介质Microservice data processing method, device, microservice processing platform and medium
本申请要求于2020年12月24日在中国专利局提交的、申请号为202011556562.6、发明名称为“微服务数据的处理方法、装置、微服务处理平台及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011556562.6 and the invention titled "Microservice Data Processing Method, Device, Microservice Processing Platform and Medium" filed in the China Patent Office on December 24, 2020, The entire contents of which are incorporated herein by reference.
技术领域technical field
本申请属于大数据技术领域,尤其涉及一种微服务数据的处理方法、装置、微服务处理平台及介质。The present application belongs to the technical field of big data, and in particular, relates to a method, device, microservice processing platform and medium for processing microservice data.
背景技术Background technique
现有技术中,在多个微服务的注册信息分别部署在不同注册类型的注册中心时,因注册中心的注册类型不同,很难通过单独的微服务处理平台直接对多个微服务进行处理。目前,通常是将大量微服务的注册信息在同一个注册类型的注册中心进行部署。然而,发明人意识到,若大量微服务已有对应的注册中心,则需要将微服务在对应的注册中心内部署的注册信息进行删除。之后,将注册信息在同一个注册类型的注册中心重新进行部署。此时,对注册信息重新进行部署时,将增加工作人员的工作量。因此,目前存在对于多个微服务的注册信息分别部署在不同注册类型的注册中心时,难以通过单独的微服务处理平台直接对多个微服务数据进行有效处理的问题。In the prior art, when the registration information of multiple microservices are respectively deployed in registration centers of different registration types, it is difficult to directly process the multiple microservices through a separate microservice processing platform due to the different registration types of the registration centers. At present, the registration information of a large number of microservices is usually deployed in the registry of the same registration type. However, the inventor realizes that if a large number of microservices already have corresponding registration centers, the registration information deployed by the microservices in the corresponding registration centers needs to be deleted. After that, redeploy the registration information in the registration center of the same registration type. In this case, when the registration information is redeployed, the workload of the staff will be increased. Therefore, at present, when the registration information of multiple microservices are respectively deployed in the registration centers of different registration types, it is difficult to directly and effectively process the data of multiple microservices through a separate microservice processing platform.
技术问题technical problem
本申请实施例的目的之一在于:提供一种微服务数据的处理方法、装置、微服务处理平台及介质,旨在解决对于多个微服务的注册信息分别部署在不同注册类型的注册中心时,难以通过单独的微服务处理平台直接对多个微服务数据进行有效处理的技术问题。One of the purposes of the embodiments of the present application is to provide a microservice data processing method, device, microservice processing platform and medium, which aims to solve the problem when the registration information of multiple microservices are respectively deployed in registration centers of different registration types , the technical problem that it is difficult to directly and effectively process the data of multiple microservices through a single microservice processing platform.
技术解决方案technical solutions
为解决上述技术问题,本申请实施例采用的技术方案是:In order to solve the above-mentioned technical problems, the technical solutions adopted in the embodiments of the present application are:
本申请实施例的第一方面提供了一种微服务数据的处理方法,应用于微服务处理平台,所述方法包括:A first aspect of the embodiments of the present application provides a method for processing microservice data, which is applied to a microservice processing platform, and the method includes:
确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
本申请实施例的第二方面提供了一种微服务数据的处理装置,应用于微服务处理平台,所述装置包括:A second aspect of the embodiments of the present application provides an apparatus for processing microservice data, which is applied to a microservice processing platform, and the apparatus includes:
第一获取模块,用于确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;The first acquisition module is used to determine the target registration center containing the registration information of the microservice, and to determine the target registration type of the target registration center;
生成模块,用于根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;A generation module, configured to generate a target call interface adapted to the target open interface of the target registry in the microservice registration adaptation engine of the microservice processing platform according to the target registration type;
第二获取模块,用于根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;A second acquisition module, configured to acquire the microservice data of the microservice according to the target call interface and the target open interface;
处理模块,用于将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。A processing module, configured to write the microservice data into the database of the microservice processing platform, and centrally process the microservice data, where the database contains microservice data corresponding to multiple microservices one-to-one .
本申请实施例的第三方面提供了一种微服务处理平台,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现:A third aspect of the embodiments of the present application provides a microservice processing platform, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the When a computer program realizes:
确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现:A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement:
确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
本申请实施例的第五方面还提供了一种计算机程序产品,当所述计算机程序产品在微服务处理平台上运行时,使得所述微服务处理平台行时实现:A fifth aspect of the embodiments of the present application further provides a computer program product, when the computer program product runs on the microservice processing platform, the microservice processing platform can realize in real time:
确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
有益效果beneficial effect
与现有技术相比,本申请实施例包括以下优点:Compared with the prior art, the embodiments of the present application include the following advantages:
本申请实施例,在确定微服务对应的目标注册中心和目标注册中心的目标注册类型后,微服务处理平台只需对已有的目标注册中心的目标开放接口进行适配。以使得微服务处理平台可与目标注册中心进行连接,以此可获取到微服务在目标注册中心内部署的注册信息。之后,可根据注册信息获取相应微服务的微服务数据进行处理。基于此,微服务处理平台不仅可对不同注册类型的注册中心对应的多个微服务的微服务数据进行统一处理,还可有效的减少工作人员的工作量,以及降低在微服务处理平台中重新部署注册信息时,微服务数据泄露的风险。In the embodiment of the present application, after determining the target registry corresponding to the microservice and the target registration type of the target registry, the microservice processing platform only needs to adapt the target open interface of the existing target registry. So that the microservice processing platform can be connected with the target registry, so that the registration information of the microservice deployed in the target registry can be obtained. After that, the microservice data of the corresponding microservice can be obtained according to the registration information for processing. Based on this, the microservice processing platform can not only uniformly process the microservice data of multiple microservices corresponding to registries of different registration types, but also effectively reduce the workload of the staff and reduce the need for re-engineering in the microservice processing platform. The risk of microservice data leakage when deploying registration information.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或示范性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that are used in the description of the embodiments or exemplary technologies. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本申请一实施例提供的一种微服务数据的处理方法的实现流程图;FIG. 1 is an implementation flowchart of a method for processing microservice data provided by an embodiment of the present application;
图2是本申请另一实施例提供的一种微服务数据的处理方法的实现流程图;FIG. 2 is an implementation flowchart of a method for processing microservice data provided by another embodiment of the present application;
图3是本申请再一实施例提供的一种微服务数据的处理方法的实现流程图;3 is an implementation flowchart of a method for processing microservice data provided by yet another embodiment of the present application;
图4是本申请又一实施例提供的一种微服务数据的处理方法的实现流程图;FIG. 4 is an implementation flowchart of a method for processing microservice data provided by another embodiment of the present application;
图5是本申请又一实施例提供的一种微服务数据的处理方法的实现流程图;5 is an implementation flowchart of a method for processing microservice data provided by another embodiment of the present application;
图6是本申请一实施例提供的一种微服务数据的处理方法的S10CA的一种实现方式示意图;6 is a schematic diagram of an implementation of S10CA of a method for processing microservice data provided by an embodiment of the present application;
图7是本申请一实施例提供的一种微服务数据的处理方法的S10CB的一种实现方式示意图;7 is a schematic diagram of an implementation of S10CB of a method for processing microservice data provided by an embodiment of the present application;
图8是本申请一实施例提供的一种微服务数据的处理装置的结构框图;8 is a structural block diagram of an apparatus for processing microservice data provided by an embodiment of the present application;
图9是本申请一实施例提供的一种微服务处理平台的结构框图。FIG. 9 is a structural block diagram of a microservice processing platform provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域技术人员应当清楚,在没有这些具体细节的其他实施例中也可以实现本申请。在其他情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or sets thereof.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.
本申请实施例提供的微服务数据的处理方法应用于微服务处理平台。其中,微服务处理平台包括统一注册中心、微服务注册适配引擎、微服务监控引擎和数据库。上述统一注册中心可用于部署各个微服务的注册信息,以使得每个新上线的微服务可不用将各自的注册信息分别部署在多个注册中心,实现对多个微服务的注册信息的集中处理。上述微服务注册适配引擎用于对微服务已有的注册中心进行接口适配,以便微服务处理平台可通过该接口从已有的注册中心内获取微服务的注册信息,并根据注册信息获取该微服务的微服务数据。上述微服务监控引擎可用于在确定微服务中微服务框架的框架类型后,调用与框架类型适配的工具包与微服务框架进行接入,以实现对微服务中微服务组件的调用。上述数据库可用于存储每个微服务的微服务数据、微服务在运行时产生的监控数据,以及对监控数据进行分析得到的分析结果,对此不作限定。The microservice data processing method provided by the embodiment of the present application is applied to a microservice processing platform. Among them, the microservice processing platform includes a unified registry, a microservice registration adaptation engine, a microservice monitoring engine, and a database. The above unified registration center can be used to deploy the registration information of each microservice, so that each newly launched microservice does not need to deploy its own registration information in multiple registration centers, and realizes the centralized processing of registration information of multiple microservices . The above microservice registration adaptation engine is used to adapt the interface to the existing registration center of the microservice, so that the microservice processing platform can obtain the registration information of the microservice from the existing registration center through this interface, and obtain the registration information according to the registration information. Microservice data for this microservice. The above-mentioned microservice monitoring engine can be used to call a toolkit adapted to the frame type to access the microservice framework after determining the frame type of the microservice framework in the microservice, so as to implement the invocation of the microservice component in the microservice. The above database can be used to store the microservice data of each microservice, the monitoring data generated by the microservice when the microservice is running, and the analysis results obtained by analyzing the monitoring data, which are not limited thereto.
请参阅图1,图1示出了本申请实施例提供的一种微服务数据的处理方法的实现流程图,该方法应用于微服务处理平台,该方法具体包括如下步骤:Please refer to FIG. 1. FIG. 1 shows an implementation flowchart of a method for processing microservice data provided by an embodiment of the present application. The method is applied to a microservice processing platform, and the method specifically includes the following steps:
S101、确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型。S101. Determine a target registration center containing registration information of a microservice, and determine a target registration type of the target registration center.
在应用中,上述微服务为一种用于构建服务应用的架构方案。其中,服务应用的架构方案有别于传统的单体式方案,可将服务应用拆分成多个核心服务功能。每个服务功能都可被称为一项服务,可以单独构建和部署,即每个服务功能均可以认为是一个微服务。其中,各个微服务在启动时,需要先将微服务的网络地址、微服务组件等数据信息注册到注册中心,由注册中心进行存储。基于此,在调用微服务时,服务消费者可从注册中心查询到微服务的网络地址。之后,通过该网络地址获取到微服务组件,并与接入微服务的调用接口进行连接,调用微服务组件。In an application, the above-mentioned microservice is an architectural solution for building a service application. Among them, the architectural solution of the service application is different from the traditional monolithic solution, and the service application can be divided into multiple core service functions. Each service function can be called a service and can be built and deployed separately, that is, each service function can be considered a microservice. Among them, when each microservice is started, data information such as the network address of the microservice and the microservice component needs to be registered in the registration center, and the registration center will store it. Based on this, when calling a microservice, the service consumer can query the network address of the microservice from the registry. After that, the microservice component is obtained through the network address, and is connected to the calling interface for accessing the microservice to call the microservice component.
在应用中,确定微服务是否具有对应的目标注册中心以及目标注册中心的目标注册类型,均可以由工作人员根据实际情况进行确定,并将确定结果发送至微服务处理平台中。In the application, whether the microservice has a corresponding target registry and the target registration type of the target registry can be determined by the staff according to the actual situation, and the determination result is sent to the microservice processing platform.
在应用中,上述注册中心的注册类型具有多种,具体的,注册类型包括但不限于Zookeeper类型和Eureka类型等。可以理解的是,对于不同的微服务,其使用的注册中心的注册类型可能相同,也可能不同。可以理解的是,微服务对应注册中心的注册类型不同,则每个微服务的微服务处理平台很难兼容其他注册类型的注册中心。进而,难以对多个不同注册类型对应的微服务实现统一处理。In an application, there are various registration types of the above-mentioned registration center. Specifically, the registration types include but are not limited to Zookeeper type and Eureka type. It is understandable that for different microservices, the registration type of the registry used may be the same or different. It is understandable that if the registration types of the microservices corresponding to the registry are different, it is difficult for the microservice processing platform of each microservice to be compatible with the registration centers of other registration types. Furthermore, it is difficult to uniformly process microservices corresponding to multiple different registration types.
S102、根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口。S102. According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, generate a target calling interface adapted to the target open interface of the target registration center.
在应用中,上述已说明各个微服务在启动时,需要将先微服务的网络地址、微服务组件等数据信息在注册中心进行部署。即可认为上述微服务注册适配引擎与该目标注册中心进行适配连接后,便可获取到目标该注册中心内所有微服务分别对应部署的网络地址、微服务组件等数据信息。基于此,为实现微服务注册适配引擎与注册中心的适配连接,需要获取到目标注册中心的开放接口。之后,微服务注册适配引擎根据开放接口对目标注册中心进行适配,生成可以与目标注册中心进行数据传输的目标调用接口。其中,上述调用接口和开放接口均可为API接口。需要说明的是,上述微服务注册适配引擎为微服务处理平台中的组件,其作用为可对不同注册类型的注册中心提供的开放接口进行适配,生成与每个注册类型的注册中心对应的调用接口。In the application, the above has explained that when each microservice is started, it is necessary to deploy the data information such as the network address of the first microservice and the microservice components in the registration center. It can be considered that after the above-mentioned microservice registration adaptation engine is adapted and connected to the target registration center, data information such as network addresses and microservice components respectively corresponding to deployment of all microservices in the target registration center can be obtained. Based on this, in order to realize the adaptation connection between the microservice registration adaptation engine and the registry, it is necessary to obtain the open interface of the target registry. After that, the microservice registration adaptation engine adapts the target registry according to the open interface, and generates a target calling interface that can transmit data with the target registry. Wherein, the above-mentioned calling interface and open interface can both be API interfaces. It should be noted that the above-mentioned microservice registration adaptation engine is a component in the microservice processing platform, and its function is to adapt the open interfaces provided by the registration centers of different registration types, and generate registration centers corresponding to each registration type. call interface.
可以理解的是,一个组件(注册中心)具有开放的API,即代表该组件可以将自身数据(注册中心内的数据)对外开放。此时,该开放的API接口包含了该API接口的使用权限,例如,API接口的调用次数、调用对象等。It is understandable that a component (registry center) has an open API, which means that the component can open its own data (data in the registry center) to the outside world. At this time, the open API interface includes the usage authority of the API interface, for example, the number of times of calling the API interface, the calling object, and the like.
S103、根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据。S103. Acquire microservice data of the microservice according to the target calling interface and the target open interface.
S104、将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。S104. Write the microservice data into a database of the microservice processing platform, and perform centralized processing on the microservice data, where the database includes microservice data corresponding to multiple microservices one-to-one.
在应用中,上述微服务数据可以理解为微服务的网络地址、微服务组件等数据信息。需要说明的是,在微服务注册适配引擎的目标调用接口与目标注册中心的目标开放接口适配时,微服务处理平台可调用目标调用接口与目标开放接口进行连接。进而,可在目标注册中心内查找微服务的网络地址和微服务组件等数据信息。In the application, the above microservice data can be understood as data information such as the network address of the microservice and the microservice components. It should be noted that when the target invocation interface of the microservice registration adaptation engine is adapted to the target open interface of the target registry, the microservice processing platform can invoke the target invocation interface to connect with the target open interface. Furthermore, data information such as the network address of the microservice and the components of the microservice can be searched in the target registry.
在应用中,在获取到微服务数据后,还需将微服务数据写入微服务处理平台的数据库中进行保存。以此,在数据库包含有与多个微服务一一对应的微服务数据后,可实现对多个微服务数据的集中处理。其中,上述集中处理可以为分别设置每个微服务数据的标识信息,以区分各个微服务,并可对每个微服务在目标注册中心部署的注册信息执行增加、删除、修改查询等处理,对此不作限定。In the application, after the microservice data is obtained, the microservice data needs to be written into the database of the microservice processing platform for preservation. In this way, after the database contains the microservice data corresponding to the multiple microservices one-to-one, the centralized processing of the multiple microservice data can be realized. Among them, the above centralized processing may be to set the identification information of each microservice data separately to distinguish each microservice, and perform processing such as adding, deleting, modifying and querying the registration information deployed by each microservice in the target registration center. This is not limited.
在本实施例中,在确定微服务对应的目标注册中心和目标注册中心的目标注册类型后,微服务处理平台只需对已有的目标注册中心的目标开放接口进行适配。以使得微服务处理平台可与目标注册中心进行连接,以此可获取到微服务在目标注册中心内部署的注册信息。之后,可根据注册信息获取相应微服务的微服务数据进行处理。基于此,微服务处理平台不仅可对不同注册类型的注册中心对应的多个微服务的微服务数据进行统一处理,还可有效的减少工作人员的工作量,以及降低在微服务处理平台中重新部署注册信息时,微服务数据泄露的风险。In this embodiment, after determining the target registry corresponding to the microservice and the target registration type of the target registry, the microservice processing platform only needs to adapt the target open interface of the existing target registry. So that the microservice processing platform can be connected with the target registry, so that the registration information of the microservice deployed in the target registry can be obtained. After that, the microservice data of the corresponding microservice can be obtained according to the registration information for processing. Based on this, the microservice processing platform can not only uniformly process the microservice data of multiple microservices corresponding to registries of different registration types, but also effectively reduce the workload of the staff and reduce the need for re-engineering in the microservice processing platform. The risk of microservice data leakage when deploying registration information.
参照图2,在一实施例中,所述目标注册中心包括所述微服务处理平台的统一注册中心以及所述微服务已有的注册中心;在S101确定包含微服务的注册信息的目标注册中心之前,还包括如下步骤S101A-S101B,详述如下:Referring to FIG. 2, in one embodiment, the target registry includes the unified registry of the microservice processing platform and the existing registry of the microservice; at S101, the target registry that includes the registration information of the microservice is determined Before, it also includes the following steps S101A-S101B, which are detailed as follows:
S101A、若所述微服务未有对应的注册中心,则获取所述微服务的注册信息,并在所述统一注册中心内部署所述注册信息。S101A. If the microservice does not have a corresponding registration center, obtain registration information of the microservice, and deploy the registration information in the unified registration center.
在应用中,上述统一注册中心可以为工作人员预先在微服务处理平台中设置的注册中心,其可用于对未有对应的注册中心的微服务,进行注册信息部署。In an application, the above unified registration center may be a registration center pre-set by the staff in the microservice processing platform, which may be used to deploy registration information for microservices that do not have a corresponding registration center.
在应用中,对于新上线的微服务,其通常不具有对应的注册中心。基于此,可将该微服务的注册信息在微服务处理平台中的统一注册中心内进行部署。此时,统一注册中心只有一个,即统一注册中心的注册类型只有一个。此时,统一注册中心即为目标注册中心,而统一注册中心和微服务注册适配引擎均为微服务处理平台中的组件。即可认为微服务注册适配引擎中已具有与统一注册中心的目标开放接口适配的目标调用接口。因此,在统一注册中心内部署新上线的微服务的注册信息,可统一新上线的微服务对应的注册中心类型,避免在微服务处理平台中构建多种注册类型的注册中心,降低微服务处理平台中所需使用的组件资源。In an application, for a newly launched microservice, it usually does not have a corresponding registry. Based on this, the registration information of the microservice can be deployed in the unified registration center in the microservice processing platform. At this time, there is only one unified registration center, that is, there is only one registration type of the unified registration center. At this point, the unified registry is the target registry, and both the unified registry and the microservice registration adaptation engine are components in the microservice processing platform. It can be considered that the microservice registration adaptation engine already has a target calling interface adapted to the target open interface of the unified registry. Therefore, deploying the registration information of the newly launched microservices in the unified registry can unify the registry types corresponding to the newly launched microservices, avoid building a registry of multiple registration types in the microservice processing platform, and reduce the processing of microservices. Component resources required to be used in the platform.
S101B、若所述微服务已有对应的注册中心,则将所述微服务对应的注册中心确定为所述微服务的目标注册中心。S101B. If the microservice already has a corresponding registration center, determine the registration center corresponding to the microservice as the target registration center of the microservice.
在应用中,对于已有对应的注册中心的微服务,此时,可确定已有对应的注册中心即为目标注册中心。基于此,可采用上述S101至S102的方式,使用微服务注册适配引擎对目标注册中心的目标开放接口进行接口适配。In the application, for a microservice that has a corresponding registry, at this time, it can be determined that the existing corresponding registry is the target registry. Based on this, the methods of S101 to S102 above can be used to perform interface adaptation on the target open interface of the target registry by using the microservice registration adaptation engine.
在本实施例中,在确定微服务已有对应的注册中心后,通过对已有的注册中心采用上述S101至S102进行接口适配,以获取微服务的微服务数据,可不用对微服务的注册信息重新进行部署,降低工作人员的工作量;以及在确定微服务没有对应的注册中心后,使用同一种注册类型的统一注册中心对每个微服务的注册信息进行部署,可避免在微服务处理平台中构建多种注册类型的注册中心,降低微服务处理平台中所需使用的组件资源。In this embodiment, after it is determined that the microservice has a corresponding registration center, the interface adaptation of the existing registration center is performed by using the above S101 to S102 to obtain the microservice data of the microservice, and it is not necessary to perform the interface adaptation of the microservice. The registration information is redeployed to reduce the workload of the staff; and after it is determined that the microservice does not have a corresponding registration center, use the unified registration center of the same registration type to deploy the registration information of each microservice, which can avoid the need for microservices. A registry of multiple registration types is built in the processing platform to reduce the component resources required in the microservice processing platform.
参照图3,在一实施例中,在S101确定包含微服务的注册信息的目标注册中心之前,还包括如下步骤S101C-S101D,详述如下:3, in an embodiment, before S101 determines the target registry containing the registration information of the microservice, the following steps S101C-S101D are further included, which are described in detail as follows:
S101C、若所述微服务已有对应的注册中心,则删除所述微服务在已有对应的注册中心内部署的注册信息。S101C, if the microservice already has a corresponding registry, delete the registration information deployed by the microservice in the existing corresponding registry.
S101D、获取所述微服务的注册信息,并重新在所述统一注册中心内部署所述注册信息。S101D: Acquire registration information of the microservice, and redeploy the registration information in the unified registration center.
在应用中,在确定微服务已有对应的注册中心后,还可删除该微服务在已有对应的注册中心内部署的注册信息。之后,将该微服务的注册信息重新在统一注册中心内进行部署。需要说明的是,对于已有对应的注册中心的微服务的数量较少时,可采用上述方式对注册信息重新进行部署,以减少微服务注册适配引擎与外部注册中心进行接口适配的接口数量。In the application, after it is determined that the microservice has a corresponding registry, the registration information deployed by the microservice in the existing corresponding registry can also be deleted. After that, the registration information of the microservice is re-deployed in the unified registry. It should be noted that when the number of microservices that already have a corresponding registry is small, the registration information can be re-deployed in the above manner to reduce the interface adaptation between the microservice registration adaptation engine and the external registry. quantity.
参照图4,在一实施例中,在S104将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理之后,还包括如下步骤S104A-S104C,详述如下:Referring to FIG. 4 , in an embodiment, after the microservice data is written into the database of the microservice processing platform in S104, and the microservice data is centrally processed, the following steps S104A-S104C are further included. as follows:
S104A、确定所述微服务使用的微服务框架的框架类型。S104A. Determine the framework type of the microservice framework used by the microservice.
在应用中,上述微服务框架可用于部署微服务在运行时所需的运行环境。因此,在生成微服务时,需要预先构建微服务的微服务框架,以将微服务的多种服务功能部署在微服务框架中,以使得微服务可正常运行。因不同微服务之间的服务功能不同,因此,使用的微服务框架的框架类型也各不相同。其中,上述框架类型包括但不限于Service Mesh框架类型、Linkerd框架类型等。In an application, the above microservice framework can be used to deploy the runtime environment required by the microservice at runtime. Therefore, when generating microservices, it is necessary to build the microservice framework of the microservice in advance, so as to deploy various service functions of the microservice in the microservice framework, so that the microservice can run normally. Because the service functions of different microservices are different, the framework types of the microservice framework used are also different. The above frame types include but are not limited to Service Mesh frame types, Linkerd frame types, and the like.
需要说明的是,对于确定微服务框架的框架类型,可以与确定目标注册中心的目标注册类型的方法一致。例如,均可由工作人员根据微服务的实际情况进行确定,并将确定结果发送至微服务处理平台中,对此不作限定。It should be noted that the method for determining the frame type of the microservice framework can be consistent with the method for determining the target registration type of the target registry. For example, it can be determined by the staff according to the actual situation of the microservice, and the determination result is sent to the microservice processing platform, which is not limited.
S104B、通过所述微服务处理平台的微服务监控引擎,调用与所述框架类型适配的工具包。S104B, calling a toolkit adapted to the framework type through the microservice monitoring engine of the microservice processing platform.
S104C、在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件。S104C. When running the microservice, access the microservice framework of the microservice according to the toolkit to invoke the service component of the microservice.
在应用中,在获取到微服务的微服务数据后,为了运行该微服务(即调用微服务数据中的微服务组件),需要在微服务处理平台中部署相应的微服务框架。基于此,为了不用在微服务处理平台中部署各个框架类型的微服务框架,微服务处理平台可通过微服务监控引擎,调用与框架类型适配的工具包和微服务框架进行连接。进而,微服务处理平台可以远程与微服务框架进行接入,实现对微服务组件的调用。上述微服务监控引擎为微服务处理平台中的功能组件,用于存储与多个框架类型分别适配的工具包,并可调用工具包与相应框架类型的微服务框架进行适配。In the application, after obtaining the microservice data of the microservice, in order to run the microservice (that is, calling the microservice component in the microservice data), it is necessary to deploy the corresponding microservice framework in the microservice processing platform. Based on this, in order not to deploy the microservice framework of each frame type in the microservice processing platform, the microservice processing platform can use the microservice monitoring engine to call the toolkit suitable for the framework type and the microservice framework to connect. Furthermore, the microservice processing platform can remotely access the microservice framework to realize the invocation of the microservice components. The above-mentioned microservice monitoring engine is a functional component in the microservice processing platform, which is used to store toolkits adapted to multiple framework types respectively, and can call the toolkit to adapt to the microservice framework of the corresponding frame type.
在应用中,上述工具包为软件开发工具包(Software Development Kit,SDK),一般为特定的软件包、软件框架(微服务框架)、操作系统等建立应用软件的开发工具的集合。即工作人员可预先在微服务监控引擎中安装与各种框架类型适配的工具包,以使得微服务处理平台可与微服务框架进行接入。In an application, the above toolkit is a software development kit (Software Development Kit, SDK), which is generally a collection of development tools for building application software for a specific software package, software framework (microservice framework), operating system, and the like. That is, workers can install toolkits adapted to various framework types in the microservice monitoring engine in advance, so that the microservice processing platform can access the microservice framework.
在现有技术中,不同框架类型的微服务,通常均有各自对应的微服务处理平台。另外,因框架类型不同,多个微服务处理平台之间互不适配。基于此,可通过利用SDK工具包适配多种框架类型的微服务的能力,与多种微服务的微服务框架进行接入,实现对不同框架类型的微服务的调用和处理。In the prior art, microservices of different framework types usually have their own corresponding microservice processing platforms. In addition, due to different framework types, multiple microservice processing platforms are not compatible with each other. Based on this, the ability of the SDK toolkit to adapt to the microservices of various framework types can be used to connect with the microservice frameworks of various microservices, so as to realize the invocation and processing of microservices of different framework types.
参照图5,在一实施例中,在S104C运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件之后,还包括如下步骤S104CA-S104CC,详述如下:Referring to FIG. 5 , in an embodiment, when the microservice is run in S104C, after accessing the microservice framework of the microservice according to the toolkit to invoke the service component of the microservice, the following steps are further included. S104CA-S104CC, detailed as follows:
S104CA、获取所述微服务运行时的监控数据。S104CA: Obtain monitoring data when the microservice is running.
在应用中,在微服务处理平台通过SDK工具包与微服务框架进行接入后,可调用微服务的微服务组件,进而运行该微服务。基于此,在微服务运行时,微服务处理平台即可获取到微服务运行时的监控数据。上述监控数据包括但不限于该微服务的工作时间、处理过的处理数据等。In the application, after the microservice processing platform is connected to the microservice framework through the SDK toolkit, the microservice component of the microservice can be called to run the microservice. Based on this, when the microservice is running, the microservice processing platform can obtain the monitoring data when the microservice is running. The above monitoring data includes, but is not limited to, the working hours of the microservice, processed processing data, and the like.
S104CB、对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果。S104CB: Perform real-time integrated analysis on monitoring data within a preset time period to obtain an analysis result.
S104CC、存储所述分析结果至数据库中。S104CC, store the analysis result in a database.
在应用中,上述时间周期可以为用户预先设定的周期。微服务处理平台可将每个时间周期内的监控数据进行整合,而后对其进行分析,得到分析结果。其中,上述分析结果可以为该时间周期内微服务的工作效率、工作状态等结果。通过对一定时间周期内微服务的运行状态进行分析,能够使工作人员更好地根据微服务的分析结果,对微服务的微服务配置进行合理调优。其中,微服务配置包括但不限于微服务的运行环境、微服务的功能组件。In an application, the above-mentioned time period may be a period preset by a user. The microservice processing platform can integrate the monitoring data in each time period, and then analyze it to obtain the analysis results. The above analysis result may be the work efficiency and work status of the microservice in the time period. By analyzing the running status of the microservices within a certain period of time, the staff can better adjust the microservice configuration of the microservices according to the analysis results of the microservices. The microservice configuration includes but is not limited to the running environment of the microservice and the functional components of the microservice.
在应用中,上述数据库为用于存储分析结果的数据库,其可通过图表化的方式存储分析结果,以使得微服务处理平台可对杂乱无章的分析结果进行整理、规划、分析(根据不同时间周期的分析结果再次进行分析)。进而,可使得工作人员可实时根据数据库中已有的分析结果,对微服务的配置信息进行调优。In the application, the above database is a database for storing analysis results, which can store the analysis results in a graphical manner, so that the microservice processing platform can organize, plan, and analyze the disorganized analysis results (according to different time periods. Analyze the results again). Furthermore, the staff can adjust the configuration information of the microservices in real time according to the existing analysis results in the database.
参照图6,在一实施例中,在S104CA获取所述微服务运行时的监控数据中,还包括如下子步骤S104CA1-S104CA2,详述如下:Referring to FIG. 6 , in an embodiment, in S104CA acquiring the monitoring data of the microservice running time, the following sub-steps S104CA1-S104CA2 are further included, which are described in detail as follows:
S104CA1、存储所述微服务运行时的监控数据至所述微服务的消息队列中。S104CA1: Store the monitoring data of the microservice in the message queue of the microservice when the microservice is running.
S104CA2、通过异步线程将所述消息队列中的监控数据,写入所述微服务处理平台的文件系统。S104CA2. Write the monitoring data in the message queue into the file system of the microservice processing platform through an asynchronous thread.
在应用中,上述消息队列为微服务中的临时存储区域,用于存储微服务在运行中的所有数据(监控数据)。上述文件系统为微服务处理平台中的本地文件系统,其中,文件系统可以持久的存储上述监控数据。在实际过程中,在微服务运行时,可能产生崩溃、重启等问题。基于此,若微服务在运行时突然崩溃,则在微服务恢复运行的过程中,存储在消息队列中的监控数据可能存在数据丢失的情况。因此,在将数据存到微服务本地的消息队列之后,需要将消息队列中的监控数据存储在文件系统中,以防止微服务的监控数据丢失。In the application, the above message queue is a temporary storage area in the microservice, which is used to store all the data (monitoring data) of the microservice in operation. The above-mentioned file system is a local file system in the microservice processing platform, wherein the file system can store the above-mentioned monitoring data persistently. In the actual process, when the microservice is running, problems such as crash and restart may occur. Based on this, if the microservice suddenly crashes during operation, the monitoring data stored in the message queue may be lost during the process of resuming the operation of the microservice. Therefore, after the data is stored in the local message queue of the microservice, the monitoring data in the message queue needs to be stored in the file system to prevent the loss of the monitoring data of the microservice.
在应用中,上述线程是指进程中的一个执行流程,用于执行微服务中的服务。上述异步可以理解为一种数据的传输方式。具体的,使用异步线程将保存在消息队列中的监控数据写入文件系统时,可以使微服务处理平台与微服务之间不用同步处理监控数据。例如,微服务实时将监控数据保存至消息队列,而微服务处理平台可每隔预设时间段从消息队列中获取该时间段内的监控数据,并将监控数据保存至文件系统。以此,可使微服务处理平台和微服务无须去等待对方的响应,提高数据传输的效率。其中,上述文件系统具体为HDFS系统(分布式文件系统)。因微服务处理平台与多个微服务之间传输的数据量非常大,而HDFS系统有着高容错性的特点,能够提供高吞吐量来获取多个微服务中的监控数据。In the application, the above thread refers to an execution flow in the process, which is used to execute the service in the microservice. The above asynchronous can be understood as a data transmission method. Specifically, when the monitoring data stored in the message queue is written into the file system by using an asynchronous thread, the monitoring data may not be processed synchronously between the microservice processing platform and the microservice. For example, the microservice saves the monitoring data to the message queue in real time, and the microservice processing platform can obtain the monitoring data within the time period from the message queue at preset time intervals, and save the monitoring data to the file system. In this way, the microservice processing platform and the microservice do not need to wait for each other's response, which improves the efficiency of data transmission. The above file system is specifically an HDFS system (distributed file system). Because the amount of data transmitted between the microservice processing platform and multiple microservices is very large, the HDFS system has the characteristics of high fault tolerance and can provide high throughput to obtain monitoring data in multiple microservices.
参照图7,在一实施例中,在S104CB对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果,得到分析结果中,还包括如下子步骤S104CB1-S104CB3,详述如下:Referring to Fig. 7, in one embodiment, in S104CB, the monitoring data in the preset time period is subjected to real-time integrated analysis to obtain the analysis result, and in obtaining the analysis result, the following sub-steps S104CB1-S104CB3 are also included, which are described in detail as follows:
S104CB1、依次对所述监控数据进行数据清洗处理和数据格式转化处理,得到处理后的监控数据。S104CB1. Perform data cleaning processing and data format conversion processing on the monitoring data in sequence to obtain processed monitoring data.
在应用中,上述监控数据通常为微服务运行时的原始数据,通常原始数据中的格式、量纲可能各不相同。基于此,需对监控数据进行数据清洗处理和格式转化处理等。其中,数据清洗处理可以为清理监控数据中传输错误的数据。在应用中,上述获取到的监控数据可能是double,int,char等多种格式的监控数据。而为了方便后续进行分析处理,可统一每个监控数据的数据格式。即将监控数据的当前数据格式转换为预设的目标格式的数据,对此不作限定。此时,目标格式的数据即为处理后的监控数据。In applications, the above monitoring data is usually the raw data when the microservice is running, and the format and dimension of the raw data may vary. Based on this, it is necessary to perform data cleaning and format conversion processing on the monitoring data. Among them, the data cleaning process may be to clean up the data with transmission errors in the monitoring data. In an application, the monitoring data obtained above may be monitoring data in multiple formats such as double, int, and char. In order to facilitate subsequent analysis and processing, the data format of each monitoring data can be unified. Convert the current data format of the monitoring data to the data in the preset target format, which is not limited. At this point, the data in the target format is the processed monitoring data.
S104CB2、通过图表化形式对所述处理后的监控数据进行数据整合,分别得到表格形式的表格数据,以及图形形式的图形数据。S104CB2: Integrate the processed monitoring data in a graphical form to obtain tabular data in tabular form and graphic data in graphical form respectively.
S104CB3、结合所述表格数据和所述图形数据进行分析,得到所述分析结果。S104CB3: Perform analysis in combination with the table data and the graphic data to obtain the analysis result.
在应用中,对处理后的监控数据进行数据整合,可以为将同一种类型的数据进行整合。例如,处理后的监控数据包括微服务工作效率的数据、微服务处理的某个类型的数据。基于此,对处理后的监控数据进行整合可理解为将所有属于微服务工作效率的数据进行集中,并进行分析。In the application, the data integration of the processed monitoring data can be the integration of the same type of data. For example, the processed monitoring data includes data on the work efficiency of the microservice and a certain type of data processed by the microservice. Based on this, the integration of the processed monitoring data can be understood as the concentration and analysis of all data belonging to the work efficiency of microservices.
在应用中,根据表格数据进行分析得到分析结果可以为,直接根据表格数据中的各数据值,分别与上一表格数据中的各数据值进行运算(做差运算、做平方差运算)等处理,得到运算数值。之后,根据预设的多个数值范围以及每个数值范围对应的分析结果,确定包含运算数值的目标数值范围,即可得到该表格数据的分析结果。根据图像数据进行分析得到分析结果可以为,将图形数据与多个预设图形进行比较,并从预设图形中确定与图形数据相似度最高的目标预设图形。基于此,可从多个预设图形分别对应的分析结果中,确定目标预设图形对应的分析结果。In the application, the analysis result obtained by analyzing the table data can be, directly according to each data value in the table data, respectively perform operations (difference operation, square difference operation) with each data value in the previous table data, etc. , to get the operand value. Then, according to the preset multiple numerical ranges and the analysis results corresponding to each numerical range, a target numerical range including the operation value is determined, and then the analysis result of the table data can be obtained. The analysis result obtained by analyzing the image data may be that the graphic data is compared with a plurality of preset graphics, and the target preset graphic with the highest similarity with the graphic data is determined from the preset graphics. Based on this, the analysis results corresponding to the target preset graphics can be determined from the analysis results corresponding to the multiple preset graphics respectively.
在应用中,在得到分析结果后,微服务处理平台监控数据还可将表格形式的表格数据以及图形形式的图形数据进行展现。可以理解的是,表格数据只能直观的展示各个数据值,而各个数据值之间的联系无法清楚的表示。基于此,将图形形式的图形数据同时进行展现,可以让用户在看到表格数据时,同时可根据图形数据更容易的理解表格数据的内在规律,使用户能够更全面的理解监控数据。In the application, after the analysis results are obtained, the monitoring data of the microservice processing platform can also display tabular data in tabular form and graphic data in graphical form. It is understandable that tabular data can only visually display each data value, and the connection between each data value cannot be clearly expressed. Based on this, displaying graphical data in graphical form at the same time allows users to more easily understand the inherent laws of tabular data according to the graphical data when viewing tabular data, so that users can more comprehensively understand monitoring data.
在应用中,微服务处理平台还可接收工作人员下发的控制指令,以使得微服务处理平台可根据控制指令对微服务的工作状态进行管理。具体的,上述控制指令包括但不限于控制微服务更改执行任务的指令,以及控制微服务停止执行任务的指令。对于上述控制微服务的工作状态可以为,控制微服务处于服务状态、空闲状态等。需要补充的是,微服务的工作状态发生改变时,其也可通过异步线程的数据传输方式,将微服务最新的工作状态保存在数据库中。In the application, the microservice processing platform can also receive control instructions issued by the staff, so that the microservice processing platform can manage the working status of the microservices according to the control instructions. Specifically, the above control instructions include, but are not limited to, instructions for controlling microservices to change execution tasks, and instructions for controlling microservices to stop executing tasks. The working state of the above-mentioned control microservice may be that the control microservice is in a service state, an idle state, and the like. What needs to be added is that when the working state of the microservice changes, it can also save the latest working state of the microservice in the database through the data transmission method of asynchronous threads.
请参阅图8,图8是本申请实施例提供的一种微服务数据的处理装置的结构框图。本实施例中微服务数据的处理装置包括的各模块用于执行图1至图7对应的实施例中的各步骤。具体请参阅图1至图7以及图1至图7所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参见图8,微服务数据的处理装置800包括:第一获取模块810、生成模块820、第二获取模块830以及处理模块840,其中:Please refer to FIG. 8. FIG. 8 is a structural block diagram of a microservice data processing apparatus provided by an embodiment of the present application. Each module included in the apparatus for processing microservice data in this embodiment is used to execute each step in the embodiment corresponding to FIG. 1 to FIG. 7 . For details, please refer to FIG. 1 to FIG. 7 and related descriptions in the embodiments corresponding to FIG. 1 to FIG. 7 . For convenience of description, only the parts related to this embodiment are shown. Referring to FIG. 8 , the apparatus 800 for processing microservice data includes: a first obtaining module 810, a generating module 820, a second obtaining module 830, and a processing module 840, wherein:
第一获取模块810,用于确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型。The first obtaining module 810 is configured to determine a target registration center containing registration information of the microservice, and determine the target registration type of the target registration center.
生成模块820,用于根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口。The generating module 820 is configured to generate, in the microservice registration adaptation engine of the microservice processing platform, a target calling interface adapted to the target open interface of the target registration center according to the target registration type.
第二获取模块830,用于根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据。The second obtaining module 830 is configured to obtain the microservice data of the microservice according to the target calling interface and the target open interface.
处理模块840,用于将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。A processing module 840, configured to write the microservice data into the database of the microservice processing platform, and perform centralized processing on the microservice data, where the database contains microservices corresponding to multiple microservices one-to-one data.
在一实施例中,所述目标注册中心包括所述微服务处理平台的统一注册中心以及所述微服务已有的注册中心;微服务数据的处理装置800还包括:In one embodiment, the target registry includes a unified registry of the microservice processing platform and an existing registry of the microservice; the apparatus 800 for processing microservice data further includes:
第三获取模块,用于若所述微服务未有对应的注册中心,则获取所述微服务的注册信息,并在所述统一注册中心内部署所述注册信息。The third obtaining module is configured to obtain the registration information of the microservice if the microservice does not have a corresponding registration center, and deploy the registration information in the unified registration center.
第一确定模块,用于若所述微服务已有对应的注册中心,则将所述微服务对应的注册中心确定为所述微服务的目标注册中心。The first determination module is configured to determine the registration center corresponding to the microservice as the target registration center of the microservice if the microservice already has a corresponding registration center.
在一实施例中,微服务数据的处理装置800还包括:In one embodiment, the apparatus 800 for processing microservice data further includes:
删除模块,用于若所述微服务已有对应的注册中心,则删除所述微服务在已有对应的注册中心内部署的注册信息。The deletion module is configured to delete the registration information deployed by the microservice in the existing corresponding registry if the microservice already has a corresponding registry.
部署模块,用于获取所述微服务的注册信息,并重新在所述统一注册中心内部署所述注册信息。A deployment module, configured to acquire the registration information of the micro-service, and deploy the registration information in the unified registration center again.
在一实施例中,微服务数据的处理装置800还包括:In one embodiment, the apparatus 800 for processing microservice data further includes:
第二确定模块,用于确定所述微服务使用的微服务框架的框架类型。The second determination module is used to determine the framework type of the microservice framework used by the microservice.
第一调用模块,用于通过所述微服务处理平台的微服务监控引擎,调用与所述框架类型适配的工具包。The first invocation module is used for invoking a toolkit adapted to the framework type through the microservice monitoring engine of the microservice processing platform.
第二调用模块,用于在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件。The second invocation module is configured to access the microservice framework of the microservice according to the toolkit when running the microservice, so as to invoke the service component of the microservice.
在一实施例中,微服务数据的处理装置800还包括:In one embodiment, the apparatus 800 for processing microservice data further includes:
第三获取模块,用于获取所述微服务运行时的监控数据。The third acquiring module is used to acquire the monitoring data of the microservice when it is running.
分析模块,用于对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果。The analysis module is used for real-time integrated analysis of monitoring data within a preset time period to obtain analysis results.
存储模块,用于存储所述分析结果至数据库中。The storage module is used for storing the analysis result in the database.
在一实施例中,第三获取模块还用于:In one embodiment, the third acquisition module is further used for:
存储所述微服务运行时的监控数据至所述微服务的消息队列中;Store the monitoring data when the microservice is running in the message queue of the microservice;
通过异步线程将所述消息队列中的监控数据,写入所述微服务处理平台的文件系统。The monitoring data in the message queue is written into the file system of the microservice processing platform through an asynchronous thread.
在一实施例中,分析模块还用于:In one embodiment, the analysis module is also used to:
依次对所述监控数据进行数据清洗处理和数据格式转化处理,得到处理后的监控数据;Perform data cleaning processing and data format conversion processing on the monitoring data in turn to obtain processed monitoring data;
通过图表化形式对所述处理后的监控数据进行数据整合,分别得到表格形式的表格数据,以及图形形式的图形数据;Data integration is performed on the processed monitoring data in a graphical form to obtain tabular data in tabular form and graphic data in graphical form respectively;
结合所述表格数据和所述图形数据进行分析,得到所述分析结果。The analysis result is obtained by performing analysis in combination with the tabular data and the graphic data.
应当理解的是,图8示出的数据处理装置的结构框图中,各单元/模块用于执行图1至图7对应的实施例中的各步骤,而对于图1至图7对应的实施例中的各步骤已在上述实施例中进行详细解释,具体请参阅图1至图7以及图1至图7所对应的实施例中的相关描述,此处不再赘述。It should be understood that, in the structural block diagram of the data processing apparatus shown in FIG. 8 , each unit/module is used to execute each step in the embodiment corresponding to FIG. 1 to FIG. 7 , while for the embodiment corresponding to FIG. 1 to FIG. The steps in the above have been explained in detail in the above-mentioned embodiments. For details, please refer to FIG. 1 to FIG. 7 and the related descriptions in the corresponding embodiments of FIG. 1 to FIG.
图9是本申请另一实施例提供的一种微服务处理平台的结构框图。如图9所示,该实施例的微服务处理平台900包括:处理器910、存储器920以及存储在存储器920中并可在处理器910运行的计算机程序930,例如数据处理方法的程序。处理器910执行计算机程序930时实现上述各个数据处理方法各实施例中的步骤,例如图1所示的S101至S104。或者,处理器910执行计算机程序930时实现上述图8对应的实施例中各模块的功能,例如,图8所示的模块810至840的功能。具体分别如下所述:FIG. 9 is a structural block diagram of a microservice processing platform provided by another embodiment of the present application. As shown in FIG. 9 , the microservice processing platform 900 of this embodiment includes: a processor 910 , a memory 920 , and a computer program 930 stored in the memory 920 and executable on the processor 910 , such as a program of a data processing method. When the processor 910 executes the computer program 930, the steps in each of the foregoing embodiments of the data processing methods are implemented, for example, S101 to S104 shown in FIG. 1 . Alternatively, when the processor 910 executes the computer program 930, the functions of each module in the embodiment corresponding to FIG. 8 are implemented, for example, the functions of the modules 810 to 840 shown in FIG. 8 . The specifics are as follows:
一种微服务处理平台,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现:A microservice processing platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the computer program to achieve:
确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
在一实施例中,所述目标注册中心包括所述微服务处理平台的统一注册中心以及所述微服务已有的注册中心;所述处理器执行所述计算机程序时还实现:In one embodiment, the target registry includes a unified registry of the microservice processing platform and an existing registry of the microservice; when the processor executes the computer program, the processor further implements:
若所述微服务未有对应的注册中心,则获取所述微服务的注册信息,并在所述统一注册中心内部署所述注册信息;If the microservice does not have a corresponding registration center, obtain the registration information of the microservice, and deploy the registration information in the unified registration center;
若所述微服务已有对应的注册中心,则将所述微服务对应的注册中心确定为所述微服务的目标注册中心。If the microservice already has a corresponding registry, the registry corresponding to the microservice is determined as the target registry of the microservice.
在一实施例中,所述处理器执行所述计算机程序时还实现:In one embodiment, when the processor executes the computer program, it further implements:
若所述微服务已有对应的注册中心,则删除所述微服务在已有对应的注册中心内部署的注册信息;If the microservice already has a corresponding registry, delete the registration information deployed by the microservice in the existing corresponding registry;
获取所述微服务的注册信息,并重新在所述统一注册中心内部署所述注册信息。Acquire the registration information of the microservice, and redeploy the registration information in the unified registration center.
在一实施例中,所述处理器执行所述计算机程序时还实现:In one embodiment, when the processor executes the computer program, it further implements:
确定所述微服务使用的微服务框架的框架类型;Determine the framework type of the microservice framework used by the microservice;
通过所述微服务处理平台的微服务监控引擎,调用与所述框架类型适配的工具包;Call the toolkit adapted to the framework type through the microservice monitoring engine of the microservice processing platform;
在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件。When running the microservice, access the microservice framework of the microservice according to the toolkit to invoke the service component of the microservice.
在一实施例中,所述处理器执行所述计算机程序时还实现:In one embodiment, when the processor executes the computer program, it further implements:
获取所述微服务运行时的监控数据;Obtain the monitoring data when the microservice is running;
对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果;Perform real-time integrated analysis on monitoring data within a preset time period to obtain analysis results;
存储所述分析结果至数据库中。The analysis results are stored in a database.
在一实施例中,所述处理器执行所述计算机程序时还实现:In one embodiment, when the processor executes the computer program, it further implements:
存储所述微服务运行时的监控数据至所述微服务的消息队列中;Store the monitoring data when the microservice is running in the message queue of the microservice;
通过异步线程将所述消息队列中的监控数据,写入所述微服务处理平台的文件系统。The monitoring data in the message queue is written into the file system of the microservice processing platform through an asynchronous thread.
在一实施例中,所述处理器执行所述计算机程序时还实现:In one embodiment, when the processor executes the computer program, it further implements:
依次对所述监控数据进行数据清洗处理和数据格式转化处理,得到处理后的监控数据;Perform data cleaning processing and data format conversion processing on the monitoring data in turn to obtain processed monitoring data;
通过图表化形式对所述处理后的监控数据进行数据整合,分别得到表格形式的表格数据,以及图形形式的图形数据;Data integration is performed on the processed monitoring data in a graphical form to obtain tabular data in tabular form and graphic data in graphical form respectively;
结合所述表格数据和所述图形数据进行分析,得到所述分析结果。The analysis result is obtained by performing analysis in combination with the tabular data and the graphic data.
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现:A computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is implemented when executed by a processor:
确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
在一实施例中,所述目标注册中心包括所述微服务处理平台的统一注册中心以及所述微服务已有的注册中心;所述计算机程序被处理器执行时还实现:In one embodiment, the target registry includes a unified registry of the microservice processing platform and an existing registry of the microservice; when the computer program is executed by the processor, it also implements:
若所述微服务未有对应的注册中心,则获取所述微服务的注册信息,并在所述统一注册中心内部署所述注册信息;If the microservice does not have a corresponding registration center, obtain the registration information of the microservice, and deploy the registration information in the unified registration center;
若所述微服务已有对应的注册中心,则将所述微服务对应的注册中心确定为所述微服务的目标注册中心。If the microservice already has a corresponding registry, the registry corresponding to the microservice is determined as the target registry of the microservice.
在一实施例中,所述计算机程序被处理器执行时还实现:In one embodiment, the computer program, when executed by the processor, further implements:
若所述微服务已有对应的注册中心,则删除所述微服务在已有对应的注册中心内部署的注册信息;If the microservice already has a corresponding registry, delete the registration information deployed by the microservice in the existing corresponding registry;
获取所述微服务的注册信息,并重新在所述统一注册中心内部署所述注册信息。Acquire the registration information of the microservice, and redeploy the registration information in the unified registration center.
在一实施例中,所述计算机程序被处理器执行时还实现:In one embodiment, the computer program, when executed by the processor, further implements:
确定所述微服务使用的微服务框架的框架类型;Determine the framework type of the microservice framework used by the microservice;
通过所述微服务处理平台的微服务监控引擎,调用与所述框架类型适配的工具包;Call the toolkit adapted to the framework type through the microservice monitoring engine of the microservice processing platform;
在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件。When running the microservice, access the microservice framework of the microservice according to the toolkit to invoke the service component of the microservice.
在一实施例中,所述计算机程序被处理器执行时还实现:In one embodiment, the computer program, when executed by the processor, further implements:
获取所述微服务运行时的监控数据;Obtain the monitoring data when the microservice is running;
对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果;Perform real-time integrated analysis on monitoring data within a preset time period to obtain analysis results;
存储所述分析结果至数据库中。The analysis results are stored in a database.
在一实施例中,所述计算机程序被处理器执行时还实现:In one embodiment, the computer program, when executed by the processor, further implements:
存储所述微服务运行时的监控数据至所述微服务的消息队列中;Store the monitoring data when the microservice is running in the message queue of the microservice;
通过异步线程将所述消息队列中的监控数据,写入所述微服务处理平台的文件系统。The monitoring data in the message queue is written into the file system of the microservice processing platform through an asynchronous thread.
在一实施例中,所述计算机程序被处理器执行时还实现:In one embodiment, the computer program, when executed by the processor, further implements:
依次对所述监控数据进行数据清洗处理和数据格式转化处理,得到处理后的监控数据;Perform data cleaning processing and data format conversion processing on the monitoring data in turn to obtain processed monitoring data;
通过图表化形式对所述处理后的监控数据进行数据整合,分别得到表格形式的表格数据,以及图形形式的图形数据;Data integration is performed on the processed monitoring data in a graphical form to obtain tabular data in tabular form and graphic data in graphical form respectively;
结合所述表格数据和所述图形数据进行分析,得到所述分析结果。The analysis result is obtained by performing analysis in combination with the tabular data and the graphic data.
示例性的,计算机程序930可以被分割成一个或多个单元,一个或者多个单元被存储在存储器920中,并由处理器910执行,以完成本申请。一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述计算机程序930在微服务处理平台900中的执行过程。Exemplarily, the computer program 930 may be divided into one or more units, and the one or more units are stored in the memory 920 and executed by the processor 910 to complete the present application. One or more units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 930 in the microservice processing platform 900 .
微服务处理平台可包括,但不仅限于,处理器910、存储器920。本领域技术人员可以理解,图9仅仅是微服务处理平台900的示例,并不构成对微服务处理平台900的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如微服务处理平台还可以包括输入输出设备、网络接入设备、总线等。The microservice processing platform may include, but is not limited to, the processor 910 and the memory 920 . Those skilled in the art can understand that FIG. 9 is only an example of the microservice processing platform 900, and does not constitute a limitation on the microservice processing platform 900, and may include more or less components than the one shown, or combine some components, Or different components, such as the microservice processing platform, may also include input and output devices, network access devices, buses, and the like.
所称处理器910可以是中央处理单元,还可以是其他通用处理器、数字信号处理器、专用集成电路、现成可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 910 can be a central processing unit, and can also be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components Wait. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
存储器920可以是微服务处理平台900的内部存储单元,例如微服务处理平台900的硬盘或内存。存储器920也可以是微服务处理平台900的外部存储设备,例如微服务处理平台900上配备的插接式硬盘,智能存储卡,闪存卡等。进一步地,存储器920还可以既包括微服务处理平台900的内部存储单元也包括外部存储设备。The memory 920 may be an internal storage unit of the microservice processing platform 900 , such as a hard disk or a memory of the microservice processing platform 900 . The memory 920 may also be an external storage device of the microservice processing platform 900 , such as a pluggable hard disk, a smart memory card, a flash memory card, etc., which are equipped on the microservice processing platform 900 . Further, the memory 920 may also include both an internal storage unit of the microservice processing platform 900 and an external storage device.
实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述计算机可读存储介质可以是非易失性,也可以是易失性,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。Realizing all or part of the processes in the methods of the above embodiments can be completed by instructing the relevant hardware through computer-readable instructions. The computer-readable storage medium can be non-volatile or volatile. The computer-readable instructions may be stored in a non-volatile computer-readable storage medium, and when executed, the computer-readable instructions may include the processes of the above-described method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the application. within the scope of protection.

Claims (20)

  1. 一种微服务数据的处理方法,其中,应用于微服务处理平台,所述方法包括: A method for processing microservice data, wherein, applied to a microservice processing platform, the method includes:
    确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
    根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
    根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
    将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
  2. 如权利要求1所述的微服务数据的处理方法,其中,所述目标注册中心包括所述微服务处理平台的统一注册中心以及所述微服务已有的注册中心; The method for processing microservice data according to claim 1, wherein the target registry includes a unified registry of the microservice processing platform and an existing registry of the microservice;
    在所述确定包含微服务的注册信息的目标注册中心之前,还包括:Before the determining of the target registry containing the registration information of the microservice, the method further includes:
    若所述微服务未有对应的注册中心,则获取所述微服务的注册信息,并在所述统一注册中心内部署所述注册信息;If the microservice does not have a corresponding registration center, obtain the registration information of the microservice, and deploy the registration information in the unified registration center;
    若所述微服务已有对应的注册中心,则将所述微服务对应的注册中心确定为所述微服务的目标注册中心。If the microservice already has a corresponding registry, the registry corresponding to the microservice is determined as the target registry of the microservice.
  3. 如权利要求2所述的微服务数据的处理方法,其中,在所述确定包含微服务的注册信息的目标注册中心之前,还包括: The method for processing microservice data according to claim 2, wherein before said determining the target registry including the registration information of the microservice, it further comprises:
    若所述微服务已有对应的注册中心,则删除所述微服务在已有对应的注册中心内部署的注册信息;If the microservice already has a corresponding registry, delete the registration information deployed by the microservice in the existing corresponding registry;
    获取所述微服务的注册信息,并重新在所述统一注册中心内部署所述注册信息。Acquire the registration information of the microservice, and redeploy the registration information in the unified registration center.
  4. 如权利要求1所述的微服务数据的处理方法,其中,在所述将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理之后,还包括: The method for processing microservice data according to claim 1, wherein after the microservice data is written into the database of the microservice processing platform and the microservice data is centrally processed, the method further comprises: :
    确定所述微服务使用的微服务框架的框架类型;Determine the framework type of the microservice framework used by the microservice;
    通过所述微服务处理平台的微服务监控引擎,调用与所述框架类型适配的工具包;Call the toolkit adapted to the framework type through the microservice monitoring engine of the microservice processing platform;
    在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件。When running the microservice, access the microservice framework of the microservice according to the toolkit to invoke the service component of the microservice.
  5. 如权利要求4所述的微服务数据的处理方法,其中,在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件之后,还包括: The method for processing microservice data according to claim 4, wherein when running the microservice, the microservice framework of the microservice is accessed according to the toolkit, so as to call the service component of the microservice after ,Also includes:
    获取所述微服务运行时的监控数据;Obtain the monitoring data when the microservice is running;
    对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果;Perform real-time integrated analysis on monitoring data within a preset time period to obtain analysis results;
    存储所述分析结果至数据库中。The analysis results are stored in a database.
  6. 如权利要求5所述的微服务数据的处理方法,其中,所述获取所述微服务运行时的监控数据,包括: The method for processing microservice data according to claim 5, wherein the obtaining the monitoring data of the microservice runtime comprises:
    存储所述微服务运行时的监控数据至所述微服务的消息队列中;Store the monitoring data when the microservice is running in the message queue of the microservice;
    通过异步线程将所述消息队列中的监控数据,写入所述微服务处理平台的文件系统。The monitoring data in the message queue is written into the file system of the microservice processing platform through an asynchronous thread.
  7. 如权利要求5所述的微服务数据的处理方法,其中,所述对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果,得到分析结果,包括: The method for processing microservice data according to claim 5, wherein said performing real-time integrated analysis on monitoring data within a preset time period to obtain an analysis result, and obtaining an analysis result, comprising:
    依次对所述监控数据进行数据清洗处理和数据格式转化处理,得到处理后的监控数据;Perform data cleaning processing and data format conversion processing on the monitoring data in turn to obtain processed monitoring data;
    通过图表化形式对所述处理后的监控数据进行数据整合,分别得到表格形式的表格数据,以及图形形式的图形数据;Data integration is performed on the processed monitoring data in a graphical form to obtain tabular data in tabular form and graphic data in graphical form respectively;
    结合所述表格数据和所述图形数据进行分析,得到所述分析结果。The analysis result is obtained by performing analysis in combination with the tabular data and the graphic data.
  8. 一种微服务数据的处理装置,其中,应用于微服务处理平台,所述装置包括: An apparatus for processing microservice data, wherein, applied to a microservice processing platform, the apparatus includes:
    第一获取模块,用于确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;The first acquisition module is used to determine the target registration center containing the registration information of the microservice, and to determine the target registration type of the target registration center;
    生成模块,用于根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;A generation module, configured to generate a target call interface adapted to the target open interface of the target registry in the microservice registration adaptation engine of the microservice processing platform according to the target registration type;
    第二获取模块,用于根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;A second acquisition module, configured to acquire the microservice data of the microservice according to the target call interface and the target open interface;
    处理模块,用于将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。A processing module, configured to write the microservice data into the database of the microservice processing platform, and centrally process the microservice data, where the database contains microservice data corresponding to multiple microservices one-to-one .
  9. 一种微服务处理平台,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现: A microservice processing platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the computer program to achieve:
    确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
    根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
    根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target calling interface and the target open interface;
    将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
  10. 根据权利要求9所述的微服务处理平台,其中,所述目标注册中心包括所述微服务处理平台的统一注册中心以及所述微服务已有的注册中心;所述处理器执行所述计算机程序时还实现:The microservice processing platform according to claim 9, wherein the target registry includes a unified registry of the microservice processing platform and an existing registry of the microservice; the processor executes the computer program also implements:
    若所述微服务未有对应的注册中心,则获取所述微服务的注册信息,并在所述统一注册中心内部署所述注册信息;If the microservice does not have a corresponding registration center, obtain the registration information of the microservice, and deploy the registration information in the unified registration center;
    若所述微服务已有对应的注册中心,则将所述微服务对应的注册中心确定为所述微服务的目标注册中心。If the microservice already has a corresponding registry, the registry corresponding to the microservice is determined as the target registry of the microservice.
  11. 根据权利要求10所述的微服务处理平台,其中,所述处理器执行所述计算机程序时还实现:The microservice processing platform according to claim 10, wherein when the processor executes the computer program, the processor further implements:
    若所述微服务已有对应的注册中心,则删除所述微服务在已有对应的注册中心内部署的注册信息;If the microservice already has a corresponding registry, delete the registration information deployed by the microservice in the existing corresponding registry;
    获取所述微服务的注册信息,并重新在所述统一注册中心内部署所述注册信息。Acquire the registration information of the microservice, and redeploy the registration information in the unified registration center.
  12. 根据权利要求9所述的微服务处理平台,其中,所述处理器执行所述计算机程序时还实现:The microservice processing platform according to claim 9, wherein when the processor executes the computer program, the processor further implements:
    确定所述微服务使用的微服务框架的框架类型;Determine the framework type of the microservice framework used by the microservice;
    通过所述微服务处理平台的微服务监控引擎,调用与所述框架类型适配的工具包;Call the toolkit adapted to the framework type through the microservice monitoring engine of the microservice processing platform;
    在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件。When running the microservice, access the microservice framework of the microservice according to the toolkit to invoke the service component of the microservice.
  13. 根据权利要求12所述的微服务处理平台,其中,所述处理器执行所述计算机程序时还实现:The microservice processing platform according to claim 12, wherein when the processor executes the computer program, the processor further implements:
    获取所述微服务运行时的监控数据;Obtain the monitoring data when the microservice is running;
    对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果;Perform real-time integrated analysis on monitoring data within a preset time period to obtain analysis results;
    存储所述分析结果至数据库中。The analysis results are stored in a database.
  14. 根据权利要求13所述的微服务处理平台,其中,所述处理器执行所述计算机程序时还实现:The microservice processing platform according to claim 13, wherein when the processor executes the computer program, the processor further implements:
    存储所述微服务运行时的监控数据至所述微服务的消息队列中;Store the monitoring data when the microservice is running in the message queue of the microservice;
    通过异步线程将所述消息队列中的监控数据,写入所述微服务处理平台的文件系统。The monitoring data in the message queue is written into the file system of the microservice processing platform through an asynchronous thread.
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现: A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to realize:
    确定包含微服务的注册信息的目标注册中心,并确定所述目标注册中心的目标注册类型;Determine the target registry that contains the registration information of the microservice, and determine the target registration type of the target registry;
    根据所述目标注册类型,在所述微服务处理平台的微服务注册适配引擎中,生成与所述目标注册中心的目标开放接口适配的目标调用接口;According to the target registration type, in the microservice registration adaptation engine of the microservice processing platform, a target call interface adapted to the target open interface of the target registry is generated;
    根据所述目标调用接口和所述目标开放接口,获取所述微服务的微服务数据;Acquire the microservice data of the microservice according to the target call interface and the target open interface;
    将所述微服务数据写入所述微服务处理平台的数据库,并对所述微服务数据进行集中处理,所述数据库包含有与多个微服务一一对应的微服务数据。The microservice data is written into the database of the microservice processing platform, and the microservice data is centrally processed, and the database contains microservice data corresponding to multiple microservices one-to-one.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述目标注册中心包括所述微服务处理平台的统一注册中心以及所述微服务已有的注册中心;所述计算机程序被处理器执行时还实现: The computer-readable storage medium of claim 15, wherein the target registry includes a unified registry of the microservice processing platform and an existing registry of the microservice; the computer program is executed by the processor also implements:
    若所述微服务未有对应的注册中心,则获取所述微服务的注册信息,并在所述统一注册中心内部署所述注册信息;If the microservice does not have a corresponding registry, obtain the registration information of the microservice, and deploy the registration information in the unified registry;
    若所述微服务已有对应的注册中心,则将所述微服务对应的注册中心确定为所述微服务的目标注册中心。If the microservice already has a corresponding registry, the registry corresponding to the microservice is determined as the target registry of the microservice.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现: The computer-readable storage medium of claim 16, wherein the computer program, when executed by the processor, further implements:
    若所述微服务已有对应的注册中心,则删除所述微服务在已有对应的注册中心内部署的注册信息;If the microservice already has a corresponding registry, delete the registration information deployed by the microservice in the existing corresponding registry;
    获取所述微服务的注册信息,并重新在所述统一注册中心内部署所述注册信息。Acquire the registration information of the microservice, and redeploy the registration information in the unified registration center.
  18. 根据权利要求15所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现: The computer-readable storage medium of claim 15, wherein the computer program, when executed by the processor, further implements:
    确定所述微服务使用的微服务框架的框架类型;Determine the framework type of the microservice framework used by the microservice;
    通过所述微服务处理平台的微服务监控引擎,调用与所述框架类型适配的工具包;Call the toolkit adapted to the framework type through the microservice monitoring engine of the microservice processing platform;
    在运行所述微服务时,根据所述工具包接入所述微服务的微服务框架,以调用所述微服务的服务组件。When running the microservice, access the microservice framework of the microservice according to the toolkit to invoke the service component of the microservice.
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现: The computer-readable storage medium of claim 18, wherein the computer program, when executed by the processor, further implements:
    获取所述微服务运行时的监控数据;Obtain the monitoring data when the microservice is running;
    对处于预设的时间周期内的监控数据进行实时整合分析,得到分析结果;Perform real-time integrated analysis on monitoring data within a preset time period to obtain analysis results;
    存储所述分析结果至数据库中。The analysis results are stored in a database.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现: The computer-readable storage medium of claim 19, wherein the computer program, when executed by the processor, further implements:
    存储所述微服务运行时的监控数据至所述微服务的消息队列中;Store the monitoring data when the microservice is running in the message queue of the microservice;
    通过异步线程将所述消息队列中的监控数据,写入所述微服务处理平台的文件系统。The monitoring data in the message queue is written into the file system of the microservice processing platform through an asynchronous thread.
PCT/CN2021/084251 2020-12-24 2021-03-31 Microservice data processing method, apparatus, microservice processing platform, and medium WO2022134358A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011556562.6 2020-12-24
CN202011556562.6A CN112738060B (en) 2020-12-24 2020-12-24 Method and device for processing micro-service data, micro-service processing platform and medium

Publications (1)

Publication Number Publication Date
WO2022134358A1 true WO2022134358A1 (en) 2022-06-30

Family

ID=75615666

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/084251 WO2022134358A1 (en) 2020-12-24 2021-03-31 Microservice data processing method, apparatus, microservice processing platform, and medium

Country Status (2)

Country Link
CN (1) CN112738060B (en)
WO (1) WO2022134358A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115269612A (en) * 2022-09-26 2022-11-01 公安部信息通信中心 Cross-platform multidimensional data fusion system based on micro-service
CN115604333A (en) * 2022-10-12 2023-01-13 江苏赛融科技股份有限公司(Cn) Distributed big data analysis service scheduling method and system based on dubbo
CN115934765A (en) * 2022-10-11 2023-04-07 中电金信软件(上海)有限公司 Data sharing method and device between micro service systems and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656096A (en) * 2021-08-10 2021-11-16 成都长城开发科技有限公司 Micro-service rapid integration system, method, equipment and storage medium
CN117609973B (en) * 2024-01-23 2024-05-07 江苏博云科技股份有限公司 Registration center nano-tube method, system, device and server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246251A (en) * 2018-11-13 2019-01-18 杭州数梦工场科技有限公司 A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
CN109714319A (en) * 2018-12-06 2019-05-03 深圳市中农网有限公司 Management system, method, apparatus, computer equipment and the storage medium of micro services
CN110262902A (en) * 2019-05-16 2019-09-20 杭州朗和科技有限公司 Information processing method and system, medium and calculating equipment
CN110381163A (en) * 2019-07-30 2019-10-25 普信恒业科技发展(北京)有限公司 The method and gateway node of gateway node for transmitting service request
CN110392114A (en) * 2019-07-26 2019-10-29 中国工商银行股份有限公司 Service call processing system and method across more registration centers
CN110990047A (en) * 2019-11-06 2020-04-10 北京云思畅想科技有限公司 Fusion method and device for multiple microservice architectures

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10242073B2 (en) * 2016-07-27 2019-03-26 Sap Se Analytics mediation for microservice architectures
CN109547570B (en) * 2018-12-29 2021-07-06 深圳云天励飞技术有限公司 Service registration method, device, registration center management equipment and storage medium
CN111767095A (en) * 2020-06-30 2020-10-13 平安国际智慧城市科技股份有限公司 Micro-service generation method and device, terminal equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246251A (en) * 2018-11-13 2019-01-18 杭州数梦工场科技有限公司 A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
CN109714319A (en) * 2018-12-06 2019-05-03 深圳市中农网有限公司 Management system, method, apparatus, computer equipment and the storage medium of micro services
CN110262902A (en) * 2019-05-16 2019-09-20 杭州朗和科技有限公司 Information processing method and system, medium and calculating equipment
CN110392114A (en) * 2019-07-26 2019-10-29 中国工商银行股份有限公司 Service call processing system and method across more registration centers
CN110381163A (en) * 2019-07-30 2019-10-25 普信恒业科技发展(北京)有限公司 The method and gateway node of gateway node for transmitting service request
CN110990047A (en) * 2019-11-06 2020-04-10 北京云思畅想科技有限公司 Fusion method and device for multiple microservice architectures

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115269612A (en) * 2022-09-26 2022-11-01 公安部信息通信中心 Cross-platform multidimensional data fusion system based on micro-service
CN115934765A (en) * 2022-10-11 2023-04-07 中电金信软件(上海)有限公司 Data sharing method and device between micro service systems and electronic equipment
CN115604333A (en) * 2022-10-12 2023-01-13 江苏赛融科技股份有限公司(Cn) Distributed big data analysis service scheduling method and system based on dubbo
CN115604333B (en) * 2022-10-12 2023-09-12 江苏赛融科技股份有限公司 Distributed big data analysis service scheduling method and system based on dubbo

Also Published As

Publication number Publication date
CN112738060B (en) 2022-11-18
CN112738060A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
WO2022134358A1 (en) Microservice data processing method, apparatus, microservice processing platform, and medium
CN109582466B (en) Timed task execution method, distributed server cluster and electronic equipment
WO2017152633A1 (en) Port binding implementation method and device
WO2021217529A1 (en) Method and system for inter-process communication
US8910138B2 (en) Hot pluggable extensions for access management system
US11853816B2 (en) Extending the Kubernetes API in-process
WO2016183553A1 (en) Query dispatch and execution architecture
CN106775946B (en) A kind of virtual machine Method of Creation Process
US20220263772A1 (en) Metadata driven static determination of controller availability
CN115934855A (en) Full-link field level blood margin analysis method, system, equipment and storage medium
CN116302708A (en) Data backup method, device, equipment and storage medium based on load balancing
WO2022257247A1 (en) Data processing method and apparatus, and computer-readable storage medium
US11663349B2 (en) System and method for managing data object creation
WO2018188607A1 (en) Stream processing method and device
CN113835830A (en) AI-based RPA cluster management method, device and storage medium
CN112948055A (en) Innovative course experiment automatic management method and system based on cloud computing
CN112153114A (en) Method, system, equipment and medium for time-sharing access to shared device
CN113485812B (en) Partition parallel processing method and system based on large-data-volume task
US11755297B2 (en) Compiling monoglot function compositions into a single entity
US8584143B2 (en) Collection access in a parallel environment
US11868769B1 (en) Automatically determining and modifying environments for running microservices in a performant and cost-effective manner
WO2024055715A1 (en) Method and apparatus for determining big data cluster deployment scheme, cluster, and storage medium
US11954534B2 (en) Scheduling in a container orchestration system utilizing hardware topology hints
CN116820430B (en) Asynchronous read-write method, device, computer equipment and storage medium
US11768704B2 (en) Increase assignment effectiveness of kubernetes pods by reducing repetitive pod mis-scheduling

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 21908370

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21908370

Country of ref document: EP

Kind code of ref document: A1