CN105824902A - Data caching method and device - Google Patents

Data caching method and device Download PDF

Info

Publication number
CN105824902A
CN105824902A CN201610144902.1A CN201610144902A CN105824902A CN 105824902 A CN105824902 A CN 105824902A CN 201610144902 A CN201610144902 A CN 201610144902A CN 105824902 A CN105824902 A CN 105824902A
Authority
CN
China
Prior art keywords
data
data cached
time
client
cached
Prior art date
Application number
CN201610144902.1A
Other languages
Chinese (zh)
Inventor
刘德伟
Original Assignee
乐视网信息技术(北京)股份有限公司
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 乐视网信息技术(北京)股份有限公司 filed Critical 乐视网信息技术(北京)股份有限公司
Priority to CN201610144902.1A priority Critical patent/CN105824902A/en
Publication of CN105824902A publication Critical patent/CN105824902A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/172Caching, prefetching or hoarding of files

Abstract

The invention discloses a data caching method and device. The data caching method comprises the following steps: after caching data is generated, according to each client, in accordance with the behavior data of the caching data, determining the deletion prolonged time of the caching data; according to the pre-determined deletion time and the deletion prolonged time, determining actual deletion time of the caching data, and after the actual deletion time is achieved, deleting the caching data. According to the scheme disclosed by the invention, corresponding actual deletion time can be set for the caching data, and after the actual deletion time is achieved, the corresponding caching data is deleted, so that the occupation of a caching space is reduced, and the waste of hardware resources is reduced.

Description

A kind of data cache method and device

Technical field

The present embodiments relate to Internet technical field, particularly relate to a kind of data cache method and device.

Background technology

Along with the development of Internet technology, increasing user obtains information needed by the Internet.Wherein, as shown in the schematic network structure of Fig. 1, all kinds client 100 is connected with server 200 by the Internet, and server, according to the demand of each client, can feed back corresponding information, so that the user of client-side obtains self required information.

It addition, server is after determining the information that client needs, it will usually produce the most data cached, and this data cached is stored to spatial cache.In this case, when client needs acquisition information, relevant data cached of this information can be searched from spatial cache, and by the described information of data cached acquisition found.If it addition, not memory buffers data in spatial cache, then client needs to access the databases of server, searches related data from described databases.The speed of service of spatial cache is often fast than databases, therefore, stores data cached to spatial cache, tends to make server realize high-speed cruising, and alleviates the access pressure to databases.Such as, if user needs to browse video interested, server can produce corresponding video cache data according to the demand of user, these video cache data are stored to spatial cache, when user needs again to browse this video, then can search these video cache data of acquisition in described spatial cache, and by this corresponding video of video cache data acquisition.

But, inventor finds in the research process of the application, and when using prior art to carry out data buffer storage, data cached meeting takies a large amount of spatial cache, expends hardware resource.

Summary of the invention

For overcoming problem present in correlation technique, the embodiment of the present invention provides a kind of data cache method and device.

In order to solve above-mentioned technical problem, the embodiment of the invention discloses following technical scheme:

First aspect according to embodiments of the present invention, it is provided that a kind of data cache method, including:

After generation is data cached, gather each client for described data cached behavioral data;

According to described behavioral data, determine that described data cached deletion extends the time;

Extend the time according to predetermined erasing time and described deletion, determine described data cached actual erasing time, and after arriving described actual erasing time, delete described data cached.

Second aspect according to embodiments of the present invention, it is provided that a kind of data buffer storage device, including:

Behavioral data acquisition module, for, after generation is data cached, gathering each client for described data cached behavioral data;

The prolongation time determines module, for according to described behavioral data, determines that described data cached deletion extends the time;

Removing module, for extending the time according to predetermined erasing time and described deletion, determines described data cached actual erasing time, and after arriving described actual erasing time, deletes described data cached.

The technical scheme that embodiments of the invention provide can include following beneficial effect:

Disclosure one data cache method and device.By the scheme of the application, for each data cached actual erasing time accordingly that arranges, and after the arrival of actual erasing time, can delete the most data cached, thus reduce taking of spatial cache, reduce the waste of hardware resource.

It should be appreciated that it is only exemplary and explanatory that above general description and details hereinafter describe, the present invention can not be limited.

Accompanying drawing explanation

Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet embodiments of the invention, and for explaining the principle of the present invention together with description.

Fig. 1 is according to a kind of schematic network structure shown in prior art;

Fig. 2 is the workflow schematic diagram according to a kind of data cache method shown in the present invention one exemplary embodiment;

Fig. 3 is the structural representation according to a kind of data buffer storage device shown in the present invention one exemplary embodiment.

Detailed description of the invention

Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.When explained below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the present invention.On the contrary, they only with describe in detail in appended claims, the present invention some in terms of the example of consistent apparatus and method.

Disclosure one data cache method and device, to solve in prior art, data cached take a large amount of spatial cache, the problem expending hardware resource.

The open a kind of data cache method of embodiments herein one.Workflow schematic diagram shown in Figure 2, described data cache method comprises the following steps:

Step S11, produce data cached after, gather each client for described data cached behavioral data.

Step S12, according to described behavioral data, determine that described data cached deletion extends the time.

Step S13, extend the time according to predetermined erasing time and described deletion, determine described data cached actual erasing time, and after arriving described actual erasing time, delete described data cached.

Wherein, generally predetermined erasing time and described deletion are prolonged long time sum, as described data cached actual erasing time.Such as, if the data cached predetermined erasing time presetting video corresponding is 15 days, according to described behavioral data, determine that this data cached deletion prolongation time is 3 days, then this data cached actual erasing time is 18 days.

Step S11 of the application is to the open a kind of data cache method of step S13, in the method, after generation is data cached, according to each client for described data cached behavioral data, determine that data cached deletion extends the time, and extend the time according to predetermined erasing time and described deletion, determine described data cached actual erasing time, after arriving described actual erasing time, delete described data cached.With it, for each data cached actual erasing time accordingly that arranges, and after the arrival of actual erasing time, can delete the most data cached, thus reduce taking of spatial cache, and reduce the waste of hardware resource.

Server is generally connected with multiple clients by the Internet such that it is able to obtain each client for described data cached behavioral data.Wherein, described according to described behavioral data, determine that described data cached deletion extends the time, including: according to described behavioral data, determine described data cached desirability;According to described data cached desirability, determine that described data cached deletion extends the time.Under normal circumstances, desirability is the highest, and it is the longest that described data cached deletion extends the time.

Further, in data cache method disclosed in the present application, described behavioral data include following at least one: for the accumulative number of visits of the information of described data cached correspondence;The accumulative browsing time for the information of described data cached correspondence;The demand label that described client is arranged.It addition, described behavioral data can also be other kinds of behavioral data, this is not limited by the application.

According to the difference of described behavioral data, in the application, described data cached deletion extends the time to use different methods to determine.

Wherein, if the accumulative number of visits that described behavioral data is the information for described data cached correspondence, described according to described behavioral data, determine that described data cached deletion extends the time, including:

Search the accumulative number of visits preset and prolong long corresponding relation with deletion, and determine that described data cached deletion extends the time according to described corresponding relation.

In the method, need to preset accumulative number of visits and prolong long corresponding relation with deletion.Wherein, the accumulative browsing time is the longest, often shows that the desirability of this information is the highest, in this case, needs the deletion for this data cached setting is longer to extend the time.

Such as, if by the behavioral data collected, determining that the accumulative number of visits of film A is 1000 times, and the accumulative number of visits of film B is 2000 times, then the desirability of explanation film B is higher, and in this case, it is longer that the deletion of the data cached setting of film B extends the time.

Additionally, if the accumulative browsing time that described behavioral data is the information for described data cached correspondence, described according to described behavioral data, determine that described data cached deletion extends the time, including: search the accumulative browsing time preset and long corresponding relation is prolonged in deletion, and determine that described data cached deletion extends the time according to described corresponding relation.

Such as, if customer end A, customer end B and client C have all browsed the first information, and three clients are 10 minutes to the accumulative browsing time of this information, can set data cached deletion corresponding to this information and extend the time as 1 day;Additionally, if customer end A, customer end B and client C have all browsed the second information, and three clients are 20 minutes to the accumulative browsing time of this information, then illustrate that the desirability of the second information is higher, data cached deletion corresponding to this information can be set and extend the time as 2 days.

If it addition, described behavioral data is the demand label that described client is arranged, described according to described behavioral data, determine that described data cached deletion extends the time, including:

First, the described demand label arranged according to each client, obtain described data cached demand levels;

Then, prolong long corresponding relation and described data cached demand levels according to default demand levels with deleting, determine that described data cached deletion extends the time.

Described demand label, when browsing information, according to the desirability of information arranges self corresponding demand label, and can be transmitted to server by each client.Such as, the labels such as the first demand, the second demand and the 3rd demand can be set, and the demand levels of each demand tag characterization is incremented by successively.

After collecting the demand label of each client, data cached demand levels can be determined according to multiple default rule.Such as, in the multiple demand labels that can will collect, the highest demand levels characterized is as described data cached demand levels;Or, the demand levels characterized by demand labels most for quantity in same type is as described data cached demand levels.

It addition, in the method, in addition it is also necessary to long corresponding relation is prolonged in preset need grade and deletion, and wherein, demand levels is the highest, and it is the longest that described data cached deletion extends the time.

Certainly, in this application, it is also possible to comprehensively according to above-mentioned three behaviors data or any two kinds of behavioral datas, to determine the deletion prolongation time, this is not limited by the application.

Further, described data cache method disclosed in the present application also includes: after arriving described actual erasing time, information is deleted to client transmissions, and determine the need for deleting described data cached according to the feedback information of described client, perform the most again to delete described data cached operation.

In order to avoid data cached mistake is deleted, in the application, delete described data cached before, server can delete information to each client transmissions.Each client, after receiving described deletion information, judges whether to need to delete described data cached, it is generally the case that if client no longer browses this information according to self-demand, it is determined that need to delete described data cached.

In this case, the described feedback information according to described client determines the need for deleting described data cached, including: if the feedback information of described client shows that the client of more than preset ratio is agreed to delete, determine need to delete described data cached.Otherwise, do not delete described data cached, and after preset time period, again delete information to client transmissions, until determining according to the feedback information of described client and needing to delete described data cached, then perform to delete described data cached operation.

Such as, described preset ratio is 70%, and the feedback information of described client shows that the client of more than 70% is agreed to delete, it is determined that need to delete described data cached.If the feedback information of described client shows that the client of 70% or less than 70% is agreed to delete, then determine need not to delete described data cached, and, can also be after preset time period, again delete information to client transmissions, until determining that the client of more than 70% is agreed to delete according to the feedback information of described client, then perform to delete described data cached operation.

Accordingly, the open a kind of data buffer storage device of the second embodiment of the application, structural representation shown in Figure 3, described data buffer storage device includes: behavioral data acquisition module 110, prolongation time determine module 120 and removing module 130.

Wherein, described behavioral data acquisition module 110, for, after generation is data cached, gathering each client for described data cached behavioral data.

The described prolongation time determines module 120, for according to described behavioral data, determines that described data cached deletion extends the time.

Described removing module 130, for extending the time according to predetermined erasing time and described deletion, determines described data cached actual erasing time, and after arriving described actual erasing time, deletes described data cached.

Generally predetermined erasing time and described deletion are prolonged long time sum, as described data cached actual erasing time.Such as, if data cached predetermined erasing time corresponding to video is 15 days, according to described behavioral data, determining that this data cached deletion extends time is 3 days, then this data cached actual erasing time is 18 days.

Disclosure one data buffer storage device, by this device, data cached can arrange corresponding actual erasing time for each, and after actual erasing time arrives, delete the most data cached, thus reduce taking of spatial cache, and decrease the waste of hardware resource.

Further, the described prolongation time determines that module 120 includes: desirability determines that unit and prolongation time determine that unit, described desirability determine that unit, for according to described behavioral data, determines described data cached desirability;The described prolongation time determines that unit, for according to described data cached desirability, determines that described data cached deletion extends the time.

In this application, described behavioral data include following at least one:

Accumulative number of visits for the information of described data cached correspondence;

The accumulative browsing time for the information of described data cached correspondence;

The demand label that described client is arranged.

Wherein, if the accumulative number of visits that described behavioral data is the information for described data cached correspondence, the described prolongation time determines that module includes:

First determines unit, prolongs long corresponding relation for searching default accumulative number of visits and deletion, and determines that described data cached deletion extends the time according to described corresponding relation.

If it addition, the accumulative browsing time that described behavioral data is the information for described data cached correspondence, the described prolongation time determines that module includes:

Second determines unit, prolongs long corresponding relation for searching default accumulative browsing time and deletion, and determines that described data cached deletion extends the time according to described corresponding relation.

It addition, if described behavioral data is the demand label that described client is arranged, the described prolongation time determines that module includes:

Demand levels acquiring unit, for the described demand label arranged according to each client, obtains described data cached demand levels;

3rd determines unit, for prolonging long corresponding relation and described data cached demand levels according to the demand levels preset with deleting, determines that described data cached deletion extends the time.

Described demand label, when browsing information, according to the desirability of information arranges self corresponding demand label, and can be transmitted to server by each client.Such as, the labels such as the first demand, the second demand and the 3rd demand can be set, and the demand levels of each demand tag characterization is incremented by successively.

After collecting the demand label of each client, data cached demand levels can be determined according to multiple default rule.Such as, in the multiple demand labels that can will collect, the highest demand levels characterized is as described data cached demand levels;Or, the demand levels characterized by demand labels most for quantity in same type is as described data cached demand levels.

Further, described data buffer storage device also includes:

Communication module, for arriving after described actual erasing time, to client transmissions deletion information, and determine the need for deleting described data cached according to the feedback information of described client, trigger described removing module the most again to perform to delete described data cached operation.

Wherein, described communication module comprises determining that unit, if showing that the client of more than preset ratio is agreed to delete for the feedback information of described client, determine need to delete described data cached.

About the device in above-described embodiment, the concrete mode that wherein modules performs to operate has been described in detail in about the embodiment of the method, and explanation will be not set forth in detail herein.

Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other embodiments of the present invention.The application is intended to any modification, purposes or the adaptations of the present invention, and these modification, purposes or adaptations are followed the general principle of the present invention and include the undocumented common knowledge in the art of the present invention or conventional techniques means.Description and embodiments is considered only as exemplary, and true scope and spirit of the invention are pointed out by claim below.

It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and various modifications and changes can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.

Claims (10)

1. a data cache method, it is characterised in that including:
After generation is data cached, gather each client for described data cached behavioral data;
According to described behavioral data, determine that described data cached deletion extends the time;
Extend the time according to predetermined erasing time and described deletion, determine described data cached actual erasing time, and after arriving described actual erasing time, delete described data cached.
Data cache method the most according to claim 1, it is characterised in that described according to described behavioral data, determines that described data cached deletion extends the time, including:
According to described behavioral data, determine described data cached desirability;
According to described data cached desirability, determine that described data cached deletion extends the time.
Data cache method the most according to claim 1, it is characterised in that described behavioral data include following at least one:
Accumulative number of visits for the information of described data cached correspondence;
The accumulative browsing time for the information of described data cached correspondence;
The demand label that described client is arranged.
4. according to the data cache method described in any one of claims 1 to 3, it is characterised in that described data cache method also includes:
Arriving after described actual erasing time, delete information to client transmissions, and determine the need for deleting according to the feedback information of described client described data cached, perform the described data cached operation of deletion the most again.
Data cache method the most according to claim 4, it is characterised in that the described feedback information according to described client determines the need for deleting described data cached, including:
If the feedback information of described client shows that the client of more than preset ratio is agreed to delete, determine need to delete described data cached.
6. a data buffer storage device, it is characterised in that including:
Behavioral data acquisition module, for, after generation is data cached, gathering each client for described data cached behavioral data;
The prolongation time determines module, for according to described behavioral data, determines that described data cached deletion extends the time;
Removing module, for extending the time according to predetermined erasing time and described deletion, determines described data cached actual erasing time, and after arriving described actual erasing time, deletes described data cached.
Data buffer storage device the most according to claim 6, it is characterised in that the described prolongation time determines that module includes:
Desirability determines unit, for according to described behavioral data, determines described data cached desirability;
The prolongation time determines unit, for according to described data cached desirability, determines that described data cached deletion extends the time.
Data buffer storage device the most according to claim 6, it is characterised in that described behavioral data include following at least one:
Accumulative number of visits for the information of described data cached correspondence;
The accumulative browsing time for the information of described data cached correspondence;
The demand label that described client is arranged.
9. according to the data buffer storage device described in any one of claim 6 to 8, it is characterised in that described data buffer storage device also includes:
Communication module, for arriving after described actual erasing time, to client transmissions deletion information, and determine the need for deleting described data cached according to the feedback information of described client, trigger described removing module the most again to perform to delete described data cached operation.
Data buffer storage device the most according to claim 9, it is characterised in that described communication module includes:
Determine unit, if showing that the client of more than preset ratio is agreed to delete for the feedback information of described client, determine need to delete described data cached.
CN201610144902.1A 2016-03-14 2016-03-14 Data caching method and device CN105824902A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610144902.1A CN105824902A (en) 2016-03-14 2016-03-14 Data caching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610144902.1A CN105824902A (en) 2016-03-14 2016-03-14 Data caching method and device

Publications (1)

Publication Number Publication Date
CN105824902A true CN105824902A (en) 2016-08-03

Family

ID=56987200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610144902.1A CN105824902A (en) 2016-03-14 2016-03-14 Data caching method and device

Country Status (1)

