CN107357868A - A kind of fast conversion method and device of matlab data formats - Google Patents
A kind of fast conversion method and device of matlab data formats Download PDFInfo
- Publication number
- CN107357868A CN107357868A CN201710530849.3A CN201710530849A CN107357868A CN 107357868 A CN107357868 A CN 107357868A CN 201710530849 A CN201710530849 A CN 201710530849A CN 107357868 A CN107357868 A CN 107357868A
- Authority
- CN
- China
- Prior art keywords
- data
- data file
- once
- row
- write
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Abstract
The embodiment of the invention discloses a kind of fast conversion method and device of matlab data formats, the side includes:Multiple data in the first data file are once read by row, first data file is with row storage organization data storage;The multiple data that will be read from first data file, by the data file of row write-once second, second data file is matlab data formats.Thus, reduce the number of read/write, so as to accelerate processing speed, improve operating efficiency.
Description
Technical field
The present invention relates to technical field of data processing, and in particular to a kind of fast conversion method of matlab data formats and
Device.
Background technology
MATLAB is the business mathematics software that MathWorks companies of the U.S. produce, and MATLAB is matrix&laboratory
Two contaminations, mean matrix factory(Matrix labotstory).It by numerical analysis, matrix computations, science data visualization with
It is section and many powers such as modeling and simulation of nonlinear dynamic system are integrated in a wieldy windowing environment
Learn research, engineering design and numerous scientific domains of Effective Numerical calculating must be carried out and provide a kind of comprehensive solution party
Case, and largely broken away from traditional noninteractive program design language(Such as C, Fortran)Edit pattern, represent
The advanced level of current international scientific software for calculation.
In MATLAB data format, data are stored with row storage organization, and row storage is to be put into each row continuously
Physical location.Accordingly, row storage is that Jiang Gehang is put into continuous physical location.Because row storage is more common storage knot
The all use row storages of structure, such as C language, therefore during use MATLAB processing datas, it is often necessary to the conversion of data format is carried out,
It will be converted to the data of row storage to arrange the data of storage.But traditional conversion method, all it is that data being write or read one by one,
Due to frequent operation file handle(I/O)Cause disk load greatly, speed is slow, has had a strong impact on operating efficiency.
The content of the invention
Therefore, the technical problem to be solved in the present invention is, the conversion of existing matlab data formats, conversion speed
Slowly, operating efficiency is low.
Thus, the embodiments of the invention provide a kind of fast conversion method of matlab data formats, including:By row once
Multiple data in the first data file are read, first data file is with row storage organization data storage;Will be from described
The multiple data read in one data file, by the data file of row write-once second, second data file is
Matlab data formats.
Optionally, the multiple data once read by row in the first data file, including:Once read described first
Data in a line or multirow of data file.
Optionally, the data in described a line for once reading first data file or multirow, including:For described
Every a line in first data file, once read the partial data in full line data or full line data.
Optionally, the multiple data that will be read from first data file, by row write-once second
Data file, including:By the one or more columns per page of the second data file described in the multiple data write-once.
Optionally, the one or more columns per page by the second data file described in the multiple data write-once, including:It is right
Partial data in each row in second data file, write-once permutation data or permutation data.
Optionally, the data in first data file store in a manner of M rows N is arranged, in second data file
Data stored in a manner of N rows M is arranged, it is described once to read multiple data in the first data file by row, including:Once read
Take the data of the i-th row of first data file, 1≤i≤M;It is described will be read from first data file it is multiple
Data, by the data file of row write-once second, including:The data that will be read from the i-th row of first data file, once
Write the i-th row of second data file.
The embodiment of the present invention additionally provides a kind of quick switching device of matlab data formats, including:Digital independent list
Member, for once reading multiple data in the first data file by row, first data file is stored with row storage organization
Data;Data write unit, for the multiple data that will be read from first data file, by row write-once
Two data files, second data file are matlab data formats.
Optionally, the data-reading unit, for once reading in a line or the multirow of first data file
Data.
Optionally, the data write unit, for by the second data file described in the multiple data write-once
One or more columns per page.
Optionally, the data in first data file store in a manner of M rows N is arranged, in second data file
Data by N rows M arrange in a manner of store, the data-reading unit is used for, and once reads the i-th row of first data file
Data, 1≤i≤M;The data write unit is used for, the data that will be read from the i-th row of first data file, and one
I-th row of secondary write-in second data file.
The fast conversion method and device of the matlab data formats of the embodiment of the present invention, pass through the more numbers of read/write
According to reducing the number of read/write, so as to accelerate processing speed, improve operating efficiency.
Brief description of the drawings
, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical scheme of the prior art
The required accompanying drawing used is briefly described in embodiment or description of the prior art, it should be apparent that, in describing below
Accompanying drawing is some embodiments of the present invention, for those of ordinary skill in the art, before creative work is not paid
Put, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic diagram for the data processing equipment for implementing the embodiment of the present invention;
Fig. 2 is a kind of flow chart of the fast conversion method of matlab data formats of the embodiment of the present invention;
Fig. 3 is a kind of structural representation of the quick switching device of matlab data formats of the embodiment of the present invention.
Embodiment
Technical scheme is clearly and completely described below in conjunction with accompanying drawing, it is clear that described implementation
Example is part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill
The every other embodiment that personnel are obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
In the description of the invention, it is necessary to which explanation, term " first ", " second ", " the 3rd " are only used for describing purpose,
And it is not intended that instruction or hint relative importance.
As long as in addition, technical characteristic involved in invention described below different embodiments non-structure each other
It is be combined with each other into conflict can.
Fig. 1 is the schematic diagram for the data processing equipment for implementing the embodiment of the present invention, and the data processing equipment is, for example, terminal
(Such as PC)Or server.As illustrated, the data processing equipment includes processor, external memory storage and storage inside
Device, processor, external memory storage and internal storage are connected by bus.Wherein, processor is, for example, one or more centers
Processor(CPU);Internal storage is, for example, random access memory(Random access memory, RAM);External storage
Device is, for example, disk, flash memory or other volatile solid-states.
Referring to Fig. 2, the embodiment of the present invention provides a kind of fast conversion method of matlab data formats, for above-mentioned number
According to processing equipment, specifically include:
S1. multiple data in the first data file are once read by row, first data file is with row storage organization
Data storage.
If for example, first data file is the data that N rows 4 arrange, storage organization is as follows, wherein " 1 " generation
First data of table, " 2 " represent second data, and " N4 " represents the N4 data:
1 2 3 4
5 6 7 8
9 10 11 12
…………
…………
N1 N2 N3 N4
Specifically, first data can be stored in advance in external memory storage, processor accesses external memory storage and read
Take multiple data in the first data file;Processor can once read first data when accessing external memory storage
Data in a line or multirow of file, wherein multirow can be continuous or discrete, can be with addition when reading per a line
Once read full line data or full line in partial data, in the partial data in reading full line, these data can be
It is continuous or discrete.Although it is favourable for reducing the number read once to read more data, because hardware provides
The limitation in source, such as the read or write speed of memory, the capacity, the speed of bus etc. of internal storage, and non-once are read more
More data can cause the reduction of disposed of in its entirety time, and those skilled in the art should select right quantity according to actual conditions
Once reading data.
S2. the multiple data that will be read from first data file, by the data file of row write-once second,
Second data file is matlab data formats.
If for example, second data file is the data of the row of N row 4, storage organization is as follows, wherein " 1 " generation
First data of table, " 2 " represent second data, and " N4 " represents the N4 data:
1 5 9……N1
2 6 10……N2
3 7 11 12……N3
4 8 12……N4
Specifically, these data after the data in reading the first data file, can be write storage inside by processor
In second data file of device.Due to internal storage writing speed quickly, as long as therefore influence the write time factor
The number of write-in.It is similar with reading data when writing data, can be by the second data described in the multiple data write-once
The one or more columns per page of file, wherein multiple row can be it is continuous or discrete, can be with write-once in addition when writing each row
Partial data in the data or permutation of permutation, in the partial data in writing permutation, these data can be continuous or not
Continuously.
The fast conversion method of the matlab data formats of the embodiment of the present invention, by the multiple data of read/write, reduce
The number of read/write, so as to accelerate processing speed, improves operating efficiency.
In a specific embodiment, the data in first data file store in a manner of M rows N is arranged, described
Data in second data file store in a manner of N rows M is arranged, the more numbers once read by row in the first data file
According to, including:Once read the data of the i-th row of first data file, 1≤i≤M;It is described will from first data text
The multiple data read in part, by the data file of row write-once second, including:By from the i-th row of first data file
The data of reading, the i-th row of the second data file described in write-once.
The present embodiment is illustrated below by way of a specific example.
For example, when being the second data file by above-mentioned first data file transition, can once write N number of(Can be
1000th, 2000 or bigger numerical value etc.)Data, here exemplified by 1000, the false code of reading process is as follows:
The false code of ablation process is as follows:
Referring to Fig. 3, the embodiment of the present invention provides a kind of quick switching device of matlab data formats, specifically include:
Data-reading unit, for once reading multiple data in the first data file, the first data text by row
Part is with row storage organization data storage;Optionally, available in a line or multirow for once reading first data file
Data;
Data write unit, for the multiple data that will be read from first data file, once write by row
Enter the second data file, second data file is matlab data formats;It is selectable, it may also be used for by the multiple number
According to the one or more columns per page of the second data file described in write-once.
The quick switching device of the matlab data formats of the embodiment of the present invention, by the multiple data of read/write, reduce
The number of read/write, so as to accelerate processing speed, improves operating efficiency.
In an optional embodiment, the data in first data file store in a manner of M rows N is arranged, described
Data in second data file store in a manner of N rows M is arranged,;The data-reading unit is used for, and once reads described first
The data of i-th row of data file, 1≤i≤M;The data write unit is used for, by from the i-th of first data file
The data that row is read, the i-th row of the second data file described in write-once.
Obviously, above-described embodiment is only intended to clearly illustrate example, and is not the restriction to embodiment.It is right
For those of ordinary skill in the art, can also make on the basis of the above description it is other it is various forms of change or
Change.There is no necessity and possibility to exhaust all the enbodiments.And the obvious change thus extended out or
Among changing still in the protection domain of the invention.
Claims (10)
- A kind of 1. fast conversion method of matlab data formats, it is characterised in that including:Multiple data in the first data file are once read by row, first data file stores number with row storage organization According to;The multiple data that will be read from first data file, by the data file of row write-once second, described Two data files are matlab data formats.
- 2. fast conversion method according to claim 1, it is characterised in that described once to read the first data file by row In multiple data, including:Once read first data file a line or multirow in data.
- 3. fast conversion method according to claim 2, it is characterised in that described once to read first data file A line or multirow in data, including:For every a line in first data file, the partial data in full line data or full line data is once read.
- 4. the fast conversion method according to Claims 2 or 3, it is characterised in that it is described will be from first data file The multiple data of middle reading, by the data file of row write-once second, including:By the one or more columns per page of the second data file described in the multiple data write-once.
- 5. fast conversion method according to claim 4, it is characterised in that described by the multiple data write-once institute The one or more columns per page of the second data file is stated, including:For each row in second data file, the partial data in write-once permutation data or permutation data.
- 6. according to the fast conversion method any one of claim 1-5, it is characterised in that in first data file Data by M rows N arrange in a manner of store, the data in second data file by N rows M arrange in a manner of store, it is described by row Multiple data in the first data file are once read, including:Once read the data of the i-th row of first data file, 1 ≤i≤M;The multiple data that will be read from first data file, by the data file of row write-once second, bag Include:By the data of the i-th row reading from first data file, the i-th row of the second data file described in write-once.
- A kind of 7. quick switching device of matlab data formats, it is characterised in that including:Data-reading unit, for once reading multiple data in the first data file by row, first data file with Row storage organization data storage;Data write unit, for the multiple data that will be read from first data file, by row write-once Two data files, second data file are matlab data formats.
- 8. quick switching device according to claim 7, it is characterised in that the data-reading unit, for once reading Take first data file a line or multirow in data.
- 9. the quick switching device according to claim 7 or 8, it is characterised in that the data write unit, for by institute State the one or more columns per page of the second data file described in multiple data write-onces.
- 10. according to the quick switching device any one of claim 7-9, it is characterised in that first data file In data by M rows N arrange in a manner of store, the data in second data file by N rows M arrange in a manner of store, the number It is used for according to reading unit, once reads the data of the i-th row of first data file, 1≤i≤M;The data write unit For, by the data of the i-th row reading from first data file, the i-th row of the second data file described in write-once.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710530849.3A CN107357868A (en) | 2017-07-03 | 2017-07-03 | A kind of fast conversion method and device of matlab data formats |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710530849.3A CN107357868A (en) | 2017-07-03 | 2017-07-03 | A kind of fast conversion method and device of matlab data formats |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107357868A true CN107357868A (en) | 2017-11-17 |
Family
ID=60291679
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710530849.3A Withdrawn CN107357868A (en) | 2017-07-03 | 2017-07-03 | A kind of fast conversion method and device of matlab data formats |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107357868A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102420674B (en) * | 2011-11-01 | 2014-03-26 | 上海华为技术有限公司 | Subblock interlacing method and parallel subblock interleaver |
CN104376082A (en) * | 2014-11-18 | 2015-02-25 | 中国建设银行股份有限公司 | Method for importing data in data source file to database |
CN105956166A (en) * | 2016-05-19 | 2016-09-21 | 北京京东尚科信息技术有限公司 | Database reading-writing method and database reading-writing apparatus |
CN106909554A (en) * | 2015-12-22 | 2017-06-30 | 亿阳信通股份有限公司 | A kind of loading method and device of database text table data |
-
2017
- 2017-07-03 CN CN201710530849.3A patent/CN107357868A/en not_active Withdrawn
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102420674B (en) * | 2011-11-01 | 2014-03-26 | 上海华为技术有限公司 | Subblock interlacing method and parallel subblock interleaver |
CN104376082A (en) * | 2014-11-18 | 2015-02-25 | 中国建设银行股份有限公司 | Method for importing data in data source file to database |
CN106909554A (en) * | 2015-12-22 | 2017-06-30 | 亿阳信通股份有限公司 | A kind of loading method and device of database text table data |
CN105956166A (en) * | 2016-05-19 | 2016-09-21 | 北京京东尚科信息技术有限公司 | Database reading-writing method and database reading-writing apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103336758B (en) | The sparse matrix storage means of a kind of employing with the sparse row of compression of local information and the SpMV implementation method based on the method | |
EP2408158B1 (en) | Circuit and method for implementing fft/ifft transform | |
CN102662690A (en) | Method and apparatus for starting application program | |
KR970029066A (en) | Command fetch method and device | |
CN104750727A (en) | Column type memory storage and query device and column type memory storage and query method | |
US20080140691A1 (en) | Method, Device and Computer Program Product for Optimizing File Placement in a Storage System | |
CN105608214B (en) | The method that fast search is carried out to the number-plate number of deploying to ensure effective monitoring and control of illegal activities | |
CN101729590A (en) | Method, system and device for providing web page | |
CN103914483A (en) | File storage method and device and file reading method and device | |
CN104516822A (en) | Memory access method and device | |
US20100318758A1 (en) | Efficient transfer of matrices for matrix based operations | |
US9098449B2 (en) | FFT accelerator | |
CN107451271A (en) | A kind of Hash table processing method, device, equipment and storage medium | |
EP3743821A1 (en) | Wide key hash table for a graphics processing unit | |
CN108228606A (en) | The wiring method and device of data | |
CN107544912A (en) | A kind of log recording method, loading method and its device | |
US9268744B2 (en) | Parallel bit reversal devices and methods | |
JP5527340B2 (en) | Vector processing apparatus and vector processing method | |
CN107357868A (en) | A kind of fast conversion method and device of matlab data formats | |
CN102567243B (en) | Storage device and refreshing method for same | |
CN103279562B (en) | A kind of method, device and database storage system for database L2 cache | |
CN110110034A (en) | A kind of RDF data management method, device and storage medium based on figure | |
CN111368250B (en) | Data processing system, method and equipment based on Fourier transformation/inverse transformation | |
GB2622349A (en) | Program event recording storage alteration processing for a neural network accelerator instruction | |
CN112416825B (en) | Heterogeneous many-core-oriented data transmission method based on spatial rearrangement |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20171117 |
|
WW01 | Invention patent application withdrawn after publication |