CN108509562A - Method for processing business, device, electronic equipment and storage medium - Google Patents

Method for processing business, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN108509562A
CN108509562A CN201810246389.6A CN201810246389A CN108509562A CN 108509562 A CN108509562 A CN 108509562A CN 201810246389 A CN201810246389 A CN 201810246389A CN 108509562 A CN108509562 A CN 108509562A
Authority
CN
China
Prior art keywords
service
pairing
caching
buffer
service buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810246389.6A
Other languages
Chinese (zh)
Other versions
CN108509562B (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.)
Poly Polytron Technologies Inc
Juhaokan Technology Co Ltd
Original Assignee
Poly Polytron Technologies Inc
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 Poly Polytron Technologies Inc filed Critical Poly Polytron Technologies Inc
Priority to CN201810246389.6A priority Critical patent/CN108509562B/en
Publication of CN108509562A publication Critical patent/CN108509562A/en
Application granted granted Critical
Publication of CN108509562B publication Critical patent/CN108509562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment provides a kind of method for processing business, device, electronic equipment and storage mediums, are related to field of computer technology.This method includes:Receive the service request of target service;Corresponding service buffer is obtained based on the service request;And refresh the service buffer and pairing caching in pairing cache invalidation corresponding with the service buffer, for the pairing caching for notifying the out-of-service time to the service buffer to refresh, the out-of-service time of the pairing caching is less than the out-of-service time of the service buffer.The problem of technical solution of the embodiment of the present invention can prevent caching from penetrating while efficient process business.

Description

Method for processing business, device, electronic equipment and storage medium
Technical field
The present invention relates to field of computer technology, in particular to a kind of method for processing business, business processing device, Electronic equipment and computer readable storage medium.
Background technology
It is also increasing by the portfolio of network processes with becoming increasingly popular for internet.How day is efficiently handled The portfolio that benefit increases becomes focus of attention.
In a kind of technical solution, the reprocessing and transmission of business datum are avoided by the way that service buffer is arranged.Reference Shown in Fig. 1, which may include:Service Processing Module 120, service buffer module 130 and physical database 140.When Service Processing Module 120 receives the service request of client 110, the business and right asked according to client 110 The key value answered generates the key value of inquiry business caching, is inquired from business cache module 130 according to the key value corresponding Service buffer directly returns to the business datum that the service buffer includes if corresponding service buffer exists to client 110;If There is no corresponding service buffer, then Service Processing Module 120 inquires physical database 140, and query result is returned to client 110, while the data inquired being written in service buffer module 130 and the out-of-service time is set.In service buffer effective time It is interior, it can directly read service buffer when receiving same request and return to business datum.
However, this technical solution can have that caching penetrates, i.e., after the expired failure of service buffer, at first Before the business datum write-in service buffer that the service request of access database obtains, a large number of services request hit is during which had not Caching and the case where directly arrive physical data library inquiry, correspondingly can also cause that the same service buffer is repeatedly written.
It should be noted that information is only used for reinforcing the reason to background of the present invention disclosed in above-mentioned background technology part Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Invention content
The embodiment of the present invention be designed to provide a kind of method for processing business, business processing device, electronic equipment and Computer readable storage medium, and then overcome at least to a certain extent one caused by the limitation and defect of the relevant technologies A or multiple problems.
According to a first aspect of the embodiments of the present invention, a kind of method for processing business is provided, including:Receive target service Service request;Corresponding service buffer is obtained based on the service request;And it is slow in pairing corresponding with the service buffer Refresh the service buffer and the pairing caching when depositing failure, the pairing caching is for notifying the mistake to the service buffer The effect time is refreshed, and the out-of-service time of the pairing caching is less than the out-of-service time of the service buffer.
In some embodiments of the invention, aforementioned schemes, the out-of-service time of the service buffer and the pairing are based on The difference of the out-of-service time of caching is more than the request response time of service buffer described in the service request miss.
In some embodiments of the invention, aforementioned schemes, the out-of-service time of the pairing caching and the business are based on The ratio of the out-of-service time of caching is in the range of 90% to 95%.
In some embodiments of the invention, aforementioned schemes are based on, caches and loses in pairing corresponding with the service buffer Refresh the service buffer when effect, including:Judge whether to need to continue to safeguard corresponding business in the pairing cache invalidation Caching;The when of continuing to safeguard the service buffer is needed to reset the service buffer and pairing caching in judgement.
In some embodiments of the invention, aforementioned schemes are based on, judge whether to need to continue to safeguard that corresponding business is slow It deposits, including:Judge whether the mark value of the pairing caching is effective;It is determined when judging that the mark value is effective and needs to continue to tie up Protect corresponding service buffer.
In some embodiments of the invention, aforementioned schemes are based on, the method for processing business further includes:In the pairing When receiving the service request under caching non-failure case, judge whether the mark value of the pairing caching is effective;Sentencing The mark value is set as effective when the mark value of the fixed pairing caching is invalid.
In some embodiments of the invention, aforementioned schemes are based on, caches and loses in pairing corresponding with the service buffer The service buffer and pairing caching are reset when effect, including:Monitor pairing caching corresponding with the service buffer; The service buffer and pairing caching are reset when listening to the pairing cache invalidation.
In some embodiments of the invention, aforementioned schemes are based on, the service buffer is reset, including:Again it sets Set business datum and the out-of-service time of the service buffer.
In some embodiments of the invention, aforementioned schemes are based on, the business datum of the service buffer is reset, are wrapped It includes:Business datum corresponding with the service buffer is obtained from target database;It is reset based on the business datum described The business datum of service buffer.
In some embodiments of the invention, aforementioned schemes are based on, resetting the pairing caching includes:It resets The out-of-service time of the pairing caching.
In some embodiments of the invention, aforementioned schemes are based on, the method for processing business further includes:Generate the industry Business caching and pairing corresponding with service buffer caching.
According to a second aspect of the embodiments of the present invention, a kind of business processing device is provided, including:Receiving unit is used for Receive the service request of target service;Service Processing Unit, for obtaining corresponding service buffer based on the service request;It is slow Flashing processing units are deposited, for refreshing the service buffer and described in pairing cache invalidation corresponding with the service buffer Pairing caching, the pairing are cached for notifying the out-of-service time to the service buffer to refresh, the pairing caching Out-of-service time is less than the out-of-service time of the service buffer.
According to a third aspect of the embodiments of the present invention, a kind of electronic equipment is provided, including:Processor;And memory, It is stored with computer-readable instruction on the memory, is realized when the computer-readable instruction is executed by the processor as above State the method for processing business described in first aspect.
According to a fourth aspect of the embodiments of the present invention, a kind of computer readable storage medium is provided, meter is stored thereon with Calculation machine program realizes the method for processing business as described in above-mentioned first aspect when the computer program is executed by processor.
In the technical solution that some embodiments of the present invention are provided, on the one hand, in order to directly be read from caching Business datum is taken, corresponding service buffer is obtained based on service request, so as to efficiently processing business;On the other hand, exist Match cache invalidation when, Refresh Services caching and pairing caching, by match cache notice service buffer to its out-of-service time into Row update can utilize the failure in pairing caching since the out-of-service time of pairing caching is less than the out-of-service time of service buffer Time automatically prolongs the service buffer term of validity, the problem of so as to prevent caching from penetrating, and then avoids the occurrence of and repeatedly writes The case where entering the same service buffer.
It should be understood that above general description and following detailed description is only exemplary and explanatory, not It can the limitation present invention.
Description of the drawings
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the present invention Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.In the accompanying drawings:
Fig. 1 shows a kind of schematic block diagram of the business processing device in technical solution;
Fig. 2 shows the flow diagrams of method for processing business according to some embodiments of the present invention;
Fig. 3 shows the schematic block diagram of business processing device according to some embodiments of the present invention;
Fig. 4 shows pairing caching and service buffer defined in method for processing business according to some embodiments of the present invention Schematic procedure;
Fig. 5 shows that service buffer and pairing are arranged in method for processing business according to some embodiments of the present invention to be cached Out-of-service time schematic procedure;
Fig. 6 shows the signal journey that pairing caching is monitored in method for processing business according to some embodiments of the present invention Sequence;
Fig. 7, which is shown, generates Refresh Services caching and pairing in method for processing business according to some embodiments of the present invention The schematic procedure of the task of caching;
Fig. 8, which is shown, refreshes pairing caching and service buffer in method for processing business according to some embodiments of the present invention Schematic procedure;
Fig. 9 shows the schematic block diagram of business processing device according to some embodiments of the present invention;
Figure 10 shows the structural schematic diagram of the computer system of the electronic equipment suitable for being used for realizing the embodiment of the present invention.
Specific implementation mode
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be real in a variety of forms It applies, and is not understood as limited to embodiment set forth herein;On the contrary, thesing embodiments are provided so that the present invention will be comprehensively and complete It is whole, and the design of example embodiment is comprehensively communicated to those skilled in the art.Identical reference numeral indicates in figure Same or similar part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to fully understand the embodiment of the present invention to provide.However, It will be appreciated by persons skilled in the art that technical scheme of the present invention can be put into practice without one or more in specific detail, Or other methods, constituent element, device, step may be used etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy each aspect of the present invention.
Block diagram shown in attached drawing is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in attached drawing is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to be changed according to actual conditions.
To solve the problems, such as that caching concurrently penetrates, in a kind of technical solution, block traffic is asked after service buffer failure It asks, is read again after service buffer re-writes business datum, but this mode can lead to cache the use being blocked before brush again Family request cannot get service response, influence user experience;It is this by the way of spare caching in another technical solution Mode is poor in terms of timeliness and reliability compared to single service buffer mode, and increases the complexity of business processing.
Based on the above a kind of method for processing business is provided in some embodiments of invention.With reference to shown in Fig. 2, The method for processing business may include:
Step S210 receives the service request of target service;
Step S220 obtains corresponding service buffer based on the service request;And
Step S230 refreshes the service buffer in pairing cache invalidation corresponding with the service buffer and described matches To caching, the pairing caching is for notifying the out-of-service time to the service buffer to refresh, the mistake of the pairing caching Imitate out-of-service time of the time less than the service buffer.
Example embodiment according to fig. 2, on the one hand, in order to directly read business datum from caching, be based on business The corresponding service buffer of acquisition request, so as to efficiently processing business;On the other hand, when matching cache invalidation, refresh Service buffer and pairing cache, and are updated to its out-of-service time by matching caching notice service buffer, since pairing caches Out-of-service time be less than out-of-service time of service buffer, the out-of-service time in pairing caching can be utilized to automatically prolong service buffer The term of validity so as to prevent from caching the problem of penetrating, and then avoids the occurrence of the feelings that the same service buffer is repeatedly written Condition.
In the following, by the method for processing business of the example embodiment in Fig. 2 is described in detail.
In step S210, the service request of target service is received.
In fig. 2 it is possible to the service request of the target service from client be received, for example, the acquisition that client is sent The service request of business datum.The service request of target service can be the request for the business datum for obtaining database purchase, It can be the request for obtaining content of text, can also be the request for obtaining picture material or other kinds of business datum, this hair It is bright to this without particular determination.
In step S220, corresponding service buffer is obtained based on the service request.
In the exemplary embodiment in figure 2, common business datum in target service is cached in advance, generates target industry The information of the commodity can be generated in advance for example, when target service is to inquire the information of a certain commodity in the service buffer of business Service buffer.It is slow from business according to the service request when receiving the service request of inquiring information of goods of client transmission Deposit the corresponding information of middle acquisition.
In step S230, refresh the service buffer and institute in pairing cache invalidation corresponding with the service buffer Pairing caching is stated, the pairing caching is for notifying the out-of-service time to the service buffer to refresh, the pairing caching Out-of-service time be less than the service buffer out-of-service time.
In the exemplary embodiment in figure 2, corresponding pairing caching is generated simultaneously when generating the service buffer of target service, The notice that pairing caching is brushed again for generating service buffer failure, and the out-of-service time of caching is matched less than service buffer Out-of-service time.When matching cache invalidation notify cache flush processing module Refresh Services caching, cache flush processing module from Target database obtains the business datum in business datum and Refresh Services caching.
In addition, in order to reserve the processing that cache flush processing module reads data from target database and Refresh Services cache Time needs the difference by the out-of-service time of service buffer and the out-of-service time of pairing caching to be set as being more than service request miss industry Be engaged in the request response time of caching, the request response time may include miss service buffer and from target data library inquiry industry The time for data of being engaged in and the time that business datum is written to service buffer.
Further, in order to avoid frequent Refresh Services cache, out-of-service time and the service buffer that will match caching are needed Out-of-service time ratio control in the range of 90% to 95%.
Application scenarios additionally, there are service buffer as hotspot caching, i.e., if received in the service buffer term of validity To the service request of corresponding business, then this service buffer is continued to, otherwise service buffer reaches the out-of-service time and withers away automatically, waits for Have next time and triggers generation service buffer again in service request.
For such application scenarios, whether needed after the mark value of setting pairing caching can be used to fail as service buffer Again the label of Refresh Services caching.For example, establishing is to be not required to after 0,0 expression service buffer expires to the initial markers value of caching It being further continued for safeguarding this service buffer, i.e. mark value is invalid, and 1 expression service buffer needs to continue to safeguard this service buffer after expiring, I.e. mark value is effective.If detecting that new service request arrives in the pairing caching term of validity, pairing caching is checked Whether mark value is 0, and the mark value is set as 1 if the mark value of pairing caching is 0.
Further, judge whether the mark value of pairing caching is 1 when listening to pairing cache invalidation notice, if mark Note value is 1 and Refresh Services is needed to cache and match caching to maintain the presence of service buffer, is not needed if mark value is 0 Refresh Services cache and corresponding pairing caching.
Further, when to reset service buffer may include business datum and the failure for resetting service buffer Between.For example, business datum corresponding with service buffer can be obtained from target database, industry is reset based on the business datum The business datum of business caching.It may include the out-of-service time for resetting pairing caching to reset pairing caching.
Fig. 3 shows the schematic block diagram of business processing device according to some embodiments of the present invention.
With reference to shown in Fig. 3, which may include:Service Processing Module 320, delays service buffer module 330 Deposit refresh process module 340, pairing cache module 350 and target database 360.
Service Processing Module 320 is used to receive the service request of the transmission of client 110 and handles the service request. Service buffer module 330 is used to generate and safeguard the service buffer of generation.Pairing cache module 350 is for generating and safeguarding generation Pairing caching, and when match cache invalidation generate cache invalidation notify.Cache flush processing module 340 is for receiving It is corresponding in setting service buffer 330 and in pairing caching 350 when the cache invalidation sent to pairing cache module 350 notifies It is data cached.
When starting the business processing device, service buffer module 330 generates service buffer, and (referred to as A, out-of-service time are T1), at the same match cache module 350 generate it is corresponding for notify service buffer failure brush again pairing caching (be known as B, lose The effect time is T2), service buffer A and pairing caching B pairings use, T2<T1 and T2-T1=△ t are more than service request miss The request response time of service buffer, the request response time may include miss service buffer and from target data library inquiries The time of business datum and the time that business datum is written to service buffer.
Service buffer A is safeguarded by cache flush processing module 340, and using the informing function of cache invalidation, B is cached in pairing Cache flush processing module, cache flush processing module 340 is notified to inquire physical database and obtain corresponding business number when failure A is cached according to simultaneously active Refresh Services, goes to inquire to make the request of client 110 not to be penetrated into target database 360 always.
Specifically, setting the out-of-service time of service buffer A as 1 hour, the out-of-service time of corresponding pairing caching B is 55 points Clock, the out-of-service time of synchronous two cachings of setting, so service buffer A is consistent with the time that caching B comes into force is matched.Cause This, fails first 5 minutes in service buffer A, and pairing caching B failures match cache module 350 and generate what service buffer was brushed again at this time Notice, and the notice is sent to cache flush processing module 340.Cache flush processing module 340 resets service buffer A Cache contents, and reset pairing caching B.
Exist it is possible to further which the out-of-service time of caching B and the out-of-service time ratio control of service buffer A will be matched 90%-95% caches to avoid frequent Refresh Services, and reserved cache flush processing module reads business number from physical database The processing time of service buffer is re-write according to this and by business datum.
Fig. 4 shows pairing caching and service buffer defined in method for processing business according to some embodiments of the present invention Schematic procedure.
With reference to shown in Fig. 4, pass through out-of-service time data, that is, date of enumeration type definition pairing caching and service buffer And time data.In Fig. 4, for example, mapp_systemapp_all is service buffer, mapp_systemapp_all_time It is cached for pairing, defines the date key dataKey and time-critical word timeKey of pairing caching and service buffer.It is logical Cross getDataKey () method and getTimeKey () method can obtain pairing caching and service buffer date key and Time-critical word, and then the out-of-service time of pairing caching and service buffer can be obtained.
The failure of out-of-service time and pairing caching that service buffer is set according to some embodiments of invention are shown in Fig. 5 The schematic procedure of time.Referring to Figure 5, the out-of-service time of service buffer is 1 hour, the out-of-service time of corresponding pairing caching It is 55 minutes.
Fig. 6 shows the schematic procedure for monitoring pairing caching according to some embodiments of the present invention.With reference to shown in Fig. 6, lead to Cross enabling new thread monitor pairing caching whether fail, listen to pairing cache invalidation when then reset service buffer and Pairing caching.For service buffer, business datum and the out-of-service time of service buffer are reset;Pairing is cached, weight The out-of-service time of new setting pairing caching.
Fig. 7, which is shown, generates Refresh Services caching and pairing in method for processing business according to some embodiments of the present invention The schematic procedure of the task of caching.With reference to shown in Fig. 7, when matching cache invalidation, that is, notification message message in time etc. When the out-of-service time of pairing caching, the task of Refresh Services caching and pairing caching is generated.
Fig. 8, which is shown, refreshes pairing caching and service buffer in method for processing business according to some embodiments of the present invention Schematic procedure.With reference to shown in Fig. 8, the out-of-service time of service buffer and pairing caching is reacquired, and passes through setValue () The out-of-service time of service buffer and pairing caching is arranged in method.
It should be noted that the program in example embodiment in Fig. 4 to Fig. 8 can be write with Java language, it can also It is write with programming languages such as Python, C++, the present invention is to this without particular determination.
In addition, in some embodiments of the invention, additionally providing a kind of business processing device.With reference to shown in Fig. 9, the industry Business processing unit 900 may include:Receiving unit 910, Service Processing Unit 920 and cache flush processing unit 930.Its In, receiving unit 910 is used to receive the service request of target service;Service Processing Unit 920 is used to be based on the service request Obtain corresponding service buffer;Cache flush processing unit 930 is used in pairing cache invalidation corresponding with the service buffer When refresh the service buffer and pairing caching, the pairing caching is for notifying out-of-service time to the service buffer Refreshed, the out-of-service time of the pairing caching is less than the out-of-service time of the service buffer.
In some embodiments of the invention, aforementioned schemes, the out-of-service time of the service buffer and the pairing are based on The difference of the out-of-service time of caching is more than the request response time of service buffer described in the service request miss.
In some embodiments of the invention, aforementioned schemes, the out-of-service time of the pairing caching and the business are based on The ratio of the out-of-service time of caching is in the range of 90% to 95%.
In some embodiments of the invention, aforementioned schemes are based on, cache flush processing unit 930 includes:Judging unit, For judging whether to need to continue to safeguard corresponding service buffer in the pairing cache invalidation;Buffer setting unit, is used for The when of continuing to safeguard the service buffer is needed to reset the service buffer and pairing caching in judgement.
In some embodiments of the invention, aforementioned schemes are based on, judging unit is configured to:Judge the pairing caching Mark value it is whether effective;It is determined when judging that the mark value is effective and needs to continue to safeguard corresponding service buffer.
In some embodiments of the invention, aforementioned schemes are based on, business processing device 900 further includes:Marker for judgment list Member when for receiving the service request under caching non-failure case in the pairing, judges the mark of the pairing caching Whether note value is effective;Flag setting unit, for setting the mark value when judging that the mark value of the pairing caching is invalid It is set to effectively.
In some embodiments of the invention, aforementioned schemes are based on, buffer setting unit 930 is configured to:Monitoring and institute State the corresponding pairing caching of service buffer;The service buffer and described is reset when listening to the pairing cache invalidation Pairing caching.
In some embodiments of the invention, aforementioned schemes are based on, buffer setting unit 930 is configured to:It resets The business datum of the service buffer and out-of-service time.
In some embodiments of the invention, aforementioned schemes are based on, buffer setting unit 930 is configured to:From number of targets Business datum corresponding with the service buffer is obtained according to library;The industry of the service buffer is reset based on the business datum Business data.
In some embodiments of the invention, aforementioned schemes are based on, buffer setting unit 930 is configured to:It resets The out-of-service time of the pairing caching.
In some embodiments of the invention, aforementioned schemes are based on, business processing device 900 further includes:Caching generates single Member, for generating the service buffer and the pairing caching corresponding with the service buffer.
Each function module due to the business processing device 900 of example embodiments of the present invention and above-mentioned business processing side The step of example embodiment of method, corresponds to, therefore details are not described herein.
In an exemplary embodiment of the present invention, a kind of electronic equipment that can realize the above method is additionally provided.
Below with reference to Figure 10, it illustrates the computer systems suitable for the electronic equipment for realizing the embodiment of the present invention 1000 structural schematic diagram.The computer system 1000 of electronic equipment shown in Figure 10 is only an example, should not be to the present invention The function and use scope of embodiment bring any restrictions.
As shown in Figure 10, computer system 1000 include central processing unit (CPU) 1001, can according to be stored in only It reads the program in memory (ROM) 1002 or is loaded into random access storage device (RAM) 1003 from storage section 1008 Program and execute various actions appropriate and processing.In RAM 1003, be also stored with various programs needed for system operatio and Data.CPU 1001, ROM 1002 and RAM 1003 are connected with each other by bus 1004.Input/output (I/O) interface 1005 It is also connected to bus 1004.
It is connected to I/O interfaces 1005 with lower component:Importation 1006 including keyboard, mouse etc.;Including such as cathode The output par, c 1007 of ray tube (CRT), liquid crystal display (LCD) etc. and loud speaker etc.;Storage section including hard disk etc. 1008;And the communications portion 1009 of the network interface card including LAN card, modem etc..Communications portion 1009 passes through Communication process is executed by the network of such as internet.Driver 1010 is also according to needing to be connected to I/O interfaces 1005.It is detachable to be situated between Matter 1011, such as disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on driver 1010 as needed, so as to In being mounted into storage section 1008 as needed from the computer program read thereon.
Particularly, according to an embodiment of the invention, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, the embodiment of the present invention includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed by communications portion 1009 from network, and/or from detachable media 1011 are mounted.When the computer program is executed by central processing unit (CPU) 1001, executes and limited in the system of the application Above-mentioned function.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two arbitrarily combines.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or arbitrary above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more conducting wires, just It takes formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type and may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, can be any include computer readable storage medium or storage journey The tangible medium of sequence, the program can be commanded the either device use or in connection of execution system, device.And at this In invention, computer-readable signal media may include in a base band or as the data-signal that a carrier wave part is propagated, Wherein carry computer-readable program code.Diversified forms may be used in the data-signal of this propagation, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By instruction execution system, device either device use or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc. or above-mentioned Any appropriate combination.
Flow chart in attached drawing and block diagram, it is illustrated that according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part for a part for one module, program segment, or code of table, above-mentioned module, program segment, or code includes one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depended on the functions involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part realizes that described unit can also be arranged in the processor.Wherein, the title of these units is in certain situation Under do not constitute restriction to the unit itself.
As on the other hand, present invention also provides a kind of computer-readable medium, which can be Included in electronic equipment described in above-described embodiment;Can also be individualism, and without be incorporated the electronic equipment in. Above computer readable medium carries one or more program, when the electronics is set by one for said one or multiple programs When standby execution so that the electronic equipment realizes the method for processing business as described in above-described embodiment.
For example, the electronic equipment may be implemented as shown in Figure 2:Step S210, the business for receiving target service are asked It asks;Step S220 obtains corresponding service buffer based on the service request;And step S230, with the service buffer Refresh the service buffer and the pairing caching when corresponding pairing cache invalidation, the pairing caching is for notifying to described The out-of-service time of service buffer is refreshed, and the out-of-service time of the pairing caching is less than the out-of-service time of the service buffer.
It should be noted that although being referred to several modules for acting the device executed in above-detailed Or unit, but this division is not enforceable.In fact, according to the embodiment of the present invention, above-described two Or more the feature and function of module either unit can be embodied in a module or unit.Conversely, above-described Either the feature and function of unit can be further divided into and embodied by multiple modules or unit one module.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention The technical solution of embodiment can be expressed in the form of software products, the software product can be stored in one it is non-volatile Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, touch control terminal or network equipment etc.) is executed according to embodiment of the present invention Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the present invention Its embodiment.This application is intended to cover the present invention any variations, uses, or adaptations, these modifications, purposes or Person's adaptive change follows the general principle of the present invention and includes undocumented common knowledge in the art of the invention Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following Claim is pointed out.
It should be understood that the invention is not limited in the precision architectures for being described above and being shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of method for processing business, which is characterized in that including:
Receive the service request of target service;
Corresponding service buffer is obtained based on the service request;And
Refresh the service buffer and pairing caching in pairing cache invalidation corresponding with the service buffer, it is described to match To caching for notifying the out-of-service time to the service buffer to refresh, the out-of-service time of the pairing caching is less than described The out-of-service time of service buffer.
2. method for processing business according to claim 1, which is characterized in that the out-of-service time of the service buffer with it is described The difference for matching the out-of-service time of caching is more than the request response time of service buffer described in the service request miss.
3. method for processing business according to claim 1, which is characterized in that it is described pairing caching out-of-service time with it is described The ratio of the out-of-service time of service buffer is in the range of 90% to 95%.
4. method for processing business according to claim 1, which is characterized in that slow in pairing corresponding with the service buffer Refresh the service buffer when depositing failure, including:
Judge whether to need to continue to safeguard corresponding service buffer in the pairing cache invalidation;
The when of continuing to safeguard the service buffer is needed to reset the service buffer and pairing caching in judgement.
5. method for processing business according to claim 4, which is characterized in that judge whether to need to continue to safeguard corresponding industry Business caching, including:
Judge whether the mark value of the pairing caching is effective;
It is determined when judging that the mark value is effective and needs to continue to safeguard corresponding service buffer.
6. method for processing business according to claim 5, which is characterized in that the method for processing business further includes:
When receiving the service request under the pairing caches non-failure case, the mark value of the pairing caching is judged Whether effectively;
The mark value is set as effective when judging that the mark value of the pairing caching is invalid.
7. according to any method for processing business of claim 1-6, which is characterized in that the service buffer is reset, Including:
Reset business datum and the out-of-service time of the service buffer.
8. a kind of business processing device, which is characterized in that including:
Receiving unit, the service request for receiving target service;
Service Processing Unit, for obtaining corresponding service buffer based on the service request;
Cache flush processing unit, for refreshing the service buffer in pairing cache invalidation corresponding with the service buffer It is cached with the pairing, the pairing caching is for notifying the out-of-service time to the service buffer to refresh, the pairing The out-of-service time of caching is less than the out-of-service time of the service buffer.
9. a kind of electronic equipment, which is characterized in that including:
Processor;And
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor The method for processing business as described in any one of claim 1 to 7 is realized when row.
10. a kind of computer readable storage medium, is stored thereon with computer program, the computer program is executed by processor Method for processing business of the Shi Shixian as described in any one of claim 1 to 7.
CN201810246389.6A 2018-03-23 2018-03-23 Service processing method and device, electronic equipment and storage medium Active CN108509562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810246389.6A CN108509562B (en) 2018-03-23 2018-03-23 Service processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810246389.6A CN108509562B (en) 2018-03-23 2018-03-23 Service processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108509562A true CN108509562A (en) 2018-09-07
CN108509562B CN108509562B (en) 2022-02-11

Family

ID=63378184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810246389.6A Active CN108509562B (en) 2018-03-23 2018-03-23 Service processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108509562B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543492A (en) * 2019-08-13 2019-12-06 中国银行股份有限公司 Method and device for preventing cache from failing
CN113556349A (en) * 2021-07-23 2021-10-26 海信集团控股股份有限公司 Gateway authentication method and device and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174861A1 (en) * 2009-01-06 2010-07-08 Disney Enterprises, Inc. System And Method For Refreshing Cached Data Based On Content Update Frequency
CN103631727A (en) * 2012-08-27 2014-03-12 阿里巴巴集团控股有限公司 Buffer management method and buffer management system for buffer server
CN105630819A (en) * 2014-11-03 2016-06-01 阿里巴巴集团控股有限公司 Cached data refreshing method and apparatus
CN106815287A (en) * 2016-12-06 2017-06-09 中国银联股份有限公司 A kind of buffer memory management method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174861A1 (en) * 2009-01-06 2010-07-08 Disney Enterprises, Inc. System And Method For Refreshing Cached Data Based On Content Update Frequency
CN103631727A (en) * 2012-08-27 2014-03-12 阿里巴巴集团控股有限公司 Buffer management method and buffer management system for buffer server
CN105630819A (en) * 2014-11-03 2016-06-01 阿里巴巴集团控股有限公司 Cached data refreshing method and apparatus
CN106815287A (en) * 2016-12-06 2017-06-09 中国银联股份有限公司 A kind of buffer memory management method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543492A (en) * 2019-08-13 2019-12-06 中国银行股份有限公司 Method and device for preventing cache from failing
CN113556349A (en) * 2021-07-23 2021-10-26 海信集团控股股份有限公司 Gateway authentication method and device and electronic equipment

Also Published As

Publication number Publication date
CN108509562B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN109640319A (en) Dispatching method, device and electronic equipment based on access information
CN109697075A (en) File updating method, system and device
CN103577407A (en) Query method and query device for distributed database
GB2606092A (en) Systems and methods for enabling a highly available managed failover service
CN109189835A (en) The method and apparatus of the wide table of data are generated in real time
CN109299348A (en) A kind of data query method, apparatus, electronic equipment and storage medium
CN108921712A (en) Data processing method, device, medium and electronic equipment
CN109492013A (en) Data processing method, device and system applied to data-base cluster
CN109299194A (en) Multi-edition data memory management method and device, electronic equipment, storage medium
US20190295036A1 (en) Method and apparatus for planning route
CN110019213A (en) Data managing method, device, electronic equipment and storage medium
CN109284843A (en) Office space management method, device, medium and electronic equipment based on block chain
US20150154511A1 (en) Availability watching
CN109614439A (en) Method of data synchronization, device, electronic equipment and storage medium
CN105243001B (en) The abnormality alarming method and device of business object
CN110196860A (en) Unique identification distribution method and device, electronic equipment, storage medium
CN109547261A (en) Service line switching method, device, electronic equipment and storage medium
CN108733787A (en) Database operation method, device, electronic equipment and storage medium
CN108509562A (en) Method for processing business, device, electronic equipment and storage medium
CN108833205A (en) Information processing method, device, electronic equipment and storage medium
CN109828980A (en) Data cache method, device, terminal and storage medium
CN110221857A (en) The problem of application program restorative procedure, device, electronic equipment and storage medium
US20080126430A1 (en) Intermediary document for critical change control
CN108959642A (en) Method and apparatus for information to be written
CN104428761B (en) The reduction of network congestion

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