[go: up one dir, main page]

CN103593307B - A kind of method and apparatus of electromagnetic prospecting system process image data - Google Patents

A kind of method and apparatus of electromagnetic prospecting system process image data Download PDF

Info

Publication number
CN103593307B
CN103593307B CN201310606798.XA CN201310606798A CN103593307B CN 103593307 B CN103593307 B CN 103593307B CN 201310606798 A CN201310606798 A CN 201310606798A CN 103593307 B CN103593307 B CN 103593307B
Authority
CN
China
Prior art keywords
block
image data
memory buffers
calculating
cache blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310606798.XA
Other languages
Chinese (zh)
Other versions
CN103593307A (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.)
HUNAN QIANGJUN TECHNOLOGY Co Ltd
Original Assignee
HUNAN QIANGJUN 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 HUNAN QIANGJUN TECHNOLOGY Co Ltd filed Critical HUNAN QIANGJUN TECHNOLOGY Co Ltd
Priority to CN201310606798.XA priority Critical patent/CN103593307B/en
Publication of CN103593307A publication Critical patent/CN103593307A/en
Application granted granted Critical
Publication of CN103593307B publication Critical patent/CN103593307B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Image Input (AREA)

Abstract

The invention provides a kind of method and apparatus of electromagnetic prospecting system process image data, comprise: electromagnetic prospecting system comprises internal memory and storer, described method comprises: the memory headroom for the treatment of image data is marked off multiple memory buffers block and a calculating cache blocks; Search current idle memory buffers block and stored in image data; When the available free memory buffers block of caching system, by the image data of current acquisition stored in; When described caching system does not have idle memory buffers block, storer spanned file cache blocks by the image data of current acquisition stored in; When being filled with memory buffers block and/or the file cache block of image data, by computational threads, the image data that memory buffers block and/or file cache block are filled with being copied into described calculating cache blocks, and calculating.The present invention can reduce write or time required for image data of reading, effectively improves the speed of system data process, collection and calculating data.

Description

A kind of method and apparatus of electromagnetic prospecting system process image data
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of method and apparatus of electromagnetic prospecting system process image data.
Background technology
The electric field that electromagnetic prospecting is artificial by Instrument observation, natural or alternating electromagnetic field, analyze, explain these feature and rule searches for mineral resources and a kind of geophysical exploration method of geologize structure.In electromagnetic prospecting, due to needs long-time continuous uninterrupted sampling signal, also need to do superposition denoising and real time fourier processing to the signal gathered simultaneously, and then extracting electromagnetic method parameter information, this is just to real-time response ability and the signal handling capacity proposition requirements at the higher level of electromagnetic prospecting embedded system.
In currently available technology, common disposal route is that the data collected are stored in nonvolatile memory with document form by collecting thread, and when after the sampling completing a signal period, computational threads read data files completing from storer once calculates.
But, in embedded systems, comparatively slow from the speed of memory processes image data, be unfavorable for the practical operation application that electromagnetic prospecting system stores image data and calculates.
Summary of the invention
(1) technical matters that will solve
The invention provides a kind of method and apparatus of electromagnetic prospecting system process image data, write and process the slower technical matters of image data hourly velocity to solve in prior art.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of method of electromagnetic prospecting system process image data, electromagnetic prospecting system comprises internal memory and storer, and described method comprises:
Memory headroom for the treatment of image data is marked off multiple memory buffers block and a calculating cache blocks;
According to step S1-S3 stored in image data:
Step S1: search current idle memory buffers block; When the available free memory buffers block of caching system, proceed to step S2; When described caching system does not have idle memory buffers block, proceed to step S3;
Step S2: by the image data of current acquisition stored in current idle memory buffers block; When current idle memory buffers block is filled with, proceed to step S1;
Step S3: at storer spanned file cache blocks by the image data of current acquisition stored in described file cache block; When described file cache block is filled with, proceed to step S1;
When being filled with memory buffers block and/or the file cache block of image data, image data memory buffers block and/or file cache block are filled with by computational threads, copies into described calculating cache blocks, and calculates.
Further,
Described method also comprises: the memory headroom for the treatment of image data is marked off a cache information parking space;
Described cache information comprises: memory buffers block residue number, point to current can memory location the first pointer, point to current calculate position calculating pointer, control caching system whether can caching system semaphore, controlling calculation thread whether can calculating cache blocks semaphore in one or more.
Further,
Described memory buffers block and described file cache block comprise: data portion and head;
Described current idle memory buffers block of searching comprises: by the idle memory buffers block of described first pointed first; Searching the next one can the second free buffer block of storage of collected data, by the idle memory buffers block of the second pointed second, and is placed in the head of described first idle memory buffers block; Described calculating pointed first is calculated cache blocks.
Further, described method also comprises:
After described first idle memory buffers block is filled with image data, by the sensing of described first pointer, be revised as the second free buffer block of described second pointed, searching the next one can the 3rd free buffer block of storage of collected data, and by idle for the second pointed the 3rd memory buffers block, described second pointer is placed in the head of described second free buffer block.
Further,
Described image data memory buffers block and/or file cache block are filled with by computational threads, copies into described calculating cache blocks, and carries out calculating and comprise: carry out signalling to described calculating cache blocks semaphore and add 1 operation, calculates data according to step S1-S3:
Step S1: signal such as grade is carried out to described calculating cache blocks semaphore and subtracts 1 operation, when this signal quantity is more than or equal to 1, proceed to step S2; When this signal quantity is less than 1, computational threads enters suspended state, until carry out after signalling adds 1 operation, proceeding to step S2 to described calculating cache blocks semaphore;
Step S2: calculate cache blocks first of described calculating pointed and copy described calculating cache blocks to, release has copied the image data stored in the first complete calculating cache blocks, it is the described first the second calculating cache blocks calculating header information sensing in cache blocks that amendment calculates pointer, and putting the first calculating cache blocks is upstate;
Step S3: process the data in described calculating cache blocks, proceed to step S1 after being disposed.
On the other hand, the present invention also provides a kind of device of electromagnetic prospecting system process image data, comprising: division unit, cache lookup unit, storage unit and computing unit, wherein:
Division unit, for marking off multiple memory buffers block and a calculating cache blocks by the memory headroom for the treatment of image data;
Cache lookup unit, for searching current idle memory buffers block;
Storage unit, for searching current idle memory buffers block; When the available free memory buffers block of caching system, by the image data of current acquisition stored in current idle memory buffers block; When described caching system does not have idle memory buffers block, at storer spanned file cache blocks by the image data of current acquisition stored in described file cache block;
Computing unit, when being filled with memory buffers block and/or the file cache block of image data, image data memory buffers block and/or file cache block are filled with by computational threads, copies into described calculating cache blocks, and calculates.
Further,
Division unit also comprises: cache information subelement, for the memory headroom for the treatment of image data is marked off a cache information parking space;
Described cache information comprises: memory buffers block residue number, point to current can memory location the first pointer, point to current calculate position calculating pointer, control caching system whether can caching system semaphore, controlling calculation thread whether can calculating cache blocks semaphore in one or more.
Further,
Described division unit comprises: cache blocks divides subelement, for described memory buffers block and described file cache block are divided into data portion and head;
Described cache lookup unit comprises: pointer arranges subelement, for by the idle memory buffers block of described first pointed first; Searching the next one can the second free buffer block of storage of collected data, by the idle memory buffers block of the second pointed second, and is placed in the head of described first idle memory buffers block; Described calculating pointed first is calculated cache blocks.
Further, described device also comprises:
Pointer modified unit, be connected with described storage unit, for after described first idle memory buffers block is filled with image data, by the sensing of described first pointer, be revised as the second free buffer block of described second pointed, searching the next one can the 3rd free buffer block of storage of collected data, and by idle for the second pointed the 3rd memory buffers block, described second pointer is placed in the head of described second free buffer block.
Further, described computing unit comprises:
Computing subelement, adds 1 operation for carrying out signalling to described calculating cache blocks semaphore, calculates data according to step S1-S3:
Step S1: signal such as grade is carried out to described calculating cache blocks semaphore and subtracts 1 operation, when this signal quantity is more than or equal to 1, proceed to step S2; When this signal quantity is less than 1, computational threads enters suspended state, until carry out after signalling adds 1 operation, proceeding to step S2 to described calculating cache blocks semaphore;
Step S2: calculate cache blocks first of described calculating pointed and copy described calculating cache blocks to, release has copied the image data stored in the first complete calculating cache blocks, it is the described first the second calculating cache blocks calculating header information sensing in cache blocks that amendment calculates pointer, and putting the first calculating cache blocks is upstate;
Step S3: process the data in described calculating cache blocks, proceed to step S1 after being disposed.(3) beneficial effect
In the method and apparatus of a kind of electromagnetic prospecting system process image data of the present invention's proposition, the mode that memory cache and file cache store jointly can be used, promote the data processing of electromagnetic prospecting system, acquisition capacity and computing power.After system starts collection, image data can be paid the utmost attention to and put into memory cache blocks, when memory size is not enough, then consider to store with document form.Because gathered high priority data is stored in internal memory by the present invention, compare and only rely on memory stores data speed faster, the time that can reduce write or read required for image data, effectively improve the speed of system data process, collection and calculating data.
In addition, the present invention can reduce physical storage operation, and effective protected storage avoids the read-write operation of repetition and causes damaging.The present invention can also enable CPU respond other controlling functions fast.Owing to decreasing the operation of storer, also effectively reduce the power consumption of whole system.When memory headroom is not enough, the mode of file cache can be adopted to be stored into storer, and effectively prevent the problem that Installed System Memory is limited, the two is taken into account.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the basic procedure schematic diagram of the method according to embodiment of the present invention electromagnetic prospecting system process image data;
Fig. 2 is the schematic flow sheet of the method for the process of electromagnetic prospecting system in accordance with a preferred embodiment of the present invention image data;
Fig. 3 is the CPU of method according to embodiment of the present invention electromagnetic prospecting system process image data, memory cache block and file cache blocks of data interchange graph;
Fig. 4 is the initialization buffer area structural drawing of the method according to embodiment of the present invention electromagnetic prospecting system process image data;
Fig. 5 is the initialization memory cache blocks schematic diagram of the method according to embodiment of the present invention electromagnetic prospecting system process image data;
Fig. 6 be according to the method for embodiment of the present invention electromagnetic prospecting system process image data be filled with M0 cache blocks time pointer schematic diagram;
Fig. 7 is the pointer schematic diagram of the memory cache blocks of method according to embodiment of the present invention electromagnetic prospecting system process image data;
Fig. 8 is the pointer schematic diagram comprising file cache block of the method according to embodiment of the present invention electromagnetic prospecting system process image data;
Fig. 9 is the pointer schematic diagram comprising file cache block of the method according to embodiment of the present invention electromagnetic prospecting system process image data;
Figure 10 is the pointer schematic diagram comprising file cache block of the method according to embodiment of the present invention electromagnetic prospecting system process image data;
Figure 11 be the memory cache blocks of method according to embodiment of the present invention electromagnetic prospecting system process image data pointer schematic diagram;
Figure 12 is the basic structure schematic diagram of the device according to embodiment of the present invention electromagnetic prospecting system process image data;
Figure 13 is a preferred embodiment structural representation of the device according to electromagnetic prospecting system process image data of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The invention provides a kind of method of electromagnetic prospecting system process image data, electromagnetic prospecting system comprises internal memory and storer, and see Fig. 1, method comprises:
Step 101: the memory headroom for the treatment of image data is marked off multiple memory buffers block and a calculating cache blocks;
Step 102: according to step S1-S3 stored in image data:
Step S1: search current idle memory buffers block; When the available free memory buffers block of caching system, proceed to step S2; When described caching system does not have idle memory buffers block, proceed to step S3;
Step S2: by the image data of current acquisition stored in current idle memory buffers block; When current idle memory buffers block is filled with, proceed to step S1;
Step S3: at storer spanned file cache blocks by the image data of current acquisition stored in described file cache block; When described file cache block is filled with, proceed to step S1;
Step 103: when being filled with memory buffers block and/or the file cache block of image data, image data memory buffers block and/or file cache block are filled with by computational threads, copies into described calculating cache blocks, and calculates.
Visible, in the method for a kind of electromagnetic prospecting system process image data of embodiment of the present invention proposition, the mode that memory cache and file cache store jointly can be used, promote the data processing of electromagnetic prospecting system, acquisition capacity and computing power.After system starts collection, image data can be paid the utmost attention to and put into memory cache blocks, when memory size is not enough, then consider to store with document form.Because gathered high priority data is stored in internal memory by the embodiment of the present invention, compare and only rely on memory stores data speed faster, write or time required for image data of reading can be reduced, effectively improve the speed of system data process, collection and calculating data.
In addition, the embodiment of the present invention can reduce physical storage operation, and effective protected storage avoids the read-write operation of repetition and causes damaging.The embodiment of the present invention can also enable CPU respond other controlling functions fast.Owing to decreasing the operation of storer, also effectively reduce the power consumption of whole system.When memory headroom is not enough, the mode of file cache can be adopted to be stored into storer, and effectively prevent the problem that Installed System Memory is limited, the two is taken into account.
In one embodiment of the invention, preferably, method can also comprise: the memory headroom for the treatment of image data is marked off a cache information parking space.Cache information can comprise: memory buffers block residue number, point to current can memory location the first pointer, point to current calculate position calculating pointer, control caching system whether can caching system semaphore, controlling calculation thread whether can the cache information such as calculating cache blocks semaphore.
In one embodiment of the invention, preferably, memory buffers block can comprise: data portion and head.In one embodiment of the invention, the position of current idle memory buffers block and the position of the idle memory buffers block of the next one can be distinguished by every pointer.When searching current idle cache blocks, preferably, can the idle memory buffers block of just described first pointed first; Searching the next one can the second free buffer block of storage of collected data, by the idle memory buffers block of the second pointed second, and is placed in the head of described first idle memory buffers block; Described calculating pointed first is calculated cache blocks.The first calculating cache blocks now can be the memory buffers block being filled with image data, or is filled with the file cache block of image data.
In the process that image data is stored, the locking and unlocking caching system can be carried out by the method changing caching system semaphore, and change the sensing of pointer after storing, to be applicable to the storage of subsequent acquisition data.Preferably, after the image data obtaining designated length, can change caching system semaphore and pin caching system, during to ensure to operate, other threads cannot revise whole buffer area, and then by image data stored in current idle memory buffers block.After current idle memory buffers block is filled, then can unlock caching system by the mode changing caching system semaphore, represent that caching system runs out, other threads can use.Meanwhile, after the first idle memory buffers block is filled with image data, by the sensing of the first pointer, be revised as the second free buffer block of the second pointed, searching the next one can the 3rd free buffer block of storage of collected data, and by idle for the second pointed the 3rd memory buffers block, the second pointer is placed in the head of described second free buffer block.
In another embodiment of the present invention, in image data memory buffers block and/or file cache block are filled with by computational threads, copy into described calculating cache blocks, and carry out in the process calculated, preferably, signalling can be carried out to calculating cache blocks semaphore and add 1 operation, calculate data according to step S1-S3:
Step S1: signal such as grade is carried out to calculating cache blocks semaphore and subtracts 1 operation, when this signal quantity is more than or equal to 1, proceed to step S2; When this signal quantity is less than 1, computational threads enters suspended state, until carry out after signalling adds 1 operation, proceeding to step S2 to calculating cache blocks semaphore;
Step S2: calculate cache blocks calculate pointed first and copy calculating cache blocks to, release has copied the image data stored in the first complete calculating cache blocks, it is the second calculating cache blocks that in the first calculating cache blocks, header information points to that amendment calculates pointer, and putting the first calculating cache blocks is upstate;
Step S3: process the data in described calculating cache blocks, proceed to step S1 after being disposed.
Below for a specific embodiment of the method for electromagnetic prospecting system process image data of the present invention, describe the detailed step that the inventive method realizes in detail, as shown in Figure 2.
Step 201: internal memory remaining space is divided into N number of memory buffers block, a calculating cache blocks and a cache information parking space.
In this step, first internal memory remaining space is divided into N number of memory buffers block, the schematic diagram of memory cache blocks and file cache block is as Fig. 3.Memory buffers block in internal memory comprises sizeof(DataStruct) and sizeof(BufHead), wherein DataStruct is the data of a signal period sampling, and BufHead is cache blocks header information, comprises type and the identification number of next buffer memory.In addition, also will be marked off the public space that is deposited cache information, and one calculates cache blocks.The public space depositing cache information comprises internal memory residue number, the cashing indication ID(that last memory cache is used for collecting thread is divided into 0 ~ N-1), last file cache is used for the cache information such as cashing indication ID, caching system semaphore SemBufAll, calculating cache blocks semaphore SemCalc of collecting thread.Fig. 4 is shown in by the division schematic diagram of whole memory headroom.
Step 202: initialization is carried out to cache information.
In this step, need to carry out initialization to the cache information in public space, wherein, the caching system semaphore SemBufAll that initialization controls whole caching system is 1, represents that current cache system can use; The calculating cache blocks semaphore SemCalc of initialization controlling calculation thread is 0, and representing current does not have computable number certificate.
Step 203: search current idle memory buffers block.
In this step, the position of current idle memory buffers block and the position of the idle memory buffers block of the next one can be distinguished by every pointer.When searching current idle cache blocks, the first pointer buf_acq_current in collecting thread and the calculating pointer buf_calc_current in computational threads is pointed to current idle memory buffers block, as shown in Figure 5, the first pointer buf_acq_current in figure and calculating pointer buf_calc_current all points to current idle cache blocks M0.In addition, search and the second pointer buf_acq_next in collecting thread is pointed to next idle memory buffers block, the second pointer being placed in the header information of current idle memory buffers block M0 simultaneously.
Step 204: obtain image data, and judge whether there is in caching system idle memory buffers block.
After system starts collection, first obtain the image data of designated length, then subtract 1 operation to pin caching system to caching system semaphore SemBufAll, during to ensure to operate, other threads cannot revise whole buffer area.Now, judge whether there is in caching system idle memory buffers block, when the available free memory buffers block of caching system, enter step 205; When described caching system does not have idle memory buffers block, enter step 206.
Step 205: image data is filled up stored in idle memory buffers block.
This step is operation when there is idle memory buffers block in caching system, and whether the memory buffers block preferentially searched in the embodiment of the present invention in internal memory is available free, if available free, be then preferentially stored into idle memory buffers block and wait for that computational threads calculates.When filling up current idle memory buffers block, need the idle memory buffers block of the next one sensing of the first pointer buf_acq_current being revised as current second pointer buf_acq_next sensing.As shown in Figure 6: when filling up M0 block cache block, when M1 block free buffer block is write in preparation, first pointer buf_acq_current will from M0, and change the M1 pointed by the second pointer buf_acq_next pointing to and store in the header information of M0 into, M1 is now then current idle memory buffers block.And system, by searching next available idle memory buffers block, is set to M2, is then stored into the second pointer buf_acq_next in the header information of M1, will points to M2.
In the figure 7, when filling up M (N-2) block memory buffers block and starting to calculate, buf_calc_current points to M (N-2), first pointer buf_acq_current has pointed to M (N-1), when also available free memory buffers block in internal memory, during as M0, the head pointer of M (N-1) then will point to M0.
Step 206: image data is stored at storer spanned file cache blocks.
This step is for operation when there is not idle memory buffers block in caching system.When as shown in Figure 8, when filling up M (N-1) block memory buffers block, all memory buffers blocks all also do not have the free time, then need to generate a file cache block F0 in memory, make the second pointer buf_acq_next in M (N-1) block memory buffers block header information point to F0.After M (N-1) also fills up, when still not having idle memory buffers block, then putting the first pointer buf_acq_current is F0, starts to store image data in F0.
And when writing Fx block file cache blocks, find memory buffers block available free in internal memory, such as M0, then the second pointer buf_acq_next in Fx block memory buffers block header information is pointed to M0, the idle memory buffers block available as the next one preferentially stores, as Fig. 9.
When writing Fx+i block file cache blocks, not finding memory buffers block available free in internal memory, then can continue generation Fx+i+1 block file cache blocks in memory and carry out acquired data storage, as Figure 10.
Step 207: will the memory buffers block of image data be filled with, and/or, when being filled with the file cache block of image data, copying successively into calculating cache blocks, and calculate.
When the image data that memory buffers block or file cache block store expires, can add 1 operation to caching system semaphore SemBufAll, use caching system to represent, other threads can use.Also need to add 1 operation, to represent in computational threads that the data having a cache blocks can use to calculating cache blocks semaphore SemCalc.Now system can judge the value of SemCalc, when for 0 time, then represent do not have data to calculate, computational threads enters dormant state, when for 1 time, computational threads will be waken up, and start to calculate.
First, caching system semaphore SemBufAll is performed and subtracts 1 operation to pin caching system, when ensureing to operate, other threads cannot revise whole buffer area, then calculating the data copy of the cache blocks that pointer buf_calc_current points to interim calculating cache blocks, with releasing resource as early as possible, ensure not take caching system when calculating.After copy, the cache blocks putting buf_calc_current sensing is idle condition, revises the next cache blocks pointed by buf_calc_current sensing current cache block header information simultaneously.SemBufAll is performed and adds 1 operation to unlock caching system, finally then can call corresponding algorithm to calculate this data.
As shown in figure 11, when filling up M1 block memory buffers block, when preparing to write M2 block, buf_calc_current points to M1, and M1 BOB(beginning of block) calculates, and now M0 has calculated complete, is idle condition.
Can repeat to step 206 from step 204 above, constantly complete the collection storing process to image data.
So far, then the concrete implementation of the method for embodiment of the present invention electromagnetic prospecting system process image data is completed.
Double buffer of the present invention is adopted to promote the method for collection and computing function, be 180MHz at processor clock, major clock is in the AT91RM9200 microprocessor system of 60MHz, memory size is 32MB, and memory size is 1GB, arranges frequency acquisition 2048Hz, collecting test is carried out to 4 acquisition channels, data of every passage are 4 bytes, and by raw data and result of calculation stored in storer, namely original data volume per second is 32768B.Result shows, all there will not be loss of data in gathering 8 hours, the original data volume size altogether gathered is 900MB.And superposition denoising and real time fourier processing can be done to the signal gathered, system external circle I/O responds in time, transmits out in real time by cable network or wireless network by result of calculation, does not occur crashing.But when being used alone document form storage mode, acquisition time was greater than in a few minutes can there is loss of data, and system responses is excessively slow.Frequency acquisition of the present invention is high, can accomplish real time signal processing, real-time response man-machine interface.
In addition, it should be noted that, above-mentioned all flow processs descriptions based on Fig. 2 are preferred implementation procedures of one of the inventive method, in the actual realization of the inventive method, random variation can be carried out as required on the basis of flow process shown in Fig. 1, can be select the arbitrary steps in Fig. 2 to realize, the sequencing of each step also can adjust as required.
In another embodiment of the present invention, additionally provide a kind of device of electromagnetic prospecting system process image data, see Figure 12, comprising:
Division unit 1201, for marking off multiple memory buffers block and a calculating cache blocks by the memory headroom for the treatment of image data;
Cache lookup unit 1202, for searching current idle memory buffers block;
Storage unit 1203, for searching current idle memory buffers block; When the available free memory buffers block of caching system, by the image data of current acquisition stored in current idle memory buffers block; When described caching system does not have idle memory buffers block, at storer spanned file cache blocks by the image data of current acquisition stored in described file cache block;
Computing unit 1204, for when being filled with memory buffers block and/or the file cache block of image data, copying the image data that each memory buffers block and/or file cache block are filled with into described calculating cache blocks successively, and calculating.
In one embodiment of the invention, preferably, division unit 1201 can comprise: cache information subelement 1301, as Figure 13, for the memory headroom for the treatment of image data is marked off a cache information parking space, wherein cache information comprises: memory buffers block residue number, point to current can memory location the first pointer, point to current calculate position calculating pointer, control caching system whether can caching system semaphore, controlling calculation thread whether can calculating cache blocks semaphore in one or more.
In one embodiment of the invention, the position of current idle memory buffers block and the position of the idle memory buffers block of the next one can be distinguished by every pointer.When searching current idle cache blocks, preferably, division unit 1201 can comprise: cache blocks divides subelement 1302, for memory buffers block and file cache block are divided into data portion and head.Cache lookup unit 1202 can comprise: pointer arranges subelement 1303, for by the idle memory buffers block of the first pointed first; Searching the next one can the second free buffer block of storage of collected data, by the idle memory buffers block of the second pointed second, and is placed in the head of the first idle memory buffers block; Calculating pointed first is calculated cache blocks.
In the process that image data is stored, the locking and unlocking caching system can be carried out by the method changing caching system semaphore, and change the sensing of pointer after storing, to be applicable to the storage of subsequent acquisition data.Preferably, device can also comprise: pointer modified unit 1304, be connected with storage unit 1203, for after the first idle memory buffers block is filled with image data, by the sensing of the first pointer, be revised as the second free buffer block of the second pointed, search and by idle for the second pointed the 3rd memory buffers block, the second pointer be placed in the head of the second free buffer block.
In another embodiment of the present invention, in the image data that idle memory buffers block or file cache block are stored, copy into calculating cache blocks, and carry out in the process calculated, preferably, computing unit 1204 can comprise: computing subelement 1305, adds 1 operation for carrying out signalling to described calculating cache blocks semaphore, calculates data according to step S1-S3:
Step S1: signal such as grade is carried out to described calculating cache blocks semaphore and subtracts 1 operation, when this signal quantity is more than or equal to 1, proceed to step S2; When this signal quantity is less than 1, computational threads enters suspended state, until carry out after signalling adds 1 operation, proceeding to step S2 to described calculating cache blocks semaphore;
Step S2: calculate cache blocks first of described calculating pointed and copy described calculating cache blocks to, release has copied the image data stored in the first complete calculating cache blocks, it is the described first the second calculating cache blocks calculating header information sensing in cache blocks that amendment calculates pointer, and putting the first calculating cache blocks is upstate;
Step S3: process the data in described calculating cache blocks, proceed to step S1 after being disposed.
It should be noted that, the structure of each embodiment of the device of the electromagnetic prospecting system process image data shown in above-mentioned Figure 13 can carry out combination in any use.
Visible, the embodiment of the present invention has following beneficial effect:
In the method and apparatus of a kind of electromagnetic prospecting system process image data of embodiment of the present invention proposition, the mode that memory cache and file cache store jointly can be used, promote the data processing of electromagnetic prospecting system, acquisition capacity and computing power.After system starts collection, image data can be paid the utmost attention to and put into memory cache blocks, when memory size is not enough, then consider to store with document form.Because gathered high priority data is stored in internal memory by the present invention, compare and only rely on memory stores data speed faster, the time that can reduce write or read required for image data, effectively improve the speed of system data process, collection and calculating data.
In addition, the present invention can reduce physical storage operation, and effective protected storage avoids the read-write operation of repetition and causes damaging, and the data owing to gathering also can be avoided not have to be written in time in storer the problem causing the loss of data gathered.The present invention can also enable CPU respond other controlling functions fast.Owing to decreasing the operation of storer, also effectively reduce the power consumption of whole system.When memory headroom is not enough, the mode of file cache can be adopted to be stored into storer, and effectively prevent the problem that Installed System Memory is limited, the two is taken into account.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (6)

1. a method for electromagnetic prospecting system process image data, it is characterized in that, electromagnetic prospecting system comprises internal memory and storer, and described method comprises:
Memory headroom for the treatment of image data is marked off multiple memory buffers block and a calculating cache blocks;
According to step S1-S3 stored in image data:
Step S1: search current idle memory buffers block; When the available free memory buffers block of caching system, proceed to step S2; When described caching system does not have idle memory buffers block, proceed to step S3;
Step S2: by the image data of current acquisition stored in current idle memory buffers block; When current idle memory buffers block is filled with, proceed to step S1;
Step S3: at storer spanned file cache blocks by the image data of current acquisition stored in described file cache block; When described file cache block is filled with, proceed to step S1;
When being filled with memory buffers block and/or the file cache block of image data, image data memory buffers block and/or file cache block are filled with by computational threads, copies into described calculating cache blocks, and calculates;
Described method also comprises: the memory headroom for the treatment of image data is marked off a cache information parking space;
Described cache information comprises: memory buffers block residue number, point to current can memory location the first pointer, point to current calculate position calculating pointer, control caching system whether can caching system semaphore, controlling calculation thread whether can calculating cache blocks semaphore in one or more;
Described memory buffers block and described file cache block comprise: data portion and head;
Described current idle memory buffers block of searching comprises: by the idle memory buffers block of described first pointed first; Searching the next one can the second free buffer block of storage of collected data, by the idle memory buffers block of the second pointed second, and is placed in the head of described first idle memory buffers block; Described calculating pointed first is calculated cache blocks.
2. the method for electromagnetic prospecting system process image data according to claim 1, it is characterized in that, described method also comprises:
After described first idle memory buffers block is filled with image data, by the sensing of described first pointer, be revised as the second free buffer block of described second pointed, searching the next one can the 3rd free buffer block of storage of collected data, and by idle for the second pointed the 3rd memory buffers block, described second pointer is placed in the head of described second free buffer block.
3. the method for electromagnetic prospecting system process image data according to claim 2, is characterized in that:
Described image data memory buffers block and/or file cache block are filled with by computational threads, copies into described calculating cache blocks, and carries out calculating and comprise: carry out signalling to described calculating cache blocks semaphore and add 1 operation, calculates data according to step S1-S3:
Step S1: signal such as grade is carried out to described calculating cache blocks semaphore and subtracts 1 operation, when this signal quantity is more than or equal to 1, proceed to step S2; When this signal quantity is less than 1, computational threads enters suspended state, until carry out after signalling adds 1 operation, proceeding to step S2 to described calculating cache blocks semaphore;
Step S2: calculate cache blocks first of described calculating pointed and copy described calculating cache blocks to, release has copied the image data stored in the first complete calculating cache blocks, it is the described first the second calculating cache blocks calculating header information sensing in cache blocks that amendment calculates pointer, and putting the first calculating cache blocks is upstate;
Step S3: process the data in described calculating cache blocks, proceed to step S1 after being disposed.
4. a device for electromagnetic prospecting system process image data, is characterized in that, comprising: division unit, cache lookup unit, storage unit and computing unit, wherein:
Division unit, for marking off multiple memory buffers block and a calculating cache blocks by the memory headroom for the treatment of image data;
Cache lookup unit, for searching current idle memory buffers block;
Storage unit, for searching current idle memory buffers block; When the available free memory buffers block of caching system, by the image data of current acquisition stored in current idle memory buffers block; When described caching system does not have idle memory buffers block, at storer spanned file cache blocks by the image data of current acquisition stored in described file cache block;
Computing unit, when being filled with memory buffers block and/or the file cache block of image data, image data memory buffers block and/or file cache block are filled with by computational threads, copies into described calculating cache blocks, and calculates;
Division unit also comprises: cache information subelement, for the memory headroom for the treatment of image data is marked off a cache information parking space;
Described cache information comprises: memory buffers block residue number, point to current can memory location the first pointer, point to current calculate position calculating pointer, control caching system whether can caching system semaphore, controlling calculation thread whether can calculating cache blocks semaphore in one or more;
Described division unit comprises: cache blocks divides subelement, for described memory buffers block and described file cache block are divided into data portion and head;
Described cache lookup unit comprises: pointer arranges subelement, for by the idle memory buffers block of described first pointed first; Searching the next one can the second free buffer block of storage of collected data, by the idle memory buffers block of the second pointed second, and is placed in the head of described first idle memory buffers block; Described calculating pointed first is calculated cache blocks.
5. the device of electromagnetic prospecting system process image data according to claim 4, it is characterized in that, described device also comprises:
Pointer modified unit, be connected with described storage unit, for after described first idle memory buffers block is filled with image data, by the sensing of described first pointer, be revised as the second free buffer block of described second pointed, searching the next one can the 3rd free buffer block of storage of collected data, and by idle for the second pointed the 3rd memory buffers block, described second pointer is placed in the head of described second free buffer block.
6. the device of electromagnetic prospecting system process image data according to claim 5, it is characterized in that, described computing unit comprises:
Computing subelement, adds 1 operation for carrying out signalling to described calculating cache blocks semaphore, calculates data according to step S1-S3:
Step S1: signal such as grade is carried out to described calculating cache blocks semaphore and subtracts 1 operation, when this signal quantity is more than or equal to 1, proceed to step S2; When this signal quantity is less than 1, computational threads enters suspended state, until carry out after signalling adds 1 operation, proceeding to step S2 to described calculating cache blocks semaphore;
Step S2: calculate cache blocks first of described calculating pointed and copy described calculating cache blocks to, release has copied the image data stored in the first complete calculating cache blocks, it is the described first the second calculating cache blocks calculating header information sensing in cache blocks that amendment calculates pointer, and putting the first calculating cache blocks is upstate;
Step S3: process the data in described calculating cache blocks, proceed to step S1 after being disposed.
CN201310606798.XA 2013-11-25 2013-11-25 A kind of method and apparatus of electromagnetic prospecting system process image data Active CN103593307B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310606798.XA CN103593307B (en) 2013-11-25 2013-11-25 A kind of method and apparatus of electromagnetic prospecting system process image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310606798.XA CN103593307B (en) 2013-11-25 2013-11-25 A kind of method and apparatus of electromagnetic prospecting system process image data

