CN111143092B - Fault recording data processing method, system and terminal equipment - Google Patents

Fault recording data processing method, system and terminal equipment Download PDF

Info

Publication number
CN111143092B
CN111143092B CN201911416261.0A CN201911416261A CN111143092B CN 111143092 B CN111143092 B CN 111143092B CN 201911416261 A CN201911416261 A CN 201911416261A CN 111143092 B CN111143092 B CN 111143092B
Authority
CN
China
Prior art keywords
waveform data
file
displayed
stored
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911416261.0A
Other languages
Chinese (zh)
Other versions
CN111143092A (en
Inventor
洪金追
徐晓翔
池毓贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Kehua Hengsheng Co Ltd
Zhangzhou Kehua Technology Co Ltd
Original Assignee
Xiamen Kehua Hengsheng Co Ltd
Zhangzhou Kehua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Kehua Hengsheng Co Ltd, Zhangzhou Kehua Technology Co Ltd filed Critical Xiamen Kehua Hengsheng Co Ltd
Priority to CN201911416261.0A priority Critical patent/CN111143092B/en
Publication of CN111143092A publication Critical patent/CN111143092A/en
Application granted granted Critical
Publication of CN111143092B publication Critical patent/CN111143092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention is applicable to the technical field of data processing, and discloses a fault recording data processing method, a system and terminal equipment, wherein the method comprises the following steps: reading waveform data obtained by fault wave recording, and storing the read waveform data in a shared memory; when the waveform data reading is completed or interrupted, the waveform data stored in the shared memory are stored in a first file in a preset format according to the sequence of the reading time. The invention can solve the problems that the shared memory cannot meet the storage requirement and has poor expansibility when the data volume is large because the shared memory space is limited and cannot be suitable for application scenes with large data volume, and can realize the matched storage of the volatile storage medium and the nonvolatile storage medium by utilizing the mode of combining the file and the shared memory to store the data and using the file as a data carrier for transferring, thereby being suitable for application scenes with large data volume and having good expansion compatibility.

Description

Fault recording data processing method, system and terminal equipment
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a fault recording data processing method, a fault recording data processing system and terminal equipment.
Background
In display software, communication and display are two application programs, wherein the communication is responsible for acquiring fault recording data, the display is responsible for displaying and exporting the fault recording data, and the establishment of data interaction between the two is the basis for realizing the fault recording function.
At present, the shared memory is a common inter-process data interaction mode, but the shared memory is not suitable for application scenes with large data volume due to limited space, and can not meet the storage requirement when the data volume is large, so that the expansibility is poor.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a fault recording data processing method, system, and terminal device, so as to solve the problems in the prior art that the shared memory is limited in space and cannot be suitable for application scenarios with large data size, and when the data size is large, the shared memory cannot meet the storage requirement, and the expansibility is poor.
A first aspect of an embodiment of the present invention provides a fault recording data processing method, including:
reading waveform data obtained by fault wave recording, and storing the read waveform data in a shared memory;
when the waveform data reading is completed or interrupted, the waveform data stored in the shared memory are stored in a first file in a preset format according to the sequence of the reading time.
A second aspect of an embodiment of the present invention provides a fault recording data processing system, including:
the data reading module is used for reading waveform data obtained by fault wave recording and storing the read waveform data in the shared memory;
the data storage module is used for storing the waveform data stored in the shared memory into a first file in a preset format according to the sequence of the reading time when the waveform data is read or the waveform data is read and interrupted.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the fault record data processing method according to the first aspect when the computer program is executed by the processor.
A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, implements the steps of the fault record data processing method according to the first aspect.
Compared with the prior art, the embodiment of the invention has the beneficial effects that: the method and the device for storing the waveform data in the shared memory have the advantages that firstly, waveform data obtained through fault recording are read, the read waveform data are stored in the shared memory, then, when the waveform data are read or the waveform data are read and interrupted, the waveform data stored in the shared memory are stored in the first file in a preset format according to the sequence of the reading time, the problems that the shared memory cannot meet the storage requirement and the expansibility is poor due to the fact that the shared memory is limited in space and cannot be suitable for application scenes with large data quantity can be solved, the data can be stored in a mode that the file and the shared memory are combined with each other when the data quantity is large, the mode that the file is used as a data carrier for transferring can be achieved, the matched storage of a volatile storage medium and a nonvolatile storage medium can be adapted to the application scenes with large data quantity, and good expansion compatibility is achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic implementation flow chart of a fault recording data processing method according to an embodiment of the present application;
fig. 2 is a schematic implementation flow chart of a fault recording data processing method according to another embodiment of the present application;
fig. 3 is a schematic implementation flow chart of a fault recording data processing method according to still another embodiment of the present application;
fig. 4 is a schematic implementation flow chart of a fault recording data processing method according to another embodiment of the present application;
FIG. 5 is a schematic block diagram of a fault record data processing system according to an embodiment of the present application;
fig. 6 is a schematic block diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, 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 illustrate the technical scheme of the invention, the following description is made by specific examples.
Fig. 1 is a schematic implementation flow chart of a fault recording data processing method according to an embodiment of the present invention, and for convenience of explanation, only a portion relevant to the embodiment of the present invention is shown. The execution body of the embodiment of the invention can be a terminal device. As shown in fig. 1, the method may include the steps of:
s101: and reading waveform data obtained by fault wave recording, and storing the read waveform data in a shared memory.
In the embodiment of the invention, the waveform data obtained by fault recording can be read from the fault recording device in real time, and the waveform data read in real time is stored in the shared memory.
The shared memory can store and display single waveform data, and each waveform data corresponds to one waveform. The fault recording device can record fault data in real time, store a certain number of fault waveform data to be read and displayed, for example, record corresponding waveform data when faults occur. Alternatively, the fault-logging device may be a digital signal processor (Digital Signal Processing, DSP).
Optionally, before storing the read waveform data in the shared memory, the method may further include:
and clearing the data in the shared memory.
In the embodiment of the invention, before the data is stored in the shared memory, the data in the shared memory is required to be cleared so as to ensure the accuracy of the data.
S102: when the waveform data reading is completed or interrupted, the waveform data stored in the shared memory are stored in a first file in a preset format according to the sequence of the reading time.
When the reading of the single waveform data is completed or the waveform data is interrupted for some reason, the single waveform data stored in the shared memory can be stored in the first file in a preset format according to the sequence of the reading time. That is, the waveform data in the first file is stored in the order of the reading time, the waveform data read first and the waveform data read later are stored.
The time for reading the certain waveform data may be the time for reading the certain waveform data from the fault recorder. Each piece of waveform data may include a read time, a fault code, a fault number, each channel data, and the like. The file in the preset format may be a file with an extension of csv, i.e. the first file may be a file with an extension of csv.
Optionally, determining whether the read waveform data is completed by determining whether the number of points of the read waveform data reaches a preset sampling number; if the number of the read waveform data is equal to the preset sampling number, judging that the waveform data is read; if the number of the read waveform data is smaller than the preset sampling number, judging that the waveform data is not read.
Optionally, the fault recording data processing method provided by the embodiment of the invention can be applied to a Linux operating system.
As can be seen from the above description, the waveform data obtained by storing fault record in the mode of combining the file and the shared memory according to the embodiment of the invention can solve the problems that the shared memory cannot meet the storage requirement and has poor expansibility when the data size is large because the shared memory is limited in space and cannot be suitable for application scenes with large data size, and the mode of combining the file and the shared memory is used for storing the data and using the file as a data carrier for transferring can realize the matched storage of the volatile storage medium and the nonvolatile storage medium, can adapt to application scenes with large data size, has good expansion compatibility, has stability compared with the storage of waveform data by only using the shared memory, and can enhance the reliability of codes.
In an embodiment of the present invention, after step S102, the fault record data processing method may further include the following steps:
if the number of waveform data stored in the first file is larger than the first preset number, deleting the waveform data of a second preset number stored first in the first file, wherein the second preset number is smaller than the first preset number.
In the embodiment of the invention, when the number of waveform data stored in the first file is greater than the first preset number, the waveform data of the second preset number stored first in the first file can be deleted. Because the waveform data in the first file are all stored according to the sequence of the reading time, the first stored waveform data with the second preset quantity is deleted, namely the waveform data with the second preset quantity before the reading time is deleted. The first preset number and the second preset number can be set according to actual requirements, but the second preset number is smaller than the first preset number. For example, since the DSP stores 120 single-module waveforms at maximum and the human-machine interface (Human Machine Interface, HMI) stores 130 single-module waveforms at minimum, the first preset number may be set to 150 and the second preset number may be set to 20, and when the number of waveform data in the first file is greater than 150, the first stored 20 waveform data are deleted. Wherein the HMI may be used to display waveform data.
As can be seen from the above description, in the embodiment of the present invention, if the number of waveform data stored in the first file is greater than the first preset number, the second preset number of waveform data stored first in the first file is deleted, and the second preset number is smaller than the first preset number, so that when the number of data is too large, redundant data in the first file can be deleted, so that the required data can be searched in the first file later.
Fig. 2 is a schematic implementation flow chart of a fault recording data processing method according to another embodiment of the present invention, and for convenience of explanation, only a portion relevant to the embodiment of the present invention is shown. As shown in fig. 2, after step S102, the fault record data processing method may further include the following steps:
s201: and judging whether waveform data to be displayed is stored in the first file.
In the embodiment of the invention, one piece of fault information in the fault list can be generated each time a fault occurs. The user can select a certain piece of fault information in the fault list for waveform display. The terminal device may determine, according to the fault information selected by the user, whether waveform data corresponding to the fault information (i.e., waveform data to be displayed) is stored in the first file. The fault information may include information such as a fault number and a fault code.
S202: if the waveform data to be displayed is not stored in the first file, the waveform data to be displayed is read from the fault wave recording device, the read waveform data to be displayed is stored in the shared memory, waveform display is carried out based on the waveform data to be displayed stored in the shared memory, and the waveform data to be displayed stored in the shared memory is stored in the first file according to the sequence of the reading time.
If the waveform data to be displayed is not stored in the first file, indicating that the waveform data to be displayed is not read from the fault wave recording device, the waveform data to be displayed is read from the fault wave recording device, and the data read in real time is stored in the shared memory. And after the waveform data to be displayed is read, storing the waveform data to be displayed stored in the shared memory into a first file according to the sequence of the reading time. Meanwhile, the waveform display may be performed based on the waveform data to be displayed stored in the shared memory, so that the waveform display process is ended, and steps S203 to S206 are not required to be executed.
Optionally, in S202, before storing the read waveform data to be displayed in the shared memory, the method may further include:
And clearing the data in the shared memory.
In order to avoid affecting the display result, the data in the shared memory should first be cleared before the data is saved in the shared memory.
S203: if the first file stores the complete waveform data to be displayed, the complete waveform data to be displayed is read from the first file, the read complete waveform data to be displayed is stored in the shared memory, and waveform display is performed based on the complete waveform data to be displayed stored in the shared memory.
If the first file stores the complete waveform data to be displayed, the waveform display is performed based on the data in the shared memory, so that the complete waveform data to be displayed stored in the first file can be directly stored in the shared memory, and the waveform display is performed based on the complete waveform data to be displayed stored in the shared memory, so that the waveform display process is finished without executing steps S204 to S206.
Optionally, in S203, before storing the read complete waveform data to be displayed in the shared memory, the method may further include:
and clearing the data in the shared memory.
S204: if the first file stores incomplete waveform data to be displayed, the incomplete waveform data to be displayed is stored in the shared memory, and the incomplete waveform data to be displayed stored in the first file is deleted.
If the process of reading the waveform data to be displayed from the fault recorder is interrupted, the first file will store incomplete waveform data to be displayed.
If the first file stores incomplete waveform data to be displayed, the incomplete waveform data to be displayed is first stored in the shared memory, then the incomplete waveform data to be displayed in the first file is deleted, and then step S205 is performed.
Optionally, in S204, before storing the incomplete waveform data to be displayed in the shared memory, the method may further include:
and clearing the data in the shared memory.
S205: and reading the residual waveform data to be displayed from the fault wave recording device, and storing the read residual waveform data to be displayed in a shared memory, wherein incomplete waveform data to be displayed and residual waveform data to be displayed form complete waveform data to be displayed.
And continuing to read the rest part of the waveform data to be displayed from the fault wave recording device, namely, continuing to read the rest waveform data to be displayed at the interrupted position, storing the rest waveform data to be displayed read in real time in a shared memory, and continuing to execute the step S206. In the shared memory, the incomplete to-be-displayed waveform data stored in advance and the read residual to-be-displayed waveform data form complete to-be-displayed waveform data.
S206: and performing waveform display based on the complete waveform data to be displayed stored in the shared memory, and storing the complete waveform data to be displayed stored in the shared memory into the first file according to the sequence of the reading time.
In the embodiment of the invention, the waveform display can be performed based on the complete waveform data to be displayed stored in the shared memory, and meanwhile, the complete waveform data to be displayed stored in the shared memory is stored in the first file according to the sequence of the reading time, so that the waveform display flow is ended.
As can be seen from the above description, the embodiment of the present invention may perform waveform display based on the first file and the shared memory; in addition, if the first file stores incomplete to-be-displayed waveform data, the incomplete to-be-displayed waveform data is stored in the shared memory, the incomplete to-be-displayed waveform data in the first file is deleted, and after the to-be-displayed waveform data is read, the complete to-be-displayed waveform data in the shared memory is stored to the rearmost part in the first file, so that waveform breakpoint continuous transmission can be realized, waveform data in the first file can be ensured to be stored strictly according to reading time, when the waveform data is deleted, the first read waveform data can be ensured to be deleted, and the condition that the later read waveform data is deleted first is avoided.
Fig. 3 is a schematic implementation flow chart of a fault recording data processing method according to still another embodiment of the present invention, and for convenience of explanation, only a portion relevant to the embodiment of the present invention is shown. As shown in fig. 3, the step S201 may further include the steps of:
s301: and acquiring the identification of the waveform data to be displayed.
Each waveform data has an identification for distinguishing from other waveform data. In practical application, the identifier of each waveform data may be set according to the practical situation, for example, the fault number in the fault information may be set as the identifier of the corresponding waveform data.
When a user selects a certain piece of fault information to carry out waveform display, the terminal equipment can automatically acquire the identification of the waveform data to be displayed.
S302: if the first file does not have the identification of the waveform data to be displayed, judging that the waveform data to be displayed is not stored in the first file.
If the identifier of the waveform data to be displayed cannot be searched in the first file, it is determined that the waveform data to be displayed is not stored in the first file, and thus, it is determined whether the waveform data to be displayed is stored in the first file is ended, and steps S303 to S305 are not required to be executed.
S303: and if the identification of the waveform data to be displayed is stored in the first file, obtaining the point number of the waveform data corresponding to the identification of the waveform data to be displayed in the first file.
And if the identification of the waveform data to be displayed is searched in the first file, obtaining the point number of the waveform data corresponding to the identification stored in the first file. And comparing the point number with a preset sampling point number to judge whether the waveform data to be displayed stored in the first file is complete or not. The point number refers to the point number of the waveform data to be displayed which is sampled.
S304: if the number of points is equal to the preset sampling number of points, it is determined that the first file stores complete waveform data to be displayed.
If the number of points of the waveform data corresponding to the identifier of the waveform data to be displayed in the first file is equal to the preset sampling number, it is determined that the first file stores the complete waveform data to be displayed, and thus, it is determined whether the first file stores the waveform data to be displayed is finished, and step S305 is not required to be executed. The preset sampling points can be set according to actual requirements.
S305: if the number of the points is smaller than the preset sampling number, judging that the first file stores incomplete waveform data to be displayed.
If the number of the points of the waveform data corresponding to the identification of the waveform data to be displayed in the first file is smaller than the preset sampling number, judging that the first file stores incomplete waveform data to be displayed, and judging whether the first file stores waveform data to be displayed is ended.
Fig. 4 is a schematic implementation flow chart of a fault recording data processing method according to another embodiment of the present invention, and for convenience of explanation, only a portion relevant to the embodiment of the present invention is shown. As shown in fig. 4, after step S102, the fault record data processing method may further include the following steps:
s401: and judging whether all waveform data to be exported are stored in the first file.
In the embodiment of the invention, a user can select one or more pieces of fault information from the fault list and export corresponding waveform data to the external storage device. The external storage device may be a usb disk.
Specifically, the identifiers of all the waveform data to be exported may be obtained, and whether all the waveform data to be exported are stored in the first file is determined according to the identifiers of all the waveform data to be exported. The specific process is similar to determining whether the waveform data to be displayed is stored in the first file, and will not be described herein.
If all the waveform data to be exported are stored in the first file, step S406 is directly executed without executing steps S402 to S405.
S402: if the target waveform data to be exported which is not stored in the first file exists, the target waveform data to be exported is read from the fault wave recording device, and the read target waveform data to be exported is stored in the first file according to the sequence of the reading time.
Wherein the waveform data to be exported, which is not stored in the first file, is made the target waveform data to be exported.
If the target waveform data to be exported exists, the target waveform data to be exported is read from the fault wave recording device, and the read target waveform data to be exported is stored in the first file according to the sequence of the reading time.
If there are multiple target to-be-exported waveform data, step S402 is repeatedly executed until there are no target to-be-exported waveform data.
Optionally, storing the read target waveform data to be derived in the first file according to the sequence of the reading time may include:
clearing data in the shared memory;
storing the read target waveform data to be exported in a shared memory;
and after the target waveform data to be exported is read, storing the target waveform data to be exported stored in the shared memory into a first file according to the sequence of the reading time.
In the embodiment of the invention, the target waveform data to be exported, which is read from the fault wave recording device, is firstly stored in the shared memory in real time, and after the reading is completed, the target waveform data to be exported stored in the shared memory is stored in the last file.
S403: if some incomplete waveform data of the waveform data to be exported is stored in the first file, the incomplete waveform data is stored in the shared memory, and the incomplete waveform data in the first file is deleted.
In the embodiment of the present invention, there may be some incomplete waveform data of the waveform data to be exported in the first file, if the above situation exists, the incomplete waveform data is first saved to the shared memory, the incomplete waveform data in the first file is deleted, and step S404 is continuously executed.
Optionally, in S403, before storing the incomplete waveform data in the shared memory, the method may further include:
and clearing the data in the shared memory.
S404: and reading the residual waveform data of the waveform data to be exported from the fault wave recording device, and storing the read residual waveform data in a shared memory, wherein the incomplete waveform data and the residual waveform data form the waveform data to be exported.
And continuing to read the residual waveform data of the waveform data to be exported from the fault wave recording device, storing the read residual waveform data in the shared memory in real time, and continuing to execute the step S405. The incomplete waveform data and the rest waveform data in the shared memory form the waveform data to be exported.
S405: and storing the certain waveform data to be exported stored in the shared memory into a first file according to the sequence of the reading time.
And after the rest waveform data are read, storing the waveform data to be exported stored in the shared memory in the last of the first files.
Optionally, if the first file stores a plurality of incomplete waveform data of the waveform data to be exported, steps S403 to S405 are performed multiple times until the first file stores all complete waveform data of the waveform data to be exported.
When the first file stores the complete waveform data of the waveform data to be exported, step S406 is executed.
S406: and copying the waveform data to be exported in the first file into a second file in a preset format according to a specified format in sequence of the reading time, wherein the second file is used for indicating a user to copy the second file into the external storage device.
In the embodiment of the invention, when the first file stores the complete waveform data of the waveform data to be exported, the waveform data to be exported in the first file is exported to a second file with a preset format according to a specified format in sequence of reading time. After all the waveform data to be exported have been exported to the second file, the user may copy the second file to the external storage device. The specified format may be a specified encoding format, so that the exported file may be directly viewed with Excel.
As can be seen from the above description, in the embodiment of the present invention, by exporting the waveform data to be exported into the second file, when the user performs external exporting, the second file can be directly copied into the external storage device, so that the fault waveform exporting can be simplified.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
Fig. 5 is a schematic block diagram of a fault recording data processing system according to an embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown.
In an embodiment of the present invention, the fault record data processing system 50 may include a data reading module 501 and a data saving module 502.
The data reading module 501 is configured to read waveform data obtained by fault recording, and store the read waveform data in the shared memory.
The data saving module 502 is configured to save the waveform data saved in the shared memory to a first file in a preset format according to the sequence of the reading time when the waveform data is read or the waveform data is read is interrupted.
Optionally, the fault record data processing system 50 may further include a data deletion module.
And the data deleting module is used for deleting the waveform data of a second preset number stored first in the first file if the number of the waveform data stored in the first file is larger than the first preset number, and the second preset number is smaller than the first preset number.
Optionally, the fault record data processing system 50 may further include a first judging module, a first waveform display module, a second waveform display module, an incomplete data deleting module, a remaining data reading module, and a third waveform display module.
The first judging module is used for judging whether the waveform data to be displayed is stored in the first file.
The first waveform display module is used for reading the waveform data to be displayed from the fault wave recording device if the waveform data to be displayed is not stored in the first file, storing the read waveform data to be displayed in the shared memory, carrying out waveform display based on the waveform data to be displayed stored in the shared memory, and storing the waveform data to be displayed stored in the shared memory into the first file according to the sequence of the reading time.
And the second waveform display module is used for reading the complete waveform data to be displayed from the first file if the complete waveform data to be displayed is stored in the first file, storing the read complete waveform data to be displayed in the shared memory, and performing waveform display based on the complete waveform data to be displayed stored in the shared memory.
And the incomplete data deleting module is used for storing the incomplete waveform data to be displayed in the shared memory if the incomplete waveform data to be displayed is stored in the first file, and deleting the incomplete waveform data to be displayed stored in the first file.
The residual data reading module is used for reading residual waveform data to be displayed from the fault wave recording device and storing the read residual waveform data to be displayed in the shared memory, wherein the incomplete waveform data to be displayed and the residual waveform data to be displayed form complete waveform data to be displayed.
The third waveform display module is used for performing waveform display based on the complete waveform data to be displayed stored in the shared memory, and storing the complete waveform data to be displayed stored in the shared memory into the first file according to the sequence of the reading time.
Optionally, the first determining module may be specifically configured to:
acquiring an identifier of waveform data to be displayed;
if the first file does not have the identification of the waveform data to be displayed, judging that the waveform data to be displayed is not stored in the first file;
if the identification of the waveform data to be displayed is stored in the first file, the number of points of the waveform data corresponding to the identification of the waveform data to be displayed in the first file is obtained;
If the number of the points is equal to the preset sampling number of the points, judging that the first file stores complete waveform data to be displayed;
if the number of the points is smaller than the preset sampling number, judging that the first file stores incomplete waveform data to be displayed.
Optionally, the fault record data processing system 50 may further include a second determining module, a first determining result processing module, a second determining result processing module, a remaining data saving module, a complete data saving module, and an export module.
And the second judging module is used for judging whether all waveform data to be exported are stored in the first file.
And the first judging result processing module is used for reading the target waveform data to be exported from the fault wave recording device if the target waveform data to be exported which is not stored in the first file exists, and storing the read target waveform data to be exported in the first file according to the sequence of the reading time.
And the second judging result processing module is used for storing the incomplete waveform data in the shared memory and deleting the incomplete waveform data in the first file if the incomplete waveform data of the waveform data to be exported is stored in the first file.
And the residual data storage module is used for reading residual waveform data of the certain waveform data to be exported from the fault wave recording device and storing the read residual waveform data in the shared memory, wherein the incomplete waveform data and the residual waveform data form the certain waveform data to be exported.
And the complete data storage module is used for storing the certain waveform data to be exported stored in the shared memory into the first file according to the sequence of the reading time.
The export module is used for copying the waveform data to be exported in the first file into a second file in a preset format according to the appointed format in sequence of the reading time, and the second file is used for indicating a user to copy the second file into the external storage device.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of each functional unit and module is illustrated, and in practical application, the above-mentioned functional allocation may be performed by different functional units and modules according to needs, that is, the internal structure of the fault recording data processing system is divided into different functional units or modules, so as to perform all or part of the above-mentioned functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Fig. 6 is a schematic block diagram of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device 60 of this embodiment includes: one or more processors 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. The processor 601 implements the steps in the above embodiments of the fault recording data processing method when executing the computer program 603, for example, steps S101 to S102 shown in fig. 1. Alternatively, the processor 601 may implement the functions of the modules/units in the fault record data processing system embodiment described above, such as the functions of the modules 501 to 502 shown in fig. 5, when executing the computer program 603.
Illustratively, the computer program 603 may be partitioned into one or more modules/units that are stored in the memory 602 and executed by the processor 601 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program 603 in the terminal device 60. For example, the computer program 603 may be divided into a data reading module and a data saving module, each module specifically functioning as follows:
The data reading module is used for reading waveform data obtained by fault wave recording and storing the read waveform data in the shared memory;
the data storage module is used for storing the waveform data stored in the shared memory into a first file in a preset format according to the sequence of the reading time when the waveform data is read or the waveform data is read and interrupted.
Other modules or units may be described with reference to the embodiment shown in fig. 5, and will not be described here again.
The terminal device 60 may be a touch screen, a desktop computer, a notebook computer, a palm top computer, a cloud server, or the like. The terminal device 60 includes, but is not limited to, a processor 601, a memory 602. It will be appreciated by those skilled in the art that fig. 6 is merely an example of the terminal device 60 and is not meant to be limiting as the terminal device 60, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the terminal device 60 may also include input devices, output devices, network access devices, buses, etc.
The processor 601 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 602 may be an internal storage unit of the terminal device 60, such as a hard disk or a memory of the terminal device 60. The memory 602 may also be an external storage device of the terminal device 60, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 60. Further, the memory 602 may also include both internal storage units and external storage devices of the terminal device 60. The memory 602 is used for storing the computer program 603 and other programs and data required by the terminal device 60. The memory 602 may also be used to temporarily store data that has been output or is to be output.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
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 solution. 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 record data processing system and method may be implemented in other manners. For example, the above-described embodiments of the fault log data processing system are merely illustrative, and the modules or units are merely logical functional partitions, and may be implemented in other ways, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium may include content that is subject to appropriate increases and decreases as required by jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is not included as electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. The fault recording data processing method is characterized by comprising the following steps of:
reading waveform data obtained by fault wave recording, and storing the read waveform data in a shared memory;
when the waveform data reading is completed or the waveform data reading is interrupted, storing the waveform data stored in the shared memory into a first file in a preset format according to the sequence of the reading time;
judging whether all waveform data to be exported are stored in the first file;
if some incomplete waveform data of waveform data to be exported is stored in the first file, storing the incomplete waveform data in the shared memory, and deleting the incomplete waveform data in the first file;
Reading the residual waveform data of the waveform data to be exported from the fault wave recording device, and storing the read residual waveform data in the shared memory, wherein the incomplete waveform data and the residual waveform data form the waveform data to be exported;
and storing the certain waveform data to be exported stored in the shared memory into the first file according to the sequence of the reading time.
2. The method for processing fault recording data according to claim 1, wherein after storing the waveform data stored in the shared memory in the first file in the preset format according to the sequence of the reading time, the method further comprises:
if the number of the waveform data stored in the first file is larger than a first preset number, deleting the waveform data of a second preset number stored first in the first file, wherein the second preset number is smaller than the first preset number.
3. The method for processing fault recording data according to claim 1, wherein after storing the waveform data stored in the shared memory in the first file in the preset format according to the sequence of the reading time, the method further comprises:
Judging whether waveform data to be displayed is stored in the first file or not;
if the waveform data to be displayed is not stored in the first file, the waveform data to be displayed is read from a fault wave recording device, the read waveform data to be displayed is stored in the shared memory, waveform display is carried out based on the waveform data to be displayed stored in the shared memory, and the waveform data to be displayed stored in the shared memory is stored in the first file according to the sequence of reading time;
if the first file stores complete waveform data to be displayed, the complete waveform data to be displayed is read from the first file, the read complete waveform data to be displayed is stored in the shared memory, and waveform display is performed based on the complete waveform data to be displayed stored in the shared memory;
if the first file stores incomplete waveform data to be displayed, storing the incomplete waveform data to be displayed in the shared memory, and deleting the incomplete waveform data to be displayed stored in the first file;
Reading residual waveform data to be displayed from the fault wave recording device, and storing the read residual waveform data to be displayed in the shared memory, wherein the incomplete waveform data to be displayed and the residual waveform data to be displayed form the complete waveform data to be displayed;
and performing waveform display based on the complete waveform data to be displayed stored in the shared memory, and storing the complete waveform data to be displayed stored in the shared memory into the first file according to the sequence of reading time.
4. The method for processing fault record data as claimed in claim 3, wherein said determining whether waveform data to be displayed is stored in the first file comprises:
acquiring an identifier of waveform data to be displayed;
if the identification of the waveform data to be displayed does not exist in the first file, judging that the waveform data to be displayed is not stored in the first file;
if the identifier of the waveform data to be displayed is stored in the first file, the point number of the waveform data corresponding to the identifier of the waveform data to be displayed in the first file is obtained;
If the number of points is equal to the preset sampling number of points, judging that the first file stores complete waveform data to be displayed;
and if the number of points is smaller than the preset sampling number of points, judging that the first file stores incomplete waveform data to be displayed.
5. The method according to any one of claims 1 to 4, characterized in that after said determining whether or not all waveform data to be exported are stored in the first file, the method further comprises:
if the target waveform data to be exported which is not stored in the first file exists, the target waveform data to be exported is read from a fault wave recording device, and the read target waveform data to be exported is stored in the first file according to the sequence of the reading time;
after the certain waveform data to be exported stored in the shared memory is stored in the first file according to the sequence of the reading time, the method further comprises:
and copying the waveform data to be exported in the first file into a second file in the preset format according to the sequence of the reading time, wherein the second file is used for indicating a user to copy the second file into external storage equipment.
6. A fault recording data processing system, comprising:
the data reading module is used for reading waveform data obtained by fault wave recording and storing the read waveform data in the shared memory;
the data storage module is used for storing the waveform data stored in the shared memory into a first file in a preset format according to the sequence of the reading time when the waveform data is read or the waveform data is read and interrupted;
the second judging module is used for judging whether all waveform data to be exported are stored in the first file or not;
the second judging result processing module is used for storing the incomplete waveform data in the shared memory and deleting the incomplete waveform data in the first file if the incomplete waveform data of the waveform data to be exported is stored in the first file;
the residual data storage module is used for reading residual waveform data of the certain waveform data to be exported from the fault wave recording device and storing the read residual waveform data in the shared memory, wherein the incomplete waveform data and the residual waveform data form the certain waveform data to be exported;
And the complete data storage module is used for storing the certain waveform data to be exported stored in the shared memory into the first file according to the sequence of the reading time.
7. The fault log data processing system of claim 6, wherein the system further comprises:
and the data deleting module is used for deleting the waveform data of a second preset number stored in the first file first if the number of the waveform data stored in the first file is larger than a first preset number, wherein the second preset number is smaller than the first preset number.
8. The fault log data processing system of claim 6, wherein the system further comprises:
the first judging module is used for judging whether the waveform data to be displayed is stored in the first file or not;
the first waveform display module is used for reading the waveform data to be displayed from the fault wave recording device if the waveform data to be displayed is not stored in the first file, storing the read waveform data to be displayed in the shared memory, performing waveform display based on the waveform data to be displayed stored in the shared memory, and storing the waveform data to be displayed stored in the shared memory into the first file according to the sequence of reading time;
The second waveform display module is used for reading the complete waveform data to be displayed from the first file if the complete waveform data to be displayed is stored in the first file, storing the read complete waveform data to be displayed in the shared memory, and displaying the waveform based on the complete waveform data to be displayed stored in the shared memory;
the incomplete data deleting module is used for storing the incomplete waveform data to be displayed in the shared memory if the incomplete waveform data to be displayed is stored in the first file, and deleting the incomplete waveform data to be displayed stored in the first file;
the residual data reading module is used for reading residual waveform data to be displayed from the fault wave recording device and storing the read residual waveform data to be displayed in the shared memory, wherein the incomplete waveform data to be displayed and the residual waveform data to be displayed form the complete waveform data to be displayed;
and the third waveform display module is used for performing waveform display based on the complete waveform data to be displayed stored in the shared memory, and storing the complete waveform data to be displayed stored in the shared memory into the first file according to the sequence of the reading time.
9. Terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the fault recording data processing method according to any of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium, characterized in that it stores a computer program which, when executed by one or more processors, implements the steps of the fault recording data processing method according to any one of claims 1 to 5.
CN201911416261.0A 2019-12-31 2019-12-31 Fault recording data processing method, system and terminal equipment Active CN111143092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911416261.0A CN111143092B (en) 2019-12-31 2019-12-31 Fault recording data processing method, system and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911416261.0A CN111143092B (en) 2019-12-31 2019-12-31 Fault recording data processing method, system and terminal equipment

Publications (2)

Publication Number Publication Date
CN111143092A CN111143092A (en) 2020-05-12
CN111143092B true CN111143092B (en) 2023-08-29

Family

ID=70522750

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911416261.0A Active CN111143092B (en) 2019-12-31 2019-12-31 Fault recording data processing method, system and terminal equipment

Country Status (1)

Country Link
CN (1) CN111143092B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112052243B (en) * 2020-09-08 2021-05-14 贵州乌江水电开发有限责任公司东风发电厂 Continuous waveform recording method based on database technology
CN114594342B (en) * 2022-03-21 2023-03-28 国网安徽省电力有限公司电力科学研究院 Power distribution network ground fault judgment input waveform consistency processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105676023A (en) * 2015-12-30 2016-06-15 华自科技股份有限公司 Recording method and system of fault recording data
CN109408483A (en) * 2018-09-14 2019-03-01 厦门天锐科技股份有限公司 Date storage method based on squid proxy server
CN110532258A (en) * 2019-07-17 2019-12-03 科华恒盛股份有限公司 Fault wave list updating method and fault wave transmission method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105676023A (en) * 2015-12-30 2016-06-15 华自科技股份有限公司 Recording method and system of fault recording data
CN109408483A (en) * 2018-09-14 2019-03-01 厦门天锐科技股份有限公司 Date storage method based on squid proxy server
CN110532258A (en) * 2019-07-17 2019-12-03 科华恒盛股份有限公司 Fault wave list updating method and fault wave transmission method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种实时高精度故障录波系统同步控制方法;邢浩江等;《电力系统自动化》;20090325(第06期);第63-66页 *

Also Published As

Publication number Publication date
CN111143092A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111221726A (en) Test data generation method and device, storage medium and intelligent equipment
CN111143092B (en) Fault recording data processing method, system and terminal equipment
US20170139813A1 (en) Method and device for checking influence of deleting cache file, and mobile terminal
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN108255989B (en) Picture storage method and device, terminal equipment and computer storage medium
CN110413413A (en) A kind of method for writing data, device, equipment and storage medium
CN112100090A (en) Data access request processing method, device, medium and memory mapping controller
CN111693294A (en) Vehicle detection method and device, terminal equipment and storage medium
CN104765792A (en) Dimension data storing method, device and system
CN109542398B (en) Business system generation method and device and computer readable storage medium
CN110580220A (en) method for measuring execution time of code segment and terminal equipment
CN113918648A (en) Data synchronization method and device, electronic equipment and storage medium
CN111143240B (en) Image storage method, system and terminal equipment
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
CN112133357A (en) eMMC testing method and device
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN111143196A (en) Database testing method and device
CN112527276B (en) Data updating method and device in visual programming tool and terminal equipment
CN111352868B (en) Serial port access method, device, terminal equipment and storage medium
CN113051105A (en) Data processing method, device, equipment and storage medium
CN111078384A (en) Method and device for migrating core data, computer equipment and storage medium
CN108665938B (en) Write test method, read-write test method and terminal equipment
CN110858147B (en) MCU information acquisition method and terminal equipment
US11397662B2 (en) Method for debugging computer program, device employing method, and storage medium
CN110764997B (en) Database interface conformance testing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant