CN110245114A - A kind of data processing method and device - Google Patents

A kind of data processing method and device Download PDF

Info

Publication number
CN110245114A
CN110245114A CN201910549757.9A CN201910549757A CN110245114A CN 110245114 A CN110245114 A CN 110245114A CN 201910549757 A CN201910549757 A CN 201910549757A CN 110245114 A CN110245114 A CN 110245114A
Authority
CN
China
Prior art keywords
message
data
group
sequence number
target
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.)
Granted
Application number
CN201910549757.9A
Other languages
Chinese (zh)
Other versions
CN110245114B (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.)
Beijing Runke General Technology Co Ltd
Original Assignee
Beijing Runke General 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 Beijing Runke General Technology Co Ltd filed Critical Beijing Runke General Technology Co Ltd
Priority to CN201910549757.9A priority Critical patent/CN110245114B/en
Publication of CN110245114A publication Critical patent/CN110245114A/en
Application granted granted Critical
Publication of CN110245114B publication Critical patent/CN110245114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/13File access structures, e.g. distributed indices
    • 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/14Details of searching files based on file metadata
    • G06F16/148File search processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of data processing method and device, by searching target TDMS file from Technical Data Management stream TDMS file based on message playback instructions information;Read all message datas stored in target message data group;The channel name for the message data that user selects in target message data group is obtained, and indexes to obtain message sequence number corresponding with the message data of user's selection using the channel name of acquisition and target message serial number group;All Wave datas of the message sequence number corresponding channel for indexing and obtaining under one's name are read from target waveform data group, and will play back display after the Wave data read parsing.The technical solution of the embodiment of the present invention is in wave shape playback without reading whole Wave datas, other operations can be responded simultaneously, Wave data is reselected after user misoperation, it not will cause that system card is dead or system crash, user's waveform playback data latency time is shortened, user experience is improved.

Description

A kind of data processing method and device
Technical field
The present invention relates to technical field of data processing, specially a kind of data processing method and device.
Background technique
As the progress of science can generate various Wave datas in the experiment of various fields, due to these waves The information that graphic data carries has important value, therefore can all store Wave data, when needed again to the wave of storage Graphic data is played back.In to Wave data replayed section, it is necessary first to read the source code data of stored waveform data, and source Code data are generally stored as bin format or txt formatted file, by sequentially intercepting one section of certain length in source code data Source code, one section of another section is read intercepted source code, the source code data read is then parsed message packets, and will disappear Breath data packet is shown by display, finally intercepts one section in sequence again further according to the message packets of client's selection Certain length source code mode finds the corresponding Wave data packet of message packets.
But the data volume of the Wave data due to storing in system is big, and the service ability of computer is limited, to wave When graphic data is played back, computer needs to read storing data and parsing message packets at full speed, and computer can not at this time Other operations are responded, if maloperation computer, are easy to cause system for computer stuck or system crash, and due to waveform number According to data volume it is big, by the prior art to Wave data carry out playback need the waiting time longer so that user experience effect It is poor.
Summary of the invention
The embodiment of the invention provides a kind of data processing method and device, can partly or entirely solve background technique In the problem of mentioning, improve user experience.
In order to achieve the above objectives, the present invention provides the following technical scheme that
First aspect of the embodiment of the present invention discloses a kind of data processing method, which comprises
Target TDMS file is searched from Technical Data Management stream TDMS file based on message playback instructions information, each TDMS file includes: the message sequence number group for being stored with message sequence number, is stored with the message data group of message data, is stored with The Wave data group of Wave data;Message sequence number, message data and the Wave data source stored in each TDMS file The identical bus message in bus data;In each TDMS file, the message sequence number in message sequence number group is corresponding simultaneously As the other channel name of message data group and the other channel name of Wave data group;
Read all message datas stored in target message data group;The target message data group is the mesh The message data group that mark TDMS file includes;
The channel name for the message data that user selects in the target message data group is obtained, and logical using what is obtained Road name and target message serial number group index to obtain message sequence number corresponding with the message data of user's selection;The target message Serial number group is the message sequence number group that the target TDMS file includes;
All Wave datas of the message sequence number corresponding channel for indexing and obtaining under one's name are read from target waveform data group, And it is shown being played back after the Wave data read parsing;The target waveform data group is that the target TDMS file includes Wave data group.
Optionally, all TDMS files are obtained by the way that bus data is stored in advance, and all TDMS files were stored in advance Journey, comprising:
Bus data is obtained, and processing of unpacking is carried out to bus data, the message sequence number of each bus message is obtained, disappears Cease data and Wave data;
The message sequence number of each bus message and message data group are combined into one-dimensional character string dimension and are added first and is deposited Queue is stored up, the message sequence number of each bus message and Wave data group are combined into one-dimensional U32 array and the second storage team is added Column;
The one-dimensional character string dimension of each of first storage queue is read, and is indexed out in each one-dimensional character string dimension Message sequence number;
The message sequence number group message sequence number indexed out being stored in TDMS file;
Message data in one-dimensional character string dimension is stored in the message data group in TDMS file, and by the message The channel name of each message data is named according to the message sequence number indexed out in data group, and each message data itself is logical with it Road name belongs to same bus message;
The one-dimensional U32 array of each of second storage queue is read, and indexes outbound message sequence in each one-dimensional U32 array Number;
Wave data in one-dimensional U32 array is stored in the Wave data group in TDMS file, and by the waveform number It is named according to the channel name of Wave data each in group according to the message sequence number indexed out, each Wave data itself and its channel Name belongs to same bus message;
Whether the data volume for inquiring stored Wave data in TDMS file is more than preset value;
If so, establishing new TDMS file storage bus data.
Optionally, process is stored in advance in all TDMS files, further includes:
To the wave in the message sequence number indexed out, message data and one-dimensional U32 array in one-dimensional character string dimension When graphic data is stored, when the N number of message sequence number of every accumulation, N number of message data and N number of Wave data, once stored.
Optionally, all message datas stored in target message data group are read, comprising:
The target message serial number group is obtained, message sequence number all in the target message serial number group is read;
It is corresponding that message sequence number all in the target message serial number group is obtained in the target message data group All message datas;
All message datas that will acquire carry out paging processing, and show acquired all message counts in the display interface According to.
Optionally, all waves of the message sequence number corresponding channel for indexing and obtaining under one's name are read from target waveform data group Graphic data, and shown being played back after the Wave data read parsing, comprising:
Determine channel name corresponding to the message sequence number for indexing and obtaining;
From all Wave datas obtained in the target waveform data group under determined channel name;
All Wave datas obtained are parsed, the waveform obtained after parsing Wave data is shown in display interface.
Second aspect of the embodiment of the present invention discloses a kind of data processing equipment, comprising:
Acquiring unit, for searching target from Technical Data Management stream TDMS file based on message playback instructions information TDMS file, each TDMS file include: the message sequence number group for being stored with message sequence number, are stored with the message count of message data According to group, it is stored with the Wave data group of Wave data;The message sequence number that is stored in each TDMS file, message data and Wave data is from identical bus message in bus data;Message in each TDMS file, in message sequence number group Serial number is simultaneously to should be used as the other channel name of message data group and the other channel name of Wave data group;
Reading unit, for reading all message datas stored in target message data group;The target message number It is the message data group that the target TDMS file includes according to group;
Indexing units, for obtaining the channel name for the message data that user selects in the target message data group, And it indexes to obtain message sequence corresponding with the message data of user's selection using the channel name of acquisition and target message serial number group Number;The target message serial number group is the message sequence number group that the target TDMS file includes;
Display unit, for reading index obtained message sequence number corresponding channel from target waveform data group under one's name All Wave datas, and shown being played back after the Wave data read parsing;The target waveform data group is the mesh The Wave data group that mark TDMS file includes.
Optionally, further includes: pre-storing unit;
The pre-storing unit includes:
It unpacks subelement, carries out processing of unpacking for obtaining bus data, and to bus data, obtain each bus and disappear Message sequence number, message data and the Wave data of breath;
Subelement is combined, for the message sequence number of each bus message and message data group to be combined into one-dimensional character string number Simultaneously the first storage queue is added in group, and the message sequence number of each bus message and Wave data group are combined into one-dimensional U32 array simultaneously The second storage queue is added;
First index subelement, for reading the one-dimensional character string dimension of each of the first storage queue, and each one Message sequence number is indexed out in dimension character string dimension;
First storing sub-units, the message sequence number group for being stored in the message sequence number indexed out in TDMS file;
Second storing sub-units, the message for being stored in the message data in one-dimensional character string dimension in TDMS file Data group, and the channel name of each message data in the message data group is named according to the message sequence number indexed out, often A message data itself belongs to same bus message with its channel name;
Second index subelement, for reading the one-dimensional U32 array of each of the second storage queue, and each one-dimensional Message sequence number is indexed out in U32 array;
Third storing sub-units, the waveform number for being stored in the Wave data in one-dimensional U32 array in TDMS file It is named according to group, and by the channel name of each Wave data in the Wave data group according to the message sequence number indexed out, each Wave data itself belongs to same bus message with its channel name;
Newly-built subelement is inquired, whether the data volume for inquiring stored Wave data in TDMS file is more than default Value;If so, establishing new TDMS file storage bus data.
Optionally, the pre-storing unit further include: accumulation subelement;
Subelement is accumulated, for the message sequence number indexed out, the message data and one in one-dimensional character string dimension Wave data in dimension U32 array is when being stored, when the N number of message sequence number of every accumulation, N number of message data and N number of Wave data, Once stored.
Optionally, the reading unit, comprising:
Reading subunit reads institute in the target message serial number group for obtaining the target message serial number group Some message sequence numbers;
Subelement is obtained, is owned for being obtained in the target message data group in the target message serial number group The corresponding all message datas of message sequence number;
First display subelement, all message datas for will acquire carry out paging processing, and show in the display interface Show acquired all message datas.
Optionally, the display unit, comprising:
Subelement is determined, for determining channel name corresponding to the message sequence number for indexing and obtaining;
Subelement is obtained, for from all waves obtained under determined channel name in the target waveform data group Shape unit;
Second display subelement shows parsing Wave data in display interface for parsing all Wave datas obtained The waveform obtained afterwards.
Through above-mentioned technical proposal it is found that the embodiment of the invention discloses a kind of data processing method and device, by being based on Message playback instructions information searches target TDMS file from Technical Data Management stream TDMS file;Read target message data group All message datas stored in not;The target message data group is the message data group that the target TDMS file includes Not;The channel name for the message data that user selects in the target message data group is obtained, and utilizes the channel name obtained It indexes to obtain message sequence number corresponding with the message data of user's selection with target message serial number group;From target waveform data group All Wave datas of the message sequence number corresponding channel for indexing and obtaining under one's name are read in not, and the Wave data read is parsed Playback display afterwards.The technical solution of the embodiment of the present invention can directly read message playback when user needs waveform playback data All message datas stored in target message data group under the corresponding target TDMS file of command information disappear in user's selection After ceasing data, index to obtain and user's selection using the channel name and target message serial number group of selected message data The corresponding message sequence number of message data, and waveform number is obtained from target waveform data group according to the message sequence number that index obtains According to, finally by the Wave data read playback show.Whole process is without reading whole Wave datas, so system Resource utilization is low, and one side computer can respond other operations simultaneously, after user misoperation, also need to only reselect waveform Data, not will cause that system card is dead or system crash, on the other hand without reading whole Wave datas repeatedly significantly yet User's waveform playback data latency time is shortened, to improve user experience effect.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow diagram of data processing method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another data processing method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another data processing method provided in an embodiment of the present invention;
Fig. 4 is the flow diagram of another data processing method provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of data processing equipment provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of pre-storing unit in a kind of data processing equipment provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram of reading unit in a kind of data processing equipment provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of display unit in a kind of data processing equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In embodiments of the present invention, the terms "include", "comprise" or its any other variant are intended to nonexcludability Include so that include a series of elements process, method, article or equipment not only include those elements, but also Including other elements that are not explicitly listed, or further include for this process, method, article or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method, article or equipment of element.
The embodiment of the invention discloses a kind of data processing method and device, it is therefore intended that solves the bus data to storage When being played back, since the data volume of the Wave data of storage is big, and the source for all Wave datas for needing twi-read to store Code data simultaneously press the playback that Wave data could be completed after certain length sequence intercepts, so that needing to make when waveform playback data With most system resource, when user misoperation, is easy to cause system for computer stuck or system crash, needs simultaneously User falls into a long wait, thus bring user experience effect difference problem.In order to solve the above problems, the embodiment of the present invention A kind of data processing equipment is disclosed, which can be carried on the achievable data such as host computer, data analyzer The equipment of processing.
The embodiment of the present invention provides a kind of data processing method, and referring to Fig. 1, the above method includes at least following steps:
Step S101: target TDMS text is searched from Technical Data Management stream TDMS file based on message playback instructions information Part.
In step s101, each TDMS (Technical Data Management Streaming, technical data pipe Reason stream) file includes: the message sequence number group for being stored with message sequence number, is stored with the message data group of message data, it stores There is the Wave data group of Wave data;Message sequence number, message data and the Wave data stored in each TDMS file comes The identical bus message in bus data;In each TDMS file, the message sequence number in message sequence number group is right simultaneously It should be used as the other channel name of message data group and the other channel name of Wave data group.
User has stored in TDMS file selection with to the corresponding TDMS file of waveform playback data all, and user selects Message playback instructions information is generated after the completion, and message playback instructions information is used to characterize the playback road of the TDMS file of user's selection Diameter, target TDMS file are the TDMS file of user's selection.In practical applications, the TDMS file that user selects each time Number can be different, such as can be 1,2,3,4,5.
Wherein, TDMS file is the recording channel name in a manner of binary, i.e. the other channel name of message data group and waveform The other channel name of data group is recorded in a manner of binary.
It should be noted that since bus data is to be made of multiple bus message, and carry out to each bus message After unpacking, message sequence number, message data and the Wave data of each bus message can be obtained, in multiple bus message, Message data and Wave data may exist identical, but the message sequence number of each bus message is then unique.Will be total When line message is stored in TDMS file, since the label informations such as group name, channel name can be set in TDMS file, because This, can use " message sequence number+message data ", and " message sequence number+Wave data " mode to message data and waveform Data are stored.Specifically, being respectively combined by unique message sequence number to message data and Wave data, group is obtained Message data and combined waveform data are closed, then combined message data and combined waveform data are stored.
And be read out for the ease of Wave data of the later period to storage, in storage combined message data and composite wave figurate number According to when, be all with message sequence number for index grouping do not store, when needing to obtain Wave data, index messages serial number need to be first passed through The corresponding message data of the message sequence number is read, then the message sequence is read by the message data index messages serial number that user selects Number corresponding Wave data.
The specific storing process of combined message data is the message sequence number for indexing combined message data, and message sequence number is same The other data of Shi Zuowei message sequence number group and the other channel name of message data group, and using message data as message data group The data of corresponding channel under one's name are stored in TDMS file.Wherein, correspondence here refers to: any in message data group Message sequence number and message data itself used in the channel name of message data derive from same bus message.
And the specific storing process of combined waveform data, then it is the message sequence number for indexing combined waveform data, by message sequence Message sequence number under number group is corresponding logical as Wave data group as the other channel name of Wave data group and Wave data The data of road under one's name are stored in TDMS file.Wherein, correspondence here refers to: in Wave data group, any waveform number According to channel name used in message sequence number and Wave data itself derive from same bus message.
By the storing process of combined message data and combined waveform data, guarantee that is stored in each TDMS file disappears Serial number, message data and Wave data are ceased from identical bus message in bus data.In this way, disappearing in each TDMS file Cease the message sequence number in serial number group, the Wave data in message data and Wave data group in message data group It is quantitatively identical, and is one-to-one.
Step S102: all message datas stored in target message data group are read.
It should be noted that target message data group is the message data group that target TDMS file includes.Therefore, it looks into After finding target TDMS file, so that it may find target message data group in target TDMS file.
Due to being stored with message data in target message data group, by executing step S102, mesh can be read All message datas stored in mark message data group.
Step S103: the channel name for the message data that user selects in target message data group is obtained, and utilizes and obtains The channel name and target message serial number group taken indexes to obtain message sequence number corresponding with the message data of user's selection.
In step s 103, target message serial number group is the message sequence number group that target TDMS file includes.
It should be noted that the message sequence number in message sequence number group corresponds to simultaneously to be made due in each TDMS file For the other channel name of message data group and the other channel name of Wave data group, and message data is in target message data group Therefore data obtain the channel name of message data that user selects in target message data group, can use and get Channel name and target message serial number group index to obtain message sequence number corresponding with the message data of user's selection.
Step S104: the obtained message sequence number corresponding channel of index under one's name all are read from target waveform data group Wave data, and shown being played back after the Wave data read parsing.
In step S104, target waveform data group is the Wave data group that target TDMS file includes.
It should be noted that the message sequence number in message sequence number group corresponds to simultaneously to be made due in each TDMS file It therefore can be by message sequence number in Wave data for the other channel name of message data group and the other channel name of Wave data group The Wave data of message sequence number corresponding channel under one's name is read in group.And what is stored under target waveform data group is target wave Therefore graphic data can get the message sequence number corresponding channel that step S103 index obtains under target waveform data group All Wave datas under one's name.Then it plays back and shows after by the Wave data read parsing.
The embodiment of the present invention is by searching mesh from Technical Data Management stream TDMS file based on message playback instructions information Mark TDMS file;Read all message datas stored in target message data group;User is obtained in target message data group The channel name of the message data selected in not, and using the channel name of acquisition and target message serial number group index to obtain and user The corresponding message sequence number of the message data of selection;It is corresponding logical that the message sequence number that index obtains is read from target waveform data group All Wave datas of road under one's name, and shown being played back after the Wave data read parsing.The technical side of the embodiment of the present invention Case can directly read mesh under the corresponding target TDMS file of message playback instructions information when user needs waveform playback data All message datas stored in mark message data group, after user selects message data, using selected message count According to channel name and target message serial number group index to obtain message sequence number corresponding with the message data of user's selection, and according to It indexes obtained message sequence number and obtains Wave data from target waveform data group, finally play back the Wave data read It shows.Whole process is without reading whole Wave datas, so system resource utilization rate is low, one side computer can While other operations are responded, after user misoperation, Wave data also need to be only reselected, system card is not will cause extremely or is System collapse, when on the other hand also substantially reducing user's waveform playback data latency without reading whole Wave datas repeatedly Between, to improve user experience effect.
As shown in Fig. 2, all TDMS files by depositing in advance disclosed in above-described embodiment in a kind of data processing method Storage bus data obtain, all pre-stored processes of TDMS file the following steps are included:
Step S201: bus data is obtained, and processing of unpacking is carried out to bus data, obtains disappearing for each bus message Cease serial number, message data and Wave data.
It should be noted that unpack processing to bus data as the prior art.Since bus data is disappeared by a plurality of Breath is constituted, and includes message sequence number, message data and Wave data in each bus message.Therefore, to bus data into Row is unpacked after processing, message sequence number, message data and the Wave data of available each bus message.In multiple bus In message, each message sequence number is all unique.
Step S202: the message sequence number of each bus message and message data group are combined into one-dimensional character string dimension and added Enter the first storage queue, the message sequence number of each bus message and Wave data group are combined into one-dimensional U32 array and are added the Two storage queues.
It should be noted that one-dimensional character string dimension and one-dimensional U32 array are all a kind of data types, one-dimensional character string number Group indicates the sequence combination of several character strings, and one-dimensional U32 array then indicates 32 data without sign carry out sequence combinations.
The one-dimensional character string dimension that the message sequence number and message data of each bus message obtain, as combined message number According to, and the message sequence number of each bus message and Wave data group are combined into one-dimensional U32 array, as combined waveform data.
In the step, the message sequence number of each bus message and message data group are combined into one-dimensional character string dimension and are added The message sequence number and Wave data group of first storage queue and each bus message are combined into one-dimensional U32 array and the second storage are added Queue is stored.
Step S203: the one-dimensional character string dimension of each of the first storage queue is read, and in each one-dimensional character string number Message sequence number is indexed out in group.
It should be noted that being to be combined into one-dimensional character string number with message sequence number and message data group in the first storage queue What group was added, and when being stored to one-dimensional character string dimension stored to entire one-dimensional character string dimension, therefore Need first to read the one-dimensional character string dimension of each of first storage queue, and at the time of reading, in each one-dimensional character string dimension In index out message sequence number.
Step S204: the message sequence number group message sequence number indexed out being stored in TDMS file.
It should be noted that being the message needed using in message sequence number group due to when reading message data in the later period Serial number goes to read the Wave data of Wave data group corresponding channel under one's name, therefore, in storage, should index out step S203 Message sequence number be stored in the message sequence number group in TDMS file.
Step S205: being stored in the message data group in TDMS file for the message data in one-dimensional character string dimension, And the channel name of each message data in the message data group is named according to the message sequence number indexed out, each message data Itself and its channel name belong to same bus message.
It should be noted that in order to guarantee to return required for the later period can find user according to the selected message data of user The Wave data put, therefore, it is necessary to which first message data is stored under the message data group in TDMS file, and by the message The channel name of each message data is named according to the message sequence number that step S203 is indexed out in data group, and each message data Itself and its channel name belong to same bus message.
Step S206: the one-dimensional U32 array of each of the second storage queue, and the rope in each one-dimensional U32 array are read Draw message sequence number.
It should be noted that being to be combined into one-dimensional U32 array with message sequence number and Wave data group in the second storage queue It is added, and when being stored to one-dimensional U32 array, it is to need first to read the one-dimensional U32 number of each of second storage queue Group, and message sequence number is indexed out in each one-dimensional U32 array.
Step S207: the Wave data in one-dimensional U32 array is stored in the Wave data group in TDMS file, and will The channel name of each Wave data is named according to the message sequence number indexed out in the Wave data group, each Wave data itself Belong to same bus message with its channel name.
It should be noted that the message sequence number in message sequence number group corresponds to simultaneously to be made due in each TDMS file It is according to message count for the other channel name of message data group and the other channel name of Wave data group, and when reading Wave data Message sequence number corresponding to channel name according to message data selected by user in group reads corresponding channel name in Wave data group Under Wave data, therefore, in the Wave data group being stored in the Wave data in one-dimensional U32 array in TDMS file When, the channel name of Wave data each in Wave data group is named according to the message sequence number that step S206 is indexed out, is made every A Wave data itself belongs to same bus message with Wave data channel name.
Step S208: whether the data volume of stored Wave data is more than preset value in inquiry TDMS file, if it is not, then Step S209 is executed, if so, thening follow the steps S210.
It should be noted that being to be stored in the Wave data in one-dimensional U32 array when being stored to combined waveform data Wave data group, since the data volume of the other Wave data of Wave data group is larger, if by the other waveform number of Wave data group It according to being stored in a TDMS file, will lead to that TDMS file is excessive, played back to the Wave data in the TDMS file When, it can be because Wave data amount causes greatly waiting time when waveform playback data longer, it has not been convenient to read.Therefore, to make text Part size is suitable, convenient reading, and the Wave data amount that can be stored to each TDMS file controls.Specifically, to waveform When data store, whether the Wave data amount that can first inquire in TDMS file is more than preset value.In practical applications, preset value with Convenient reading is standard setting.
Step S209: the stored waveform data in TDMS file.
Step S210: new TDMS file storage bus data is established.
It should be noted that since the Wave data amount stored in each TDMS file is limited, and Wave data needs entirely Portion is stored, to constitute the integrality of Wave data, therefore, it is necessary to establish the bus data of new TDMS file storage, from And guarantee the integrality of Wave data, and when playing back to Wave data, avoid the data volume because of Wave data excessive User is caused to fall into a long wait.
Optionally, process is stored in advance in all TDMS files, can also include:
To the wave in the message sequence number indexed out, message data and one-dimensional U32 array in one-dimensional character string dimension When graphic data is stored, when the N number of message sequence number of every accumulation, N number of message data and N number of Wave data, once stored.? In practical application the value of N can flexible setting according to actual needs, such as may be configured as 100,200.
It should be noted that once being deposited after N number of message sequence number, N number of message data and N number of Wave data will be accumulated Storage, can be improved the storage efficiency to TDMS file.
The embodiment of the present invention is by data processing method disclosed above, to the Wave data and message count in bus data It is stored respectively according to after being combined by message sequence number, and in storage all using message sequence number as combined waveform data and combination The channel name of message data, to improve the storage efficiency to bus data.
Disclosed data processing method based on the above embodiment reads target message data in step S102 shown in fig. 1 The specific implementation process of all message datas stored in group, as shown in Figure 3, comprising the following steps:
Step S301: obtaining target message serial number group, reads message sequence number all in target message serial number group.
It should be noted that due to including message sequence number group in TDMS file, inquire target TDMS file Afterwards, so that it may target message serial number group is found in target TDMS file.It and include more in target message serial number group Therefore a message sequence number after obtaining target message serial number group, can read all in target message serial number group disappear Cease serial number.
Step S302: it is corresponding that message sequence number all in target message serial number group is obtained in target message data group All message datas.
It should be noted that the message sequence number in message sequence number group corresponds to simultaneously to be made due in each TDMS file It is with message sequence for the other channel name of message data group and the other channel name of Wave data group, and when being stored to message data Number it is indexed storage, it therefore, can be by all message sequence numbers in target message serial number group in target message data group All message datas under channel name corresponding to each message sequence number are found in not.
Step S303: all message datas that will acquire carry out paging processing, and display is acquired in the display interface All message datas.
It should be noted that paging processing is that all message datas for obtaining step S302 are ranked up, and will be arranged The good all message datas of sequence are shown by the page, in the display interface, the position that each message data is shown on the page Confidence breath is then unique, the i.e. corresponding message data in a display position.
The embodiment of the present invention reads message all in target message serial number group by obtaining target message serial number group Serial number;The corresponding all message counts of message sequence number all in target message serial number group are obtained in target message data group According to;All message datas that will acquire carry out paging processing, and show acquired all message datas in the display interface.It is logical Data processing method disclosed above is crossed, according to the selected playback path of user, acquisition is stored in target message data group Under all message datas, finally show in the display interface.
Disclosed data processing method based on the above embodiment, target waveform data group in step S104 shown in fig. 1 It is middle to read all Wave datas of the obtained message sequence number corresponding channel of index under one's name, and will be after the Wave data that read parsing The specific implementation process of display is played back, as shown in Figure 4, comprising the following steps:
Step S401: channel name corresponding to the message sequence number for indexing and obtaining is determined.
It should be noted that in each TDMS file, message sequence number in message sequence number group is simultaneously to should be used as disappearing Ceasing the other channel name of data group and the other channel name of Wave data group first should obtain message therefore, it is necessary to obtain Wave data After serial number, channel name corresponding to the message sequence number in target message serial number group, i.e. channel corresponding to message sequence number are determined Name.
Step S402: all Wave datas under the channel name determined from acquisition in target waveform data group.
Due in each TDMS file, message sequence number in message sequence number group is simultaneously to should be used as message data group Channel name and the other channel name of Wave data group therefore waveform number can be determined by the channel name corresponding to message sequence number According to the other channel name of group.And when being stored to Wave data, it is to be stored in Wave data under the other channel name of Wave data group, Therefore all Wave datas under the channel name can be got by the other channel name of target waveform data group.
Step S403: parsing all Wave datas of acquisition, and the wave obtained after parsing Wave data is shown in display interface Shape.
It should be noted that Wave data storage is stored in txt format or bin formatted file in a manner of source code, Therefore it needs to parse Wave data, to obtain waveform, then waveform is presented to the user.
The embodiment of the present invention is by determining channel name corresponding to the message sequence number for indexing and obtaining;From target waveform data group All Wave datas under determined channel name are obtained in not;All Wave datas obtained are parsed, are shown in display interface The waveform obtained after parsing Wave data.By data processing method disclosed above, it is right that message sequence number institute is obtained according to index The channel name answered is solved from Wave data all under the channel name is determined in target waveform data group by Wave data Analysis and display.Make user in waveform playback data, shorten user's playback of data waiting time, to improve user experience effect Fruit.
Corresponding with the data processing method that the embodiments of the present invention provide, the embodiment of the invention also provides corresponding Data processing equipment, as shown in figure 5, being a kind of structural schematic diagram of data processing equipment disclosed by the embodiments of the present invention, the number Include: according to processing unit
Acquiring unit 501, for searching mesh from Technical Data Management stream TDMS file based on message playback instructions information TDMS file is marked, each TDMS file includes: the message sequence number group for being stored with message sequence number, is stored with the message of message data Data group is stored with the Wave data group of Wave data;The message sequence number that is stored in each TDMS file, message data With Wave data from identical bus message in bus data;In each TDMS file, disappearing in message sequence number group Breath serial number is simultaneously to should be used as the other channel name of message data group and the other channel name of Wave data group;
Reading unit 502, for reading all message datas stored in target message data group;The target message Data group is the message data group that the target TDMS file includes;
Indexing units 503, for obtaining the channel for the message data that user selects in the target message data group Name, and index to obtain message corresponding with the message data of user's selection using the channel name of acquisition and target message serial number group Serial number;The target message serial number group is the message sequence number group that the target TDMS file includes;
Display unit 504, the message sequence number corresponding channel name obtained for reading index from target waveform data group Under all Wave datas, and will the Wave data that read parsing after play back display;The target waveform data group is institute State the Wave data group that target TDMS file includes.
Optionally, the data processing equipment, as shown in Figure 6, further includes: pre-storing unit;
The pre-storing unit, comprising:
Subelement 601 of unpacking for unit of unpacking carries out processing of unpacking for obtaining bus data, and to bus data, Obtain message sequence number, message data and the Wave data of each bus message;
Subelement 602 is combined, for the message sequence number of each bus message and message data group to be combined into one-dimensional character Simultaneously the first storage queue is added in string array, and the message sequence number of each bus message and Wave data group are combined into one-dimensional U32 number Simultaneously the second storage queue is added in group;
First index subelement 603, for reading the one-dimensional character string dimension of each of the first storage queue, and each Message sequence number is indexed out in one-dimensional character string dimension;
First storing sub-units 604, for creating the message sequence number group using the target message serial number indexed out;
Second storing sub-units 605, for the message data in one-dimensional character string dimension to be stored in TDMS file Message data group, and the channel name of each message data in the message data group is ordered according to the message sequence number indexed out Name, each message data itself belong to same bus message with its channel name;
Second index subelement 606, for reading the one-dimensional U32 array of each of the second storage queue, and each one Message sequence number is indexed out in dimension U32 array;
Third storing sub-units 607, the waveform for being stored in the Wave data in one-dimensional U32 array in TDMS file Data group, and the channel name of each Wave data in the Wave data group is named according to the message sequence number indexed out, often A Wave data itself belongs to same bus message with its channel name;
Inquire newly-built subelement 608, for inquire stored Wave data in TDMS file data volume whether be more than Preset value;If so, establishing new TDMS file storage bus data.
Optionally, the data processing equipment, the pre-storing unit further include: accumulation subelement;
Subelement is accumulated, for the message sequence number indexed out, the message data and one in one-dimensional character string dimension Wave data in dimension U32 array is when being stored, when the N number of message sequence number of every accumulation, N number of message data and N number of Wave data, Once stored.
Optionally, as shown in fig. 7, the reading unit 502, comprising:
Reading subunit 701 is read in the target message serial number group for obtaining the target message serial number group All message sequence numbers;
Subelement 702 is obtained, for obtaining in the target message serial number group in the target message data group The corresponding all message datas of all message sequence numbers;
First display subelement 703, all message datas for will acquire carry out paging processing, and in the display interface The acquired all message datas of display.
Optionally, as shown in figure 8, the display unit 504, comprising:
Subelement 801 is determined, for determining channel name corresponding to the message sequence number for indexing and obtaining;
Subelement 802 is obtained, for from the institute obtained under determined channel name in the target waveform data group There is Wave data;
Second display subelement 803 shows parsing waveform number in display interface for parsing all Wave datas obtained The waveform obtained after.
The specific implementation procedure of modules unit in a kind of above data processing equipment disclosed by the embodiments of the present invention with And implementation principle, reference can be made in relation to the corresponding portion of data processing in data processing method disclosed in the above embodiment of the present invention, Here with regard to no longer being repeated.
The embodiment of the present invention is based on message playback instructions information from Technical Data Management stream TDMS file by acquiring unit Middle lookup target TDMS file;Reading unit reads all message datas stored in target message data group;Indexing units The channel name for the message data that user selects in the target message data group is obtained, and utilizes the channel name and mesh obtained Mark message sequence number group indexes to obtain message sequence number corresponding with the message data of user's selection;Display unit is from target waveform number All Wave datas of obtained message sequence number corresponding channel under one's name, and the Wave data that will be read are indexed according to reading in group Display is played back after parsing.The technical solution of the embodiment of the present invention can directly read message when user needs waveform playback data All message datas stored in target message data group under the corresponding target TDMS file of play-back command information are selected in user After selecting message data, indexes to obtain using the channel name and target message serial number group of selected message data and be selected with user The corresponding message sequence number of the message data selected, and wave is obtained from target waveform data group according to the message sequence number that index obtains Graphic data finally shows the Wave data read playback.Wave data of the whole process without reading whole, so System resource utilization rate is low, and one side computer can respond other operations simultaneously, after user misoperation, also need to only reselect Wave data, not will cause that system card is dead or system crash, on the other hand without reading whole Wave datas repeatedly User's waveform playback data latency time is substantially reduced, to improve user experience effect.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device or For Installation practice, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to method The part of embodiment illustrates.Device and Installation practice described above is only schematical, wherein the conduct The unit of separate part description may or may not be physically separated, component shown as a unit can be or Person may not be physical unit, it can and it is in one place, or may be distributed over multiple network units.It can root According to actual need that some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment.Ordinary skill Personnel can understand and implement without creative efforts.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of data processing method, which is characterized in that the described method includes:
Target TDMS file, each TDMS text are searched from Technical Data Management stream TDMS file based on message playback instructions information Part includes: the message sequence number group for being stored with message sequence number, is stored with the message data group of message data, is stored with waveform number According to Wave data group;Message sequence number, message data and the Wave data stored in each TDMS file derives from bus Identical bus message in data;In each TDMS file, message sequence number in message sequence number group is simultaneously to should be used as disappearing Cease the other channel name of data group and the other channel name of Wave data group;
All message datas stored in target message data group are read, the target message data group is the target The message data group that TDMS file includes;
The channel name for the message data that user selects in the target message data group is obtained, and utilizes the channel name obtained It indexes to obtain message sequence number corresponding with the message data of user's selection with target message serial number group;The target message serial number Group is the message sequence number group that the target TDMS file includes;
All Wave datas of the message sequence number corresponding channel for indexing and obtaining under one's name are read from target waveform data group, and will Display is played back after the Wave data parsing read;The target waveform data group is the wave that the target TDMS file includes Graphic data group.
2. the method according to claim 1, wherein all TDMS files are obtained by the way that bus data is stored in advance It arrives, process is stored in advance in all TDMS files, comprising:
Bus data is obtained, and processing of unpacking is carried out to bus data, obtains message sequence number, the message count of each bus message According to and Wave data;
The message sequence number of each bus message and message data group are combined into one-dimensional character string dimension and the first storage team is added The message sequence number of each bus message and Wave data group are combined into one-dimensional U32 array and the second storage queue are added by column;
The one-dimensional character string dimension of each of first storage queue is read, and indexes outbound message in each one-dimensional character string dimension Serial number;
The message sequence number group message sequence number indexed out being stored in TDMS file;
Message data in one-dimensional character string dimension is stored in the message data group in TDMS file, and by the message data The channel name of each message data is named according to the message sequence number indexed out in group, each message data itself and its channel name Belong to same bus message;
The one-dimensional U32 array of each of second storage queue is read, and indexes out message sequence number in each one-dimensional U32 array;
Wave data in one-dimensional U32 array is stored in the Wave data group in TDMS file, and by the Wave data group The channel name of each Wave data is named according to the message sequence number indexed out in not, each Wave data itself and its channel name category In same bus message;
Whether the data volume for inquiring stored Wave data in TDMS file is more than preset value;
If so, establishing new TDMS file storage bus data.
3. according to the method described in claim 2, it is characterized in that, process is stored in advance in all TDMS files, further includes:
To the waveform number in the message sequence number indexed out, message data and one-dimensional U32 array in one-dimensional character string dimension When according to being stored, when the N number of message sequence number of every accumulation, N number of message data and N number of Wave data, once stored.
4. method according to any one of claim 1-3, which is characterized in that read in target message data group and store All message datas, comprising:
The target message serial number group is obtained, message sequence number all in the target message serial number group is read;
The corresponding institute of message sequence number all in the target message serial number group is obtained in the target message data group There is message data;
All message datas that will acquire carry out paging processing, and show acquired all message datas in the display interface.
5. the method according to claim 1, wherein from target waveform data group read index obtain disappear All Wave datas of serial number corresponding channel under one's name are ceased, and are shown being played back after the Wave data read parsing, comprising:
Determine channel name corresponding to the message sequence number for indexing and obtaining;
From all Wave datas obtained in the target waveform data group under determined channel name;
All Wave datas obtained are parsed, the waveform obtained after parsing Wave data is shown in display interface.
6. a kind of data processing equipment characterized by comprising
Acquiring unit, for searching target TDMS text from Technical Data Management stream TDMS file based on message playback instructions information Part, each TDMS file include: the message sequence number group for being stored with message sequence number, are stored with the message data group of message data Not, it is stored with the Wave data group of Wave data;Message sequence number, message data and the waveform stored in each TDMS file Data source identical bus message in bus data;Message sequence number in each TDMS file, in message sequence number group Simultaneously to should be used as the other channel name of message data group and the other channel name of Wave data group;
Reading unit, for reading all message datas stored in target message data group;The target message data group It Wei not the target TDMS file message data group that includes;
Indexing units, for obtaining the channel name for the message data that user selects in the target message data group, and benefit It is indexed to obtain message sequence number corresponding with the message data of user's selection with the channel name of acquisition and target message serial number group;Institute Stating target message serial number group is the message sequence number group that the target TDMS file includes;
Display unit, for reading the obtained message sequence number corresponding channel of index under one's name all from target waveform data group Wave data, and shown being played back after the Wave data read parsing;The target waveform data group is the target The Wave data group that TDMS file includes.
7. device according to claim 6, which is characterized in that further include: pre-storing unit;
The pre-storing unit includes:
It unpacks subelement, carries out processing of unpacking for obtaining bus data, and to bus data, obtain each bus message Message sequence number, message data and Wave data;
Subelement is combined, for the message sequence number of each bus message and message data group to be combined into one-dimensional character string dimension simultaneously The first storage queue is added, the message sequence number of each bus message and Wave data group are combined into one-dimensional U32 array and is added Second storage queue;
First index subelement, for reading the one-dimensional character string dimension of each of the first storage queue, and in each one-dimensional word Message sequence number is indexed out in symbol string array;
First storing sub-units, the message sequence number group for being stored in the message sequence number indexed out in TDMS file;
Second storing sub-units, the message data for being stored in the message data in one-dimensional character string dimension in TDMS file Group, and the channel name of each message data in the message data group is named according to the message sequence number indexed out, each disappear It ceases data itself and belongs to same bus message with its channel name;
Second index subelement, for reading the one-dimensional U32 array of each of the second storage queue, and in each one-dimensional U32 number Message sequence number is indexed out in group;
Third storing sub-units, the Wave data group for being stored in the Wave data in one-dimensional U32 array in TDMS file Not, and by the channel name of each Wave data in the Wave data group according to the message sequence number indexed out it names, each waveform Data itself belong to same bus message with its channel name;
Newly-built subelement is inquired, whether the data volume for inquiring stored Wave data in TDMS file is more than preset value; If so, establishing new TDMS file storage bus data.
8. device according to claim 7, which is characterized in that the pre-storing unit further include: accumulation subelement;
Subelement is accumulated, for the message sequence number indexed out, the message data in one-dimensional character string dimension and one-dimensional U32 When Wave data in array is stored, when the N number of message sequence number of every accumulation, N number of message data and N number of Wave data, carry out Primary storage.
9. device a method according to any one of claims 6-8, which is characterized in that the reading unit, comprising:
Reading subunit is read all in the target message serial number group for obtaining the target message serial number group Message sequence number;
Subelement is obtained, for obtaining all in the target message serial number group disappear in the target message data group Cease the corresponding all message datas of serial number;
First display subelement, all message datas for will acquire carry out paging processing, and show institute in the display interface All message datas obtained.
10. device according to claim 6, which is characterized in that the display unit, comprising:
Subelement is determined, for determining channel name corresponding to the message sequence number for indexing and obtaining;
Subelement is obtained, for from all waveform lists obtained under determined channel name in the target waveform data group Member;
Second display subelement, for parsing all Wave datas obtained, after display interface shows parsing Wave data The waveform arrived.
CN201910549757.9A 2019-06-24 2019-06-24 Data processing method and device Active CN110245114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910549757.9A CN110245114B (en) 2019-06-24 2019-06-24 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910549757.9A CN110245114B (en) 2019-06-24 2019-06-24 Data processing method and device

Publications (2)

Publication Number Publication Date
CN110245114A true CN110245114A (en) 2019-09-17
CN110245114B CN110245114B (en) 2021-10-15

Family

ID=67889062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910549757.9A Active CN110245114B (en) 2019-06-24 2019-06-24 Data processing method and device

Country Status (1)

Country Link
CN (1) CN110245114B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648006A (en) * 2022-03-09 2022-06-21 昆明理工大学 Data processing method and device based on time alignment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090238212A1 (en) * 2008-03-18 2009-09-24 Transwitch Corporation System and method for transferring high-definition multimedia signals over four twisted-pairs
CN102520269A (en) * 2011-11-23 2012-06-27 上海市电力公司 Data collecting and analyzing device for energy storage system and collecting and analyzing method thereof
CN103699699A (en) * 2014-01-16 2014-04-02 常州工学院 Method for browsing decoded ticket file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090238212A1 (en) * 2008-03-18 2009-09-24 Transwitch Corporation System and method for transferring high-definition multimedia signals over four twisted-pairs
CN102520269A (en) * 2011-11-23 2012-06-27 上海市电力公司 Data collecting and analyzing device for energy storage system and collecting and analyzing method thereof
CN103699699A (en) * 2014-01-16 2014-04-02 常州工学院 Method for browsing decoded ticket file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
向守超: "8.10 TDMS文件", 《LABVIEW2015程序设计教程》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648006A (en) * 2022-03-09 2022-06-21 昆明理工大学 Data processing method and device based on time alignment
CN114648006B (en) * 2022-03-09 2024-06-07 昆明理工大学 Data processing method and device based on time alignment

Also Published As

Publication number Publication date
CN110245114B (en) 2021-10-15

Similar Documents

Publication Publication Date Title
JP4316681B2 (en) System and method for routing information within an adaptive routing architecture of an information retrieval system
US20120233153A1 (en) Hierarchical browsing operations on a directory attribute
EP2629452A1 (en) Method for displaying message and message display apparatus
CN104346458B (en) Date storage method and storage device
US20060129530A1 (en) Ring method, apparatus, and computer program product for managing federated search results in a heterogeneous environment
CN108920296A (en) A kind of Fault Locating Method, device and computer readable storage medium
CN110990429B (en) Blood relationship analysis method and system of data table
CN103378978A (en) Message push method and server
CN102811163B (en) For the method and apparatus of streaming network flow data analysis
CN109491976A (en) A kind of storing data analytic method, device and relevant device
CN110245114A (en) A kind of data processing method and device
CN110471750A (en) Scheduled task control method, device, medium and computer equipment
CN112699652A (en) Table generation and operation method and system based on Vue and Element UI
CN107222760A (en) A kind of method and device to watching user grouping
EP1862895A1 (en) Electronic phone book search method
EP2846522B1 (en) Method and server for executing program
CN106776136A (en) Data base processing method and device
CN103595960A (en) Interesting information monitoring and pushing method and device
US11106739B2 (en) Document structures for searching within and across messages
CN110489442A (en) A kind of data query method and system
JP2004334588A (en) Ranking item display method and device, and ranking item display program
KR101153534B1 (en) Method and system for automatically tagging web data and local data
CN110189171A (en) Feature data generation method, device and equipment
JPH0944516A (en) Information filtering device
CN110083612B (en) Data updating method and device, electronic equipment and readable storage medium

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