Server disaster recovery method and system
By matching the computing unit as a backup server in the edge server, the problems of high disaster recovery costs, insufficient delays and bandwidth in the prior art are solved, and the disaster recovery effect with high availability and low cost are achieved.
Patent Information
- Application Number
- CN202211089459.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-09-07
AI Technical Summary
The disaster recovery solutions in the prior art are costly, and the delay and bandwidth cannot meet the requirements of edge computing, resulting in inappropriate application of edge server deployment.
By obtaining the configuration information of the basic functions of the main server and the computing unit, the backup server is determined, and when the main server goes down, the backup server is triggered to deploy the corresponding basic functions to provide services.
In the case of the main server downtime, the switching of the standby server ensures high service availability, reduces disaster recovery costs, and meets the latency and bandwidth requirements of edge computing.
Smart Images

Figure CN115664942B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of server disaster recovery, and in particular to a server disaster recovery method and system. Background Art
[0002] In unmanned operation parks such as ports and mines, due to the harsh environment and the dynamic changes in the operating areas of autonomous vehicles, the storage location of edge servers may need to be changed frequently. When there is a power outage in the operating area or other sudden failures of the server, it will pose a huge safety hazard to the operating autonomous vehicles.
[0003] To ensure high availability of their services, domestic and foreign Internet companies adopt disaster recovery plans for their main businesses. Among them, the more popular disaster recovery plans include local disaster recovery, remote disaster recovery, two-site three-center, cloud disaster recovery, and active-active data centers. However, these disaster recovery plans are expensive, and their latency and bandwidth cannot meet the requirements of edge computing, making them unsuitable for edge server deployment. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the defects in the prior art of high disaster recovery cost, and the inability of latency and bandwidth to meet edge computing requirements, thereby providing a server disaster recovery method and system.
[0005] According to a first aspect, an embodiment of the present invention provides a server disaster recovery method, which is applied to a primary server. The method includes:
[0006] Obtaining basic functions of the main server and configuration information of each computing unit connected to the main server;
[0007] Matching the configuration information of each computing unit with the basic function of the primary server, and determining a backup server corresponding to each basic function, the backup server being a computing unit whose configuration information matches the basic function;
[0008] Configure the configuration information corresponding to each basic function to the corresponding backup server;
[0009] When the main server is down, the configuration information in each backup server is triggered to deploy the corresponding basic functions on each backup server, and each backup server provides the corresponding basic function service to each terminal.
[0010] Optionally, the configuration information corresponding to the basic functions includes: configuration, image and deployment scripts and database information corresponding to the basic functions, and configuring the configuration information corresponding to each basic function to the corresponding standby server includes:
[0011] Send the configuration, image, and deployment script corresponding to the current basic function to the current standby server corresponding to the current basic function, and perform heartbeat detection on the current standby server according to a preset period;
[0012] When the heartbeat detection between the primary server and the current standby server is successful, the database information corresponding to the current basic function is written into the current standby server;
[0013] When the heartbeat detection between the main server and the current backup server fails, based on the current basic function of the main server, the configuration information of each computing unit is matched with the current basic function to update the backup server corresponding to the current basic function, and return to the step of sending the configuration, mirror and deployment script corresponding to the current basic function to the current backup server corresponding to the current basic function.
[0014] Optionally, the method further includes:
[0015] When the main server resumes normal operation after being out of service, a recovery notification is sent to each backup server to make each backup server stop providing corresponding basic functional services to each terminal, and each backup server sends a connection recovery notification to each terminal to establish a connection with the main server, so that each terminal establishes a connection with the main server, and the main server provides basic functional services to each terminal.
[0016] Optionally, the method further includes:
[0017] The addresses of the backup servers and their corresponding basic functions are sent to the terminals, so that the terminals can establish connections with the corresponding backup servers through the addresses of the backup servers and obtain the corresponding basic function services.
[0018] According to a second aspect, an embodiment of the present invention further provides a server disaster recovery method, which is applied to a backup server. The method includes:
[0019] Receive configuration information corresponding to the current basic function issued by the main server, the configuration information including the configuration, image and deployment script and database information corresponding to the current basic function, the backup server is the computing unit whose configuration information screened by the main server matches the current basic function;
[0020] When the main server is down, the current basic functions are deployed on the backup server based on the configuration information, and the backup server provides the current basic function services to each terminal.
[0021] Optionally, the method further includes:
[0022] Receiving a recovery notification sent by the primary server;
[0023] According to the recovery notification issued by the main server, stop providing the current basic function services to each terminal;
[0024] A connection recovery notification for establishing a connection with the main server is sent to each terminal, so that each terminal establishes a connection with the main server, and the main server provides current basic function services to each terminal.
[0025] According to a third aspect, an embodiment of the present invention further provides a server disaster recovery method, which is applied to a terminal. The method includes:
[0026] When the main server is down, the basic function services provided by each backup server are received, and the backup server obtains the basic functions of the main server and the configuration information of each computing unit connected to the main server for the main server; matches the configuration information of each computing unit with the basic functions of the main server, and determines the backup server corresponding to each basic function, and the backup server is the computing unit whose configuration information matches the basic function; configures the configuration information corresponding to each basic function to the corresponding backup server, and when the main server is down, the main server triggers the configuration information in each backup server to deploy the corresponding basic function on each backup server.
[0027] Optionally, the method further includes:
[0028] receiving a connection restoration notification sent by each backup server to establish a connection with the primary server, wherein the connection restoration notification is sent by the backup server when the primary server resumes normal operation after being down;
[0029] Establish a connection with the primary server based on the connection recovery notification and receive basic functional services provided by the primary server.
[0030] According to a fourth aspect, an embodiment of the present invention provides a server disaster recovery system, including a main server, several backup servers and several terminals, wherein:
[0031] The primary server is used to obtain the basic functions of the primary server and the configuration information of each computing unit connected to the primary server; match the configuration information corresponding to the basic functions with the configuration information of each computing unit, determine the backup server corresponding to each basic function, and the backup server is the computing unit whose configuration information matches the basic function; configure the configuration information corresponding to each basic function to the corresponding backup server;
[0032] The standby server is used to receive configuration information sent by the main server; and when the main server is down, deploy basic functions on the standby server based on the configuration information to provide basic function services to each terminal;
[0033] The terminal is used to receive basic functional services provided by each backup server when the main server is down.
[0034] According to a fifth aspect, an embodiment of the present invention provides an electronic device, including:
[0035] A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method described in the first / second / third aspect, or any optional implementation manner of the first / second / third aspect, by executing the computer instructions.
[0036] According to the sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method described in the first / second / third aspect, or any optional implementation method of the first / second / third aspect.
[0037] The technical solution of the present invention has the following advantages:
[0038] The present invention provides a server disaster recovery method, which is applied to a main server, by obtaining the basic functions of the main server and the configuration information of each computing unit connected to the main server; matching the configuration information of each computing unit with the basic functions of the main server, and determining a backup server corresponding to each basic function, wherein the backup server is a computing unit whose configuration information matches the basic function; configuring the configuration information corresponding to each basic function to the corresponding backup server; when the main server goes down, triggering the configuration information in each backup server to deploy the corresponding basic function on each backup server, and each backup server provides the corresponding basic function service to each terminal. By matching the configuration information of each basic function of the main server with the configuration information of each computing unit, the successfully matched computing unit is determined as the backup server for the basic function. When the main server goes down, each backup server provides the corresponding basic function service to each terminal. There is no need to set up a backup server separately. The computing unit that matches the basic function configuration information is used as the backup server. This not only solves the problems of high disaster recovery cost, delay and bandwidth that cannot meet edge computing requirements in the existing technology, but also allows each basic function service to be set up separately. When the backup server corresponding to the basic function fails, other backup servers can continue to work, thereby achieving better disaster recovery effect. Even in the case of a main server failure, the high availability of the business can be guaranteed to meet customer usage needs.
[0039] The present invention also provides a server disaster recovery method, which is applied to a backup server, by receiving configuration information corresponding to the current basic function issued by the main server, the configuration information including the configuration, image and deployment script and database information corresponding to the current basic function, the backup server is a computing unit whose configuration information screened by the main server matches the current basic function; when the main server is down, the current basic function is deployed on the backup server based on the configuration information, and the backup server provides the current basic function service to each terminal. By matching the configuration information corresponding to the current basic function issued by the main server, the computing unit that successfully matches is determined as the backup server corresponding to the current basic function. When the main server is down, the client can operate through the backup server corresponding to each basic function to ensure the availability of the business. At the same time, since the backup servers are all computing units in the operation area, when the main server is down, the computing unit provides the corresponding basic function as the backup server according to the matching result. Therefore, there is no need to set up additional backup servers. On the basis of ensuring that the configuration information of the backup server meets the basic function, when the backup server corresponding to the basic function fails, other backup servers can still continue to work, thereby achieving better disaster recovery effect and significantly reducing disaster recovery costs.
[0040] The present invention also provides a server disaster recovery method, which is applied to a terminal. When the main server is down, the main server receives the basic function services provided by each backup server. The backup server obtains the basic functions of the main server and the configuration information of each computing unit connected to the main server for the main server; the configuration information of each computing unit is matched with the basic functions of the main server, and the backup server corresponding to each basic function is determined. The backup server is a computing unit whose configuration information matches the basic function; the configuration information corresponding to each basic function is configured to the corresponding backup server. When the main server is down, the main server triggers the configuration information in each backup server to deploy the corresponding basic function on each backup server. By receiving the basic function services provided by each backup server when the main server is down, continuous operation is achieved, high availability of the business is guaranteed, and customer satisfaction is greatly improved.
[0041] The present invention provides a server disaster recovery system, including a main server, several backup servers and several terminals, wherein the main server is used to obtain the basic functions of the main server and the configuration information of each computing unit connected to the main server; match the configuration information corresponding to the basic functions with the configuration information of each computing unit, determine the backup server corresponding to each basic function, and the backup server is a computing unit whose configuration information matches the basic function; configure the configuration information corresponding to each basic function to the corresponding backup server; the backup server is used to receive the configuration information sent by the main server; and when the main server goes down, the basic functions are deployed on the backup server based on the configuration information to provide basic function services to each terminal; the terminal is used to receive the basic function services provided by each backup server when the main server goes down. By disassembling the basic functions of the main server, the computing unit that successfully matches the configuration information of each basic function is determined as the backup server. When the main server goes down, the main and backup servers are switched, and the backup servers provide basic function services to each terminal, thereby ensuring continuous operation. There is no need to set up a separate backup server. The computing unit that matches the basic function configuration information can be used as a backup server. This not only solves the problems of high disaster recovery cost, latency and bandwidth that cannot meet edge computing requirements in the existing technology, but also allows each basic function service to be set up separately. When the backup server corresponding to the basic function fails, other backup servers can continue to work, thereby achieving better disaster recovery effects. Even in the case of a main server failure, the high availability of the business can be guaranteed to meet customer usage needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific 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 any creative work.
[0043] Figure 1 A schematic diagram of a server disaster recovery system according to an embodiment of the present invention;
[0044] Figure 2 A schematic diagram illustrating calculation configuration information of a master server of a server disaster recovery system according to an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of a primary server selecting a backup server in a server disaster recovery system according to an embodiment of the present invention;
[0046] Figure 4 This is a flow chart of a server disaster recovery method according to an embodiment of the present invention;
[0047] Figure 5 This is an overall architecture diagram of the server disaster recovery method according to an embodiment of the present invention;
[0048] Figure 6 The figure is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0050] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0051] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; internal connections between two components; wireless connections or wired connections. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0052] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0053] In unmanned operation parks such as ports and mines, the storage location of edge servers may need to be changed frequently due to dynamic changes in the operation area. In addition, the environment where the servers are located, such as mines and coal mine operation areas, is relatively harsh. If the operation area loses power or the server suddenly fails, it will pose a huge safety hazard to the operating autonomous driving vehicles.
[0054] To ensure high service availability, internet companies both domestically and internationally employ disaster recovery solutions for their core businesses, including local disaster recovery, remote disaster recovery, two-site three-center deployment, cloud disaster recovery, and active-active data centers. These solutions are costly, and their latency and bandwidth requirements cannot meet edge computing requirements, making them unsuitable for edge server deployment.
[0055] Based on the above problems, the embodiment of the present invention provides a server disaster recovery system, such as Figure 1 As shown, the server disaster recovery system includes: a main server 1, several backup servers 2 and several terminals 3.
[0056] Specifically, in actual applications, the main server 1 can be the main server of the Internet of Vehicles based on the cloud control platform, etc.; the backup server 2 can be a running vehicle / construction machinery (actually the computing platform running on it), road test computing equipment, central cloud server, edge cloud server, etc.; the terminal 3 can be an autonomous driving vehicle, etc.
[0057] Specifically, in an ideal situation, the backup server 2 can be engineering machinery, especially engineering machinery incorporated into the operation cluster. By using the engineering machinery in operation as the backup server 2, there is no need to add new hardware equipment. When the main server 1 is operating normally, the backup server 2, that is, the engineering machinery end, is the terminal 3 of the entire system. When the main server 1 goes down, the engineering machinery end computing platform provides basic functions, that is, the engineering machinery end computing platform has the dual identities of backup server 2 and terminal 3. While ensuring the disaster recovery effect, it further reduces the disaster recovery cost and maximizes the cost-effectiveness of the disaster recovery solution.
[0058] Specifically, in actual applications, the main server 1 can determine which functions belong to the basic functions based on the current business scenario. Basic functions refer to functions that will affect the safety of production assets, operating efficiency, customer experience, etc. Furthermore, all functions can be arranged according to priority, and thus deployed according to the acceptance capacity of the backup server 2. In addition, since the backup server 2 can be a running vehicle / engineering machinery end computing platform, road test computing equipment, central cloud server, edge cloud server or other computing units, the embodiment of the present invention can also divide and guide the basic functions and non-essential functions of the main server 1 according to the type and acceptance capacity of the backup server 2, so that the backup server 2 can selectively assume part of the basic functions transferred from the main server 1, while further improving the utilization efficiency of the backup server 2 while providing disaster recovery protection.
[0059] Specifically, when the selection object of the backup server 2 is a cloud server such as a running vehicle / engineering machinery computing platform, a central cloud server, an edge cloud server, etc., after completing the matching with the basic function configuration information of the main server, the cloud server can be determined as the backup server 2 corresponding to a certain basic function; when the selection object of the backup server 2 is a road test computing device or other computing unit, it is necessary to first consider whether the computing unit has the ability to carry the basic functions of the main server 1. For example, if the computing unit has insufficient computing or storage capacity, some computing or storage space can be released by shutting down non-essential functions of the computing unit, thereby meeting the capacity requirements of the basic functions of the main server 1.
[0060] Specifically, in actual applications, the embodiment of the present invention takes cloud-based collaborative operations in an unmanned park as an example to illustrate the server disaster recovery system provided by the embodiment of the present invention. In this scenario, multiple forklifts, excavators, dump trucks, wide-body vehicles, etc. work together in the unmanned park under the unified scheduling of the cloud server (i.e., the main server 1). Among them, the forklifts, excavators, dump trucks, wide-body vehicles, etc. are equipped with end-side computing platforms and can communicate with each other and with the cloud server. Because they are equipped with a computing platform, the computing platform has computing, processing, communication and other capabilities, and the engineering machinery has some or all of the intelligent networking functions, that is, the engineering machinery can work as a backup server 2 and terminal 3. It should be noted that the level of intelligent networking capabilities depends on the configuration of the computing platform carried.
[0061] The main server 1 is used to obtain the basic functions of the main server 1 and the configuration information of each computing unit connected to the main server 1; match the configuration information corresponding to the basic functions with the configuration information of each computing unit, and determine the backup server 2 corresponding to each basic function, and the backup server 2 is the computing unit whose configuration information matches the basic function; configure the configuration information corresponding to each basic function to the corresponding backup server 2.
[0062] Specifically, in practical applications, Figure 2-Figure 3 As shown, the specific process of the main server 1 screening the backup server 2 is as follows:
[0063] 1) The main server 1 calculates the resources of all computing units in the park
[0064] The main server 1 calculates the chip architecture, memory capacity, storage capacity, network speed, etc. of all computing units in the park, including but not limited to the above-mentioned vehicle / engineering machinery computing platform, road test computing equipment, central cloud server, edge cloud server and other computing units, and saves them in a list.
[0065] Specifically, in order to better perform subsequent matching with the standby server 2 , the main server 1 will simultaneously obtain the address information of each computing unit, laying a foundation for subsequent matching and establishing a connection between the standby server 2 and the terminal 3 .
[0066] 2) Primary server 1 selects computing unit as backup server 2
[0067] Master server 1 matches the most appropriate computing unit based on the configuration information required for different basic functions. It matches computing units based on the chip architecture, memory capacity, storage capacity, network speed, and other requirements of each function. Master server 1 calculates the capabilities of each computing unit and matches the configuration information based on the required functionality. If a match is successful, the computing unit is tagged as a server for that basic function.
[0068] Specifically, in actual applications, the configuration information corresponding to the basic functions includes the configuration, image and deployment scripts and database information corresponding to the basic functions. When performing matching calculations, the configuration matching between the basic functions of the main server 1 and the computing unit is mainly based on the configuration corresponding to the basic functions.
[0069] For example, Figure 3 As shown, if the configuration information of the scheduling function (schedule) of the cloud control platform main server 1 is: central processing unit (CPU) 10 cores, running memory (RAM) 1G, storage space (STO) 500M, network communication speed 10M / s; the configuration information of the command issuing function (command) is: central processing unit (CPU) 8 cores, running memory (RAM) 800M, storage space (STO) 900M, network communication speed 8M / s; the configuration information of the campus map function (map) is central processing unit (CPU) 20 cores, running memory (RAM) 2G, storage space (STO) 10G, network communication speed 10M / s, by matching with the configuration information of the computing unit, a matching result is obtained, the configuration information of vehicle A can meet the scheduling function; the configuration information of vehicle B can meet the command issuing function; the configuration information of vehicle C can meet the campus map function, then vehicle A is used to deploy the scheduling service, vehicle B is used to deploy the command issuing service, and vehicle C is used to deploy the campus map service.
[0070] Specifically, the embodiment of the present invention can also set priorities for the central processing unit, running memory, storage space and network communication speed according to the different requirements of each basic function for configuration information. When there are multiple computing units that meet the configuration information of the basic function, the optimal computing unit is determined as the backup server 2 for the basic function according to the priority level of each configuration information corresponding to the basic function.
[0071] For example, the scheduling function has high requirements for the central processing unit and running memory. When the configuration information of multiple computing units meets the requirements of 10 cores of central processing unit (CPU), 1G of running memory (RAM), 500M of storage space (STO), and 10M / s of network communication speed, the computing unit with better central processing unit and running memory is preferentially selected as the backup server 2.
[0072] It should be noted that the embodiment of the present invention takes the scheduling function, command issuance and campus map as examples to illustrate the matching of the configuration information of the basic functions with the configuration information of the computing unit, but the actual situation is not limited to this. The basic functions are not limited to the above-mentioned scheduling functions, command issuance and campus map, and the configuration of the basic functions is not limited to the above-mentioned central processing unit, running memory, storage space and network communication speed.
[0073] Specifically, after determining the backup server 2 , the main server 1 will also obtain the address information (IP) of the computing unit and send it to the terminal 3 .
[0074] The standby server 2 is used to receive configuration information sent by the main server 1; and when the main server 1 is down, basic functions are deployed on the standby server 2 based on the configuration information to provide basic function services to each terminal 3.
[0075] Specifically, in actual applications, the main server 1 sends the configuration, mirror and deployment script corresponding to the basic business functions to the backup server 2 according to the TAG, so that when the main server 1 goes down, the basic functions are deployed on the backup server 2 based on the configuration information to provide basic function services to each terminal 3.
[0076] Specifically, in actual applications, in order to maintain a good connection between the main server 1 and each backup server 2, an embodiment of the present invention will establish a heartbeat detection between the backup server 2 and the main server 1, and the main server 1 will establish a connection with the backup server 2 according to a preset period. If the connection fails for multiple consecutive times, for example, the number of connections can be 5 times, then it will be determined that the heartbeat detection is abnormal. When there is a heartbeat detection abnormality, the main server 1 will re-match another computing unit according to the TAG function and the priority order corresponding to each configuration information, and repeat the process of "matching the configuration information corresponding to the basic function with the configuration information of each computing unit, and determining the backup server 2 corresponding to the basic function"; after the main server 1 establishes a connection with the backup server 2, the main server 1 will back up the database write command to the backup server 2 according to the preset period, so that when the main server 1 is down and cannot provide basic function services, each backup server 2 can directly continue to provide basic function services to ensure high availability of the business.
[0077] Exemplarily, the preset period may be 10s, but the actual situation is not limited thereto, and the preset period may be set according to the actual situation.
[0078] In actual applications, edge computing often targets small and medium-sized customers with limited costs. They may only purchase one edge server and cannot adopt a dual-machine, dual-cabinet deployment. In the case where a customer only purchases one server, the embodiment of the present invention solves the problem of a single server's inability to recover from disasters by temporarily using the vehicle-side or other computing units as backup servers 2. When the main server 1 is operating normally, the backup servers 2 do not provide server capacity and maintain their original capacity. When the main server 1 goes down, the backup servers 2 will begin to provide basic functional services.
[0079] The terminal 3 is used to receive basic functional services provided by each backup server 2 when the main server 1 is down.
[0080] Specifically, in actual applications, alternative solutions for edge disaster recovery include local disaster recovery, remote disaster recovery, two-site three-center, cloud disaster recovery, and active-active data centers. However, these approaches have the following shortcomings:
[0081] 1) Expensive and not suitable for edge server disaster recovery.
[0082] 2) Solutions like remote disaster recovery, cloud-based disaster recovery, and active-active data centers are far from the campus, and their bandwidth and latency cannot meet edge computing requirements. This solution, however, selects on-campus computing units, such as vehicles and roadside equipment, as backup servers. These computing units and edge computing form a local area network, all within the same campus, ensuring latency and bandwidth meet requirements.
[0083] 3) Since the disaster recovery data on the cloud is located on the cloud, it cannot meet the customer's requirements for data confidentiality. However, the backup servers 2 selected in the embodiment of the present invention are all computing units located on the customer's site, right in the customer's campus, and the network generally uses an intranet, which can meet the customer's requirements for data confidentiality.
[0084] Through the collaborative cooperation of the above-mentioned components, the present invention provides a server disaster recovery system, which disassembles the basic functions of the main server 1, determines the computing unit that successfully matches the configuration information of each basic function as the backup server 2, and when the main server 1 goes down, the main backup server 2 is switched, and the backup server 2 provides basic function services to each terminal 3, thereby ensuring continuous operation. There is no need to set up a backup server 2 separately. The computing unit that matches the basic function configuration information is used as the backup server 2, which not only solves the problems of high disaster recovery cost, delay and bandwidth that cannot meet edge computing requirements in the existing technology, but also allows each basic function service to be set up separately. When the backup server 2 corresponding to the basic function fails, other backup servers 2 can still continue to work, thereby achieving better disaster recovery effect. Even in the case of a main server 1 downtime, the high availability of the business can be guaranteed to meet the customer's usage needs.
[0085] The embodiment of the present invention provides a server disaster recovery method, which is applied to Figure 1 The main server shown is Figure 4 As shown, the server disaster recovery method specifically includes the following steps:
[0086] Step S101: Obtain basic functions of the main server and configuration information of each computing unit connected to the main server. For details, please refer to the relevant description in the above server disaster recovery system embodiment, which will not be repeated here.
[0087] Step S102: Match the configuration information of each computing unit with the basic function of the primary server, and determine the backup server corresponding to each basic function. The backup server is the computing unit whose configuration information matches the basic function. For details, please refer to the relevant description of the server disaster recovery system embodiment above, which will not be repeated here.
[0088] Step S103: configuring the configuration information corresponding to each basic function to the corresponding standby server. For details, please refer to the relevant description in the above server disaster recovery system embodiment, which will not be repeated here.
[0089] Step S104: When the main server is down, the configuration information in each backup server is triggered to deploy the corresponding basic functions on each backup server, and each backup server provides the corresponding basic function service to each terminal.
[0090] Specifically, in actual applications, when the primary server goes down, the terminal will connect to the backup server. The specific process is as follows:
[0091] If the primary server goes down and the backup server can't connect to it, the primary server will trigger the backup server deployment script, and the backup server will begin providing server functions. Meanwhile, if the terminal can't connect to the primary server, it will start connecting to the backup server and receive commands from the backup server to control the terminal to stop or continue operations.
[0092] Specifically, in one embodiment, the configuration information corresponding to the basic functions includes: configuration, image and deployment scripts and database information corresponding to the basic functions. The above step S103 configures the configuration information corresponding to each basic function to the corresponding standby server, specifically including the following steps:
[0093] Step S401: Sending the configuration, image and deployment script corresponding to the current basic function to the current standby server corresponding to the current basic function, and performing heartbeat detection on the current standby server according to a preset period.
[0094] Step S402: When the heartbeat detection between the primary server and the current backup server is successful, the database information corresponding to the current basic function is written into the current backup server.
[0095] Step S403: When the heartbeat detection between the main server and the current backup server fails, based on the current basic function of the main server, the configuration information of each computing unit is matched with the current basic function to update the backup server corresponding to the current basic function, and return to the step of sending the configuration, mirror and deployment script corresponding to the current basic function to the current backup server corresponding to the current basic function.
[0096] Specifically, in actual applications, in order to ensure that the backup server can continue to provide basic functional services as soon as the main server goes down, the embodiment of the present invention establishes periodic heartbeat detection between the main server and the backup server. When the backup server cannot connect to the main server, the deployment script is triggered separately, and the backup server starts to provide server functions to the outside world.
[0097] Specifically, embodiments of the present invention also establish periodic heartbeat detection between the terminal and the primary server. When the terminal cannot connect to the primary server, it begins connecting to the backup server. By establishing periodic heartbeat detection between the primary and backup servers, and between the primary server and the terminal, the connection status can be promptly obtained through both upstream and downstream methods, thereby ensuring continuous operation within the park.
[0098] Specifically, in one embodiment, after executing the above step S103, the following steps are further included:
[0099] Step S501: Send the addresses of each backup server and its corresponding basic functions to each terminal, so that each terminal can establish a connection with the corresponding backup server through the address of each backup server and obtain the corresponding basic function service. For details, please refer to the relevant description of the server disaster recovery system embodiment above, which will not be repeated here.
[0100] Specifically, in one embodiment, after executing the above step S104, the following steps are further included:
[0101] Step S601: When the main server recovers from being out of service, it sends a recovery notification to each backup server to make each backup server stop providing corresponding basic functional services to each terminal, and makes each backup server send a connection recovery notification to each terminal to establish a connection with the main server, so that each terminal can establish a connection with the main server, and the main server provides basic functional services to each terminal.
[0102] Specifically, in actual applications, when the main server resumes normal operation after a shutdown, the main server sends a notification to the backup server, and the backup server synchronizes the new database data to the main server. After the synchronization is completed, the backup server will notify the terminal to connect to the main server. When the terminal successfully connects to the main server, the backup server stops the server function, no longer provides basic functional services, and provides the original functional services to the outside world.
[0103] By executing the above steps, the server disaster recovery method provided by the embodiment of the present invention matches the configuration information of each basic function of the main server with the configuration information of each computing unit, and determines the successfully matched computing unit as the backup server of the basic function. When the main server goes down, each backup server provides the corresponding basic function service to each terminal. There is no need to set up a backup server separately. The computing unit that matches the basic function configuration information is used as the backup server, which not only solves the problems of high disaster recovery cost, delay and bandwidth that cannot meet edge computing requirements in the existing technology, but also allows each basic function service to be set separately. When the backup server corresponding to the basic function fails, other backup servers can continue to work, thereby achieving better disaster recovery effect. Even in the case of a main server failure, the high availability of the business can be guaranteed to meet customer usage needs.
[0104] The present invention also provides a server disaster recovery method, which is applied to Figure 1 The backup server shown is Figure 4 As shown, the server disaster recovery method specifically includes the following steps:
[0105] Step S201: Receive configuration information corresponding to the current basic function from the primary server. The configuration information includes the configuration, image, deployment script, and database information corresponding to the current basic function. The backup server is a computing unit whose configuration information, selected by the primary server, matches the current basic function. For details, see the relevant description in the server disaster recovery system embodiment above and will not be repeated here.
[0106] Step S202: When the primary server is down, the current basic functions are deployed on the backup server based on the configuration information, and the backup server provides the current basic function services to each terminal. For details, please refer to the relevant description in the above server disaster recovery system embodiment, which will not be repeated here.
[0107] Specifically, in one embodiment, after executing the above step S202, the following steps are further included:
[0108] Step S701: Receive the recovery notification sent by the primary server. For details, please refer to the relevant description in the above server disaster recovery system embodiment, which will not be repeated here.
[0109] Step S702: According to the recovery notification sent by the master server, stop providing the current basic function service to each terminal. For details, please refer to the relevant description in the above server disaster recovery system embodiment, which will not be repeated here.
[0110] Step S703: Send a connection recovery notification to each terminal to establish a connection with the primary server, so that each terminal can establish a connection with the primary server, and the primary server provides the current basic functional services to each terminal. For details, please refer to the relevant description of the server disaster recovery system embodiment above, which will not be repeated here.
[0111] By executing the above steps, the server disaster recovery method provided by the embodiment of the present invention matches the configuration information corresponding to the current basic function issued by the main server, and determines the successfully matched computing unit as the backup server corresponding to the current basic function. When the main server goes down, the customer can perform operations through the backup server corresponding to each basic function to ensure the availability of the business. At the same time, since the backup servers are all computing units in the operating area, when the main server goes down, the computing unit provides the corresponding basic function as the backup server according to the matching result. Therefore, there is no need to set up additional backup servers. On the basis of ensuring that the configuration information of the backup server meets the basic function, when the backup server corresponding to the basic function fails, other backup servers can continue to work, thereby achieving better disaster recovery effect and greatly reducing disaster recovery costs.
[0112] The present invention also provides a server disaster recovery method, which is applied to Figure 1 The terminal shown, such as Figure 4 As shown, the server disaster recovery method specifically includes the following steps:
[0113] Step S301: When the main server is down, the basic function services provided by each backup server are received. The backup server obtains the basic functions of the main server and the configuration information of each computing unit connected to the main server for the main server; matches the configuration information of each computing unit with the basic functions of the main server, and determines the backup server corresponding to each basic function. The backup server is a computing unit whose configuration information matches the basic function; configures the configuration information corresponding to each basic function to the corresponding backup server. When the main server is down, the main server triggers the configuration information in each backup server to deploy the corresponding basic function on each backup server. For details, please refer to the relevant description in the above-mentioned server disaster recovery system embodiment, which will not be repeated here.
[0114] Specifically, in one embodiment, after executing the above step S301, the following steps are further included:
[0115] Step S801: Receive a connection recovery notification from each backup server to establish a connection with the primary server. The connection recovery notification is sent by the backup server when the primary server recovers from a downtime. For details, please refer to the relevant description of the server disaster recovery system embodiment above and will not be repeated here.
[0116] Step S802: Establish a connection with the primary server based on the connection recovery notification and receive basic functional services provided by the primary server. For details, please refer to the relevant description in the above server disaster recovery system embodiment, which will not be repeated here.
[0117] By executing the above steps, the server disaster recovery method provided by the embodiment of the present invention receives the basic function services provided by each backup server when the main server is down, and the backup server obtains the basic functions of the main server and the configuration information of each computing unit connected to the main server for the main server; matches the configuration information of each computing unit with the basic functions of the main server, and determines the backup server corresponding to each basic function, and the backup server is a computing unit whose configuration information matches the basic function; configures the configuration information corresponding to each basic function to the corresponding backup server, and when the main server is down, the main server triggers the configuration information in each backup server to deploy the corresponding basic function on each backup server. By receiving the basic function services provided by each backup server when the main server is down, continuous operation is achieved, high availability of the business is guaranteed, and customer satisfaction is greatly improved.
[0118] The server disaster recovery method provided by the embodiment of the present invention will be described in detail below with reference to specific application examples.
[0119] Combine Figure 1-Figure 5 As shown, to improve the efficiency of backup server selection, embodiments of the present invention may not perform configuration information matching on all computing units. Instead, the primary server may randomly select several computing units for configuration matching. When the selected computing unit's capabilities meet the corresponding functions of the primary server, it is designated as a backup server. The selection process for other backup servers is similar and will not be further described here. Furthermore, embodiments of the present invention may also rank several computing units based on their matching degree with the primary server's current basic functions. Based on actual conditions and the ranking results, the corresponding computing unit is designated as a backup server for the primary server's current basic functions. While ensuring that the backup server is capable of assuming the corresponding basic functions of the primary server, the time required to determine a backup server is significantly reduced, improving production efficiency. Several available backup servers each possess several functions of the primary server. After selection, the configuration / deployment script / image is distributed to the backup server, and the primary server distributes the backup server's IP address to other terminals. When the primary server is functioning normally, the backup server operates normally and does not provide external server functions. A periodic 10-second heartbeat check is performed between the backup server and the primary server, and a periodic 10-second heartbeat check is also performed between the terminal and the server. When the backup server cannot connect to the primary server, its deployment script is triggered, and the backup server begins providing server functions. If the terminal cannot connect to the primary server, it begins connecting to the backup server. When the primary server recovers, the primary server sends a notification to the backup server, which instructs the terminal to connect to the primary server. The backup server then stops serving and provides its original capabilities. The specific process is as follows:
[0120] 1) The main server determines several computing units that match the configuration information corresponding to each basic function as backup servers that can provide basic function services.
[0121] 2) Once the backup servers are identified, the configuration, scripts, and mirroring information for the basic functions are distributed to the backup servers, maintaining a heartbeat connection. The primary server will periodically back up database write commands to the backup servers. When the primary server is operating normally, the backup servers will continue to provide their original functions but not server functions.
[0122] 3) Send the IP information of the backup server to the terminal, which can be the operating vehicle terminal.
[0123] 4) If the primary server fails, the backup server will detect an anomaly in the heartbeat between the primary and backup servers. Each backup server will begin providing basic services. Simultaneously, if the heartbeat between the terminal and the primary server is anomaly, the terminal will begin establishing a connection with the backup server. The backup server will then issue instructions to the terminal to stop or continue certain critical operations.
[0124] 5) When the primary server recovers, it will issue instructions to the backup server.
[0125] 6) The backup server will also issue instructions to each terminal, instructing the terminal to connect to the main server, and synchronize the database information in the backup server to the main server.
[0126] 7) After receiving the instruction from the backup server, the terminal connects to the main server.
[0127] The embodiment of the present invention fully utilizes the resources of other computing units other than the main server, such as the vehicle side, roadside equipment, and storage computing units, and uses the resources of these computing units as alternative servers to share the basic functions of the main server, thereby achieving disaster recovery. At the same time, by fully calculating the resources on the computing units and matching them with the various basic functions of the main server, full resource utilization is achieved. The CPU, memory, storage, and network resources of the vehicle side or other computing units are calculated, and then the corresponding computing units are matched according to the resources required by the functions of the main server. The functions of the main server are then transferred to the computing units, achieving full resource utilization. While meeting the requirements of latency and bandwidth, the disaster recovery cost is greatly reduced, and the customer's requirements for data confidentiality are met.
[0128] An embodiment of the present invention provides an electronic device, such as Figure 6 As shown, the electronic device includes a processor 901 and a memory 902, wherein the memory 902 and the processor 901 are communicatively connected to each other, wherein the processor 901 and the memory 902 can be connected via a bus or other means. Figure 6 The bus connection is taken as an example.
[0129] The processor 901 may be a central processing unit (CPU). The processor 901 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.
[0130] Memory 902, 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 the program instructions / modules corresponding to the methods in the embodiments of the present invention. Processor 901 executes the non-transitory software programs, instructions, and modules stored in memory 902 to perform various functional applications and data processing of processor 901, thereby implementing the methods in the above-mentioned method embodiments.
[0131] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created by the processor 901, etc. In addition, the memory 902 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 902 may optionally include a memory remotely located relative to the processor 901, and these remote memories may be connected to the processor 901 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.
[0132] One or more modules are stored in the memory 902 and, when executed by the processor 901 , perform the method in the above method embodiment.
[0133] The specific details of the above electronic device can be understood by referring to the corresponding descriptions and effects in the above method embodiments, and will not be repeated here.
[0134] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments can be implemented by instructing related hardware through a computer program. The implemented program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-described embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The storage medium can also include a combination of the above-mentioned types of memory.
[0135] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A server disaster recovery method, applied to a primary server, characterized in that: The method comprises: Obtaining basic functions of the main server and configuration information of each computing unit connected to the main server; Matching the configuration information of each computing unit with the basic function of the primary server, and determining a backup server corresponding to each basic function, the backup server being a computing unit whose configuration information matches the basic function; Configure the configuration information corresponding to each basic function to the corresponding backup server; The configuration information corresponding to the basic functions includes: configuration, mirroring and deployment scripts and database information corresponding to the basic functions. The configuration information corresponding to each basic function is configured to the corresponding backup server, including: issuing the configuration, mirroring and deployment scripts corresponding to the current basic function to the current backup server corresponding to the current basic function, and performing heartbeat detection on the current backup server according to a preset period; when the heartbeat detection between the main server and the current backup server fails, based on the current basic function of the main server, matching the configuration information of each computing unit with the current basic function to update the backup server corresponding to the current basic function, and returning to the step of issuing the configuration, mirroring and deployment scripts corresponding to the current basic function to the current backup server corresponding to the current basic function; wherein, a periodic heartbeat detection is established between the terminal and the main server, and when the terminal cannot connect to the main server, the backup server is connected; When the main server is down, the configuration information in each backup server is triggered to deploy the corresponding basic functions on each backup server, and each backup server provides the corresponding basic function service to each terminal.
2. The method according to claim 1, characterized in that The method further comprises: When the heartbeat detection between the main server and the current standby server is successful, the database information corresponding to the current basic function is written into the current standby server.
3. The method according to claim 1, characterized in that Also includes: When the main server resumes normal operation after being out of service, a recovery notification is sent to each backup server to make each backup server stop providing corresponding basic functional services to each terminal, and each backup server sends a connection recovery notification to each terminal to establish a connection with the main server, so that each terminal establishes a connection with the main server, and the main server provides basic functional services to each terminal.
4. The method according to claim 1, wherein Also includes: The addresses of the backup servers and their corresponding basic functions are sent to the terminals, so that the terminals can establish connections with the corresponding backup servers through the addresses of the backup servers and obtain the corresponding basic function services.
5. A server disaster recovery method, applied to a backup server, characterized in that: The method comprises: Receive configuration information corresponding to the current basic function issued by the main server, the configuration information including the configuration, image and deployment script and database information corresponding to the current basic function, the backup server is the computing unit whose configuration information screened by the main server matches the current basic function; The configuration information corresponding to the basic functions includes: configuration, mirroring and deployment scripts and database information corresponding to the basic functions. The main server sends the configuration information corresponding to each basic function to the corresponding backup server, including: sending the configuration, mirroring and deployment scripts corresponding to the current basic function to the current backup server corresponding to the current basic function, and performing heartbeat detection on the current backup server according to a preset period; when the heartbeat detection between the main server and the current backup server fails, based on the current basic function of the main server, matching the configuration information of each computing unit with the current basic function to update the backup server corresponding to the current basic function, and returning to the step of sending the configuration, mirroring and deployment scripts corresponding to the current basic function to the current backup server corresponding to the current basic function; wherein, a periodic heartbeat detection is established between the terminal and the main server, and when the terminal cannot connect to the main server, it connects to the backup server; When the main server is down, the current basic functions are deployed on the backup server based on the configuration information, and the backup server provides the current basic function services to each terminal.
6. The method according to claim 5, characterized in that Also includes: Receiving a recovery notification sent by the primary server; According to the recovery notification issued by the main server, stop providing the current basic function services to each terminal; A connection recovery notification for establishing a connection with the main server is sent to each terminal, so that each terminal establishes a connection with the main server, and the main server provides current basic function services to each terminal.
7. A server disaster recovery method, applied to a terminal, characterized in that: The method comprises: When the main server is down, the basic function services provided by each backup server are received, and the backup server is a computing unit whose configuration information matches the basic function, wherein the main server obtains the basic function of the main server and the configuration information of each computing unit connected to the main server; matches the configuration information of each computing unit with the basic function of the main server, and determines the backup server corresponding to each basic function; configures the configuration information corresponding to each basic function to the corresponding backup server, and when the main server is down, the main server triggers the configuration information in each backup server to deploy the corresponding basic function on each backup server; The configuration information corresponding to the basic functions includes: the configuration, mirror and deployment script and database information corresponding to the basic functions. The main server configures the configuration information corresponding to each basic function to the corresponding backup server, including: issuing the configuration, mirror and deployment script corresponding to the current basic function to the current backup server corresponding to the current basic function, and performing heartbeat detection on the current backup server according to a preset period; when the heartbeat detection between the main server and the current backup server fails, based on the current basic function of the main server, the configuration information of each computing unit is matched with the current basic function to update the backup server corresponding to the current basic function, and return to the step of issuing the configuration, mirror and deployment script corresponding to the current basic function to the current backup server corresponding to the current basic function; wherein, a periodic heartbeat detection is established between the terminal and the main server, and when the terminal cannot connect to the main server, it connects to the backup server.
8. The method according to claim 7, characterized in that Also includes: receiving a connection restoration notification sent by each backup server to establish a connection with the primary server, wherein the connection restoration notification is sent by the backup server when the primary server resumes normal operation after being down; Establish a connection with the primary server based on the connection recovery notification and receive basic functional services provided by the primary server.
9. A server disaster recovery system, characterized in that: It includes a main server, several backup servers and several terminals, among which, The primary server is used to obtain the basic functions of the primary server and the configuration information of each computing unit connected to the primary server; match the configuration information corresponding to the basic functions with the configuration information of each computing unit, determine the backup server corresponding to each basic function, and the backup server is the computing unit whose configuration information matches the basic function; configure the configuration information corresponding to each basic function to the corresponding backup server; The configuration information corresponding to the basic functions includes: configuration, mirroring and deployment scripts and database information corresponding to the basic functions. The main server configures the configuration information corresponding to each basic function to the corresponding backup server, including: issuing the configuration, mirroring and deployment scripts corresponding to the current basic function to the current backup server corresponding to the current basic function, and performing heartbeat detection on the current backup server according to a preset period; when the heartbeat detection between the main server and the current backup server fails, based on the current basic function of the main server, matching the configuration information of each computing unit with the current basic function to update the backup server corresponding to the current basic function, and returning to the step of issuing the configuration, mirroring and deployment scripts corresponding to the current basic function to the current backup server corresponding to the current basic function; wherein, a periodic heartbeat detection is established between the terminal and the main server, and when the terminal cannot connect to the main server, it connects to the backup server; The standby server is used to receive configuration information sent by the main server; and when the main server is down, deploy basic functions on the standby server based on the configuration information to provide basic function services to each terminal; The terminal is used to receive basic functional services provided by each backup server when the main server is down.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 8 by executing the computer instructions.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method for dual-computer hot-standby of vehicle information management system on basis of VRRP
CN103744809A
Recovery method and recovery system of virtual machine in cluster
CN104899071A
Configuration method and system based on layout disaster tolerance
CN110334304A