Country Link
CN (1) CN105824902A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407448A (en) * 2016-09-29 2017-02-15 广州鹤互联网科技有限公司 Signed file management method and apparatus
CN106484633A (en) * 2016-10-08 2017-03-08 广州华多网络科技有限公司 A kind of data cached method and device
CN106937001A (en) * 2017-04-20 2017-07-07 维沃移动通信有限公司 A kind of audio store method and mobile terminal
WO2019028988A1 (en) * 2017-08-10 2019-02-14 上海壹账通金融科技有限公司 Data processing method, electronic device and computer readable storage medium
WO2019028987A1 (en) * 2017-08-10 2019-02-14 上海壹账通金融科技有限公司 Data processing method, electronic device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133880A (en) * 2014-07-25 2014-11-05 广东睿江科技有限公司 Method and device for setting file cache time
US20140379844A1 (en) * 2001-07-13 2014-12-25 Open Text S.A. System, method and storage medium for managing items within file directory structure
CN104715020A (en) * 2015-02-13 2015-06-17 腾讯科技(深圳)有限公司 Cache data deleting method and server
CN105095107A (en) * 2014-05-04 2015-11-25 腾讯科技(深圳)有限公司 Buffer memory data cleaning method and apparatus
CN105335102A (en) * 2015-10-10 2016-02-17 浪潮(北京)电子信息产业有限公司 Buffer data processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140379844A1 (en) * 2001-07-13 2014-12-25 Open Text S.A. System, method and storage medium for managing items within file directory structure
CN105095107A (en) * 2014-05-04 2015-11-25 腾讯科技(深圳)有限公司 Buffer memory data cleaning method and apparatus
CN104133880A (en) * 2014-07-25 2014-11-05 广东睿江科技有限公司 Method and device for setting file cache time
CN104715020A (en) * 2015-02-13 2015-06-17 腾讯科技(深圳)有限公司 Cache data deleting method and server
CN105335102A (en) * 2015-10-10 2016-02-17 浪潮(北京)电子信息产业有限公司 Buffer data processing method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407448A (en) * 2016-09-29 2017-02-15 广州鹤互联网科技有限公司 Signed file management method and apparatus
CN106484633A (en) * 2016-10-08 2017-03-08 广州华多网络科技有限公司 A kind of data cached method and device
CN106937001A (en) * 2017-04-20 2017-07-07 维沃移动通信有限公司 A kind of audio store method and mobile terminal
WO2019028988A1 (en) * 2017-08-10 2019-02-14 上海壹账通金融科技有限公司 Data processing method, electronic device and computer readable storage medium
WO2019028987A1 (en) * 2017-08-10 2019-02-14 上海壹账通金融科技有限公司 Data processing method, electronic device and computer readable storage medium

Similar Documents

Publication Publication Date Title
US10803017B2 (en) Generating file usage information
US8893011B2 (en) Chronology display and feature for online presentations and webpages
US8332763B2 (en) Aggregating dynamic visual content
CN104424199B (en) searching method and device
US9069843B2 (en) Iterative refinement of search results based on user feedback
US20140297623A1 (en) System to conduct search updates at determined frequency
CN101189608B (en) Systems and methods for analyzing a user's Web history
CN1811757B (en) System and method for locating pages on the world wide web and for locating documents from a network of computers
US7412437B2 (en) System and method for searching and retrieving related messages
US7644110B2 (en) Stream data processing system and stream data processing method
US8555018B1 (en) Techniques for storing data
US9535938B2 (en) Efficient and fault-tolerant distributed algorithm for learning latent factor models through matrix factorization
US8738572B2 (en) System and method for storing data streams in a distributed environment
CN100462972C (en) Document-based information and uniform resource locator (URL) management method and device
US8433705B1 (en) Facet suggestion for search query augmentation
US10803016B2 (en) Predictive models of file access patterns by application and file type
US8560569B2 (en) Method and apparatus for performing bulk file system attribute retrieval
US7895325B2 (en) Server architecture and methods for storing and serving event data
US7292961B2 (en) Capturing session activity as in-memory snapshots using a time-based sampling technique within a database for performance tuning and problem diagnosis
US20190179833A1 (en) Content Resonance
KR100799658B1 (en) Host-based Intelligent Results Related to a Character Stream
US7827166B2 (en) Handling dynamic URLs in crawl for better coverage of unique content
US8005823B1 (en) Community search optimization
US8706710B2 (en) Methods for storing data streams in a distributed environment
KR100462333B1 (en) A search method in a used car search support system

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160803

WD01 Invention patent application deemed withdrawn after publication