CN107330119A - Caching data processing method, electronic equipment, computer-readable storage medium - Google Patents

Caching data processing method, electronic equipment, computer-readable storage medium Download PDF

Info

Publication number
CN107330119A
CN107330119A CN201710574172.3A CN201710574172A CN107330119A CN 107330119 A CN107330119 A CN 107330119A CN 201710574172 A CN201710574172 A CN 201710574172A CN 107330119 A CN107330119 A CN 107330119A
Authority
CN
China
Prior art keywords
data
key
data key
algorithm
renewal
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
CN201710574172.3A
Other languages
Chinese (zh)
Other versions
CN107330119B (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.)
Zhangyue Technology Co Ltd
Original Assignee
Zhangyue 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 Zhangyue Technology Co Ltd filed Critical Zhangyue Technology Co Ltd
Priority to CN201710574172.3A priority Critical patent/CN107330119B/en
Publication of CN107330119A publication Critical patent/CN107330119A/en
Application granted granted Critical
Publication of CN107330119B publication Critical patent/CN107330119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management

Abstract

The invention discloses a kind of caching data processing method, electronic equipment, computer-readable storage medium, its method includes:According to the renewal feedback information of batch data, the algorithm factor of the corresponding preset data key generating algorithm of type of service is updated;Receive the data inquiry request that client is sent;Data inquiry request carries the first data key of data to be checked;Using the preset data key generating algorithm after renewal, the second data key according to used in the first data key generates caching;The corresponding data query result of first data key and the second data key are associated, and stored in the buffer.So as to be used by the data after renewal, and when being stored in the buffer so as to subsequent query using the second data key of preset data key generating algorithm generation after renewal.Meanwhile, the data key existed in caching can be automatically deleted in the case where not being queried use by caching.

Description

Caching data processing method, electronic equipment, computer-readable storage medium
Technical field
The present invention relates to software field, and in particular to a kind of caching data processing method, electronic equipment, computer storage are situated between Matter.
Background technology
When inquiring about data, corresponding result is searched from database according to the data key of inquiry.But due to every time from number The consumption regular hour is needed during inquiry according in storehouse.If by data key and its storage of corresponding result in the buffer, when needs are looked into During inquiry, it can be inquired about from caching and obtain corresponding data, and then greatly improve inquiry velocity, can preferably tackle business needs Ask.Therefore, when realizing service inquiry, data key and its corresponding result can be stored in the buffer, in order to follow-up right Data can directly obtain data when being inquired about from caching.
But it is the number that does not change due to what is still stored in caching when the data of actual storage in database are changed According to the data obtained in inquiry from caching are not correct data.When the data in database are changed, it is necessary to right Caching is refreshed, and data therein are updated.Prior art to caching when refreshing, during general use will be cached Data deleted or again to the data assignment in caching to realize the refreshing to caching.But work as large batch of data all When changing, when deleting the rule of data one in caching, speed is slow and efficiency is low.Business can also be weighed when realizing The new data in caching carry out assignment again so that there is reprocessing in processing.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome above mentioned problem or at least in part solve on State the caching data processing method, electronic equipment, computer-readable storage medium of problem.
According to an aspect of the invention, there is provided a kind of caching data processing method, it includes:
According to the renewal feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of type of service is updated The factor;
Receive the data inquiry request that client is sent;Data inquiry request carries the first data of data to be checked Key;
Using the preset data key generating algorithm after renewal, the second data according to used in the first data key generates caching Key;
The corresponding data query result of first data key and the second data key are associated, and stored in the buffer.
According to another aspect of the present invention there is provided a kind of electronic equipment, including:Processor, memory, communication interface and Communication bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes below the computing device Operation:
According to the renewal feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of type of service is updated The factor;
Receive the data inquiry request that client is sent;Data inquiry request carries the first data of data to be checked Key;
Using the preset data key generating algorithm after renewal, the second data according to used in the first data key generates caching Key;
The corresponding data query result of first data key and the second data key are associated, and stored in the buffer.
According to another aspect of the invention there is provided a kind of computer-readable storage medium, be stored with the storage medium to A few executable instruction, the executable instruction makes to operate below the computing device:
According to the renewal feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of type of service is updated The factor;
Receive the data inquiry request that client is sent;Data inquiry request carries the first data of data to be checked Key;
Using the preset data key generating algorithm after renewal, the second data according to used in the first data key generates caching Key;
The corresponding data query result of first data key and the second data key are associated, and stored in the buffer.
Caching data processing method, electronic equipment, the computer-readable storage medium provided according to the present invention, when generation lot number During according to updating, according to the renewal feedback information of batch data, the calculation of the corresponding preset data key generating algorithm of type of service is updated The method factor.After the data inquiry request of client transmission is received, using the preset data key generating algorithm after renewal, according to The second data key used in the first data key generation caching that data inquiry request is carried;The corresponding data of first data key are looked into Ask result and the second data key is associated, and store in the buffer.So that by the data after renewal, and use present count after updating The second data key generated according to key generating algorithm is used when storing in the buffer so as to subsequent query.Meanwhile, deposited in caching Data key in the case where not being queried use, can by caching be deleted automatically.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit is common for this area Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 shows the flow chart of according to embodiments of the present invention one caching data processing method;
Fig. 2 shows the flow chart of according to embodiments of the present invention two caching data processing method;
Fig. 3 shows the structural representation of according to embodiments of the present invention four a kind of electronic equipment.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Embodiment one
Fig. 1 shows the flow chart of according to embodiments of the present invention one caching data processing method, as shown in figure 1, caching Data processing method specifically includes following steps:
Step S101, according to the renewal feedback information of batch data, updates the corresponding preset data key generation of type of service The algorithm factor of algorithm.
When batch data updates, the price of many books is stored in such as database, when to the valency of a large amount of books Lattice set new discount, when being modified to books price, have batch data and are required to be updated.According to database to criticizing Feedback information after amount being updated of data, or the renewal of the batch data after batch data updates is completed according to business Feedback information, can therefrom obtain the type of service related to the batch data, and update the corresponding preset data of type of service The algorithm factor of key generating algorithm.Type of service is the specific business of the renewal batch data, such as value traffic.It is not of the same trade or business Algorithm factor in the different preset data key generating algorithms of service type correspondence, each type of service corresponds one pre- If the algorithm factor in data key generating algorithm.Wherein, algorithm factor can be the various marks such as numeral, letter, symbol, more During the new algorithm factor, algorithm factor can be updated according to the default rule that updates.
Alternatively, algorithm factor contains the data more redaction factor.To the algorithm factor of preset data key generating algorithm Renewal, include to data update the version factor renewal.Such as the value of the corresponding data of a certain type of service more redaction factor For 1, when the batch data of the type of service is updated, the corresponding data more redaction of corresponding renewal type of service because The value of son is 2.Further, during renewal, the more new range of the data more redaction factor can also be set, more new range is reused Interior value sets the data more redaction factor.The more new range for such as setting the data more redaction factor is 1-5000, works as data After more the redaction factor is updated to 5000,1 is updated to when updating the data the more redaction factor, is continued again since 1 Update.
If data do not have the algorithm factor in batch updating, preset data key generating algorithm not update.
Step S102, receives the data inquiry request that client is sent.
When client needs to inquire about data, it may occur that data inquiry request.Receive the data of client transmission Inquiry request, wherein, data inquiry request carries the first data key of data to be checked.Inquire about data the first data key with The data key of data storage is consistent in database.Meanwhile, according to the data inquiry request received, the data can also be obtained and looked into Ask the type of service corresponding to request.Such as according to the flow path of data inquiry request, inquire about relevant configuration information, send data Page info of inquiry request etc., can obtain the type of service corresponding to data inquiry request.Different business have difference The data inquiry request of type of service.
Step S103, using the preset data key generating algorithm after renewal, according to used in the first data key generation caching Second data key.
Using the preset data key generating algorithm after renewal, the second data key is generated.Second data key is mainly used in caching The data of middle storage.Second data key is generated according to the first data key, can include the first number during generation in the second data key It is included according to key, and by the algorithm factor in preset data key generating algorithm in the second data key.Such as the generation of preset data key Second data key of algorithm generation for the first data key and algorithm factor combination, or the generation of preset data key generating algorithm the Two data keies are according to being obtained after functional operation by the first data key and algorithm factor.Preset data key generating algorithm is according to reality The situation of applying is configured, and is not limited herein.
Step S104, the corresponding data query result of the first data key and the second data key are associated, and is stored in slow In depositing.
Data query result after updating is inquired according to the first data key, by the data query result and the second of generation Data key is associated, and generates one-to-one data key values pair.By the data key values to storing in the buffer.
When needing to inquire about data again, after the data inquiry request that client is sent is received, preset data key is utilized Second data key of generating algorithm generation and the second data key in caching are identicals.Can be from caching according to the second data key In find its corresponding data query result.If occur the renewal of batch data, the algorithm of preset data key generating algorithm The factor can be also updated accordingly.Then need to regenerate the second new data key using preset data key generating algorithm, and The second new data key is different from the second old data key in caching, will not also search the second old number from caching again According to key.Because the lru algorithm (Least Recently Used, be not used at most recently) of caching itself can will not be used Data key is deleted, and eliminates the operation for deleting the legacy data key-value pair stored in caching manually.Or caching can be set Expired time, when the time that the second old data key in caching is not accessed reaching expired time, is deleted automatically Remove.
The caching data processing method provided according to the present invention, when occurring batch data renewal, according to batch data Feedback information is updated, the algorithm factor of the corresponding preset data key generating algorithm of type of service is updated.Receiving client hair After the data inquiry request sent, using the preset data key generating algorithm after renewal, first carried according to data inquiry request The second data key used in data key generation caching;The corresponding data query result of first data key is related to the second data key Connection, and store in the buffer.So that by the data after renewal, and second generated using preset data key generating algorithm after updating Data key is used when storing in the buffer so as to subsequent query.Meanwhile, to the old data key that has existed in caching at it not Again by use in the case of, be deleted automatically by caching, it is to avoid manually operated, the data cached elimination efficiency of raising.
Embodiment two
Fig. 2 shows the flow chart of according to embodiments of the present invention two caching data processing method, as shown in Fig. 2 caching Data processing method comprises the following steps:
Step S201, according to the renewal feedback information of batch data, sets the corresponding data cached expired mark of type of service Note.
Step S202, according to the corresponding data cached expired mark of type of service, updates the corresponding present count of type of service According to the algorithm factor of key generating algorithm.
According to the renewal feedback information of batch data, first judge whether the amount of updating the data of batch data is more than default renewal Threshold value.If so, then setting data cached expired mark according to the type of service of batch data.If the amount of updating the data of batch data Less than default renewal threshold value, such as amount of updating the data of batch data is only 10, can be by updating data cached manually.
According to the corresponding data cached expired mark of type of service, the corresponding preset data key of the type of service can be updated The algorithm factor of generating algorithm.Algorithm factor is the factor needed in preset data key generating algorithm.Preset data key is generated Algorithm is specially such as to data key prefixing or suffix algorithm.Wherein, the particular content of prefix or suffix has comprised at least data Update version information and traffic type information.The different prefix or suffix of different service types correspondence.It is more to update algorithm factor The content that its new prefix or suffix is included.When updating, according to the type of service of batch data, find and include and the business The prefix or suffix of the traffic type information of type matching.The data more redaction included to the prefix or suffix found Information is updated.Data, which update version information, to be such as identified using numeral, letter, symbol, will be old during renewal Data renewal version information adds 1 and obtains new data renewal version information;Or;Old data are updated into version information during renewal Updating in alphabetical order sets new data to update version information etc..Further, during renewal, data more new edition can also be set The more new range of this information, reuses the value in the range of updating and sets data to update version information.Such as data are set to update The more new range of version information is 1-5000, after data, which update version information, is updated to 5000, is updating the data more redaction 1 is updated to during information, continues to update since 1 again.
Step S203, receives the data inquiry request that client is sent.
Step S204, receives the corresponding Query Result of the first data key that database is returned.
When client needs to inquire about data, it may occur that data inquiry request.Receive the data of client transmission Inquiry request, wherein, data inquiry request carries the first data key of data to be checked.Inquire about data the first data key with The data key of data storage is consistent in database.Meanwhile, according to the data inquiry request received, the data can also be obtained and looked into Ask the type of service corresponding to request.Such as according to the flow path of data inquiry request, inquire about relevant configuration information, send data Page info of inquiry request etc., can obtain the type of service corresponding to data inquiry request.Different business have difference The data inquiry request of type of service.Because batch data is updated, and it is corresponding there is provided type of service is corresponding slow The expired mark of deposit data.According to data cached overdue indicator, it is known that data are updated, the data in now caching are not most New data.Accordingly, it would be desirable to which the data inquiry request is sent into database, and receive the first data key pair of database return The Query Result answered.
Step S205, using preset data key generating algorithm, the second data according to used in the first data key generates caching Key.
It is the first data key increase prefix or suffix using the preset data key generating algorithm after renewal, generation second is counted According to key.Wherein, the particular content of prefix or suffix is obtained after step S202 renewals.Second data key is mainly used in depositing in caching The data of storage.
Step S206, the corresponding data query result of the first data key and the second data key are associated, and is stored in slow In depositing.
The corresponding Query Result of the first data key that database is returned is associated with the second data key generated, generation one One corresponding data key values pair.By the data key values to storing in the buffer.
Further, in data query result and the storage of the second data key to after caching, in addition it is also necessary to eliminate data cached expired Mark, that is, the data in caching have been latest data.
When needing to inquire about data again, after the data inquiry request that client is sent is received, preset data key is utilized Second data key of generating algorithm generation and the second data key in caching are identicals.Now, it is not provided with data cached mistake Phase identifies, and its corresponding data query result directly can be found from caching according to the second data key.If generation lot number According to renewal when, the algorithm factor of preset data key generating algorithm can be also updated accordingly.Then need to utilize preset data Key generating algorithm regenerates the second new data key, and the second new data key and the second old data key in caching are not With.Due to there is data cached overdue indicator, the second old data key is no longer searched from caching, and from database directly Searching data.Because the lru algorithm (Least Recently Used, be not used at most recently) of caching itself will can no longer make Data key is deleted, and eliminates the operation for deleting the legacy data key-value pair stored in caching manually.Or can set Expired time is cached, when the time that the second old data key in caching is not accessed reaching expired time, is entered automatically Row is deleted.
The caching data processing method provided according to the present invention, when occurring batch data renewal, sets type of service pair The data cached expired mark answered.According to data cached overdue indicator, the corresponding preset data key of its type of service can be updated The algorithm factor of generating algorithm.After the data inquiry request of client transmission is received, its is searched from database corresponding Query Result.And be the first data key increase prefix or suffix, generation second using the preset data key generating algorithm after updating Data key.The corresponding data query result of first data key and the second data key are associated, and stored in the buffer.So that will Data after renewal, and the second data key generated using preset data key generating algorithm after updating are stored in the buffer with after an action of the bowels Used during continuous inquiry.Meanwhile, to the old data key that has existed in caching in the case where it is no longer used, by caching from It is dynamic to be deleted, it is to avoid manually operated, improve data cached elimination efficiency.
Embodiment three
The embodiment of the present application three provides a kind of nonvolatile computer storage media, the computer-readable storage medium storage There is an at least executable instruction, the computer executable instructions can perform the data cached processing in above-mentioned any means embodiment Method.
Executable instruction specifically can be used for so that being operated below computing device:According to the renewal feedback letter of batch data Breath, updates the algorithm factor of the corresponding preset data key generating algorithm of type of service;The data query for receiving client transmission please Ask;Data inquiry request carries the first data key of data to be checked;Utilize the preset data key generating algorithm after renewal, root The second data key used in caching is generated according to the first data key;By the corresponding data query result of the first data key and the second data Key is associated, and stores in the buffer.
In a kind of optional embodiment, algorithm factor includes the data more redaction factor.
In a kind of optional embodiment, executable instruction further makes to operate below computing device:According to batch The renewal feedback information of data, sets the corresponding data cached expired mark of type of service;According to the corresponding caching of type of service The expired mark of data, updates the algorithm factor of the corresponding preset data key generating algorithm of type of service.
In a kind of optional embodiment, executable instruction further makes to operate below computing device:According to batch The renewal feedback information of data, judges whether the amount of updating the data of batch data is more than default renewal threshold value;If so, setting caching The expired mark of data.
In a kind of optional embodiment, preset data key generating algorithm is specially prefixing or suffix algorithm, prefix Or suffix comprises at least data and updates version information and traffic type information;Executable instruction further makes below computing device Operation:According to the type of service of batch data, find the prefix comprising the traffic type information matched with the type of service or Suffix;Update the data renewal version information that found prefix or suffix is included;For the first data key increase prefix or Suffix.
In a kind of optional embodiment, executable instruction further makes to operate below computing device:Receive data The corresponding Query Result of the first data key that storehouse is returned.
Example IV
Fig. 3 shows the structural representation of according to embodiments of the present invention four a kind of electronic equipment, present invention specific implementation Example is not limited implementing for electronic equipment.
As shown in figure 3, the electronic equipment can include:Processor (processor) 302, communication interface (Communications Interface) 304, memory (memory) 306 and communication bus 308.
Wherein:
Processor 302, communication interface 304 and memory 306 complete mutual communication by communication bus 308.
Communication interface 304, communicates for the network element with miscellaneous equipment such as client or other servers etc..
Processor 302, for configuration processor 310, can specifically be performed in above-mentioned caching data processing method embodiment Correlation step.
Specifically, program 310 can include program code, and the program code includes computer-managed instruction.
Processor 302 is probably central processor CPU, or specific integrated circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.The one or more processors that server includes, can be same type of processors, such as one or more CPU;Can also It is different types of processor, such as one or more CPU and one or more ASIC.
Memory 306, for depositing program 310.Memory 306 may include high-speed RAM memory, it is also possible to also include Nonvolatile memory (non-volatile memory), for example, at least one magnetic disk storage.
Program 310 specifically can be used for so that processor 302 performs following operation:
In a kind of optional embodiment, program 310 is used to processor 302 is fed back according to the renewal of batch data Information, updates the algorithm factor of the corresponding preset data key generating algorithm of type of service;Receive the data query that client is sent Request;Data inquiry request carries the first data key of data to be checked;Using the preset data key generating algorithm after renewal, The second data key according to used in the first data key generates caching;The corresponding data query result of first data key and second are counted It is associated according to key, and store in the buffer.
In a kind of optional embodiment, algorithm factor includes the data more redaction factor.
In a kind of optional embodiment, program 310 is used to processor 302 is fed back according to the renewal of batch data Information, sets the corresponding data cached expired mark of type of service;According to the corresponding data cached expired mark of type of service, more The algorithm factor of the corresponding preset data key generating algorithm of new business type.
In a kind of optional embodiment, program 310 is used to processor 302 is fed back according to the renewal of batch data Information, judges whether the amount of updating the data of batch data is more than default renewal threshold value;If so, setting data cached expired mark.
In a kind of optional embodiment, preset data key generating algorithm is specially prefixing or suffix algorithm, prefix Or suffix comprises at least data and updates version information and traffic type information;Program 310 is used to cause processor 302 according to batch The type of service of data, finds the prefix or suffix for including the traffic type information matched with the type of service;Renewal is looked into The data that the prefix or suffix found is included update version information;Increase prefix or suffix for the first data key.
In a kind of optional embodiment, program 310 is used to cause processor 302 to receive the first number that database is returned According to the corresponding Query Result of key.
Each step implements in the corresponding steps that may refer in above-mentioned data cached Processing Example in program 310 Corresponding description, will not be described here.It is apparent to those skilled in the art that, for convenience and simplicity of description, The equipment of foregoing description and the specific work process of module, may be referred to the corresponding process description in preceding method embodiment, This is repeated no more.
The scheme provided by the present embodiment, when occurring batch data renewal, according to the renewal feedback letter of batch data Breath, updates the algorithm factor of the corresponding preset data key generating algorithm of type of service.Looked into the data for receiving client transmission Ask after request, using the preset data key generating algorithm after renewal, the first data key carried according to data inquiry request is generated Caching the second data key used;The corresponding data query result of first data key and the second data key are associated, and stored In the buffer.So as to be deposited by the data after renewal, and using the second data key of preset data key generating algorithm generation after renewal Used when storing up in the buffer so as to subsequent query.Meanwhile, the data key existed in caching be not queried situation about using Under, can automatically it be deleted by caching.
In the specification that this place is provided, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:It is i.e. required to protect The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following embodiment are expressly incorporated in the embodiment, wherein each claim is in itself All as the separate embodiments of the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Member or component be combined into a module or unit or component, and can be divided into addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit exclude each other, it can use any Combination is disclosed to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (including adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can or similar purpose identical, equivalent by offer alternative features come generation Replace.
Although in addition, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of be the same as Example does not mean in of the invention Within the scope of and form different embodiments.For example, in the following claims, times of embodiment claimed One of meaning mode can be used in any combination.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of some different elements and coming real by means of properly programmed computer It is existing.The use of word first, second, and third does not indicate that any order.These words can be construed to title.
The invention discloses:A1. a kind of caching data processing method, it includes:
According to the renewal feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of type of service is updated The factor;
Receive the data inquiry request that client is sent;The data inquiry request carries the first number of data to be checked According to key;
Using the preset data key generating algorithm after renewal, the second number according to used in first data key generates caching According to key;
The corresponding data query result of first data key and second data key are associated, and are stored in caching In.
A2. the method according to A1, wherein, the algorithm factor includes the data more redaction factor.
A3. the method according to A1, wherein, the renewal feedback information according to batch data updates type of service The algorithm factor of corresponding preset data key generating algorithm further comprises:
According to the renewal feedback information of batch data, the corresponding data cached expired mark of type of service is set;
According to the corresponding data cached expired mark of type of service, the corresponding preset data key life of type of service is updated Into the algorithm factor of algorithm.
A4. the method according to A3, wherein, the renewal feedback information according to batch data is set data cached Expired mark further comprises:
According to the renewal feedback information of batch data, judge whether the amount of updating the data of the batch data is more than and preset more New threshold value;
If so, setting data cached expired mark.
A5. the method according to A1, wherein, the preset data key generating algorithm is specially that prefixing or suffix are calculated Method, the prefix or suffix comprises at least data and updates version information and traffic type information;
The renewal feedback information according to batch data, updates the corresponding preset data key generating algorithm of type of service Algorithm factor further comprises:
According to the type of service of batch data, the prefix for including the traffic type information matched with the type of service is found Or suffix;
Update the data renewal version information that found prefix or suffix is included;
It is described to utilize the preset data key generating algorithm, the second number according to used in first data key generates caching Further comprise according to key:Increase prefix or suffix for first data key.
A6. the method according to A1, wherein, methods described also includes:
Receive the corresponding Query Result of first data key that database is returned.
The invention also discloses:B7. a kind of electronic equipment, including:Processor, memory, communication interface and communication bus, The processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes below the computing device Operation:
According to the renewal feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of type of service is updated The factor;
Receive the data inquiry request that client is sent;The data inquiry request carries the first number of data to be checked According to key;
Using the preset data key generating algorithm after renewal, the second number according to used in first data key generates caching According to key;
The corresponding data query result of first data key and second data key are associated, and are stored in caching In.
B8. the electronic equipment according to B7, the algorithm factor includes the data more redaction factor.
B9. the electronic equipment according to B7, the executable instruction further makes to operate below the computing device:
According to the renewal feedback information of batch data, the corresponding data cached expired mark of type of service is set;
According to the corresponding data cached expired mark of type of service, the corresponding preset data key life of type of service is updated Into the algorithm factor of algorithm.
B10. the electronic equipment according to B9, the executable instruction further makes to grasp below the computing device Make:
According to the renewal feedback information of batch data, judge whether the amount of updating the data of the batch data is more than and preset more New threshold value;
If so, setting data cached expired mark.
B11. the electronic equipment according to B7, the preset data key generating algorithm is specially that prefixing or suffix are calculated Method, the prefix or suffix comprises at least data and updates version information and traffic type information;
The executable instruction further makes to operate below the computing device:
According to the type of service of batch data, the prefix for including the traffic type information matched with the type of service is found Or suffix;
Update the data renewal version information that found prefix or suffix is included;
Increase prefix or suffix for first data key.
B12. the electronic equipment according to B7, the executable instruction further makes to grasp below the computing device Make:
Receive the corresponding Query Result of first data key that database is returned.
The invention also discloses:C13. being stored with a kind of computer-readable storage medium, the storage medium at least one can hold Row instruction, the executable instruction makes to operate below the computing device:
According to the renewal feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of type of service is updated The factor;
Receive the data inquiry request that client is sent;The data inquiry request carries the first number of data to be checked According to key;
Using the preset data key generating algorithm after renewal, the second number according to used in first data key generates caching According to key;
The corresponding data query result of first data key and second data key are associated, and are stored in caching In.
C14. the computer-readable storage medium according to C13, the algorithm factor includes the data more redaction factor.
C15. the computer-readable storage medium according to C13, the executable instruction further makes the computing device Operate below:
According to the renewal feedback information of batch data, the corresponding data cached expired mark of type of service is set;
According to the corresponding data cached expired mark of type of service, the corresponding preset data key life of type of service is updated Into the algorithm factor of algorithm.
C16. the computer-readable storage medium according to C15, the executable instruction further makes the computing device Operate below:
According to the renewal feedback information of batch data, judge whether the amount of updating the data of the batch data is more than and preset more New threshold value;
If so, setting data cached expired mark.
C17. the computer-readable storage medium according to C13, the preset data key generating algorithm be specially prefixing or Suffix algorithm, the prefix or suffix comprises at least data and updates version information and traffic type information;
The executable instruction further makes to operate below the computing device:
According to the type of service of batch data, the prefix for including the traffic type information matched with the type of service is found Or suffix;
Update the data renewal version information that found prefix or suffix is included;
Increase prefix or suffix for first data key.
C18. the computer-readable storage medium according to C13, the executable instruction further makes the computing device Operate below:
Receive the corresponding Query Result of first data key that database is returned.

Claims (10)

1. a kind of caching data processing method, it includes:
According to the renewal feedback information of batch data, update the algorithm of the corresponding preset data key generating algorithm of type of service because Son;
Receive the data inquiry request that client is sent;The data inquiry request carries the first data of data to be checked Key;
Using the preset data key generating algorithm after renewal, the second data according to used in first data key generates caching Key;
The corresponding data query result of first data key and second data key are associated, and stored in the buffer.
2. according to the method described in claim 1, wherein, the algorithm factor include the data more redaction factor.
3. according to the method described in claim 1, wherein, the renewal feedback information according to batch data, update service class The algorithm factor of the corresponding preset data key generating algorithm of type further comprises:
According to the renewal feedback information of batch data, the corresponding data cached expired mark of type of service is set;
According to the corresponding data cached expired mark of type of service, update the corresponding preset data key generation of type of service and calculate The algorithm factor of method.
4. method according to claim 3, wherein, the renewal feedback information according to batch data sets caching number Further comprise according to expired mark:
According to the renewal feedback information of batch data, judge whether the amount of updating the data of the batch data is more than default renewal threshold Value;
If so, setting data cached expired mark.
5. according to the method described in claim 1, wherein, the preset data key generating algorithm is specially that prefixing or suffix are calculated Method, the prefix or suffix comprises at least data and updates version information and traffic type information;
The renewal feedback information according to batch data, updates the algorithm of the corresponding preset data key generating algorithm of type of service The factor further comprises:
According to the type of service of batch data, find the prefix comprising the traffic type information matched with the type of service or after Sew;
Update the data renewal version information that found prefix or suffix is included;
It is described to utilize the preset data key generating algorithm, the second data key according to used in first data key generates caching Further comprise:Increase prefix or suffix for first data key.
6. according to the method described in claim 1, wherein, methods described also includes:
Receive the corresponding Query Result of first data key that database is returned.
7. a kind of electronic equipment, including:Processor, memory, communication interface and communication bus, the processor, the storage Device and the communication interface complete mutual communication by the communication bus;
The memory is used to deposit an at least executable instruction, and the executable instruction makes to grasp below the computing device Make:
According to the renewal feedback information of batch data, update the algorithm of the corresponding preset data key generating algorithm of type of service because Son;
Receive the data inquiry request that client is sent;The data inquiry request carries the first data of data to be checked Key;
Using the preset data key generating algorithm after renewal, the second data according to used in first data key generates caching Key;
The corresponding data query result of first data key and second data key are associated, and stored in the buffer.
8. electronic equipment according to claim 7, the algorithm factor includes the data more redaction factor.
9. electronic equipment according to claim 7, the executable instruction further makes to grasp below the computing device Make:
According to the renewal feedback information of batch data, the corresponding data cached expired mark of type of service is set;
According to the corresponding data cached expired mark of type of service, update the corresponding preset data key generation of type of service and calculate The algorithm factor of method.
10. be stored with an at least executable instruction, the executable instruction in a kind of computer-readable storage medium, the storage medium Make to operate below the computing device:
According to the renewal feedback information of batch data, update the algorithm of the corresponding preset data key generating algorithm of type of service because Son;
Receive the data inquiry request that client is sent;The data inquiry request carries the first data of data to be checked Key;
Using the preset data key generating algorithm after renewal, the second data according to used in first data key generates caching Key;
The corresponding data query result of first data key and second data key are associated, and stored in the buffer.
CN201710574172.3A 2017-07-14 2017-07-14 Caching data processing method, electronic equipment, computer storage media Active CN107330119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710574172.3A CN107330119B (en) 2017-07-14 2017-07-14 Caching data processing method, electronic equipment, computer storage media

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710574172.3A CN107330119B (en) 2017-07-14 2017-07-14 Caching data processing method, electronic equipment, computer storage media

Publications (2)

Publication Number Publication Date
CN107330119A true CN107330119A (en) 2017-11-07
CN107330119B CN107330119B (en) 2018-08-03

Family

ID=60227292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710574172.3A Active CN107330119B (en) 2017-07-14 2017-07-14 Caching data processing method, electronic equipment, computer storage media

Country Status (1)

Country Link
CN (1) CN107330119B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019340A (en) * 2017-12-08 2019-07-16 北京新媒传信科技有限公司 Data storage/read method, apparatus and system
CN111352957A (en) * 2020-02-25 2020-06-30 京东数字科技控股有限公司 Remote dictionary service optimization method and related equipment
CN110019212B (en) * 2017-11-29 2021-06-18 杭州海康威视数字技术股份有限公司 Data processing method and device and database server
CN113010535A (en) * 2021-03-12 2021-06-22 北京百度网讯科技有限公司 Cache data updating method, device, equipment and storage medium
CN113297280A (en) * 2021-06-10 2021-08-24 北京开科唯识技术股份有限公司 Data processing method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541927A (en) * 2010-12-30 2012-07-04 北京新媒传信科技有限公司 Method and device for realizing data cache
CN102902730A (en) * 2012-09-10 2013-01-30 新浪网技术(中国)有限公司 Method and device for reading data based on data cache
CN103853727A (en) * 2012-11-29 2014-06-11 深圳中兴力维技术有限公司 Method and system for improving large data volume query performance
US20140324875A1 (en) * 2013-04-29 2014-10-30 Keyw Corporation Index for fast batch updates of large data tables
US9262323B1 (en) * 2012-11-26 2016-02-16 Amazon Technologies, Inc. Replication in distributed caching cluster
CN105608197A (en) * 2015-12-25 2016-05-25 Tcl集团股份有限公司 Method and system for obtaining Memcache data under high concurrency
CN105843895A (en) * 2016-03-22 2016-08-10 北京建飞无限科技有限公司 EhCache-based data querying and synchronizing method, device and system
CN106021468A (en) * 2016-05-17 2016-10-12 上海携程商务有限公司 Updating method and system for distributed caches and local caches

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541927A (en) * 2010-12-30 2012-07-04 北京新媒传信科技有限公司 Method and device for realizing data cache
CN102902730A (en) * 2012-09-10 2013-01-30 新浪网技术(中国)有限公司 Method and device for reading data based on data cache
US9262323B1 (en) * 2012-11-26 2016-02-16 Amazon Technologies, Inc. Replication in distributed caching cluster
CN103853727A (en) * 2012-11-29 2014-06-11 深圳中兴力维技术有限公司 Method and system for improving large data volume query performance
US20140324875A1 (en) * 2013-04-29 2014-10-30 Keyw Corporation Index for fast batch updates of large data tables
CN105608197A (en) * 2015-12-25 2016-05-25 Tcl集团股份有限公司 Method and system for obtaining Memcache data under high concurrency
CN105843895A (en) * 2016-03-22 2016-08-10 北京建飞无限科技有限公司 EhCache-based data querying and synchronizing method, device and system
CN106021468A (en) * 2016-05-17 2016-10-12 上海携程商务有限公司 Updating method and system for distributed caches and local caches

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
倪高鹏: "基于Memcached的缓存系统设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019212B (en) * 2017-11-29 2021-06-18 杭州海康威视数字技术股份有限公司 Data processing method and device and database server
CN110019340A (en) * 2017-12-08 2019-07-16 北京新媒传信科技有限公司 Data storage/read method, apparatus and system
CN111352957A (en) * 2020-02-25 2020-06-30 京东数字科技控股有限公司 Remote dictionary service optimization method and related equipment
CN113010535A (en) * 2021-03-12 2021-06-22 北京百度网讯科技有限公司 Cache data updating method, device, equipment and storage medium
CN113010535B (en) * 2021-03-12 2024-03-08 北京百度网讯科技有限公司 Cache data updating method, device, equipment and storage medium
CN113297280A (en) * 2021-06-10 2021-08-24 北京开科唯识技术股份有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN107330119B (en) 2018-08-03

Similar Documents

Publication Publication Date Title
CN107330119A (en) Caching data processing method, electronic equipment, computer-readable storage medium
US20210357479A1 (en) Methods and apparatus for sorting data
CN107360224B (en) Method, system, device and storage medium for generating serial number in distributed system
CN108228646B (en) Method and electronic device for accessing data
CN111414389B (en) Data processing method and device, electronic equipment and storage medium
CN107911470A (en) Distributed dynamic load-balancing method, computing device and computer-readable storage medium
CN109447820B (en) Data processing method, device, computer equipment and storage medium
CN107333248B (en) A kind of real-time sending method of short message and system
CN110389812B (en) Method, apparatus, and computer-readable storage medium for managing virtual machines
CN108021333A (en) The system of random read-write data, device and method
CN107239485A (en) Database operation method, apparatus and system
CN111752960B (en) Data processing method and device
CN105791080A (en) Group-sending message processing method and system as well as electronic device
CN104639550A (en) User identification method and equipment
CN109240893B (en) Application running state query method and terminal equipment
CN105389394A (en) Data request processing method and device based on a plurality of database clusters
CN106528876B (en) The information processing method and distributed information processing system of distributed system
CN103020196A (en) System for processing database operation request
CN108897858A (en) The appraisal procedure and device, electronic equipment of distributed type assemblies index fragment
CN110109867A (en) Improve the method, apparatus and computer program product of on-line mode detection
CN107992420A (en) Put forward the management method and system of survey project
CN110945506B (en) Searchable encryption supporting hybrid indexes
CN104636135A (en) Node access method and system, client side agent and client side
US10185735B2 (en) Distributed database system and a non-transitory computer readable medium
CN108255875A (en) Message is stored to the method and apparatus of distributed file system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant