CN108874304A - A kind of regular configuration method and device of caching system - Google Patents

A kind of regular configuration method and device of caching system Download PDF

Info

Publication number
CN108874304A
CN108874304A CN201810276686.5A CN201810276686A CN108874304A CN 108874304 A CN108874304 A CN 108874304A CN 201810276686 A CN201810276686 A CN 201810276686A CN 108874304 A CN108874304 A CN 108874304A
Authority
CN
China
Prior art keywords
data
caching
rule
regular
caching system
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
CN201810276686.5A
Other languages
Chinese (zh)
Other versions
CN108874304B (en
Inventor
邵明星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810276686.5A priority Critical patent/CN108874304B/en
Publication of CN108874304A publication Critical patent/CN108874304A/en
Application granted granted Critical
Publication of CN108874304B publication Critical patent/CN108874304B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides the regular configuration method and device of a kind of caching system, this method and device are specially to judge in caching system with the presence or absence of caching rule;If it is present carrying out Data Matching from caching system according to caching rule;If it does not exist, then obtaining data and regular data from outside;Data and regular data are stored in caching system.It may be implemented to automatically update the caching rule in caching system by the above process, also with regard to artificially being configured without again regular to caching, to reduce development cost.

Description

A kind of regular configuration method and device of caching system
Technical field
The present invention relates to network technique fields, more particularly to the regular configuration method and device of a kind of caching system.
Background technique
Caching technology refers to that the Web content that will need frequently to access is stored in, access speed relatively close from user and is faster In system, to improve the access speed of Web content.Caching system is exactly the server system for storing frequently access content, can It provides and preferably accesses effect than Web content to be placed on Web server.
In existing caching system, if the parameter that the access result of data source is depended on changes, it is necessary to hand Dynamic adjustment cached configuration, then redeploys operation, to need biggish development cost again.For example, data source is asked It asks in parameter comprising tetra- parameters of A, B, C, D, returning the result when initial only need to be related to A, B two parameter, only needs root in caching It is matched according to A, B parameter;Thereafter necessary if it is related to A, B, C to return the result needs when data source adjustable strategies To caching modification configuration, modifies to A, B, C parameter, then redeploy operation.
Summary of the invention
In view of this, the present invention provides the regular configuration method and device of a kind of caching system, to solve existing caching The higher problem of the development cost of system.
To solve the above-mentioned problems, the invention discloses a kind of regular configuration methods of caching system, which is characterized in that tool Body includes the following steps:
Judge in the caching system with the presence or absence of caching rule;
If there is the caching rule, then Data Matching is carried out from caching system according to the caching rule;
If there is no the caching rule, then data and regular data are obtained from outside;
The data and the regular data are stored in the caching system.
Optionally, described that the data and the regular data are stored in the caching system, including:
Judge whether to need to update caching rule;
If so, being then updated to regular data, and updated regular data is stored in the caching system.
Optionally, described, Data Matching is carried out from caching system according to the caching rule, including:
It fetches from the caching system evidence;
The data are transformed to Hash codes according to the caching rule;
The Hash codes are matched according to the caching rule;
Such as successful match, then matching value is returned;
If it fails to match, then execute described from outside acquisition data and regular data step.
A kind of regular configuration device of caching system is additionally provided, is specifically included:
Regular judgment module, for judging in the caching system with the presence or absence of caching rule;
Data match module, for regular if there is the caching, then according to the caching rule from caching system Carry out Data Matching;
Data acquisition module, for if there is no the caching rule, then obtaining data and regular data from outside;
Data memory module, for the data and the regular data to be stored in the caching system.
Optionally, the data memory module includes:
Condition judgment unit needs to update caching rule for judging whether;
Updated regular data for if so, be then updated to regular data, and is stored in institute by first processing units State caching system.
Optionally, the data match module includes:
Data cell is taken, for evidence of fetching from the caching system;
Transcoding unit, for the data to be transformed to Hash codes according to the caching rule;
Code matches unit, for being matched according to the caching rule to the Hash codes, such as failure then controls institute Data acquisition module is stated to execute from outside acquisition data and regular data operation;
Numerical value return unit then returns to matching value for such as successful match.
It can be seen from the above technical proposal that the present invention provides the regular configuration method and device of a kind of caching system, This method and device are specially to judge in the caching system with the presence or absence of caching rule;If it is present according to caching rule Data Matching is carried out from caching system;If it does not exist, then obtaining data and regular data from outside;By data and regular number According to the deposit caching system.It may be implemented to automatically update the caching rule in caching system by the above process, With regard to artificially being configured without again regular to caching, to reduce development cost.
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 a kind of step flow chart of the regular configuration method of caching system provided in an embodiment of the present invention;
Fig. 2 is a kind of structural block diagram of the regular configuration device of caching system provided in an embodiment of the present invention.
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.
Embodiment one
Fig. 1 is a kind of step flow chart of the regular configuration method of caching system provided in an embodiment of the present invention.
Shown in referring to Fig.1, rule configuration method provided in this embodiment is applied to buffer system, for buffer system Buffering rule is automatically configured, and specific rules configuration method includes the steps that following:
S101:Judge in caching system with the presence or absence of caching rule.
When i.e. external system carries out data search and matching into caching system, obtained from caching system first wherein pre- The caching rule and corresponding data set, to determine whether to exist corresponding caching rule.And according to whether exist corresponding Caching rule execute corresponding operation.Here caching rule refers to carries out data search, matching or acquisition in caching system Specific rules, such as look only for data relevant to A, B parameter, at this moment need to only configure two parameters of A, B;If search with A, B, The relevant data of C parameter then need to reconfigure A, B, C parameter.
S102:If it is present carrying out Data Matching from caching system according to caching rule.
I.e. if can from caching system successfully obtain caching rule, according to the caching rule from caching system into Row data search or Data Matching.The detailed process of data search or Data Matching is carried out such as from caching system in the application Under:
Firstly, evidence of fetching from caching system;Then, the data got will be converted into Kazakhstan according to the caching rule of acquisition Uncommon code (HashCode);Hash codes are matched according to caching rule after again;Matching value is returned if successful match;If Failure then performs the next step suddenly, i.e., obtains regular data from outside.Obtaining regular data from outside may include by preset path It obtains corresponding regular data or passively receives external incoming regular data.
S103:If it does not exist, then obtaining data and regular data from outside.
I.e. if respective cache rule cannot be obtained from caching system, data and regular data are obtained from outside, it should Caching rule of the regular data for the caching system is provided, i.e., wherein defines the caching rule of caching system.This step Suddenly following operation is specifically included:
First, it is determined that whether caching rule changes;If changed, regular data is updated, and will be updated Data cached deposit caching system afterwards, so-called update, which refers to, covers new regular data original regular data, due to new Regular data define new caching rule, to enable system when carrying out data buffer storage with new caching rule progress Operation;On the contrary, if do not changed, data and regular data the deposit caching system that directly will acquire, and the rule for keeping this new Then data are in down state.
S104:Data and regular data are stored in caching system.
After getting corresponding regular data from outside, which is stored in the caching system, so as to user's energy Enough caching systems when carrying out request of data carry out data search or data according to the caching rule of the regular data defined Match.
It can be seen from the above technical proposal that present embodiments providing a kind of regular configuration method of caching system, the party Method is specially to judge in caching system with the presence or absence of caching rule;If at presence, according to caching rule from caching system Carry out Data Matching;If it does not exist, then obtaining data and regular data from outside;By data and regular data deposit caching system System.It may be implemented to automatically update the caching rule in caching system by the above process, also just without again to caching Rule is artificially configured, to reduce development cost.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according to According to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implemented Necessary to example.
Embodiment two
Fig. 2 is a kind of structural block diagram of the regular configuration device of caching system provided in an embodiment of the present invention.
Referring to shown in Fig. 2, rule configuration device provided in this embodiment is applied to caching system, for buffer system Caching rule is automatically configured, and specific rules configuration device is obtained including regular judgment module 10, data match module 20, data Modulus block 30 and data memory module 40.
Regular judgment module is for judging in caching system with the presence or absence of caching rule.
When i.e. external system carries out data search and matching into caching system, obtained from buffer system first wherein pre- The data and caching rule set, to determine whether to exist corresponding caching rule.And according to whether there is corresponding caching Rule executes corresponding operation.
If for there is caching rule in data match module, according to caching rule from caching system in caching system Carry out Data Matching.
I.e. if can from caching system successfully obtain caching rule, according to the caching rule from caching system into Row data search or Data Matching.The module includes taking data cell 21, transcoding unit 22,23 and of code matches unit Numerical value return unit 24.
Take data cell for evidence of fetching from caching system;Transcoding unit is used for will be according to the caching rule of acquisition The data got are converted into Hash codes (HashCode);Code matches unit is used for according to caching rule to Hash codes progress Match, is performed the next step if failure suddenly, i.e., obtain regular data from outside;Numerical value return unit is used for if successful match Return to matching value.
If data acquisition module is for, there is no rule is cached, obtaining data and rule number from outside in caching system According to.
I.e. if respective cache rule cannot be obtained from caching system, data and regular data are obtained from outside, it should Caching rule of the regular data for the caching system is provided, i.e., wherein defines the caching rule of caching system.The mould Block includes that condition judgment unit 31, first handles odd numbers 32 and the second processing unit 33.
Condition judgment unit needs to update caching rule for judging whether;First processing units are used for if necessary to update Caching rule, then be updated regular data, and by updated data cached deposit caching system;The second processing unit is then For if you do not need to updating caching rule, then the regular data that directly will acquire to be stored in caching system.
Data memory module is used to data and regular data being stored in caching system.
After getting corresponding regular data from outside, which is stored in the caching system, so as to user's energy Enough caching systems when carrying out request of data carry out data search or data according to the caching rule of the regular data defined Match.
It can be seen from the above technical proposal that present embodiments providing a kind of regular configuration method of caching system, the party Method is specially to judge in caching system with the presence or absence of caching rule;If it is present according to caching rule from caching system into Row Data Matching;If it does not exist, then obtaining data and regular data from outside;By data and regular data deposit caching system System.It may be implemented to automatically update the caching rule in caching system by the above process, also just without again to caching Rule is artificially configured, to reduce development cost.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Technical solution provided by the present invention is described in detail above, specific case used herein is to this hair Bright principle and embodiment is expounded, method of the invention that the above embodiments are only used to help understand and its Core concept;At the same time, for those skilled in the art, according to the thought of the present invention, in specific embodiment and application There will be changes in range, in conclusion the contents of this specification are not to be construed as limiting the invention.

Claims (6)

1. a kind of regular configuration method of caching system, which is characterized in that specifically comprise the following steps:
Judge in the caching system with the presence or absence of caching rule;
If there is the caching rule, then Data Matching is carried out from caching system according to the caching rule;
If there is no the caching rule, then data and regular data are obtained from outside;
The data and the regular data are stored in the caching system.
2. rule configuration method as described in claim 1, which is characterized in that described to deposit the data and the regular data Enter the caching system, including:
Judge whether to need to update caching rule;
If so, being then updated to regular data, and updated regular data is stored in the caching system.
3. rule configuration method as described in claim 1, which is characterized in that described to be then from caching according to the caching rule Data Matching is carried out in system, including:
It fetches from the caching system evidence;
The data are transformed to Hash codes according to the caching rule;
The Hash codes are matched according to the caching rule;
Such as successful match, then matching value is returned;
If it fails to match, then execute described from outside acquisition data and regular data step.
4. a kind of regular configuration device of caching system, which is characterized in that specifically include:
Regular judgment module, for judging in the caching system with the presence or absence of caching rule;
Data match module, for if there is the caching rule, then being carried out from caching system according to the caching rule Data Matching;
Data acquisition module, for if there is no the caching rule, then obtaining data and regular data from outside;
Data memory module, for the data and the regular data to be stored in the caching system.
5. rule configuration device as claimed in claim 4, which is characterized in that the data memory module includes:
Condition judgment unit needs to update caching rule for judging whether;
First processing units, for if so, be then updated to regular data, and the deposit of updated regular data is described slow Deposit system.
6. rule configuration device as claimed in claim 4, which is characterized in that the data match module includes:
Data cell is taken, for evidence of fetching from the caching system;
Transcoding unit, for the data to be transformed to Hash codes according to the caching rule;
Code matches unit, for being matched according to the caching rule to the Hash codes, such as failure then controls the number It executes according to module is obtained from outside acquisition data and regular data operation;
Numerical value return unit then returns to matching value for such as successful match.
CN201810276686.5A 2018-03-30 2018-03-30 Rule configuration method and device of cache system Active CN108874304B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810276686.5A CN108874304B (en) 2018-03-30 2018-03-30 Rule configuration method and device of cache system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810276686.5A CN108874304B (en) 2018-03-30 2018-03-30 Rule configuration method and device of cache system

Publications (2)

Publication Number Publication Date
CN108874304A true CN108874304A (en) 2018-11-23
CN108874304B CN108874304B (en) 2021-06-22

Family

ID=64326432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810276686.5A Active CN108874304B (en) 2018-03-30 2018-03-30 Rule configuration method and device of cache system

Country Status (1)

Country Link
CN (1) CN108874304B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968603A (en) * 2019-11-29 2020-04-07 中国银行股份有限公司 Data access method and device
CN111488179A (en) * 2019-01-28 2020-08-04 上海哔哩哔哩科技有限公司 Rule system and construction method thereof, business system and application method thereof
CN112783909A (en) * 2021-01-29 2021-05-11 平安普惠企业管理有限公司 Data updating method and device, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6347358B1 (en) * 1998-12-22 2002-02-12 Nec Corporation Disk control unit and disk control method
CN102096712A (en) * 2011-01-28 2011-06-15 深圳市五巨科技有限公司 Method and device for cache-control of mobile terminal
CN102902730A (en) * 2012-09-10 2013-01-30 新浪网技术(中国)有限公司 Method and device for reading data based on data cache
CN103019964A (en) * 2012-12-24 2013-04-03 北京搜狐新媒体信息技术有限公司 Cache data access method and data cache system
CN103763371A (en) * 2014-01-21 2014-04-30 深圳市脉山龙信息技术股份有限公司 Method for dynamically controlling mobile end application cache

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6347358B1 (en) * 1998-12-22 2002-02-12 Nec Corporation Disk control unit and disk control method
CN102096712A (en) * 2011-01-28 2011-06-15 深圳市五巨科技有限公司 Method and device for cache-control of mobile terminal
CN102902730A (en) * 2012-09-10 2013-01-30 新浪网技术(中国)有限公司 Method and device for reading data based on data cache
CN103019964A (en) * 2012-12-24 2013-04-03 北京搜狐新媒体信息技术有限公司 Cache data access method and data cache system
CN103763371A (en) * 2014-01-21 2014-04-30 深圳市脉山龙信息技术股份有限公司 Method for dynamically controlling mobile end application cache

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488179A (en) * 2019-01-28 2020-08-04 上海哔哩哔哩科技有限公司 Rule system and construction method thereof, business system and application method thereof
CN110968603A (en) * 2019-11-29 2020-04-07 中国银行股份有限公司 Data access method and device
CN110968603B (en) * 2019-11-29 2023-07-04 中国银行股份有限公司 Data access method and device
CN112783909A (en) * 2021-01-29 2021-05-11 平安普惠企业管理有限公司 Data updating method and device, terminal equipment and storage medium
CN112783909B (en) * 2021-01-29 2023-09-26 宁夏航天信息有限公司 Data updating method, device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN108874304B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
KR102377347B1 (en) Blockchain-based data processing method and device
CN107196900A (en) A kind of method and device for verification of knowing together
US20190296916A1 (en) Method and apparatus for verifying block data in a blockchain
CN108874304A (en) A kind of regular configuration method and device of caching system
CN107395659A (en) A kind of method and device of service handling and common recognition
CN107451181A (en) Page rendering method and apparatus
CN107450903A (en) A kind of information processing method and device
US9495417B2 (en) Dynamic rules to optimize common information model queries
WO2015149644A1 (en) Intelligent file pre-fetch based on access patterns
CN109905293A (en) A kind of terminal device recognition methods, system and storage medium
CN102970284A (en) User information processing method and server
JP2013137661A5 (en)
CN104346345A (en) Data storage method and device
CN106933817B (en) Content query method, device and system based on B/S structure
CN109346079A (en) Voice interactive method and device based on Application on Voiceprint Recognition
CN107220376A (en) A kind of data query method and apparatus
CN105224541B (en) Uniqueness control method, information storage means and the device of data
CN110011838B (en) Real-time tracking method for PageRank value of dynamic network
CN106598747A (en) Network data package parallel processing method and device
CN115129831A (en) Data processing method and device, electronic equipment and computer storage medium
CN105488174B (en) More distributed data power supply management methods and system based on BS structures
CN103902554B (en) Data access method and device
CN106372267A (en) Page loading method and page loading device based on browser
CN116167099A (en) Data access method and block link point in block chain system
CN109284828A (en) A kind of hyper parameter tuning method, device and equipment

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