CN106033322B - A kind of date storage method and device - Google Patents

A kind of date storage method and device Download PDF

Info

Publication number
CN106033322B
CN106033322B CN201510117645.8A CN201510117645A CN106033322B CN 106033322 B CN106033322 B CN 106033322B CN 201510117645 A CN201510117645 A CN 201510117645A CN 106033322 B CN106033322 B CN 106033322B
Authority
CN
China
Prior art keywords
daily record
record data
mobile terminal
terminal device
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.)
Active
Application number
CN201510117645.8A
Other languages
Chinese (zh)
Other versions
CN106033322A (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.)
Yuanxin Information Technology Group Co.,Ltd.
Original Assignee
Beijing Yuanxin Science and 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 Beijing Yuanxin Science and Technology Co Ltd filed Critical Beijing Yuanxin Science and Technology Co Ltd
Priority to CN201510117645.8A priority Critical patent/CN106033322B/en
Publication of CN106033322A publication Critical patent/CN106033322A/en
Application granted granted Critical
Publication of CN106033322B publication Critical patent/CN106033322B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a kind of date storage method and devices, are applied to mobile terminal device, and method includes: the daily record data for Update log file for obtaining the mobile terminal device and being currently generated;According to preset rules, the rank of daily record data obtained is determined;According to the rank of identified daily record data, the storage location of daily record data obtained is determined;Daily record data obtained is stored in identified storage location.Daily record data is stored by the rank thus according to daily record data, and it is stored in determining storage location, it is not that the daily record data of generation is stored in the external memory of mobile terminal device every time, therefore, the write-in number for reducing the external memory of mobile terminal device, improves the service life of external memory.

Description

A kind of date storage method and device
Technical field
The present invention relates to technical field of data storage, in particular to a kind of date storage method and device.
Background technique
Log is hardware, software and system problem in recording equipment (such as computer, mobile phone, tablet computer etc.) system Information, while can event to occur in monitoring system.User can check the reason of mistake occurs by it, or seek Look for the trace that attacker leaves when receiving attack.Log includes system log, application log and security log.User is each Event occurs into system for operation equipment or equipment monitor, can all generate new daily record data, need to be written daily record data Into journal file, original journal file is updated.
Under normal conditions, mobile terminal device (such as mobile phone, tablet computer etc.) is using flash memory type memory as external memory Reservoir, wherein flash memory type memory is flash memory (Flash Memory) or the memory (for example, solid state hard disk) based on flash memory; The daily record data of equipment of itself is written in the journal file in flash memory type memory by mobile terminal device in real time, mobile terminal Equipment is every to generate new log, require to carry out flash memory type memory write-once operation, but flash memory type memory makes It is influenced with the service life by read-write number, read-write number is more, and service life is shorter.
Therefore, daily record data is stored on flash memory type memory by benefit in manner just described, can shorten flash memory type memory Service life.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of date storage method and device, to improve flash memory type memory Service life.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of date storage methods, are applied to mobile terminal device, Include:
Obtain the daily record data for Update log file that the mobile terminal device is currently generated;
According to preset rules, the rank of daily record data obtained is determined;
According to the rank of identified daily record data, the storage location of daily record data obtained is determined;
Daily record data obtained is stored in identified storage location.
Preferably, the rank of the daily record data according to determined by, determines the storage location of daily record data obtained, Include:
In the case where the rank of identified daily record data is kernel level, by the external storage of the mobile terminal device Journal file in device is determined as the storage location of daily record data obtained;
In the case where the rank of identified daily record data is system service rank or the other situation of application-level, by the shifting The built-in storage of dynamic terminal device, is determined as the storage location of daily record data obtained.
Preferably, allocating depositing for the daily record data of storage different stage in the built-in storage of the mobile terminal device in advance Store up space;
The rank in identified daily record data is in system service rank or the other situation of application-level, by institute The built-in storage for stating mobile terminal device is determined as the storage location of daily record data obtained, comprising:
In the case where the rank of identified daily record data is system service rank or the other situation of application-level, by the shifting It moves in the built-in storage of terminal device, memory space corresponding with the rank of identified daily record data, is determined as obtained The storage location of daily record data.
Preferably, the method also includes:
By the daily record data in the built-in storage for being stored in the mobile terminal device according to the pre-set write time Period is periodically written in the journal file in the external memory of the mobile terminal device;Or
When pre-set write time point reaches, by the day in the built-in storage for being stored in the mobile terminal device Will data are written in the journal file in the external memory of the mobile terminal device;Or
In the case where presetting the memory capacity of the memory space, judge whether the memory space has expired, such as Fruit is the log being written to the daily record data being stored in the memory space in the external memory of the mobile terminal device In file;The daily record data being stored in the memory space is deleted;Or
Judge whether to receive the instruction of restarting or shutdown command for the mobile terminal device;If so, will storage In the external memory that the daily record data in the built-in storage of the mobile terminal device is written to the mobile terminal device In journal file.
Preferably, the mobile terminal device and log server communicate to connect;The method also includes:
Obtain the networking mode of the mobile terminal device;
It, will be described in the case where the networking mode of the mobile terminal device is to be networked by Wireless LAN Journal file is uploaded to the log server.
In order to achieve the above objectives, the embodiment of the invention discloses a kind of data storage devices, are applied to mobile terminal device, It include: that daily record data obtains module, rank determination module, storage location determining module and the first memory module, wherein
The daily record data obtains module, for obtaining that the mobile terminal device is currently generated for Update log text The daily record data of part;
The rank determination module is obtained for according to preset rules, determining that the daily record data obtains module Daily record data rank;
The storage location determining module, for the rank of the daily record data according to determined by the rank determination module, Determine that the daily record data obtains the storage location for the daily record data that module obtains;
First memory module is stored in described deposit for the daily record data to be obtained the daily record data that module obtains Store up the storage location that position determination module determines.
Preferably, the storage location determining module, comprising: the first storage location determines submodule and the second storage location Determine submodule, wherein
First storage location determines submodule, the rank of the daily record data for determining in the rank determination module In the case where for kernel level, by the journal file in the external memory of the mobile terminal device, it is determined as day obtained The storage location of will data;
Second storage location determines submodule, the rank of the daily record data for determining in the rank determination module Under system service rank or the other situation of application-level, the built-in storage of the mobile terminal device to be determined as being obtained The storage location of the daily record data obtained.
Preferably, allocating depositing for the daily record data of storage different stage in the built-in storage of the mobile terminal device in advance Store up space;Second storage location determines submodule, is specifically used for:
It is that system service rank or application-level are other in the rank for the daily record data that the rank determination module determines In the case of, by the built-in storage of the mobile terminal device, memory space corresponding with the rank of identified daily record data, It is determined as the storage location of daily record data obtained.
Preferably, described device further include: the second memory module, third memory module, the 4th memory module and the 5th are deposited Store up at least one of module;Wherein,
Second memory module, the daily record data in built-in storage for the mobile terminal device will to be stored in by According to pre-set period write time, the journal file being periodically written in the external memory of the mobile terminal device In;
The third memory module, it is described mobile whole for that will be stored in when pre-set write time point reaches Daily record data in the built-in storage of end equipment is written in the journal file in the external memory of the mobile terminal device;
4th memory module, for judging institute in the case where presetting the memory capacity of the memory space State whether memory space has expired, if so, the daily record data being stored in the memory space is written to the mobile terminal In journal file in the external memory of equipment;The daily record data being stored in the memory space is deleted;
5th memory module receives the instruction of restarting for the mobile terminal device or pass for judging whether Machine instruction;If so, the daily record data in the built-in storage for being stored in the mobile terminal device is written to described mobile whole In journal file in the external memory of end equipment.
Preferably, the mobile terminal device and log server communicate to connect;Described device further include: networking mode obtains Obtain module and journal file uploading module, wherein
The networking mode obtains module, for obtaining the networking mode of the mobile terminal device;
The journal file uploading module is to pass through nothing for obtaining the networking mode that module obtains in the networking mode In the case that line local area network is networked, the journal file is uploaded to the log server.
As seen from the above technical solutions, the embodiment of the invention provides a kind of date storage method and device, it is applied to Mobile terminal device, method include: the log number for Update log file for obtaining the mobile terminal device and being currently generated According to;According to preset rules, the rank of daily record data obtained is determined;According to the rank of identified daily record data, Determine the storage location of daily record data obtained;Daily record data obtained is stored in identified storage location.Due to It is the storage location for being stored according to the rank of daily record data to daily record data, and being stored in determining, every time will is not The daily record data of generation is stored in the external memory of mobile terminal device, therefore, reduces the external storage of mobile terminal device The write-in number of device, improves the service life of external memory.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is that the first process of the date storage method provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;
Fig. 2 is that second of process of the date storage method provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;
Fig. 3 is that the third process of the date storage method provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;
Fig. 4 is that the first structure of the data storage device provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;
Fig. 5 is that second of structure of the data storage device provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;
Fig. 6 is that the third structure of the data storage device provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It should be noted that the embodiment of the present invention is preferably applied to mobile terminal device, for example, being mounted with that iOS is operated (android system is a kind of for system (iOS is the handheld equipment operating system developed by Apple Inc.) or Android operation system The operating system of freedom and open source code based on Linux) or Windows Phone operating system (Windows Phone Be Microsoft publication Mobile phone operating system) mobile terminal device, be of course also apply to other mobile terminal devices, This is not limited by the present invention.
Below by specific embodiment, the present invention is described in detail.
Fig. 1 is that the first process of the date storage method provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;May include:
S101: the daily record data for Update log file that the mobile terminal device is currently generated is obtained;
S102: according to preset rules, the rank of daily record data obtained is determined;
S103: according to the rank of identified daily record data, the storage location of daily record data obtained is determined;
S104: daily record data obtained is stored in identified storage location.
In practical applications, daily record data can be according to user for mobile terminal device operation generate, such as: User deletes the daily record data of the generation of the content in certain document;It is also possible to mobile terminal device and detects there is event in system It automatically generates, such as: the system of detecting receives the daily record data, etc. of e-mail messages generation.
Illustratively, it is assumed that user in order to avoid mobile terminal device system by virus destruction, in mobile terminal It is mounted with certain antivirus software in equipment, and is provided with the antivirus software and automatically updates upgrading, it is assumed that on December 25th, 2013 In the case that 10:19:48 detects the presence of update, then upgrade information file is downloaded, the daily record data of generation is as follows:
Log generates object: certain antivirus software;Time: on December 25th, 2013 10:19:48;Log Names: Security;Event: downloading upgrade information file;Upgrade information file name: A;Upgrade information file source address: http://A Address.
Determine the rank of the daily record data of above-mentioned generation, specifically, daily record data can be divided into four ranks in advance, It is respectively as follows: kernel level, system service rank, application program rank and debugging level, wherein the daily record data of kernel level Are as follows: the abnormal interrupt that occurs in kernel such as exits at serious problems, the daily record data of generation;The daily record data of system service rank Are as follows: system service goes wrong, the daily record data of generation;The other daily record data of application-level are as follows: application program goes wrong, The daily record data of generation;The daily record data of debugging level are as follows: problem when debugging, the daily record data of generation.
Object can be generated according to the log of daily record data, the rank of daily record data be determined, such as by the log of above-mentioned generation " log generates object: certain antivirus software to data;Time: on December 25th, 2013 10:19:48;Log Names: Security;Thing Part: downloading upgrade information file;Upgrade information file name: A;Upgrade information file source address: the address of http://A ", day It is certain antivirus software that will, which generates object, this daily record data is determined as application program rank.By the memory of mobile terminal device Reservoir is determined as the storage location of the daily record data, this daily record data is stored in the built-in storage of mobile terminal device.
In the case where the rank of daily record data is determined as kernel level, by the day of the external memory of mobile terminal device Will file is determined as the storage location of daily record data;Daily record data is stored in the log of the external memory of mobile terminal device In file;
In the case where the rank of daily record data is determined as system service rank, by the interior storage of mobile terminal device Device is determined as the storage location of daily record data;Daily record data is stored in the built-in storage of mobile terminal device.
In the case where the rank of daily record data is determined as debugging level, since the daily record data of debugging level exists immediately It is shown in the screen of mobile terminal device, carries out debugging use for user, after user, which debugs, to complete, the daily record data I.e. without any effect, therefore the daily record data of debugging level is without being stored.
In practical applications, the daily record data of storage different stage is allocated in the built-in storage of mobile terminal device in advance Memory space, such as be used for the daily record data of storage system service rank in the built-in storage distribution of mobile terminal device in advance The initial address of memory space is 00200000H, termination address 015FFFFFH;It distributes other for storing application-level The initial address of the memory space of daily record data is 01600000H, termination address 033FFFFFH.
Then in the case where determining daily record data rank is system service rank, by the daily record data of system service rank Being stored in initial address is 00200000H, and termination address is in the memory space of 015FFFFFH;In determining daily record data grade Wei not be in the other situation of application-level, it is 01600000H that the other daily record data of application-level, which is stored in initial address, eventually Only address is in the memory space of 033FFFFFH.
Using embodiment illustrated in fig. 1 of the present invention, daily record data is stored by the rank thus according to daily record data, and And it is stored in determining storage location, it is not the external memory that the daily record data of generation is stored in mobile terminal device every time In, therefore, reduces the write-in number of the external memory of mobile terminal device, improve the service life of external memory.
Fig. 2 is that second of process of the date storage method provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;On the basis of embodiment illustrated in fig. 2 embodiment shown in Fig. 1 of the present invention, S103 includes S1031: in identified log In the case that the rank of data is kernel level, the journal file in the external memory of the mobile terminal device is determined as The storage location of daily record data obtained;It is system service rank or application-level in the rank of identified daily record data In other situation, by the built-in storage of the mobile terminal device, it is determined as the storage location of daily record data obtained.Increase S105: by the daily record data in the built-in storage for being stored in the mobile terminal device according to pre-set week write time Phase is periodically written in the journal file in the external memory of the mobile terminal device.
In practical applications, it can preset and write the daily record data in the built-in storage for being stored in mobile terminal device Enter to period write time in the journal file in the external memory of mobile terminal device, will periodically be stored in the shifting Daily record data in the built-in storage of dynamic terminal device is written in the journal file in the external memory of mobile terminal device;Example Such as, pre-set period write time is two hours, then will every two hours be stored in the interior storage of the mobile terminal device Daily record data in device is written in the journal file in the external memory of mobile terminal device.
In practical applications, it can also preset the log in the built-in storage for being stored in the mobile terminal device Data are written to the write time point in the journal file in the external memory of mobile terminal device, in pre-set write-in Between put reach when, the daily record data in the built-in storage for being stored in the mobile terminal device is written to mobile terminal device In journal file in external memory;For example, pre-set write time point be daily 0:00,12:00 and 22:00, then Daily record data in the built-in storage for being stored in the mobile terminal device is written to shifting by daily 0:00,12:00 and 22:00 In journal file in the external memory of dynamic terminal device.
In practical applications, the memory capacity of memory space can also be preset, it is assumed that for storing daily record data The initial address of memory space are as follows: 00200000H, termination address are as follows: 033FFFFFH, then the memory capacity of the memory space be 50M, judges whether the daily record data stored in memory space has stored 50M, if it is, by the daily record data in memory space It is written in the journal file in the external memory of mobile terminal device;The daily record data being stored in memory space is deleted.
In practical applications, the data in built-in storage can lose in the case where power-off (such as restart or shut down), because This, can detecte the instruction of restarting or shutdown command whether received for mobile terminal device, if received, will deposit at this time Storage is in the external memory that the daily record data in the built-in storage of the mobile terminal device is written to the mobile terminal device Journal file in.
Using embodiment illustrated in fig. 2 of the present invention, daily record data is stored by the rank thus according to daily record data, and And it is stored in determining storage location, it is not the external memory that the daily record data of generation is stored in mobile terminal device every time In, therefore, reduces the write-in number of the external memory of mobile terminal device, improve the service life of external memory.
Fig. 3 is that the third process of the date storage method provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;Mobile terminal device and log server communicate to connect;The base of embodiment illustrated in fig. 3 embodiment shown in Fig. 2 of the present invention Increase following two step on plinth;
S106: the networking mode of the mobile terminal device is obtained;
S107: in the case where the networking mode of the mobile terminal device is to be networked by Wireless LAN, The journal file is uploaded to the log server.
Journal file in the external memory of mobile terminal device, which has, occupies the memory space upper limit;Illustratively, it is assumed that It is log for the journal file in the external memory of the mobile terminal device of storing daily record data, occupying the memory space upper limit is 10M。
Daily record data in the built-in storage of mobile terminal device can be written in log, when log reaches 10M, creation The copy of log, while the daily record data in log is deleted, then the daily record data in the built-in storage of mobile terminal device is written Into log, when the copy amount of log reaches preset quantity, all copies of log is uploaded to server, uploads and completes All copies of log are deleted afterwards.
Daily record data in the built-in storage of mobile terminal device can also be written in log, it, will when log reaches 10M Log is named as log1, then creates log, then the daily record data in the built-in storage of mobile terminal device is written in log, log When reaching 10M, log is named as log2, then create log, and so on, exist until in the external memory of mobile terminal device LogN, N are pre-set value, and log1 to logN is uploaded to server at this time, delete log1 to logN after the completion of uploading.
In practical applications, the networking mode of mobile terminal device can be to be carried out by general packet radio service technology Networking, i.e., mobile network provide mobile data services GPRS (General Packet Radio Service, general packet without Line service technology), or it is networked by Wireless LAN.
Using embodiment illustrated in fig. 3 of the present invention, journal file is uploaded to log server, it is therefore prevented that daily record data is lost It loses, while in the case where the networking mode of mobile terminal device is to be networked by Wireless LAN, by journal file It is uploaded to log server, saves the data traffic of mobile terminal device.
Corresponding with above-mentioned embodiment of the method, the embodiment of the invention also provides the data for being applied to mobile terminal device Storage device.
Fig. 4 is that the first structure of the data storage device provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;It may include: that daily record data obtains module 201, rank determination module 202, storage location determining module 203 and first are deposited Store up module 204, wherein
Daily record data obtains module 201, for obtaining that the mobile terminal device is currently generated for Update log text The daily record data of part;
Rank determination module 202, for according to preset rules, determining that daily record data obtains what module 201 obtained The rank of daily record data;
Storage location determining module 203, for the rank of the daily record data according to determined by rank determination module 202, really The storage location for the daily record data that settled date will data obtaining module 201 obtains;
In practical applications, the storage location determining module 203 of the embodiment of the present invention may include: the first storage location Determine that submodule and the second storage location determine submodule (not shown), wherein
First storage location determines submodule, and the rank of the daily record data for determining in rank determination module 202 is interior In the other situation of nuclear leve, by the journal file in the external memory of the mobile terminal device, it is determined as log number obtained According to storage location;
Second storage location determines submodule, and the rank of the daily record data for determining in rank determination module 202 is to be Under service class of uniting or the other situation of application-level, the built-in storage of the mobile terminal device is determined as obtained The storage location of daily record data.
The storage for allocating the daily record data of storage different stage in advance in the built-in storage of the mobile terminal device is empty Between in the case where, the second storage location determines submodule, specifically can be used for:
It is that system service rank or application-level are other in the rank for the daily record data that the rank determination module determines In the case of, by the built-in storage of the mobile terminal device, memory space corresponding with the rank of identified daily record data, It is determined as the storage location of daily record data obtained.
First memory module 204, the daily record data for obtaining daily record data acquisition module 201 are stored in storage location The storage location that determining module 203 determines.
Using embodiment illustrated in fig. 4 of the present invention, daily record data is stored by the rank thus according to daily record data, and And it is stored in determining storage location, it is not the external memory that the daily record data of generation is stored in mobile terminal device every time In, therefore, reduces the write-in number of the external memory of mobile terminal device, improve the service life of external memory.
Fig. 5 is that second of structure of the data storage device provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;Embodiment illustrated in fig. 5 of the present invention on the basis of the embodiment shown in fig. 4, increases by the second memory module 205,
Second memory module 205, the daily record data in built-in storage for the mobile terminal device will to be stored in by According to pre-set period write time, the journal file being periodically written in the external memory of the mobile terminal device In.
In practical applications, on the basis of the embodiment shown in fig. 4, can also increase: third memory module, the 4th storage At least one of module and the 5th memory module (not shown);Wherein,
Third memory module, for that will be stored in the mobile terminal and set when pre-set write time point reaches Daily record data in standby built-in storage is written in the journal file in the external memory of the mobile terminal device;
4th memory module, for being deposited described in judgement in the case where presetting the memory capacity of the memory space Whether storage space has expired, if so, the daily record data being stored in the memory space is written to the mobile terminal device External memory in journal file in;The daily record data being stored in the memory space is deleted;
5th memory module refers to for judging whether to receive for the instruction of restarting of the mobile terminal device or shutdown It enables;It is set if so, the daily record data in the built-in storage for being stored in the mobile terminal device is written to the mobile terminal In journal file in standby external memory.
Using embodiment illustrated in fig. 5 of the present invention, daily record data is stored by the rank thus according to daily record data, and And it is stored in determining storage location, it is not the external memory that the daily record data of generation is stored in mobile terminal device every time In, therefore, reduces the write-in number of the external memory of mobile terminal device, improve the service life of external memory.
Fig. 6 is that the third structure of the data storage device provided in an embodiment of the present invention applied to mobile terminal device is shown It is intended to;Mobile terminal device and log server communicate to connect;The base of embodiment illustrated in fig. 6 embodiment shown in Fig. 5 of the present invention On plinth, increase following two module: networking mode obtains module 206 and journal file uploading module 207, wherein
Networking mode obtains module 206, for obtaining the networking mode of the mobile terminal device;
Journal file uploading module 207, for obtaining the networking for the mobile terminal device that module 206 obtains in networking mode Mode is that in the case where being networked by Wireless LAN, the journal file is uploaded to the log server.
Using embodiment illustrated in fig. 6 of the present invention, journal file is uploaded to log server, it is therefore prevented that daily record data is lost It loses, while in the case where the networking mode of mobile terminal device is to be networked by Wireless LAN, by journal file It is uploaded to log server, saves the data traffic of mobile terminal device.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
Those of ordinary skill in the art will appreciate that all or part of the steps in realization above method embodiment is can It is completed with instructing relevant hardware by program, the program can store in computer-readable storage medium, The storage medium designated herein obtained, such as: ROM/RAM, magnetic disk, CD.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (8)

1. a kind of date storage method is applied to mobile terminal device characterized by comprising
Obtain the daily record data for Update log file that the mobile terminal device is currently generated;
According to preset rules, the rank of daily record data obtained is determined;
According to the rank of identified daily record data, the storage location of daily record data obtained is determined;
Daily record data obtained is stored in identified storage location;
The rank of the daily record data according to determined by, determines the storage location of daily record data obtained, comprising:
It, will be in the external memory of the mobile terminal device in the case where the rank of identified daily record data is kernel level Journal file, be determined as the storage location of daily record data obtained;
In the case where the rank of identified daily record data is system service rank or the other situation of application-level, will it is described it is mobile eventually The built-in storage of end equipment is determined as the storage location of daily record data obtained.
2. the method according to claim 1, wherein being allocated in advance in the built-in storage of the mobile terminal device Store the memory space of the daily record data of different stage;
The rank in identified daily record data is in system service rank or the other situation of application-level, by the shifting The built-in storage of dynamic terminal device, is determined as the storage location of daily record data obtained, comprising:
In the case where the rank of identified daily record data is system service rank or the other situation of application-level, will it is described it is mobile eventually In the built-in storage of end equipment, memory space corresponding with the rank of identified daily record data, be determined as log obtained The storage location of data.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
By the daily record data in the built-in storage for being stored in the mobile terminal device according to pre-set period write time, Periodically it is written in the journal file in the external memory of the mobile terminal device;Or
When pre-set write time point reaches, by the log number in the built-in storage for being stored in the mobile terminal device According in the journal file in the external memory for being written to the mobile terminal device;Or
In the case where presetting the memory capacity of the memory space, judge whether the memory space has expired, if so, The journal file daily record data being stored in the memory space being written in the external memory of the mobile terminal device In;The daily record data being stored in the memory space is deleted;Or
Judge whether to receive the instruction of restarting or shutdown command for the mobile terminal device;If so, institute will be stored in State the log that the daily record data in the built-in storage of mobile terminal device is written in the external memory of the mobile terminal device In file.
4. according to the method described in claim 3, it is characterized in that, the mobile terminal device and log server communication link It connects;The method also includes:
Obtain the networking mode of the mobile terminal device;
In the case where the networking mode of the mobile terminal device is to be networked by Wireless LAN, by the log File is uploaded to the log server.
5. a kind of data storage device is applied to mobile terminal device characterized by comprising daily record data obtains module, grade Other determining module, storage location determining module and the first memory module, wherein
The daily record data obtains module, for obtaining that the mobile terminal device is currently generated for Update log file Daily record data;
The rank determination module, for according to preset rules, determining that the daily record data obtains the day that module obtains The rank of will data;
The storage location determining module is determined for the rank of the daily record data according to determined by the rank determination module The daily record data obtains the storage location for the daily record data that module obtains;
First memory module is stored in the storage position for the daily record data to be obtained the daily record data that module obtains Set the storage location that determining module determines;
The storage location determining module, comprising: the first storage location determines that submodule and the second storage location determine submodule, Wherein,
First storage location determines submodule, and the rank of the daily record data for determining in the rank determination module is interior In the other situation of nuclear leve, by the journal file in the external memory of the mobile terminal device, it is determined as log number obtained According to storage location;
Second storage location determines submodule, and the rank of the daily record data for determining in the rank determination module is to be Under service class of uniting or the other situation of application-level, the built-in storage of the mobile terminal device is determined as obtained The storage location of daily record data.
6. device according to claim 5, which is characterized in that allocated in advance in the built-in storage of the mobile terminal device Store the memory space of the daily record data of different stage;Second storage location determines submodule, is specifically used for:
It is system service rank or the other situation of application-level in the rank for the daily record data that the rank determination module determines Under, by the built-in storage of the mobile terminal device, memory space corresponding with the rank of identified daily record data, determine For the storage location of daily record data obtained.
7. device according to claim 6, which is characterized in that described device further include: the second memory module, third storage At least one of module, the 4th memory module and the 5th memory module;Wherein,
Second memory module, the daily record data in built-in storage for that will be stored in the mobile terminal device is according to pre- Period write time being first arranged periodically is written in the journal file in the external memory of the mobile terminal device;
The third memory module, for that will be stored in the mobile terminal and set when pre-set write time point reaches Daily record data in standby built-in storage is written in the journal file in the external memory of the mobile terminal device;
4th memory module, for being deposited described in judgement in the case where presetting the memory capacity of the memory space Whether storage space has expired, if so, the daily record data being stored in the memory space is written to the mobile terminal device External memory in journal file in;The daily record data being stored in the memory space is deleted;
5th memory module refers to for judging whether to receive for the instruction of restarting of the mobile terminal device or shutdown It enables;It is set if so, the daily record data in the built-in storage for being stored in the mobile terminal device is written to the mobile terminal In journal file in standby external memory.
8. device according to claim 7, which is characterized in that the mobile terminal device and log server communication link It connects;Described device further include: networking mode obtains module and journal file uploading module, wherein
The networking mode obtains module, for obtaining the networking mode of the mobile terminal device;
The journal file uploading module is to pass through wireless office for obtaining the networking mode that module obtains in the networking mode In the case that domain network is networked, the journal file is uploaded to the log server.
CN201510117645.8A 2015-03-17 2015-03-17 A kind of date storage method and device Active CN106033322B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510117645.8A CN106033322B (en) 2015-03-17 2015-03-17 A kind of date storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510117645.8A CN106033322B (en) 2015-03-17 2015-03-17 A kind of date storage method and device

Publications (2)

Publication Number Publication Date
CN106033322A CN106033322A (en) 2016-10-19
CN106033322B true CN106033322B (en) 2019-11-01

Family

ID=57150182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510117645.8A Active CN106033322B (en) 2015-03-17 2015-03-17 A kind of date storage method and device

Country Status (1)

Country Link
CN (1) CN106033322B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844185A (en) * 2017-03-17 2017-06-13 上海与德科技有限公司 The storage method and device of a kind of journal file
CN108920095B (en) * 2018-06-06 2021-06-29 深圳市脉山龙信息技术股份有限公司 Data storage optimization method and device based on CRUSH
CN109753235B (en) * 2018-08-15 2022-09-09 比亚迪股份有限公司 Gate data storage method and device and storage medium
CN111433765A (en) * 2018-11-30 2020-07-17 深圳市大疆创新科技有限公司 Log storage method, log reading method, intelligent battery and unmanned aerial vehicle
CN109977089A (en) * 2019-03-13 2019-07-05 深圳壹账通智能科技有限公司 Blog management method, device, computer equipment and computer readable storage medium
CN111835562B (en) * 2020-07-01 2023-10-17 北京爱笔科技有限公司 Log uploading method, log inquiring method and system
CN113572818A (en) * 2021-06-29 2021-10-29 青岛海尔科技有限公司 Log file uploading method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053923A (en) * 2009-11-05 2011-05-11 北京金山软件有限公司 Storage method and storage device for logbook data
CN102420756A (en) * 2011-11-30 2012-04-18 深圳市共进电子股份有限公司 Method for storing system logs, and router
CN103544097A (en) * 2013-10-21 2014-01-29 广东威创视讯科技股份有限公司 Journal storing method, journal storing system, journal reading method and journal reading system of embedded system
CN103942210A (en) * 2013-01-21 2014-07-23 中国移动通信集团上海有限公司 Processing method, device and system of mass log information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7885921B2 (en) * 2004-11-18 2011-02-08 International Business Machines Corporation Managing atomic updates on metadata tracks in a storage system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053923A (en) * 2009-11-05 2011-05-11 北京金山软件有限公司 Storage method and storage device for logbook data
CN102420756A (en) * 2011-11-30 2012-04-18 深圳市共进电子股份有限公司 Method for storing system logs, and router
CN103942210A (en) * 2013-01-21 2014-07-23 中国移动通信集团上海有限公司 Processing method, device and system of mass log information
CN103544097A (en) * 2013-10-21 2014-01-29 广东威创视讯科技股份有限公司 Journal storing method, journal storing system, journal reading method and journal reading system of embedded system

Also Published As

Publication number Publication date
CN106033322A (en) 2016-10-19

Similar Documents

Publication Publication Date Title
CN106033322B (en) A kind of date storage method and device
CN107291516B (en) A kind of firmware upgrade method and system
US20080046880A1 (en) Method for managing internal software of terminal through device management server
CN103645914B (en) Software cleaning method and device
US20130347096A1 (en) Permission management method for applications, electronic device thereof, and computer readable medium
CN103152390B (en) The node configuration method of distributed memory system, device, node and system
CN101268620B (en) Device management system and method for managing device management object
CN102541595A (en) Method and device for upgrading intelligent device and intelligent device
WO2014025966A2 (en) Immediately launching applications
CN105263132B (en) The standby configuration file selection method and user terminal of eUICC
CN102314421A (en) Self-rescuing method and self rescuing device for file system after being damaged
CN103595808B (en) A kind of file update information method for pushing and device
CN103986779A (en) Application data transmission method, device and terminal equipment
CN106412078A (en) Precise information pushing method and system, and devices
CN106227541A (en) A kind of program updates download process method and mobile terminal
CN108228215A (en) The method for pushing and device of the OTA upgrade package of terminal device
CN105453518B (en) Synchronization of metering networks
CN104216997A (en) Method and device for repairing terminal equipment
CN110502238A (en) A kind of method and device of front and back end joint debugging
JP6548990B2 (en) Communication device, communication system, and control method of communication device
JP5561061B2 (en) Data storage system
CN107124627A (en) A kind of update method of interface typesetting
CN107819893A (en) Network address Dynamic Configuration and mobile terminal
CN107682186A (en) A kind of method and device for realizing journal dump
CN108156031A (en) The update method and device of a kind of data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210127

Address after: 101300 room 153, 1 / F, building 17, 16 Caixiang East Road, Nancai Town, Shunyi District, Beijing

Patentee after: Yuanxin Information Technology Group Co.,Ltd.

Address before: 100176 room 408-27, building 8, No.1, Disheng North Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing (centralized office area)

Patentee before: BEIJING YUANXIN SCIENCE & TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20161019

Assignee: Beijing Yuanxin Junsheng Technology Co.,Ltd.

Assignor: Yuanxin Information Technology Group Co.,Ltd.

Contract record no.: X2021110000018

Denomination of invention: A data storage method and device

Granted publication date: 20191101

License type: Common License

Record date: 20210531

EE01 Entry into force of recordation of patent licensing contract