CN107580060A - Banked cache method is divided in a kind of mobile terminal - Google Patents

Banked cache method is divided in a kind of mobile terminal Download PDF

Info

Publication number
CN107580060A
CN107580060A CN201710828221.1A CN201710828221A CN107580060A CN 107580060 A CN107580060 A CN 107580060A CN 201710828221 A CN201710828221 A CN 201710828221A CN 107580060 A CN107580060 A CN 107580060A
Authority
CN
China
Prior art keywords
data
rank
account
user
grade
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
CN201710828221.1A
Other languages
Chinese (zh)
Other versions
CN107580060B (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.)
Shang Shang Tong Jing Technology Jiangsu Co Ltd
Original Assignee
Shang Shang Tong Jing Technology Jiangsu 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 Shang Shang Tong Jing Technology Jiangsu Co Ltd filed Critical Shang Shang Tong Jing Technology Jiangsu Co Ltd
Priority to CN201710828221.1A priority Critical patent/CN107580060B/en
Publication of CN107580060A publication Critical patent/CN107580060A/en
Application granted granted Critical
Publication of CN107580060B publication Critical patent/CN107580060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Divide banked cache method the present invention relates to a kind of mobile terminal, this method is divided into central library and multiple caching storehouses in the user data storage that mobile phone is applied.Cache storehouse and user account corresponds, each user account is stored in the central library with caching the corresponding relation in storehouse, when user uses the application under login account, caused various user data are all stored in the caching storehouse corresponding to the login account, so as to which that realizes user data divides banked cache, this method, which facilitates, to be handled the caching of unique user, also substantially increases the operational efficiency of application.

Description

Banked cache method is divided in a kind of mobile terminal
【Technical field】
The invention belongs to mobile terminal and field of information processing, more particularly to a kind of mobile terminal to divide banked cache method.
【Background technology】
In the last few years, with the development of mobile Internet, smart mobile phone has become essential in people's life set Standby, various mobile phone applications (APP) also just turn into the most-often used application program of people.In the prior art, most mobile phones are using all People are needed to be logged in using the account of oneself, caused various user data are stored in the number of users of mobile phone application after login According in storehouse.But mobile phone application might have different accounts and log in, a kind of situation is that same user possesses multiple accounts, Same mobile phone application is logged in using different accounts, another situation is that mobile phone may be by different when, under different situations Different users is used, and different users is logged in using different accounts.In the case of this more accounts, the use of different accounts User data is all stored in same customer data base, is likely to result in user data and is mutually gone here and there, and data may also be caused to look into addition It is low to ask efficiency.
【The content of the invention】
In order to solve above mentioned problem of the prior art, the present invention proposes a kind of mobile terminal and divides banked cache method.
The technical solution adopted by the present invention is as follows:
Banked cache method is divided in a kind of mobile terminal, comprises the following steps:
When application starts first, it creates a central library, and the central library is used to preserve user account and its caching The corresponding relation in storehouse;
When user logs in the application using an account, this is applied inquires about whether the account has in the central library Corresponding caching storehouse, if it is not, for the account create corresponding to caching storehouse, and record in the central library account and The corresponding relation in the caching storehouse;
When user uses the application under the account, caused various user data are stored in corresponding to the account Caching storehouse in.
Further, by this apply in the user that is likely to occur classified, be divided into secure data and the class of public data two, The secure data is the user data of need for confidentiality, and remaining user data belongs to public data.
Further, the secure data includes userspersonal information, personal settings, private data.
Further, stored after the secure data is encrypted.
Further, public data is divided into n+1 rank, i.e., will be per a public data from the 0th grade to n-th grade A rank is all assigned, each rank has a corresponding conversation strategy, defining number of levels and guarantor at different levels After depositing strategy, the application manages thread by data staging and carries out differentiated control to public data, and specific method includes:
When a new public data of generation, its acquiescence is divided into the 0th grade, every a period of time T, if this Public data is not visited within the time cycle, and its current level is less than n, then the rank of the disclosure data rises One-level, wherein T are a predefined time thresholds;
If the disclosure data are accessed within the time cycle, the rank of the disclosure data is reduced, if the disclosure The current rank of data is m, and the time gap that its last time the reduces rank current time is t, when its last time reduces rank It is lowered by K0Individual rank, if the disclosure data were not lowered rank also, when t is set equal to the generation of the disclosure data Between distance current time and K0=0;Thus the rank K that this needs of calculating the disclosure data reduce, i.e.,
If (m-K) >=0, the rank for setting the disclosure data is m-K, and the rank for otherwise setting the disclosure data is 0.
Further, using number of levels and conversation strategy at different levels can be obtained from remote server by network.
Further, it is characterised in that n=9.
Further, the 0th grade of data are without any processing, only preserve initial data.
Further, n-th grade of data are deleted after expired, and expired time is defined by n-th grade of conversation strategy.
Further, the 1st grade to (n-1)th grade of Data Preservation Policy is:It is compressed using different compression algorithms, or It is compressed using the different compression levels of same compression algorithm.
Beneficial effects of the present invention include:1) realize and data buffer storage is carried out in units of user, by user service data It is completely separated, avoids user data and mutually go here and there, while is also convenient for being handled for the data cached of unique user;2) for single Individual user caches to handle, and substantially increases operational efficiency, improves Consumer's Experience.
【Brief description of the drawings】
Accompanying drawing described herein be for providing a further understanding of the present invention, forming the part of the application, but Inappropriate limitation of the present invention is not formed, in the accompanying drawings:
Fig. 1 be the present invention divide banked cache figure.
【Embodiment】
The present invention is described in detail below in conjunction with accompanying drawing and specific embodiment, illustrative examples therein and is said It is bright to be only used for explaining the present invention but not as a limitation of the invention.
Referring to accompanying drawing 1, it illustrates the specific embodiment that mobile phone application of the present invention divides banked cache basic framework.This hair The bright user data in mobile phone application stores, and is divided into central library and multiple caching storehouses.Cache storehouse and user account correspond, Three user accounts are shown in Fig. 1 altogether:Account A, account B and account C.Account A corresponds to caching A storehouses, and account A's is all User data is all stored in caching A storehouses, and account B corresponds to caching B storehouses, and account B all customer data is all stored in slow Deposit in B storehouses, account C corresponds to caching C storehouses, and account C all customer data is all stored in caching C storehouses.The central library In store each user account with cache storehouse corresponding relation, therefore application main program can by inquire about central library obtain pair The caching storehouse of account is answered, so as to which that realizes different user data divides banked cache.
Based on above-mentioned framework, illustrate that the present invention divides the basic step of banked cache method below:
When starting first using (APP), it creates a central library, and the central library is used to preserve user account and its Cache the corresponding relation in storehouse.
When user logs in the application using an account, this is applied inquires about whether the login account has in central library Corresponding caching storehouse, if it is not, for the account create corresponding to caching storehouse, and record in the central library account and The corresponding relation in the caching storehouse.
When user uses the application under login account, caused various user data are stored in the login account In corresponding caching storehouse, so as to which that realizes user data divides banked cache, this design facilitates to be entered to the caching of unique user Row processing, simultaneously because unique user processing caching can be directed to, also substantially increase the operational efficiency of application.
Above-mentioned steps are that the present invention divides the basic step of banked cache, however, it is possible to infer, because different user uses Different caching storehouses, caused result are that identical data will repeat to be stored in different caching storehouses.For example, account A and Account B has browsed identical webpage, then the web cache will be stored in caching A storehouses and caching B storehouses simultaneously.So as to There is huge memory data output using lower in this, expends a large amount of memory spaces.
In order in the case where keeping advantage of the present invention, control data amount of storage.The present invention is when designing application, it would be possible to The user data of appearance is classified, and user data is divided into secure data and the class of public data two, the secure data first It is that user needs safe and secret data, including userspersonal information, personal settings, private data etc.;In addition to secure data, Remaining user data belongs to public data.
The present invention is preserved after secure data is encrypted, and different processing modes is then carried out to public data to reduce number According to amount of storage, a kind of typical mode is data compression, but the data after compressing also need to decompress when accessing, and this can lead Causing the efficiency of data access reduces.Therefore, the present invention considers the conventional property of every part of public data, and the conventional property refers to portion Whether data are often accessed.Generally for upper, if a data are often accessed (i.e. conventional property is high), this part of data are just It can be not compressed, if a data are infrequently accessed (i.e. conventional property is low), can be compressed.Even in fact, Compression, also there is different compression algorithms or a compression level, and the size of the compression result of different compression algorithms or compression level is not Together, the efficiency of decompression is also different, and this can all have an impact to data access efficiency.Above-mentioned a data can be caching storehouse In a cache file, such as an image file or caching storehouse in a data record.
Therefore, in order to adapt to different situations, public data is classified by the present invention from high to low according to its property commonly used, from the 0 grade to n-th grade, common n+1 rank.0th grade of conventional property highest, n-th grade is then reduced to successively, n is one predefined Quantity, under preferable case, n=9, i.e. totally 10 ranks.
A rank will be all assigned per a public data, each rank has a corresponding conversation strategy.0th grade Data often with property highest, that is, most frequently need the data accessed, therefore the 0th grade of data are without any processing, only protect Deposit initial data.N-th grade of data are often minimum with property, can be considered as a kind of ephemeral data, can be deleted after expired (specific Expired time is defined by its conversation strategy).1st grade can also define different conversation strategies to (n-1)th grade, such as use difference Compression algorithm, or different compression levels of same compression algorithm, the present invention do not limited specific conversation strategy, this Art personnel can use the conversation strategy of its needs according to real needs.
Furthermore, it should be pointed out that although above-mentioned number of levels and conversation strategy can be previously set when designing and applying, Using by network new number of levels and conversation strategy at different levels can also be downloaded from remote server, so as to realize Self-renewing and upgrading.
After number of levels and conversation strategy at different levels is defined, it is necessary to which every a public data to generation is carried out Classification.Using upon actuation, just start a data differentiated control thread, differentiated control is carried out to public data, its is specific Grading management method is as follows:
When the new public data of generation portion, its acquiescence is divided into the 0th grade, and every a period of time T, (T is one Predefined time threshold), if the disclosure data are not visited within the time cycle, and its current level is less than N, then the disclosure data rank going up one level.
If the disclosure data are accessed within the time cycle, need to reduce the rank of the disclosure data, specifically , if the current rank of the disclosure data is m, time gap that its last time the reduces rank current time be t, its last time K is lowered by when reducing rank0Individual rank, if the disclosure data were not lowered rank also, t is set to be equal to the disclosure Data generation time gap current time and K0=0;Thus the rank K that this needs of calculating the disclosure data reduce, i.e.,
If (m-K) >=0, the rank for setting the disclosure data is m-K, and the rank for otherwise setting the disclosure data is 0.
Described above is only the better embodiment of the present invention, therefore all constructions according to described in present patent application scope, The equivalent change or modification that feature and principle are done, is included in the range of present patent application.

Claims (10)

1. banked cache method is divided in a kind of mobile terminal, it is characterised in that comprises the following steps:
When application starts first, it creates a central library, and the central library is used to preserve user account and it caches storehouse Corresponding relation;
When user logs in the application using an account, this is applied inquires about whether the account has corresponded in the central library Caching storehouse, if it is not, for the account create corresponding to caching storehouse, and record in the central library account and this is slow The corresponding relation of warehousing;
When user uses the application under the account, caused various user data are stored in slow corresponding to the account In warehousing.
2. according to the method for claim 1, it is characterised in that the user being likely to occur during this is applied is classified, point For secure data and the class of public data two, the secure data is the user data of need for confidentiality, and remaining user data all belongs to In public data.
3. according to the method for claim 2, it is characterised in that the secure data includes userspersonal information, individual sets Put, private data.
4. according to the method described in claim 2-3 any one, it is characterised in that deposited after the secure data is encrypted Storage.
5. according to the method described in claim 2-4 any one, it is characterised in that public data is divided into n+1 rank, I.e. from the 0th grade to n-th grade, a rank will be all assigned per a public data, each rank has a corresponding preservation Strategy, after number of levels and conversation strategy at different levels is defined, the application manages thread to open by data staging Data carry out differentiated control, and specific method includes:
When a new public data of generation, its acquiescence is divided into the 0th grade, every a period of time T, if the disclosure Data are not visited within the time cycle, and its current level is less than n, then the rank of the disclosure data rises one Level, wherein T is a predefined time threshold;
If the disclosure data are accessed within the time cycle, the rank of the disclosure data is reduced, if the disclosure data Current rank is m, and the time gap that its last time the reduces rank current time is t, and its last time is dropped when reducing rank Low K0Individual rank, if the disclosure data were not lowered rank also, t is set to be equal to the disclosure data generation time interval From current time and K0=0;Thus the rank K that this needs of calculating the disclosure data reduce, i.e.,
If (m-K) >=0, the rank for setting the disclosure data is m-K, and the rank for otherwise setting the disclosure data is 0.
6. according to the method for claim 5, it is characterised in that application can obtain rank by network from remote server Quantity and conversation strategy at different levels.
7. according to the method described in claim 5-6 any one, it is characterised in that n=9.
8. according to the method described in claim 5-7 any one, it is characterised in that the 0th grade of data are without any processing, only Preserve initial data.
9. according to the method described in claim 5-8 any one, it is characterised in that n-th grade of data are deleted after expired, mistake Time phase is defined by n-th grade of conversation strategy.
10. according to the method described in claim 5-9 any one, it is characterised in that the 1st grade to (n-1)th grade of data preserve Strategy is:It is compressed using different compression algorithms, or is compressed using the different compression levels of same compression algorithm.
CN201710828221.1A 2017-09-14 2017-09-14 Mobile terminal warehouse-splitting caching method Active CN107580060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710828221.1A CN107580060B (en) 2017-09-14 2017-09-14 Mobile terminal warehouse-splitting caching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710828221.1A CN107580060B (en) 2017-09-14 2017-09-14 Mobile terminal warehouse-splitting caching method

Publications (2)

Publication Number Publication Date
CN107580060A true CN107580060A (en) 2018-01-12
CN107580060B CN107580060B (en) 2020-10-30

Family

ID=61033406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710828221.1A Active CN107580060B (en) 2017-09-14 2017-09-14 Mobile terminal warehouse-splitting caching method

Country Status (1)

Country Link
CN (1) CN107580060B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11379471B1 (en) * 2019-09-26 2022-07-05 Apple Inc. Hierarchical datastore for an agent

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996037846A1 (en) * 1995-05-22 1996-11-28 Syncronys Softcorp Virtual memory management system with adaptive knowledge base
JPH09305451A (en) * 1996-05-17 1997-11-28 Nec Corp Data management method and system for collection and distribution processing
CN102843363A (en) * 2012-08-09 2012-12-26 鸿富锦精密工业(深圳)有限公司 Network data secure storage system and method
CN103914516A (en) * 2014-02-25 2014-07-09 深圳市中博科创信息技术有限公司 Method and system for layer-management of storage system
CN104598495A (en) * 2013-10-31 2015-05-06 南京中兴新软件有限责任公司 Hierarchical storage method and system based on distributed file system
CN105138564A (en) * 2015-07-23 2015-12-09 小米科技有限责任公司 Data file reading method and apparatus
CN105183389A (en) * 2015-09-15 2015-12-23 北京金山安全软件有限公司 Data hierarchical management method and device and electronic equipment
CN105553968A (en) * 2015-12-11 2016-05-04 北京奇虎科技有限公司 Method and device for realizing login by multiple accounts
CN106980519A (en) * 2017-03-29 2017-07-25 联想(北京)有限公司 A kind of data processing method and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996037846A1 (en) * 1995-05-22 1996-11-28 Syncronys Softcorp Virtual memory management system with adaptive knowledge base
JPH09305451A (en) * 1996-05-17 1997-11-28 Nec Corp Data management method and system for collection and distribution processing
CN102843363A (en) * 2012-08-09 2012-12-26 鸿富锦精密工业(深圳)有限公司 Network data secure storage system and method
CN104598495A (en) * 2013-10-31 2015-05-06 南京中兴新软件有限责任公司 Hierarchical storage method and system based on distributed file system
CN103914516A (en) * 2014-02-25 2014-07-09 深圳市中博科创信息技术有限公司 Method and system for layer-management of storage system
CN105138564A (en) * 2015-07-23 2015-12-09 小米科技有限责任公司 Data file reading method and apparatus
CN105183389A (en) * 2015-09-15 2015-12-23 北京金山安全软件有限公司 Data hierarchical management method and device and electronic equipment
CN105553968A (en) * 2015-12-11 2016-05-04 北京奇虎科技有限公司 Method and device for realizing login by multiple accounts
CN106980519A (en) * 2017-03-29 2017-07-25 联想(北京)有限公司 A kind of data processing method and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王海艳等: "基于HBase数据分类的压缩策略选择方法", 《道客巴巴》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11379471B1 (en) * 2019-09-26 2022-07-05 Apple Inc. Hierarchical datastore for an agent

Also Published As

Publication number Publication date
CN107580060B (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN109362064A (en) The task buffer allocation strategy based on MEC in mobile edge calculations network
US9276967B2 (en) System and method for determining optimal bandwidth for streaming to a client device in an adjustable bit rate video system
CN106851731B (en) A kind of D2D cache allocation method maximizing unloading probability
CN103744618B (en) Realize the method and system of the shared storage of team
CN101442558B (en) Method and system for providing index service for P2SP network
Agarwala et al. iCostale: adaptive cost optimization for storage clouds
CN101635734A (en) Method and device for storing and managing downloaded data on non-volatile storage medium
CN109640116A (en) The coding method of cloud mobile phone network video and server
CN103945430A (en) Mobile terminal type recommending method and device
CN101917513A (en) Method and device for implementing graded display of privacy information
CN106021126B (en) Cache data processing method, server and configuration equipment
CN108848082A (en) Data processing method, device, storage medium and computer equipment
CN104518981A (en) Flow control method and device
CN103929484A (en) Method and device for integrating individual resources for users
CN105681380B (en) Client off-line method and its system
CN107196949A (en) The system for limiting same user account registration terminal quantity
CN107580060A (en) Banked cache method is divided in a kind of mobile terminal
He et al. Edge QoE: Intelligent big data caching via deep reinforcement learning
Kaafar et al. On the potential of recommendation technologies for efficient content delivery networks
CN101867946A (en) Network flow calculation method of mobile phone client
CN105764127B (en) A kind of method sending data and a kind of mobile terminal
CN105959304A (en) Frame rate adjustment method and device
CN103812940A (en) Centralized management method for cluster sessions
CN111565144A (en) Data layered storage management method for instant communication tool
CN104166820B (en) A kind of data managing method and system

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
GR01 Patent grant
GR01 Patent grant