Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for analyzing power data, which are used for performing statistical analysis on real-time load and real-time temperature of a distribution line to improve power supply safety.
In a first aspect, the present invention provides a power data analysis method, including the steps of:
acquiring power data of the distribution line to be detected at preset time intervals T1, wherein the power data comprise the temperature, the current and the voltage of the distribution line to be detected, and the power parameters corresponding to the temperature, the current and the voltage of the distribution line to be detected are the temperature parameter, the current parameter and the voltage parameter of the distribution line to be detected in sequence;
correspondingly judging whether each acquired power data is located in a corresponding preset data threshold range, writing the power data judged to be yes into a first storage unit, and writing the power data judged to be no into a second storage unit;
for each power parameter: each time it is determined that the collected power data of the power parameter is not within the corresponding preset data threshold range, the total number of the power data corresponding to the power parameter collected in the past preset time period T2 and not within the preset data threshold range corresponding to the power parameter is counted, and it is determined whether the total number reaches the preset number threshold corresponding to the power parameter: if the electric power parameter is judged to be reached, all the electric power data of the electric power parameter stored in the second storage unit are pushed to preset electric power workers, and all the electric power data of the electric power parameter stored in the second storage unit are transferred to the first storage unit;
uploading all the power data which are not uploaded in the distribution line to be tested and stored in the first storage unit and the second storage unit to a monitoring center at intervals of a preset time length T3;
wherein, T3> T2> T1.
Further, the uploading of all the power data, which are stored in the first storage unit and the second storage unit and are not uploaded, of the distribution line to be tested to the monitoring center includes:
and uploading all the power data which are not uploaded in the distribution line to be tested and stored in the first storage unit and the second storage unit to a monitoring center by adopting an encryption technology.
Further, the encryption technology is adopted to upload all the power data, which are stored in the first storage unit and the second storage unit and are not uploaded, of the distribution line to be tested to the monitoring center, and the implementation steps are as follows:
acquiring all power data which are stored in a first storage unit and are not uploaded of the distribution line to be detected, and recording the power data as first data;
acquiring all the power data, stored in the second storage unit, of the distribution line to be tested, which are not uploaded, and recording the power data as second data;
splicing the first data and the second data to form first spliced data;
calculating a digital abstract of the first splicing data by adopting an MD5 algorithm, and recording the digital abstract as a first digital abstract;
acquiring data on a preset byte bit in the first digital abstract, and recording the data as third data;
inserting third data into the first splicing data based on a preset data inserting position to obtain second splicing data formed by the first splicing data and the third data;
encrypting the second splicing data by adopting a symmetric encryption algorithm to obtain a first ciphertext;
and uploading the first ciphertext and the first digital abstract to a monitoring center.
Further, the symmetric encryption algorithm adopts an AES algorithm.
In a second aspect, the present invention further provides a power data analysis system, including:
the power data acquisition module is used for acquiring power data of the distribution line to be detected at a preset time interval T1, wherein the power data comprises the temperature, the current and the voltage of the distribution line to be detected, and the power parameters corresponding to the temperature, the current and the voltage of the distribution line to be detected are the temperature parameter, the current parameter and the voltage parameter of the distribution line to be detected in sequence;
the judging module is used for correspondingly judging whether each acquired electric power data is located in a corresponding preset data threshold range, writing the electric power data judged to be yes into the first storage unit, and writing the electric power data judged to be no into the second storage unit;
an analysis module, configured to count, for each power parameter, a total number of power data that correspond to the power parameter and are not within a preset data threshold range corresponding to the power parameter, which are collected within a past preset time period T2, and determine whether the total number reaches a preset number threshold corresponding to the power parameter, when it is determined that the collected power data of the power parameter is not within the preset data threshold range corresponding to the collected power data: if the electric power parameter is judged to be reached, all the electric power data of the electric power parameter stored in the second storage unit are pushed to preset electric power workers, and all the electric power data of the electric power parameter stored in the second storage unit are transferred to the first storage unit;
the data uploading module is used for uploading all the power data which are stored in the first storage unit and the second storage unit and are not uploaded to the distribution line to be tested to the monitoring center at preset time intervals T3; wherein, T3> T2> T1.
Further, the data uploading module uploads all the power data, which are stored in the first storage unit and the second storage unit and are not uploaded by the distribution line to be tested, to the monitoring center by using an encryption technology.
Further, the data uploading module comprises:
the first data acquisition unit is used for acquiring all the power data, stored in the first storage unit, of the distribution line to be tested, which are not uploaded and are marked as first data;
the second data acquisition unit is used for acquiring all the power data, stored in the second storage unit, of the distribution line to be tested, which are not uploaded and are marked as second data;
the first splicing unit is used for splicing the first data and the second data to form first spliced data;
the digital abstract calculating unit is used for calculating a digital abstract of the first splicing data by adopting an MD5 algorithm, and recording the digital abstract as a first digital abstract;
a third data obtaining unit, configured to obtain data located in a preset byte position in the first digital digest, and mark the data as third data;
the data inserting unit is used for inserting third data into the first splicing data based on a preset data inserting position to obtain second splicing data formed by the first splicing data and the third data;
the encryption unit is used for encrypting the second splicing data by adopting a symmetric encryption algorithm to obtain a first ciphertext;
and the data uploading unit is used for uploading the first ciphertext and the first digital abstract to the monitoring center.
Further, the symmetric encryption algorithm adopts an AES algorithm.
In a third aspect, the present invention provides a terminal, including:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method as described in the above aspects.
In a fourth aspect, the invention provides a computer readable storage medium storing a computer program which, when executed by a processor, implements a method as described in the aspects above.
The beneficial effect of the invention is that,
(1) the electric power data analysis method, the electric power data analysis system, the electric power data analysis terminal and the storage medium provided by the invention can collect the electric power data of the distribution line to be tested once at intervals of preset time length T1, correspondingly judge whether each collected electric power data is positioned in the range of the respectively corresponding preset data threshold value, count the total number of the electric power data which are collected in the past preset time period T2 and are not positioned in the range of the preset data threshold value corresponding to the electric power parameter when each time the electric power data of the collected electric power parameter is judged to be not positioned in the range of the corresponding data threshold value, and push all the electric power data of the electric power parameter stored in the second storage unit to the preset electric power operator when the total number is judged to reach the preset number threshold value corresponding to the electric power parameter, therefore, the invention can carry out statistical analysis on the load (current and voltage of the distribution line to be detected) and the temperature of the distribution line to be detected so that related power workers can know which power data on the distribution line to be detected have problems in time, and the invention is favorable for improving the power supply safety.
(2) According to the electric power data analysis method, the electric power data analysis system, the electric power data analysis terminal and the storage medium, the third data are used in the adopted encryption technology, so that the complexity of the related first spliced data is increased to a certain extent, and the safety of data uploading in the electric power data analysis method, the electric power data analysis system, the electric power data analysis terminal and the storage medium are increased.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
As shown in fig. 1, the method 100 includes:
step 110, collecting power data of the distribution line to be detected at each preset time interval T1, wherein the power data comprise the temperature, the current and the voltage of the distribution line to be detected, and the power parameters corresponding to the temperature, the current and the voltage of the distribution line to be detected are the temperature parameter, the current parameter and the voltage parameter of the distribution line to be detected in sequence.
The time length T1 can be set by those skilled in the art according to actual needs, for example, it can be set to 0.2 second, 0.3 second, 0.6 second, etc., and it can also be set to other time lengths.
And step 120, correspondingly judging whether each piece of collected power data is located in a corresponding preset data threshold range, writing the power data judged to be yes into the first storage unit, and writing the power data judged to be no into the second storage unit.
In specific implementation, a data threshold range corresponding to each power parameter may be set in advance. For example, when the power data only includes the temperature, the current, and the voltage of the distribution line to be measured, the data threshold ranges of the temperature, the current, and the voltage of the distribution line to be measured may be preset to be the temperature threshold range 1, the current threshold range 1, and the voltage threshold range 1 in sequence.
Step 130, for each of the power parameters: each time it is determined that the collected power data of the power parameter is not within the corresponding preset data threshold range, the total number of the power data corresponding to the power parameter collected in the past preset time period T2 and not within the preset data threshold range corresponding to the power parameter is counted, and it is determined whether the total number reaches the preset number threshold corresponding to the power parameter: and if the power parameter is judged to be reached, all the power data of the power parameter stored in the second storage unit are pushed to a preset power operator, and all the power data of the power parameter stored in the second storage unit are transferred to the first storage unit.
During specific implementation, the electric power data of the electric power parameters stored in the second storage unit are all pushed to preset electric power workers, and data pushing can be specifically carried out in a short message mode, so that the relevant electric power workers can know relevant information in time, and relevant processing can be carried out in time.
In a specific implementation, a number threshold corresponding to each power parameter may be set in advance, for example, in this embodiment, the number thresholds corresponding to the temperature parameter, the current parameter, and the voltage parameter in sequence may be set to be a number threshold 1, a number threshold 2, and a number threshold 3.
For example, in step 110, the power data corresponding to the currently acquired temperature parameter is temperature 1, the power data corresponding to the acquired current parameter is current 1, and the power data corresponding to the acquired voltage parameter is voltage 1, and in step 120, it is determined that the temperature 1 is not within the temperature threshold range 1, the voltage 1 is not within the voltage threshold range 1, and the current 1 is within the current threshold range 1.
When it is determined in step 120 that temperature 1 is not within temperature threshold range 1, the following operations are performed by step 130: counting the total number of the power data (including the temperature 1) which correspond to the temperature parameter acquired in the step 110 and are not within the temperature threshold range 1 in the past preset time period T2 from the time when the temperature 1 is determined not to be within the temperature threshold range 1 in the step 120, and determining whether the total number reaches the number threshold 1: and if the temperature parameter is judged to be reached, all the power data of the temperature parameter stored in the second storage unit are pushed to a preset power operator, and all the power data of the power parameter stored in the second storage unit are transferred to the first storage unit.
When it is determined in step 120 that voltage 1 is not within the voltage threshold range 1, the following is performed by step 130: counting the total number of the power data (including the voltage 1) which are corresponding to the voltage parameter and are not in the voltage threshold range 1 and collected in the step 110 in the past preset time period T2 from the time when the voltage 1 is determined not to be in the voltage threshold range 1 in the step 120, and determining whether the total number reaches the number threshold 2: and if the voltage parameter is judged to be reached, all the power data of the voltage parameter stored in the second storage unit are pushed to a preset power operator, and all the power data of the power parameter stored in the second storage unit are transferred to the first storage unit.
When it is determined in step 120 that any collected power data is not within the corresponding predetermined data threshold range, step 130 may perform the correlation operation with reference to the temperature 1 or the voltage 1.
And 140, uploading all the power data which are not uploaded on the distribution line to be tested and stored in the first storage unit and the second storage unit to a monitoring center at intervals of a preset time length T3.
Wherein, T3> T2> T1.
The invention can upload all relevant power data to the monitoring center, and is beneficial to realizing the remote monitoring of the power data of the distribution line to be tested.
Optionally, the uploading all the power data, which are not uploaded, of the distribution line to be tested, stored in the first storage unit and the second storage unit to the monitoring center is that:
and uploading all the power data which are not uploaded in the distribution line to be tested and stored in the first storage unit and the second storage unit to a monitoring center by adopting an encryption technology.
Optionally, the encryption technology is adopted to upload all the power data, which are not uploaded, of the distribution line to be tested, stored in the first storage unit and the second storage unit to the monitoring center, and the implementation steps are as follows:
acquiring all the power data which are not uploaded and correspond to the distribution line to be detected and stored in a first storage unit, and recording the power data as first data;
acquiring all the power data which are not uploaded and are stored in a second storage unit and correspond to the distribution line to be tested, and recording the power data as second data;
splicing the first data and the second data to form first spliced data;
calculating a digital abstract of the first splicing data by adopting an MD5 algorithm, and recording the digital abstract as a first digital abstract;
acquiring data on a preset byte bit in the first digital abstract, and recording the data as third data;
inserting third data into the first splicing data based on a preset data inserting position to obtain second splicing data formed by the first splicing data and the third data;
encrypting the second splicing data by adopting a symmetric encryption algorithm to obtain a first ciphertext;
and uploading the first ciphertext and the first digital abstract to a monitoring center.
The use of the third data is helpful to increase the complexity of the first spliced data to a certain extent, thereby being helpful to increase the security of data uploading in the invention.
In the present invention, the preset byte bit may be preset to be any one byte in the first digital digest, for example, the preset byte bit may be the 3 rd byte of the first digital digest, or the preset byte bit may be the 6 th byte or other bytes of the first digital digest.
The data in one byte bit is preset to be the corresponding data in the corresponding byte. For example, when a predetermined byte is the 3 rd byte of the first digital digest, the data on the predetermined byte refers to the data corresponding to the 3 rd byte of the first digital digest.
When in use, after receiving the first ciphertext and the first digital abstract transmitted from the monitoring center: the second spliced data can be decrypted firstly, then the decrypted second spliced data is correspondingly split into the first spliced data and the third data, then the MD5 algorithm is adopted to calculate the digital abstract of the split first spliced data, then the consistency of the calculated digital abstract and the received first digital abstract is compared, after the consistency ratio pair is passed (if the consistency ratio pair is not passed, the received first ciphertext and the first digital abstract are directly discarded, and an early warning is sent out), the split first spliced data can be directly split into the corresponding first data and the corresponding second data, and then the data storage is carried out.
Optionally, the symmetric encryption algorithm employs an AES algorithm.
Fig. 2 is a diagram illustrating an embodiment of a power data analysis system according to the present invention.
As shown in fig. 2, the power data analysis system 200 includes:
the power data acquisition module 201 is configured to acquire power data of the distribution line to be detected at a preset time interval T1, where the power data includes temperature, current and voltage of the distribution line to be detected, and power parameters corresponding to the temperature, the current and the voltage of the distribution line to be detected are temperature parameters, current parameters and voltage parameters of the distribution line to be detected in sequence;
the judging module 202 is used for correspondingly judging whether each acquired power data is located in the corresponding preset data threshold range or not in the preset data threshold range, writing the power data judged to be yes into the first storage unit, and writing the power data judged to be no into the second storage unit;
the analyzing module 203 is configured to, for each power parameter, count the total number of power data, which are collected in the past preset time period T2 and are not within the preset data threshold range corresponding to the power parameter, and determine whether the total number reaches the preset number threshold corresponding to the power parameter, each time it is determined that the collected power data of the power parameter is not within the preset data threshold range corresponding to the collected power data: if the electric power parameter is judged to be reached, all the electric power data of the electric power parameter stored in the second storage unit are pushed to preset electric power workers, and all the electric power data of the electric power parameter stored in the second storage unit are transferred to the first storage unit;
the data uploading module 204 is used for uploading all the power data, which are stored in the first storage unit and the second storage unit and are not uploaded, of the distribution line to be tested to the monitoring center at intervals of a preset time length T3; wherein, T3> T2> T1.
Optionally, as an embodiment of the present invention, the data uploading module 204 uploads all the power data, stored in the first storage unit and the second storage unit, of the distribution line to be tested, which are not uploaded to the monitoring center by using an encryption technology.
Optionally, as an embodiment of the present invention, the data uploading module includes:
the first data acquisition unit is used for acquiring all the power data, stored in the first storage unit, of the distribution line to be tested, which are not uploaded and are marked as first data;
the second data acquisition unit is used for acquiring all the power data, stored in the second storage unit, of the distribution line to be tested, which are not uploaded and are marked as second data;
the first splicing unit is used for splicing the first data and the second data to form first spliced data;
the digital abstract calculating unit is used for calculating a digital abstract of the first splicing data by adopting an MD5 algorithm, and recording the digital abstract as a first digital abstract;
a third data obtaining unit, configured to obtain data located in a preset byte position in the first digital digest, and mark the data as third data;
the data inserting unit is used for inserting third data into the first splicing data based on a preset data inserting position to obtain second splicing data formed by the first splicing data and the third data;
the encryption unit is used for encrypting the second splicing data by adopting a symmetric encryption algorithm to obtain a first ciphertext;
and the data uploading unit is used for uploading the first ciphertext and the first digital abstract to the monitoring center.
Optionally, as an embodiment of the present invention, the symmetric encryption algorithm adopts an AES algorithm.
Fig. 3 is a schematic structural diagram of a terminal 300 according to an embodiment of the present invention, where the terminal 300 may be used to execute the power data analysis method according to the embodiment of the present invention.
Among them, the terminal 300 may include: a processor 310, a memory 320, and a communication unit 330. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 320 may be used for storing instructions executed by the processor 310, and the memory 320 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 320, when executed by processor 310, enable terminal 300 to perform some or all of the steps in the method embodiments described below.
The processor 310 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 310 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 330, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
The same and similar parts in the various embodiments in this specification may be referred to each other. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the description in the method embodiment.
In conclusion, the invention can automatically collect, count and analyze the load (current and voltage of the distribution line to be detected) and the temperature of the distribution line to be detected, is favorable for avoiding the on-site inspection of the load and the temperature of the distribution line to be detected to a certain extent, is convenient for relevant electric power workers to know which electric power data on the distribution line to be detected have problems in time, is favorable for the relevant electric power workers to process in time, and is favorable for improving the power supply safety.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.