Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic flow chart of an implementation of a fault recording method according to an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown. The execution main body of the embodiment of the invention can be terminal equipment. As shown in fig. 1, the method may include the steps of:
s101: and starting timing from the triggering of fault recording, and acquiring waveform data stored in the first memory when preset time passes, wherein the preset time is less than the recording duration of the waveform data.
In the embodiment of the invention, as in the conventional fault recording, the system continuously records the waveform data no matter whether the fault occurs or not, and continuously rolls and stores the waveform data recorded in real time to the first memory. Recording duration of waveform data which can be stored in the first memory is recorded as T, wherein T is generally a preset period TpInteger multiples of. The first Memory may be a Random Access Memory (RAM), and the preset period may be set according to an actual requirement, for example, may be set to a power frequency period, and the like.
When the fault recording is triggered by the fault signal or other trigger signals, timing is started, at the moment, the recorded waveform data are continuously stored in the first memory in a rolling mode, and when the preset time T passesfWhen the waveform is not recorded in the first memory, the rolling storage is stopped and the timing is stopped, and at the moment, the waveform stored in the first memory is acquiredAnd (4) data. The waveform data recording time period is trigger fault recording front T-TfAfter triggering fault recording Tf。
Wherein the preset time is less than the recording duration of the waveform data, i.e. Tf< T. In a specific embodiment, Tf≤T-Tp。
S102: the method comprises the steps of dividing waveform data into multiple sections of preset waveform data according to a preset period, selecting any section of preset waveform data stored before triggering fault recording from the multiple sections of preset waveform data, and recording the selected section of preset waveform data as standard waveform data.
Waveform data of recording duration T according to preset period TpDividing the preset waveform data into N sections, and sequentially recording each section of the preset waveform data as 1, 2, 3p. Each piece of divided waveform data is referred to as preset waveform data. A predetermined period TpThe power frequency period is usually set to be 0.02s, and accordingly, the waveform data is divided according to the power frequency period to obtain multiple sections of preset waveform data which are multiple sections of power frequency waveform data. As shown in fig. 2, a power frequency period is set between 1ms and 21ms on the abscissa, and corresponds to a segment of power frequency waveform data W1(ii) a A power frequency period is between 21ms and 41ms on the abscissa, and corresponds to a section of power frequency waveform data W2。
The standard waveform data is preset waveform data recorded when no fault occurs. According to the embodiment of the invention, any section of preset waveform data can be selected from the plurality of sections of preset waveform data recorded before the fault recording is triggered to serve as standard waveform data.
Alternatively, the preset waveform data with the earliest recording time may be selected from the plurality of preset waveform data segments and recorded as the standard waveform data, that is, the first preset waveform data segment is recorded as the standard waveform data.
S103: and respectively calculating the standard deviation of other sections of preset waveform data and the standard waveform data, and selecting abnormal waveform data from the plurality of sections of preset waveform data according to the standard deviation of other sections of preset waveform data and the standard waveform data, wherein the other sections of preset waveform data are the sections of preset waveform data except the standard waveform data in the plurality of sections of preset waveform data.
In the embodiment of the invention, the standard deviations of the preset waveform data and the standard waveform data of all the sections except the standard waveform data are respectively calculated, and N-1 standard deviations are obtained through calculation. And selecting abnormal waveform data from the multiple segments of preset waveform data according to the N-1 standard deviations obtained by calculation. The abnormal waveform data refers to waveform data recorded when a fault occurs.
The other preset waveform data are preset waveform data of each section except the standard waveform data in the preset waveform data of the plurality of sections. For example, it is assumed that, among the 1 to N pieces of preset waveform data, the 1 st piece of preset waveform data is standard waveform data, and the other pieces of preset waveform data are 2 to N pieces of preset waveform data.
In an embodiment of the present invention, before the step S103, the fault recording method may further include the following steps:
and calculating the total number of sampling points in each preset period according to the wave recording sampling period.
In the embodiment of the invention, every other recording sampling period TsObtaining a sampling value Wi[k]As shown in FIG. 2, wherein Wi[k]A sampling value representing the kth sampling point of the preset waveform data i.
Can be based on the sampling period T of recording
sCalculating each predetermined period T
pP, wherein P is T
p/T
s。T
sThe value of (A) can be set according to actual requirements, and T is usually set
pIs T
sInteger multiples of (A), (B), e.g. when T
pWhen the power frequency period is 0.02s, T can be adjusted
sSet to 0.001 s. If T
pIs not T
sInteger multiple of
In an embodiment of the present invention, the "calculating the standard deviation between the other preset waveform data and the standard waveform data" in step S103 may include:
and respectively calculating the standard deviation of the other sections of preset waveform data and the standard waveform data according to the total number of the sampling points in each preset period.
In an embodiment of the present invention, the above-mentioned calculation formula for calculating the standard deviation between each other segment of the preset waveform data and the standard waveform data according to the total number of the sampling points in each preset period is as follows:
wherein SdiRepresenting the standard deviation of preset waveform data i and the standard waveform data c, i belongs to [1, N ∈]And i ≠ c, N represents the total segment number of the preset waveform data; p represents the total number of sampling points in each preset period; wc[k]A sampling value representing a kth sampling point of the standard waveform data c; wi[k]A sampling value representing the kth sampling point of the preset waveform data i.
S104: storing the abnormal waveform data to the second memory, and transmitting the abnormal waveform data to the analysis terminal.
And storing the abnormal waveform data in a second Memory for saving, wherein the second Memory can be a Read-Only Memory (ROM).
The abnormal waveform data may be transmitted to the analysis terminal by wire or wirelessly. After the analysis terminal receives the abnormal waveform data, the abnormal waveform data can be analyzed to determine what fault occurs, and the abnormal waveform data can be displayed.
As can be seen from the above description, the embodiment of the present invention selects the abnormal waveform data from the plurality of pieces of preset waveform data by selecting the standard waveform data and selecting the abnormal waveform data according to the standard deviation between the other pieces of preset waveform data and the standard waveform data, only stores and communicates the abnormal waveform data, and discards the useless data, so that the amount of data uploaded by storage and communication can be reduced, and the occupied storage space and communication bandwidth can be reduced.
Fig. 3 is a schematic flow chart of an implementation of a fault recording method according to an embodiment of the present invention, and for convenience of description, only a part related to the embodiment of the present invention is shown. As shown in fig. 3, the "selecting abnormal waveform data from the plurality of pieces of preset waveform data according to the standard deviation of the other pieces of preset waveform data and the standard waveform data" in the above step S103 may include the steps of:
s301: and calculating the average value of the standard deviation of the other preset waveform data and the standard waveform data.
In the embodiment of the present invention, the average value of N-1 standard deviations is calculated based on the N-1 standard deviations calculated in S103The specific calculation formula is as follows:
s302: according to the sequence of the recording time of other sections of preset waveform data, sequentially comparing the standard deviation and the average value of other sections of preset waveform data and standard waveform data to obtain first target preset waveform data and second target preset waveform data;
the first target preset waveform data is preset waveform data with the earliest recording time in all preset waveform data with standard deviation larger than the average value, and the second target preset waveform data is preset waveform data with the latest recording time in all preset waveform data with standard deviation larger than the average value.
In the embodiment of the present invention, among all the preset waveform data having the standard deviation from the standard waveform data larger than the average value, the preset waveform data having the earliest recording time is referred to as first target preset waveform data, and the preset waveform data having the latest recording time is referred to as second target preset waveform data.
And obtaining first target preset waveform data and second target preset waveform data by sequentially comparing the standard deviation and the average value of other sections of preset waveform data and standard waveform data.
S303: recording preset waveform data starting from the first target preset waveform data and ending at the second target preset waveform data as abnormal waveform data.
And recording all preset waveform data (including the first target preset waveform data and the second target preset waveform data) between the first target preset waveform data and the second target preset waveform data as abnormal waveform data according to the sequence of the recording time of other preset waveform data.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 4 is a schematic block diagram of a fault recording system according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown.
In the embodiment of the present invention, the fault recording system 40 may include a data obtaining module 401, a standard waveform determining module 402, an abnormal waveform determining module 403, and a storage and transmission module 404.
The data acquisition module 401 is configured to start timing from triggering fault recording, and acquire waveform data stored in the first memory when a preset time elapses, where the preset time is less than a recording duration of the waveform data;
a standard waveform determining module 402, configured to divide the waveform data into multiple segments of preset waveform data according to a preset period, select, from the multiple segments of preset waveform data, any segment of preset waveform data stored before triggering fault recording, and record the selected segment of preset waveform data as standard waveform data;
an abnormal waveform determining module 403, configured to calculate standard deviations of other preset waveform data and the standard waveform data, respectively, and select abnormal waveform data from the preset waveform data according to the standard deviations of the other preset waveform data and the standard waveform data, where the other preset waveform data is preset waveform data of each segment except the standard waveform data in the preset waveform data;
and a storage and transmission module 404, configured to store the abnormal waveform data in the second memory, and transmit the abnormal waveform data to the analysis terminal.
Alternatively, the abnormal waveform determination module 403 may include an average value calculation unit, a comparison unit, and an abnormal waveform data determination unit;
the average value calculating unit is used for calculating the average value of the standard deviation of other sections of preset waveform data and standard waveform data;
the comparison unit is used for sequentially comparing the standard deviation and the average value of other sections of preset waveform data and the standard waveform data according to the sequence of the recording time of other sections of preset waveform data to obtain first target preset waveform data and second target preset waveform data;
the first target preset waveform data is preset waveform data with the earliest recording time in all preset waveform data with standard deviation larger than the average value, and the second target preset waveform data is preset waveform data with the latest recording time in all preset waveform data with standard deviation larger than the average value;
and an abnormal waveform data determination unit configured to record preset waveform data starting from the first target preset waveform data and ending with the second target preset waveform data as abnormal waveform data.
Optionally, the fault recording system 40 may further include a total number of sampling points calculation module.
The total number of sampling points calculating module is used for calculating the total number of sampling points in each preset period according to the wave recording sampling period.
Optionally, the abnormal waveform determination module 403 may further include a standard deviation calculation unit.
The standard deviation calculation unit is used for calculating the standard deviation of other sections of preset waveform data and the standard waveform data according to the total number of the sampling points in each preset period.
Optionally, a calculation formula of the standard deviation calculation unit, which calculates the standard deviation of each of the other preset waveform data and the standard waveform data according to the total number of sampling points in each preset period, is as follows:
wherein SdiRepresenting the standard deviation of the preset waveform data i and the standard waveform data c, i belongs to [1, N ∈]And i ≠ c, N represents the total segment number of the preset waveform data; p represents the total number of sampling points in each preset period; wc[k]A sampling value representing a kth sampling point of the standard waveform data c; wi[k]A sampling value representing the kth sampling point of the preset waveform data i.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the fault recording system is divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the above-mentioned apparatus may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic block diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 50 of this embodiment includes: one or more processors 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processors 501. The processor 501 executes the computer program 503 to implement the steps in the above-mentioned fault recording method embodiments, such as steps S101 to S104 shown in fig. 1. Alternatively, the processor 501 executes the computer program 503 to implement the functions of the modules/units in the fault recording system embodiment, for example, the functions of the modules 401 to 404 shown in fig. 4.
Illustratively, the computer program 503 may be partitioned into one or more modules/units that are stored in the memory 502 and executed by the processor 501 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 503 in the terminal device 50. For example, the computer program 503 may be divided into a data acquisition module, a standard waveform determination module, an abnormal waveform determination module, and a storage and transmission module, and the specific functions of each module are as follows:
the data acquisition module is used for starting timing from triggering fault recording and acquiring waveform data stored in the first memory when preset time passes, wherein the preset time is less than the recording duration of the waveform data;
the standard waveform determining module is used for dividing the waveform data into a plurality of sections of preset waveform data according to a preset period, selecting any section of preset waveform data stored before triggering fault recording from the plurality of sections of preset waveform data, and recording the selected section of preset waveform data as standard waveform data;
the abnormal waveform determining module is used for respectively calculating the standard deviation of other sections of preset waveform data and the standard waveform data, and selecting the abnormal waveform data from the sections of preset waveform data according to the standard deviation of other sections of preset waveform data and the standard waveform data, wherein other sections of preset waveform data are the sections of preset waveform data except the standard waveform data in the sections of preset waveform data;
and the storage and transmission module is used for storing the abnormal waveform data to the second memory and transmitting the abnormal waveform data to the analysis terminal.
Other modules or units can refer to the description of the embodiment shown in fig. 4, and are not described again here.
The terminal device 50 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device 50 includes, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that fig. 5 is only one example of a terminal device 50 and does not constitute a limitation to terminal device 50 and may include more or less components than those shown, or combine certain components, or different components, for example, terminal device 50 may also include an input device, an output device, a network access device, a bus, etc.
The Processor 501 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 502 may be an internal storage unit of the terminal device 50, such as a hard disk or a memory of the terminal device 50. The memory 502 may also be an external storage device of the terminal device 50, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 50. Further, the memory 502 may also include both an internal storage unit of the terminal device 50 and an external storage device. The memory 502 is used for storing the computer program 503 and other programs and data required by the terminal device 50. The memory 502 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed fault recording system and method may be implemented in other ways. For example, the above-described embodiments of the fault recording system are merely illustrative, and for example, the division of the modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.