CN101930466A - Method and system for managing cross-platform memory file - Google Patents

Method and system for managing cross-platform memory file Download PDF

Info

Publication number
CN101930466A
CN101930466A CN 201010269338 CN201010269338A CN101930466A CN 101930466 A CN101930466 A CN 101930466A CN 201010269338 CN201010269338 CN 201010269338 CN 201010269338 A CN201010269338 A CN 201010269338A CN 101930466 A CN101930466 A CN 101930466A
Authority
CN
China
Prior art keywords
file
engine
macroblock
mode
platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 201010269338
Other languages
Chinese (zh)
Other versions
CN101930466B (en
Inventor
李健
张连毅
武卫东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing InfoQuick SinoVoice Speech Technology Corp.
Original Assignee
JIETONG HUASHENG SPEECH 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 JIETONG HUASHENG SPEECH TECHNOLOGY Co Ltd filed Critical JIETONG HUASHENG SPEECH TECHNOLOGY Co Ltd
Priority to CN2010102693389A priority Critical patent/CN101930466B/en
Publication of CN101930466A publication Critical patent/CN101930466A/en
Application granted granted Critical
Publication of CN101930466B publication Critical patent/CN101930466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method for managing a cross-platform memory file, which comprises the following steps that: whether a platform needs a file operation mode or a memory operation mode is judged; if the platform needs the file operation mode, an engine maps a file operation function to be empty, an application module introduces a file operation function entity for calling the engine through an application programming interface, and the file operation function entity writes according to the characteristics of different platforms; and if the platform needs the memory operation mode, the engine maps the file operation function to be a memory addressing mode, the engine reads data through the memory addressing mode, and the application module calls the engine. The management method can realize switching of different operation modes of the cross-platform memory file, and reduces development risk and development cost. The invention also provides a system for managing the cross-platform memory file for realizing the management method.

Description

The management method of cross-platform memory file and management system
Technical field
The present invention relates to embedded system, particularly relate to cross-platform memory file is imported/gone out in the embedded system management method and management system.
Background technology
Along with computer microprocessor and development of internet technology, the function of embedded platform is powerful gradually, and range of application also more and more widely.In embedded platform, owing to be subjected to the influence of embedded platform I/O operating efficiency or memory headroom size, Embedded Application is difference to some extent on the using method of data file, can select different modes of operation according to actual conditions usually.The file operation mode is carried out read operation by the I/O handling function of file to the data file, and this kind method has reduced engine to internal memory cost, but reading efficiency is lower.In the internal memory operation mode data file is loaded in the internal memory, engine conducts interviews to it by the memory address mode, and the reading efficiency of this kind method is higher, but higher to the space requirement of internal memory.Therefore, when the embedded platform memory headroom is little, but its external memory card read-write efficiency is very high, uses so and data file can be placed on the external memory card, operates on it with the I/O handling function; And when the I/O handling function work efficiency of embedded platform very low, but its memory headroom is very big, uses so and data file can be read earlier on the internal memory, operates on it with the mode of memory address.
The application programming interface of each embedded platform has conditions such as different titles, parameter, restriction, when product needed is transplanted between different platforms, just need to spend a large amount of being operated in and revise on the platform related function, be unfavorable for raising the efficiency and saving cost.In addition, the system vulnerability of introducing when revising also can increase the Products Development risk.
Summary of the invention
Technical matters to be solved by this invention provides a kind of management method and management system of cross-platform memory file, can realize the conversion of the different operating mode of cross-platform memory file, reduces development risk and cost of development.
In order to address the above problem, the invention discloses a kind of management method of cross-platform memory file, comprising:
Judge that it still is the internal memory operation mode that platform need adopt the file operation mode;
If it is empty needing file operation mode, engine maps file operation function, application module is introduced the file operation function entity by application programming interface engine is called, and the file operation function entity is write according to the characteristic of different platform;
If need the internal memory operation mode, engine maps file operation function is the memory address mode, and engine is by memory address mode reading of data, and application module calls engine.
Further, this method also is included in the file operation letter of the employing first macroblock mapped file mode of operation in the engine for empty.
Further, also to be included in and to adopt the file operation function of second macroblock mapping internal memory operation mode in the engine be the memory address mode to this method.
Further, this method comprises that also adopting first macro switch to control opens first macroblock.
Further, this method comprises that also adopting second macro switch to control opens second macroblock.
The invention also discloses a kind of management system of cross-platform memory file, comprising:
Engine, this engine comprises: first macroblock, the file operation function that is used for the mapped file mode of operation is for empty; Second macroblock, the file operation function that is used to shine upon the internal memory operation mode is the memory address mode;
Application module calls engine.
Further, this engine also comprises first macro switch, is used for control and opens first macroblock.
Further, this engine also comprises second macro switch, is used for control and opens second macroblock.
Further, this first macroblock and second macroblock all shine upon at least four file operation functions.
Further, this first macroblock and second macroblock all shine upon four file operation functions, and these four file operation functions are respectively jt_Fopen, jt_Fread, jt_Fseek, jt_Fclose.
Compared with prior art, the present invention has the following advantages:
In the management method of cross-platform memory file of the present invention and the management system when adopting the file operation mode, engine internal does not have the specific implementation of file operation mode, not needing to carry out entity when compiling connects, when therefore adopting first macroblock to come the representation file handling function, can compile and pass through.And at application module, the developer introduces the file operation function entity by application programming interface, just can realize using, and does not have extra transplanting work, and workload is less.Engine internal is provided with the random exchange that first macroblock and second macroblock can be realized mode of operation, when between different platform, transplanting, do not need extra development﹠ testing work, only need adjustment unlatching first macroblock or second macroblock to compile and get final product, therefore reduced the risk and the cost of exploitation.
Description of drawings
Fig. 1 is the structural representation of management system of the cross-platform memory file of the embodiment of the invention.
Fig. 2 is the schematic flow sheet of management method of the cross-platform memory file of the embodiment of the invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
Please refer to Fig. 1, a kind of management system of cross-platform memory file is shown, comprise engine 10 and application module 30.Engine 10 comprises that first macroblock 11 and second macroblock, 13, the first macroblocks 11 are used for the file operation function of mapped file mode of operation, and second macroblock 13 is used to shine upon the internal memory operation mode.Engine 10 also comprises first macro switch of control unlatching first macroblock 11 and second macro switch that second macroblock 13 is opened in control.First macro switch is SMALL_FILE, and second macro switch is FIX_CONST.
Please refer to Fig. 2, a kind of management method of cross-platform memory file be shown, comprising:
S101, judge that it still is the internal memory operation mode that platform need adopt the file operation mode:
S103, if need the file operation mode, engine 10 mapped file handling functions are empty, and application module 30 is introduced the file operation function entity by application programming interface engine 10 is called, and the file operation function entity is write according to the characteristic of different platform;
If need the internal memory operation mode, engine 10 mapped file handling functions are the memory address mode, and engine 10 is by memory address mode reading of data, and application module 30 calls engine 10.
Be that example comes the management method of this cross-platform memory file is elaborated with platform A and platform B below:
The memory headroom of supposing platform A is less, but external memory card read-write efficiency is higher; The memory headroom of platform B is bigger, and external memory card read-write efficiency is lower.
When needs moved into platform A with data, the deviser can judge that according to the characteristic of platform A this moment should the select File mode of operation.It is empty opening four file operation functions of first macroblock 11, the first macroblocks, 11 mappings by first macro switch in the engine 10.When application module 30 need call engine 10, the deviser introduces the entity of four file operation functions by the application programming interface of application module 30, the introducing of file operation function entity can be passed through jt_Fopen, jt_Fread, jt_Fseek and jt_Fclose realize, four related functions, i.e. fopen that concrete implementation method then can normative reference C, fread, fseek and fclose.After introducing four file operation function entity, application module 30 just can be directly to calling engine 10, and write needed other codes of platform A, and need not other adaptation procedure according to the needs of self-characteristic, also need not original system is made amendment.
When needs moved into platform B with data, the deviser judged that according to the characteristic of platform B should select the internal memory operation mode this moment.Open second macroblock 13 by second macro switch in the engine 10, four file operation functions of second macroblock, 13 mappings are the memory address mode, and read related data by four file operation functions, this moment, application module 30 can directly call engine 10, by engine 10 related data is read in the internal memory, and write needed other codes of platform B according to the needs of self-characteristic, and need not other adaptation procedure, also need not original system is made amendment.
Same reason, in the time data migration need being arrived other platform, can adopt said method equally, need not the code in the engine 10 is made amendment, only need in application module 30, introduce corresponding entity as required or directly adopt the mode of memory address just can read related data, the adaptive work that has needed when having reduced cross-platform the transplanting, and reduced the risk of bringing because of the modification system.
In the management method and management system of cross-platform memory file of the present invention, control file opening mode of operation and internal memory operation mode respectively, can realize the transplanting of different platform datas by first macroblock 11 and second macroblock 13 that are provided with in the engine 10.Engine 10 does not need to carry out the entity link when compiling, therefore adopt first macroblock 11 to come the file operation function of representation file mode of operation or adopt second macroblock 13 to represent the file operation function of internal memory operation mode, when compiling, can pass through.Therefore, just can realize using as long as introduce function entity at application module 13.This kind method can realize the random conversion of mode of operation, when transplanting between different platform, does not need extra development﹠ testing work, only needs adjustment first macroblock and second macroblock to compile and gets final product, and has therefore reduced the risk and the cost of exploitation.In addition, replace mode of operation, when concrete platform application, just introduce function entity by macroblock, can write according to the characteristic of platform, need not the code in the engine is made amendment, avoid the system risk brought because of the modification system, and reduced the workload when transplanting.
More than to the management method and the management system of a kind of cross-platform memory file provided by the present invention, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (10)

1. the management method of a cross-platform memory file is characterized in that, this method comprises:
Judge that it still is the internal memory operation mode that platform need adopt the file operation mode:
If it is empty needing file operation mode, engine maps file operation function, application module is introduced the file operation function entity by application programming interface engine is called, and the file operation function entity is write according to the characteristic of different platform;
If need the internal memory operation mode, engine maps file operation function is the memory address mode, and engine is by memory address mode reading of data, and application module calls engine.
2. management method as claimed in claim 1 is characterized in that, described method also comprises: in engine, the file operation letter that adopts the first macroblock mapped file mode of operation is for empty.
3. management method as claimed in claim 2 is characterized in that, described method also comprises: in engine, adopting the file operation function of second macroblock mapping internal memory operation mode is the memory address mode.
4. management method as claimed in claim 2 is characterized in that, described method comprises that also adopting first macro switch to control opens first macroblock.
5. management method as claimed in claim 4 is characterized in that, described method comprises that also adopting second macro switch to control opens second macroblock.
6. the management system of a cross-platform memory file is characterized in that, comprising:
Engine, this engine comprises:
First macroblock, the file operation function that is used for the mapped file mode of operation is for empty;
Second macroblock, the file operation function that is used to shine upon the internal memory operation mode is the memory address mode;
Application module calls engine.
7. management system as claimed in claim 6 is characterized in that described engine also comprises first macro switch, is used for control and opens first macroblock.
8. management system as claimed in claim 7 is characterized in that described engine also comprises second macro switch, is used for control and opens second macroblock.
9. management system as claimed in claim 6 is characterized in that, described first macroblock and second macroblock all shine upon at least four file operation functions.
10. management system as claimed in claim 9 is characterized in that, described first macroblock and second macroblock all shine upon four file operation functions, and these four file operation functions are respectively jt_Fopen, jt_Fread, jt_Fseek, jt_Fclose.
CN2010102693389A 2010-08-31 2010-08-31 Method and system for managing cross-platform memory file Active CN101930466B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102693389A CN101930466B (en) 2010-08-31 2010-08-31 Method and system for managing cross-platform memory file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102693389A CN101930466B (en) 2010-08-31 2010-08-31 Method and system for managing cross-platform memory file

Publications (2)

Publication Number Publication Date
CN101930466A true CN101930466A (en) 2010-12-29
CN101930466B CN101930466B (en) 2012-08-15

Family

ID=43369642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102693389A Active CN101930466B (en) 2010-08-31 2010-08-31 Method and system for managing cross-platform memory file

Country Status (1)

Country Link
CN (1) CN101930466B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648822A (en) * 2016-12-30 2017-05-10 深圳市九洲电器有限公司 User interface character string screening method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1517906A (en) * 2003-01-14 2004-08-04 联想(北京)有限公司 Document system and document management method
CN101354675A (en) * 2008-08-19 2009-01-28 华南理工大学 Method for detecting embedded software dynamic memory
CN101710373A (en) * 2009-12-04 2010-05-19 深圳创维数字技术股份有限公司 File operation method of embedded system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1517906A (en) * 2003-01-14 2004-08-04 联想(北京)有限公司 Document system and document management method
CN101354675A (en) * 2008-08-19 2009-01-28 华南理工大学 Method for detecting embedded software dynamic memory
CN101710373A (en) * 2009-12-04 2010-05-19 深圳创维数字技术股份有限公司 File operation method of embedded system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648822A (en) * 2016-12-30 2017-05-10 深圳市九洲电器有限公司 User interface character string screening method and system
CN106648822B (en) * 2016-12-30 2019-09-06 深圳市九洲电器有限公司 Interface character string selection method and system

Also Published As

Publication number Publication date
CN101930466B (en) 2012-08-15

Similar Documents

Publication Publication Date Title
CN101421711B (en) Virtual execution system for resource-constrained devices
CN109299587A (en) Algorithm protection method, device, equipment and storage medium based on go language
CN103186460A (en) Method, device and system for generating script of test case
CN105975816A (en) Method and system for code protection based on virtual technology under mobile terminal
US20080126161A1 (en) Integration of workflow and rules
CN107273176A (en) The Compilation Method and device of a kind of adaptive hardware framework
CN100414517C (en) Method and appts. aiming at isomeric system structure for covering management in integrated executable program
KR20070057666A (en) System and method for providing monolithic image for use in a wireless device
US20110252409A1 (en) Methods and systems to implement non-abi conforming features across unseen interfaces
CN105183484A (en) Method and device for compatibility of multi-version application programming interface
CN102722387A (en) Dynamic patching method and device
CN107911741A (en) Free memory method for improving, smart television and computer-readable recording medium
US8561042B2 (en) System and method for reducing execution time of bytecode in java virtual machine
CN104424030A (en) Sharing memory multi-process operation method and device
CN104731622A (en) Application program loading method and device and mobile terminal
US20100050267A1 (en) Method and system for the automated transformation of access control management information in computer systems
CN101464841A (en) Method and system for implementing write protection of block memory stack
CN104657164A (en) Method and device for updating and processing software
CN104317578A (en) Engine Lua script application and engine and Lua script mutual calling-based method and device
CN101552840A (en) A method to reduce the power consumption of mobile terminals and the mobile terminals
CN109446754A (en) The guard method of algorithm, device, equipment and storage medium in intelligent contract
CN113791870B (en) WebAssemble virtual machine distributed system fine granularity migration method and system
CN101930466B (en) Method and system for managing cross-platform memory file
CN101827158A (en) Method and system for uniformly processing picture resources in cellphone
CN103077066B (en) A kind of method and system of embedded product key message when compiling

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 100193, No. two, building 10, Zhongguancun Software Park, 8 northeast Wang Xi Road, Beijing, Haidian District, 206-1

Patentee after: Beijing InfoQuick SinoVoice Speech Technology Corp.

Address before: 100193, No. two, building 10, Zhongguancun Software Park, 8 northeast Wang Xi Road, Beijing, Haidian District, 206-1

Patentee before: Jietong Huasheng Speech Technology Co., Ltd.

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: Building 2102, building 1, Haidian District, Beijing

Patentee after: BEIJING SINOVOICE TECHNOLOGY Co.,Ltd.

Address before: 100193 two, 206-1, Zhongguancun Software Park, 8 Northeast Northeast Road, Haidian District, Beijing, 206-1

Patentee before: BEIJING SINOVOICE TECHNOLOGY Co.,Ltd.