Disclosure of Invention
The application aims to provide a method and a device for checking sampling precision of fault recording, a computer readable storage medium and computer equipment, and aims to solve the problems that the relative time of a fault moment is determined by calculating the sudden change of channel data, the real-time calculated amount is extremely large, the requirement on system hardware is high, and the alignment effect is not ideal under the condition of complex faults.
In a first aspect, the present application provides a method for checking sampling accuracy of fault recording, where the method includes:
s101, acquiring fault recording data to be compared, and acquiring a recording channel to be compared according to a preset comparison channel group, wherein the fault recording data are recorded by a relay protection device and a fault recording device respectively;
s102, according to fault recording data recorded by a relay protection device, calculating fault characteristic quantities of first analog quantity channels in recording channels needing to be compared to obtain a first analog quantity channel with the largest fault characteristic quantity, and acquiring instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in a fault time period;
s103, acquiring a second analog quantity channel which needs to be compared with a first analog quantity channel with the maximum fault characteristic quantity from fault wave recording data recorded by a fault wave recording device, and acquiring instantaneous value data of a continuous preset time length in the second analog quantity channel, wherein the preset time length is equal to the time length of the fault time period;
and S104, aligning fault recording data recorded by the relay protection device and fault recording data recorded by the fault recording device by taking the fault moment as a reference through a dynamic time normalization (DTW) algorithm according to the instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in the fault time period and the instantaneous value data of the continuous preset duration in the second analog quantity channel, and checking the sampling precision of the fault recording data.
In a second aspect, the present application provides a device for checking sampling accuracy of fault recording, the device including:
the acquisition module is used for acquiring fault recording data to be compared and acquiring a recording channel to be compared according to a preset comparison channel group, wherein the fault recording data are recorded by the relay protection device and the fault recording device respectively;
the first instantaneous value data acquisition module is used for calculating fault characteristic quantities of all first analog quantity channels in the wave recording channels needing to be compared according to fault wave recording data recorded by the relay protection device to obtain a first analog quantity channel with the maximum fault characteristic quantity and acquiring instantaneous value data of the first analog quantity channel with the maximum fault characteristic quantity in a fault time period;
a second instantaneous value data acquisition module, configured to acquire, from fault recording data recorded by a fault recording device, a second analog channel that needs to be compared with the first analog channel with the largest fault characteristic quantity, and acquire instantaneous value data of a duration preset in the second analog channel, where the preset duration is equal to a duration of the fault time period;
and the checking module is used for aligning fault recording data recorded by the relay protection device and fault recording data recorded by the fault recording device by taking the fault moment as a reference through a dynamic time normalization (DTW) algorithm according to the instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in the fault time period and the instantaneous value data of the continuous preset duration in the second analog quantity channel, and checking the sampling precision of the fault recording data.
In a third aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method for sampling accuracy check of fault recording.
In a fourth aspect, the present application provides a computer device comprising:
one or more processors;
a memory; and
one or more computer programs, the processor and the memory being connected by a bus, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, the processor implementing the steps of the method for fault-recording sampling accuracy check as described.
According to the method, the fault characteristic quantity of each first analog quantity channel in the wave recording channels needing to be compared is calculated according to fault wave recording data recorded by a relay protection device, so that the first analog quantity channel with the largest fault characteristic quantity is obtained, and instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in a fault time period is obtained; acquiring a second analog quantity channel which needs to be compared with a first analog quantity channel with the maximum fault characteristic quantity from fault wave recording data recorded by a fault wave recording device, and acquiring instantaneous value data of a continuous preset time length in the second analog quantity channel, wherein the preset time length is equal to the time length of the fault time period; and according to the instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in the fault time period and the instantaneous value data of the second analog quantity channel with the duration preset, aligning fault recording data recorded by the relay protection device and fault recording data recorded by the fault recording device by taking the fault moment as a reference through a dynamic time normalization (DTW) algorithm, and checking the sampling precision of the fault recording data. Therefore, the relay protection device with abnormal analog quantity sampling is easy to find, and the hidden danger of the relay protection device is beneficial to being found in advance; the calculated amount is small, and fault recording data alignment under the condition of complex faults can be met.
Detailed Description
In order to make the purpose, technical solution and beneficial effects of the present application more clear and more obvious, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, which is a flowchart of a method for checking sampling accuracy of fault recording provided in an embodiment of the present application, this embodiment mainly takes an example that the method for checking sampling accuracy of fault recording is applied to a computer device, and the method for checking sampling accuracy of fault recording provided in an embodiment of the present application includes the following steps:
s101, acquiring fault recording data needing to be compared, and acquiring a recording channel needing to be compared according to a preset comparison channel group, wherein the fault recording data are recorded by a relay protection device and a fault recording device respectively.
S102, according to fault recording data recorded by the relay protection device, fault characteristic quantities of first analog quantity channels in recording channels needing to be compared are calculated, the first analog quantity channel with the largest fault characteristic quantity is obtained, and instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in a fault time period are obtained.
In an embodiment of the present application, S102 may specifically be:
according to fault recording data recorded by a relay protection device, calculating fault characteristic quantities of first analog quantity channels in recording channels needing to be compared, obtaining the serial number of the first analog quantity channel with the maximum fault characteristic quantity, and obtaining a first instantaneous value data sequence X (m) of the first analog quantity channel with the maximum fault characteristic quantity in a fault time period T.
S103, acquiring a second analog quantity channel which needs to be compared with a first analog quantity channel with the maximum fault characteristic quantity from fault wave recording data recorded by a fault wave recording device, and acquiring instantaneous value data of a continuous preset time length in the second analog quantity channel, wherein the preset time length is equal to the time length of the fault time period.
In an embodiment of the present application, S103 may specifically be:
according to the serial number of the first analog quantity channel with the largest fault characteristic quantity, a second analog quantity channel which needs to be compared with the first analog quantity channel with the largest fault characteristic quantity is obtained from fault wave recording data recorded by a fault wave recording device, a 1 st sampling point is used as an end point, and a second instantaneous value data sequence Y (n) with a preset duration in the second analog quantity channel is obtained, wherein the preset duration is equal to the duration of the fault time period T.
And S104, aligning fault wave recording data recorded by the relay protection device and fault wave recording data recorded by the fault wave recording device by taking the fault moment as a reference through a Dynamic Time Warping (DTW) algorithm according to the instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in the fault Time period and the instantaneous value data of the continuous preset duration in the second analog quantity channel, and checking the sampling precision of the fault wave recording data.
In an embodiment of the present application, S104 may specifically include the following steps:
s1041, calculating a similarity between the first instantaneous value data sequence x (m) and the second instantaneous value data sequence y (n) by DWT algorithm, specifically including the following steps:
s10411, starting to match the first instantaneous value data sequence x (m) and the second instantaneous value data sequence y (n) as a current lattice point from the point (0, 0);
s10412, calculating the accumulated distance to the next adjacent grid point, wherein the calculation formula is as follows:
D[(i,j)]=d[X(i),Y(j)]+min{D(i+1,j),D(i+1,j+1),D(i,j+1)}
wherein D [ (i, j) ] is the cumulative distance from the current lattice point to the next adjacent lattice point; d [ X (i), Y (j) ] is the distance of the current point; min { D (i +1, j), D (i +1, j +1), D (i, j +1) } is the minimum cumulative distance of adjacent lattice points that can reach the point;
s10413, taking the adjacent grid point with the minimum accumulated distance as the current grid point, repeatedly executing S10412, and accumulating the accumulated distance;
s10414, when the end point (m, n) is reached, the accumulated cumulative distance is used as the similarity between the first instantaneous value data series x (m) and the second instantaneous value data series y (n).
And S1042, in a second analog quantity channel of the fault wave recording data recorded by the fault wave recording device, moving an endpoint backward by one sampling point to obtain a second instantaneous value data sequence Y (n) lasting for a preset time duration in the second analog quantity channel, then returning to S1041 until the maximum similarity of the first instantaneous value data sequence X (m) and the second instantaneous value data sequence Y (n) is obtained, and obtaining the relative time t1 'of the position of the endpoint when the maximum similarity is obtained, wherein the time t1 in the fault wave recording data recorded by the relay protection device and the time t 1' in the fault wave recording data recorded by the fault wave recording device are considered to be the same time and are used as the fault time.
S1043, aligning fault recording data recorded by the relay protection device and fault recording data recorded by the fault recording device by taking fault time as a reference, calculating a difference value of a power frequency effective value and a harmonic value of a recording channel to be compared in a fault time period, comparing the difference value with a preset threshold value, and when the difference value is greater than the preset threshold value, determining that the analog quantity sampling precision of the relay protection device is abnormal, otherwise, determining that the analog quantity sampling precision of the relay protection device is normal.
Referring to fig. 2, the apparatus for checking the sampling accuracy of the fault record according to an embodiment of the present application may be a computer program or a section of program code running in a computer device, for example, the apparatus for checking the sampling accuracy of the fault record is an application software; the device for checking the sampling precision of the fault recording can be used for executing corresponding steps in the method for checking the sampling precision of the fault recording provided by the embodiment of the application. The device that sampling accuracy check of trouble record wave that this application embodiment provided includes:
the acquisition module 11 is configured to acquire fault recording data to be compared, and acquire a recording channel to be compared according to a pre-configured comparison channel group, where the fault recording data is recorded by the relay protection device and the fault recording device respectively;
the first instantaneous value data acquisition module 12 is configured to calculate a fault characteristic quantity of each first analog quantity channel in the recording channels that need to be compared according to fault recording data recorded by the relay protection device, obtain a first analog quantity channel with a maximum fault characteristic quantity, and acquire instantaneous value data of the first analog quantity channel with the maximum fault characteristic quantity in a fault time period;
a second instantaneous value data obtaining module 13, configured to obtain, from fault recording data recorded by a fault recording device, a second analog channel that needs to be compared with the first analog channel with the largest fault characteristic quantity, and obtain instantaneous value data of a duration preset in the second analog channel, where the preset duration is equal to a duration of the fault time period;
and the checking module 14 is configured to align the fault recording data recorded by the relay protection device and the fault recording data recorded by the fault recording device by using the fault time as a reference through a dynamic time normalization DTW algorithm according to the instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in the fault time period and the instantaneous value data of the second analog quantity channel with a duration preset, and check the sampling accuracy of the fault recording data.
The device for checking the sampling precision of the fault recording provided by the embodiment of the application and the method for checking the sampling precision of the fault recording provided by the embodiment of the application belong to the same concept, and the specific implementation process is detailed in the full text of the specification and is not repeated herein.
An embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method for checking the sampling accuracy of fault recording provided in an embodiment of the present application.
Fig. 3 shows a specific block diagram of a computer device provided in an embodiment of the present application, where the computer device 100 includes: one or more processors 101, a memory 102, and one or more computer programs, wherein the processors 101 and the memory 102 are connected by a bus, the one or more computer programs are stored in the memory 102 and configured to be executed by the one or more processors 101, and the processor 101 executes the computer programs to implement the steps of the method for fault record sampling accuracy check as provided by an embodiment of the present application. The computer equipment comprises a server, a terminal and the like. The computer device may be a desktop computer, a mobile terminal or a vehicle-mounted device, and the mobile terminal includes at least one of a mobile phone, a tablet computer, a personal digital assistant or a wearable device.
According to the method, the fault characteristic quantity of each first analog quantity channel in the wave recording channels needing to be compared is calculated according to fault wave recording data recorded by a relay protection device, so that the first analog quantity channel with the largest fault characteristic quantity is obtained, and instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in a fault time period is obtained; acquiring a second analog quantity channel which needs to be compared with a first analog quantity channel with the maximum fault characteristic quantity from fault wave recording data recorded by a fault wave recording device, and acquiring instantaneous value data of a continuous preset time length in the second analog quantity channel, wherein the preset time length is equal to the time length of the fault time period; and according to the instantaneous value data of the first analog quantity channel with the largest fault characteristic quantity in the fault time period and the instantaneous value data of the second analog quantity channel with the duration preset, aligning fault recording data recorded by the relay protection device and fault recording data recorded by the fault recording device by taking the fault moment as a reference through a dynamic time normalization (DTW) algorithm, and checking the sampling precision of the fault recording data. Therefore, the relay protection device with abnormal analog quantity sampling is easy to find, and the hidden danger of the relay protection device is beneficial to being found in advance; the calculated amount is small, and fault recording data alignment under the condition of complex faults can be met.
It should be understood that the steps in the embodiments of the present application are not necessarily performed in the order indicated by the step numbers. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in various embodiments may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a non-volatile computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show several embodiments of the present invention, and the description thereof is specific and detailed, but not to be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.