Publications (2)

Publication Number Publication Date
CN103593307A CN103593307A (en) 2014-02-19
CN103593307B true CN103593307B (en) 2016-04-20

Family

ID=50083458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310606798.XA Active CN103593307B (en) 2013-11-25 2013-11-25 A kind of method and apparatus of electromagnetic prospecting system process image data

Country Status (1)

Country Link
CN (1) CN103593307B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104077368A (en) * 2014-06-18 2014-10-01 国电南瑞科技股份有限公司 History data two-level caching multi-stage submitting method for dispatching monitoring system
CN106649140A (en) * 2016-12-29 2017-05-10 深圳前海弘稼科技有限公司 Data processing method, apparatus and system
CN108446077A (en) * 2018-03-21 2018-08-24 华立科技股份有限公司 Electric energy meter communication data storage method, device and electric energy meter
CN119376968A (en) * 2022-02-24 2025-01-28 华为技术有限公司 Data processing method, direct memory access engine and computing device
CN115524645A (en) * 2022-06-28 2022-12-27 上海瀚挚电子科技有限公司 A magnetic field change detection method based on magnetic tunnel junction sensor
CN116132217A (en) * 2023-01-18 2023-05-16 瑞芯微电子股份有限公司 Method and apparatus for processing bus data, electronic device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101241420A (en) * 2008-03-20 2008-08-13 杭州华三通信技术有限公司 Method and memory apparatus for promoting write address incontinuous data storage efficiency
US7761667B2 (en) * 2005-05-03 2010-07-20 International Business Machines Corporation Method, apparatus, and program to efficiently calculate cache prefetching patterns for loops
CN102098423A (en) * 2009-12-10 2011-06-15 北大方正集团有限公司 Seamless file collection method and system
CN102223681A (en) * 2010-04-19 2011-10-19 中兴通讯股份有限公司 M2M system and cache control method therein

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8788755B2 (en) * 2010-07-01 2014-07-22 Infinidat Ltd. Mass data storage system and method of operating thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761667B2 (en) * 2005-05-03 2010-07-20 International Business Machines Corporation Method, apparatus, and program to efficiently calculate cache prefetching patterns for loops
CN101241420A (en) * 2008-03-20 2008-08-13 杭州华三通信技术有限公司 Method and memory apparatus for promoting write address incontinuous data storage efficiency
CN102098423A (en) * 2009-12-10 2011-06-15 北大方正集团有限公司 Seamless file collection method and system
CN102223681A (en) * 2010-04-19 2011-10-19 中兴通讯股份有限公司 M2M system and cache control method therein

