Registry Monitoring Method, Electronic Device, Storage Medium and Program

By performing a set operation processing on the current instance snapshot information set and historical instance snapshot information set of the registry center, the problem of inaccurate registration status monitoring is solved, accurate monitoring of the registry center is achieved, and the stability and reliability of the microservice system are improved.

CN120066902BActive Publication Date: 2025-07-29TAIPING FINANCIAL SERVICE CENT (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510542141.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-07-29
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

The prior art has limitations in accurately monitoring the node status of the registration center and timely feedback monitoring results to system operation and maintenance personnel, which may pose a threat to the stability and reliability of the entire microservice system.

Method used

By obtaining the current instance snapshot information set and historical instance snapshot information set of the registration center, a variety of set operations are performed, including union, intersection and difference processing, and the current registration status of the registration center is determined based on the operation results, so as to achieve accurate monitoring of the registration center.

Benefits of technology

It improves the stability and reliability of the microservice system, can promptly detect potential risks and handle registration failures, and ensures the stable operation of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066902B_ABST
    Figure CN120066902B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention discloses a method for monitoring a registry, an electronic device, a storage medium, and a program. The method includes: obtaining a set of current instance snapshot information of the registry and a set of historical instance snapshot information of the registry; performing multiple set operation processes on the set of current instance snapshot information and the set of historical instance snapshot information to obtain multiple set operation results; determining the current registration status of the registry according to the multiple set operation results. The embodiments of the present invention can accurately monitor the registration status of the registry, thereby improving the stability and reliability of the microservice system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a registration center monitoring method, an electronic device, a storage medium, and a program. Background Art

[0002] With the development of distributed microservices, the registration center has become the cornerstone of the microservice architecture, which is used to manage service registration, discovery, and health checks, and builds an efficient and reliable communication bridge between service providers and service consumers, thereby ensuring the smooth cooperation and stable operation of the entire microservice system.

[0003] Currently, the service components of the registration center can monitor the online and offline status of application instances in real time. However, there are still certain limitations in accurately monitoring the node status of the registration center and timely feedback of the monitoring results to system operation and maintenance personnel in the prior art, which may pose a potential threat to the stability and reliability of the entire microservice system. Summary of the Invention

[0004] Embodiments of the present invention provide a registration center monitoring method, an electronic device, a storage medium, and a program, which can accurately monitor the registration status of the registration center, and further improve the stability and reliability of the microservice system.

[0005] According to one aspect of the present invention, there is provided a registration center monitoring method, which is applied to a registration center service component and includes:

[0006] Obtain the current instance snapshot information set of the registration center and the historical instance snapshot information set of the registration center;

[0007] Perform a variety of set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain a plurality of set operation results;

[0008] Determine the current registration status of the registration center according to the plurality of set operation results.

[0009] According to another aspect of the present invention, there is provided a registration center monitoring device, which is configured in a registration center service component and includes:

[0010] An information set acquisition module, which is used to obtain the current instance snapshot information set of the registration center and the historical instance snapshot information set of the registration center;

[0011] A set operation result acquisition module, which is used to perform a variety of set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain a plurality of set operation results;

[0012] A current registration status acquisition module, configured to determine the current registration status of the registration center according to the multiple set operation results.

[0013] According to another aspect of the present invention, there is provided an electronic device, including:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the registration center monitoring method according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for implementing the registration center monitoring method according to any embodiment of the present invention when executed by a processor.

[0018] According to another aspect of the present invention, there is also provided a computer program product including a computer program that implements the registration center monitoring method according to any embodiment of the present invention when executed by a processor.

[0019] In the embodiments of the present invention, by obtaining the current instance snapshot information set of the registration center and the historical instance snapshot information set of the registration center, further, various set operation processes can be performed on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results, so that the current registration status of the registration center can be determined according to the multiple set operation results, solving the problem of inaccurate registration status monitoring existing in the existing registration center monitoring method, being able to accurately monitor the registration status of the registration center, and further improving the stability and reliability of the microservice system.

[0020] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.

[0022] Figure 1 It is a flowchart of a registration center monitoring method provided in the first embodiment of the present invention;

[0023] Figure 2 It is a flowchart of a registration center monitoring method provided in the second embodiment of the present invention;

[0024] Figure 3 It is a flowchart of a method for comparing instance information before and after the release of a registration center provided in the second embodiment of the present invention;

[0025] Figure 4 It is a schematic diagram of the relationship of a method for comparing instance information before and after the release of a registration center provided in the second embodiment of the present invention;

[0026] Figure 5 It is a flowchart of a registration center monitoring method provided in the third embodiment of the present invention;

[0027] Figure 6 It is a flowchart of a method for periodically comparing instance information of a registration center provided in the third embodiment of the present invention;

[0028] Figure 7 It is a schematic diagram of the relationship of a method for periodically comparing instance information of a registration center provided in the third embodiment of the present invention;

[0029] Figure 8 It is a schematic diagram of a registration center monitoring device provided in the fourth embodiment of the present invention;

[0030] Figure 9 It is a schematic diagram of the structure of an electronic device provided in the fifth embodiment of the present invention. Detailed implementation manners

[0031] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0032] It should be noted that the terms "current" and "historical" in the description, claims, and the above-mentioned drawings of the present invention are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or devices.

[0033] Embodiment 1

[0034] Figure 1 is a flowchart of a registration center monitoring method provided by Embodiment 1 of the present invention. This embodiment is applicable to monitoring the change of application cluster instance data of the registration center within a period of time according to the set operation processing result of the current instance snapshot information set and the historical instance snapshot information set of the registration center. This method can be executed by a registration center monitoring device, which can be implemented in software and / or hardware, and is generally integrated in an electronic device, which can be a registration center service component. Correspondingly, as Figure 1 shown, the method includes the following operations:

[0035] S110. Obtain the current instance snapshot information set of the registration center and the historical instance snapshot information set of the registration center.

[0036] Among them, the registry can be a system for storing and managing instance information in a distributed system and a microservices architecture. The registry plays a crucial role in a microservices architecture, and its main functions include the following aspects: (1) Service registration and discovery: When a microservice starts, each service registers its network address and metadata such as service instance information with the registry. Service consumers obtain a list of available services by querying the registry, thereby achieving dynamic discovery of services; (2) Load balancing: The registry can perform load balancing on multiple instances of the same service, distributing requests to different instances, thereby improving the overall performance and availability of the microservices system; (3) Fault recovery: The registry can monitor and detect the status of services. When a service instance fails or goes offline, the registry updates the registration information in a timely manner to ensure that the service can operate normally; (4) Service governance: Through the registry, operations such as service configuration management, dynamic scaling, service routing, and gray release can be performed to achieve dynamic management and control of services; (5) Service configuration: The registry supports service configuration subscription and distribution. Service providers and callers can subscribe to relevant configuration information to ensure real-time update and push of configurations; (6) Health detection: The registry can also detect the health status of service providers to ensure the stable operation of services.

[0037] Among them, the set of current instance snapshot information can be a set of instance information in the registry at a specific point in time. Exemplarily, the set of current instance snapshot information can include, but is not limited to, service name, IP (Internet Protocol) address, port number, and health status, etc. The embodiments of the present invention do not limit the specific information types included in the set of current instance snapshot information. The so-called health status can be the operating condition of an instance in the registry at a specific point in time. The health status can reflect whether the corresponding registry instance can provide services normally. The set of historical instance snapshot information can be a set of registry instance information before a specific point in time.

[0038] In the embodiments of the present invention, the registry can be equipped with a tool for comparing instance information differences, namely the registry service component. During the process of monitoring the registry, the registry service component can first obtain the set of current instance snapshot information and the set of historical instance snapshot information of the registry by calling the instance information interface of the registry as reference data for monitoring data changes in the registry. It can be understood that the set of current instance snapshot information and the set of historical instance snapshot information are instance information in the registry at different times. The set of current instance snapshot information and the set of historical instance snapshot information can include the instance information of at least one instance in the registry.

[0039] S120. Perform various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results.

[0040] Among them, the set operation process can be a mathematical operation process on the current instance snapshot information set and the historical instance snapshot information set. Exemplarily, the set operation process can include but is not limited to intersection processing, union processing, and difference set processing, etc. The embodiments of the present invention do not limit the specific operation types included in the set operation process. The set operation result can be the result obtained by performing a mathematical operation process on the current instance snapshot information set and the historical instance snapshot information set.

[0041] Correspondingly, after obtaining the current instance snapshot information set of the registry and the historical instance snapshot information set of the registry, various mathematical operation processes can be performed on the current instance snapshot information set and the historical instance snapshot information set, so that multiple set operation results can be obtained. By performing a mathematical operation process on the current instance snapshot information set and the historical instance snapshot information set, the internal relationship between the current instance snapshot information set and the historical instance snapshot information set can be discovered. Further, the registry service component can judge the current registration status of the registry according to the set operation result.

[0042] In an optional embodiment of the present invention, the performing various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results may include: performing a union process on the current instance snapshot information set and the historical instance snapshot information set to obtain a first operation set; performing an intersection process on the current instance snapshot information set and the historical instance snapshot information set to obtain a second operation set; performing a difference set process on the first operation set and the second operation set to obtain a third operation set.

[0043] Among them, the first operation set can be the result obtained by performing a union process on the current instance snapshot information set and the historical instance snapshot information set. The second operation set can be the result obtained by performing an intersection process on the current instance snapshot information set and the historical instance snapshot information set. The third operation set can be the result obtained by performing a difference set process on the first operation set and the second operation set.

[0044] In an embodiment of the present invention, in the process of performing various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results, the union operation can be performed on the current instance snapshot information set and the historical instance snapshot information set to obtain a first operation set, so that all instances involved in the above two sets can be obtained. The intersection operation can also be performed on the current instance snapshot information set and the historical instance snapshot information set to obtain a second operation set. The second operation set can be used to determine which instances exist in both of the above two sets, so as to judge the persistence of the instances. Further, after obtaining the first operation set and the second operation set, the difference operation can be performed on the first operation set and the second operation set to obtain a third operation set. The newly added or disappeared instances in the current instance snapshot information set can be clearly presented through the third operation set, which helps to quickly locate the dynamic change points of the microservice system. Based on these set operation results, the registration center service component can accurately judge the current registration status of the registration center, timely discover potential risks, and provide a strong guarantee for the stable operation of the microservice system.

[0045] S130. Determine the current registration status of the registration center according to the multiple set operation results.

[0046] Among them, the current registration status can be the running status of the service embodiments in the registration center at a certain moment. Exemplarily, the current registration status can include but is not limited to normal and abnormal, etc. The embodiments of the present invention do not limit the specific status types included in the current registration status.

[0047] Specifically, the above multiple set operation results contain rich instance information. Therefore, the registration center service component can deeply analyze the above multiple set operation results, so as to determine the current registration status of the registration center according to the multiple set operation results. The current registration status can cover multi-dimensional information such as the health status, online or offline status, and load condition of the instances in the registration center. By monitoring the current registration status of the registration center, the availability of the registration center instances can be monitored, registration failures can be timely discovered and processed, so as to ensure the stable operation of the microservice system.

[0048] In an alternative embodiment of the present invention, determining the current registration status of the registry according to the results of the multiple set operations may include: when determining that the third operation set is empty, determining that the current registration status of the registry is the normal status; when determining that the third operation set is not empty and determining that all values of the third operation set belong to the current instance snapshot information set, determining that the current registration status of the registry is the normal status; when determining that the third operation set is not empty and determining that all values of the third operation set belong to the historical instance snapshot information set, determining that the current registration status of the registry is the abnormal status; when determining that the third operation set is not empty, determining that some values of the third operation set belong to the current instance snapshot information set, and determining that some values of the third operation set belong to the historical instance snapshot information set, determining that the current registration status of the registry is the abnormal status.

[0049] Among them, the normal status may be that at a certain moment, all instances in the registry are in a healthy and available state. The abnormal status may be that at a certain moment, there is one or more instances in the registry that are in an unhealthy or unavailable state.

[0050] In the embodiment of the present invention, during the process of the registry service component determining the current registration status of the registry according to the results of the multiple set operations, it may first determine whether the third operation set is empty. When determining that the third operation set is empty, it indicates that the first operation set and the second operation set are exactly the same, that is, the current instance snapshot information set and the historical instance snapshot information set are the same. This means that within the period of obtaining the current instance snapshot information set and the historical instance snapshot information set, no changes have occurred to all instances in the registry, and all instances have remained stable. Therefore, it can be determined that the current registration status of the registry is the normal status, and the microservice system is in a stable and healthy state without the need for intervention or adjustment.

[0051] When determining that the third operation set is not empty, it can be determined that there are differences between the current instance snapshot information set and the historical instance snapshot information set. Further, when determining that the third operation set is not empty, the content of the third operation set can be analyzed in detail. If all values of the third operation set belong to the current instance snapshot information set, this indicates that the current instance snapshot information set covers all of the historical instance snapshot information set. Therefore, it can be determined that the current registration status of the registry is the normal status. On the contrary, if all values of the third operation set belong to the historical instance snapshot information set, it indicates that the current instance snapshot information set does not include all of the historical instance snapshot information set, that is, some historical instances are missing in the current instances. Therefore, it can be determined that the current registration status of the registry is the abnormal status.

[0052] In addition, if the value part of the third operation set belongs to the current instance snapshot information set and part belongs to the historical instance snapshot information set, it can also be determined that the current instance snapshot information set does not include all of the historical instance snapshot information set. Therefore, it can also be determined that the current registration status of the registration center is an abnormal status. By analyzing the detailed results of multiple set operations, the current registration status of the registration center can be evaluated more accurately, so as to discover and handle potential problems in a timely manner and ensure the stability and reliability of the microservice system.

[0053] In a specific example, assume that the current instance snapshot information set is set as A1 and the historical instance snapshot information set is set as A2. First, the union of A1 and A2 can be processed to obtain A3, and the intersection of A1 and A2 can be processed to obtain A4. Further, the difference set of A3 and A4 can be processed to obtain A5, so that the current registration status of the registration center can be analyzed based on the above multiple set operation results.

[0054] If A5 is empty, it means that the data of A1 and A2 are consistent; if A5 is not empty and all the values of A5 belong to A1, it means that the set A1 contains the set A2. Both of the above situations indicate that the current instance snapshot information set A1 completely includes the historical instance snapshot information set A2. Therefore, it can be determined that the current registration status of the registration center is normal.

[0055] If A5 is not empty and all the values of A5 belong to A2, it means that the set A2 contains the set A1; if A5 is not empty and part of the values of A5 belong to A2 and part of the values of A5 belong to A1, it means that the set A2 contains part of the set A1 and the set A1 contains part of the set A2. Both of the above situations indicate that the current instance snapshot information set A1 does not include all of the historical instance snapshot information set A2. Therefore, it can be determined that the current registration status of the registration center is abnormal.

[0056] In an alternative embodiment of the present invention, after determining the current registration status of the registration center according to the multiple set operation results, it may further include: in the case of determining that the current registration status of the registration center is an abnormal status, determining the self-healing waiting time of the registration center according to the self-healing process information of the registration center; in the case of determining that the registration center fails to self-heal within the self-healing waiting time, generating self-healing failure information of the registration center; wherein, the self-healing failure information of the registration center is used to indicate to re-execute the registration process for the registration center.

[0057] Among them, the self-healing process information can be the process information of a series of recovery measures automatically taken when it is monitored that the current registration status of the registry is abnormal. The self-healing waiting time can be the time from when it is monitored that the current registration status of the registry is abnormal to when the abnormal service instance is automatically restored or removed. Exemplarily, the self-healing waiting time can be determined by factors such as the heartbeat detection interval, the heartbeat timeout time, and the service instance removal time. The embodiments of the present invention do not limit the specific value of the self-healing waiting time. The self-healing failure information of the registry can be the error information or log record generated due to certain reasons that the self-healing operation fails to be successfully completed during the self-healing process of the registry. The self-healing failure information of the registry is used to indicate to re-execute the registration process for the registry. The registration process can be a process in which a service provider registers its own service information in the registry so that service consumers can discover and call these services through the registry.

[0058] In the embodiments of the present invention, after the registry service component determines the current registration status of the registry according to the results of multiple set operations, if it is determined that the current registration status of the registry is an abnormal state, the registry can start a self-healing process to automatically process the abnormal instances in the registry and restore the registry to a normal state. However, the self-healing process of the registry cannot be carried out indefinitely. Therefore, the registry service component can determine the self-healing waiting time of the registry according to the self-healing process information of the registry. Further, if the registry fails to complete self-healing successfully within the self-healing waiting time, that is, self-healing fails, the registry service component can generate the self-healing failure information of the registry to be used to indicate to re-execute the registration process for the registry. When the current registration status of the registry is abnormal, through the self-healing process, the registry can perform self-healing. Through the self-healing process, the registry can automatically process abnormal service instances and can restore the service in a short time, reducing the impact of abnormal instances on the business, thereby improving the availability and stability of the microservice system.

[0059] It can be seen that the above solution can accurately judge the state change of the service instances in the registry by performing various set operation processes on the current instance snapshot information set and the historical instance snapshot information set of the registry to obtain multiple set operation results, and judging the current registration status of the registry according to the multiple set operation results, improving the accuracy of registry monitoring, and further ensuring the stable operation of the microservice system.

[0060] In an embodiment of the present invention, by obtaining the set of current instance snapshot information of the registry and the set of historical instance snapshot information of the registry, further, various set operation processes can be performed on the set of current instance snapshot information and the set of historical instance snapshot information to obtain multiple set operation results, so that the current registration status of the registry can be determined according to the multiple set operation results, solving the problem of inaccurate monitoring of the registration status existing in the existing registry monitoring method, being able to accurately monitor the registration status of the registry, and further improving the stability and reliability of the microservice system.

[0061] Embodiment 2

[0062] Figure 2 FIG. is a flowchart of a registry monitoring method provided in Embodiment 2 of the present invention. This embodiment is a specific implementation based on the above embodiment. In this embodiment, when the set of historical instance snapshot information includes the set of instance snapshot information before the registry is released, multiple specific and optional implementation manners for obtaining the set of current instance snapshot information of the registry and the set of historical instance snapshot information of the registry are given. Correspondingly, as Figure 2 shown, the method of this embodiment may include:

[0063] S210. Obtain the set of historical instance snapshot information of the registry.

[0064] In an embodiment of the present invention, the set of historical instance snapshot information may include the set of instance snapshot information before the registry is released. By obtaining the set of current instance snapshot information of the registry and the set of instance snapshot information before the registry is released, the changes in the instances before and after the registry is released can be identified by analyzing the set of current instance snapshot information and the set of historical instance snapshot information of the registry. For example, which instances are newly added, which instances are removed, and which instances' health status has changed.

[0065] In an optional embodiment of the present invention, obtaining the set of historical instance snapshot information of the registry may include: configuring the corresponding configuration information for the registry; obtaining the configuration information of the registry according to the registry identifier of the instance information request through the snapshot generation interface of the registry service component; obtaining the login credential of the registry according to the configuration information of the registry by logging in to the login interface of the registry; calling the instance information interface of the registry according to the login credential of the registry to obtain the instance information of all instances in the application cluster of the registry, obtaining the set of historical instance snapshot information of the registry; and storing the set of historical instance snapshot information of the registry in the target database.

[0066] In an embodiment of the present invention, to obtain a set of historical instance snapshot information of a registry, first, before the registry is published, corresponding configuration information can be configured for the registry through an information configuration page provided by the registry service component. These configuration information can include information such as the address of the registry and the registry identifier, etc., to prepare for subsequent snapshot generation and data acquisition through the call interface.

[0067] Furthermore, the system operation and maintenance personnel can access the snapshot generation interface of the registry service component. The snapshot generation interface of the registry service component can obtain the configuration information of the registry according to the registry identifier carried in the instance information acquisition request. According to the configuration information of the registry, it can be ensured that the snapshot generation interface is correctly connected to the registry.

[0068] Furthermore, the registry service component can log in to the login interface of the registry according to the obtained configuration information of the registry to obtain the login credentials of the registry. The login credentials are the necessary basis for accessing the registry. Usually, it can be a token or a key, which can be used for authentication and authorization. After obtaining the login credentials through the login interface, the registry can use the login credentials to call the instance information interface of the registry to obtain the instance information of all instances in the application cluster of the registry as a set of historical instance snapshot information of the registry. After obtaining the set of historical instance snapshot information, the obtained set of historical instance snapshot information can be processed and saved to the target database in a specific data structure. It can be understood that the specific data result can include but is not limited to relational database tables, key-value stores, or document stores, etc. The embodiments of the present invention do not limit the specific form of the specific data structure.

[0069] S220. Obtain the configuration information of the registry according to the registry identifier in the instance information acquisition request.

[0070] Among them, the instance information acquisition request can be sent by the service consumer to the registry for obtaining specific instance information. The registry identifier can be a mark or information used to uniquely identify the registry. The configuration information of the registry can be a series of parameters and options that need to be set when using the registry. Exemplarily, the configuration information of the registry can include but is not limited to the registry address, service name, and cluster configuration, etc. The embodiments of the present invention do not limit the specific information types included in the configuration information of the registry.

[0071] In an embodiment of the present invention, during the process of monitoring the registry through the registry service component, the configuration information of the corresponding registry can be obtained according to the registry identifier carried in the instance information acquisition request.

[0072] In an alternative embodiment of the present invention, obtaining the configuration information of the registry according to the registry identifier obtained from the instance information request may include: obtaining the configuration information of the registry through the snapshot comparison interface of the registry service component according to the registry identifier obtained from the instance information request.

[0073] Among them, the snapshot comparison interface may be an interface in the registry service component used to compare the differences between two or more data snapshots.

[0074] In an embodiment of the present invention, during the process of obtaining the configuration information of the registry according to the registry identifier obtained from the instance information request, the system operation and maintenance personnel may access the snapshot comparison interface of the registry service component. Further, the snapshot comparison interface may obtain the corresponding configuration information of the registry according to the registry identifier carried in the instance information request. Based on the obtained configuration information, it can be ensured that the snapshot generation interface of the registry is correctly connected to the registry.

[0075] S230. Log in to the login interface of the registry according to the configuration information of the registry to obtain the login credential of the registry.

[0076] Among them, the login interface of the registry may be an API (Application Programming Interface) for user authentication and login. The login credential of the registry may be authentication information for verifying the user's identity and allowing the user to access the registry.

[0077] Specifically, after obtaining the configuration information of the registry, the login interface of the registry may be called, and the information provided in the configuration information is used for authentication. If the verification is successful, the registry will return a login credential, such as a token or a key, etc.

[0078] S240. Call the instance information interface of the registry according to the login credential of the registry to obtain the instance information of all instances in the application cluster of the registry, and obtain the current instance snapshot information set of the registry.

[0079] Among them, the instance information of all instances in the application cluster may be the detailed status and configuration information of all service instances in the application cluster of the registry. Exemplarily, the instance information of all instances in the application cluster may include, but is not limited to, the IP address, port number, and health status of the instance, etc. The embodiments of the present invention do not limit the specific information types included in the instance information of all instances in the application cluster.

[0080] Correspondingly, after obtaining the login credentials of the registry, the registry service component can call the instance information interface of the registry based on the login credentials of the registry. Further, the instance information of all instances in the application cluster of the registry can be obtained through the instance information interface of the registry, and used as the current instance snapshot information set of the registry.

[0081] S250. Store the current instance snapshot information set of the registry in the target database.

[0082] Among them, the target database can be a database used to store the instance information of all instances of the registry.

[0083] Correspondingly, after obtaining the current instance snapshot information set of the registry, the obtained current instance snapshot information set can be preprocessed and cached in the target database in a specific data structure. In a specific example, the current instance snapshot information set can be cached in the target database in the form of a Map (mapping).

[0084] Figure 3 This is a flowchart of a method for comparing instance information before and after the release of a registry according to Embodiment 2 of the present invention. Figure 4 This is a schematic diagram of the relationship of a method for comparing instance information before and after the release of a registry according to Embodiment 2 of the present invention. In a specific example, as Figure 3 and Figure 4 shown, to implement the comparison of instance information before and after the release of the registry, the registry monitoring method may include the following steps:

[0085] Step 1. Generation of instance information snapshot

[0086] (1) The registry service component provides a page for configuring information such as the registry address, username, password, and registry identifier, and prepares to call the interface after configuring the registry information.

[0087] (2) The system operation and maintenance personnel access the snapshot generation interface of the registry service component, and the snapshot generation interface obtains the corresponding registry configuration information based on the requested registry identifier.

[0088] (3) The registry service component calls the login interface of the registry to obtain the login credentials of the registry.

[0089] (4) The registry service component holds the login credentials of the registry and calls the instance information interface of the registry to obtain the instance information of all instances in the application cluster under the current registry, and uses it as the historical instance snapshot information set of the registry.

[0090] (5) The registration center service component processes the obtained instance information and then saves it to the database.

[0091] Step 2: Comparison of instance information snapshots

[0092] (1) The system operation and maintenance personnel access the snapshot comparison interface of the registration center service component, and the snapshot comparison interface obtains the corresponding registration center configuration information according to the requested registration center identifier.

[0093] (2) The registration center service component calls the login interface of the registration center to obtain the login credentials of the registration center.

[0094] (3) The registration center service component holds the login credentials of the registration center and calls the instance information interface of the registration center to obtain the instance information of all instances in the application cluster under the current registration center.

[0095] (4) The registration center service component processes the obtained instance information and then saves it to the database.

[0096] (5) The registration center service component obtains the latest snapshot information record from the database as the current instance snapshot information set of the registration center.

[0097] (6) The registration center service component compares the historical snapshot information with the newly obtained instance snapshot information and writes the comparison result to a file.

[0098] Step 3: Management of instance information snapshots

[0099] (1) The system operation and maintenance personnel can query the snapshot information of the current registration center identifier through the registration center service component.

[0100] (2) The system operation and maintenance personnel can delete a certain historical snapshot information under a certain registration center identifier through the registration center service component.

[0101] (3) The system operation and maintenance personnel can delete all historical snapshot information under a certain registration center identifier through the registration center service component.

[0102] S260. Perform various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results.

[0103] S270. Determine the current registration status of the registration center according to the multiple set operation results.

[0104] In an embodiment of the present invention, by obtaining a set of historical instance snapshot information of a registry, further, the configuration information of the registry can be obtained according to the registry identifier of the instance information acquisition request, and then the login interface of the registry can be logged in according to the configuration information of the registry to obtain the login credentials of the registry. Thus, the instance information interface of the registry can be called according to the login credentials of the registry to obtain the instance information of all instances in the application cluster of the registry, and a set of current instance snapshot information of the registry is obtained, and the set of current instance snapshot information of the registry is stored in a target database. Further, various set operation processes can be performed on the set of current instance snapshot information and the set of historical instance snapshot information to obtain multiple set operation results, so that the current registration status of the registry can be determined according to the multiple set operation results, solving the problem of inaccurate monitoring of the registration status in the existing registry monitoring method, being able to accurately monitor the registration status of the registry, and further improving the stability and reliability of the microservice system.

[0105] Embodiment III

[0106] Figure 5 FIG. is a flowchart of a registry monitoring method provided in Embodiment III of the present invention. This embodiment is a specific implementation based on the above embodiment. In this embodiment, when the set of historical instance snapshot information includes the set of instance snapshot information historically stored on the registry last time, multiple specific and optional implementation manners for obtaining the set of current instance snapshot information of the registry and the set of historical instance snapshot information of the registry are given. Correspondingly, as Figure 5 shown, the method of this embodiment may include:

[0107] S310. Obtain the set of historical instance snapshot information of the registry.

[0108] In an embodiment of the present invention, the set of historical instance snapshot information may include the set of instance snapshot information historically stored on the registry last time. By obtaining the set of current instance snapshot information of the registry and the set of instance snapshot information historically stored on the registry last time, it is possible to monitor whether the instances in the registry are in an abnormal state by comparing the set of current instance snapshot information of the registry and the set of historical instance snapshot information.

[0109] In an optional embodiment of the present invention, obtaining the set of historical instance snapshot information of the registry may include: querying the target database according to the instance identifier in the registry configuration information to obtain the set of instance snapshot information historically stored on the registry last time.

[0110] In an embodiment of the present invention, when the historical instance snapshot information set includes the instance snapshot information set historically stored on the registry last time, to obtain the historical instance snapshot information set of the registry, the target database can be accurately located according to the instance identifier in the registry configuration information. After successfully locating the target database, the registry service component can initiate a query request to the target database. This query request can traverse the data stored in the target database based on the instance identifier, so as to filter out the instance snapshot information set historically stored on the registry last time.

[0111] S320. Obtain the configuration information of the registry according to the registry identifier requested in the instance information.

[0112] In an alternative embodiment of the present invention, the obtaining the configuration information of the registry according to the registry identifier requested in the instance information may include: configuring the configuration information corresponding to the registry configuration; periodically executing a snapshot comparison interface, and obtaining the configuration information of the registry through the snapshot comparison interface according to the registry identifier requested in the instance information.

[0113] In an embodiment of the present invention, to implement the periodic comparison of instance information in the registry, during the process of obtaining the current instance snapshot information set of the registry, first, the system operation and maintenance personnel can configure and save the configuration information of the registry through the information configuration interface provided by the registry service component. Further, a periodic task can be set to trigger the execution of the snapshot comparison interface periodically. The above periodic task can be a simple timer or a more complex scheduling system. Whenever the periodic task is triggered, the snapshot generation interface will be called, and then the snapshot generation interface can read the configuration information of the registry from the previously saved configuration information according to the registry identifier carried in the instance information request.

[0114] S330. Log in to the login interface of the registry according to the configuration information of the registry to obtain the login credential of the registry.

[0115] S340. Call the instance information interface of the registry according to the login credential of the registry to obtain the instance information of all instances in the application cluster of the registry, and obtain the current instance snapshot information set of the registry.

[0116] S350. Store the current instance snapshot information set of the registry into the target database.

[0117] S360. Perform various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results.

[0118] S370. Determine the current registration status of the registration center according to the results of the multiple set operations.

[0119] It should be noted that when the historical instance snapshot information set includes the instance snapshot information set stored in the registration center last time, the above method can monitor the changes in the instance information of one or more instances in the registration center, thereby improving the stability and reliability of the microservice system.

[0120] Figure 6 It is a flowchart of a method for periodically comparing instance information of a registration center provided in Embodiment III of the present invention. Figure 7 It is a schematic diagram of the relationship of a method for periodically comparing instance information of a registration center provided in Embodiment III of the present invention. In a specific example, as Figure 6 and Figure 7 shown, to implement the periodic comparison of instance information of the registration center, the registration center monitoring method may include the following steps:

[0121] Step 1. The registration center service component can configure information such as the registration center address, username, password, registration center identifier, and instance identifier.

[0122] Step 2. The registration center service component periodically executes the snapshot generation interface, and the snapshot generation interface obtains the corresponding registration center configuration information according to the requested registration center identifier.

[0123] Step 3. The registration center service component calls the login interface of the registration center to obtain the login credential of the registration center.

[0124] Step 4. The registration center service component holds the login credential of the registration center and calls the instance information interface of the registration center to obtain the instance information of all instances in the application cluster under the current registration center.

[0125] Optionally, if the snapshot information of a certain instance does not exist in the target database, that is, the instance is a newly added instance in the registration center, the current instance snapshot information set can be generated according to the instance information of the instance, and the current instance snapshot information set is stored without performing the data comparison process.

[0126] Step 5. When the snapshot information of a certain instance exists in the target database, the registration center service component can process the obtained instance information, obtain the current instance snapshot information set A with the configured instance identifier, and store the current instance snapshot information set A.

[0127] Step 6. The registration center service component obtains the previous historical storage instance snapshot information set B of the instance identifier from the target database.

[0128] Step 7: The registration center service component obtains the difference information by comparing the differences between the two snapshots A and B, and records the difference information as C.

[0129] Step 8: If the difference information C is empty, it means that the data in the two sets A and B are the same, and the judgment process is directly ended.

[0130] Step 9: If C is not empty, further, it is judged whether the data set of C is the same as B.

[0131] Step 10: If they are the same, it means that the data of A is empty, that is, the current instance snapshot information set is empty, indicating that all instances in the current cluster are offline. Further, it can be judged whether the current time is the downtime release time of the microservice system. If so, the judgment process is directly ended. If not, it means that the current registration status of the registration center is abnormal, and the difference data C is saved to the target database.

[0132] Step 11: If the data is different, it can also be indicated that the current registration status of the registration center is abnormal. The difference data C is directly saved to the target database, and the task is ended.

[0133] In the embodiment of the present invention, by obtaining the historical instance snapshot information set of the registration center, further, the configuration information of the registration center can be obtained according to the registration center identifier of the instance information acquisition request, and then the login credential of the registration center can be obtained by logging in to the login interface of the registration center according to the configuration information of the registration center. Thus, the instance information interface of the registration center can be called according to the login credential of the registration center to obtain the instance information of all instances in the application cluster of the registration center, obtain the current instance snapshot information set of the registration center, and store the current instance snapshot information set of the registration center in the target database. Further, various set operation processes can be performed on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results, so that the current registration status of the registration center can be determined according to the multiple set operation results, solving the problem of inaccurate registration status monitoring existing in the existing registration center monitoring method, being able to accurately monitor the registration status of the registration center, and further improving the stability and reliability of the microservice system.

[0134] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information and other processes all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.

[0135] It should be noted that any permutation and combination of the technical features in the above embodiments also belong to the protection scope of the present invention.

[0136] Embodiment 4

[0137] Figure 8It is a schematic diagram of a registration center monitoring device provided in the fourth embodiment of the present invention. As Figure 8 shown, the device is configured in the registration center service component, and includes: an information set acquisition module 410, a set operation result acquisition module 420, and a current registration status acquisition module 430, where:

[0138] The information set acquisition module 410 is used to acquire the current instance snapshot information set of the registration center and the historical instance snapshot information set of the registration center.

[0139] The set operation result acquisition module 420 is used to perform various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results.

[0140] The current registration status acquisition module 430 is used to determine the current registration status of the registration center according to the multiple set operation results.

[0141] In the embodiment of the present invention, by acquiring the current instance snapshot information set of the registration center and the historical instance snapshot information set of the registration center, further, various set operation processes can be performed on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results, so that the current registration status of the registration center can be determined according to the multiple set operation results, solving the problem of inaccurate registration status monitoring existing in the existing registration center monitoring method, being able to accurately monitor the registration status of the registration center, and further improving the stability and reliability of the microservice system.

[0142] Optionally, the set operation result acquisition module 420 is specifically used to: perform a union process on the current instance snapshot information set and the historical instance snapshot information set to obtain a first operation set; perform an intersection process on the current instance snapshot information set and the historical instance snapshot information set to obtain a second operation set; perform a difference process on the first operation set and the second operation set to obtain a third operation set.

[0143] Optionally, the current registration status obtaining module 430 is specifically configured to: when it is determined that the third operation set is empty, determine that the current registration status of the registration center is the normal status; when it is determined that the third operation set is not empty and it is determined that all values of the third operation set belong to the current instance snapshot information set, determine that the current registration status of the registration center is the normal status; when it is determined that the third operation set is not empty and it is determined that all values of the third operation set belong to the historical instance snapshot information set, determine that the current registration status of the registration center is the abnormal status; when it is determined that the third operation set is not empty, it is determined that some values of the third operation set belong to the current instance snapshot information set, and it is determined that some values of the third operation set belong to the historical instance snapshot information set, determine that the current registration status of the registration center is the abnormal status.

[0144] Optionally, the information set obtaining module 410 is specifically configured to: obtain the configuration information of the registration center according to the registration center identifier in the instance information obtaining request; log in to the login interface of the registration center according to the configuration information of the registration center to obtain the login credential of the registration center; call the instance information interface of the registration center according to the login credential of the registration center to obtain the instance information of all instances in the application cluster of the registration center, and obtain the current instance snapshot information set of the registration center; store the current instance snapshot information set of the registration center in the target database.

[0145] Optionally, the historical instance snapshot information set includes the instance snapshot information set before the registration center is released. The information set obtaining module 410 is further configured to: obtain the configuration information of the registration center through the snapshot comparison interface of the registration center service component according to the registration center identifier in the instance information obtaining request.

[0146] Optionally, the information set obtaining module 410 is further configured to: configure the configuration information corresponding to the registration center; obtain the configuration information of the registration center through the snapshot generation interface of the registration center service component according to the registration center identifier in the instance information obtaining request; log in to the login interface of the registration center according to the configuration information of the registration center to obtain the login credential of the registration center; call the instance information interface of the registration center according to the login credential of the registration center to obtain the instance information of all instances in the application cluster of the registration center, and obtain the historical instance snapshot information set of the registration center; store the historical instance snapshot information set of the registration center in the target database.

[0147] Optionally, the historical instance snapshot information set includes the instance snapshot information set last historically stored in the registry. The information set acquisition module 410 is further configured to: configure corresponding configuration information for the registry; periodically execute a snapshot generation interface, and obtain the configuration information of the registry through the snapshot generation interface according to the registry identifier in the instance information acquisition request.

[0148] Optionally, the information set acquisition module 410 is further configured to: query the target database according to the instance identifier in the registry configuration information, and obtain the instance snapshot information set last historically stored in the registry.

[0149] Optionally, the above device may further include an exception management module, which is specifically configured to: determine the self-healing waiting time of the registry according to the self-healing process information of the registry when it is determined that the current registration status of the registry is an abnormal status; generate self-healing failure information of the registry when it is determined that the registry fails to self-heal within the self-healing waiting time; wherein, the self-healing failure information of the registry is used to indicate to re-execute the registration process for the registry.

[0150] The above registry monitoring device can execute the registry monitoring method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the registry monitoring method provided in any embodiment of the present invention.

[0151] Since the above-described registry monitoring device is a device that can execute the registry monitoring method in the embodiments of the present invention, based on the registry monitoring method described in the embodiments of the present invention, those skilled in the art can understand the specific implementation manners and various variations of the registry monitoring device in this embodiment. Therefore, the details of how the registry monitoring device implements the registry monitoring method in the embodiments of the present invention will not be described in detail here. As long as the device adopted by those skilled in the art to implement the registry monitoring method in the embodiments of the present invention falls within the scope of protection of this application.

[0152] Embodiment Five

[0153] Figure 9The structural schematic diagram of an electronic device 10 that can be used to implement the embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0154] As Figure 9 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0155] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0156] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the registration center monitoring method.

[0157] In some embodiments, the registry monitoring method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the registry monitoring method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the registry monitoring method by any other suitable means (e.g., by means of firmware).

[0158] Optionally, the registry monitoring method, applied to a registry service component, may include: obtaining a set of current instance snapshot information of the registry and a set of historical instance snapshot information of the registry; performing various set operation processes on the set of current instance snapshot information and the set of historical instance snapshot information to obtain a plurality of set operation results; and determining the current registration status of the registry according to the plurality of set operation results.

[0159] The various embodiments of the systems and techniques described above in this document may be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special or general programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0160] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, a special purpose computer, or other programmable data processing device, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0161] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0162] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0163] The systems and techniques described herein can be implemented in a computing system that includes backend components (such as, for example, a data server), or a computing system that includes middleware components (such as, for example, an application server), or a computing system that includes frontend components (such as, for example, a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (such as, for example, a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0164] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0165] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitations are imposed herein.

[0166] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.

Claims

1. A registration center monitoring method, characterized in that: Applied to the registry service component, including: Obtain the current instance snapshot information set of the registry and the historical instance snapshot information set of the registry; Perform various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results; Determine the current registration status of the registry according to the multiple set operation results; Among them, the performing various set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results includes: Perform a union operation on the current instance snapshot information set and the historical instance snapshot information set to obtain a first operation set; Perform an intersection operation on the current instance snapshot information set and the historical instance snapshot information set to obtain a second operation set; Perform a difference operation on the first operation set and the second operation set to obtain a third operation set; The determining the current registration status of the registry according to the multiple set operation results includes: When it is determined that the third operation set is empty, determine that the current registration status of the registry is the normal status; When it is determined that the third operation set is not empty and it is determined that all the values of the third operation set belong to the current instance snapshot information set, determine that the current registration status of the registry is the normal status; When it is determined that the third operation set is not empty and it is determined that all the values of the third operation set belong to the historical instance snapshot information set, determine that the current registration status of the registry is the abnormal status; When it is determined that the third operation set is not empty, and it is determined that some of the values of the third operation set belong to the current instance snapshot information set, and it is determined that some of the values of the third operation set belong to the historical instance snapshot information set, determine that the current registration status of the registry is the abnormal status.

2. The method according to claim 1, characterized in that, Obtaining the current instance snapshot information set of the registry includes: Obtain the configuration information of the registry according to the registry identifier in the instance information acquisition request; Log in to the login interface of the registry according to the configuration information of the registry to obtain the login credential of the registry; Call the instance information interface of the registry according to the login credential of the registry to obtain the instance information of all instances in the application cluster of the registry, and obtain the current instance snapshot information set of the registry; Store the current instance snapshot information set of the registry into the target database.

3. The method according to claim 2, characterized in that The historical instance snapshot information set includes the instance snapshot information set before the registry is released; the obtaining the configuration information of the registry according to the registry identifier in the instance information acquisition request includes: Obtain the configuration information of the registry through the snapshot comparison interface of the registry service component according to the registry identifier in the instance information acquisition request; Obtaining the historical instance snapshot information set of the registry includes: The configuration information corresponding to the registry configuration; Acquire the configuration information of the registry center according to the registry center identifier of the instance information acquisition request through the snapshot generation interface of the registry center service component; Log in to the login interface of the registration center according to the configuration information of the registration center to obtain the login credentials of the registration center; Calling the instance information interface of the registry center according to the login credentials of the registry center to obtain the instance information of all instances of the application cluster of the registry center and obtain the historical instance snapshot information set of the registry center; The historical instance snapshot information set of the registration center is stored in the target database.

4. The method according to claim 2, wherein The historical instance snapshot information set includes the instance snapshot information set stored in the registry center last time; and the step of obtaining the configuration information of the registry center according to the registry center identifier in the instance information obtaining request includes: Configuring corresponding configuration information for the registration center; Periodically executing a snapshot generation interface, and obtaining configuration information of the registry center according to the registry center identifier of the instance information acquisition request through the snapshot generation interface; Obtain a collection of historical instance snapshot information of the registry, including: The target database is queried according to the instance identifier in the registry configuration information to obtain the instance snapshot information set stored in the registry last time.

5. The method according to claim 1, wherein After determining the current registration status of the registration center according to the multiple set operation results, the method further includes: When it is determined that the current registration state of the registration center is an abnormal state, determining the self-healing waiting time of the registration center according to the self-healing process information of the registration center; If it is determined that the registration center fails to self-heal within the self-healing waiting time, generating self-healing failure information of the registration center; The self-healing failure information of the registration center is used to instruct to re-execute the registration process for the registration center.

6. An electronic device, characterized in that, The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so as to enable the at least one processor to execute the registration center monitoring method according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the registration center monitoring method according to any one of claims 1 to 5 when executed.

8. A computer program product comprising a computer program / instructions, wherein: When the computer program / instructions are executed by a processor, the registration center monitoring method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Micro service management system and method, and computer storage medium

    CN108282368A

  • A micro-service monitoring method and system

    CN109873736A