N+1 hot standby and IP dynamic switching method of storage server

By using N+1 hot standby technology and IP dynamic switching method in the storage server, the possible disk corruption or server downtime of the storage server is solved, and video data loss is achieved with high reliability and invisible switching of the storage server.

CN119512633APending Publication Date: 2025-02-25TIANJIN TIANDY DIGITAL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411553174.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

After a long period of operation, the storage server may experience disk damage or server downtime, resulting in loss of video data and affecting the reliability of data storage.

Method used

Using N+1 hot standby technology and IP dynamic switching method, N work machines and one hot standby machine are configured, each work machine has fixed IP and virtual IP. The hot standby machine regularly obtains the video configuration information of the work machine, saves and updates, and switches the virtual IP in time to ensure the continuity of video recording.

Benefits of technology

It improves the stability of the storage server, ensures that when there is a problem with the work machine, the hot standby machine can switch without any sense, and the client can access real-time video and playback video normally, reducing data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512633A_ABST
    Figure CN119512633A_ABST
Patent Text Reader

Abstract

The invention relates to an N + 1 hot standby and IP dynamic switching method of a storage server. The method comprises the following steps: step 1, configuring N working machines and one hot standby machine; 2, after the working machines and the hot standby machine are started, the hot standby machine obtains video configuration information of each working machine, stores the video configuration information to the local hot standby machine, and regularly checks and updates whether a video configuration file of each working machine is changed or not; 3, when the working machine does not perform video recording, the hot standby machine controls the working machine to cancel the virtual IP, the hot standby machine sets the virtual IP of the working machine, and the stored video recording configuration file is updated as the configuration file of the working machine to start video recording; 4, when the working machine is down or the network is not connected, the hot standby machine directly sets the virtual IP of the working machine, and meanwhile, the configuration file is updated to be the configuration file of the down working machine to start video recording; and step 5, after the working machine is online, recovering the video of the working machine. The stability of the storage server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of N+1 hot standby, and relates to an N+1 hot standby and IP dynamic switching method, in particular to an N+1 hot standby and IP dynamic switching method for a storage server. Background Art

[0002] With the widespread application of video surveillance, the storage of video data is becoming more and more important. The stability of the storage server directly affects the reliability of data storage. In the actual application environment, due to long-term operation, disk damage, server downtime and other reasons may cause storage server abnormalities, resulting in video data loss and losses to customers.

[0003] Therefore, the present invention proposes an N+1 hot standby and IP dynamic switching method for a storage server, which can solve the above problems.

[0004] After searching, no public documents of the prior art identical or similar to the present invention were found. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and propose an N+1 hot standby and IP dynamic switching method for a storage server. The N+1 hot standby method of the server can improve the stability of the storage server, and the IP switching method can ensure the continuity of platform access after hot standby switching, providing customers with a seamless switching experience, and the method has high practicality.

[0006] The present invention solves the practical problem by adopting the following technical solutions:

[0007] A method for N+1 hot standby and IP dynamic switching of a storage server, comprising the following steps:

[0008] Step 1: Configure N working machines and 1 hot standby machine;

[0009] Step 2: After the working machine and the hot standby machine are started, the hot standby machine obtains the video configuration information of each working machine, saves it locally, and periodically checks and updates the video configuration file of each working machine to see if there is any change;

[0010] Step 3: When the working machine does not record, the hot standby machine controls the working machine to cancel the virtual IP, and the hot standby machine sets the virtual IP of the working machine, and updates the stored recording configuration file to the configuration file of the working machine to start recording;

[0011] Step 4: When the working machine is down or the network is disconnected, the hot standby machine directly sets the virtual IP of the working machine and updates the configuration file to the configuration file of the down working machine to start recording;

[0012] Step 5: After the work machine is online, restore the recording of the work machine.

[0013] Moreover, the specific method of step 1 is:

[0014] Configure N working machines and 1 hot standby machine. Each working machine is configured with two IPs, one of which is a fixed IP and the other is a variable virtual IP. The fixed IP is used for communication between the working machine and the hot standby machine, and the virtual IP is used for communication between the working machine and the monitoring platform. The monitoring platform realizes video query, playback and download functions by connecting to the virtual IP.

[0015] The configuration list of the hot standby machine needs to save both the fixed IP and virtual IP of the working machine.

[0016] Moreover, the specific steps of step 2 include:

[0017] (1) After the working machine and the hot standby machine are started, the hot standby machine periodically obtains the recording configuration information of each working machine through the http protocol and saves it locally on the hot standby machine; at the same time, it resolves the MAC address of the working machine through the ARP protocol and saves it locally on the hot standby machine;

[0018] (2) When the hot standby machine obtains the configuration of the working machine, it determines whether the recording configuration file of each working machine has changed by comparing the file md5 value. If there is a change, the local backup configuration file is updated in time.

[0019] Moreover, the specific method of step 3 is:

[0020] When the hot standby machine detects that one of the working machines is not recording, it starts hot standby switching. The hot standby machine controls the host to cancel the local virtual IP, the working machine goes offline, and the hot standby machine sets its own virtual IP to the virtual IP of the offline working machine to complete the IP switching. At the same time, the hot standby machine updates the configuration file to the configuration file of the offline working machine and starts recording.

[0021] After the switch is completed, the platform can preview the video and play back the switched recording normally.

[0022] Moreover, the specific method of step 4 is:

[0023] When the hot standby machine detects that one of the working machines is down or the network is unavailable, the hot standby machine directly sets the virtual IP of the down working machine to complete the IP switch; at the same time, it updates the configuration file to the configuration file of the down working machine and starts recording.

[0024] After the switch is completed, the platform can preview the video and play back the switched recording normally.

[0025] Moreover, the specific method of step 5 is:

[0026] After the offline working machine resumes work, the hot standby machine detects the IP address conflict and compares whether the MAC is that of the offline working machine. If so, the hot standby machine cancels the working machine's virtual IP, stops recording, restores the hot standby machine's virtual IP, and completes the IP switching; the hot standby machine starts the video upload program to search for local videos, uploads the videos to the offline working machine, and restores the working machine's videos.

[0027] Advantages and beneficial effects of the present invention:

[0028] 1. The present invention provides an N+1 hot standby technology for storage servers and a method for dynamic IP switching. Compared with the traditional N+1 hot standby technology, the present invention can solve the problem of storage server and back up the video normally. At the same time, through IP switching technology, it can ensure that the monitoring platform can normally play back the video files stored on the hot standby machine after the hot standby machine is switched during the period when the working machine is offline, thereby improving the stability and usability of the storage server.

[0029] 2. The hot standby machine and the working machine of the present invention communicate via the http protocol, which is simple and fast, the program is stable, and the protocol is flexible and extensible.

[0030] 3. The present invention uses virtual IP technology to ensure that when a working machine has a problem, the client can access real-time video and playback video from the standby machine without any feeling when the hot standby machine is working. This cannot be achieved with traditional hot standby technology.

[0031] 4. After the working machine resumes work, the hot standby machine detects IP conflicts and determines the MAC address at the same time, prepares to determine whether the working machine has recovered, goes offline in time, and restores the hot standby function. By starting to send the video back to the host, the minimum loss of working machine data is guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a process flow chart of step 2 of the present invention;

[0033] Figure 2 is a process flow chart of step 3 of the present invention;

[0034] Figure 3 is a process flow chart of step 4 of the present invention;

[0035] Figure 4 This is a process flow chart of step 5 of the present invention. DETAILED DESCRIPTION

[0036] The embodiments of the present invention are further described in detail below with reference to the accompanying drawings:

[0037] A method for N+1 hot standby and IP dynamic switching of a storage server, comprising the following steps:

[0038] Step 1: Configure N working machines and 1 hot standby machine;

[0039] The specific method of step 1 is:

[0040] Configure N working machines and 1 hot standby machine. Each working machine is configured with two IPs, one of which is a fixed IP and the other is a variable virtual IP. The fixed IP is used for communication between the working machine and the hot standby machine, and the virtual IP is used for communication between the working machine and the monitoring platform. The monitoring platform realizes video query, playback and download functions by connecting to the virtual IP.

[0041] The configuration list of the hot standby machine needs to save both the fixed IP and virtual IP of the working machine.

[0042] Step 2: After the working machine and the hot standby machine are started, the hot standby machine obtains the video configuration information of each working machine, saves it locally, and periodically checks and updates the video configuration file of each working machine to see if there is any change;

[0043] like Figure 2 As shown, the specific steps of step 2 include:

[0044] (1) After the working machine and the hot standby machine are started, the hot standby machine periodically obtains the recording configuration information of each working machine through the http protocol and saves it locally on the hot standby machine; at the same time, it resolves the MAC address of the working machine through the ARP protocol and saves it locally on the hot standby machine;

[0045] (2) When the hot standby machine obtains the configuration of the working machine, it determines whether the recording configuration file of each working machine has changed by comparing the file md5 value. If there is a change, the local backup configuration file is updated in time.

[0046] Step 3: When the working machine does not record, the hot standby machine controls the working machine to cancel the virtual IP, and the hot standby machine sets the virtual IP of the working machine, and updates the stored recording configuration file to the configuration file of the working machine to start recording;

[0047] like Figure 2 As shown, the specific method of step 3 is:

[0048] When the hot standby machine detects that one of the working machines is not recording, it starts hot standby switching. The hot standby machine controls the host to cancel the local virtual IP, the working machine goes offline, and the hot standby machine sets its own virtual IP to the virtual IP of the offline working machine to complete the IP switching. At the same time, the hot standby machine updates the configuration file to the configuration file of the offline working machine and starts recording.

[0049] After the switch is completed, the platform can preview the video and play back the switched recording normally.

[0050] Step 4: When the working machine is down or the network is disconnected, the hot standby machine directly sets the virtual IP of the working machine and updates the configuration file to the configuration file of the down working machine to start recording;

[0051] The specific method of step 4 is:

[0052] When the hot standby machine detects that one of the working machines is down or the network is unavailable, the hot standby machine directly sets the virtual IP of the down working machine to complete the IP switch; at the same time, it updates the configuration file to the configuration file of the down working machine and starts recording.

[0053] After the switch is completed, the platform can preview the video and play back the switched recording normally.

[0054] Step 5: After the work machine is online, restore the recording of the work machine.

[0055] like Figure 4 As shown, the specific method of step 5 is:

[0056] After the offline working machine resumes work, the hot standby machine detects the IP address conflict and compares whether the MAC is that of the offline working machine. If so, the hot standby machine cancels the working machine's virtual IP, stops recording, restores the hot standby machine's virtual IP, and completes the IP switching; the hot standby machine starts the video upload program to search for local videos, uploads the videos to the offline working machine, and restores the working machine's videos.

[0057] It should be emphasized that the embodiments described in the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation manner. Any other implementation manners derived by those skilled in the art based on the technical solution of the present invention also fall within the scope of protection of the present invention.

Claims

1. A method for N+1 hot standby and IP dynamic switching of a storage server, characterized in that: The following steps are involved: Step 1: Configure N working machines and 1 hot standby machine; Step 2: After the working machine and the hot standby machine are started, the hot standby machine obtains the video configuration information of each working machine, saves it locally, and periodically checks and updates the video configuration file of each working machine to see if there is any change; Step 3: When the working machine does not record, the hot standby machine controls the working machine to cancel the virtual IP, and the hot standby machine sets the virtual IP of the working machine, and updates the stored recording configuration file to the configuration file of the working machine to start recording; Step 4: When the working machine is down or the network is disconnected, the hot standby machine directly sets the virtual IP of the working machine and updates the configuration file to the configuration file of the down working machine to start recording; Step 5: After the work machine is online, restore the recording of the work machine.

2. The N+1 hot standby and IP dynamic switching method of a storage server according to claim 1, characterized in that: The specific method of step 1 is: Configure N working machines and 1 hot standby machine. Each working machine is configured with two IPs, one of which is a fixed IP and the other is a variable virtual IP. The fixed IP is used for communication between the working machine and the hot standby machine, and the virtual IP is used for communication between the working machine and the monitoring platform. The monitoring platform realizes video query, playback and download functions by connecting to the virtual IP. The configuration list of the hot standby machine needs to save both the fixed IP and virtual IP of the working machine.

3. The N+1 hot standby and IP dynamic switching method of a storage server according to claim 1, characterized in that: The specific steps of step 2 include: (1) After the working machine and the hot standby machine are started, the hot standby machine periodically obtains the recording configuration information of each working machine through the http protocol and saves it locally on the hot standby machine; at the same time, it resolves the MAC address of the working machine through the ARP protocol and saves it locally on the hot standby machine; (2) When the hot standby machine obtains the configuration of the working machine, it determines whether the recording configuration file of each working machine has changed by comparing the file md5 value. If there is a change, the local backup configuration file is updated in time.

4. The N+1 hot standby and IP dynamic switching method of a storage server according to claim 1, characterized in that: The specific method of step 3 is: When the hot standby machine detects that one of the working machines is not recording, it starts hot standby switching. The hot standby machine controls the host to cancel the local virtual IP, the working machine goes offline, and the hot standby machine sets its own virtual IP to the virtual IP of the offline working machine to complete the IP switching. At the same time, the hot standby machine updates the configuration file to the configuration file of the offline working machine and starts recording. After the switch is completed, the platform can preview the video and play back the switched recording normally.

5. The N+1 hot standby and IP dynamic switching method of a storage server according to claim 1, characterized in that: The specific method of step 4 is: When the hot standby machine detects that one of the working machines is down or the network is disconnected, the hot standby machine directly sets the virtual IP of the down working machine to complete the IP switch; at the same time, it updates the configuration file to the configuration file of the down working machine and starts recording; After the switch is completed, the platform can preview the video and play back the switched recording normally.

6. The N+1 hot standby and IP dynamic switching method of a storage server according to claim 1, characterized in that: The specific method of step 5 is: After the offline working machine resumes work, the hot standby machine detects the IP address conflict and compares whether the MAC is that of the offline working machine. If so, the hot standby machine cancels the working machine's virtual IP, stops recording, restores the hot standby machine's virtual IP, and completes the IP switching; the hot standby machine starts the video upload program to search for local videos, uploads the videos to the offline working machine, and restores the working machine's videos.