Disclosure of Invention
The invention provides a power monitoring big data backup method and a power monitoring big data backup system, which are used for solving the problems that a terminal of a department of a unit cannot continue data backup because of data backup suspension pause caused by faults:
a power monitoring big data backup method is provided, a data management terminal of a power monitoring system comprises a plurality of data storage areas formed by taking data types as division principles, and the method comprises the following steps:
when the data management terminal detects that the data storage amount in the data storage area exceeds a preset storage amount threshold value, sending a data backup instruction to each unit department terminal of data calling and application of the data storage area exceeding the storage amount threshold value; after receiving the data backup instruction, each unit department performs data extraction on a data management terminal, acquires data to be backed up, and uploads the data to be backed up to a network disk corresponding to the unit department terminal for data backup; the data transmitted by the power monitoring system and stored in the data storage area are marked with data generation dates;
monitoring the data backup process of the unit department terminal in real time in the data backup process of each unit department terminal, and judging whether the data backup process of the unit department terminal is stopped or not;
when the data backup of the unit department terminal is stopped, judging whether the unit department terminal completes normal data backup according to whether the unit department terminal sends a data backup completion receipt;
when the data management terminal monitors that the unit department terminal does not finish data backup, the data management terminal sends the data which are not backed up and left at the unit department terminal to a data uploading module corresponding to the data management terminal, and the data which are not backed up and left at the unit department terminal are uploaded to a network disk corresponding to the unit department terminal through the data uploading module.
The data management terminal manages and stores the power operation data acquired by the power monitoring system, and supports each unit department to inquire, extract and call the required power monitoring data through the unit department terminal.
Further, when the data backup of the unit department terminal is stopped under monitoring, whether the unit department terminal normally completes the data backup is judged according to whether the unit department terminal sends a data backup completion receipt; the method comprises the following steps:
when the data backup of the unit department terminal is monitored to stop, the data management terminal determines whether a receipt for completing the data backup sent by the unit department terminal is received within a preset receipt receiving time period;
when the receipt for completing the data backup is received, stopping monitoring the unit department terminal aiming at the data backup process;
and when the data management terminal does not receive the receipt for completing the data backup sent by the unit department terminal within the receipt receiving time period, determining whether the unit department terminal completes the data backup according to the data backup condition of the unit department terminal.
Further, when the data management terminal does not receive a receipt for completing data backup sent by the unit department terminal within the receipt receiving time period, determining whether the unit department terminal completes data backup according to the data backup situation of the unit department terminal, including:
scanning the network disk data corresponding to the unit department terminal, and acquiring the backup quantity corresponding to the backup data currently uploaded to the network disk by the unit department terminal;
comparing the data volume corresponding to the backup data currently uploaded to the network disk by the unit department terminal with the data volume corresponding to the data to be backed up acquired by the unit department from the extracted data management terminal; if the data volume corresponding to the backup data uploaded to the network disk by the unit department terminal is the same as the data volume corresponding to the data to be backed up, determining that the unit department terminal completes data backup; if the data quantity corresponding to the backup data currently uploaded to the network disk by the unit department terminal is less than the data quantity corresponding to the data to be backed up, determining that the unit department terminal does not complete data backup;
after the data management terminal determines that the unit department terminal completes data backup, the data management terminal stops monitoring the unit department terminal for a data backup process and generates a data backup completion record sheet corresponding to the unit department terminal; when the unit department terminal eliminates the fault to generate a finished data backup receipt and sends the finished data backup receipt to the data management terminal, the finished data backup receipt replaces the data backup finishing record list;
after the data management terminal determines that the unit department terminal does not finish data backup, scanning a network disk corresponding to the unit department terminal, and acquiring a data generation date marked in data correspondingly stored in the network disk when the unit department terminal stops data uploading, wherein the data generation date is used as a node date;
the data management terminal packs all data to be backed up between the node date and the data generation date of the backup cut-off data corresponding to the data to be backed up of the department terminal into unfinished backup data packets and sends the unfinished backup data packets to the data uploading module; and simultaneously, sending a data uploading continuing instruction to a network disk corresponding to the terminal of the department of the unit.
Further, when the data management terminal monitors that the unit department terminal does not complete data backup, the data management terminal sends the data of the unit department terminal left without backup to a data uploading module corresponding to the data management terminal, and uploads the data of the unit department terminal left without backup to a network disk corresponding to the unit department terminal through the data uploading module, including:
after the network disk corresponding to the unit department terminal receives the data uploading continuing instruction, generating a dynamic verification code by using a network disk login password and a data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data, and sending the dynamic verification code to a background server of the power monitoring system;
after the background server receives the dynamic verification code, the dynamic verification code is locked, and the locked dynamic verification code is only allowed to be sent and is not allowed to be accessed and extracted;
after receiving the unfinished backup data packet, the data uploading module sends a dynamic verification code acquisition request to a background server and performs security authentication with the background server; when the data uploading module passes the safety certification of the background server, the dynamic verification code is sent to the data uploading module;
the data uploading module sends the dynamic verification code to the network disk, and the dynamic verification code sent by the data uploading module is compared with the dynamic verification code generated by the network disk for the last time through the network disk;
when the dynamic verification code sent by the data uploading module is consistent with the dynamic verification code generated by the network disk for the last time, the network disk and the data uploading module establish data transmission; after the network disk and the data uploading module establish data transmission, the data uploading module uploads the data in the unfinished backup data packet to the network disk.
When the dynamic verification code sent by the data uploading module by the network disk is inconsistent with the dynamic verification code generated by the network disk for the last time, the network disk refuses to establish data transmission with the data uploading module; after receiving a request of refusing to establish data transmission from the network disk, the data uploading module acquires the latest dynamic verification code from the background again and performs security authentication with the network disk, if the data uploading module does not pass the security authentication of the network disk for three times continuously, the data uploading module defaults to no longer perform data uploading on unfinished backup data packets, and the unfinished backup data packets are reserved; meanwhile, sending a data backup receipt finished by the department terminal to the data management terminal; and after the terminal of the department of the unit recovers the data uploading function again, the unfinished backup data packet is called from the data uploading module terminal, and the data in the unfinished backup data packet is uploaded to the network disk.
Further, after the network disk corresponding to the unit department terminal receives the instruction of continuing to upload data, a dynamic verification code is generated by the network disk login password and the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data, and the dynamic verification code is sent to a background server of the power monitoring system, and the method includes the following steps:
the method comprises the following steps that a dynamic verification code is generated by a network disk at a preset time interval by utilizing a network disk login password and a data generation date marked in data correspondingly stored in the network disk when a unit department terminal stops uploading the data, and the newly generated dynamic verification code is sent to a background server, wherein the dynamic verification code is generated by the following formula:
wherein Hn Represents the generated dynamic authentication code, and Hn Is an upward rounding function; a represents the number corresponding to the year in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; b represents the number corresponding to the month in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; c represents the number corresponding to the date of data generation marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; h represents the sum of the digital parts in the network disk login password; n represents the generation times of the current dynamic verification code; hn-1 Represents the dynamic verification code generated at the n-1 th time, and when n is equal to 1, Hn-1 (1.5A +2B)/(2B + 0.5C); a represents the number corresponding to the clock of the corresponding time generated by the current generated dynamic verification code, wherein the clock is defined by a 24-hour rule; b represents the number corresponding to the second of the corresponding time generated by the current dynamic verification code; delta T represents the time interval of the dynamic verification code replacement of the network disk;
and after receiving the newly generated dynamic verification code, the background server replaces the original dynamic verification code with the newly generated dynamic verification code and deletes the original dynamic verification code.
A power monitoring big data backup system is provided, a data management terminal of the power monitoring system comprises a plurality of data storage areas formed by taking data types as division principles, and the big data backup system comprises:
the backup module is used for sending a data backup instruction to each unit department terminal for data calling and application in the data storage area exceeding the storage threshold when the data management terminal detects that the data storage amount in the data storage area exceeds the preset storage threshold; after receiving the data backup instruction, each unit department performs data extraction on a data management terminal, and after acquiring data to be backed up, the data to be backed up is uploaded to a network disk corresponding to the unit department terminal for data backup; the data transmitted by the power monitoring system and stored in the data storage area are marked with data generation dates;
the first judging module is used for monitoring the data backup process of the unit department terminal in real time in the data backup process of each unit department terminal and judging whether the data backup process of the unit department terminal is stopped or not;
a second judging module, when the data backup of the unit department terminal is stopped, judging whether the unit department terminal normally completes the data backup according to whether the unit department terminal sends a data backup completion receipt;
and the sending module is used for sending the data which are not backed up and remain in the unit department terminal to the data uploading module corresponding to the data management terminal by the data management terminal when the data management terminal monitors that the unit department terminal does not finish data backup, and uploading the data which are not backed up and remain in the unit department terminal to the network disk corresponding to the unit department terminal by the data uploading module.
The data management terminal manages and stores the power operation data acquired by the power monitoring system, and supports each unit department to inquire, extract and call the required power monitoring data through the unit department terminal.
Further, the second determining module includes:
the receipt determining module is used for determining whether a receipt for completing data backup sent by the unit department terminal is received within a preset receipt receiving time period or not by the data management terminal when the data backup of the unit department terminal is monitored to be stopped;
the stopping module is used for stopping monitoring the unit department terminal aiming at the data backup process when the receipt for completing the data backup is received;
and the completion determining module is used for determining whether the unit department terminal completes data backup according to the data backup condition of the unit department terminal when the data management terminal does not receive the completion data backup receipt sent by the unit department terminal in the receipt receiving time period.
Further, the completion determination module includes:
the scanning module is used for scanning the network disk data corresponding to the unit department terminal and acquiring the backup quantity corresponding to the backup data currently uploaded to the network disk by the unit department terminal;
the comparison and judgment module is used for comparing the data volume corresponding to the backup data currently uploaded to the network disk by the unit department terminal with the data volume corresponding to the data to be backed up acquired by the unit department from the extracted data management terminal; if the data volume corresponding to the backup data uploaded to the network disk by the unit department terminal is the same as the data volume corresponding to the data to be backed up, determining that the unit department terminal completes data backup; if the data volume corresponding to the backup data uploaded to the network disk by the unit department terminal currently is less than the data volume corresponding to the data to be backed up, determining that the unit department terminal does not complete data backup;
the data management terminal is used for determining whether the unit department terminal completes data backup or not, and then monitoring the unit department terminal for a data backup process; when the unit department terminal eliminates the fault to generate a finished data backup receipt and sends the finished data backup receipt to the data management terminal, the finished data backup receipt replaces the data backup finishing record list;
a generation date acquisition module, configured to scan a network disk corresponding to the unit department terminal after the data management terminal determines that the unit department terminal does not complete data backup, acquire a data generation date labeled in data stored in the network disk correspondingly when the unit department terminal stops data uploading, and use the data generation date as a node date; the data backup principle is that backup is carried out according to the time sequence of data generation;
the data management terminal is used for receiving the data to be backed up from the node date to the data generation date of the backup cut-off data corresponding to the data to be backed up required by the department terminal, and sending the data to the data uploading module; and simultaneously, sending a data uploading continuing instruction to a network disk corresponding to the terminal of the department of the unit.
Further, the sending module includes:
the verification code generation module is used for generating a dynamic verification code by using a network disk login password corresponding to the unit department terminal and a data generation date marked in data correspondingly stored in the network disk when the unit department terminal stops uploading the data after the network disk corresponding to the unit department terminal receives a data uploading continuing instruction, and sending the dynamic verification code to a background server of the power monitoring system;
the locking module is used for locking the dynamic verification code after the background server receives the dynamic verification code, and the locked dynamic verification code is only allowed to be sent but not to be accessed and extracted;
the safety authentication module is used for sending a dynamic verification code acquisition request to a background server after the data uploading module receives the unfinished backup data packet, and carrying out safety authentication with the background server; when the data uploading module passes the safety certification of the background server, the dynamic verification code is sent to the data uploading module;
the comparison module is used for sending the dynamic verification code to the network disk by the data uploading module and comparing the dynamic verification code sent by the data uploading module with the dynamic verification code generated by the network disk for the last time by the network disk;
the establishing module is used for establishing data transmission between the network disk and the data uploading module when the dynamic verification code sent by the data uploading module by the network disk is consistent with the dynamic verification code generated by the network disk for the last time; after the network disk and the data uploading module establish data transmission, the data uploading module uploads the data in the unfinished backup data packet to the network disk.
When the dynamic verification code sent by the data uploading module by the network disk is inconsistent with the dynamic verification code generated by the network disk for the last time, the network disk refuses to establish data transmission with the data uploading module; after receiving a request of refusing to establish data transmission from the network disk, the data uploading module acquires the latest dynamic verification code from the background again and performs security authentication with the network disk, if the data uploading module does not pass the security authentication of the network disk for three times continuously, the default is that data uploading is not performed on unfinished backup data packets any more, and the unfinished backup data packets are reserved; meanwhile, sending a data backup receipt finished by the department terminal to the data management terminal; and after the terminal of the department of the unit recovers the data uploading function again, the unfinished backup data packet is called from the data uploading module terminal, and the data in the unfinished backup data packet is uploaded to the network disk.
Further, the verification code generation module includes:
the generating module is used for generating a dynamic verification code by using a network disk login password and a data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data at a preset time interval by the network disk, and sending the newly generated dynamic verification code to the background server, wherein the dynamic verification code is generated by the following formula:
wherein Hn Represents the generated dynamic authentication code, and Hn Is an upward rounding function; a represents the number corresponding to the year in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; b represents the number corresponding to the month in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; c represents the mark in the data correspondingly stored in the network disk when the unit department terminal stops uploading the dataThe date of generation of the data of (a) is a number corresponding to the date of generation of the date; h represents the sum of the digital parts in the network disk login password; n represents the generation times of the current dynamic verification code; hn-1 Represents the dynamic verification code generated at the (n-1) th time, and when n is equal to 1, Hn-1 (1.5A +2B)/(2B + 0.5C); a represents the number corresponding to the clock of the corresponding time generated by the current generated dynamic verification code, wherein the clock is defined by a 24-hour rule; b represents the number corresponding to the second of the corresponding time generated by the current dynamic verification code; delta T represents the time interval of the dynamic verification code replacement of the network disk;
and the replacing module is used for replacing the original dynamic verification code by using the newly generated dynamic verification code and deleting the original dynamic verification code after the background server receives the newly generated dynamic verification code.
The invention has the beneficial effects that:
in the method and the system for backing up the big data of the power monitoring system, when a unit department terminal cannot complete the current data backup due to faults, unfinished backup data is stored in an independent data uploading module and bypasses a unit department terminal machine to upload the independent data of a network disk corresponding to the unit department terminal until the data backup work corresponding to the unit department terminal is completed. By the method, when a data long-distance transmission fault occurs at a terminal of a department of a unit, data backup can still be completed through the third-party independent module, the data backup efficiency and the success rate are effectively improved, the data which need to be deleted in the data management terminal after the data storage area of the data management terminal exceeds the storage capacity threshold can be achieved, and 100% of data backup at the terminal of the department of the unit can be achieved.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
The invention provides an efficient power monitoring big data backup method, a data management terminal of a power monitoring system comprises a plurality of data storage areas formed by taking data types as division principles, and the method comprises the following steps:
s1, when the data management terminal detects that the data storage quantity in the data storage area exceeds a preset storage quantity threshold value, sending a data backup instruction to each unit department terminal of data calling and application of the data storage area exceeding the storage quantity threshold value; after receiving the data backup instruction, each unit department performs data extraction on a data management terminal, and after acquiring data to be backed up, the data to be backed up is uploaded to a network disk corresponding to the unit department terminal for data backup; the data transmitted by the power monitoring system and stored in the data storage area are marked with data generation dates;
s2, monitoring the data backup process of the unit department terminal in real time in the process of data backup of each unit department terminal, and judging whether the data backup process of the unit department terminal is stopped or not;
s3, when the data backup of the unit department terminal is monitored to stop, judging whether the unit department terminal completes the normal data backup according to whether the unit department terminal sends a data backup completion receipt;
and S4, when the data management terminal monitors that the unit department terminal does not finish data backup, the data management terminal sends the data which are not backed up and are left by the unit department terminal to a data uploading module corresponding to the data management terminal, and the data which are not backed up and are left by the unit department terminal are uploaded to a network disk corresponding to the unit department terminal through the data uploading module.
The data management terminal manages and stores the power operation data acquired by the power monitoring system, and supports each unit department to inquire, extract and call the required power monitoring data through the unit department terminal.
The effect of the above technical scheme is as follows: in the constitution of backup of big data of the power monitoring system, when a unit department terminal cannot complete current data backup due to failure, unfinished backup data is stored in an independent data uploading module and bypasses a unit department terminal machine to upload independent data to a network disk corresponding to the unit department terminal until the data backup work corresponding to the unit department terminal is completed. By the method, when a data long-distance transmission fault occurs at a terminal of a department of a unit, data backup can still be completed through the third-party independent module, so that the data backup efficiency and the success rate are effectively improved, the data which needs to be deleted in the data management terminal after a data storage area of the data management terminal exceeds a storage threshold value can be obtained, and 100% of data backup interrupted at the department of the unit can be realized.
According to one embodiment of the present invention, when it is monitored that the data backup of the unit department terminal is stopped, whether the unit department terminal normally completes the data backup is determined according to whether the unit department terminal sends a data backup completion receipt; the method comprises the following steps:
s301, when monitoring that the data backup of the unit department terminal is stopped, the data management terminal determines whether a receipt for completing the data backup sent by the unit department terminal is received within a preset receipt receiving time period;
s302, when the receipt for completing the data backup is received, stopping monitoring the data backup process of the unit department terminal;
and S303, when the data management terminal does not receive the receipt for completing the data backup sent by the unit department terminal in the receipt receiving time period, determining whether the unit department terminal completes the data backup according to the data backup condition of the unit department terminal.
When the data management terminal does not receive the receipt for completing the data backup sent by the unit department terminal within the receipt receiving time period, determining whether the unit department terminal completes the data backup according to the data backup condition of the unit department terminal, wherein the step of determining whether the unit department terminal completes the data backup comprises the following steps:
s3031, scanning the network disk data corresponding to the unit department terminal, and acquiring the backup quantity corresponding to the backup data currently uploaded to the network disk by the unit department terminal;
s3032, comparing the data volume corresponding to the backup data currently uploaded to the network disk by the unit department terminal with the data volume corresponding to the data to be backed up acquired by the unit department from the extracted data management terminal; if the data volume corresponding to the backup data uploaded to the network disk by the unit department terminal is the same as the data volume corresponding to the data to be backed up, determining that the unit department terminal completes data backup; if the data volume corresponding to the backup data uploaded to the network disk by the unit department terminal currently is less than the data volume corresponding to the data to be backed up, determining that the unit department terminal does not complete data backup;
s3033, after the data management terminal determines that the unit department terminal completes data backup, the data management terminal stops monitoring the unit department terminal for a data backup process and generates a data backup completion record sheet corresponding to the unit department terminal; when the unit department terminal eliminates the fault to generate a finished data backup receipt and sends the finished data backup receipt to the data management terminal, the finished data backup receipt replaces the data backup finishing record list;
s3034, after the data management terminal determines that the unit department terminal does not finish data backup, scanning a network disk corresponding to the unit department terminal, and acquiring data generation date marked in data correspondingly stored in the network disk when the unit department terminal stops data uploading, wherein the data generation date is used as a node date;
s3035, the data management terminal packs all data to be backed up between the node date and the data generation date of the backup cut-off data corresponding to the data to be backed up required by the unit department terminal into unfinished backup data packets, and sends the unfinished backup data packets to the data uploading module; and simultaneously, sending a data uploading continuing instruction to a network disk corresponding to the terminal of the department of the unit.
The effect of the above technical scheme is: the accuracy of detection whether the backup data is completed or not is effectively improved, all data corresponding to the detected node date are contained in the data packet for completing the backup, data omission can be effectively avoided, incomplete data backup is prevented, and the integrity of the data backup is effectively improved.
In an embodiment of the present invention, when the data management terminal monitors that the unit department terminal does not complete data backup, the data management terminal sends the remaining data that is not backed up by the unit department terminal to a data uploading module corresponding to the data management terminal, and uploads the remaining data that is not backed up by the data uploading module to a network disk corresponding to the unit department terminal, the method includes:
s401, after receiving a data uploading continuing instruction, a network disk corresponding to the unit department terminal generates a dynamic verification code by a network disk login password and a data generation date marked in data correspondingly stored in the network disk when the unit department terminal stops uploading the data, and sends the dynamic verification code to a background server of the power monitoring system;
s402, after receiving the dynamic verification code, the background server locks the dynamic verification code, and the locked dynamic verification code is only allowed to be sent and is not allowed to be accessed and extracted;
s403, after receiving the unfinished backup data packet, the data uploading module sends a dynamic verification code acquisition request to a background server, and performs security authentication with the background server; when the data uploading module passes the safety certification of the background server, the dynamic verification code is sent to the data uploading module;
s404, the data uploading module sends the dynamic verification code to the network disk, and the dynamic verification code sent by the data uploading module is compared with the dynamic verification code generated by the network disk for the last time through the network disk;
s405, when the dynamic verification code sent by the data uploading module is consistent with the dynamic verification code generated by the network disk for the last time, the network disk and the data uploading module establish data transmission; after the network disk and the data uploading module establish data transmission, the data uploading module uploads the data in the unfinished backup data packet to the network disk.
When the dynamic verification code sent by the data uploading module by the network disk is inconsistent with the dynamic verification code generated by the network disk for the last time, the network disk refuses to establish data transmission with the data uploading module; after receiving a request of refusing to establish data transmission from the network disk, the data uploading module acquires the latest dynamic verification code from the background again and performs security authentication with the network disk, if the data uploading module does not pass the security authentication of the network disk for three times continuously, the default is that data uploading is not performed on unfinished backup data packets any more, and the unfinished backup data packets are reserved; meanwhile, sending a data backup receipt finished by the department terminal to the data management terminal; and after the terminal of the department of the unit recovers the data uploading function again, the unfinished backup data packet is called from the terminal of the data uploading module, and the data in the unfinished backup data packet is uploaded to the network disk.
After receiving a data uploading continuing instruction, the network disk corresponding to the unit department terminal generates a dynamic verification code by using a network disk login password and data generation date marked in data correspondingly stored in the network disk when the unit department terminal stops uploading the data, and sends the dynamic verification code to a background server of the power monitoring system, and the method comprises the following steps:
s4011, the network disk generates a dynamic verification code at preset time intervals by using a network disk login password and a data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data, and transmits the newly generated dynamic verification code to a background server, wherein the dynamic verification code is generated by the following formula:
wherein Hn Represents the generated dynamic authentication code, and Hn Is an upward rounding function; a represents a number corresponding to the year in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; b represents the number corresponding to the month in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; c represents the number corresponding to the date of data generation marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; h represents the sum of the digital parts in the network disk login password; n represents the generation times of the current dynamic verification code; hn-1 Represents the dynamic verification code generated at the n-1 th time, and when n is equal to 1, Hn-1 (1.5A +2B)/(2B + 0.5C); a represents the number corresponding to the clock of the corresponding time generated by the current generated dynamic verification code, wherein the clock is defined by a 24-hour rule; b represents the number corresponding to the second of the corresponding time generated by the current dynamic verification code; delta T represents the time interval of the dynamic verification code replacement of the network disk;
s4012, after receiving the newly generated dynamic verification code, the background server replaces the original dynamic verification code with the newly generated dynamic verification code and deletes the original dynamic verification code.
The effect of the above technical scheme is as follows: when the unit department terminal cannot complete the current data backup due to the failure, the uncompleted backup data is stored in an independent data uploading module and bypasses a unit department terminal machine, and the network disk corresponding to the unit department terminal is uploaded with independent data until the data backup work corresponding to the unit department terminal is completed. By the method, when a data long-distance transmission fault occurs at a terminal of a department of a unit, data backup can still be completed through the third-party independent module, so that the data backup efficiency and the success rate are effectively improved, the data which needs to be deleted in the data management terminal after a data storage area of the data management terminal exceeds a storage threshold value can be obtained, and 100% of data backup interrupted at the department of the unit can be realized.
Meanwhile, the security authentication mode between the data uploading module and the network disk can effectively improve the security of data transmission, and prevent other malicious third parties from obtaining the dynamic verification code and logging in the network disk to steal the data in the network disk. On the other hand, the dynamic verification code obtained by the formula can be generated by combining the node date and the dynamic time when the data uploading is stopped, so that the random variability and the generation flexibility of the dynamic verification code are effectively improved, the generation rule of the dynamic verification code obtained by a malicious third party can be effectively prevented from imitating the generation of the dynamic verification code, and the safety and the reliability of data transmission are further effectively improved.
An embodiment of the present invention provides an efficient power monitoring big data backup system, and as shown in fig. 2, a data management terminal of the power monitoring system includes a plurality of data storage areas formed by using data types as division principles, and the big data backup system includes:
the backup module is used for sending a data backup instruction to each unit department terminal for data calling and application in the data storage area exceeding the storage threshold when the data management terminal detects that the data storage amount in the data storage area exceeds the preset storage threshold; after receiving the data backup instruction, each unit department performs data extraction on a data management terminal, and after acquiring data to be backed up, the data to be backed up is uploaded to a network disk corresponding to the unit department terminal for data backup; the data transmitted by the power monitoring system and stored in the data storage area are marked with data generation dates;
the first judging module is used for monitoring the data backup process of the unit department terminal in real time in the data backup process of each unit department terminal and judging whether the data backup process of the unit department terminal is stopped or not;
a second judging module, when the data backup of the unit department terminal is stopped, judging whether the unit department terminal normally completes the data backup according to whether the unit department terminal sends a data backup completion receipt;
and the sending module is used for sending the data which are not backed up and remain in the unit department terminal to the data uploading module corresponding to the data management terminal by the data management terminal when the data management terminal monitors that the unit department terminal does not finish data backup, and uploading the data which are not backed up and remain in the unit department terminal to the network disk corresponding to the unit department terminal by the data uploading module.
The data management terminal manages and stores the power operation data acquired by the power monitoring system, and supports each unit department to inquire, extract and call the required power monitoring data through the unit department terminal.
The second judging module comprises:
the receipt determining module is used for determining whether a receipt for completing data backup sent by the unit department terminal is received within a preset receipt receiving time period or not when the data backup of the unit department terminal is monitored to be stopped;
the stopping module is used for stopping monitoring the unit department terminal aiming at the data backup process when receiving the data backup completion receipt;
and the completion determining module is used for determining whether the unit department terminal completes data backup according to the data backup condition of the unit department terminal when the data management terminal does not receive the completion data backup receipt sent by the unit department terminal in the receipt receiving time period.
The completion determination module includes:
the scanning module is used for scanning the network disk data corresponding to the unit department terminal and acquiring the backup quantity corresponding to the backup data currently uploaded to the network disk by the unit department terminal;
the comparison and judgment module is used for comparing the data volume corresponding to the backup data currently uploaded to the network disk by the unit department terminal with the data volume corresponding to the data to be backed up acquired by the unit department from the extracted data management terminal; if the data volume corresponding to the backup data uploaded to the network disk by the unit department terminal is the same as the data volume corresponding to the data to be backed up, determining that the unit department terminal completes data backup; if the data volume corresponding to the backup data uploaded to the network disk by the unit department terminal currently is less than the data volume corresponding to the data to be backed up, determining that the unit department terminal does not complete data backup;
the data management terminal is used for determining whether the unit department terminal completes data backup or not, and generating a data backup completion record sheet corresponding to the unit department terminal; when the unit department terminal eliminates the fault to generate a finished data backup receipt and sends the finished data backup receipt to the data management terminal, the finished data backup receipt replaces the data backup finishing record list;
a generation date acquisition module, configured to scan a network disk corresponding to the unit department terminal after the data management terminal determines that the unit department terminal does not complete data backup, acquire a data generation date labeled in data stored in the network disk correspondingly when the unit department terminal stops data uploading, and use the data generation date as a node date; the data backup principle is that backup is carried out according to the time sequence of data generation;
the data management terminal is used for receiving the data to be backed up from the node date to the data generation date of the backup cut-off data corresponding to the data to be backed up required by the unit department terminal, and sending the data to the data uploading module; and simultaneously, sending a data uploading continuing instruction to a network disk corresponding to the terminal of the department of the unit.
The sending module comprises:
the verification code generation module is used for generating a dynamic verification code by using a network disk login password corresponding to the unit department terminal and a data generation date marked in data correspondingly stored in the network disk when the unit department terminal stops uploading the data after the network disk corresponding to the unit department terminal receives a data uploading continuing instruction, and sending the dynamic verification code to a background server of the power monitoring system;
the locking module is used for locking the dynamic verification code after the background server receives the dynamic verification code, and the locked dynamic verification code is only allowed to be sent and is not allowed to be accessed and extracted;
the safety certification module is used for sending a dynamic verification code acquisition request to a background server after the data uploading module receives the unfinished backup data packet, and carrying out safety certification on the data uploading module and the background server; when the data uploading module passes the safety certification of the background server, the dynamic verification code is sent to the data uploading module;
the comparison module is used for sending the dynamic verification code to the network disk by the data uploading module and comparing the dynamic verification code sent by the data uploading module with the dynamic verification code generated by the network disk for the last time by the network disk;
the establishing module is used for establishing data transmission between the network disk and the data uploading module when the dynamic verification code sent by the data uploading module by the network disk is consistent with the dynamic verification code generated by the network disk for the last time; after the network disk and the data uploading module establish data transmission, the data uploading module uploads the data in the unfinished backup data packet to the network disk.
When the dynamic verification code sent by the data uploading module by the network disk is inconsistent with the dynamic verification code generated by the network disk for the last time, the network disk refuses to establish data transmission with the data uploading module; after receiving a request of refusing to establish data transmission from the network disk, the data uploading module acquires the latest dynamic verification code from the background again and performs security authentication with the network disk, if the data uploading module does not pass the security authentication of the network disk for three times continuously, the default is that data uploading is not performed on unfinished backup data packets any more, and the unfinished backup data packets are reserved; meanwhile, sending a data backup receipt finished by the department terminal to the data management terminal; and after the terminal of the department of the unit recovers the data uploading function again, the unfinished backup data packet is called from the data uploading module terminal, and the data in the unfinished backup data packet is uploaded to the network disk.
The verification code generation module comprises:
the generating module is used for generating a dynamic verification code by using a network disk login password and a data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data at a preset time interval by the network disk, and sending the newly generated dynamic verification code to the background server, wherein the dynamic verification code is generated by the following formula:
wherein Hn Represents the generated dynamic authentication code, and Hn Is an upward rounding function; a represents a number corresponding to the year in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; b represents the number corresponding to the month in the data generation date marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; c represents the number corresponding to the date of data generation marked in the data correspondingly stored in the network disk when the unit department terminal stops uploading the data; h represents the sum of the digital parts in the network disk login password; n represents the generation times of the current dynamic verification code; hn-1 Represents the dynamic verification code generated at the n-1 th time, and when n is equal to 1, Hn-1 (1.5A +2B)/(2B + 0.5C); a represents the number corresponding to the clock of the corresponding time generated by the current generated dynamic verification code, wherein the clock is defined by a 24-hour rule; b representsA number corresponding to seconds corresponding to the time generated by the current dynamic verification code; delta T represents the time interval of the dynamic verification code replacement of the network disk;
and the replacing module is used for replacing the original dynamic verification code by using the newly generated dynamic verification code and deleting the original dynamic verification code after the background server receives the newly generated dynamic verification code.
The effect of the above technical scheme is: in the big data backup system of the power monitoring system, in the constitution of backup of big data of the power monitoring system, when a unit department terminal cannot complete current data backup due to a fault, unfinished backup data is stored in an independent data uploading module and bypasses a unit department terminal machine, and independent data uploading is performed on a network disk corresponding to the unit department terminal until data backup work corresponding to the unit department terminal is completed. By the method, when a data long-distance transmission fault occurs at a terminal of a department of a unit, data backup can still be completed through the third-party independent module, the data backup efficiency and the success rate are effectively improved, the data which need to be deleted in the data management terminal after the data storage area of the data management terminal exceeds the storage capacity threshold can be achieved, and 100% of data backup interrupted in the department of the unit can be achieved.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.