Registration center monitoring method, electronic device, storage medium and program

By performing aggregation operation on the current and historical instance snapshot information of the registry center, accurately monitoring the registration status of the registry center, solving the problem of inaccurate monitoring in the existing technology, and improving the stability and reliability of the microservice system.

CN120066902AActive Publication Date: 2025-05-30TAIPING FINANCIAL SERVICE CENT (SHANGHAI) CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has limitations in accurately monitoring and timely feedback on the status of the registration center nodes, which may pose a potential threat to the stability and reliability of the microservice system.

Method used

By obtaining the current instance snapshot information set and the historical instance snapshot information set of the registry center, various set operations are performed to determine the current registration status of the registry center.

Benefits of technology

Accurate monitoring of the registration status of the registration center is realized, and the stability and reliability of the microservice system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066902A_ABST
    Figure CN120066902A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a registration center monitoring method, electronic equipment, a storage medium and a program, and the method comprises the steps: obtaining a current instance snapshot information set of a registration center and a historical instance snapshot information set of the registration center; performing various set operation processing on the current instance snapshot information set and the historical instance snapshot information set to obtain a plurality of set operation results; and determining the current registration state of the registration center according to the plurality of set operation results. According to the embodiment of the invention, the registration state of the registration center can be accurately monitored, so that the stability and reliability of the micro-service system are improved.
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, thus 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 multiple set operation results;

[0008] Determine the current registration status of the registration center according to the multiple 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, configured 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, configured to perform a variety of set operation processes on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple 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, which includes:

[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 causing a processor to implement the registration center monitoring method according to any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, there is also provided a computer program product including a computer program, which 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 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.

[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. 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 following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[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 with reference to 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 comprising 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 not clearly listed or inherent to these processes, methods, products or devices.

[0033] Embodiment 1

[0034] Figure 1 FIG. 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 the 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 query the registry to obtain a list of available services, 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 will update the registration information in a timely manner to ensure that the service can work properly; (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 certain specific time point. 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 running status of an instance in the registry at a certain specific time point. 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 certain specific time point.

[0038] In the embodiments of the present invention, the registry can be equipped with a tool for comparing instance information differences, that is, a 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 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. Through the third operation set, the newly added or disappeared instances in the current instance snapshot information set can be clearly presented, 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 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, rich instance information is contained in the above multiple set operation results. 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 registration center according to the results of the multiple set operations may include: when it is determined that the third operation set is empty, determining that the current registration status of the registration center is the normal state; 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, determining that the current registration status of the registration center is the normal state; 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, determining that the current registration status of the registration center is the abnormal state; 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, determining that the current registration status of the registration center is the abnormal state.

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

[0050] In the embodiment of the present invention, during the process of the registration center service component determining the current registration status of the registration center according to the results of multiple set operations, it may first determine whether the third operation set is empty. When it is determined 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, which means that during 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 registration center, and all instances have remained stable. Therefore, it can be determined that the current registration status of the registration center is the normal state, and the microservice system is in a stable and healthy state without the need for intervention or adjustment.

[0051] When it is determined 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 it is determined 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 registration center is the normal state. 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 registration center is the abnormal state.

[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 results of multiple set operations in detail, the current registration status of the registration center can be evaluated more accurately, so as to detect 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 results of multiple set operations.

[0054] If A5 is empty, it indicates that the data of A1 and A2 are consistent; if A5 is not empty and all the values of A5 belong to A1, it indicates 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 indicates 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 indicates 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 optional embodiment of the present invention, after determining the current registration status of the registration center according to the results of the multiple set operations, 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 the current registration status of the registration center is monitored to be abnormal. The self-healing waiting time can be the time from when the current registration status of the registration center is monitored to be abnormal to when the abnormal service instance is automatically recovered 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 registration center can be the error information or log record generated when the self-healing operation fails to be successfully completed due to certain reasons during the self-healing process of the registration center. The self-healing failure information of the registration center is used to indicate to re-execute the registration process for the registration center. The registration process can be the process in which the service provider registers its own service information in the registration center so that the service consumer can discover and call these services through the registration center.

[0058] In the embodiments of the present invention, after the registration center service component determines the current registration status of the registration center according to multiple set operation results, if it is determined that the current registration status of the registration center is an abnormal state, the registration center can start a self-healing process to automatically process the abnormal instances in the registration center and restore the registration center to a normal state. However, the self-healing process of the registration center cannot be carried out indefinitely. Therefore, the registration center service component can determine the self-healing waiting time of the registration center according to the self-healing process information of the registration center. Further, if the registration center fails to successfully complete self-healing within the self-healing waiting time, that is, self-healing fails, the registration center service component can generate the self-healing failure information of the registration center to be used to indicate to re-execute the registration process for the registration center. When the current registration status of the registration center is abnormal, through the self-healing process, the registration center can perform self-healing. Through the self-healing process, the registration center 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 performs various set operation processes on the current instance snapshot information set and the historical instance snapshot information set of the registration center to obtain multiple set operation results, and judges the current registration status of the registration center according to the multiple set operation results, which can accurately judge the state change of the service instance in the registration center, improve the accuracy of the registration center monitoring, and further ensure 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, enabling accurate monitoring of 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, various 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, so as to obtain 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 the registry, first, before the registry is published, the corresponding configuration information of the registry can be configured through the information configuration page provided by the registry service component. These configuration information may include information such as the address of the registry and the registry identifier, etc., for preparing for subsequent snapshot generation and obtaining data through the call interface.

[0067] Further, 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] Further, 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 credential of the registry. The login credential is a necessary basis for accessing the registry and can usually be a token or a key, which can be used for authentication and authorization. After obtaining the login credential through the login interface, the registry can use the login credential 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 may 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 may be sent by the service consumer to the registry for obtaining specific instance information. The registry identifier may be a mark or information used to uniquely identify the registry. The configuration information of the registry may be a series of parameters and options that need to be set when using the registry. Exemplarily, the configuration information of the registry may 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 corresponding configuration information of the 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 for comparing 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 credentials 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 credentials 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 authentication 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 credentials 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 embodiment of the present invention does 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 registration center, the registration center service component can call the instance information interface of the registration center based on the login credentials of the registration center. Further, the instance information of all instances in the application cluster of the registration center can be obtained through the instance information interface of the registration center, and used as the current instance snapshot information set of the registration center.

[0081] S250. Store the current instance snapshot information set of the registration center 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 registration center.

[0083] Correspondingly, after obtaining the current instance snapshot information set of the registration center, 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 the flowchart of a method for comparing instance information before and after the release of the registration center provided in the second embodiment 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 the registration center provided in the second embodiment 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 registration center, the registration center monitoring method may include the following steps:

[0085] Step 1. Generation of instance information snapshot

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

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

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

[0089] (4) 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, and uses it as the historical instance snapshot information set of the registration center.

[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 into 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 can be obtained, and the set of current instance snapshot information of the registry can be 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 stored by the registry for the 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 stored by the registry for the last time.

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

[0112] In an optional embodiment of the present invention, the obtaining the configuration information of the registry according to the registry identifier requested in the instance information request 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 request.

[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 operator 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 relatively 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 credentials of the registration center.

[0124] Step 4. 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.

[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 not the same, it can also indicate 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, and the current instance snapshot information set of the registration center is obtained and stored 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 the user's 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 achieve accurate monitoring of 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 for: 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 process on the first operation set and the second operation set to obtain a third operation set.

[0143] Optionally, the current registration status acquisition 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 and it is determined that some values of the third operation set belong to the current instance snapshot information set and 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 acquisition module 410 is specifically configured to: obtain the configuration information of the registration center according to the registration center identifier in the instance information acquisition 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 acquisition 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 acquisition request.

[0146] Optionally, the information set acquisition 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 acquisition 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 historically stored on the registry last time. 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 historically stored on the registry last time.

[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 the corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to 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 belongs to the scope to be protected by 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. Among them, 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 disk, an optical disc, 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 appropriate 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 a variety of 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-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 dedicated or general-purpose 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 dedicated computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are 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] In order to provide 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 interaction with the user; for example, the 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, speech input, or tactile input).

[0163] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., 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 to each other by any form or medium of digital data communication (e.g., a communication network). Examples of the communication network 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 via a communication network. The relationship between the client and the server is created by computer programs running on respective computers and having a client-server relationship with each other. The server can 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 the present disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and no limitation is made herein.

[0166] The above specific embodiments do not constitute a limitation on the protection scope of the present 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 principle of the present disclosure shall be included within the protection scope of the present disclosure.

Claims

1. A registration center monitoring method, characterized in that: Applicable to the registry service components, including: Obtaining a current instance snapshot information set of a registry center and a historical instance snapshot information set of the registry center; Performing multiple set operation processing on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results; The current registration status of the registration center is determined according to the multiple set operation results.

2. The method according to claim 1, characterized in that The performing of multiple set operation processing on the current instance snapshot information set and the historical instance snapshot information set to obtain multiple set operation results includes: 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 intersection processing on the current instance snapshot information set and the historical instance snapshot information set to obtain a second operation set; Performing a difference process on the first operation set and the second operation set to obtain a third operation set.

3. The method according to claim 2, characterized in that The determining the current registration status of the registration center according to the multiple set operation results includes: In the case of determining that the third operation set is empty, determining that the current registration state of the registration center is a normal state; In a case where 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, determining that the current registration state of the registration center is a normal state; In a case where 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, determining that the current registration state of the registration center is an abnormal state; When it is determined that the third operation set is not empty, and that a value portion of the third operation set belongs to the current instance snapshot information set, and when it is determined that a value portion of the third operation set belongs to the historical instance snapshot information set, the current registration state of the registration center is determined to be an abnormal state.

4. The method according to claim 1, characterized in that: Get the current instance snapshot information set of the registry, including: Acquire configuration information of the registry center according to the registry center identifier of the instance information acquisition request; 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, obtaining the instance information of all instances of the application cluster of the registry center, and obtaining the current instance snapshot information set of the registry center; The current instance snapshot information set of the registry is stored in the target database.

5. The method according to claim 4, characterized in that The historical instance snapshot information set includes the instance snapshot information set before the registration center publishes it; the step of acquiring the configuration information of the registration center according to the registration center identifier of the instance information acquisition request includes: Acquire the configuration information of the registry center according to the registry center identifier of the instance information acquisition request through the snapshot comparison interface of the registry center service component; Obtain a collection of historical instance snapshot information of the registry, including: Configuring corresponding configuration information for the registration center; 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, obtaining the instance information of all instances of the application cluster of the registry center, and obtaining a 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.

6. The method according to claim 4, characterized in that The historical instance snapshot information set includes the instance snapshot information set stored in the registry center last time; the step of obtaining the configuration information of the registry center according to the registry center identifier of the instance information acquisition request includes: Configuring corresponding configuration information for the registration center; The snapshot generation interface is executed periodically, and the configuration information of the registration center is obtained according to the registration 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.

7. The method according to claim 1, characterized in that After determining the current registration status of the registration center according to the multiple set operation results, the method further includes: In the case where 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; 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; The self-healing failure information of the registration center is used to instruct to re-execute the registration process for the registration center.

8. 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 that the at least one processor can execute the registration center monitoring method described in any one of claims 1-7.

9. 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 described in any one of claims 1-7 when executed.

10. 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 described in any one of claims 1-7 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

  • Load balancing implementation method and device, equipment and storage medium

    CN113934512A

  • Micro-service data processing method and device, computer equipment and storage medium

    CN113946491A

  • Service instance monitoring method and system and related equipment

    CN116302820A