Movatterモバイル変換


[0]ホーム

URL:


CN109388656A - Data processing method and system, device and storage medium based on multi-level buffer - Google Patents

Data processing method and system, device and storage medium based on multi-level buffer
Download PDF

Info

Publication number
CN109388656A
CN109388656ACN201811025082.XACN201811025082ACN109388656ACN 109388656 ACN109388656 ACN 109388656ACN 201811025082 ACN201811025082 ACN 201811025082ACN 109388656 ACN109388656 ACN 109388656A
Authority
CN
China
Prior art keywords
caching
data
inquiry
target data
level buffer
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.)
Pending
Application number
CN201811025082.XA
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank CorpfiledCriticalChina Construction Bank Corp
Priority to CN201811025082.XApriorityCriticalpatent/CN109388656A/en
Publication of CN109388656ApublicationCriticalpatent/CN109388656A/en
Pendinglegal-statusCriticalCurrent

Links

Landscapes

Abstract

The invention discloses a kind of data processing methods based on multi-level buffer, which comprises receives data inquiry request;It is inquired step by step in multi-level buffer according to the inquiry request;The target data inquired is returned, and the prime that the target data is backfilled to the caching being currently located is cached.Data are carried out multistage storage by way of backfill by method of the invention, are separated data user and provider and are respectively disposed, meanwhile, it effectively reduces using the pressure caused by data providing server and database when data.

Description

Data processing method and system, device and storage medium based on multi-level buffer
Technical field
The present invention relates to information technology fields, more particularly, it is related to a kind of data processing side based on multi-level bufferMethod and system, equipment and storage medium.
Background technique
Under distributed environment, multiple application components may use multi-class data simultaneously, these data have different answer againUse component as data providing.Currently, an application component generally comprises database, the key in distributed caching can be managedValue.Some data are what application component frequently used, but infrequently changed, can be stored in distributed caching.InquiryThe process of data are as follows: 1. Querying Distributeds cache middle finger fixed number evidence, if hit directly returns;2. first step miss is then inquiredDatabase, if database is hit, returned data, if database miss, direct returned data is not found.Safeguard dataProcess are as follows: 1. more new databases;2. updating distributed caching.
But this method, to the data of different types of, different providers, is not available " slow under distributed environmentDeposit+database " or " memory+caching+database " this mode, because some parameters not in the local database, needData providing inquiry;And data providing is when safeguarding data, if certain data buffer storages are in the local of data userMemory, and can not timely update;Data access path can not configuration, can not dynamically update.
Summary of the invention
In order to solve the above-mentioned problems in the prior art, the present invention provides at a kind of data based on multi-level bufferManage method and system, equipment and storage medium, effectively reduce using when data to data providing server and databaseCaused by pressure.
Embodiment according to the present invention provides a kind of data processing method based on multi-level buffer, the method packetIt includes: receiving data inquiry request;It is inquired step by step in multi-level buffer according to the inquiry request;Return to the number of targets inquiredAccording to, and the prime that the target data is backfilled to the caching being currently located is cached.
In certain embodiments of the present invention, the multi-level buffer includes at least the first caching, the second caching and thirdCaching;It is wherein, described that according to the inquiry request, inquiry includes: according to the inquiry request described step by step in multi-level bufferIt is inquired in first caching;Inquiry is exited if inquiring the target data in first caching, otherwise into described theTwo cachings are inquired;Inquiry is exited if inquiring the target data in second caching, otherwise into described theThree cachings are inquired;Inquiry is exited if inquiring the target data in third caching, inquiry is otherwise returned and losesThe information lost.
In certain embodiments of the present invention, the prime that the target data is backfilled to the caching being currently locatedCaching includes: to exit inquiry if inquiring the target data in first caching;If being looked into second cachingIt askes the target data and then exits inquiry, while the target data being backfilled in first caching;If describedThe target data is inquired in three cachings and then exits inquiry, while the target data is backfilled to first caching and instituteIt states in the second caching.
In certain embodiments of the present invention, the multi-level buffer includes local cache, distributed caching and database.
In certain embodiments of the present invention, the method also includes: receive data modification information, and be sent to describedMulti-level buffer;The multi-level buffer carries out information change according to the data modification information.
Embodiment according to the present invention provides a kind of data processing system based on multi-level buffer, which is characterized in thatThe system comprises communication module, inquiry request for receiving data;Enquiry module is used for according to the inquiry request moreIt is inquired step by step in grade caching;Module is backfilled, is backfilled to currently for returning to the target data inquired, and by the target dataThe prime of the caching at place caches.
In certain embodiments of the present invention, the multi-level buffer includes at least the first caching, the second caching and thirdCaching;Wherein, the enquiry module is used for: being inquired in first caching according to the inquiry request;If described firstThe target data is inquired in caching and then exits inquiry, is otherwise inquired into second caching;If described secondThe target data is inquired in caching and then exits inquiry, is otherwise inquired into third caching;If in the thirdThe target data is inquired in caching and then exits inquiry, otherwise returns to the information of inquiry failure.
In certain embodiments of the present invention, the backfill module is used for: if inquiring institute in first cachingIt states target data and then exits inquiry;Inquiry is exited if inquiring the target data in second caching, while by instituteTarget data is stated to be backfilled in first caching;It exits and looks into if inquiring the target data in third cachingIt askes, while the target data being backfilled in first caching and second caching.
In certain embodiments of the present invention, the multi-level buffer includes local cache, distributed caching and database.
In certain embodiments of the present invention, the system also includes: information to change module, changes for receiving dataInformation, and it is sent to the multi-level buffer;The multi-level buffer carries out information change according to the data modification information.
Meanwhile the present invention provides a kind of data processing equipment based on multi-level buffer, including memory and processor, institutesState memory for store one or more computer instruction;The processor is for calling one or more computer to refer toIt enables thereby executing any one of aforementioned data processing method.
The present invention also provides a kind of computer storage medium, it is stored with one or more computer program, described oneOr a plurality of computer program realizes any one of aforementioned data processing method when calling.
Data are carried out multistage storage by way of backfill by embodiments of the present invention, so that data under distributed environmentUser and provider can separate and respectively dispose, meanwhile, effectively reduce using when data to data providing serverWith pressure caused by database.
Detailed description of the invention
To facilitate the understanding of the present invention, the present invention is carried out specifically below by way of specific embodiment and in conjunction with attached drawingIt is bright.
Fig. 1 is a kind of flow diagram of data processing method of embodiment according to the present invention;
Fig. 2 is a kind of block diagram of data processing system of embodiment according to the present invention.
Specific embodiment
It is described in detail to various aspects of the present invention below in conjunction with the drawings and specific embodiments.Wherein, many institute's weeksModule, unit and its mutual connection, link, communication or the operation known are not shown or do not elaborate.Also, instituteFeature, framework or the function of description can combine in any way in one or more embodiments.Those skilled in the artMember is it should be appreciated that following various embodiments are served only for the protection scope for example, and is not intended to limit the present invention.May be used alsoTo be readily appreciated that, module or unit or processing mode in each embodiment described herein and shown in the drawings can by it is various notIt is combined and designs with configuration.
Firstly, being explained to noun of the present invention:
Application component: business function, operation flow, implementation pattern are close, for same category service product or serviceThe set of specific implementation;
Using data: the data that application component uses, data are divided into different type, every one kind data according to meaning differenceUnder can there are multiple key-value pairs to answer value;
Parameter provider: if some application component is responsible for safeguarding certain one kind using data, claiming the component is the dataProvider;
Parameter user: if the data that some application component uses data providing to provide, and not to such dataIt is safeguarded, then claiming the component is the user of the data.
Fig. 1 is a kind of flow diagram of data processing method of embodiment according to the present invention, in implementation of the inventionIn mode, referring to Fig.1, this method is specifically included:
100: receiving data inquiry request;
101: being inquired step by step in multi-level buffer according to the inquiry request;
102: returning to the target data inquired, and the prime that the target data is backfilled to the caching being currently located is delayedIt deposits.
In embodiments of the present invention, the multi-level buffer includes at least the first caching, the second caching and third caching.Above-mentioned processing 101 can be accomplished by the following way: be inquired in first caching according to the inquiry request;If describedThe target data is inquired in first caching and then exits inquiry, is otherwise inquired into second caching;If describedThe target data is inquired in second caching and then exits inquiry, is otherwise inquired into third caching;If describedThe target data is inquired in third caching and then exits inquiry, otherwise returns to the information of inquiry failure.
Likewise, in embodiments of the present invention, above-mentioned processing 102 can be accomplished by the following way: if describedThe target data, which is inquired, in first caching then exits inquiry;If inquiring the target data in second cachingInquiry is exited, while the target data being backfilled in first caching;If being inquired in third caching describedTarget data then exits inquiry, while the target data being backfilled in first caching and second caching.As a result,If inquiring same data again next time, will path in front find, and saved query time and improved efficiency.
By the above method, data are carried out multistage storage by way of backfill by embodiments of the present invention, make scoreData user and provider, which can separate, under cloth environment respectively disposes, meanwhile, it effectively reduces using logarithm when dataAccording to pressure caused by provider's server and database.
Hereinafter, will be explained in detail a kind of realization process of illustrative data processing method of the invention:
In this implementation, multi-level buffer includes local cache, distributed caching and database, and according to local slowIt deposits, the Query priority sequence arrangement of distributed caching and database.
After the inquiry request for receiving data user, by calling data acquisition API (ApplicationProgramming Interface, application programming interface) data query is carried out in multi-level buffer.
Specifically, call method is as follows:
Table 1
In this implementation, data acquisition API enters inquiry core logic, successively query path is called to be inquired,Specifically, query path is as follows:
1. local cache (memory), configuration path local, the key assignments number of such data local cache of configuration path dataAmount;
2. distributed caching, configuration path cache, configuration path data are the reality of such data access distributed cachingExample name;
3. outgoing call, configuration path remote, configuration path are the service codes of data providing publication;
4. persistence interface, configuration path db, configuration path are the title that the data persistence inquires class.
Wherein, the structural data found out in persistence interface from database is converted into json by json crossover toolCharacter string can be stored in local cache or distributed caching, can also return in outgoing call, and exchange agreement unified in this way is conducive toTransmitting of the data between each section.
Meanwhile the configuration that core logic depends on current application component is inquired, above 4 kinds of query path can according to needConfigure different query strategies.Query strategy example are as follows:
# data type=data providing mark, data validity interval, access path
Specifically, for example:
TransactionControlStrategy=false, 600, local (100), cache(strategyParam),remote(SRV001)
TransactionAccumulationControlStrategy=false, 600, local, cache(strategyParam),remote(SRV001)
CustomerBacklist=false, 7200, cache (customerparam)
CustomerRatingStrategy=true, 3600, cache (strategyParam), db (com.demo.CustomerRatingStrategyDao)
In above-mentioned example, first data type TransactionControlStrategy indicates the data for transaction controlPolicy data processed, this component are data users, and validity period 600 seconds, access path was to access local cache first, visited again realityExample name is the distributed caching of strategyParam, if all inquiry is finally visited less than (or the expired content found) beforeAsk that remote service code is the service acquisition of SRV001.
In this implementation, when the 2nd path query is accessed then, this in the 1st path of backfill update can be removedA data;When the 3rd path query is accessed to some data, this number in the 2nd and the 1st path can be backfilled respectivelyAccording to, and so on.In this way, if inquiring same data again next time, will path in front find, and saved inquiryTime improves efficiency.Distinguishingly, if current application component is not data providing, it only will be updated local cache.
Meanwhile in embodiments of the present invention, if there is data to be changed due to maintenance or other,Global unified change can be carried out in the following manner:
Data modification information is received, and is sent to the multi-level buffer;
The multi-level buffer carries out information change according to the data modification information.
Specifically, the provider of the data sends out data modification information when some data changes, by shouldData modification information is sent to other cachings, other cachings is made voluntarily to carry out data change.It preferably, can be for example, by broadcastMode transmit data modification information.Meanwhile may include version number information in the data modification information, each caching passes through comparisonVersion number information judges whether to need to carry out data change.
Fig. 2 is a kind of block diagram of data processing system 1 of embodiment according to the present invention, referring to Fig. 2, the data processing systemSystem 1 includes: communication module 11, for receiving data inquiry request;Enquiry module 12 is used for according to inquiry request in multi-level bufferIn inquire step by step;Backfill module 13, for returns to the target data inquired, and target data is backfilled to be currently located delayThe prime caching deposited.
In embodiments of the present invention, multi-level buffer includes at least the first caching, the second caching and third caching;ItsIn, enquiry module 12 is used for: being inquired in the first caching according to inquiry request;If inquiring target data in the first cachingInquiry is exited, otherwise enters the second caching and is inquired;Inquiry is exited if inquiring target data in the second caching, otherwiseIt is inquired into third caching;Inquiry is exited if inquiring target data in third caching, otherwise returns to inquiry failureInformation.
In embodiments of the present invention, backfill module 13 is used for: being moved back if inquiring target data in the first cachingIt inquires out;Inquiry is exited if inquiring target data in the second caching, while target data being backfilled in the first caching;Inquiry is exited if inquiring target data in third caching, while target data is backfilled to the first caching and the second cachingIn.
In embodiments of the present invention, data processing system 1 further include: information changes module 14, for receiving numberAccording to modification information, and sends at most grade and cache;Multi-level buffer carries out information change according to data modification information.
Optionally, embodiment of the present invention provides a kind of data processing equipment based on multi-level buffer, the data processingDevice includes memory, for storing one or more computer instruction;Processor, for calling one or more computer to refer toIt enables thereby executing data processing method provided by aforementioned embodiments of the present invention or implementation.Optionally, of the invention realIt applies in a kind of implementation of mode, data processing equipment can also include the input/output interface for carrying out data communication.For example, processing unit can be intelligent terminal, server etc..
Embodiment of the present invention additionally provides a kind of computer storage medium, is stored with one or more computer instruction,The data processing method provided for realizing aforementioned embodiments of the present invention or implementation when calling.For example, storage mediumIt may include hard disk, floppy disk, CD etc..
Although illustrating some embodiments herein, it, can be right under the premise of not departing from essence of the present inventionThese embodiments carry out various modifications, and all these deformations still fall within design of the invention, and fall into right of the present invention and wantProtection scope defined by asking.
Specific embodiment disclosed herein is only used for illustrating the present invention, to those skilled in the art,Obviously can carry out various modifications according to the teaching of this article, can using it is various it is equivalent by the way of implement the present invention, therefore, this hairBright specific embodiment disclosed above is only exemplary, and protection scope is not by construction or design disclosed hereinDetails is limited, unless being otherwise noted in the claims.Therefore, specific illustrative embodiment disclosed above can carry outVarious replacements, combination or modification, all deformations are both fallen in range disclosed herein.It is not specifically disclosed herein lackingAny element or in the case where lacking optional component disclosed herein, the disclosed number based on multi-level buffer exemplified hereIt can be still appropriately carried out according to processing method and system, device and storage medium.All numerical value and range disclosed above can alsoCentainly changed.Whenever disclosing the numberical range with lower and upper limit, any numerical value within the scope of this and any is fallen intoBy comprising range all specifically disclosed.Specifically, any range of numerical value disclosed herein can be regarded as enumeratingIt include any value and range in broader numerical.Equally, unless applicant is explicitly and clearly defined otherwise, powerTerm in benefit requirement has their clear, common meaning.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be byThe mode of software combination hardware platform is realized.Based on this understanding, technical solution of the present invention makes tribute to background techniqueThat offers can be embodied in the form of software products in whole or in part, which can store is situated between in storageIn matter, such as ROM/RAM, magnetic disk, CD, including some instructions use is so that a computer equipment (can be individual calculusMachine, server or network equipment etc.) execute each embodiment of the present invention or embodiment certain parts method.
In addition, the quantity of the component in claims includes one or at least one, unless otherwise indicated.If this hairWord or term in bright in other documents usage or meaning there are inconsistent, then should be to be with defined in the present inventionIt is quasi-.

Claims (12)

CN201811025082.XA2018-09-042018-09-04Data processing method and system, device and storage medium based on multi-level bufferPendingCN109388656A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201811025082.XACN109388656A (en)2018-09-042018-09-04Data processing method and system, device and storage medium based on multi-level buffer

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811025082.XACN109388656A (en)2018-09-042018-09-04Data processing method and system, device and storage medium based on multi-level buffer

Publications (1)

Publication NumberPublication Date
CN109388656Atrue CN109388656A (en)2019-02-26

Family

ID=65418770

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811025082.XAPendingCN109388656A (en)2018-09-042018-09-04Data processing method and system, device and storage medium based on multi-level buffer

Country Status (1)

CountryLink
CN (1)CN109388656A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110046029A (en)*2019-03-132019-07-23平安科技(深圳)有限公司Data processing method and device applied to multi-level buffer in cluster
CN110413679A (en)*2019-07-312019-11-05深圳前海微众银行股份有限公司 Database information processing method, apparatus, device and readable storage medium
CN110895539A (en)*2019-11-222020-03-20南威软件股份有限公司Second-level caching method of application system
CN112559560A (en)*2019-09-102021-03-26北京京东振世信息技术有限公司Metadata reading method and device, metadata updating method and device, and storage device
CN112749198A (en)*2021-01-212021-05-04中信银行股份有限公司Multi-level data caching method and device based on version number
CN112783926A (en)*2021-01-202021-05-11银盛支付服务股份有限公司Method for reducing time consumption of calling service
CN113158097A (en)*2020-01-072021-07-23广州探途天下科技有限公司Network access processing method, device, equipment and system
CN113360528A (en)*2020-03-062021-09-07北京沃东天骏信息技术有限公司Data query method and device based on multi-level cache
CN114817173A (en)*2022-03-072022-07-29中科前沿(长沙)信息科技有限公司 Data processing method, device, device and medium for multi-level cache
CN115705358A (en)*2021-08-172023-02-17腾讯科技(深圳)有限公司Data processing method and device, computer equipment and storage medium
CN120123266A (en)*2024-10-282025-06-10中科腾龙信息技术有限公司 Data management method, device, computer equipment, readable storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20130346697A1 (en)*2012-06-262013-12-26International Business Machines CorporationMultilevel cache system
CN103780636A (en)*2012-10-172014-05-07阿里巴巴集团控股有限公司Cached data processing method and cached data processing system
CN107231395A (en)*2016-03-252017-10-03阿里巴巴集团控股有限公司Date storage method, device and system
CN107644071A (en)*2017-09-182018-01-30广州爱九游信息技术有限公司Buffering updating method, device and data-storage system
CN108132958A (en)*2016-12-012018-06-08阿里巴巴集团控股有限公司A kind of multi-level buffer data storage, inquiry, scheduling and processing method and processing device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20130346697A1 (en)*2012-06-262013-12-26International Business Machines CorporationMultilevel cache system
CN103780636A (en)*2012-10-172014-05-07阿里巴巴集团控股有限公司Cached data processing method and cached data processing system
CN107231395A (en)*2016-03-252017-10-03阿里巴巴集团控股有限公司Date storage method, device and system
CN108132958A (en)*2016-12-012018-06-08阿里巴巴集团控股有限公司A kind of multi-level buffer data storage, inquiry, scheduling and processing method and processing device
CN107644071A (en)*2017-09-182018-01-30广州爱九游信息技术有限公司Buffering updating method, device and data-storage system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2020181810A1 (en)*2019-03-132020-09-17平安科技(深圳)有限公司Data processing method and apparatus applied to multi-level caching in cluster
CN110046029A (en)*2019-03-132019-07-23平安科技(深圳)有限公司Data processing method and device applied to multi-level buffer in cluster
CN110413679A (en)*2019-07-312019-11-05深圳前海微众银行股份有限公司 Database information processing method, apparatus, device and readable storage medium
CN110413679B (en)*2019-07-312023-01-24深圳前海微众银行股份有限公司 Database information processing method, device, equipment and readable storage medium
CN112559560A (en)*2019-09-102021-03-26北京京东振世信息技术有限公司Metadata reading method and device, metadata updating method and device, and storage device
CN110895539A (en)*2019-11-222020-03-20南威软件股份有限公司Second-level caching method of application system
CN113158097A (en)*2020-01-072021-07-23广州探途天下科技有限公司Network access processing method, device, equipment and system
CN113360528A (en)*2020-03-062021-09-07北京沃东天骏信息技术有限公司Data query method and device based on multi-level cache
CN112783926A (en)*2021-01-202021-05-11银盛支付服务股份有限公司Method for reducing time consumption of calling service
CN112749198A (en)*2021-01-212021-05-04中信银行股份有限公司Multi-level data caching method and device based on version number
CN112749198B (en)*2021-01-212024-10-22中信银行股份有限公司Multistage data caching method and device based on version number
CN115705358A (en)*2021-08-172023-02-17腾讯科技(深圳)有限公司Data processing method and device, computer equipment and storage medium
CN114817173A (en)*2022-03-072022-07-29中科前沿(长沙)信息科技有限公司 Data processing method, device, device and medium for multi-level cache
CN120123266A (en)*2024-10-282025-06-10中科腾龙信息技术有限公司 Data management method, device, computer equipment, readable storage medium and program product

Similar Documents

PublicationPublication DateTitle
CN109388656A (en)Data processing method and system, device and storage medium based on multi-level buffer
US8429097B1 (en)Resource isolation using reinforcement learning and domain-specific constraints
CN109240946A (en)The multi-level buffer method and terminal device of data
CN109670089A (en)Knowledge mapping system and its figure server
CN109684358A (en)The method and apparatus of data query
CN113327168A (en)Method and system for generating and transferring non-homogeneous digital currency
CN109325039A (en)A kind of block chain browser and block chain information browsing method
WO2011002547A1 (en)System and method for adaptive selection of bank card for payment
CN109344157A (en)Read and write abruption method, apparatus, computer equipment and storage medium
CN105045897B (en)Support the transaction processing system and method for data-base capacity-enlarging
CN106326499B (en)A kind of data processing method and device
CN106649729A (en)Log running method and system, client and server
CN109656956A (en)A kind of method and device for realizing operation system data centralization caching
CN104408073B (en)Data manipulation method and device
CN110210900A (en)Method, apparatus and equipment are determined based on the reference product of transaction association
CN111400356A (en)Data query method, device and equipment
CN110110165A (en)Dynamic routing method and device for query engine in precomputation system
CN101673217B (en)Method for realizing remote program call and system thereof
CN109241099A (en)A kind of data query method and terminal device
CN102222108B (en)Scripting method and device
CN109165257A (en)Data query method and related system, equipment and storage medium
CN109933595A (en)A kind of internet of things equipment information sharing system, device and terminal device
EP1189160A1 (en)Method and system for transforming session data
CN106776708A (en)A kind of querying method and device
CN110233843A (en)A kind of processing method and processing device of user's request

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20190226

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp