A smart water system and management method based on remote multi-active architecture

By deploying multiple water centers in the same city and different places, and combining the routing layer business data diversion mechanism, the problem of single -point failure in the smart water system has been solved, and real -time availability and high availability of the core business are realized.

CN116471269BActive Publication Date: 2025-01-28CHINA THREE GORGES CORPORATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310387488.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-07
Publication Date
2025-01-28
Estimated Expiration
2043-04-07

AI Technical Summary

Technical Problem

The existing smart water system is deployed in centralized deployment or cloud platform mode, with a single point of failure and cannot meet the real-time availability of core services.

Method used

Adopting a smart water system based on a multi -active architecture in different places, through the deployment of two centers in the same city (current water center and the same city water center) and a center (cross -city water center), the deployment model of the two places and three centers is formed. Combining the routing layer to judge the type of business service data, the diversion and storage of different types of business data is carried out.

Benefits of technology

Realize the ability to provide application services to the outside world in different geographical locations, solve the problem of single -point failure, ensure the real -time usability of the core business, and meet the external services and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116471269B_ABST
    Figure CN116471269B_ABST
Patent Text Reader

Abstract

The present invention provides a smart water system and management method based on a multi-active architecture in different locations. A smart water system based on a multi-active architecture in different locations includes: an access connection layer, a routing layer and a service layer, wherein the routing layer is connected to the access connection layer and the service layer respectively; wherein the service layer includes a current water center, a water center in the same city and a water center across cities, and the current water center is connected to the water center in the same city and the water center across cities respectively. The system forms a deployment mode of three centers in two locations by deploying two centers in the same city and one center in a different location, thereby enabling application services to be provided to the outside in different geographical locations. At the same time, in combination with the business characteristics of smart water services, the routing layer judges the business type of business service data, and then writes different types of business data into different water centers, thereby ensuring the real-time availability of core businesses and satisfying external services and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart water technology, and in particular to a smart water system and management method based on a remote multi-active architecture. Background Art

[0002] At present, the smart water system uses the new generation of information technology to deeply apply and widely explore water information resources, including water information collection, transmission, storage, processing and services, to comprehensively improve the efficiency and effectiveness of water management, and achieve more comprehensive perception, more proactive services, more integrated resources, more scientific decision-making, more proactive control and more timely response.

[0003] However, the current implementation of smart water systems is mainly based on centralized deployment or cloud platform deployment to provide external applications. If an extreme event occurs (such as a fire in the computer room), the system will not be able to access the outside world, there will be a single point of failure, and it will not be able to meet the real-time availability of core businesses (such as pipeline leaks, flood risk management, pollution prevention and control, and emergency response). Summary of the invention

[0004] Therefore, the technical solution of the present invention mainly solves the defects that the existing smart water system adopts a centralized deployment mode or a cloud platform mode, has a single point of failure, and cannot meet the real-time availability of core businesses, thereby providing a smart water system and management method based on a multi-active architecture in different locations.

[0005] In a first aspect, an embodiment of the present invention provides a smart water system based on a remote multi-active architecture, including: an access connection layer, a routing layer, and a service layer, wherein the routing layer is respectively connected to the access connection layer and the service layer; wherein the service layer includes a current water center, a same-city water center, and a cross-city water center, and the current water center is respectively connected to the same-city water center and the cross-city water center;

[0006] The access connection layer is used to obtain the Internet Protocol addresses of the service layers respectively and determine the configuration rules based on the Internet Protocol addresses;

[0007] The routing layer is used to obtain business service data, determine the business type of the business service data, and when the business type of the business service data is write-type business data, transmit the write-type business data to the current water service center and the cross-city water service center respectively by using the configuration rules;

[0008] The current water service center is used to write and store the write-type business data, and synchronize the write-type business data to the same-city water service center and the cross-city water service center in real time;

[0009] The inter-city water affairs center is used to write and store the write-type business data;

[0010] The routing layer is further used for transmitting the read-only business data to the water service center in the same city by using the configuration rule when the business type of the business service data is read-only business data;

[0011] The local water service center is used to read the read-only business data and store the write-type business data and the read-only business data.

[0012] An embodiment of the present invention provides a smart water system based on a multi-active architecture in different locations. By deploying two centers in the same city (i.e., the current water center and the water center in the same city) and deploying one center in a different location (i.e., the cross-city water center), a deployment mode of three centers in two locations is formed, which enables the provision of application services to the outside world in different geographical locations, solves the technical problem of single point failure, and at the same time, combined with the business characteristics of smart water services, the routing layer judges the business type of business service data, and then writes different types of business data into different water centers, thereby ensuring the real-time availability of core businesses and satisfying external services and user experience.

[0013] In combination with the first aspect, in a possible implementation manner, the writing service data includes:

[0014] Water quality dynamic monitoring and early warning data, water pollution incident handling data, water environment quality analysis data and drainage system emergency management and command data.

[0015] In combination with the first aspect, in another possible implementation manner, the read-only service data includes:

[0016] A map of water environment supervision data, pollution emission management data, and river basin and pollution source archive management data.

[0017] In combination with the first aspect, in another possible implementation, the routing layer is also used to divert write-type business data, generate a first write-type business and a second write-type business, transmit the first write-type business to the current water center, and transmit the second write-type business to the cross-city water center.

[0018] In combination with the first aspect, in another possible implementation manner, the current water service center includes: an access layer, an application layer, and a storage layer;

[0019] The access layer is used to receive the first write-type service, and select an application server based on the first write-type service using a preset load balancing strategy;

[0020] The application layer connects the access layer and the storage layer, and is used to generate a write instruction based on the application service data corresponding to the application server, and send the write instruction to the storage layer;

[0021] The storage layer is used to store and write the first write-type business based on the write instruction, and synchronize the first write-type business to the same-city water center and the cross-city water center through the data middleware.

[0022] In combination with the first aspect, in another possible implementation, the cross-city water center is specifically used to write the second write-type business, and store the first write-type business and the second write-type business.

[0023] In combination with the first aspect, in another possible implementation, the routing layer is also used to send detection data messages to the current water center, the water center in the same city and the cross-city water center respectively, and perform fault detection on the response information of the current water center, the water center in the same city and the cross-city water center within a preset time period, generate fault detection results, and allocate the business service data based on the fault detection results.

[0024] In a second aspect, an embodiment of the present invention further provides a management method for a smart water system based on a remote multi-active architecture, including:

[0025] The access connection layer obtains the Internet Protocol addresses of the service layers respectively, and determines the configuration rules based on the Internet Protocol addresses;

[0026] The routing layer obtains the business service data, determines the business type of the business service data, and when the business type of the business service data is write-type business data, transmits the write-type business data to the current water service center and the cross-city water service center respectively by using the configuration rule;

[0027] The current water service center writes and stores the write-type business data, and synchronizes the write-type business data to the same-city water service center and the cross-city water service center in real time;

[0028] The cross-city water affairs center writes and stores the write-type business data;

[0029] When the business type of the business service data is read-only business data, the routing layer uses the configuration rule to transmit the read-only business data to the same city water service center;

[0030] The local water service center reads the read-only business data, and stores the write-type business data and the read-only business data.

[0031] In the third aspect, an embodiment of the present invention further discloses an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the steps of a management method for a smart water system based on a remote multi-active architecture as described in the second aspect.

[0032] In a fourth aspect, an embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a management method for a smart water system based on a multi-active architecture in a different location as described in the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A block diagram of a smart water system based on a remote multi-active architecture provided by an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of the architecture of a smart water system based on a remote multi-active architecture provided by an embodiment of the present invention;

[0036] Figure 3 A flowchart of a management method for a smart water system based on a remote multi-active architecture provided by an embodiment of the present invention;

[0037] Figure 4 FIG. 4 is a specific example diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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.

[0039] In the description of the present invention, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a mechanical connection, or an electrical connection; or it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components, which can be a wireless connection or a wired connection. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0040] The embodiment of the present invention provides a smart water system based on a remote multi-active architecture, such as Figure 1 As shown, it includes: an access connection layer 1, a routing layer 2 and a service layer 3, and the routing layer 2 is respectively connected to the access connection layer 1 and the service layer 3; wherein the service layer 3 includes a current water center 4, a same-city water center 5 and a cross-city water center 6, and the current water center 4 is respectively connected to the same-city water center 5 and the cross-city water center 6.

[0041] Among them, the current water center 4 provides read and write services. In order to improve the read and write efficiency, the current water center 4 only provides write services. The same-city water center 5 provides external read (and simultaneously receives synchronous data from the write service of the current water center 4). The current water center 4 and the cross-city water center 6 achieve two-way synchronization through data middleware.

[0042] The access connection layer 1 is used to respectively obtain the Internet Protocol addresses of the service layer 3 and determine configuration rules based on the Internet Protocol addresses.

[0043] Specifically, Figure 2 As shown, the access connection layer 1 adopts DNS (Domain Name System) to add the IP addresses (Internet Protocol Address) of the access layers 7 of the three centers in the service layer 3 to the DNS. The DNS can configure the IP addresses of the access layers 7 of the three centers in the DNS configuration file to determine the configuration rules; for example, a host name www.water.com / monitor and an IP address http: / / 192.168.1.2 / monitor are associated. When visiting www.water.com / monitor, it will be directly routed to 192.168.1.2 (assuming it is the Internet Protocol address of the current water center 4) for access.

[0044] The above-mentioned routing layer 2 is used to obtain business service data and judge the business type of the above-mentioned business service data. When the business type of the business service data is write-type business data, the above-mentioned configuration rules are used to transmit the above-mentioned write-type business data to the above-mentioned current water center 4 and the above-mentioned cross-city water center 6 respectively.

[0045] Specifically, the above-mentioned write-type business data include: water quality dynamic monitoring and early warning data, water pollution incident processing data, water environment quality analysis data and drainage system emergency management and command data.

[0046] Furthermore, the business type of the above business service data is judged according to the requested link keyword. Taking www.water.com / monitor as an example, the link keyword is monitor, which is write-type business data. According to the configuration rules, the write-type business data should be divided into the current water center 4 and the above-mentioned cross-city water center 6.

[0047] The above-mentioned current water service center 4 is used to write and store the above-mentioned write-type business data, and synchronize the above-mentioned write-type business data to the above-mentioned same-city water service center 5 and the above-mentioned cross-city water service center 6 in real time.

[0048] The above-mentioned inter-city water affairs center 6 is used to write and store the above-mentioned write-type business data.

[0049] Specifically, the routing layer 2 is also used to divert write-type service data, generate a first write-type service and a second write-type service, transmit the first write-type service to the current water center 4, and transmit the second write-type service to the cross-city water center 6.

[0050] Furthermore, the above-mentioned inter-city water center 6 is specifically used to write the above-mentioned second writing type business, and store the above-mentioned first writing type business and the above-mentioned second writing type business.

[0051] Furthermore, since the current water center 4 and the above-mentioned cross-city water center 6 can both provide write-type business services, in order to avoid the correction costs caused by conflicts (i.e., the same data is modified at the same time), the routing layer 2 is deployed under the DNS to divert the write-type business data, ensuring that some write business requests are fixedly connected to the current water center 4, and all business operations after other business requests are fixedly connected to the cross-city water center 6 are completed in the computer room, thereby avoiding conflicts caused by the fact that both centers can write.

[0052] Furthermore, the routing layer 2 uses configuration rules to perform sharding according to business types, that is, according to the type of application, the write-type business data is divided into the first write-type business: water quality dynamic monitoring and early warning data and water pollution incident processing data; the second write-type business: water environment quality analysis data and drainage system emergency management and command data; by configuring routing parameters, the first write-type business is connected to the current water center 4, the second write-type business is connected to the cross-city water center 6, and the read-only business data is connected to the same-city water center 5.

[0053] The routing layer 2 is also used to transmit the read-only business data to the intra-city water service center 5 using the configuration rules when the business type of the business service data is read-only business data.

[0054] Specifically, the above-mentioned read-only business data include: water environment supervision map data, pollution emission management data and river basin and pollution source archive management data.

[0055] The above-mentioned intra-city water service center 5 is used to read the above-mentioned read-only business data, and store the above-mentioned write-type business data and the above-mentioned read-only business data.

[0056] This embodiment proposes a smart water system based on a multi-active architecture in different locations. By deploying two centers in the same city (i.e., the current water center and the water center in the same city) and deploying one center in a different location (i.e., the cross-city water center), a deployment mode of three centers in two locations is formed. This enables the provision of application services to the outside world in different geographical locations, solves the technical problem of single point failure, and at the same time, combined with the business characteristics of smart water services, the routing layer judges the business type of business service data, and then writes different types of business data into different water centers, ensuring the real-time availability of core businesses and meeting external services and user experience.

[0057] As an optional implementation mode of the present invention, the above-mentioned current water service center 4 includes: an access layer 7, an application layer 8 and a storage layer 9;

[0058] The access layer 7 is used to receive the first write-type service, and select an application server based on the first write-type service using a preset load balancing strategy.

[0059] Specifically, the access layer 7 of the current water center 4 obtains the first write-type service, and allocates the first write-type service according to the load balancing strategy configured by the access layer 7, wherein the load balancing strategy can adopt polling, weight, IP hash (that is, according to the IP requested by the user, then mapped into a hash value, and then allocated to a specific server) and other methods; taking polling as an example, after obtaining the first write-type service, the application server to be written is determined according to the polling configuration rules, and then the first write-type service is allocated to different application servers one by one in chronological order.

[0060] The application layer 8 connects the access layer 7 and the storage layer 9 , and is used to generate a write instruction based on the application service data corresponding to the application server, and send the write instruction to the storage layer 9 .

[0061] Specifically, according to the selected application server, application services are provided for the monitoring and writing of the first type of write business (i.e., water quality dynamic monitoring and early warning data and water pollution incident processing data). Since the application service involves the storage and writing of data, it is necessary to initiate a write instruction to the storage layer 9.

[0062] The storage layer 9 is used to store and write the first write-type service based on the write instruction, and synchronize the first write-type service to the same-city water center 5 and the cross-city water center 6 through the data middleware.

[0063] Specifically, the storage layer 9 calls the write interface and data of the database based on the write instruction to complete the storage and writing of the data.

[0064] Furthermore, while the storage layer 9 of the current water center 4 completes the storage of the first write-type business, it is also necessary to synchronize the data of the first write-type business, and complete the data synchronization with the current water center 4 and the cross-city water center 6 through the synchronization of the data middleware.

[0065] Furthermore, data synchronization mainly solves the problem of data synchronization in different locations. Since the storage layer 9 of the water center and the cross-city water center 6 is the main database, and the data of the two centers are synchronized with each other, it is solved by developing data synchronization middleware (such as Mycat). That is, no matter which center the client writes, the data can be synchronized to another center. Finally, the water center and the cross-city water center 6 store the full amount of data to support arbitrary switching and provide continuous services.

[0066] It should be noted that if Figure 2As shown, the structure and business processing flow of the cross-city water center 6 can refer to the above-mentioned current water center 4, wherein the structure of the same-city water center 5 is the same as that of the current water center 4, but the same-city water center 5 is mainly responsible for processing read-only business data and does not involve data synchronization operations. Its storage layer 9 does not involve data writing, and the interface called is the data reading interface.

[0067] As an optional implementation mode of the present invention, the routing layer 2 is also used to send detection data messages to the current water center 4, the same-city water center 5 and the cross-city water center 6 respectively, and perform fault detection on the response information of the current water center 4, the same-city water center 5 and the cross-city water center 6 within a preset time period, generate fault detection results, and allocate the business service data based on the fault detection results.

[0068] Specifically, fault monitoring of the current water center 4, the same-city water center 5 and the cross-city water center 6 is carried out by sending heartbeat packets between the upper and lower layers: the routing layer 2 sends heartbeat detection to the access layer 7 of the current water center 4 at a specified interval (that is, the routing layer 2 sends a data message to the access layer 7 of the current water center 4), and the access layer 7 of the current water center 4 responds after receiving it. If the response is normal, the access layer 7 of the current water center 4 is working normally. If there is no heartbeat reply, the access layer 7 of the current water center 4 is faulty and fault handling is required.

[0069] Furthermore, if the current water center 4 fails, it can switch to the water center in the same city 5 to continue providing services. If extreme events such as city-level failures (such as fire, earthquake) occur, it can switch to the cross-city water center 6 in a different location for disposal. When the current water center 4 and the water center in the same city 5 return to normal, data synchronization can be performed to restore the corresponding data.

[0070] Furthermore, taking the failure of the current water center 4 as an example: if there is no access to the first write-type service, after the failure occurs, the routing configuration rules of the first write-type service are directly modified to point to the cross-city water center 6, and the cross-city water center 6 accesses the first write-type service until the current water center 4 is restored and then synchronized through data synchronization to return to normal.

[0071] Furthermore, if a write service is being processed and the current water center 4 fails: the first write-type service has not yet been written into the database of the storage layer 9, the current water center 4 fails to respond and directly returns an exception, the routing layer 2 re-initiates the write request, and the routing center configuration rules point to the cross-city water center 6, and continues to write directly through the cross-city water center 6; if the first write-type service has been written into the database of the storage layer 9, since the two-way synchronization data can be synchronized to the cross-city water center 6, even if the current water center 4 fails at this time, the cross-city water center 6 can still obtain the first write-type service, and at the same time, the routing configuration rules of the routing layer 2 are modified to point to the cross-city water center 6, and all write services can continue to be provided through the cross-city water center 6.

[0072] Furthermore, when the water service center 5 in the same city fails, since the current water service center 4 also provides read-only service, the read-only service of the current water service center 4 is enabled, and the current water service center 4 takes over the read-only business data.

[0073] The embodiment of the present invention also discloses a management method of a smart water system based on a remote multi-active architecture, such as Figure 3 As shown, including:

[0074] S301. The access connection layer obtains the Internet Protocol address of the service layer respectively, and determines the configuration rules based on the Internet Protocol address.

[0075] Specifically, the access connection layer adopts DNS (Domain Name System) and adds the access layer IP addresses (Internet Protocol Address) of the three centers in the service layer to the DNS. The DNS can configure the IP addresses of the access layers of the three centers in the DNS configuration file to determine the configuration rules; for example, a host name www.water.com / monitor and an IP address http: / / 192.168.1.2 / monitor are associated. When visiting www.water.com / monitor, it will be directly routed to 192.168.1.2 (assuming that it is the Internet Protocol address of the current water center) for access.

[0076] S302, the routing layer obtains business service data, determines the business type of the business service data, and when the business type of the business service data is write-type business data, the above-mentioned configuration rules are used to transmit the above-mentioned write-type business data to the current water center and the cross-city water center respectively.

[0077] Specifically, the above-mentioned write-type business data include: water quality dynamic monitoring and early warning data, water pollution incident processing data, water environment quality analysis data and drainage system emergency management and command data.

[0078] Furthermore, the business type of the above business service data is judged according to the requested link keyword. Taking www.water.com / monitor as an example, the link keyword is monitor, which is write-type business data. According to the configuration rules, the write-type business data should be divided into the current water center and the above-mentioned cross-city water center.

[0079] S303. The current water affairs center writes and stores the write-type business data, and synchronizes the write-type business data to the same-city water affairs center and the cross-city water affairs center in real time.

[0080] S304. The above-mentioned inter-city water center writes and stores the above-mentioned write-type business data.

[0081] Specifically, the routing layer is also used to divert write-type business data, generate a first write-type business and a second write-type business, transmit the first write-type business to the current water center, and transmit the second write-type business to the cross-city water center.

[0082] Furthermore, the above-mentioned cross-city water center is specifically used to write the above-mentioned second write-type business, and store the above-mentioned first write-type business and the above-mentioned second write-type business.

[0083] Furthermore, since both the current water center and the above-mentioned cross-city water center can provide write-type business services, in order to avoid the correction costs caused by conflicts (that is, the same data is modified at the same time), a routing layer is deployed under the DNS to divert write-type business data, ensuring that some write business requests are fixedly connected to the current water center, and other business requests are fixedly connected to the cross-city water center. All business operations thereafter are completed in the computer room, thereby avoiding conflicts caused by the fact that both centers can write.

[0084] Furthermore, the routing layer uses configuration rules to segment according to business types, that is, according to the type of application, the write-type business data is divided into the first write-type business: water quality dynamic monitoring and early warning data and water pollution incident processing data; the second write-type business: water environment quality analysis data and drainage system emergency management and command data; by configuring routing parameters, the first write-type business is connected to the current water center, the second write-type business is connected to the cross-city water center, and the read-only business data is connected to the same-city water center.

[0085] S305. When the business type of the business service data is read-only business data, the routing layer uses the configuration rule to transmit the read-only business data to the water service center in the same city.

[0086] Specifically, the above-mentioned read-only business data include: water environment supervision map data, pollution emission management data and river basin and pollution source archive management data.

[0087] S306. The above-mentioned local water center reads the above-mentioned read-only business data, and stores the above-mentioned write-type business data and the above-mentioned read-only business data.

[0088] The present invention provides a management method for a smart water system based on a multi-active architecture in different locations. By deploying two centers in the same city (i.e., the current water center and the water center in the same city) and deploying one center in a different location (i.e., the cross-city water center), a deployment mode of three centers in two locations is formed, so that application services can be provided to the outside world in different geographical locations, and the technical problem of single point failure is solved. At the same time, combined with the business characteristics of smart water services, the routing layer judges the business type of business service data, and then writes different types of business data into different water centers, thereby ensuring the real-time availability of core businesses and satisfying external services and user experience.

[0089] As an optional implementation manner of the present invention, the above S303 includes:

[0090] S3031. The access layer receives the first write-type service, and selects an application server based on the first write-type service using a preset load balancing strategy.

[0091] Specifically, the access layer of the current water center obtains the first write-type service, and distributes the first write-type service according to the load balancing strategy configured by the access layer, wherein the load balancing strategy may adopt methods such as polling, weight, and IP hash (i.e., based on the IP requested by the user, it is mapped into a hash value and then distributed to a specific server); taking polling as an example, after obtaining the first write-type service, the application server to be written is determined according to the polling configuration rules, and then the first write-type service is distributed to different application servers one by one in chronological order.

[0092] S3032. The application layer generates a write instruction based on the application service data corresponding to the above application server, and sends the above write instruction to the storage layer.

[0093] Specifically, according to the selected application server, application services are provided for the monitoring and writing of the first type of write business (i.e., water quality dynamic monitoring and early warning data and water pollution incident processing data). Since the application service involves the storage and writing of data, it is necessary to initiate a write instruction to the storage layer.

[0094] S3033. The storage layer stores and writes the first write-type business based on the write instruction, and synchronizes the first write-type business to the same-city water center and the cross-city water center through the data middleware.

[0095] Specifically, the storage layer calls the write interface and data of the database based on the write instruction to complete the storage and writing of the data.

[0096] Furthermore, while the storage layer of the current water center completes the storage of the first write-type business, it is also necessary to synchronize the data of the first write-type business, and complete the data synchronization with the current water center and the cross-city water center through the synchronization of the data middleware.

[0097] Furthermore, data synchronization mainly solves the problem of data synchronization in different locations. Since the storage layer of the water center and the cross-city water center is the main database, and the data of the two centers are synchronized with each other, it is solved by developing data synchronization middleware (such as Mycat). That is, no matter which center the client writes to, the data can be synchronized to another center. Finally, the water center and the cross-city water center store the full amount of data to support arbitrary switching and provide continuous services.

[0098] It should be noted that the structure and business processing flow of the cross-city water center can refer to the current water center mentioned above. The structure of the same-city water center is the same as that of the current water center, but the same-city water center is mainly responsible for processing read-only business data and does not involve data synchronization operations. Its storage layer does not involve data writing, and the interface called is the data reading interface.

[0099] As an optional embodiment of the present invention, it also includes:

[0100] The above-mentioned routing layer sends detection data messages to the above-mentioned current water center, the above-mentioned water center in the same city and the above-mentioned cross-city water center respectively, performs fault detection on the response information of the above-mentioned current water center, the above-mentioned water center in the same city and the above-mentioned cross-city water center within a preset time period, generates fault detection results, and allocates the above-mentioned business service data based on the above-mentioned fault detection results.

[0101] Specifically, fault monitoring of the current water center, the water center in the same city and the cross-city water center is carried out by sending heartbeat packets between the upper and lower layers: the routing layer sends heartbeat detection to the access layer of the current water center at a specified interval (that is, the routing layer sends a data message to the access layer of the current water center), and the access layer of the current water center receives it and responds. If the response is normal, the access layer of the current water center is working normally. If there is no heartbeat reply, the access layer of the current water center is faulty and fault handling is required.

[0102] Furthermore, if the current water center fails, it can be switched to the water center in the same city to continue providing services. If extreme events such as city-level failures (such as fire, earthquake) occur, it can be switched to a cross-city water center in a different location for disposal. When the current water center and the water center in the same city return to normal, data synchronization can be performed to restore the corresponding data.

[0103] Furthermore, taking the failure of the current water center as an example: if there is no access to the first write-type service, when a failure occurs, the routing configuration rules of the first write-type service will be directly modified to point to the cross-city water center, and the cross-city water center will access the first write-type service until the current water center is restored and then synchronized through data synchronization to restore to normal.

[0104] Furthermore, if a write service is being processed and the current water center fails: the first write-type service has not yet been written to the database of the storage layer, the current water center fails to respond and directly returns an exception, the routing layer re-initiates the write request, and the routing center configuration rules point to the cross-city water center, and continues to write directly through the cross-city water center; if the first write-type service has been written to the database of the storage layer, since the two-way synchronization data can be synchronized to the cross-city water center, even if the current water center fails at this time, the cross-city water center can still obtain the first write-type service, and the routing configuration rules of the routing layer are modified to point to the cross-city water center, and all write services can continue to be provided through the cross-city water center.

[0105] Furthermore, when a failure occurs in the water service center in the same city, since the current water service center also provides read-only services, the read-only service of the current water service center is enabled, and the current water service center takes over the read-only business data.

[0106] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, the electronic device may include a processor 110 and a memory 120, wherein the processor 110 and the memory 120 may be connected via a bus or in other ways. Figure 4 In the example, the connection through a bus is taken. In addition, the electronic device further includes at least one interface 130, and the at least one interface 130 may be a communication interface or other interface, which is not limited in this embodiment.

[0107] The processor 110 may be a central processing unit (CPU). The processor 110 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0108] The memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the video synthesis method in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 120, that is, a management method of a smart water system based on a remote multi-active architecture in the above method embodiment is implemented.

[0109] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created by the processor 110, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the processor 110 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0110] In addition, at least one interface 130 is used for communication between the electronic device and external devices, such as communication with a server, etc. Optionally, at least one interface 130 can also be used to connect external input and output devices, such as a keyboard, a display screen, etc.

[0111] The one or more modules are stored in the memory 120 and when executed by the processor 110, perform the following steps: Figure 3 A management method for a smart water system based on a multi-site active-active architecture in the illustrated embodiment.

[0112] For details of the above electronic equipment, please refer to Figure 1The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.

[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0114] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. A smart water system based on a remote multi-active architecture, characterized in that: include: An access connection layer, a routing layer and a service layer, wherein the routing layer is connected to the access connection layer and the service layer respectively; wherein the service layer includes a current water service center, a same-city water service center and a cross-city water service center, and the current water service center is connected to the same-city water service center and the cross-city water service center respectively; The access connection layer is used to obtain the Internet Protocol addresses of the service layer respectively, and determine the configuration rules based on the Internet Protocol addresses; wherein the access connection layer uses DNS, adds the access layer IP addresses of the three centers in the service layer to the DNS, and the DNS configures the IP addresses of the three center access layers in the DNS configuration file to determine the configuration rules; The routing layer is used to obtain business service data, determine the business type of the business service data, and when the business type of the business service data is write-type business data, transmit the write-type business data to the current water service center and the cross-city water service center respectively by using the configuration rules; The current water service center is used to write and store the write-type business data, and synchronize the write-type business data to the same-city water service center and the cross-city water service center in real time; The inter-city water affairs center is used to write and store the write-type business data; The routing layer is further used for transmitting the read-only business data to the water service center in the same city by using the configuration rule when the business type of the business service data is read-only business data; The local water service center is used to read the read-only business data and store the write-type business data and the read-only business data; The routing layer is further used to divert the write-type service data, generate a first write-type service and a second write-type service, transmit the first write-type service to the current water service center, and transmit the second write-type service to the cross-city water service center; The current water service center includes: an access layer, an application layer and a storage layer; The access layer is used to receive the first write-type service, and select an application server based on the first write-type service using a preset load balancing strategy; The application layer connects the access layer and the storage layer, and is used to generate a write instruction based on the application service data corresponding to the application server, and send the write instruction to the storage layer; The storage layer is used to store and write the first write-type service based on the write instruction, and synchronize the first write-type service to the same-city water service center and the cross-city water service center through the data middleware; The cross-city water service center is specifically used to write the second write-type business and store the first write-type business and the second write-type business.

2. According to claim 1, a smart water system based on a remote multi-active architecture is characterized in that: The write-type service data includes: Water quality dynamic monitoring and early warning data, water pollution incident handling data, water environment quality analysis data and drainage system emergency management and command data.

3. According to claim 1, a smart water system based on a remote multi-active architecture is characterized in that: The read-only business data includes: A map of water environment supervision data, pollution emission management data, and river basin and pollution source archive management data.

4. According to claim 1, a smart water system based on a remote multi-active architecture is characterized in that: The routing layer is also used to send detection data messages to the current water center, the water center in the same city and the cross-city water center respectively, perform fault detection on the response information of the current water center, the water center in the same city and the cross-city water center within a preset time period, generate fault detection results, and allocate the business service data based on the fault detection results.

5. A management method for a smart water system based on a remote multi-active architecture, characterized in that: include: The access connection layer obtains the Internet Protocol addresses of the service layer respectively, and determines the configuration rules based on the Internet Protocol addresses; wherein the access connection layer adopts DNS, adds the access layer IP addresses of the three centers in the service layer to the DNS, and the DNS configures the IP addresses of the three center access layers in the DNS configuration file to determine the configuration rules; The routing layer obtains the business service data, determines the business type of the business service data, and when the business type of the business service data is write-type business data, transmits the write-type business data to the current water service center and the cross-city water service center respectively by using the configuration rule; wherein the routing layer shunts the write-type business data to generate a first write-type business and a second write-type business, transmits the first write-type business to the current water service center, and transmits the second write-type business to the cross-city water service center; The current water service center writes and stores the write-type business data, and synchronizes the write-type business data to the same-city water service center and the cross-city water service center in real time; The cross-city water service center writes and stores the write-type business data; wherein the cross-city water service center writes the second write-type business, and stores the first write-type business and the second write-type business; When the business type of the business service data is read-only business data, the routing layer uses the configuration rule to transmit the read-only business data to the same city water service center; The local water service center reads the read-only business data and stores the write-type business data and the read-only business data; The current water service center writes and stores the write-type business data, and synchronizes the write-type business data to the same-city water service center and the cross-city water service center in real time, including: The access layer receives the first write-type service, and selects an application server based on the first write-type service using a preset load balancing strategy; The application layer generates a write instruction based on the application service data corresponding to the application server, and sends the write instruction to the storage layer; The storage layer stores and writes the first write-type business based on the write instruction, and synchronizes the first write-type business to the same-city water center and the cross-city water center through the data middleware.

6. An electronic device, characterized in that: comprising a processor and a memory, the memory being coupled to the processor; The memory stores computer-readable program instructions, and when the instructions are executed by the processor, the method according to claim 5 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to claim 5 is implemented.

Citation Information

Patent Citations

  • Methods and systems for deploying multi-active data centers

    CN109819004A