CN106951521A - The reading/writing method of journal file, apparatus and system - Google Patents

The reading/writing method of journal file, apparatus and system Download PDF

Info

Publication number
CN106951521A
CN106951521A CN201710165293.2A CN201710165293A CN106951521A CN 106951521 A CN106951521 A CN 106951521A CN 201710165293 A CN201710165293 A CN 201710165293A CN 106951521 A CN106951521 A CN 106951521A
Authority
CN
China
Prior art keywords
journal file
memory space
storage information
preserved
storage
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
CN201710165293.2A
Other languages
Chinese (zh)
Other versions
CN106951521B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710165293.2A priority Critical patent/CN106951521B/en
Publication of CN106951521A publication Critical patent/CN106951521A/en
Application granted granted Critical
Publication of CN106951521B publication Critical patent/CN106951521B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/113Details of archiving

Abstract

The invention discloses a kind of journal file reading/writing method, apparatus and system.Wiring method includes:If having detected journal file generation, the journal file of generation is preserved to the first preset memory space, the storage information that the journal file is preserved in first memory space is obtained, the storage information is preserved to the second preset memory space.Read method includes:After being connected with the mobile terminal in off-mode, storage information of the journal file when the first memory space is preserved is obtained from the second preset memory space, journal file is read using the storage information.By the second memory space for being provided for preserving storage information when journal file is stored in the terminal, so that when mobile terminal is in off-mode, the storage information preserved in the second memory space can be utilized to read journal file, without the whole User Data subregions of retaking of a year or grade, effectively shorten the time required for journal file is read, improve reading efficiency.

Description

The reading/writing method of journal file, apparatus and system
Technical field
The present invention relates to communication technical field, more particularly to a kind of reading/writing method of journal file, apparatus and system.
Background technology
Journal file is the log file or file set of application system Action Events, includes the operation of whole application system Daily record, fault log etc., are made up of a plurality of log recording, the record of journal file and are read the maintenance for application system and are asked The detection of topic is most important.
At present, it is required in the state of mobile phone is in start, is read from mobile phone when mobile phone is detected or repaired Journal file is taken, to carry out fault detect and maintenance to mobile phone.However, in face of the failure mobile phone that cannot be started up, to obtain The journal file preserved in mobile phone, best scheme is the whole User Data subregions of retaking of a year or grade mobile phone, but entering with technology Step, the capacity of mobile phone is increasing, for example, 64G, 128G, the overlong time required for the whole User Data subregions of retaking of a year or grade, are needed Longer time is waited, the less efficient of journal file is read.
The content of the invention
It is a primary object of the present invention to provide a kind of reading/writing method of journal file, apparatus and system, it is intended to solve existing Have in technology mobile phone break down cannot be started up when, it is necessary to be read by way of the whole User Data subregions of retaking of a year or grade mobile phone Journal file is taken, brings the required time long, the low technical problem of reading efficiency.
To achieve the above object, first aspect present invention provides a kind of wiring method of journal file, and this method includes:
If having detected journal file generation, the journal file of generation is preserved to the first preset memory space;
Obtain the storage information that the journal file is preserved in first memory space;
The storage information is preserved to the second preset memory space, to be in off-mode in the mobile terminal When, the storage information preserved using second memory space reads the journal file from first memory space.
To achieve the above object, second aspect present invention provides a kind of read method of journal file, and this method includes:
After being connected with the mobile terminal in off-mode, obtain journal file from the second preset memory space and exist Storage information when the first preset memory space is preserved;
The journal file is read using the storage information.
To achieve the above object, third aspect present invention provides a kind of mobile terminal, and the mobile terminal includes:
First preserving module, if for having detected journal file generation, the journal file of generation is preserved to preset The first memory space;
Acquisition module, the storage information of the journal file is preserved for obtaining in first memory space;
Second preserving module, for the storage information to be preserved to the second preset memory space, to be moved described When dynamic terminal is in off-mode, the storage information preserved using second memory space is from first memory space Read the journal file.
To achieve the above object, fourth aspect present invention provides a kind of reading device of journal file, and the device includes:
Acquisition module, for after being connected with the mobile terminal in off-mode, from the second preset memory space Obtain storage information of the journal file when the first preset memory space is preserved;
Read module, for reading the journal file using the storage information.
To achieve the above object, fifth aspect present invention provides a kind of read-write system of journal file, and the system includes the The reading device of the mobile terminal of three aspects and the journal file of aspect.
The present invention provides a kind of reading/writing method of journal file, wherein, wiring method includes:If having detected journal file Generation, then preserve the journal file of generation to the first preset memory space, obtains to preserve in first memory space and is somebody's turn to do The storage information of journal file, the storage information is preserved to the second preset memory space, is closed to be in mobile terminal During machine state, the storage information that can be preserved using the second memory space reads journal file from the first memory space.In addition, reading Taking method includes:After being connected with the mobile terminal in off-mode, daily record text is obtained from the second preset memory space Storage information of the part when the first memory space is preserved, journal file is read using the storage information.Relative to prior art, lead to Cross the second memory space of storage information when being provided for preserving journal file storage in the terminal so that mobile whole When end is in off-mode, the storage information preserved in the second memory space can be utilized to read journal file, without returning Whole User Data subregions are read, effectively shortens the time required for journal file is read, improves reading efficiency.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those skilled in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is a kind of structured flowchart of mobile terminal;
Fig. 2 is the schematic flow sheet of the wiring method of journal file in first embodiment of the invention;
Fig. 3 is the schematic flow sheet of the wiring method of journal file in second embodiment of the invention;
Fig. 4 is the schematic flow sheet of the read method of journal file in third embodiment of the invention;
Fig. 5 is the schematic diagram of the functional module of mobile terminal in fourth embodiment of the invention;
Fig. 6 is the schematic diagram of the functional module of mobile terminal in fifth embodiment of the invention;
Fig. 7 is the schematic diagram of the functional module of the reading device of journal file in sixth embodiment of the invention;
Fig. 8 is the structural representation of the read-write system of journal file in seventh embodiment of the invention.
Embodiment
To enable goal of the invention of the invention, feature, advantage more obvious and understandable, below in conjunction with the present invention Accompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described reality It is only a part of embodiment of the invention to apply example, and not all embodiments.Based on the embodiment in the present invention, people in the art The every other embodiment that member is obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 shows a kind of structured flowchart of mobile terminal.The wiring method of journal file provided in an embodiment of the present invention It can be applied in mobile terminal 10 as shown in Figure 1, mobile terminal 10 can be, but not limited to include:It need to remain normal by battery Operation and support network and the smart mobile phone of download function, notebook, panel computer, wearing smart machine etc..In addition, mobile whole End 10 can also complete the reading to journal file together with the reading device of journal file.
As shown in figure 1, mobile terminal 10 includes memory 101, storage control 102, it is one or more (only to be shown in figure One) processor 103, Peripheral Interface 104, radio-frequency module 105, key-press module 106, audio-frequency module 107 and Touch Screen 108.These components are mutually communicated by one or more communication bus/signal wire 109.Wherein, the memory 101 is included EMMC(Embedded Multi Media Card)。
It is appreciated that the structure shown in Fig. 1 is only signal, it does not cause to limit to the structure of mobile terminal.It is mobile whole End 10 may also include than shown in Fig. 1 more either less components or with the configuration different from shown in Fig. 1.Shown in Fig. 1 Each component can be realized using hardware, software or its combination.
The write-in for the journal file that memory 101 can be used in storage software program and module, such as embodiment of the present invention Corresponding programmed instruction/the module of method, processor 103 is stored in software program and module in memory 101 by operation, So as to perform various function application and data processing, that is, realize the wiring method of above-mentioned journal file.
Memory 101 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetic Property storage device, flash memory or other non-volatile solid state memories.In some instances, memory 101 can further comprise The memory remotely located relative to processor 103, these remote memories can pass through network connection to mobile terminal 10.On The example for stating network includes but is not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.Processor 103 And access of other possible components to memory 101 can be carried out under the control of storage control 102.
Various input/output devices are coupled to CPU and memory 101 by Peripheral Interface 104.The operation of processor 103 is deposited Various softwares in reservoir 101, instruction are to perform the various functions of mobile terminal 10 and carry out data processing.
In certain embodiments, Peripheral Interface 104, processor 103 and storage control 102 can be in one single chips Realize.In some other example, they can be realized by independent chip respectively.
Radio-frequency module 105 is used to receiving and sending electromagnetic wave, realizes the mutual conversion of electromagnetic wave and electric signal, so that with Communication network or other equipment are communicated.Radio-frequency module 105 may include the various existing electricity for being used to perform these functions Circuit component, for example, antenna, RF transceiver, digital signal processor, encryption/deciphering chip, subscriber identity module (SIM) card, Memory etc..Radio-frequency module 105 can with various networks for example internet, intranet, preset type wireless network carry out Communication or the wireless network by preset type are communicated with other equipment.The wireless network of above-mentioned preset type can be wrapped Include cellular telephone networks, WLAN or Metropolitan Area Network (MAN).The wireless network of above-mentioned preset type can use various communications Standard, agreement and technology, including but not limited to global system for mobile communications (Global System for Mobile Communication, GSM), enhanced mobile communication technology (Enhanced Data GSM Environment, EDGE) is wide Band CDMA (Wideband Code Division Multiple Access, W-CDMA), CDMA (Code Division Access, CDMA), TDMA (Time Division Multiple Access, TDMA), Bluetooth, adopting wireless fidelity technology (Wireless-Fidelity, WiFi) (such as American Institute of Electrical and Electronics Engineers's standard IEEE 802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11n), the networking telephone (Voice over Internet Protocal, VoIP), worldwide interoperability for microwave accesses (Worldwide Interoperability for Microwave Access, Wi-Max), other are used for the agreement of mail, instant messaging and short message, and any other is suitable Communications protocol.
Key-press module 106 provides the interface that is inputted to mobile terminal of user, user can by press it is different by Key is so that mobile terminal 10 performs different functions.
Audio-frequency module 107 provides a user COBBAIF, and it may include one or more microphones, one or more raises Sound device and voicefrequency circuit.Voicefrequency circuit receives voice data at Peripheral Interface 104, and voice data is converted into power information, Power information is transmitted to loudspeaker.Power information is converted to the sound wave that human ear can be heard by loudspeaker.Voicefrequency circuit is also from microphone Place receives power information, converts electrical signals to voice data, and by data transmission in network telephony into Peripheral Interface 104 to enter traveling one The processing of step.Voice data can be obtained at memory 101 or by radio-frequency module 105.In addition, voice data can also Store into memory 101 or be transmitted by radio-frequency module 105.In some instances, audio-frequency module 107 may also include One earphone broadcasts hole, for providing COBBAIF to earphone or other equipment.
Touch Screen 108 provides an output and inputting interface simultaneously between mobile terminal and user.Specifically, touch-control Screen 108 shows video frequency output to user, and the content of these video frequency outputs may include word, figure, video and its any group Close.Some output results correspond to some user interface objects.Touch Screen 108 also receives the input of user, such as user The gesture operation such as click, slip, so that user interface object is responded to the input of these users.Detect user input Technology can be based on resistance-type, condenser type or other any possible touch control detection technologies.The display unit of Touch Screen 108 Instantiation include but is not limited to liquid crystal display or light emitting polymer displays.
The wiring method of journal file in the embodiment of the present invention is described based on above-mentioned mobile terminal, and further describes this hair Journal file read method in bright embodiment.
Due in the prior art when mobile phone failure cannot be started up, it is necessary to the whole User for passing through retaking of a year or grade mobile phone The mode of Data subregions reads journal file, brings the required time long, the low technical problem of reading efficiency.
In order to solve the above problems, the present invention proposes a kind of reading/writing method of journal file, apparatus and system, by moving It is provided for preserving the second memory space of storage information when journal file is stored in dynamic terminal so that be in mobile terminal During off-mode, the storage information preserved in the second memory space can be utilized to read journal file, it is whole without retaking of a year or grade User Data subregions, effectively shorten the time required for journal file is read, improve reading efficiency.
In embodiments of the present invention, the wiring method of journal file is realized by mobile terminal, the reading of journal file Method be by journal file reading device (hereinafter referred to as:Reading device) realize, the reading device typically refers to use In the equipment for being detected and being repaired to mobile terminal, you can in the case of it cannot be started up in mobile terminal, pass through the present invention Technical scheme in embodiment reads journal file from mobile terminal, to analyze journal file, it is determined that mobile whole The failure cause at end, and further failure is handled.
Referring to Fig. 2, being the schematic flow sheet of the wiring method of journal file in first embodiment of the invention, the write-in side Method includes:
If step 201, having detected journal file generation, the journal file of generation is preserved to the first preset storage Space;
Step 202, acquisition preserve the storage information of the journal file in first memory space;
Step 203, the storage information preserved to the second preset memory space, to be in the mobile terminal During off-mode, the storage information preserved using second memory space reads the day from first memory space Will file.
In embodiments of the present invention, two kinds are comprised at least in mobile terminal is used for the memory space of data storage, for example:With In preserve journal file the first memory space, and for preserve journal file the first memory space storage information second Memory space, wherein, first memory space and the second memory space are all pre-set, and second memory space is big It is small to be arranged as required to.In addition, second memory space can mark off the portion come in a memory in the mobile terminal Divide memory space, storage information of the part memory space dedicated for storage journal file when the first memory space is preserved; Or, the size of memory space can also be increased by way of being improved to the memory space of mobile terminal, and will increase Memory space as the first above-mentioned memory space, for example, can be by way of optimizing EMMC chip-scale circuits, in EMMC Increase new storage chip in chip-scale circuit, and the new storage chip is used as the second memory space.In the present invention In embodiment, by being provided for preserving second memory space of the journal file in the storage information of the first memory space so that The storage information preserved in the second memory space can be utilized to read journal file, without being found by way of retaking of a year or grade Desired journal file, then be read out, enabling the effective reading for accelerating journal file, improves reading efficiency.
In embodiments of the present invention, when mobile terminal is in running status, system will generate journal file, if having detected Journal file is generated, and mobile terminal preserves the journal file of generation to the first preset memory space.Wherein, the journal file Can be a journal file, or multiple journal files.And the journal file can be all daily records text once produced Part, if for example, deadlock phenomenon occurs in the process of running, suddenly in the operating system of mobile terminal, now, the operating system will Generate journal file, mobile terminal when having detected journal file generation, will generate journal file write instruction, and according to The instruction, the journal file of generation is preserved to the first preset memory space, and this sub-operating system breaks down what is brought Crash, if multiple journal files will be generated, the plurality of journal file will write the first memory space successively in sequence.
In embodiments of the present invention, mobile terminal will be obtained this time first after the preservation to journal file is completed Memory space preserves the storage information of journal file.
Wherein, the storage information includes initial address and preservation that this preserves journal file in the first memory space Journal file size of data between mapping relations.If for example, this time only saving a journal file A, storage is believed The mapping relations between the initial address B for being journal file A in the first memory space and journal file A size C are ceased, If this time saving journal file A-E, and stored successively according to A-E order, then storage information is rising for journal file A Beginning address and journal file A-E size of data between mapping relations.
Wherein, the second memory space can be used for storing at least one storage information.
In embodiments of the present invention, getting after the storage information that the first memory space preserves journal file, moving Dynamic terminal preserves the storage information to the second preset memory space, so as to when mobile terminal is in off-mode, can Using the storage information preserved in second memory space journal file is read from first memory space.
In embodiments of the present invention, if having detected journal file generation, the journal file of generation is preserved to preset The first memory space, obtain and the storage information of the journal file preserved in first memory space, the storage information is protected Deposit to the second preset memory space, when mobile terminal is in off-mode, to be preserved using the second memory space Storage information from the first memory space read journal file.By being provided for preserving journal file storage in the terminal When storage information the second memory space so that mobile terminal be in off-mode when, the second memory space can be utilized The storage information of middle preservation reads journal file, without the whole User Data subregions of retaking of a year or grade, effectively shortens journal file and reads The required time is taken, reading efficiency is improved.
Fig. 3 please be participate in, is the schematic flow sheet of the wiring method of journal file in second embodiment of the invention, the write-in side Method includes:
If step 301, having detected journal file generation, the journal file of generation is preserved to the first preset storage Space;
Step 302, acquisition preserve the storage information of the journal file in first memory space;
Step 303, determine whether the remaining storage size of second memory space meets the storage of the storage information Demand;Perform step 304 or step 305;
Step 304, if it is not satisfied, then being deleted according to holding time order from front to back in second memory space The storage information of preservation, until the remaining storage size meets the storage demand of the storage information, and the storage is believed Breath is preserved to second memory space;
If step 305, satisfaction, the storage information is preserved to second memory space.
In embodiments of the present invention, above-mentioned steps 301 and step 302 respectively with step 201 in first embodiment and step The content of 202 descriptions is identical, does not repeat herein.
In embodiments of the present invention, mobile terminal, will after the storage information of the journal file this time preserved is got Determine whether the remaining storage size of the second memory space meets the storage demand of the storage information, wherein, if the residue is stored Size is more than or equal to the size of data of the storage information, then shows to meet storage demand, is somebody's turn to do if the remaining storage size is less than The size of data of storage information, then show to be unsatisfactory for storage demand.
Wherein, if meeting, storage information is preserved to the second memory space.
Wherein, if it is not satisfied, the storage information that has preserved of part that will then delete in the second memory space, specifically, pressing The storage information preserved in the second memory space is deleted according to the order of holding time from front to back, until the second memory space Remaining storage size meets the storage demand of the storage information, and the storage information is preserved to second memory space.Wherein, By way of the storage information preserved is deleted according to the order of holding time from front to back and is a kind of circulation storage, i.e., second The storage information preserved in memory space is nearest storage information.
In embodiments of the present invention, after the storage information of journal file is obtained, the surplus of the second memory space will be determined Whether remaining storage size meet the storage demand of the storage information, if it is not satisfied, then by according to the holding time from front to back Order deletes the storage information that has preserved in the second memory space, and until remaining storage size meets the mode of storage demand, Make it possible to the storage information obtained by enough residual memory space storages so that the second memory space can be deposited by circulation The mode of storage preserves nearest storage information.
It is understood that being the journal file described from mobile terminal side in above-mentioned first embodiment and second embodiment Wiring method, journal file write-in after, if desired read from mobile terminal at the journal file, and the mobile terminal When off-mode, then need to realize the reading of journal file using the journal file read method in the embodiment of the present invention, have Body, referring to Fig. 4, for the schematic flow sheet of the read method of journal file in third embodiment of the invention, this method includes:
Step 401, after being connected with the mobile terminal in off-mode, obtain day from preset the second memory space Storage information of the will file when the first preset memory space is preserved;
Step 402, the storage information is utilized to read the journal file.
In embodiments of the present invention, if desired read in off-mode mobile terminal in journal file when, it is necessary to Reading device in the embodiment of the present invention is connected with the mobile terminal, and after connection, the reading device is by from preset Second memory space obtains storage information of the journal file when the first preset memory space is preserved, and utilizes the storage information Read the journal file.
Wherein, initial address and journal file of the journal file when the first memory space is preserved are included in storage information Mapping relations between size of data, then above-mentioned steps 402 specifically for:Read since the initial address of the first memory space Data, until the data read are equal to the size of data in the mapping relations, then show to have read out complete daily record text Part, completes the reading of journal file.
In embodiments of the present invention, by setting the second memory space in mobile terminal, and it is empty using second storage Between storage when preserving journal file, the storage information of the journal file, enabling utilize the storage in second memory space Information reads journal file, can be effective without reading journal file by way of the whole User Data subregions of retaking of a year or grade Shorten the time that journal file is consumed of reading, improve reading efficiency.
Referring to Fig. 5, be the schematic diagram of the functional module of mobile terminal in fourth embodiment of the invention, the mobile terminal bag Include:
First preserving module 501, if for having detected journal file generation, the journal file of generation is preserved to pre- The first memory space put;
Acquisition module 502, the storage information of the journal file is preserved for obtaining in first memory space;
Second preserving module 503, for the storage information to be preserved to the second preset memory space, so as to described When mobile terminal is in off-mode, the storage information preserved using second memory space is empty from the described first storage Between read the journal file.
In embodiments of the present invention, two kinds are comprised at least in mobile terminal is used for the memory space of data storage, for example:With In preserve journal file the first memory space, and for preserve journal file the first memory space storage information second Memory space, wherein, first memory space and the second memory space are all pre-set, and second memory space is big It is small to be arranged as required to.In addition, second memory space can mark off the portion come in a memory in the mobile terminal Divide memory space, storage information of the part memory space dedicated for storage journal file when the first memory space is preserved; Or, the size of memory space can also be increased by way of being improved to the memory space of mobile terminal, and will increase Memory space as the first above-mentioned memory space, for example, can be by way of optimizing EMMC chip-scale circuits, in EMMC Increase new storage chip in chip-scale circuit, and the new storage chip is used as the second memory space.In the present invention In embodiment, by being provided for preserving second memory space of the journal file in the storage information of the first memory space so that The storage information preserved in the second memory space can be utilized to read journal file, without being found by way of retaking of a year or grade Desired journal file, then be read out, enabling the effective reading for accelerating journal file, improves reading efficiency.
In embodiments of the present invention, when mobile terminal is in running status, system will generate journal file, if having detected Journal file is generated, and the first preserving module 501 preserves the journal file of generation to the first preset memory space.Wherein, should Journal file can be a journal file, or multiple journal files.And the journal file can be the institute once produced There is journal file, if for example, deadlock phenomenon occurs in the process of running, suddenly in the operating system of mobile terminal, now, the behaviour Journal file will be generated by making system, and mobile terminal refers to the write-in for generating journal file when having detected journal file generation Order, and according to the instruction, the journal file of generation is preserved to the first preset memory space, and event occurs for this sub-operating system Hinder the deadlock brought, if multiple journal files will be generated, the plurality of journal file will write the first storage successively in sequence Space.
In embodiments of the present invention, mobile terminal is after the preservation to journal file is completed, and acquisition module 502 will be obtained The storage information of journal file is this time preserved in the first memory space.
Wherein, the storage information includes initial address and preservation that this preserves journal file in the first memory space Journal file size of data between mapping relations.If for example, this time only saving a journal file A, storage is believed The mapping relations between the initial address B for being journal file A in the first memory space and journal file A size C are ceased, If this time saving journal file A-E, and stored successively according to A-E order, then storage information is rising for journal file A Beginning address and journal file A-E size of data between mapping relations.
Wherein, the second memory space can be used for storing at least one storage information.
In embodiments of the present invention, getting after the storage information that the first memory space preserves journal file, the Two preserving modules 503 preserve the storage information to the second preset memory space, to be in off-mode in mobile terminal When, the storage information preserved in second memory space can be utilized to read journal file from first memory space.
In embodiments of the present invention, if having detected journal file generation, the journal file of generation is preserved to preset The first memory space, obtain and the storage information of the journal file preserved in first memory space, the storage information is protected Deposit to the second preset memory space, when mobile terminal is in off-mode, to be preserved using the second memory space Storage information from the first memory space read journal file.By being provided for preserving journal file storage in the terminal When storage information the second memory space so that mobile terminal be in off-mode when, the second memory space can be utilized The storage information of middle preservation reads journal file, without the whole User Data subregions of retaking of a year or grade, effectively shortens journal file and reads The required time is taken, reading efficiency is improved.
Referring to Fig. 6, be the schematic diagram of the functional module of mobile terminal in fifth embodiment of the invention, including such as Fig. 5 institutes Show the first preserving module 501 in fourth embodiment, the preserving module 503 of acquisition module 502 and second, and with fourth embodiment The content of description is consistent, does not repeat herein.
In embodiments of the present invention, the second preserving module 503 includes:
Determining module 601, for determining whether the remaining storage size of second memory space meets the storage letter The storage demand of breath;
Preserving module 602 is deleted, for if it is not satisfied, then deleting described second according to the order of holding time from front to back The storage information preserved in memory space, until the remaining storage size meets the storage demand of the storage information, and The storage information is preserved to second memory space;
3rd preserving module 603, if for meeting, the storage information is preserved to second memory space.
In embodiments of the present invention, after the storage information of the journal file this time preserved is got, determining module 601 Whether the remaining storage size for determining the second memory space is met into the storage demand of the storage information, wherein, if the residue is deposited The size of data that size is more than or equal to the storage information is stored up, then shows to meet storage demand, if the remaining storage size is less than The size of data of the storage information, then show to be unsatisfactory for storage demand.
Wherein, if meeting, the 3rd preserving module 603 preserves storage information to the second memory space.
Wherein, if it is not satisfied, then deleting the storage that preserving module 602 has preserved the part deleted in the second memory space Information, has been preserved specifically, deleting preserving module 602 and being deleted according to the order of holding time from front to back in the second memory space Storage information, until the remaining storage size of the second memory space meets the storage demand of the storage information, and this is stored Information is preserved to second memory space.Wherein, by deleting the storage preserved according to the order of holding time from front to back Information is a kind of mode for circulating storage, i.e. the storage information preserved in the second memory space is nearest storage information.
In embodiments of the present invention, after the storage information of journal file is obtained, the surplus of the second memory space will be determined Whether remaining storage size meet the storage demand of the storage information, if it is not satisfied, then by according to the holding time from front to back Order deletes the storage information that has preserved in the second memory space, and until remaining storage size meets the mode of storage demand, Make it possible to the storage information obtained by enough residual memory space storages so that the second memory space can be deposited by circulation The mode of storage preserves nearest storage information.
Referring to Fig. 7, be the schematic diagram of the functional module of the reading device of journal file in sixth embodiment of the invention, should Reading device includes:
Acquisition module 701, for after being connected with the mobile terminal in off-mode, from the second preset storage sky Between obtain storage information of the journal file when preset the first memory space is preserved;
Read module 702, for reading the journal file using the storage information.
Further, the storage information includes the starting point journal file when first memory space is preserved Mapping relations between the size of data of location and the journal file;
The read module 702 specifically for:
Data are read since the initial address of first memory space, until the data read are equal to described Size of data, to complete the reading of the journal file.
In embodiments of the present invention, if desired read in off-mode mobile terminal in journal file when, it is necessary to Reading device in the embodiment of the present invention is connected with the mobile terminal, and after connection, the acquisition mould in the reading device Block 701 will obtain storage information of the journal file when the first preset memory space is preserved from the second preset memory space, And read the journal file using the storage information by read module 702.
Wherein, initial address and journal file of the journal file when the first memory space is preserved are included in storage information Mapping relations between size of data, then above-mentioned steps 402 specifically for:Read since the initial address of the first memory space Data, until the data read are equal to the size of data in the mapping relations, then show to have read out complete daily record text Part, completes the reading of journal file.
In embodiments of the present invention, by setting the second memory space in mobile terminal, and it is empty using second storage Between storage when preserving journal file, the storage information of the journal file, enabling utilize the storage in second memory space Information reads journal file, can be effective without reading journal file by way of the whole User Data subregions of retaking of a year or grade Shorten the time that journal file is consumed of reading, improve reading efficiency.
Referring to Fig. 8, be the structural representation of the read-write system of journal file in seventh embodiment of the invention, including the 4th Mobile terminal 801 in embodiment or the 5th embodiment, and the journal file reading device 802 in sixth embodiment, and point Not it is identical with the content described in above-described embodiment, here is omitted.
, can be by it in several embodiments provided herein, it should be understood that disclosed apparatus and method Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the module, only Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple module or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed Coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLINGs or logical of device or module by some interfaces Letter connection, can be electrical, machinery or other forms.
The module illustrated as separating component can be or may not be it is physically separate, it is aobvious as module The part shown can be or may not be physical module, you can with positioned at a place, or can also be distributed to multiple On mixed-media network modules mixed-media.Some or all of module therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional module in each embodiment of the invention can be integrated in a processing module, can also That modules are individually physically present, can also two or more modules be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, it would however also be possible to employ the form of software function module is realized.
If the integrated module is realized using in the form of software function module and as independent production marketing or used When, it can be stored in a computer read/write memory medium.Understood based on such, technical scheme is substantially The part contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It should be noted that for foregoing each method embodiment, for simplicity description, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because According to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know Know, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairs Necessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
It is above the description to a kind of reading/writing method of journal file provided by the present invention, apparatus and system, for this The technical staff in field, according to the thought of the embodiment of the present invention, has change in specific embodiments and applications Place, to sum up, this specification content should not be construed as limiting the invention.

Claims (10)

1. a kind of wiring method of journal file, it is characterised in that methods described includes:
If having detected journal file generation, the journal file of generation is preserved to the first preset memory space;
Obtain the storage information that the journal file is preserved in first memory space;
The storage information is preserved to the second preset memory space, so as to the mobile terminal be in off-mode when, The storage information preserved using second memory space reads the journal file from first memory space.
2. wiring method according to claim 1, it is characterised in that the storage information includes the preservation journal file Initial address and the journal file size of data between mapping relations.
3. wiring method according to claim 1, it is characterised in that described to preserve the storage information to preset The step of two memory spaces, includes:
Determine whether the remaining storage size of second memory space meets the storage demand of the storage information;
Believe if it is not satisfied, then deleting the storage preserved in second memory space according to the order of holding time from front to back Breath, until the remaining storage size meets the storage demand of the storage information, and the storage information is preserved to described Second memory space;
If meeting, the storage information is preserved to second memory space.
4. a kind of read method of journal file, it is characterised in that methods described includes:
After being connected with the mobile terminal in off-mode, journal file is obtained preset from the second preset memory space The first memory space preserve when storage information;
The journal file is read using the storage information.
5. read method according to claim 4, it is characterised in that the storage information is comprising the journal file in institute State the mapping relations between initial address when the first memory space is preserved and the size of data of the journal file;
The step of reading journal file using the storage information, includes:
Data are read since the initial address of first memory space, until the data read are equal to the data Size, to complete the reading of the journal file.
6. a kind of mobile terminal, it is characterised in that the mobile terminal includes:
First preserving module, if for having detected journal file generation, the journal file of generation is preserved to preset One memory space;
Acquisition module, the storage information of the journal file is preserved for obtaining in first memory space;
Second preserving module, for the storage information to be preserved to the second preset memory space, so as to described mobile whole When end is in off-mode, the storage information preserved using second memory space is read from first memory space The journal file.
7. write-in mobile terminal according to claim 6, it is characterised in that second preserving module includes:
Determining module, for determining whether the remaining storage size of second memory space meets the storage of the storage information Demand;
Preserving module is deleted, for if it is not satisfied, then deleting the second storage sky according to the order of holding time from front to back Between in the storage information that has preserved, until the remaining storage size meets the storage demand of the storage information, and will be described Storage information is preserved to second memory space;
3rd preserving module, if for meeting, the storage information is preserved to second memory space.
8. a kind of reading device of journal file, it is characterised in that described device includes:
Acquisition module, for after being connected with the mobile terminal in off-mode, being obtained from the second preset memory space Storage information of the journal file when the first preset memory space is preserved;
Read module, for reading the journal file using the storage information.
9. reading device according to claim 8, it is characterised in that the storage information is comprising the journal file in institute State the mapping relations between initial address when the first memory space is preserved and the size of data of the journal file;
The read module specifically for:
Data are read since the initial address of first memory space, until the data read are equal to the data Size, to complete the reading of the journal file.
10. a kind of read-write system of journal file, it is characterised in that including the movement as described in any one of claim 6 or 7 Terminal, and the read-write equipment of journal file as claimed in claim 8 or 9.
CN201710165293.2A 2017-03-20 2017-03-20 Method, device and system for reading and writing log file Expired - Fee Related CN106951521B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710165293.2A CN106951521B (en) 2017-03-20 2017-03-20 Method, device and system for reading and writing log file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710165293.2A CN106951521B (en) 2017-03-20 2017-03-20 Method, device and system for reading and writing log file

Publications (2)

Publication Number Publication Date
CN106951521A true CN106951521A (en) 2017-07-14
CN106951521B CN106951521B (en) 2020-09-15

Family

ID=59472658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710165293.2A Expired - Fee Related CN106951521B (en) 2017-03-20 2017-03-20 Method, device and system for reading and writing log file

Country Status (1)

Country Link
CN (1) CN106951521B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002485A (en) * 2018-06-25 2018-12-14 郑州云海信息技术有限公司 A kind of management method of core file, device and storage medium
CN109614042A (en) * 2018-11-30 2019-04-12 维沃移动通信有限公司 A kind of method and terminal device storing log information
CN109634873A (en) * 2018-12-10 2019-04-16 浪潮(北京)电子信息产业有限公司 Solid-state disk host system log information method, apparatus, equipment and medium
CN109992441A (en) * 2019-04-11 2019-07-09 苏州浪潮智能科技有限公司 A kind of firmware log collecting method, system, equipment and medium
CN110457174A (en) * 2019-05-24 2019-11-15 深圳市金泰克半导体有限公司 Blog management method, device, electronic equipment and storage medium
CN110674046A (en) * 2019-09-24 2020-01-10 上海航天电子通讯设备研究所 Method for improving reliability of satellite-borne embedded file system
CN111433765A (en) * 2018-11-30 2020-07-17 深圳市大疆创新科技有限公司 Log storage method, log reading method, intelligent battery and unmanned aerial vehicle

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6253239B1 (en) * 1997-09-23 2001-06-26 Information Architects Corporation System for indexing and display requested data having heterogeneous content and representation
CN101281542A (en) * 2008-05-09 2008-10-08 华为技术有限公司 Method and device for storing file
CN101714161A (en) * 2009-12-23 2010-05-26 上海全景数字技术有限公司 Cache device and method for embedded browser
CN103282899A (en) * 2011-12-23 2013-09-04 华为技术有限公司 File system data storage method and access method and device therefor
CN105808622A (en) * 2014-12-31 2016-07-27 乐视网信息技术(北京)股份有限公司 File storage method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6253239B1 (en) * 1997-09-23 2001-06-26 Information Architects Corporation System for indexing and display requested data having heterogeneous content and representation
CN101281542A (en) * 2008-05-09 2008-10-08 华为技术有限公司 Method and device for storing file
CN101714161A (en) * 2009-12-23 2010-05-26 上海全景数字技术有限公司 Cache device and method for embedded browser
CN103282899A (en) * 2011-12-23 2013-09-04 华为技术有限公司 File system data storage method and access method and device therefor
CN105808622A (en) * 2014-12-31 2016-07-27 乐视网信息技术(北京)股份有限公司 File storage method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002485A (en) * 2018-06-25 2018-12-14 郑州云海信息技术有限公司 A kind of management method of core file, device and storage medium
CN109614042A (en) * 2018-11-30 2019-04-12 维沃移动通信有限公司 A kind of method and terminal device storing log information
CN111433765A (en) * 2018-11-30 2020-07-17 深圳市大疆创新科技有限公司 Log storage method, log reading method, intelligent battery and unmanned aerial vehicle
CN109634873A (en) * 2018-12-10 2019-04-16 浪潮(北京)电子信息产业有限公司 Solid-state disk host system log information method, apparatus, equipment and medium
CN109992441A (en) * 2019-04-11 2019-07-09 苏州浪潮智能科技有限公司 A kind of firmware log collecting method, system, equipment and medium
CN110457174A (en) * 2019-05-24 2019-11-15 深圳市金泰克半导体有限公司 Blog management method, device, electronic equipment and storage medium
CN110674046A (en) * 2019-09-24 2020-01-10 上海航天电子通讯设备研究所 Method for improving reliability of satellite-borne embedded file system
CN110674046B (en) * 2019-09-24 2023-08-01 上海航天电子通讯设备研究所 Method for improving reliability of satellite-borne embedded file system

Also Published As

Publication number Publication date
CN106951521B (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN106951521A (en) The reading/writing method of journal file, apparatus and system
CN105391965B (en) Video recording method based on multi-cam and device
CN105913868B (en) A kind of method, system on chip and the terminal of adjustment frequency
CN105354093A (en) Memory management method and mobile terminal
CN106406675A (en) Fast method for running application programs and terminal equipment
CN109951400A (en) Instruction sending method, device, electronic equipment and the readable storage medium storing program for executing of terminal
CN105262878A (en) Processing method of automatic call recording and mobile terminal
CN107872555A (en) Call recording method, device, terminal device and computer-readable recording medium
CN109471742A (en) Information processing method, device, electronic equipment and readable storage medium storing program for executing
CN107371221A (en) Select method, apparatus, mobile terminal and the readable storage medium storing program for executing of network
CN106445314A (en) Display interface refreshing method and apparatus
CN107171412A (en) Method, device, mobile terminal and the storage medium of dynamic adjustment charging current
CN107425568A (en) Prevent battery from crossing the method, apparatus put, mobile terminal and storage medium
CN106845267A (en) The processing method and mobile terminal of applicating history information
CN105930084A (en) Screenshot picture editing method and apparatus
CN105744609B (en) Improve the method and device of mobile terminal power consumption
CN110191221A (en) Audio-frequency processing method, circuit and terminal
CN107526601A (en) A kind of mobile terminal method of adjustment, mobile terminal and storage medium
CN107871015A (en) Daily record data processing method and processing device, terminal and readable storage medium storing program for executing
CN106599173A (en) Lyric matching method and terminal
CN106126377A (en) The method and device of system start-up
CN106488039A (en) Volume adjusting method and system, mobile terminal and playback equipment
CN106951145A (en) Electricity based reminding method and mobile terminal during charging
CN107508969A (en) A kind of information processing method, device, computer installation and computer-readable recording medium
CN105824509A (en) Method and device for arranging icons

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200915