Invention content
In order to solve the above technical problem existing in the prior art, a kind of data analysis method of present invention offer and parsing
Platform, the various data sources in capable of testing automatically EMU are analyzed, and working efficiency and accuracy rate are improved.
The embodiment of the present invention provides a kind of data analysis method, is applied to EMU and debugs platform, the EMU debugging
Platform includes multiple and different data-interface, and the different data-interface corresponds to the different equipment under tests on train, it is described not
Same data-interface corresponds to different data protocols;
This method includes:
The source data of the different data-interface transmission is received, data type mark is carried in the source data;
The frame head for parsing the source data parses the data type mark of the source data from the frame head;
It is identified according to the data type and selects the corresponding data resolution rules of the data type;
The data content in the source data is parsed using the data resolution rules.
Preferably, the data type mark includes data source ID and/or data protocol ID.
Preferably, when data type mark includes the data source ID and data protocol ID, the basis
The data type mark selects the corresponding data resolution rules of the data type, specifically includes:
The corresponding data resolution rules of the data type are selected according to the data source ID;
The corresponding data resolution rules of the data type are selected according to the data protocol ID;
When the data resolution rules selected according to the data source ID and the data solution selected according to the data protocol ID
When analysis rule is identical, just the data content in the source data is parsed according to the data resolution rules of selection.
Preferably, described to parse the data content in the source data using the data resolution rules and include:
Position, number and the parameter type to be measured of the Devices to test and big are parsed according to the data resolution rules
It is small.
Preferably, it after parsing the data content in the source data using the data resolution rules described, also wraps
It includes:
The parameter size to be measured is saved in the corresponding table of the parameter to be measured according to the parameter type to be measured.
Preferably, the data-interface includes at least:Multifunctional vehicle bus network interface, WIFI interface, serial line interface
And blue tooth interface.
Preferably, further include:The source data of the multifunctional vehicle bus network interface transfers is first stored in buffer pool
In, the source data is transferred from the buffer pool according to the predetermined sampling period.
The embodiment of the present invention also provides a kind of data analyzing platform, for analyzing EMU tune-up data, including:
Multiple and different data-interfaces, the different data-interface correspond to the different equipment under tests on train, the different data
Interface corresponds to different data protocols;Further include:Processor;
The processor, the source data for receiving the different data-interface transmission carry number in the source data
According to type identification;
The frame head for parsing the source data parses the data type mark of the source data from the frame head;
It is identified according to the data type and selects the corresponding data resolution rules of the data type;
The data content in the source data is parsed using the data resolution rules.
Preferably, the data-interface includes at least:Multifunctional vehicle bus network interface, WIFI interface, serial line interface
And blue tooth interface.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored thereon with computer program, the program
Following steps are realized when being executed by processor:
The source data of the different data-interface transmission is received, data type mark is carried in the source data;
The frame head for parsing the source data parses the data type mark of the source data from the frame head;
It is identified according to the data type and selects the corresponding data resolution rules of the data type;
The data content in the source data is parsed using the data resolution rules.
Compared with prior art, the present invention has at least the following advantages:
Data analysis method provided in an embodiment of the present invention, EMU are debugged platform and are received not by different data-interfaces
Same source data, and the data type by parsing the frame head acquisition source data of source data identifies, and is identified further according to data type
Corresponding data resolution rules are selected, to utilize the data content in data resolution rules parsing source data.
As it can be seen that when in face of a variety of different source datas, the method that can be provided through the embodiment of the present invention, EMU debugging
Various source datas during platform can automatically test EMU are analyzed, and selection is identified according to the data type in source data
Corresponding data resolution rules, realize fast resolving data content, improve work efficiency and accuracy rate.
Specific implementation mode
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only this
Invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art exist
The every other embodiment obtained under the premise of creative work is not made, shall fall within the protection scope of the present invention.
The technical solution provided to facilitate the understanding of the present invention below first carries out briefly the technology of the present invention research background
It is bright.
Inventor has found during studying traditional artificial treatment data technique, in face of complicated, huge
When data, traditional artificial treatment data method is difficult to realize the extraction to data effective information and processing, especially to high frequency
The processing of rate data, there are certain bottlenecks.
Based on this, inventor receives different data structure transmission by having researched and proposed technical scheme of the present invention
Source data, and the frame head of source data is parsed, the data type mark of source data is obtained, data type mark selection number is then utilized
According to the corresponding data resolution rules of type, the data content in data resolution rules parsing source data is recycled, intelligence is realized
The target for handling data, improves work efficiency and accuracy rate.As it can be seen that technical solution through the invention, in face of a variety of sources
When data, the data resolution rules needed for Automatic Adaptation Data type can be identified according to data type, so as to quickly solve
Analyse the data content in source data.
A kind of data analysis method shown in exemplary embodiment of the present is introduced below in conjunction with attached drawing 1.
It is a kind of flow chart of data analysis method provided in an embodiment of the present invention referring to Fig. 1.
Data analysis method provided in this embodiment is applied to EMU and debugs platform, and the EMU debugging platform includes
Multiple and different data-interfaces, the different data-interface correspond to the different equipment under tests on train, the different number
Different data protocols is corresponded to according to interface;This method includes:
S101:The source data of the different data-interface transmission is received, data type mark is carried in the source data.
Wherein, data type identifies the data type for identifying source data.In practical applications, since different are tested
The data of equipment acquisition are different, and the meaning representated by each data is different, is based on this, can in advance be set for different types of data
Data type mark is set, different types of data are identified will pass through data type mark, specifically, Binary Zero can be utilized
It is indicated with 1, when only there are two types of when data type, binary system mark can be used;If there are four types of when data type, Ke Yiyong
Two binary system marks.Certainly, in specific implementation, the mark of data type can also be indicated in the way of other.
In embodiments of the present invention, different data-interfaces can correspond to the different equipment under tests on train, then different
Data-interface transmission source data can come from different equipment under tests.Wherein, equipment under test can be interior infrastructure
(such as air-conditioning, display screen, water heater etc.), instrument (exerciser, bridge etc.), testing stand, terminal, etc..Different
Equipment under test sends source data by corresponding data-interface.
In practical applications, data collection terminal, i.e., different equipment under tests are negotiated with EMU debugging platform, are pressed in advance
It encodes to form source data according to defined data format, so that EMU debugging platform can identify source data.It is different tested to set
Source data is formed for coding is carried out to collected data according to different data formats, so that EMU debugging platform can be fast
Speed identification source data.
In specific implementation, it can will belong to what a kind of equipment under test was acquired according to unified data format coding
Data form source data.For example, meters include exerciser, bridge, then exerciser and bridge can be according to unified numbers
The data respectively acquired according to said shank are to form source data.
S102:The frame head for parsing the source data parses the data type mark of the source data from the frame head.
In embodiments of the present invention, source data may include frame head, and in specific implementation, frame head is in addition to including data type
Mark is outer, can also include some necessary control information, such as address information, synchronizing information etc..
S103:It is identified according to the data type and selects the corresponding data resolution rules of the data type.
Different data types corresponds to different Data Transport Protocols, and Data Transport Protocol may include following several:It is more
Function vehicle bus (MVB, Multifunction Vehicle Bus), onboard wireless transport protocol, Train Communication Network
(TCN, Train Communication Network), TCP/IP, Acker net (ARCnet).
It is understood that data resolution rules refer to carrying out data using the corresponding Data Transport Protocol of the data type
Parsing.
In the embodiment of the present invention, EMU debugs platform and selects number according in data type mark analytically rule database
According to the corresponding data resolution rules of type.Wherein, a variety of different data resolution rules can be stored in resolution rules database,
So as to parse the source data of different types of data.
, can also be according to actual demand in practical application, EMU debugs platform can be with constantly improve resolution rules data
The update of resolution rules database is realized in library, to parse the source data of new data type, to make EMU debugging platform can
To handle more multi-source data, working efficiency is improved.
S104:The data content in the source data is parsed using the data resolution rules.
In embodiments of the present invention, data content is the actual acquired data that equipment under test is sent, different equipment under tests
Data content entrained by the source data of transmission is different.
In specific implementation, belongs to a kind of equipment under test and encode acquired data simultaneously according to unified data format
Form source data, that is to say, that the data type that the source data to be formed is encoded according to unified data format is identical, motor-car
The data content that group debugging platform will parse these source datas using same data resolution rules, but be obtained after parsing
Can be different.For example, meters include exerciser, bridge, then exerciser and bridge are according to unified data lattice
For the data that formula coding is respectively acquired to form source data, i.e. the data type for the source data that two equipment under tests are formed is phase
With, EMU debugs platform and parses above-mentioned source data using same data resolution rules, respectively obtains exerciser acquisition
Data content and the data content of bridge acquisition.
Using method provided in an embodiment of the present invention, EMU debugging platform receives a variety of of different data-interface transmission
When source data, the data type mark of source data by the frame head of parsing source data, can be obtained, and is identified according to data type
Corresponding data resolution rules are selected, is parsed so as to the various source datas in testing automatically EMU, obtains institute
The data content of need, improves work efficiency and accuracy rate, the work for solving manual analysis data band in the prior art are imitated
The low and error-prone problem of rate.
Fig. 1 the methods embodiment describes the realization process of data parsing on the whole, will specifically introduce data below
The process of parsing.
Referring to Fig. 2, for the flow chart of another data analysis method provided in an embodiment of the present invention, this method is applied to dynamic
Vehicle group debugs platform, and the EMU debugs the data-interface that platform includes multiple and different, and the different data-interface corresponds to
Different equipment under tests on train, the different data-interface correspond to different data protocols, and this method includes:
S201:EMU debugging platform receives the source data of different data-interface transmission, and number is carried in the source data
According to type identification, the data type mark includes the data source ID and/or data protocol ID.
In practical applications, data-interface includes at least:Multifunctional vehicle bus network interface, WIFI interface, serial interface
Mouth and blue tooth interface.
Wherein, important component of the multifunctional vehicle bus network interface as Train Communication Network, has become
The crucial composition of high-speed power train control system, can be used for train status detection, fault diagnosis and mobile unit exploitation and
The important interface of the operations such as debugging.Multifunctional vehicle bus network interface is that one kind is mainly used for having interoperability and interchangeability
It is required that interconnection equipment between serial data communications busses interface, by the standard device in same vehicle or different vehicle
Data be transmitted so that can be communicated between interconnection equipment.
In practical applications, the frequency sent by the source data of multifunctional vehicle bus network interface transfers is higher, so
And the ability of the processing source data of EMU debugging platform is limited, the source data to ensure all can be resolved place
The source data that multifunctional vehicle bus network structure is transmitted, can first be stored in buffer pool, according to the predetermined sampling period by reason
The source data is transferred from the buffer pool, so that EMU debugging platform can be with the source data in timely processing buffer pool.
Wherein, the disposition for making a reservation for be debugged platform according to EMU using the period is arranged.
In embodiments of the present invention, data type mark may include data source ID and/or data protocol ID a kind of or more
Kind.
When data type mark includes data source ID, EMU debugs platform and executes step S202, utilizes data source ID
The corresponding data resolution rules of data type are selected, then execute S205.
When data type mark includes data protocol ID, EMU debugs platform and executes step S203, is assisted using data
The corresponding data resolution rules of ID selections data type are discussed, then execute step S205.
In practical applications, it is preferred that data type mark includes data source ID and data protocol ID, ensures EMU tune
Try the correctness for the source data that platform receives.
When data type mark includes data source ID and data protocol ID, EMU debugging platform thens follow the steps S202
And S203.
S202:The corresponding data resolution rules of the data type are selected according to the data source ID.
In practical applications, data resolution rules are stored in resolution rules database, for convenience of resolution rules database
Management and quickly analytically can select corresponding data resolution rules in rule database, can be data parsing rule
Then distribute ID number.When specific implementation, the mapping table between data source ID and data resolution rules ID can be pre-established, when
When EMU debugging platform parses data source ID, corresponding data parsing rule can be quickly selected by above-mentioned mapping table
Then ID recycles data resolution rules ID analytically to call data resolution rules in rule database.
S203:The corresponding data resolution rules of the data type are selected according to the data protocol ID.
In practical applications, data resolution rules are stored in resolution rules data, for convenience of resolution rules database
Management and can corresponding data resolution rules analytically quickly be selected in rule database, can be data resolution rules
Distribute ID number, wherein data protocol ID is identical with data resolution rules ID.When specific implementation, when EMU debugging platform parsing
When going out data source ID, according to calling data resolution rules in above-mentioned ID analytically rule database.
It should be noted that when data type mark includes data source ID and data protocol ID, step S202 and step
S203 execution sequences are not limited, and certainly, above-mentioned two step can also execute parallel, improve working efficiency.In concrete application
When, user can be pre-configured with the sequence for executing above-mentioned steps in EMU debugging platform, the present invention is implemented according to actual demand
Example only provides a kind of optional realization method.
S204:Judge to select according to the data source ID data resolution rules selected and according to the data protocol ID
Whether data resolution rules are identical, if so, executing step S205;If not, executing step 207.
In embodiments of the present invention, when data type mark includes data source ID and data protocol ID, to judge to pass through
Whether the data resolution rules that above-mentioned two ID is selected are identical, to prevent source data from occurring mistake during transmission.
S205:The data content in the source data is parsed using the data resolution rules of selection.
Wherein, data content may include position, number and the parameter type to be measured and size of Devices to test.
In practical applications, Devices to test can not only send the size of parameter to be measured, parameter type to be measured, can also send out
Send the position of Devices to test, number, title.For example the often section compartment of train is fitted with electronic box, may include one in electronic box
Or multiple voltage instrument, to measure the electricity consumption situation for often saving compartment.When the data content that Devices to test voltage instrument is sent may include
It is voltage, voltage value etc. that the voltage instrument, which belongs to compartment, device numbering, device name, parameter type to be measured, so as to EMU tune
Examination platform can identify that current acquired data content corresponds to specific Devices to test.
Specific implementation when, EMU debug platform according to data resolution rules parse Devices to test position, number with
And parameter type to be measured and size.
S206:The parameter size to be measured is saved in the corresponding table of the parameter to be measured according to the parameter type to be measured
Lattice.
In practical applications, for ease of searching and analyzing data, table can be established according to for each Devices to test, specifically
, the parameter type to be measured sent according to Devices to test establishes corresponding table, for example, being directed to current tester, establishes electric current
Corresponding table is directed to voltage tester, establishes corresponding table of voltage, etc..
It, can be by the Devices to test of parsing acquisition when EMU debugging platform parses the data content in source data
The data of parameter to be measured are saved in corresponding table, for example, the current value that parsing obtains is stored in electric current table, will be parsed
The voltage value of acquisition is stored in voltage table,
S207:The source data is abandoned, and request data collection terminal retransmits the source data, and executes step
S201。
In embodiments of the present invention, it is selected when the data resolution rules selected according to data source ID and according to data protocol ID
Data resolution rules when differing, illustrate that mistake occurs in source data, EMU debugging platform can abandon the source data, and ask
Data terminal is asked to retransmit the source data, to parse the data content in source data again.
It can when data type includes data source ID and/or data protocol ID using method provided in an embodiment of the present invention
To select data resolution rules, EMU debugging platform to may determine that by above-mentioned according to data source ID and/or data protocol ID
Whether the data resolution rules of two ID selections are identical, and when identical, the number in source data is parsed using the data resolution rules
According to content;When differing, source data is abandoned, and request data collection terminal retransmits the source data, guarantees to parse
Correct data content, to record data content.As it can be seen that the data analysis method provided through the embodiment of the present invention, not only
It can realize that the various data sources in testing automatically EMU are analyzed, improve working efficiency and accuracy rate, can also examine
Survey the correctness of source data.
The data analysis method that embodiment provides to facilitate the understanding of the present invention, below in conjunction with specific application scenarios pair
This method describes in detail.
It is the corresponding Application Scenarios-Example figure of method provided by the invention referring to Fig. 3.
Application scenarios shown in Fig. 3 are to realize that car door and the data of car door detection device pass by MVB and ICP/IP protocol
It is defeated.
By taking the parsing of vehicle door status data content as an example, during realizing the acquisition of vehicle door status data, car door control is needed
System instruction, door operation state and car door clamp force measure three key links.
In practical applications, Car's door controlling equipment sends the instruction of control closing of the door or opening, to control car door progress
The operation closed or opened accordingly, when car door completes corresponding operation according to Car's door controlling instruction, Train Control and management are
The much informations such as system acquisition car door working condition, door position and car door motion state, by much information according to the lattice of regulation
Formula forms source data, and source data is transmitted to EMU by multifunctional vehicle bus network interface and debugs platform.
Meanwhile car door clamp force tester measure the information such as car door clamping force, such as time of measuring, clamping force data set with
And car door relevant information etc., and above- mentioned information is formed into source data according to the format of regulation, and by TCP/IP by source data
It is transmitted to EMU debugging platform.
When EMU debugging platform receives above-mentioned two groups of source datas, two groups of source datas are pre-processed, are parsed respectively
The frame head of above-mentioned two groups of source datas, the data type mark for obtaining each source data identify selection data further according to data type
The corresponding data resolution rules of type, and using the data content in data resolution rules parsing source data, obtain two groups of source numbers
It is saved in corresponding table according to the data content respectively carried, and by parameter to be measured in two groups of data contents, subsequently to search, together
When two groups of data contents are synchronized and are merged, obtain result information about vehicle door status, finally export result information,
So that user can check the state of car door.
It is above data analysis method provided in an embodiment of the present invention, the present invention also provides a kind of data analyzing platform,
The data analyzing platform is introduced below in conjunction with attached drawing.
It is a kind of data analyzing platform provided in an embodiment of the present invention referring to Fig. 4, for being carried out to EMU tune-up data
Analysis, including:Multiple and different data-interfaces, the different data-interface corresponds to the different equipment under tests on train, described
Different data-interfaces corresponds to different data protocols;Further include:Processor 401;
The processor, the source data for receiving the different data-interface transmission carry number in the source data
According to type identification;
The frame head for parsing the source data parses the data type mark of the source data from the frame head;
It is identified according to the data type and selects the corresponding data resolution rules of the data type;
The data content in the source data is parsed using the data resolution rules.
In some embodiments, the data-interface includes at least:Multifunctional vehicle bus network interface, WIFI connect
Mouth, serial line interface and blue tooth interface.
In some embodiments, the processor 401 is specifically used for, first by the multifunctional vehicle bus network interface
The source data of transmission is stored in buffer pool, and the source data is transferred from the buffer pool according to the predetermined sampling period.
In some embodiments, when data type mark includes the data source ID and data protocol ID, institute
It states processor 401 to be specifically used for, the corresponding data resolution rules of the data type is selected according to the data source ID;According to described
Data protocol ID selects the corresponding data resolution rules of the data type;When the data selected according to the data source ID parse rule
When then identical with the data resolution rules that are selected according to the data protocol ID, just according to the data resolution rules solution of selection
Analyse the data content in the source data.
In some embodiments, the data content packet parsed using the data resolution rules in the source data
It includes:Position, number and the parameter type to be measured and size of the Devices to test are parsed according to the data resolution rules, it is described
Processor is specifically used for, and the parameter size to be measured is saved in the corresponding table of the parameter to be measured according to the parameter type to be measured
Lattice.
The data analyzing platform provided through the embodiment of the present invention, processor receive source number by different data-interfaces
According to, and the frame head of source data is parsed, the data type mark of source data is obtained, selection data type is identified further according to data type
Corresponding data resolution rules parse the data content in source data using data resolution rules, to realize automatically to dynamic
The purpose of various source datas parsing in the test of vehicle group, while improving work efficiency and accuracy rate.
It is a kind of block diagram of data analysis device provided in an embodiment of the present invention referring to Fig. 5, including:At least one processing
Device 501 (such as CPU), memory 502 and at least one communication bus 503, for realizing the connection communication between these devices.
Processor 501 is for executing the executable module stored in memory 502, such as computer program.Memory 502 may include
High-speed random access memory (RAM:Random Access Memory), it is also possible to further include non-labile memory
(non-volatile memory), for example, at least a magnetic disk storage.
The processor 501 is specifically used for executing a kind of operation of the method for hybrid vehicle control, specific to wrap
It includes:
The source data of the different data-interface transmission is received, data type mark is carried in the source data;
The frame head for parsing the source data parses the data type mark of the source data from the frame head;
It is identified according to the data type and selects the corresponding data resolution rules of the data type;
The data content in the source data is parsed using the data resolution rules.
In some embodiments, the data type mark includes data source ID and/or data protocol ID, when the number
When according to type identification including data source ID and data protocol ID, the processor 501 executes described according to the data type mark
Know and select the corresponding data resolution rules of the data type, specifically includes:
The corresponding data resolution rules of the data type are selected according to the data source ID;
The corresponding data resolution rules of the data type are selected according to the data protocol ID;
When the data resolution rules selected according to the data source ID and the data solution selected according to the data protocol ID
When analysis rule is identical, just the data content in the source data is parsed according to the data resolution rules of selection.
In some embodiments, the data content packet parsed using the data resolution rules in the source data
It includes:Position, number and the parameter type to be measured and size of the Devices to test are parsed according to the data resolution rules, it is described
After processor 501 executes the data content parsed using the data resolution rules in the source data, further include:
The parameter size to be measured is saved in the corresponding table of the parameter to be measured according to the parameter type to be measured.
In some embodiments, the data-interface includes at least:Multifunctional vehicle bus network interface, WIFI connect
Mouth, serial line interface and blue tooth interface, the processor 501 are specifically additionally operable to execute following steps:
First the source data of the multifunctional vehicle bus network interface transfers is stored in buffer pool, according to predetermined sampling
Period transfers the source data from the buffer pool.
The above described is only a preferred embodiment of the present invention, being not intended to limit the present invention in any form.Though
So the present invention has been disclosed as a preferred embodiment, and however, it is not intended to limit the invention.It is any to be familiar with those skilled in the art
Member, without departing from the scope of the technical proposal of the invention, all using the methods and technical content of the disclosure above to the present invention
Technical solution makes many possible changes and modifications, or is revised as the equivalent embodiment of equivalent variations.Therefore, it is every without departing from
The content of technical solution of the present invention, according to the technical essence of the invention any simple modification made to the above embodiment, equivalent
Variation and modification, still fall within technical solution of the present invention protection in the range of.