Also Published As

Publication number Publication date
CN103593307A (en) 2014-02-19

Similar Documents

Publication Publication Date Title
CN103593307B (en) A kind of method and apparatus of electromagnetic prospecting system process image data
CN104335175B (en) The method and system of thread is identified and migrated between system node based on system performance metric
US9645920B2 (en) Adaptive cache memory controller
CN109783004A (en) The data processing method of data memory device and memory device
CN104115134B (en) For managing the method and system to be conducted interviews to complex data storage device
CN102981944B (en) A kind of log storing method based on file system
US9304920B2 (en) System and method for providing cache-aware lightweight producer consumer queues
US20120110239A1 (en) Causing Related Data to be Written Together to Non-Volatile, Solid State Memory
KR102303008B1 (en) Flushing in file system
CN102637197B (en) File Management Method of Real-time Data Acquisition and Storage System
CN103812934B (en) Remote sensing data publishing method based on cloud storage system
CN103631976A (en) Small multichannel serial data recorder
Chen et al. Unified non-volatile memory and NAND flash memory architecture in smartphones
Liang et al. itrim: I/o-aware trim for improving user experience on mobile devices
WO2021047398A1 (en) Method and device for storage block reclaiming, storage medium, and electronic device
CN118760623B (en) Data management method for semiconductor storage
Shafaei et al. Write amplification reduction in {Flash-Based}{SSDs} through {Extent-Based} temperature identification
CN103631729A (en) Hierarchical storage method and system based on block levels
CN106383693A (en) An intelligent concentrator and a data processing method with measurement points as labels
CN116185284B (en) A tiered storage system based on data block activity
CN108596654A (en) Power information acquisition method, device, computer equipment and storage medium
US10180901B2 (en) Apparatus, system and method for managing space in a storage device
CN103729166A (en) Method, device and system for determining thread relation of program
CN108647278B (en) A file management method and system
CN109656479A (en) A kind of method and device constructing memory command sequence

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant