CN107330119B - Caching data processing method, electronic equipment, computer storage media - Google Patents

Caching data processing method, electronic equipment, computer storage media Download PDF

Info

Publication number
CN107330119B
CN107330119B CN201710574172.3A CN201710574172A CN107330119B CN 107330119 B CN107330119 B CN 107330119B CN 201710574172 A CN201710574172 A CN 201710574172A CN 107330119 B CN107330119 B CN 107330119B
Authority
CN
China
Prior art keywords
data
key
update
data key
service
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.)
Active
Application number
CN201710574172.3A
Other languages
Chinese (zh)
Other versions
CN107330119A (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

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

Description

Caching data processing method, electronic equipment, computer storage media
Technical field
The present invention relates to software fields, and in particular to a kind of caching data processing method, electronic equipment, computer storage are situated between Matter.
Background technology
When inquiring 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 when inquiry according in library.If in the buffer by data key and its storage of corresponding result, when needs are looked into When inquiry, it can be inquired from caching and obtain corresponding data, and then greatly improve inquiry velocity, can preferably cope with business needs It asks.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 acquire data when being inquired from caching.
But when the data of actual storage in database change, since what is still stored in caching is the number not changed According to the data obtained from caching in inquiry are not correct data.When the data in database change, need pair Caching is refreshed, and data therein are updated.The prior art is general using in caching when refreshing to caching Data carry out delete 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 one rule of data in caching, speed is slow and efficiency is low.Business can also be weighed when realizing Assignment again newly is carried out to the data in caching so that there is reprocessing in processing.
Invention content
In view of the above problems, it is proposed that the present invention overcoming the above problem in order to provide one kind or solves at least partly State the caching data processing method, electronic equipment, computer storage media of problem.
According to an aspect of the invention, there is provided a kind of caching data processing method comprising:
According to the update feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of update type of service 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 updated preset data key generating algorithm, caching the second data used are generated according to the first data key 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, a kind of electronic equipment is provided, including:Processor, memory, communication interface and Communication bus, the processor, the memory and the communication interface complete mutual communication by the communication bus;
For the memory for storing an at least executable instruction, it is following that the executable instruction makes the processor execute Operation:
According to the update feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of update type of service 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 updated preset data key generating algorithm, caching the second data used are generated according to the first data key 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, provide a kind of computer storage media, be stored in the storage medium to A few executable instruction, the executable instruction make the processor execute following operation:
According to the update feedback information of batch data, the algorithm of the corresponding preset data key generating algorithm of update type of service 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 updated preset data key generating algorithm, caching the second data used are generated according to the first data key Key;
The corresponding data query result of first data key and the second data key are associated, and stored in the buffer.
According to caching data processing method provided by the invention, electronic equipment, computer storage media, when generation lot number When according to update, according to the update feedback information of batch data, the calculation of the corresponding preset data key generating algorithm of update type of service The method factor.After the data inquiry request for receiving client transmission, using updated preset data key generating algorithm, according to The first data key that data inquiry request carries generates caching the second data key used;The corresponding data of first data key are looked into It askes result and the second data key is associated, and store in the buffer.Thus by updated data, and use present count after update The the second data key storage generated according to key generating algorithm when subsequent query in the buffer to use.Meanwhile it being deposited in caching Data key in the case where not being queried use, can by caching be deleted automatically.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention, And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.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 charts of according to embodiments of the present invention two caching data processing method;
Fig. 3 shows the structural schematic diagram of according to embodiments of the present invention four a kind of electronic equipment.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is 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 Completely it is communicated 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 comprises the following steps:
Step S101, according to the update feedback information of batch data, the corresponding preset data key of update type of service generates The algorithm factor of algorithm.
When batch data updates, the price as stored many books in database, when to the valence of a large amount of books New discount is arranged in lattice, when modifying to books price, has batch data and is required to be updated.According to database to criticizing Feedback information after amount being updated of data, or according to business in the update for completing the updated batch data of batch data Feedback information, can therefrom obtain with the relevant type of service of the batch data, and update the corresponding preset data of type of service The algorithm factor of key generating algorithm.Type of service is to update the specific business of the batch data, such as value traffic.It is not of the same trade or business Service type corresponds to the algorithm factor in different preset data key generating algorithms, and 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 number, letter, symbol, more New algorithm can be updated algorithm factor according to preset update rule because of the period of the day from 11 p.m. to 1 a.m.
Optionally, algorithm factor contains the data update version factor.To the algorithm factor of preset data key generating algorithm Update, including the update to the data update version factor.Such as the value of the corresponding data update version factor of a certain type of service Be 1, when the batch data of the type of service is updated, the corresponding data update version of corresponding update type of service because The value of son is 2.Further, when update, the more new range of the data update version factor can also be set, reuse more new range The data update version factor is arranged in interior value.The update ranging from 1-5000 of the data update version factor is such as set, data are worked as After more the new version factor is updated to 5000, it is updated to 1 when updating the data the more new version factor, is continued since 1 again Update.
If data do not have batch updating, the algorithm factor in preset data key generating algorithm not to update.
Step S102 receives the data inquiry request that client is sent.
When client needs to inquire 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 data the first data key with The data key that data are stored in database is consistent.Meanwhile according to the data inquiry request received, the data can also be obtained and looked into Ask the corresponding type of service of request.Such as according to the process path of data inquiry request, inquire relevant configuration information, send out data The page info etc. of inquiry request, 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 is generated according to the first data key used in caching using updated preset data key generating algorithm Second data key.
Using updated preset data key generating algorithm, the second data key is generated.Second data key is mainly used for caching The data of middle storage.Second data key is generated according to the first data key, can include the first number when generation in the second data key It is included in the second data key according to key, and by the algorithm factor in preset data key generating algorithm.As preset data key generates The second data key that algorithm generates is the combination of the first data key and algorithm factor or preset data key generating algorithm generates the Two data keies are by the first data key and algorithm factor according to being obtained after functional operation.Preset data key generating algorithm is according to reality It applies situation to be configured, not limit herein.
The corresponding data query result of first data key and the second data key are associated, and are stored in slow by step S104 In depositing.
Updated data query result is inquired according to the first data key, by the data query result and the second of generation Data key is associated, generates one-to-one data key values pair.By the data key values to storing in the buffer.
When needing to inquire data again, after receiving the data inquiry request that client is sent, preset data key is utilized The second data key that generating algorithm generates is identical with the second data key in caching.It can be from caching according to the second data key In find its corresponding data query result.If the update of batch data occurs, the algorithm of preset data key generating algorithm The factor can be also updated accordingly.It then needs to regenerate the second new data key using preset data key generating algorithm, and The second new data key is different with the second old data key in caching, will not search the second old number from caching again According to key.Since 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 the operation for deleting the legacy data key-value pair stored in caching manually is eliminated.Or caching can be set Expired time is deleted automatically when the time that the second old data key in caching is not accessed reaching expired time It removes.
According to caching data processing method provided by the invention, when batch data update occurs, according to batch data Update feedback information, the algorithm factor of the corresponding preset data key generating algorithm of update type of service.Receiving client hair After the data inquiry request sent, using updated preset data key generating algorithm, first carried according to data inquiry request Data key generates caching the second data key used;The corresponding data query result of first data key is related to the second data key Connection, and store in the buffer.Thus by updated data, and use second of preset data key generating algorithm generation after update Data key storage when subsequent query in the buffer to use.Meanwhile to already existing old data key in caching its not Again by use in the case of, by caching be deleted automatically, avoid being manually operated, improve data cached elimination efficiency.
Embodiment two
Fig. 2 shows the flow charts of according to embodiments of the present invention two caching data processing method, as shown in Fig. 2, caching Data processing method includes the following steps:
Step S201, according to the update feedback information of batch data, the corresponding data cached expired mark of setting type of service Note.
Step S202, according to the corresponding data cached expired label of type of service, the corresponding present count of update type of service According to the algorithm factor of key generating algorithm.
According to the update feedback information of batch data, first judge whether the amount of updating the data of batch data is more than default update Threshold value.If so, data cached expired label is arranged according to the type of service of batch data.If the amount of updating the data of batch data It is only 10 less than default update threshold value, such as the amount of updating the data of batch data, it can be data cached by updating manually.
According to the corresponding data cached expired label of type of service, the corresponding preset data key of the type of service can be updated The algorithm factor of generating algorithm.The factor needed in algorithm factor, that is, preset data key generating algorithm.Preset data key generates Algorithm is specially such as to data key prefixing or suffix algorithm.Wherein, the particular content of prefix or suffix has included at least data Update version information and traffic type information.Different service types correspond to different prefix or suffixes.Update algorithm factor i.e. more The content that its new prefix or suffix is included.Update when, according to the type of service of batch data, find comprising and the business The prefix or suffix of the traffic type information of type matching.The data update version for being included to the prefix or suffix found Information is updated.Data update version information can such as use number, letter, symbol to be identified, and when update will be old Data update version information adds 1 to obtain new data update version information;Or;By old data update version information when update New data update version information etc. is arranged in update in alphabetical order.Further, when update, data update version can also be set Data update version information is arranged in the more new range of this information, the value reused in more new range.Data update is such as set The update of version information ranging from 1-5000 is updating the data more new version after data update version information is updated to 5000 It is updated to 1 when 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 returns.
When client needs to inquire 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 data the first data key with The data key that data are stored in database is consistent.Meanwhile according to the data inquiry request received, the data can also be obtained and looked into Ask the corresponding type of service of request.Such as according to the process path of data inquiry request, inquire relevant configuration information, send out data The page info etc. of inquiry request, can obtain the type of service corresponding to data inquiry request.Different business have difference The data inquiry request of type of service.Since batch data is updated, and it is corresponding corresponding slow provided with type of service The expired label of deposit data.According to data cached overdue indicator, it is known that data are updated, and the data in caching at this time are not most New data.Therefore, it is necessary to which the data inquiry request is sent to database, and receive the first data key pair of database return The query result answered.
Step S205 generates caching the second data used using preset data key generating algorithm according to the first data key Key.
Using updated preset data key generating algorithm, increase prefix or suffix for the first data key, generates the second number According to key.Wherein, the particular content of prefix or suffix after step S202 updates by obtaining.Second data key is mainly used for depositing in caching The data of storage.
The corresponding data query result of first data key and the second data key are associated, and are stored in slow by step S206 In depositing.
The corresponding query result of the first data key that database is returned is associated with the second data key generated, generates one One corresponding data key values pair.By the data key values to storing in the buffer.
Further, after data query result and the storage to caching of the second data key, it is also necessary to eliminate data cached expired Label, that is, the data in caching have been latest data.
When needing to inquire data again, after receiving the data inquiry request that client is sent, preset data key is utilized The second data key that generating algorithm generates is identical with the second data key in caching.At this point, being not provided with data cached mistake Phase identifies, and can directly find its corresponding data query result from caching according to the second data key.If lot number occurs According to update when, the algorithm factor of preset data key generating algorithm can be also updated accordingly.It then needs 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.Since there are data cached overdue indicators, the second old data key is no longer searched from caching, and from database directly Searching data.Since 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 the operation for deleting the legacy data key-value pair stored in caching manually is eliminated.Or it can be arranged Cache expired time, when time that the second old data key in caching is not accessed reaching expired time, automatically by its into Row is deleted.
Type of service pair is set when batch data update occurs according to caching data processing method provided by the invention The data cached expired label 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 for receiving client transmission, it is corresponding that its is searched from database Query result.And updated preset data key generating algorithm is utilized, increase prefix or suffix for the first data key, generates second Data key.The corresponding data query result of first data key and the second data key are associated, and stored in the buffer.Thus will Updated data, and stored in the buffer with after an action of the bowels using the second data key that preset data key generating algorithm after update generates It is used when continuous inquiry.Meanwhile to already existing old data key in caching in the case where it is no longer used, certainly by caching It is dynamic to be deleted, it avoids being manually operated, improves data cached elimination efficiency.
Embodiment three
The embodiment of the present application three provides a kind of nonvolatile computer storage media, the computer storage media storage There are an at least executable instruction, the computer executable instructions to can perform the data cached processing in above-mentioned any means embodiment Method.
Executable instruction specifically can be used for so that processor executes following operation:According to the update feedback letter of batch data Breath, the algorithm factor of the corresponding preset data key generating algorithm of update type of service;The data query that client is sent is received to ask It asks;Data inquiry request carries the first data key of data to be checked;Utilize updated preset data key generating algorithm, root Caching the second data key used 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 update version factor.
In a kind of optional embodiment, executable instruction further makes processor execute following operation:According to batch The update feedback information of data, the corresponding data cached expired label of setting type of service;According to the corresponding caching of type of service The expired label of data, the algorithm factor of the corresponding preset data key generating algorithm of update type of service.
In a kind of optional embodiment, executable instruction further makes processor execute following operation:According to batch The update feedback information of data, judges whether the amount of updating the data of batch data is more than default update threshold value;If so, setting caching The expired label of data.
In a kind of optional embodiment, preset data key generating algorithm is specially prefixing or suffix algorithm, prefix Or suffix includes at least data update version information and traffic type information;It is following that executable instruction further executes processor Operation:According to the type of service of batch data, find comprising with the prefix of the matched traffic type information of the type of service or Suffix;The data update version information that the found prefix or suffix of update is included;For the first data key increase prefix or Suffix.
In a kind of optional embodiment, executable instruction further makes processor execute following operation:Receive data The corresponding query result of the first data key that library returns.
Example IV
Fig. 3 shows the structural schematic diagram of according to embodiments of the present invention four a kind of electronic equipment, present invention specific implementation Example does not limit the specific implementation of electronic equipment.
As shown in figure 3, the electronic equipment may 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, for being communicated with the network element of miscellaneous equipment such as client or other servers etc..
Processor 302 can specifically be executed for executing program 310 in above-mentioned caching data processing method embodiment Correlation step.
Specifically, program 310 may include program code, which includes computer-managed instruction.
Processor 302 may be central processor CPU or specific integrated circuit ASIC (Application Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention Road.The one or more processors that server includes can be same type of processor, such as one or more CPU;It can also It is different types of processor, such as one or more CPU and one or more ASIC.
Memory 306, for storing program 310.Memory 306 may include high-speed RAM memory, it is also possible to further include Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 310 specifically can be used for so that processor 302 executes following operation:
In a kind of optional embodiment, program 310 is for so that processor 302 is fed back according to the update of batch data Information, the algorithm factor of the corresponding preset data key generating algorithm of update 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 updated preset data key generating algorithm, Caching the second data key used is generated according to the first data key;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 update version factor.
In a kind of optional embodiment, program 310 is for so that processor 302 is fed back according to the update of batch data Information, the corresponding data cached expired label of setting type of service;According to the corresponding data cached expired label 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 for so that processor 302 is fed back according to the update of batch data Information, judges whether the amount of updating the data of batch data is more than default update threshold value;If so, the data cached expired label of setting.
In a kind of optional embodiment, preset data key generating algorithm is specially prefixing or suffix algorithm, prefix Or suffix includes at least data update version information and traffic type information;Program 310 is for making processor 302 according to batch The type of service of data is found comprising the prefix or suffix with the matched traffic type information of the type of service;Update is looked into The data update version information that the prefix or suffix found is included;Increase prefix or suffix for the first data key.
In a kind of optional embodiment, program 310 is for so that processor 302 receives the first number that database returns According to the corresponding query result of key.
The specific implementation of each step may refer in the corresponding steps in above-mentioned data cached Processing Example in program 310 Corresponding description, this will not be repeated 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, can refer to corresponding processes in the foregoing method embodiment description, This is repeated no more.
The scheme provided through this embodiment, when batch data update occurs, according to the update feedback letter of batch data Breath, the algorithm factor of the corresponding preset data key generating algorithm of update type of service.It is looked into the data for receiving client transmission After asking request, using updated preset data key generating algorithm, generated according to the first data key that data inquiry request carries 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.To be deposited by updated data, and using the second data key that preset data key generating algorithm after update generates Storage when subsequent query in the buffer to use.Meanwhile in caching already existing data key the case where not being queried use Under, it can be automatically deleted by caching.
In the instructions provided here, 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 without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description of 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 Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, such as right As claim reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows tool Thus claims of body embodiment are expressly incorporated in the specific implementation mode, wherein each claim conduct itself The separate embodiments of the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in the one or more equipment different from the embodiment.It 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.Other than such feature and/or at least some of process or unit exclude each other, it may be used any Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached 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 requires, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of arbitrary It mode can use 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 mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude 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 several different elements and being come by means of properly programmed computer real It is existing.The use of word first, second, and third does not indicate that any sequence.These words can be construed to title.

Claims (12)

1. a kind of caching data processing method comprising:
According to the update feedback information of batch data, the corresponding data cached expired label of setting type of service updates service class The algorithm factor of the corresponding preset data key generating algorithm of type;
Receive the data inquiry request that client is sent;The data inquiry request carries the first data of data to be checked Key;
Receive the corresponding query result of first data key that database returns;
Using updated preset data key generating algorithm, caching the second data used are generated according to first data key 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 includes the data update version factor.
3. according to the method described in claim 1, wherein, service class is arranged in the update feedback information according to batch data The corresponding data cached expired label of type further comprises:
According to the update feedback information of batch data, judge whether the amount of updating the data of the batch data is more than default update threshold Value;
If so, the corresponding data cached expired label of setting type of service.
4. 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 include at least data update version information and traffic type information;
The update feedback information according to batch data, the corresponding data cached expired label of setting type of service, updates industry The algorithm factor of the corresponding preset data key generating algorithm of service type further comprises:
According to the type of service of batch data, find comprising with the prefix of the matched traffic type information of the type of service or after Sew;
The data update version information that the found prefix or suffix of update is included;
It is described to utilize updated preset data key generating algorithm, caching the second number used is generated according to first data key Further comprise according to key:Increase prefix or suffix for first data key.
5. 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 makes the processor execute following behaviour for storing an at least executable instruction, the executable instruction Make:
According to the update feedback information of batch data, the corresponding data cached expired label of setting type of service updates service class The algorithm factor of the corresponding preset data key generating algorithm of type;
Receive the data inquiry request that client is sent;The data inquiry request carries the first data of data to be checked Key;
Receive the corresponding query result of first data key that database returns;
Using updated preset data key generating algorithm, caching the second data used are generated according to first data key Key;
The corresponding data query result of first data key and second data key are associated, and stored in the buffer.
6. electronic equipment according to claim 5, the algorithm factor includes the data update version factor.
7. electronic equipment according to claim 5, the executable instruction further makes the processor execute following behaviour Make:
According to the update feedback information of batch data, judge whether the amount of updating the data of the batch data is more than default update threshold Value;
If so, the corresponding data cached expired label of setting type of service.
8. electronic equipment according to claim 5, the preset data key generating algorithm is specially that prefixing or suffix are calculated Method, the prefix or suffix include at least data update version information and traffic type information;
The executable instruction further makes the processor execute following operation:
According to the type of service of batch data, find comprising with the prefix of the matched traffic type information of the type of service or after Sew;
The data update version information that the found prefix or suffix of update is included;
Increase prefix or suffix for first data key.
9. a kind of computer storage media, an at least executable instruction, the executable instruction are stored in the storage medium Processor is set to execute following operation:
According to the update feedback information of batch data, the corresponding data cached expired label of setting type of service updates service class The algorithm factor of the corresponding preset data key generating algorithm of type;
Receive the data inquiry request that client is sent;The data inquiry request carries the first data of data to be checked Key;
Receive the corresponding query result of first data key that database returns;
Using updated preset data key generating algorithm, caching the second data used are generated according to first data key Key;
The corresponding data query result of first data key and second data key are associated, and stored in the buffer.
10. computer storage media according to claim 9, the algorithm factor includes the data update version factor.
11. computer storage media according to claim 9, the executable instruction further executes the processor It operates below:
According to the update feedback information of batch data, judge whether the amount of updating the data of the batch data is more than default update threshold Value;
If so, the corresponding data cached expired label of setting type of service.
12. computer storage media according to claim 9, the preset data key generating algorithm be specially prefixing or Suffix algorithm, the prefix or suffix include at least data update version information and traffic type information;
The executable instruction further makes the processor execute following operation:
According to the type of service of batch data, find comprising with the prefix of the matched traffic type information of the type of service or after Sew;
The data update version information that the found prefix or suffix of update is included;
Increase prefix or suffix for first data key.
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 CN107330119A (en) 2017-11-07
CN107330119B true 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)

Families Citing this family (5)

* 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
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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541927B (en) * 2010-12-30 2013-11-13 北京新媒传信科技有限公司 Method and device for realizing data cache
CN102902730B (en) * 2012-09-10 2016-04-20 新浪网技术(中国)有限公司 Based on data reading method and the device of data buffer storage
CN103853727B (en) * 2012-11-29 2018-07-31 深圳中兴力维技术有限公司 Improve the method and system of big data quantity query performance
US20140324875A1 (en) * 2013-04-29 2014-10-30 Keyw Corporation Index for fast batch updates of large data tables

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN107330119A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN107330119B (en) Caching data processing method, electronic equipment, computer storage media
CN103678494B (en) Client synchronization services the method and device of end data
CN103020193B (en) The method and apparatus of process database operations request
CN108055343A (en) For the method for data synchronization and device of computer room
CN104933051B (en) File storage recovery method and device
CN110389812B (en) Method, apparatus, and computer-readable storage medium for managing virtual machines
CN108280227A (en) Data information processing method based on caching and device
CN109033278A (en) Data processing method, device, electronic equipment and computer storage medium
CN106997431A (en) A kind of data processing method and device
CN108021333A (en) The system of random read-write data, device and method
CN103020196B (en) The system of process database operations request
CN108809704A (en) Data deduplication statistical method based on dynamic time windows and device
CN108833584A (en) Information push method, terminal, server and computer storage medium
CN105677645A (en) Data sheet comparison method and device
CN105389394A (en) Data request processing method and device based on a plurality of database clusters
KR20140111255A (en) Method and system for data filing systems
CN106528876B (en) The information processing method and distributed information processing system of distributed system
CN107992420A (en) Put forward the management method and system of survey project
CN104636135A (en) Node access method and system, client side agent and client side
CN110109867A (en) Improve the method, apparatus and computer program product of on-line mode detection
CN109033158A (en) Data deduplication statistical method and device based on specified time window
US9230011B1 (en) Index-based querying of archived data sets
CN107315693B (en) Data storage method and device
CN109857740A (en) Storage method, matching process, electronic equipment and the readable storage medium storing program for executing of character string
CN107679198A (en) The querying method and device of information

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