Multi-center application multi-activity management system and method for metro MLC system
By applying multi-center multi-active management methods, the operating status of the subway MLC system is detected and shared, and automatic switching and resource synchronization is achieved, which solves the problem that the subway multi-line management system cannot operate simultaneously, and improves the efficiency and reliability of the system.
Patent Information
- Application Number
- CN202410991884.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-12-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The subway multi-line management system cannot operate at the same time as multiple nodes far apart, resulting in waste of resources and inability to switch in time when system failures, resulting in confusion in business processing.
The multi-center application and multi-active management method is adopted to detect the operating status through the resource detection service modules of local and related centers, generate and share status data, analyze the results and select and execute resource operation strategies, and realize automatic switching and resource synchronization.
The subway MLC system with multiple nodes is realized to operate simultaneously, avoid resource waste, ensure efficient and reliable system and work continuity, and avoid business chaos caused by single node failure.
Smart Images

Figure CN119071336A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of subway software management, and in particular relates to a multi-center application multi-active management system and method for a subway MLC system. Background Art
[0002] Early subway multi-line central computer systems (MLC) were run in single-node or master-slave mode. With the development of big data and cloud platform technology, subway multi-line management systems have begun to be deployed on cloud platforms. However, so far, subway multi-line management systems can only run on a single node, and it is impossible to achieve simultaneous operation of two subway multi-line management systems at distant nodes. For single-node operation, if the cloud platform and PaaS layer applications deployed on the node fail, the subway MLC system on the node will directly fail to work properly.
[0003] For dual-center deployment: In the dual-center active-standby switching mode, only one center’s cloud platform resources are in operation at the same time, and the subway MLC system of this center is operating normally and providing services; while the other cloud platform resources are in idle operation, and the subway MLC system of this center is also in idle operation, not really working and providing services, resulting in a large amount of resource waste. And the more subway centers there are, the more serious the resource waste.
[0004] Therefore, it is necessary to provide a mechanism or solution to enable the subway MLC system services of multiple centers to be in operation at the same time and provide services to the outside world. However, due to the long distance between system services and resources, such as middleware and database, it is impossible to run active-active and provide services as a whole. Therefore, only one center can provide complete services, and other centers synchronize data with this center, that is, operate in a similar master-slave mode. The subway MLC system services of all centers are uniformly connected to the cloud platform resources of a certain center. At this time, when the cloud platform resources of the center in use (including but not limited to middleware, database and network) fail, the system must be able to detect the failure in time and coordinate all subway MLC system services to switch to the healthy cloud platform resources of another center at the same time. If the health status of the cloud platform resources of each center cannot be detected in real time, or all services cannot be coordinated to switch uniformly at the same time, the business processing of the subway MLC system will be chaotic. Summary of the invention
[0005] In view of the above problems, the present invention provides a multi-center application multi-active management method for a subway MLC system, the management method comprising:
[0006] The resource detection service module of the local center detects the operation status of the resources of the local center and generates first operation status data;
[0007] The resource detection service module of the local center obtains the second operation status data sent by the resource detection service module of the associated center;
[0008] The resource detection service module of the local center analyzes the first operation status data and the second operation status data to obtain an analysis result;
[0009] The resource detection service module of the local center selects and executes the resource operation strategies of the local center and the associated centers according to the analysis results.
[0010] Furthermore, the first operating status data includes first middleware status data and first database status data.
[0011] Further, generating the first middleware status data includes:
[0012] The resource detection service module of the local center sends a verification message to the middleware module of the local center;
[0013] The resource detection service module of the local center receives the receipt message sent by the middleware module of the local center;
[0014] If the resource detection service module of the local center verifies that the message is sent successfully and receives a receipt message, the first middleware status data indicating that the middleware module status of the local center is normal is generated; otherwise, the first middleware status data indicating that the middleware module status of the local center is faulty is generated.
[0015] Further, generating the first database status data includes:
[0016] The resource detection service module of the local center accesses the database through the database client;
[0017] If the database can be accessed normally, first database status data indicating that the database status of the local center is normal is generated; otherwise, first database status data indicating that the database status of the local center is faulty is generated.
[0018] Furthermore, the management method also includes:
[0019] The resource detection service module of the local center detects the network connection status between the local center and the associated center;
[0020] If the network connection status is normal, the resource detection service module of the local center generates an analysis result indicating that the network is normal, and analyzes the first operation status data and the second operation status data; if the network connection status is faulty, the resource detection service module of the local center generates an analysis result indicating that the network is faulty, and selects and executes the resource operation strategy of the local center and the associated center based on the analysis results.
[0021] Furthermore, if the analysis result indicates that the network connection is normal and the local center is in a normal state, the resource operation strategy executed includes: the local center processes all business services of the local center and the associated center, and the database data of the local center and the associated center are synchronized;
[0022] If the analysis result indicates that the network connection is normal and the local center is in a fault state, the resource operation strategy to be executed includes: switching all business services of the local center and the associated center to the associated center for processing.
[0023] The present invention also provides a multi-center application multi-active management method for a subway MLC system, the management method comprising:
[0024] The resource detection service module of the association center detects the operation status of the local center resources and generates second operation status data;
[0025] The resource detection service module of the association center obtains the first operation status data sent by the resource detection service module of the local center;
[0026] The resource detection service module of the association center analyzes the first operation status data and the second operation status data to obtain an analysis result;
[0027] The resource detection service module of the association center selects and executes the resource operation strategies of the local center and the association center according to the analysis results.
[0028] Furthermore, the management method also includes:
[0029] The resource detection service module of the association center detects the network connection status between the local center and the association center;
[0030] If the network connection status is normal, the resource detection service module of the association center generates an analysis result indicating that the network is normal, and analyzes the first operation status data and the second operation status data; if the network connection status is faulty, the resource detection service module of the association center generates an analysis result indicating that the network is faulty, and selects and executes the resource operation strategies of the local center and the association center according to the analysis results.
[0031] The present invention also provides a multi-center application multi-active management system for a subway MLC system, wherein the management system includes a plurality of resource detection service modules, each of which is deployed in a corresponding center;
[0032] The resource detection service module is used to detect and generate resource operation status data of the center and related centers, and share resource operation status data with related centers; to analyze the shared resource operation status data to obtain analysis results; and to select and execute resource operation strategies based on the analysis results.
[0033] Furthermore, the resource detection service module of the local center is used to detect the operation status of the resources of the local center, generate first operation status data, and send the first operation status data to the resource detection service module of the associated center; to obtain the second operation status data sent by the resource detection service module of the associated center; to analyze the first operation status data and the second operation status data to obtain the analysis result; to select and execute the resource operation strategy of the local center and the associated center according to the analysis result;
[0034] The resource detection service module of the associated center is used to obtain the first operating status data sent by the resource detection service module of the local center; to detect the resource operating status of the local center and generate second operating status data; to analyze the first operating status data and the second operating status data to obtain analysis results; and to select and execute the resource operation strategies of the local center and the associated center based on the analysis results.
[0035] The beneficial effects of the present invention are:
[0036] 1. The management method and management system provided by the present invention realize the effect that two or more nodes of the subway MLC system can run and work at the same time, and realize the multi-center multi-active effect. In addition, in the event of a failure of the cloud platform and PaaS layer application, it can realize automatic control of the subway MLC system to complete the switching of related interfaces, ensuring the normal operation of the subway MLC system business services, and will not cause the subway MLC system to fail to work properly due to the failure of a single node of the cloud platform system and other PaaS layer applications.
[0037] 2. The management system provided by the present invention makes full use of the equipment and hardware investment of each node center, and will not waste the equipment and computing power of another node center because the business services are concentrated in a certain node center; and it multiplies the processing capacity of the subway MLC system, making the operation of the entire system more efficient and reliable.
[0038] 3. The management system provided by the present invention has the advantages of working continuity and high stability.
[0039] Other features and advantages of the present invention will be described in the following description, and partly become obvious from the description, or be understood by implementing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic diagram of a management method flow chart of Embodiment 1 of the present invention is shown;
[0042] Figure 2 A schematic diagram of a management method flow chart of Embodiment 2 of the present invention is shown;
[0043] Figure 3 A schematic diagram of the management system structure of Embodiment 3 of the present invention is shown;
[0044] Figure 4 A schematic diagram of a dual-center resource switching scenario according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Example 1
[0047] The embodiment of the present invention provides a multi-center application multi-active management method for a subway MLC system, such as Figure 1 As shown, the management method includes:
[0048] S1. The resource detection service module of the local center detects the operating status of the local center resources and generates first operating status data.
[0049] Specifically, the subway management system includes several centers, each of which is deployed with cloud platform resources and resource detection service modules.
[0050] The cloud platform resources are used to provide resources for application layer business services, including but not limited to middleware modules and databases. For example, the middleware modules include but are not limited to Kafka modules and Redis modules; the database uses but is not limited to Oracle database.
[0051] Furthermore, the resource detection service module of the local center is connected to the middleware module and database of the local center respectively, detects the operating status of the middleware module and database of the local center in real time, and obtains the operating status data of the local center resources, which is recorded as the first operating status data.
[0052] For example, a subway MLC system is deployed in each center, and the subway MLC system can be divided into multiple business services according to business functions. All business services in each center are simultaneously connected to the Kafka module, Redis module, and Oracle database of a center determined by the resource detection service. Each business service is decoupled through the Kafka of the center and shares data through the Redis of the center. The business data of the subway MLC system is stored in the Oracle database of the center.
[0053] The resource detection service module of the local center is connected to the Kafka module, Redis module and Oracle database of the local center to obtain the operating status of the Kafka module, Redis module and Oracle database of the local center in real time, which is recorded as the first operating status data.
[0054] Specifically, the first operating status data includes but is not limited to first middleware status data and first database status data.
[0055] Further, generating the first middleware status data includes:
[0056] S101, the resource detection service module of the local center sends a verification message to the middleware module of the local center;
[0057] S102, the resource detection service module of the local center receives a receipt message sent by the middleware module of the local center;
[0058] S103. If the resource detection service module of the local center verifies that the message is sent successfully and receives a receipt message, first middleware status data indicating that the status of the middleware module of the local center is normal is generated; otherwise, first middleware status data indicating that the status of the middleware module of the local center is faulty is generated.
[0059] Exemplarily, a topic Topic is created in the Kafka module of the local center, which is recorded as Topic_Local. The resource detection service module of the local center sends a verification message to the topic Topic_Local and receives a receipt message. If the verification message of the resource detection service module is sent successfully and the receipt message is obtained, the first middleware status data indicating that the status of the Kafka module of the local center is normal is generated; otherwise, the first middleware status data indicating that the status of the Kafka module of the local center is faulty is generated.
[0060] For another example, a key Key is created in the Redis module of the local center, recorded as Key_Local. After the resource detection service module of the local center writes data to the key Key_Local once, it reads the data in the key Key_Local. If the resource detection service module of the local center writes the data successfully and can read the written data, the first middleware status data indicating that the status of the Redis module of the local center is normal is generated; otherwise, the first middleware status data indicating that the status of the Redis module of the local center is faulty is generated.
[0061] Further, generating the first database status data includes:
[0062] S111, the resource detection service module of the local center accesses the database of the local center through the database client;
[0063] S112. If the database can be accessed normally, first database status data indicating that the database status of the local center is normal is generated; otherwise, first database status data indicating that the database status of the local center is faulty is generated.
[0064] Exemplarily, the resource detection service module of the local center connects to the Oracle database through the Oracle client. If the Oracle client can connect and query the Oracle database normally, the first database status data indicating that the Oracle database status is normal is generated; otherwise, the first database status data indicating that the Oracle database status is faulty is generated.
[0065] Furthermore, the database of the local center and the database of the association center adopt a master-slave switching mode.
[0066] Exemplarily, the Oracle database of Center A and the Oracle database of Center B use DG (Data Guard) technology to implement the master-slave switching mode. Among the Oracle databases of Center A and Center B, one database serves as the master database, and the other databases serve as the standby databases. The master database records the data modification operations generated by all business services of the cloud platform; the standby database does not directly connect to record the data generated by the business services of the cloud platform, but copies these modification operations by using the log files of the master database and executes them on the standby database to ensure the data consistency of the master and standby databases. And through the query operation of the Oracle client, it can be determined whether the current Oracle database is the master database or the standby database.
[0067] S2. The resource detection service module of the local center obtains the second operation status data sent by the resource detection service module of the associated center.
[0068] Specifically, according to the actual distance between the centers, two or more adjacent centers are set to be associated, that is, one of the centers is the local center, and the other centers are associated centers of the local center. The resource detection service module of the associated center is connected to the middleware module, database and resource detection service module of the local center respectively, and the operation status data of the local center resources is obtained in real time, which is recorded as the second operation status data.
[0069] Specifically, the second operating status data includes but is not limited to second middleware status data and second database status data.
[0070] Furthermore, the method for generating the second middleware status data includes:
[0071] S201, the resource detection service module of the association center sends a verification message to the middleware module of the local center;
[0072] S202, the resource detection service module of the association center receives a receipt message sent by the middleware module of the local center;
[0073] S203. If the resource detection service module of the associated center verifies that the message is sent successfully and receives a receipt message, it generates second middleware status data indicating that the status of the middleware module of the local center is normal; otherwise, it generates second middleware status data indicating that the status of the middleware module of the local center is faulty.
[0074] Exemplarily, a topic Topic is created in the Kafka module of the local center, which is recorded as Topic_Remote. The resource detection service module of the association center sends a verification message to the topic Topic_Remote and receives a receipt message. If the verification message of the resource detection service module of the association center is successfully sent and the receipt message is obtained, the second middleware status data indicating that the status of the Kafka module of the local center is normal is generated; otherwise, the second middleware status data indicating that the status of the Kafka module of the local center is faulty is generated.
[0075] It should be noted that when detecting the running status of the Kafka module in the local center, the Kafka module in the local center needs to create two topics, which are recorded as Topic_Local and Topic_Remote. Topic_Local is used to connect to the resource detection service module in the local center, and Topic_Remote is used to connect to the resource detection service module in the associated center. Each topic is accessed by only one service to avoid mutual interference, ensure the most basic access, and ensure accurate detection results.
[0076] For another example, a key Key is created in the Redis module of the local center, recorded as Key_Remote. After the resource detection service module of the associated center writes data to the key Key_Remote once, it reads the data in the key Key_Remote. If the resource detection service module of the associated center writes the data successfully and can read the written data, the second middleware status data indicating that the status of the Redis module of the local center is normal is generated; otherwise, the second middleware status data indicating that the status of the Redis module of the local center is faulty is generated.
[0077] Similarly, when detecting the running status of the Redis module in the local center, the Redis module needs to create two keys, which are recorded as Key_Local and Key_Remote. Key_Local is used to connect to the resource detection service module in the local center, and Key_Remote is used to connect to the resource detection service module in the associated center. Each key is accessed by only one service to avoid mutual interference, ensure the most basic access, and ensure accurate detection results.
[0078] Furthermore, the method for generating the second database status data includes:
[0079] S211, the resource detection service module of the association center accesses the database of the local center through the database client of the local center;
[0080] S212. If the database of the local center can be normally connected and accessed, second database status data indicating that the database status of the local center is normal is generated; otherwise, second database status data indicating that the database status of the local center is faulty is generated.
[0081] Exemplarily, the resource detection service module of the association center connects to the Oracle database of the local center through the Oracle client of the local center. If the Oracle client of the local center can normally connect to and query the Oracle database of the local center, the second database status data indicating that the status of the Oracle database of the local center is normal is generated; otherwise, the second database status data indicating that the status of the Oracle database of the local center is faulty is generated.
[0082] Furthermore, the resource detection service module of the local center is connected to the resource detection service module of the associated center, and the operating status data acquired and generated by each of them are shared.
[0083] Exemplarily, center A and center B are set to an association relationship, where center A is the local center and center B is the association center. The resource detection service module of center A and the resource detection service module of center B are respectively interconnected with the Kafka module, Redis module and Oracle database of center A, and the Kafka module, Redis module and Oracle database of center B. The resource detection service of center A obtains the operating status data of the resources of center A, which is recorded as the first operating status data; the resource detection service of center B obtains the operating status data of the resources of center A, which is recorded as the second operating status data. The resource detection service module of center A shares the first operating status data with the resource detection service module of center B; the resource detection service module of center B shares the second operating status data with the resource detection service module of center A.
[0084] It should be noted that the number of associated centers associated with the local center can be 1 or multiple, which is not limited here. When the number of associated centers is greater than 1, the operating status data of the local center obtained by each associated center can be recorded as the second operating status data. The local center can arbitrarily obtain the second operating status data sent by one or more associated centers, or obtain the second operating status data sent by all associated centers.
[0085] Furthermore, the management method also includes:
[0086] S21, the resource detection service module of the local center detects the network connection status between the local center and the associated center;
[0087] S22. If the network connection status is normal, the resource detection service module of the local center generates an analysis result indicating that the network is normal, and continues to execute step S3; if the network connection status is faulty, the resource detection service module of the local center generates an analysis result indicating that the network is faulty, and directly executes step S4.
[0088] For example, the resource detection service module of center A and the resource detection service module of center B are configured with external port number: 30080. Then the resource detection service module of center A accesses the server address 172.120.1.5:30080 of center B; the resource detection service module of center B accesses the server address 172.110.1.5:30080 of center A. If they can access each other, it means that the network connection between center A and center B is normal. If they cannot access each other, it means that the network connection between center A and center B is disconnected.
[0089] Preferably, the detecting the network connection status between the local center and the associated center includes:
[0090] S221, the resource detection service module of the local center sends a network access request to the middleware module of the association center, and obtains a first request receipt signal;
[0091] S222: The resource detection service module of the local center sends a network access request to the database of the association center and obtains a second request receipt signal;
[0092] S223, the resource detection service module of the local center sends a network access request to the resource detection service module of the associated center, and obtains a third request receipt signal;
[0093] S224. The resource detection service module of the local center analyzes the first request receipt signal, the second request receipt signal and the third request receipt signal; if the first request receipt signal, the second request receipt signal and the third request receipt signal all indicate that the request for access failed, an analysis result indicating a network failure is generated; if the first request receipt signal, the second request receipt signal and the third request receipt signal all indicate that the request for access is successful, an analysis result indicating that the network is normal is generated; if one or two of the first request receipt signal, the second request receipt signal and the third request receipt signal indicate that the request for access is successful, and the remaining receipt signals indicate that the request for access failed, S221-S223 are repeated, and a prompt signal of a partial network connection failure is issued.
[0094] By verifying the network connection status between the local center's resource detection service module and the associated center's middleware module, database, and resource detection service module, the network connection status between the local center and the associated center is analyzed as a whole. Ensure that the network status analysis results are accurate to avoid the situation where the cloud platform and the subway MLC system cannot work properly due to network delays or partial business service failures.
[0095] Before obtaining the second operation status data sent by the associated center, the local center resource detection service module first detects the network connection status between the local center and the associated center. If the network connection between the local center and the associated center is normal, the operation status of the local center will continue to be analyzed; if the network connection between the local center and the associated center fails, the corresponding resource operation decision will be executed.
[0096] S3. The resource detection service module of the local center analyzes the first operation status data and the second operation status data to obtain an analysis result.
[0097] Specifically, the first operating status data is the operating status data generated by the resource detection service module of the local center detecting the operating status of the cloud platform resources of the local center, and the second operating status data is the operating status data generated by the resource detection service module of the associated center detecting the operating status of the cloud platform resources of the local center.
[0098] If both the first operating status data and the second operating status data are normal, the analysis result indicates that the local center is in a normal state.
[0099] If both the first operation status data and the second operation status data indicate a fault, the analysis result indicates that the local center is in a fault state.
[0100] If the first operation status data and the second operation status data are different, the analysis result indicates that the local center status is pending.
[0101] The resource detection service module of the local center and the resource detection service module of the associated center simultaneously detect the operating status of the local center, and compare and analyze the two detection results to determine the actual operating status of the local center and ensure the accuracy of the detection results.
[0102] It should be noted that when the number of associated centers is greater than 1, the operating status data of the local center obtained by each associated center can be recorded as the second operating status data. The local center can arbitrarily obtain the second operating status data sent by one or more associated centers, or can obtain the second operating status data sent by all associated centers. When multiple second operating status data are obtained, one second operating status data can be selected from the multiple second operating status data for analysis with the first operating status data. For example, one of the second operating status data can be arbitrarily selected, or the second operating status data with a high frequency of the same data content can be selected. The present invention does not limit the specific method of selecting a second operating status data for analysis from multiple second operating status data.
[0103] S4. The resource detection service module of the local center selects and executes the resource operation strategies of the local center and the associated centers according to the analysis results.
[0104] Specifically, if the analysis result is a network failure, the resource operation strategy executed includes: if the database of the local center is the primary database, all business services of the local center are processed by the local center resources, and the business services of the associated center are suspended; if the database of the local center is the backup database, the business services of the local center are suspended.
[0105] For example, when the resource detection service module of center A finds that the network access requests to the Kafka module, Redis module, Oracle database and resource detection service module of center B have all failed, it means that the network connection between center A and center B is disconnected. If the Oracle database of center A is the primary database, the resource detection service module of center A guides all business services of the subway MLC system of center A to connect to the Kafka module, Redis module and Oracle database of center A, and center A continues to process all business services of the subway MLC system of center A. If the Oracle database of center A is a standby database, since the standby database cannot write data directly, the resource detection service module of center A guides all business services of the subway MLC system of center A to stop data processing.
[0106] Furthermore, if the analysis result indicates that the network connection is normal and the local center is in normal state, the resource operation strategy executed includes: the local center processes all business services of the local center and the associated center, and the database data of the local center and the associated center are synchronized.
[0107] If the analysis result indicates that the network connection is normal and the local center is in a faulty state, the resource operation strategy to be executed includes: switching all business services of the local center and the associated center to the associated center for processing.
[0108] For example, Figure 4 As shown, initially, Center A is the local center and Center B is the associated center. All business services of the subway MLC system of Center A and Center B are connected to the Kafka module, Redis module and Oracle database of Center A; the resource detection service modules of Center A and Center B detect the operating status of the Kafka module, Redis module and Oracle database of Center A in real time, and synchronize the resource operating status information obtained by each in real time. The Kafka module, Redis module and Oracle database of the associated center are synchronized with the local center in real time through the data synchronization mechanism, so as to ensure that when the local center fails, the subway MLC system is switched to the Kafka module, Redis module and Oracle database of the associated center, and can also obtain the latest status and data and maintain normal operation.
[0109] When any one or more resources in the Kafka module, Redis module and Oracle database of Center A fail, the first operation status data obtained by the resource detection service module of Center A and the second operation status data obtained by the resource detection service module of Center B both indicate that the resources of Center A fail. At this time, the resource detection service modules of Center A and Center B simultaneously send resource switching messages to all subway MLC system business services of Center A and Center B, so that all subway MLC system business services of Center A and Center B switch to the Kafka module, Redis module and Oracle database of Center B, and all subway MLC system business services of Center A and Center B are processed by the resources of Center B.
[0110] After the resource switching is completed, it can be considered that center B becomes the local center, and center A becomes the associated center. When the resource status of center A returns to normal, it can serve as the associated center of center B and provide backup resources. This makes the system have the advantages of work continuity and high stability.
[0111] Further, if the first operating status data and the second operating status data are inconsistent, that is, the analysis result indicates that the local center status is pending, and steps S1 to S3 are repeated.
[0112] For example, when the first operating status data obtained by the resource detection service module of center A indicates that the Kafka module of center A has a fault, and the second operating status data obtained by the resource detection service module of center B indicates that the Kafka module of center A is normal, no resource switching operation is performed at this time, and the resource detection service modules of centers A and B continue to repeatedly detect the operating status of the Kafka module of center A.
[0113] It should be noted that when there are multiple associated centers of the local center, resource switching priorities can be set for multiple associated centers. For example, Center A is the local center, Center B and Center C are both associated centers of Center A, and Center B has a higher priority than Center C. When the cloud platform resources of Center A fail, all subway MLC system business services of Center A, Center B and Center C will be connected to Center B first.
[0114] The management method provided by the embodiment of the present invention can ensure the overall switching of the subway MLC system, thereby avoiding the situation where the subway MLC system cannot work normally due to the misjudgment operation of a single application. The present invention makes full use of the equipment and hardware investment of each node center, and does not waste the equipment and computing power of another node center because the business services are concentrated in a certain node center; and it multiplies the processing capacity of the subway MLC system, making the operation of the entire system more efficient and reliable.
[0115] Example 2
[0116] The embodiment of the present invention provides a multi-center application multi-active management method for a subway MLC system, such as Figure 2 As shown, the management method includes:
[0117] S1. The resource detection service module of the association center detects the operation status of the local center resources and generates second operation status data.
[0118] Specifically, the subway management system includes several centers. According to the actual distance between the centers, two or more adjacent centers are set to be associated, that is, one of the centers is the local center, and the other centers are associated centers of the local center.
[0119] Each center is deployed with cloud platform resources and resource detection service modules.
[0120] The cloud platform resources are used to provide resources for application layer business services, including but not limited to middleware modules and databases. For example, the middleware modules include but are not limited to Kafka modules and Redis modules; the database uses but is not limited to Oracle database.
[0121] For example, a subway MLC system is deployed in each center, and the subway MLC system can be divided into multiple business services according to business functions. All business services in each center are connected to the Kafka module, Redis module and Oracle database of one center at the same time. Each business service is decoupled by Kafka into multiple microservices, and data is shared through the Redis module. The business data of the subway MLC system is stored in the Oracle database.
[0122] Specifically, the resource detection service module of the association center is connected to the middleware module, database and resource detection service module of the local center respectively, and the operation status data of the local center resources is obtained in real time, which is recorded as the second operation status data.
[0123] Specifically, the second operating status data includes but is not limited to second middleware status data and second database status data.
[0124] Further, generating the second middleware status data includes:
[0125] S101, the resource detection service module of the association center sends a verification message to the middleware module of the local center;
[0126] S102, the resource detection service module of the association center receives a receipt message sent by the middleware module of the local center;
[0127] S103. If the resource detection service module of the associated center verifies that the message is sent successfully and receives a receipt message, it generates second middleware status data indicating that the status of the middleware module of the local center is normal; otherwise, it generates second middleware status data indicating that the status of the middleware module of the local center is faulty.
[0128] Exemplarily, a topic Topic is created in the Kafka module of the local center, which is recorded as Topic_Remote. The resource detection service module of the association center sends a verification message to the topic Topic_Remote and receives a receipt message. If the verification message of the resource detection service module of the association center is successfully sent and the receipt message is obtained, the second middleware status data indicating that the status of the Kafka module of the local center is normal is generated; otherwise, the second middleware status data indicating that the status of the Kafka module of the local center is faulty is generated.
[0129] For another example, the Redis module of the local center creates a key Key, recorded as Key_Remote. After the resource detection service module of the associated center writes data to the key Key_Remote once, it reads the data in Key_Remote. If the resource detection service module of the associated center writes the data successfully and can read the written data, the second middleware status data indicating that the status of the Redis module of the local center is normal is generated; otherwise, the second middleware status data indicating that the status of the Redis module of the local center is faulty is generated.
[0130] Further, generating the second database status data includes:
[0131] S111, the resource detection service module of the association center accesses the database of the local center through the database client of the local center;
[0132] S112. If the database of the local center can be normally connected and accessed, second database status data indicating that the database status of the local center is normal is generated; otherwise, second database status data indicating that the database status of the local center is faulty is generated.
[0133] Exemplarily, the resource detection service module of the association center connects to the Oracle database of the local center through the Oracle client of the local center. If the Oracle client of the local center can normally connect to and query the Oracle database of the local center, the second database status data indicating that the status of the Oracle database of the local center is normal is generated; otherwise, the second database status data indicating that the status of the Oracle database of the local center is faulty is generated.
[0134] S2. The resource detection service module of the associated center obtains first operation status data sent by the resource detection service module of the local center.
[0135] Specifically, the resource detection service module of the local center is connected to the middleware module and the database of the local center respectively, detects the operation status of the middleware module and the database of the local center in real time, and obtains the operation status data of the local center, which is recorded as the first operation status data.
[0136] Specifically, the first operating status data includes but is not limited to first middleware status data and first database status data.
[0137] Further, generating the first middleware status data includes:
[0138] S201, the resource detection service module of the local center sends a verification message to the middleware module of the local center;
[0139] S202, the resource detection service module of the local center receives a receipt message sent by the middleware module of the local center;
[0140] S203. If the resource detection service module of the local center verifies that the message is sent successfully and receives a receipt message, first middleware status data indicating that the status of the middleware module of the local center is normal is generated; otherwise, first middleware status data indicating that the status of the middleware module of the local center is faulty is generated.
[0141] Exemplarily, a topic Topic is created in the Kafka module of the local center, which is recorded as Topic_Local. The resource detection service module of the local center sends a verification message to the topic Topic_Local and receives a receipt message. If the verification message of the resource detection service module is sent successfully and the receipt message is obtained, the first middleware status data indicating that the status of the Kafka module of the local center is normal is generated; otherwise, the first middleware status data indicating that the status of the Kafka module of the local center is faulty is generated.
[0142] It should be noted that when detecting the running status of the Kafka module in the local center, the Kafka module needs to create two topics, which are recorded as Topic_Local and Topic_Remote. Topic_Local is used to connect to the resource detection service module of the local center, and Topic_Remote is used to connect to the resource detection service module of the associated center. Each topic is accessed by only one service to avoid mutual interference, ensure the most basic access, and ensure accurate detection results.
[0143] For another example, a key Key is created in the Redis module of the local center, recorded as Key_Local. After the resource detection service module of the local center writes data to the key Key_Local once, it reads the data in the key Key_Local. If the resource detection service module of the local center writes the data successfully and can read the written data, the first middleware status data indicating that the status of the Redis module of the local center is normal is generated; otherwise, the first middleware status data indicating that the status of the Redis module of the local center is faulty is generated.
[0144] Similarly, when detecting the running status of the Redis module in the local center, the Redis module needs to create two keys, which are recorded as Key_Local and Key_Remote. Key_Local is used to connect to the resource detection service module in the local center, and Key_Remote is used to connect to the resource detection service module in the associated center. Each key is accessed by only one service to avoid mutual interference, ensure the most basic access, and ensure accurate detection results.
[0145] Further, generating the first database status data includes:
[0146] S211, the resource detection service module of the local center accesses the database through the database client;
[0147] S212: If the database can be accessed normally, first database status data indicating that the database status of the local center is normal is generated; otherwise, first database status data indicating that the database status of the local center is faulty is generated.
[0148] Exemplarily, the resource detection service module of the local center connects to the Oracle database through the Oracle client. If the Oracle client can connect and query the Oracle database normally, the first database status data indicating that the Oracle database status is normal is generated; otherwise, the first database status data indicating that the Oracle database status is faulty is generated.
[0149] Furthermore, the database of the local center and the database of the association center adopt a master-slave switching mode.
[0150] Exemplarily, the Oracle database of Center A and the Oracle database of Center B use DG (Data Guard) technology to implement the master-slave switching mode. Among the Oracle databases of Center A and Center B, one database serves as the master database, and the other databases serve as the standby databases. The master database records the data modification operations generated by all business services of the cloud platform; the standby database does not directly connect to record the data generated by the business services of the cloud platform, but copies these modification operations by using the log files of the master database and executes them on the standby database to ensure the data consistency of the master and standby databases. And through the query operation of the Oracle client, it can be determined whether the current Oracle database is the master database or the standby database.
[0151] Furthermore, the resource detection service module of the association center is connected to the resource detection service module of the local center, and the operation status data obtained by each of them are shared.
[0152] Exemplarily, center A and center B are set to an association relationship, where center A is the local center and center B is the association center. The resource detection service module of center A and the resource detection service module of center B are respectively interconnected with the Kafka module, Redis module and Oracle database of center A, and the Kafka module, Redis module and Oracle database of center B. The resource detection service of center A obtains the operating status data of the resources of center A, which is recorded as the first operating status data; the resource detection service of center B obtains the operating status data of the resources of center A, which is recorded as the second operating status data. The resource detection service module of center A shares the first operating status data with the resource detection service module of center B; the resource detection service module of center B shares the second operating status data with the resource detection service module of center A.
[0153] Furthermore, the management method also includes:
[0154] S21, the resource detection service module of the association center detects the network connection status between the local center and the association center;
[0155] S22. If the network connection status is normal, the resource detection service module of the association center generates an analysis result indicating that the network is normal, and continues to execute step S3; if the network connection status is faulty, the resource detection service module of the association center generates an analysis result indicating that the network is faulty, and directly executes step S4.
[0156] For example, the resource detection service module of center A and the resource detection service module of center B are configured with external port number: 30080. Then the resource detection service module of center A accesses the server address 172.120.1.5:30080 of center B; the resource detection service module of center B accesses the server address 172.110.1.5:30080 of center A. If they can access each other, it means that the network connection between center A and center B is normal. If they cannot access each other, it means that the network connection between center A and center B is disconnected.
[0157] Preferably, the detecting the network connection status between the local center and the associated center includes:
[0158] S221, the resource detection service module of the association center sends a network access request to the middleware module of the local center, and obtains a first request receipt signal;
[0159] S222: The resource detection service module of the association center sends a network access request to the database of the local center and obtains a second request receipt signal;
[0160] S223, the resource detection service module of the association center sends a network access request to the resource detection service module of the local center, and obtains a third request receipt signal;
[0161] S224. The resource detection service module of the association center analyzes the first request receipt signal, the second request receipt signal and the third request receipt signal; if the first request receipt signal, the second request receipt signal and the third request receipt signal all indicate that the request access failed, an analysis result indicating a network failure is generated; if the first request receipt signal, the second request receipt signal and the third request receipt signal all indicate that the request access was successful, an analysis result indicating that the network is normal is generated; if one or two of the first request receipt signal, the second request receipt signal and the third request receipt signal indicate that the request access was successful, and the remaining receipt signals indicate that the request access failed, S221-S223 are repeated, and a prompt signal of a partial network connection failure is issued.
[0162] By verifying the network connection status between the resource detection service module of the association center and the local center middleware module, database and resource detection service module, the network connection status between the local center and the association center is analyzed as a whole. Ensure that the network status analysis results are accurate to avoid the situation where the cloud platform and the subway MLC system cannot work properly due to network delays or partial business service failures.
[0163] Before analyzing the operation status of the local center resources, the associated center resource detection service module first detects the network connection status between the local center and the associated center. If the network connection between the local center and the associated center is normal, it continues to analyze the operation status of the local center resources; if the network connection between the local center and the associated center fails, it executes the corresponding resource operation decision.
[0164] S3. The resource detection service module of the correlation center analyzes the first operation status data and the second operation status data to obtain an analysis result.
[0165] Specifically, the first operating status data is the operating status data generated by the resource detection service module of the local center detecting the operating status of the cloud platform resources of the local center, and the second operating status data is the operating status data generated by the resource detection service module of the associated center detecting the operating status of the cloud platform resources of the local center.
[0166] If both the first operating status data and the second operating status data are normal, the analysis result indicates that the local center is in a normal state.
[0167] If both the first operation status data and the second operation status data indicate a fault, the analysis result indicates that the local center is in a fault state.
[0168] If the first operation status data and the second operation status data are different, the analysis result indicates that the local center status is pending.
[0169] The resource detection service module of the local center and the resource detection service module of the associated center simultaneously detect the operating status of the local center, and compare and analyze the two detection results to determine the actual operating status of the local center and ensure the accuracy of the detection results.
[0170] S4. The resource detection service module of the association center selects and executes the resource operation strategies of the local center and the association center according to the analysis results.
[0171] Specifically, if the analysis result is a network failure, the resource operation strategy executed includes: if the database of the association center is the primary database, the association center handles all business services of the association center, and the business services of the local center are suspended; if the database of the association center is the backup database, the business services of the association center are suspended.
[0172] Exemplarily, when the resource detection service module of Center B finds that the network access requests to Center A's Kafka module, Redis module, Oracle database, and resource detection service module have all failed, it means that the network connection between Center A and Center B is disconnected. If the Oracle database of Center B is the primary database, the resource detection service module of Center B guides all business services of Center B's subway MLC system to connect to Center B's Kafka module, Redis module, and Oracle database. Center B continues to process all business services of Center B's subway MLC system. If the Oracle database of Center B is a standby database, since the standby database cannot write data directly, the resource detection service module of Center B guides all business services of Center B's subway MLC system to stop data processing.
[0173] Furthermore, if the analysis result indicates that the network connection is normal and the local center is in normal state, the resource operation strategy executed includes: the local center processes all business services of the local center and the associated center, and the database data of the local center and the associated center are synchronized.
[0174] If the analysis result indicates that the network connection is normal and the local center is in a faulty state, the resource operation strategy to be executed includes: the associated center processes all business services of the local center and the associated center.
[0175] For example, Figure 4 As shown, initially, center A is the local center and center B is the associated center. All business services of the subway MLC system of centers A and B are connected to the Kafka module, Redis module and Oracle database of center A; the resource detection service modules of centers A and B detect the operating status of the Kafka module, Redis module and Oracle database of center A in real time, and synchronize the resource operating status information obtained by each in real time. When any one or more resources in the Kafka module, Redis module and Oracle database of center A fail, the first operating status data obtained by the resource detection service module of center A and the second operating status data obtained by the resource detection service module of center B both indicate that the resources of center A fail. At this time, the resource detection service modules of centers A and B simultaneously send resource switching messages to all subway MLC system business services of centers A and B, so that all subway MLC system business services of centers A and B switch to the Kafka module, Redis module and Oracle database of center B, and all business services of the subway MLC system of centers A and B are processed by the resources of center B.
[0176] After the resource switching is completed, it can be considered that center B becomes the local center, and center A becomes the associated center. When the resource status of center A returns to normal, it can serve as the associated center of center B and provide backup resources. This makes the system have the advantages of work continuity and high stability.
[0177] Further, if the first operating status data and the second operating status data are inconsistent, that is, the analysis result indicates that the local center status is pending, and steps S1 to S3 are repeated.
[0178] For example, when the first operating status data obtained by the resource detection service module of center A indicates that the Kafka module of center A has a fault, and the second operating status data obtained by the resource detection service module of center B indicates that the Kafka module of center A is normal, no resource switching operation is performed at this time, and the resource detection service modules of centers A and B continue to redetect the operating status of the Kafka module of center A.
[0179] It should be noted that when there are multiple associated centers of the local center, resource switching priorities can be set for multiple associated centers. For example, Center A is the local center, Center B and Center C are both associated centers of Center A, and Center B has a higher priority than Center C. When the cloud platform resources of Center A fail, all subway MLC system business services of Center A, Center B and Center C will be connected to Center B first.
[0180] The management method provided by the embodiment of the present invention can ensure the overall switching of the subway MLC system, thereby avoiding the situation where the subway MLC system cannot work normally due to the misjudgment operation of a single application. The present invention makes full use of the equipment and hardware investment of each node center, and will not waste the equipment and computing power of another node center due to the work of a single node center; and it multiplies the processing capacity of the subway MLC system, making the operation of the entire system more efficient and reliable.
[0181] Example 3
[0182] The embodiment of the present invention provides a multi-center application multi-active management system for a subway MLC system, such as Figure 3 As shown, the management system includes several resource detection service modules, and each resource detection service module is deployed in a corresponding center.
[0183] Specifically, the subway management system includes several centers. According to the actual distance between the centers, two or more adjacent centers are set to be associated, that is, one of the centers is the local center, and the other centers are associated centers of the local center.
[0184] Each center is deployed with cloud platform resources, which are used to provide resources for application layer business services, including but not limited to middleware modules and databases. For example, the middleware modules include but are not limited to Kafka modules and Redis modules; the database uses but is not limited to Oracle database.
[0185] The resource detection service module is used to detect and generate resource operation status data of the center and related centers, and share resource operation status data with related centers; to analyze the shared resource operation status data to obtain analysis results; and to select and execute resource operation strategies based on the analysis results.
[0186] Specifically, the resource detection service module of the local center is used to detect the operating status of the local center resources, generate first operating status data, and send the first operating status data to the resource detection service module of the associated center; to obtain the second operating status data sent by the resource detection service module of the associated center; to analyze the first operating status data and the second operating status data to obtain analysis results; and to select and execute the resource operation strategies of the local center and the associated center based on the analysis results.
[0187] The resource detection service module of the associated center is used to obtain the first operating status data sent by the resource detection service module of the local center; to detect the resource operating status of the local center and generate second operating status data; to analyze the first operating status data and the second operating status data to obtain analysis results; and to select and execute the resource operation strategies of the local center and the associated center based on the analysis results.
[0188] For example, Figure 4As shown, initially, center A is the local center and center B is the associated center. All business services of the subway MLC system of centers A and B are connected to the Kafka module, Redis module and Oracle database of center A; the resource detection service modules of centers A and B detect the operating status of the Kafka module, Redis module and Oracle database of center A in real time, and synchronize the resource operating status information obtained by each in real time. When any one or more resources in the Kafka module, Redis module and Oracle database of center A fail, the first operating status data obtained by the resource detection service module of center A and the second operating status data obtained by the resource detection service module of center B both indicate that the resources of center A fail. At this time, the resource detection service modules of centers A and B simultaneously send resource switching messages to all subway MLC system business services of centers A and B, so that all subway MLC system business services of centers A and B switch to the Kafka module, Redis module and Oracle database of center B, and all business services of the subway MLC system of centers A and B are processed by the resources of center B.
[0189] After the resource switching is completed, it can be considered that center B becomes the local center, and center A becomes the associated center. When the resource status of center A returns to normal, it can serve as the associated center of center B and provide backup resources. This makes the system have the advantages of work continuity and high stability.
[0190] If the first running status data obtained by the resource detection service module of center A is inconsistent with the second running status data obtained by the resource detection service module of center B, the analysis result indicates that the status of the local center is pending. For example, if the first running status data obtained by the resource detection service module of center A indicates that the Kafka module of center A is faulty, and the second running status data obtained by the resource detection service module of center B indicates that the Kafka module of center A is normal, then no resource switching operation is performed, and the resource detection service modules of centers A and B continue to re-detect the running status of the Kafka module of center A.
[0191] It should be noted that when there are multiple associated centers of the local center, resource switching priorities can be set for multiple associated centers. For example, Center A is the local center, and Centers B and C are both associated centers of Center A. The priority of Center B is set higher than that of Center C. When the cloud platform resources of Center A fail, all subway MLC system business services of Centers A, B, and C will be connected to Center B first.
[0192] The management system provided by the embodiment of the present invention can ensure the overall switching of the subway MLC system, thereby avoiding the situation where the subway MLC system cannot work normally due to the misjudgment operation of a single application. The present invention makes full use of the equipment and hardware investment of each node center, and will not waste the equipment and computing power of another node center due to the work of a single node center; and it multiplies the processing capacity of the subway MLC system, making the operation of the entire system more efficient and reliable.
[0193] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-center application multi-active management method for a subway MLC system, characterized in that: The management method comprises: The resource detection service module of the local center detects the operation status of the resources of the local center and generates first operation status data; The resource detection service module of the local center obtains the second operation status data sent by the resource detection service module of the associated center; The resource detection service module of the local center analyzes the first operation status data and the second operation status data to obtain an analysis result; The resource detection service module of the local center selects and executes the resource operation strategies of the local center and the associated centers according to the analysis results.
2. A multi-center application multi-active management method for a subway MLC system according to claim 1, characterized in that: The first running status data includes first middleware status data and first database status data.
3. The multi-center application multi-active management method for a subway MLC system according to claim 2 is characterized in that: Generating the first middleware status data includes: The resource detection service module of the local center sends a verification message to the middleware module of the local center; The resource detection service module of the local center receives the receipt message sent by the middleware module of the local center; If the resource detection service module of the local center verifies that the message is sent successfully and receives a receipt message, the first middleware status data indicating that the middleware module status of the local center is normal is generated; otherwise, the first middleware status data indicating that the middleware module status of the local center is faulty is generated.
4. The multi-center application multi-active management method for a subway MLC system according to claim 2 is characterized in that: Generating the first database status data includes: The resource detection service module of the local center accesses the database of the local center through the database client; If the database can be accessed normally, first database status data indicating that the database status of the local center is normal is generated; otherwise, first database status data indicating that the database status of the local center is faulty is generated.
5. The multi-center application multi-active management method for a subway MLC system according to claim 1 is characterized in that: The management method also includes: The resource detection service module of the local center detects the network connection status between the local center and the associated center; If the network connection status is normal, the resource detection service module of the local center generates an analysis result indicating that the network is normal, and analyzes the first operation status data and the second operation status data; if the network connection status is faulty, the resource detection service module of the local center generates an analysis result indicating that the network is faulty, and selects and executes the resource operation strategy of the local center and the associated center based on the analysis results.
6. The multi-center application multi-active management method for a subway MLC system according to claim 1, characterized in that: If the analysis result indicates that the network connection is normal and the local center is in a normal state, the resource operation strategy executed includes: the local center resources process all business services of the local center and the associated center, and the database data of the local center and the associated center are synchronized; If the analysis result indicates that the network connection is normal and the local center is in a fault state, the resource operation strategy to be executed includes: switching all business services of the local center and the associated center to the associated center for processing.
7. A multi-center application multi-active management method for a subway MLC system, characterized in that: The management method comprises: The resource detection service module of the association center detects the operation status of the local center resources and generates second operation status data; The resource detection service module of the association center obtains the first operation status data sent by the resource detection service module of the local center; The resource detection service module of the association center analyzes the first operation status data and the second operation status data to obtain an analysis result; The resource detection service module of the association center selects and executes the resource operation strategies of the local center and the association center according to the analysis results.
8. The multi-center application multi-active management method for a subway MLC system according to claim 7, characterized in that: The management method also includes: The resource detection service module of the association center detects the network connection status between the local center and the association center; If the network connection status is normal, the resource detection service module of the association center generates an analysis result indicating that the network is normal, and analyzes the first operation status data and the second operation status data; if the network connection status is faulty, the resource detection service module of the association center generates an analysis result indicating that the network is faulty, and selects and executes the resource operation strategies of the local center and the association center according to the analysis results.
9. A multi-center application multi-active management system for a subway MLC system, characterized in that: The management system includes several resource detection service modules, each of which is deployed in a corresponding center; The resource detection service module is used to detect and generate resource operation status data of the center where it is located and the centers with associated relationships, and to share the resource operation status data with the centers with associated relationships; and to analyze the shared resource operation status data to obtain analysis results; Used to select and execute resource operation strategies based on analysis results.
10. A multi-center application multi-active management system for a subway MLC system according to claim 9, characterized in that: The resource detection service module of the local center is used to detect the operation status of the resources of the local center, generate first operation status data, and send the first operation status data to the resource detection service module of the association center; Used to obtain second operation status data sent by the resource detection service module of the association center; Used to analyze the first operating status data and the second operating status data to obtain an analysis result; Used to select and execute resource operation strategies of local centers and associated centers based on analysis results; The resource detection service module of the associated center is used to obtain the first operation status data sent by the resource detection service module of the local center; Used to detect the operating status of local central resources and generate second operating status data; Used to analyze the first operating status data and the second operating status data to obtain an analysis result; Used to select and execute resource operation strategies for local centers and associated centers based on analysis results.
Citation Information
Patent Citations
Data management system and method based on cloud computing
CN110784539A
Intelligent water affair system based on remote multi-activity architecture and management method
CN116471269A
Hybrid cloud multi-activity disaster recovery system
CN117082069A
Subsystem and method for controlling the switch between a main center and a standby center in the integrated supervisory control system
EP4023527A1
