Movatterモバイル変換


[0]ホーム

URL:


CN107786595A - The processing method of keyword, apparatus and system in distributed memory system - Google Patents

The processing method of keyword, apparatus and system in distributed memory system
Download PDF

Info

Publication number
CN107786595A
CN107786595ACN201610730918.0ACN201610730918ACN107786595ACN 107786595 ACN107786595 ACN 107786595ACN 201610730918 ACN201610730918 ACN 201610730918ACN 107786595 ACN107786595 ACN 107786595A
Authority
CN
China
Prior art keywords
keyword
focus
server
client
numerical value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610730918.0A
Other languages
Chinese (zh)
Inventor
余汶龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding LtdfiledCriticalAlibaba Group Holding Ltd
Priority to CN201610730918.0ApriorityCriticalpatent/CN107786595A/en
Publication of CN107786595ApublicationCriticalpatent/CN107786595A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

This programme embodiment provides the processing method of keyword, apparatus and system in a kind of distributed memory system.On the one hand, in this programme embodiment, server receives the read data request that client is sent, and keyword is carried in read data request;So as to, server reads numerical value corresponding with keyword, and, server sends numerical value corresponding with keyword and for indicating that keyword is the information of focus keyword in response to identifying that keyword is focus keyword, to client.In this way, when client initiates the read data request for keyword again, numerical value corresponding with keyword can be obtained from local, solve the reading hot issue in the distributed memory system in the prior art based on keyword numerical value.

Description

The processing method of keyword, apparatus and system in distributed memory system
【Technical field】
This programme is related to a kind of processing side of keyword in database technical field, more particularly to distributed memory systemMethod, apparatus and system.
【Background technology】
Traditional based in keyword-numerical value (Key-Value) distributed memory system, client request is closed to certainWhen numerical value corresponding to key word performs read/write operation, cryptographic Hash (Hash) can be calculated according to the keyword, then by the cryptographic HashCorresponding server performs read operation or the write operation of numerical value.
During this programme is realized, scheme people has found that at least there are the following problems in the prior art:
Fig. 1 is refer to, it is the exemplary plot of distributed memory system in the prior art based on keyword-numerical value, such as Fig. 1Shown, in actual application, in rush hour section, substantial amounts of client can initiate the reading data for same keywordRequest, for example, for certain some commodity sales promotion, hot news or focus comment for applying etc., so, according to the keywordCryptographic Hash, the read data request that these clients are sent can be all fallen on same server, cause the load meeting of the serverSerious aggravation, for example, the server 1 (request that have received a large amount of clients) in Fig. 1.Moreover, even in distributed storageIncrease server in system also not act on, because the cryptographic Hash of same keyword is identical, therefore be directed to same keywordRead data request still can all fall on the server that this is newly increased.Therefore, such server turns into system bottleneck, can be withReferred to as " reading hot issue ".
【The content of the invention】
In view of this, this programme embodiment provides the processing method of keyword, device in a kind of distributed memory systemAnd system, to solve the reading hot issue in the distributed memory system in the prior art based on keyword-numerical value.
In a first aspect, this programme embodiment provides a kind of processing method of keyword in distributed memory system, performOn server, including:
The read data request that client is sent is received, keyword is carried in the read data request;
Read numerical value corresponding with the keyword;
In response to identifying that the keyword is focus keyword, sent to the client corresponding with the keywordNumerical value and for indicating that the keyword is the information of focus keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, for indicatingThe information that keyword is focus keyword is stated to be used to indicate the client by the keyword and corresponding with the keywordNumerical value is stored in local.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, in response to identificationIt is focus keyword to go out the keyword, to client transmission numerical value corresponding with the keyword and described for indicatingBefore keyword is the information of focus keyword, in addition to:
Judge whether the keyword belongs to the hotspot list previously generated, the hotspot list is used to store the serviceThe focus keyword that device identifies in advance;
If judging, the keyword belongs to the hotspot list, and it is focus keyword to identify the keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, judge the passWhether key word belongs to before the hotspot list previously generated, in addition to:
For other each read data requests received, the Kazakhstan of the keyword carried in other each read data requests of acquisitionUncommon value, and according to the cryptographic Hash, the keyword carried in other each read data requests hit is corresponding to the cryptographic HashSet;
Focus set is determined in each set;
Focus keyword is found in the focus set, and the focus keyword is added to the hotspot list.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, it is described in each collectionFocus set is determined in conjunction, including:
When the quantity of other read data requests received reaches default sampling number threshold value, obtain and closed in each setThe average value of the hit-count of keyword in the standard deviation of the hit-count of key word and each set, and, determine the life of keywordThe maximum set of middle number;
If judge the cumulative and big with the ratio of the average value of the standard deviation of the hit-count of keyword in each setIn predetermined coefficient, and judge that the query rate per second of the maximum set of the hit-count of keyword is more than or equal to default firstQuery rate threshold value, determine that the maximum collection of the hit-count of the keyword is combined into focus set.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, it is described describedFocus keyword is found in focus set, including:
The access times of each keyword and total access times of each keyword in focus set described in real-time statistics, untilWhen total access times of each keyword reach statistics number threshold value in the focus set, stop counting and obtain access times mostBig at least one keyword;
By the query rate per second of each keyword in the maximum at least one keyword of the access times respectively with presettingSecond query rate threshold value is compared, and query rate per second in the maximum at least one keyword of the access times is more than orPerson is equal to the keyword of default second query rate threshold value as focus keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, in addition to:If sentenceBreak and the keyword and be not belonging to the hotspot list, it is not focus keyword to identify the keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, in addition to:
In response to identifying that the keyword is not focus keyword, sent to the client corresponding with the keywordNumerical value, in order to which the client pair numerical value corresponding with the keyword stores.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, it is described to describedClient is sent for indicating that the keyword is the configured information of focus keyword, including:
Generation feedback bag, the feedback carry the keyword in wrapping;
The feedback bag is sent to the client.
Second aspect, this programme embodiment also provide a kind of processing method of keyword in distributed memory system, performOn the server, including:
The read data request that client is sent is received, keyword is carried in the read data request;
Read numerical value corresponding with the keyword;
In response to identifying that the keyword is focus keyword, to the client send the keyword and with instituteState numerical value corresponding to keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the keywordFor indicating that the keyword and numerical value corresponding with the keyword are stored in local by the client.
The third aspect, this programme embodiment also provide a kind of processing method of keyword in distributed memory system, performOn the client, including:
Whether the keyword that inquiry is sent to server is stored in local designated storage location;
Local designated storage location is stored in if inquiring and being sent to the keyword of server, specified from local is depositedStorage space, which is put, obtains numerical value corresponding with the keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, in addition to:
Local designated storage location is not stored in if inquiring and being sent to the keyword of the server, to serviceDevice sends read data request, and keyword is carried in the read data request;
Receive the numerical value corresponding with the keyword of the server return and for indicating that the keyword is focusThe information of keyword;
According to it is described be used for indicate that the keyword is the information of focus keyword, by the keyword and with the keyNumerical value corresponding to word is stored in local designated storage location.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, in addition to:
Local designated storage location is not stored in if inquiring and being sent to the keyword of the server, to serviceDevice sends read data request, and keyword is carried in the read data request;
Receive the keyword and the numerical value corresponding with the keyword that the server returns, and by the keyWord and numerical value corresponding with the keyword are stored in local designated storage location.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, in addition to:
Local designated storage location is not stored in if inquiring and being sent to the keyword of the server, to serviceDevice sends read data request, and keyword is carried in the read data request;
The numerical value corresponding with the keyword that the server returns is received, and will numerical value corresponding with the keywordIt is stored in local designated storage location.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described specify are depositedStorage space is set to local cache.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, method also include:
Non-hot keyword is stored in the designated storage location by refusal;And/or
Delete non-hot keyword stored in the designated storage location;And/or
According to the default expired duration of caching, by expired focus key word deletion in the designated storage location.
Fourth aspect, this programme embodiment also provide a kind of processing method of keyword in distributed memory system, including:
Whether the keyword that client query is sent to server is stored in local designated storage location;
If the client query is not stored in local specified storage to the keyword for being sent to the serverPosition, read data request is sent to server, keyword is carried in the read data request;
The server reads numerical value corresponding with the keyword, and, in response to identifying the keyword for heatPoint keyword, numerical value corresponding with the keyword is sent and for indicating that the keyword is focus key to the clientThe information of word;
The client is used to indicate that the keyword is the information of focus keyword according to described, by the keyword andNumerical value corresponding with the keyword is stored in local designated storage location;
If the client query is stored in local designated storage location to the keyword for being sent to server, from thisGround obtains numerical value corresponding with the keyword.
5th aspect, this programme embodiment also provide a kind of processing method of keyword in distributed memory system, including:
Whether the keyword that client query is sent to server is stored in local designated storage location;
If the client query is not stored in local specified storage to the keyword for being sent to the serverPosition, read data request is sent to server, keyword is carried in the read data request;
The server reads numerical value corresponding with the keyword, and, in response to identifying the keyword for heatPoint keyword, the keyword and numerical value corresponding with the keyword are sent to the client;
The keyword and numerical value corresponding with the keyword are stored in local specified storage position by the clientPut;
If the client query is stored in local designated storage location to the keyword for being sent to server, from thisGround obtains numerical value corresponding with the keyword.
6th aspect, this programme embodiment also provides a kind of processing unit of keyword in distributed memory system, describedDevice is arranged on server, including:
Receiving unit, for receiving the read data request of client transmission, keyword is carried in the read data request;
Processing unit, for reading numerical value corresponding with the keyword;
Transmitting element, in response to identifying that the keyword is focus keyword, sent to the client and instituteState numerical value corresponding to keyword and for indicating that the keyword is the information of focus keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, for indicatingThe information that keyword is focus keyword is stated to be used to indicate the client by the keyword and corresponding with the keywordNumerical value is stored in local.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described device is alsoIncluding:
Recognition unit, for judging whether the keyword belongs to the hotspot list previously generated, the hotspot list is usedIn the focus keyword that the storage server identifies in advance;If judging, the keyword belongs to the hotspot list, knowsIt is focus keyword not go out the keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described device is alsoIncluding list update unit;
The list update unit, for other each read data requests received for the receiving unit, obtain everyThe cryptographic Hash of the keyword carried in other individual read data requests, and according to the cryptographic Hash, will other each read data requestsGather corresponding to the keyword hit to the cryptographic Hash of middle carrying;And for determining focus set in each set;WithAnd it is added to the hotspot list for finding focus keyword in the focus set, and by the focus keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the list is moreWhen new unit is used to determine focus set in each set, it is specifically used for:
When the quantity for other read data requests that the receiving unit receives reaches default sampling number threshold value, obtainIn each set in the standard deviation of the hit-count of keyword and each set the hit-count of keyword average value, and, reallyDetermine the maximum set of the hit-count of keyword;
If judge the cumulative and big with the ratio of the average value of the standard deviation of the hit-count of keyword in each setIn predetermined coefficient, and judge that the query rate per second of the maximum set of the hit-count of keyword is more than or equal to default firstQuery rate threshold value, determine that the maximum collection of the hit-count of the keyword is combined into focus set.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the list is moreWhen new unit is used to find focus keyword in the focus set, it is specifically used for:
The access times of each keyword and total access times of each keyword in focus set described in real-time statistics, untilWhen total access times of each keyword reach statistics number threshold value in the focus set, stop counting and obtain access times mostBig at least one keyword;
By the query rate per second of each keyword in the maximum at least one keyword of the access times respectively with presettingSecond query rate threshold value is compared, and query rate per second in the maximum at least one keyword of the access times is more than orPerson is equal to the keyword of default second query rate threshold value as focus keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the identification are singleMember, it is additionally operable to:If judging, the keyword is not belonging to the hotspot list, and it is not focus key to identify the keywordWord.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, it is described to send listMember, it is additionally operable to:
Identify that the keyword is not focus keyword in response to the recognition unit, to client transmission and instituteNumerical value corresponding to keyword is stated, in order to which the client pair numerical value corresponding with the keyword stores.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, it is described to send listMember to the client send for indicating the keyword be the configured information of focus keyword when, be specifically used for:
Feedback bag is generated, the keyword is carried in the feedback bag;
The feedback bag is sent to the client.
7th aspect, this programme embodiment also provides a kind of processing unit of keyword in distributed memory system, describedDevice is arranged on server, including:
Receiving unit, for receiving the read data request of client transmission, keyword is carried in the read data request;
Processing unit, for reading numerical value corresponding with the keyword;
Transmitting element, in response to identifying that the keyword is focus keyword, send to the client described inKeyword and numerical value corresponding with the keyword.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the keywordFor indicating that the keyword and numerical value corresponding with the keyword are stored in local by the client.
Eighth aspect, this programme embodiment also provides a kind of processing unit of keyword in distributed memory system, describedDevice is located at client, including:
Whether query unit, the keyword that server is sent to for inquiring about are stored in local designated storage location;
Processing unit, local finger is stored in if being inquired for the query unit and being sent to the keyword of serverDetermine storage location, numerical value corresponding with the keyword is obtained from the designated storage location of local.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described device is alsoIncluding:
First transmitting element, do not deposited if being inquired for the query unit and being sent to the keyword of the serverThe designated storage location in local is stored up, read data request is sent to server, keyword is carried in the read data request;
First receiving unit, for receiving the numerical value corresponding with the keyword of the server return and for indicatingThe keyword is the information of focus keyword;
The processing unit, it is additionally operable to be used to indicate that the keyword is the information of focus keyword according to described, by instituteState keyword and numerical value corresponding with the keyword is stored in local designated storage location.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described device is alsoIncluding:
Second transmitting element, if the keyword that the server is sent to for inquiring is not stored in local fingerDetermine storage location, send read data request to server, keyword is carried in the read data request;
Second receiving unit, for receiving the keyword that the server returns and corresponding with the keywordNumerical value;
The processing unit, it is additionally operable to the keyword and numerical value corresponding with the keyword being stored in local fingerDetermine storage location.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described device is alsoIncluding:
3rd transmitting element, if the keyword that the server is sent to for inquiring is not stored in local fingerDetermine storage location, send read data request to server, keyword is carried in the read data request;
3rd receiving unit, the numerical value corresponding with the keyword returned for receiving the server;
The processing unit, it is additionally operable to numerical value corresponding with the keyword being stored in local designated storage location.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described specify are depositedStorage space is set to local cache.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the processing are singleMember, it is additionally operable to:
Non-hot keyword is stored in the designated storage location by refusal;And/or
Delete non-hot keyword stored in the designated storage location;And/or
According to the default expired duration of caching, by expired focus key word deletion in the designated storage location.
9th aspect, this programme embodiment also provide a kind of distributed memory system, including client and server;
The client includes the processing unit of keyword in the distributed memory system that above-mentioned eighth aspect provides;
The server includes the processing unit of keyword in the distributed memory system that the above-mentioned 7th aspect provides.
Tenth aspect, this programme embodiment also provide a kind of distributed memory system, including client and server;
The client includes the processing unit of keyword in the distributed memory system that above-mentioned eighth aspect provides;
The server includes the processing unit of keyword in the distributed memory system that the above-mentioned 6th aspect provides.
As can be seen from the above technical solutions, this programme embodiment has the advantages that:
In this programme embodiment, server is after the read data request of client transmission is received, the key that is carried to itWhether word is that focus keyword is identified, if server identifies that keyword is focus keyword, sends and closes to clientNumerical value corresponding to key word and for indicating that keyword is the information of focus keyword, client can be according to the information by keywordCorresponding numerical value is stored in local designated storage location with keyword.In this way, when client is initiated to be directed to keyword againRead data request when, if from local designated storage location inquire numerical value corresponding to the keyword, it is possible to directly fromLocal designated storage location obtains numerical value corresponding with keyword, avoids the need for initiating for the keyword to server againRead data request, the hot issue of whole distributed memory system can effectively be shared in client-side, so as to alleviateThe load of the server, the server is avoided as the bottleneck in distributed memory system, solves and is based in the prior art" reading hot issue " in the distributed memory system of keyword-numerical value.
【Brief description of the drawings】
In order to illustrate more clearly of the technical scheme of this programme embodiment, below by embodiment it is required use it is attachedFigure is briefly described, it should be apparent that, drawings in the following description are only some embodiments of this programme, for this areaFor those of ordinary skill, without having to pay creative labor, it can also be obtained according to these accompanying drawings other attachedFigure.
Fig. 1 is the exemplary plot of the distributed memory system in the prior art based on keyword-numerical value;
Fig. 2 is the embodiment one of the processing method of keyword in the distributed memory system that this programme embodiment is providedSchematic flow sheet;
Fig. 3 is the first exemplary plot of the distributed memory system based on keyword-numerical value that this programme embodiment is provided;
Fig. 4 is the flow example figure of the method for the server update hotspot list that this programme embodiment is provided;
Fig. 5 is the embodiment two of the processing method of keyword in the distributed memory system that this programme embodiment is providedSchematic flow sheet;
Fig. 6 is the second exemplary plot of the distributed memory system based on keyword-numerical value that this programme embodiment is provided;
Fig. 7 is the embodiment three of the processing method of keyword in the distributed memory system that this programme embodiment is providedSchematic flow sheet;
Fig. 8 is the example IV of the processing method of keyword in the distributed memory system that this programme embodiment is providedSchematic flow sheet;
Fig. 9 is the embodiment five of the processing method of keyword in the distributed memory system that this programme embodiment is providedSchematic flow sheet;
Figure 10 is the embodiment six of the processing method of keyword in the distributed memory system that this programme embodiment is providedSchematic flow sheet;
Figure 11 is the embodiment seven of the processing method of keyword in the distributed memory system that this programme embodiment is providedFlow example figure;
Figure 12 is the embodiment one of the processing unit of keyword in the distributed memory system that this programme embodiment is providedFunctional block diagram;
Figure 13 is the embodiment two of the processing unit of keyword in the distributed memory system that this programme embodiment is providedFunctional block diagram;
Figure 14 is the embodiment three of the processing unit of keyword in the distributed memory system that this programme embodiment is providedFunctional block diagram;
Figure 15 is the example IV of the processing unit of keyword in the distributed memory system that this programme embodiment is providedFunctional block diagram;
Figure 16 is the embodiment five of the processing unit of keyword in the distributed memory system that this programme embodiment is providedFunctional block diagram;
Figure 17 is the structural representation for the distributed memory system that this programme embodiment is provided;
Figure 18 is the simplified block diagram of server 100;
Figure 19 is the simplified block diagram of client 200.
【Embodiment】
In order to be better understood from the technical scheme of this programme, this programme embodiment is retouched in detail below in conjunction with the accompanying drawingsState.
It will be appreciated that described embodiment is only this programme part of the embodiment, rather than whole embodiments.BaseEmbodiment in this programme, those of ordinary skill in the art obtained under the premise of creative work is not made it is all itsIts embodiment, belong to the scope of this programme protection.
The term used in this programme embodiment is only merely for the purpose of description specific embodiment, and is not intended to be limitingThis programme." one kind ", " described " and "the" of singulative used in this programme embodiment and appended claimsIt is also intended to including most forms, unless context clearly shows that other implications.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, representThere may be three kinds of relations, for example, A and/or B, can be represented:Individualism A, while A and B be present, individualism B these threeSituation.In addition, character "/" herein, it is a kind of relation of "or" to typically represent forward-backward correlation object.
Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ...When " or " in response to determining " or " in response to detection ".Similarly, depending on linguistic context, phrase " if it is determined that " or " if detection(condition or event of statement) " can be construed to " when it is determined that when " or " in response to determine " or " when the detection (condition of statementOr event) when " or " in response to detecting (condition or event of statement) ".
Embodiment one
This programme embodiment provides a kind of processing method of keyword in distributed memory system.The present embodiment is serverRealize a specific implementation of the processing method of keyword in distributed memory system in side.Fig. 2 is refer to, it is this programmeThe schematic flow sheet of the embodiment one of the processing method of keyword in the distributed memory system that embodiment is provided, as schemed instituteShow, this method comprises the following steps:
S201, the read data request that client is sent is received, keyword is carried in read data request.
S202, read numerical value corresponding with keyword.
S203, in response to identifying that keyword is focus keyword, to client send corresponding with keyword numerical value andFor indicating that keyword is the information of focus keyword.
Fig. 3 is refer to, the of its distributed memory system based on keyword-numerical value provided by this programme embodimentOne exemplary plot, as illustrated, the distributed memory system based on keyword-numerical value can include at least one client(Client) and at least two servers (Server), in Fig. 3 only by taking a client and three servers as an example.Wherein, respectivelyClient can initiate read data request to server, and keyword is carried in the read data request.
For example, as shown in figure 3, a routing unit can be set, by the routing unit between a client and a serverThe keyword carried in the read data request sent using Hash (Hash) algorithm to client carries out Hash operation, to be somebody's turn to doThe cryptographic Hash of keyword.Then, the routing unit can utilize the cryptographic Hash of the keyword to the distribution based on keyword-numerical valueThe sum of server carries out modulo operation in formula storage system, obtains operation result, the corresponding server of the operation result, entersAnd the read data request that client is sent can be routed to the server by the routing unit, in order to which server is to the reading dataRequest is handled.So, the read data request sent for each client may be by the cryptographic Hash of keyword, will readRequest of data is routed on specific server, is further processed by server.
Or in another example, as shown in figure 1, can also be by client itself to the pass in the read data request initiated of needsKey word calculates cryptographic Hash, then using the cryptographic Hash of the keyword to being taken in the distributed memory system based on keyword-numerical valueThe be engaged in sum of device carries out modulo operation, and obtaining operation result, the corresponding server of the operation result, and then the client can be withRead data request is directly sent to the server, in order to which the server is handled the read data request.
Further, server, can be according to the read data request after the read data request of client initiation is receivedThe keyword of middle carrying and the read data request, data corresponding with read data request are performed to numerical value corresponding to the keyword and graspedMake, to obtain data manipulation result.
In this programme embodiment, server can read numerical value corresponding with the keyword carried in read data request, phaseAnswer, the data manipulation result that server obtains is numerical value corresponding with keyword.That is, server is according to read data request,Judge that needs perform and read data manipulation, therefore server is read according to keyword and corresponding numerical value, so as to obtain and keyNumerical value corresponding to word.
Further, server, can be to the pass that wherein carries after the read data request of client transmission is receivedOperation is identified in key word, identifies whether the keyword is focus keyword.
It should be noted that in this programme embodiment, the step of whether keyword is focus keyword and step identifiedS202 execution sequence does not limit, for example, step S202 can be first carried out, rear perform identifies whether the keyword is that focus closesThe step of key word.Or step S202 and keyword the step of whether being focus keyword can also be identified while performed.OrPerson, it can also first carry out and the step of whether keyword is focus keyword identified, it is rear to perform step S202.
For example, in this programme embodiment, whether server identidication key is that the method for focus keyword can wrapInclude but be not limited to:Server judges whether keyword belongs to the hotspot list previously generated, and the hotspot list is used for storage serviceThe focus keyword that device identifies in advance.If server judges that keyword belongs to hotspot list, server identifies keywordIt is focus keyword.Conversely, if server judges that keyword is not belonging to hotspot list, server identifies that keyword is not heatPoint keyword, it is non-hot keyword to illustrate the keyword.
During a concrete implementation, server can safeguard a hotspot list, and server can received every timeTo after a read data request, the hotspot list is updated, realizes the real-time update of hotspot list.
Fig. 4 is refer to, the flow example of the method for its server update hotspot list provided by this programme embodimentFigure, as illustrated, the method that this programme embodiment is updated to hotspot list can include sample phase and positioning stage.
As shown in figure 4, in sample phase, other each read data requests for being received for server, server can obtainThe cryptographic Hash of keyword that each carries in other read data requests, then server is according to the cryptographic Hash, will it is each otherGather corresponding to the keyword hit to the cryptographic Hash carried in read data request, server determines focus collection in each setClose, the mark of focus set can be exported to next stage, i.e. positioning stage.For example, server safeguards 1024 set, soThe cryptographic Hash that keyword is carried in other each read data requests is calculated afterwards, and the sum 1024 of set is carried out using the cryptographic HashModulo operation, according to the operation result, keyword hit is gathered to corresponding, so, can be had in each set certainThe keyword of quantity.
As shown in figure 4, in positioning stage, the focus set that is obtained for server in sample phase, server can be withFocus keyword is further found in the focus set, focus keyword is finally added to above-mentioned hotspot list, realization pairThe renewal and maintenance of hotspot list.
For example, server determines that the method for focus set can include but is not limited in each set:
Sampling number threshold value (Sample_max) is pre-set in server, and server is receiving the mistake of read data requestCheng Zhong, record the hit-count of keyword and (other readings that i.e. server is currently received of present sample number in each setThe quantity of request of data), so, when the quantity for other read data requests that server receives reaches default sampling number thresholdDuring value, server calculates in each set the flat of the hit-count of keyword in the standard deviation of the hit-count of keyword and each setAverage, and server determines the maximum set of the hit-count of keyword.
Further, the standard deviation of the hit-count of keyword during server by utilizing is respectively gathered, calculate crucial in each setThe standard deviation of the hit-count of word cumulative and, and calculate the cumulative and ratio with above-mentioned average value, then by the ratio withPredetermined coefficient is compared.Meanwhile server is also needed to the query rate per second of the maximum set of the hit-count of keyword(Query Per Second, QPS) is compared with the first query rate threshold value.Wherein, the query rate per second of a set can be withThe ratio of the hit-count of keyword and the duration of a period of time in seconds in a period of time is integrated into equal to this.
If server judges the cumulative and ratio with average value of the standard deviation of the hit-count of keyword in each setMore than predetermined coefficient, and server judges that the query rate per second of the maximum set of the hit-count of keyword is more than or equal toDefault first query rate threshold value, server determine that the maximum collection of the hit-count of keyword is combined into focus set.So, serverIt may determine that and there is currently focus set, and then the mark of the focus set can be supplied to next stage, that is, positionIn the stage, focus keyword can be further found from focus set in positioning stage.
If conversely, server judge the cumulative of the standard deviation of the hit-count of keyword in each set and with average valueRatio is less than or equal to predetermined coefficient, and/or, server judges that maximum the per second of set of the hit-count of keyword is looked intoInquiry rate is less than default first query rate threshold value, and server determines that the maximum set of the hit-count of keyword is not focus set.In this way, server, which may determine that, there is currently no focus set, focus pass is there is currently no so as to which server may determine thatKey word.Or the focus set that server can also find the focus set that the last time is judged as this, by the last timeThe mark for the focus set judged is supplied to positioning stage.
Further, if server is judged to there is currently no focus set or judges to there is currently no focus keyWord, server can be clear to the present sample number (i.e. the quantity for other read data requests that server is currently received) of recordZero, and according to other read data requests received after clearing, restarting record present sample number, (i.e. server currently connectsThe quantity of other read data requests received), when present sample number reaches default sampling number threshold value, server continue fromEach aggregate relay is continuous to search focus set, so circulation, therefore, can constantly find focus set, and then can be from focus collectionFocus keyword is found in conjunction.
For example, the method that server finds focus keyword in focus set can include but is not limited to:
Because server is while focus set and focus keyword is searched, read data request can be also received, therefore,Server needs each access times of keyword and total access times of each keyword in real-time statistics focus set, until thisWhen total access times of each keyword reach default statistics number threshold value (reap_max) in focus set, server stops systemMeter, then server is ranked up, from sequence according to the descending order of access times to the keyword in the focus setAs a result it is middle to obtain the maximum at least one keyword of access times.Then, server is by the maximum at least one pass of access timesThe query rate per second of each keyword is respectively compared with default second query rate threshold value, and access times are maximum in key wordAt least one keyword in query rate per second be more than or equal to the keyword of default second query rate threshold value as focus passKey word, and then the focus keyword that will identify that is added in hotspot list, realizes the real-time update to hotspot list, so,As shown in figure 4, when server receives read data request, the data operation request can be carried from utilization hotspot listKeyword is made whether the quick identification for focus keyword.
It is understood that for example, ranking results are keyword 3, keyword 1, keyword 4, keyword 2 and keyword 5,The maximum at least one keyword of access times can be 3 keywords for sorting most forward in ranking results in ranking results,That is keyword 3, keyword 1 and keyword 4.
In this programme embodiment, hotspot list can be, but not limited to utilize at least uses algorithm (Least in the recent periodRecently Used, LRU) chained list realization.
It should be noted that in this programme embodiment, by first finding a focus set, and then in the focus setFocus keyword is found again, so as to quickly obtain focus keyword from numerous keywords, is avoided to all keysWord is all counted and screened, so improving the recognition efficiency of focus keyword.
As shown in figure 3, when server identifies that the keyword carried in the read data request received is focus keywordWhen, server needs numerical value corresponding with the keyword and for indicating that the keyword is that the information of focus keyword is all sentTo client, in order to which client is used for the information for indicating that the keyword is focus keyword according to this, determine that the keyword isFocus keyword, and then the focus keyword and numerical value corresponding with keyword are all stored.So, when the client againWhen secondary initiation is directed to the read data request of the keyword, it is focus key that the keyword can be known according to the keyword of storageWord, numerical value corresponding with the keyword can be got from the designated storage location of local, avoid the need for initiating to server againFor the read data request of the keyword, the hot issue of whole distributed memory system can effectively be divided in client-sideLoad, so as to alleviate the load of the server, the server is avoided as the bottleneck in distributed memory system, is solved" reading hot issue ".
For example, server is sent for indicating that keyword is the method for the configured information of focus keyword to clientIt can include but is not limited to:As shown in figure 4, server generation feedback wraps (Feedback), the keyword is carried in the feedback bag,Then server sends the feedback bag to client.So, when client receives the anti-of the carrying keyword of server transmissionDuring feedback bag, client can know that the keyword is focus keyword.
For example, the keyword and numerical value corresponding with the keyword can be stored in the local cache of client by client(Local-Cache) in.
In addition, if server judges that keyword is not belonging to hotspot list, server identifies that keyword is not that focus closesKey word, then server only need to send corresponding with keyword numerical value to client, in order to client only pair and the keyNumerical value is stored corresponding to word.
It should be noted that S201~S203 executive agent can be the processing dress of keyword in distributed memory systemPut, the device can be based in each server of the distributed memory system of keyword-numerical value.
Embodiment two
This programme embodiment gives a kind of processing method of keyword in distributed memory system.The present embodiment is serviceRealize another specific implementation of the processing method of keyword in distributed memory system in device side.Fig. 5 is refer to, it is weThe schematic flow sheet of the embodiment two of the processing method of keyword in the distributed memory system that case embodiment is provided, as schemed instituteShow, this method comprises the following steps:
S501, the read data request that client is sent is received, keyword is carried in read data request.
S502, read numerical value corresponding with keyword.
S503, in response to identifying that keyword is focus keyword, to client send keyword and with keyword pairThe numerical value answered.
It should be noted that in the present embodiment, it is right in embodiment one that S501 and S502 concrete methods of realizing may be referred toS201 and S202 description, is repeated no more here.
It is specifically described below only for the present embodiment and the difference of embodiment one.
Fig. 6 is refer to, the of its distributed memory system based on keyword-numerical value provided by this programme embodimentTwo exemplary plots, as illustrated, the distributed memory system based on keyword-numerical value can include at least one client(Client) and at least two servers (Server), in Fig. 6 only by taking a client and three servers as an example.Wherein, respectivelyClient can initiate read data request to server, and keyword is carried in the read data request.
In the present embodiment, server, can be to wherein carrying after the read data request of client transmission is receivedOperation is identified in keyword, identifies whether the keyword is focus keyword.As shown in fig. 6, when server identifies receptionTo read data request in the keyword that carries be focus keyword when, server need will numerical value corresponding with the keyword andThe keyword is all sent to client, to client send keyword be used for indicate client by keyword and with keyword pairThe numerical value answered is stored in local designated storage location.So, when the client initiates the reading data for the keyword againDuring request, it can know that the keyword is focus keyword according to the keyword of storage, can be from the specified storage position of localPut and get numerical value corresponding with the keyword, avoid the need for initiating the read data request for the keyword to server again,The hot issue of whole distributed memory system can effectively be shared in client-side, so as to alleviate the negative of the serverCarry, avoid the server as the bottleneck in distributed memory system, solve " reading hot issue ".
For example, the keyword and numerical value corresponding with the keyword can be stored in the local cache of client by client(Local-Cache) in.
In addition, if server judges that keyword is not belonging to hotspot list, server identifies that keyword is not that focus closesKey word, then server only need to send corresponding with keyword numerical value to client, in order to client only pair and the keyNumerical value is stored corresponding to word.
It should be noted that S501~S503 executive agent can be the processing dress of keyword in distributed memory systemPut, the device can be based in each server of the distributed memory system of keyword-numerical value.
Embodiment three
This programme embodiment gives a kind of processing method of keyword in distributed memory system, and the present embodiment is clientRealize the specific implementation of the processing method of keyword in distributed memory system in side.Fig. 7 is refer to, it is that this programme is realThe schematic flow sheet of the embodiment three of the processing method of keyword in the distributed memory system that example is provided is applied, as illustrated,This method comprises the following steps:
Whether S701, the keyword that inquiry is sent to server are stored in local designated storage location.
S702, local designated storage location is stored in if inquiring and being sent to the keyword of server, from localDesignated storage location obtains numerical value corresponding with keyword.
When it is focus keyword that server, which identifies the keyword carried in the read data request received, server willNumerical value corresponding with the keyword and for indicating that the keyword is that the information of focus keyword is all sent to client, clientNumerical value corresponding with keyword that the reception server is sent and for indicating that keyword is the information of focus keyword, then basisThis is used to indicate that the keyword is the information of focus keyword, and it is focus keyword to determine the keyword, and then to the keywordCorresponding numerical value is all stored with keyword.Or when server identifies what is carried in the read data request receivedWhen keyword is focus keyword, corresponding with the keyword numerical value and the keyword are sent to client, client by serverCorresponding with the keyword numerical value and the keyword for holding the reception server to send, then, client is according to the keyword, it is determined that shouldKeyword is focus keyword, and then the focus keyword and numerical value corresponding with keyword are all stored.
In this programme embodiment, keyword is supplied to the client when typically initiating some specific requests by user,Or by client according to the voluntarily decision-making of the information such as user access activity.Under normal circumstances, keyword can all be stored in acquiescenceStorage location, for example, in browser local cache.Especially, it should be noted that this programme embodiment is directed to which part typeKeyword (" focus keyword " that i.e. context is mentioned) designated storage location is being locally configured, the designated storage location willSeek survival heat accumulation point keyword and corresponding numerical value.In a concrete implementation scheme, the designated storage location can be deployed inLocal cache (Local-Cache), such as the memory space independently opened up in browser local cache, in another implementationIn, the designated storage location can also be local offline memory device, or, it is local high-speed processing apparatus, this areaTechnical staff is appreciated that this programme is not limited herein.
Because client-side is stored in local designated storage location for focus keyword, therefore, this programme is realApply in example, when client needs to send read data request to server, client first inquires about the reading for being sent to serverLocal designated storage location whether is stored according to the keyword for needing to carry in request, if client query is to being sent toThe keyword of server is stored in local designated storage location, and client may determine that the keyword is focus keyword,In order to avoid carrying the reading hot issue that the read data request of the keyword causes server to server transmission, client is from originallyStored numerical value corresponding with the keyword is obtained in the designated storage location on ground.
It should be noted that S701~S702 executive agent can be the processing dress of keyword in distributed memory systemPut, the device can be based in each client of the distributed memory system of keyword-numerical value.
Fig. 8 is refer to, the processing method of keyword in its distributed memory system provided by this programme embodimentThe schematic flow sheet of example IV, as illustrated, this method comprises the following steps:
Whether S801, the keyword that inquiry is sent to server are stored in local designated storage location.
S802, local designated storage location is stored in if inquiring and being sent to the keyword of server, from localDesignated storage location obtains numerical value corresponding with keyword.
S803, local designated storage location is not stored in if inquiring and being sent to the keyword of server, to clothesBusiness device sends read data request, and keyword is carried in read data request.
S804, the reception server return numerical value corresponding with keyword and for indicating that keyword is focus keywordInformation, and, according to for indicating that keyword is the information of focus keyword, keyword and numerical value corresponding with keyword are depositedStore up the designated storage location in local;Or keyword and the numerical value corresponding with keyword of the reception server return, and willKeyword and numerical value corresponding with keyword are stored in local designated storage location;Or the reception server return with passNumerical value corresponding to key word, and numerical value corresponding with keyword is stored in local designated storage location.
It is understood that in this programme embodiment, when client query does not have to the keyword for being sent to serverBe stored in local designated storage location, it is not focus keyword to represent the keyword, or, represent the client not toWhether the requested numerical value corresponding with the keyword of server, the keyword are that focus keyword is unknown, and now client needsRead data request is sent to server, keyword is carried in the read data request.
After server receives the read data request, follow-up flow may be referred to above-described embodiment one or above-mentioned implementationFlow described by example two, i.e.,:If server identifies that the keyword is focus keyword, sent and keyword pair to clientThe numerical value answered and for indicating that keyword is the information of focus keyword, or, if server identifies that the keyword is focusKeyword, corresponding with keyword numerical value and keyword are sent to client;Conversely, if server identifies that the keyword is notFocus keyword, only send numerical value corresponding with keyword to client.
In a kind of optional implementation, client can also be refused non-hot keyword being stored in local specifyIn storage location;And/or client deletes non-hot keyword stored in local designated storage location;And/orClient is according to the default expired duration of caching, by expired focus key word deletion in designated storage location.
It is understood that because the local designated storage location of client has certain capacity, such as data of storageNumber be 30, therefore, in order to store more focus keywords, client can also be refused non-hot keywordIt is stored in local designated storage location, and/or, client can delete stored in local designated storage locationNon-hot keyword.
It is understood that in order to keep updating to the focus keyword of storage, need to preset the finger of local in clientDetermine the caching duration of storage location, such as 100ms, client needs the caching duration according to setting, deletes local specified storageExceed the focus keyword of caching duration in position.
In practical application, the application programming interface for the designated storage location offer for calling local can be passed through(Application Programming Interface, API) enters to the capacity and caching duration of the designated storage location of localRow is set.
It should be noted that due to client local designated storage location in store focus keyword and with the heatNumerical value corresponding to point keyword, can be according to specified when the client initiates the read data request for the keyword againThe keyword of storage location storage knows that the keyword is focus keyword, can be obtained from the designated storage location of localTo numerical value corresponding with the keyword, avoid the need for initiating the read data request for the keyword to server again, it is whole to divideThe hot issue of cloth storage system can effectively be shared in client-side, so as to alleviate the load of the server, keep awayThe server is exempted from as the bottleneck in distributed memory system, has solved " reading hot issue ".
It should be noted that if server judges that keyword is not belonging to hotspot list, server identifies keyword notIt is focus keyword, then server only needs to send numerical value corresponding with the keyword to client, if client only receives thisNumerical value corresponding to keyword, it is not focus keyword to know the keyword, therefore, client pair number corresponding with the keywordValue is stored.
It should be noted that S801~S804 executive agent can be the processing dress of keyword in distributed memory systemPut, the device can be based in each client of the distributed memory system of keyword-numerical value.
Example IV
This programme embodiment gives a kind of processing method of keyword in distributed memory system.The present embodiment is serviceDevice interacts a specific implementation for realizing the processing method of keyword in distributed memory system with client.It refer to figure9, it is shown by the flow of the embodiment five of the processing method of keyword in distributed memory system that this programme embodiment providesIt is intended to, as illustrated, this method comprises the following steps:
Whether S901, the keyword that client query is sent to server are stored in local designated storage location.
S902, if client query is stored in local designated storage location to the keyword for being sent to server, fromLocal designated storage location obtains numerical value corresponding with keyword.
S903, if client query is not stored in local specified storage position to the keyword for being sent to serverPut, send read data request to server, keyword is carried in read data request;Server reads number corresponding with keywordValue, and, in response to identifying that keyword is focus keyword, numerical value corresponding with keyword is sent and for referring to clientIt is the information of focus keyword to show keyword;Client is according to for indicating that keyword is the information of focus keyword, by keyWord and numerical value corresponding with keyword are stored in local designated storage location.
Embodiment five
This programme embodiment gives a kind of processing method of keyword in distributed memory system.The present embodiment is serviceDevice interacts another specific implementation for realizing the processing method of keyword in distributed memory system with client.It refer to figure10, it is shown by the flow of the embodiment six of the processing method of keyword in distributed memory system that this programme embodiment providesIt is intended to, as illustrated, this method comprises the following steps:
Whether S1001, the keyword that client query is sent to server are stored in local designated storage location.
S1002, if client query is stored in local designated storage location to the keyword for being sent to server, fromLocal designated storage location obtains numerical value corresponding with keyword.
S1003, if client query is not stored in local specified storage position to the keyword for being sent to serverPut, send read data request to server, keyword is carried in read data request;Server reads number corresponding with keywordValue, and, in response to identifying that keyword is focus keyword, keyword and number corresponding with keyword are sent to clientValue;Keyword and numerical value corresponding with keyword are stored in local designated storage location by client.
Embodiment six
This programme embodiment gives a kind of processing method of keyword in distributed memory system, and the present embodiment is distributionThe illustration of the processing method of keyword in formula storage system.Figure 11 is refer to, its point provided by this programme embodimentThe flow example figure of the embodiment seven of the processing method of keyword in cloth storage system, as shown in figure 11, this method can wrapInclude following steps:
S1101, client need to send the read data request for keyword K1 to server.Client calculates the keyWord K1 cryptographic Hash, cryptographic Hash Hash1 is obtained, cryptographic Hash Hash1 is carried out to the sum of server in distributed memory systemModulo operation, operation result is obtained, operation result corresponding server S3, therefore, carries keyword K1 read data request quiltClient is sent to server S 3.
S1102, server S 3 obtain numerical value V1 corresponding with keyword K1 according to keyword K1 from local.
S1103, server have previously generated a hotspot list, and store server in the hotspot list identifies in advanceFocus keyword, including:K1, K3, K4 and K9.Server judges that the keyword K1 carried in the read data request that receives isNo to belong to the hotspot list, server judges that keyword K1 belongs to the hotspot list, i.e., contains key in the hotspot listWord K1, it is focus keyword to illustrate keyword K1.
S1104, server send keyword K1 and numerical value V1 to client.
S1105, client have received keyword K1 and numerical value V1 from server, and client knows that keyword K1 is focusKeyword, therefore keyword K1 and numerical value V1 are stored in local designated storage location together.
S1106, keyword K1 and keyword K4 are stored with the local designated storage location of client, has spent a period of timeAfterwards, when client needs to send the read data request for keyword K1, client query keyword K1 to server againWhether local designated storage location is stored in.
S1107, client query are stored in local designated storage location to keyword K1, and client knows the keywordK1 is focus keyword, and therefore, client obtains the numerical value corresponding with keyword K1 stored in local designated storage locationV1。
This programme embodiment further provides the device embodiment for realizing each step and method in above method embodiment.
Embodiment seven
This programme embodiment provides a kind of processing unit of keyword in distributed memory system, what the present embodiment was providedThe processing unit of keyword is located at server in distributed memory system.Figure 12 is refer to, it is provided by this programme embodimentDistributed memory system in keyword processing unit embodiment one functional block diagram.As illustrated, the device includes:
Receiving unit 10, for receiving the read data request of client transmission, keyword is carried in read data request;
Processing unit 20, for reading numerical value corresponding with keyword;
Transmitting element 30, in response to identifying that keyword is focus keyword, being sent and keyword pair to clientThe numerical value answered and for indicating that keyword is the information of focus keyword.
It should be noted that for indicate keyword be focus keyword information be used to indicate client by keyword andNumerical value corresponding with keyword is stored in local.
During a concrete implementation, device also includes:Recognition unit 40, for judging whether keyword belongs to pre-The hotspot list first generated, hotspot list are used for the focus keyword that storage server identifies in advance;If judge keywordBelong to hotspot list, it is focus keyword to identify keyword.
In an optional implementation process, said apparatus also includes list update unit 50;
List update unit 50, for other each read data requests received for receiving unit, obtain it is each otherThe cryptographic Hash of the keyword carried in read data request, and according to cryptographic Hash, the pass that will be carried in other each read data requestsGather corresponding to key word hit to cryptographic Hash;And for determining focus set in each set;And in focus collectionFocus keyword is found in conjunction, and focus keyword is added to hotspot list.
During a concrete implementation, when list update unit 50 is used to determine focus set in each set, toolBody is used for:
When the quantity for other read data requests that receiving unit receives reaches default sampling number threshold value, obtain eachIn set in the standard deviation of the hit-count of keyword and each set the hit-count of keyword average value, and, it is determined that closingThe maximum set of the hit-count of key word;
If judging, cumulative and with average value the ratio of the standard deviation of the hit-count of keyword in each set is more than in advanceIf coefficient, and judge that the query rate per second of the maximum set of the hit-count of keyword is more than or equal to default first inquiryRate threshold value, determine that the maximum collection of the hit-count of keyword is combined into focus set.
During a concrete implementation, list update unit 50 is used to find focus keyword in focus setWhen, it is specifically used for:
The each access times of keyword and total access times of each keyword in real-time statistics focus set, until focusWhen total access times of each keyword reach statistics number threshold value in set, server stops counting and obtaining access times maximumAt least one keyword;
By the query rate per second of each keyword in the maximum at least one keyword of access times respectively with presetting secondQuery rate threshold value is compared, and query rate per second in the maximum at least one keyword of access times is more than or equal in advanceIf the keyword of the second query rate threshold value is as focus keyword.
During a concrete implementation, recognition unit 40, it is additionally operable to:If judging, keyword is not belonging to focus rowTable, it is not focus keyword to identify keyword.
During a concrete implementation, transmitting element 30, it is additionally operable to:
Identify that keyword is not focus keyword in response to recognition unit, number corresponding with keyword is sent to clientValue, in order to which client pair numerical value corresponding with keyword stores.
During a concrete implementation, transmitting element 30 is sent for indicating that keyword is focus key to clientDuring the configured information of word, it is specifically used for:
Feedback bag is generated, keyword is carried in feedback bag;
Feedback bag is sent to client.
Because each unit in the present embodiment is able to carry out the method shown in Fig. 2, the part that the present embodiment is not described in detail,Refer to the related description to Fig. 2.
Embodiment eight
This programme embodiment provides a kind of processing unit of keyword in distributed memory system, what the present embodiment was providedThe processing unit of keyword is located at server in distributed memory system.Figure 13 is refer to, it is provided by this programme embodimentDistributed memory system in keyword processing unit embodiment two functional block diagram.As illustrated, the device includes:
Receiving unit 60, for receiving the read data request of client transmission, keyword is carried in read data request;
Processing unit 70, for reading numerical value corresponding with keyword;
Transmitting element 80, in response to identifying that keyword is focus keyword, to client send keyword andNumerical value corresponding with keyword.
It should be noted that the keyword is used to indicate that client stores keyword and numerical value corresponding with keywordIn local.
During a concrete implementation, device also includes:Recognition unit 90, for judging whether keyword belongs to pre-The hotspot list first generated, hotspot list are used for the focus keyword that storage server identifies in advance;If judge keywordBelong to hotspot list, it is focus keyword to identify keyword.
Because each unit in the present embodiment is able to carry out the method shown in Fig. 5, the part that the present embodiment is not described in detail,Refer to the related description to Fig. 5.
Embodiment nine
This programme embodiment gives a kind of processing unit of keyword in distributed memory system, and the present embodiment is providedDistributed memory system in the processing unit of keyword be located at client.Figure 14 is refer to, it is carried by this programme embodimentThe functional block diagram of the embodiment three of the processing unit of keyword in the distributed memory system of confession.As illustrated, the device bagInclude:
Whether query unit 11, the keyword that server is sent to for inquiring about are stored in local specified storage positionPut;
Processing unit 12, local finger is stored in if being inquired for query unit 11 and being sent to the keyword of serverDetermine storage location, numerical value corresponding with keyword is obtained from the designated storage location of local.
In a kind of optional implementation, the device can also include:
First transmitting element 13, it is not stored in if being inquired for query unit 11 and being sent to the keyword of serverLocal designated storage location, read data request is sent to server, keyword is carried in read data request;
First receiving unit 14, for the numerical value corresponding with keyword of the reception server return and for indicating keywordIt is the information of focus keyword;
Above-mentioned processing unit 12, be additionally operable to according to being used to indicate that keyword is the information of focus keyword, by keyword andNumerical value corresponding with keyword is stored in local designated storage location.
Figure 15 is refer to, the processing unit of keyword in its distributed memory system provided by this programme embodimentThe functional block diagram of example IV, as illustrated, in a kind of optional implementation, described device can also include:
Second transmitting element 15, if the keyword that the server is sent to for inquiring be not stored in it is localDesignated storage location, read data request is sent to server, keyword is carried in the read data request;
Second receiving unit 16, for receiving the keyword that the server returns and corresponding with the keywordNumerical value;
The processing unit 12, it is additionally operable to the keyword and numerical value corresponding with the keyword being stored in localDesignated storage location.
Figure 16 is refer to, the processing unit of keyword in its distributed memory system provided by this programme embodimentThe functional block diagram of embodiment five, as illustrated, in a kind of optional implementation, described device can also include:
3rd transmitting element 17, if the keyword that the server is sent to for inquiring be not stored in it is localDesignated storage location, read data request is sent to server, keyword is carried in the read data request;
3rd receiving unit 18, the numerical value corresponding with the keyword returned for receiving the server;
The processing unit 12, it is additionally operable to for numerical value corresponding with the keyword to be stored in local specified storage positionPut.
In a concrete implementation scheme, the designated storage location is local cache.
In an optional implementation, processing unit 12, it is additionally operable to:
Non-hot keyword is stored in the designated storage location by refusal;And/or
Delete non-hot keyword stored in the designated storage location;And/or
According to the default expired duration of caching, by expired focus key word deletion in the designated storage location.
Because each unit in the present embodiment is able to carry out the method shown in Fig. 7 and Fig. 8, what the present embodiment was not described in detailPart, refer to the related description to Fig. 7 and Fig. 8.
Embodiment ten
This programme embodiment provides a kind of distributed memory system, refer to Figure 17, and it is provided by this programme embodimentDistributed memory system structural representation.As illustrated, the distributed memory system includes client 1 and server 2.
Client 1 includes the processing unit of keyword in the distributed memory system such as the offer of embodiment nine.
Server 2 includes the processing unit of keyword in the distributed memory system such as the offer of embodiment seven;Or includingThe processing unit of keyword in the distributed memory system provided such as embodiment eight.
Embodiment 11
Figure 18 is the simplified block diagram of server 100.The server 100 can include and one or more data storage facilitiesThe processor 101 of connection, the data storage facility can include storage medium 106 and internal storage location 104.Server 100 may be used alsoWith including input interface 105 and output interface 107, for being communicated with another device or system.By the CPU of processor 101The program code of execution is storable in internal storage location 104 or storage medium 106.
Processor 101 in server 100, which calls, is stored in internal storage location 104 or the program code of storage medium 106, withPerform following each step:
The read data request of client transmission is received by the input interface 105, carries and closes in the read data requestKey word;
Read numerical value corresponding with the keyword;
In response to identifying that the keyword is focus keyword, sent out by the output interface 107 to the clientSend numerical value corresponding with the keyword and for indicating that the keyword is the information of focus keyword.
In a concrete implementation scheme, for indicate the keyword be focus keyword information be used for indicate instituteState client and the keyword and numerical value corresponding with the keyword are stored in local.
In an optional implementation, the processor 101 is additionally operable in response to identifying the keyword for heatPoint keyword, it is to client transmission numerical value corresponding with the keyword and described for indicating by output interface 107Before keyword is the information of focus keyword, judge whether the keyword belongs to the hotspot list previously generated, the heatPoint list is used to store the focus keyword that the server identifies in advance;If judging, the keyword belongs to the focusList, it is focus keyword to identify the keyword.
In an optional implementation, the processor 101 is additionally operable to judge whether the keyword belongs to advanceBefore the hotspot list of generation, for other each read data requests received, obtain and carried in other each read data requestsKeyword cryptographic Hash, and according to the cryptographic Hash, by the keyword carried in other each read data requests hit to instituteState and gather corresponding to cryptographic Hash;And focus set is determined in each set;Then, focus is found in the focus setKeyword, and the focus keyword is added to the hotspot list.
In a concrete implementation scheme, the processor 101 is additionally operable to when other read data requests receivedWhen quantity reaches default sampling number threshold value, obtain in each set and closed in the standard deviation of the hit-count of keyword and each setThe average value of the hit-count of key word, and, determine the maximum set of the hit-count of keyword;If judge to close in each setThe standard deviation of the hit-count of key word cumulative and it is more than predetermined coefficient with the ratio of the average value, and judges keywordThe query rate per second of the maximum set of hit-count is more than or equal to default first query rate threshold value, determines the keywordThe maximum collection of hit-count is combined into focus set.
In a concrete implementation scheme, the processor 101 is additionally operable in focus set described in real-time statistics eachTotal access times of the access times of keyword and each keyword, until total access times of each keyword in the focus setWhen reaching statistics number threshold value, stop counting and obtaining the maximum at least one keyword of access times;Then, by the accessThe query rate per second of each keyword is carried out with default second query rate threshold value respectively in the maximum at least one keyword of numberCompare, and query rate per second in the maximum at least one keyword of the access times is more than or equal to default second inquiryThe keyword of rate threshold value is as focus keyword.
In an optional implementation, if the processor 101 is additionally operable to judge that the keyword is not belonging to instituteHotspot list is stated, it is not focus keyword to identify the keyword.
In an optional implementation, the processor 101 is additionally operable in response to identifying that the keyword is notFocus keyword, numerical value corresponding with the keyword is sent to the client by output interface 107, in order to the visitorFamily end pair numerical value corresponding with the keyword stores.
In a concrete implementation scheme, generation feedback bag, the feedback carries the keyword in wrapping;Then, toThe client sends the feedback bag.
In addition, the processor 101 in server 100 calls and is stored in internal storage location 104 or the program generation of storage medium 106Code, to perform following each step:
The read data request of client transmission is received by the input interface 105, carries and closes in the read data requestKey word;
Read numerical value corresponding with the keyword;
In response to identifying that the keyword is focus keyword, institute is sent to the client by output interface 107State keyword and numerical value corresponding with the keyword.
In a concrete implementation scheme, processor 101 passes through described in output interface 107 to client transmissionKeyword is used to indicate that the keyword and numerical value corresponding with the keyword are stored in local by the client.
Embodiment 12
Figure 19 is the simplified block diagram of client 200.The client 200 can include and one or more data storage facilitiesThe processor 201 of connection, the data storage facility can include storage medium 206 and internal storage location 204.Client 200 may be used alsoWith including input interface 205 and output interface 207, for being communicated with another device or system.By the CPU of processor 201The program code of execution is storable in internal storage location 204 or storage medium 206.
Processor 201 in client 200 calls said procedure code, to perform each step of subordinate:
Whether the keyword that inquiry is sent to server is stored in local designated storage location;
Local designated storage location is stored in if inquiring and being sent to the keyword of server, specified from local is depositedStorage space, which is put, obtains numerical value corresponding with the keyword.
In an optional implementation, if the processor 201, which is additionally operable to inquire, is sent to the serverKeyword be not stored in local designated storage location, by output interface 207 to server send read data request, instituteState and keyword is carried in read data request;And by input interface 205 to receive the server returning with the keywordCorresponding numerical value and for indicating that the keyword is the information of focus keyword;Then, it is used to indicate the pass according to describedKey word is the information of focus keyword, and the keyword and numerical value corresponding with the keyword are stored in into local specified depositStorage space is put.
In an optional implementation, if processor 201 is additionally operable to inquire the pass for being sent to the serverKey word is not stored in local designated storage location, and read data request, the reading are sent to server by output interface 207Keyword is carried in request of data;Then, by input interface 205 receive the keyword that the server returns and withNumerical value corresponding to the keyword, and the keyword and numerical value corresponding with the keyword are stored in local specified depositStorage space is put.
In an optional implementation, if processor 201 is additionally operable to inquire the pass for being sent to the serverKey word is not stored in local designated storage location, and read data request, the reading are sent to server by output interface 207Keyword is carried in request of data;Then, the corresponding with the keyword of the server return is received by input interface 205Numerical value, and numerical value corresponding with the keyword is stored in local designated storage location.
In a concrete implementation scheme, the designated storage location is local cache.
In an optional implementation, processor 201 is additionally operable to:
Non-hot keyword is stored in the designated storage location by refusal;And/or
Delete non-hot keyword stored in the designated storage location;And/or
According to the default expired duration of caching, by expired focus key word deletion in the designated storage location.
In above-described embodiment, storage medium can be read-only storage (Read-Only Memory, ROM), or readableWrite, such as hard disk, flash memory.Internal storage location can be random access memory (Random Access Memory, RAM).Internal memoryUnit can be with processor physical integration or integrated in memory or being configured to single unit.
Processor is the control centre of the said equipment (equipment is above-mentioned server or above-mentioned client), and at offerDevice is managed, for execute instruction, carries out interrupt operation, there is provided clocking capability and various other functions.Alternatively, processor bagOne or more CPU (CPU) are included, such as the CPU 0 and CPU 1 shown in Figure 16.The said equipment includes oneOr multiple processor.Processor can be monokaryon (single CPU) processor or multinuclear (multi -CPU) processor.Unless otherwise stated,It is described as the part of such as processor or memory for performing task and can realize as universal component, it is temporarily used for givenTime performs task, or is embodied as being manufactured specifically for the particular elements for performing the task.Terminology used herein " processor "Refer to one or more devices, circuit and/or process cores, for processing data, such as computer program instructions.
It is storable in by the CPU of the processor program codes performed in internal storage location or storage medium.Alternatively, it is stored inProgram code in storage medium can be copied into internal storage location and be performed so as to the CPU of processor.Processor is executable at leastOne kernel (such as LINUXTM、UNIXTM、WINDOWSTM、ANDROIDTM、IOSTM), it is well known that the kernel is used to pass through controlExecution, control and the communication of peripheral unit and the use of control computer device resource of other programs or process are made to controlThe operation of the said equipment.
Said elements in the said equipment can be connected to each other by bus, bus such as data/address bus, address bus, controlOne of bus, expansion bus and local bus or its any combination.
The technical scheme of this programme embodiment has the advantages that:
In this programme embodiment, server is after the read data request of client transmission is received, the key that is carried to itWhether word is that focus keyword is identified, if server identifies that keyword is focus keyword, sends and closes to clientNumerical value corresponding to key word and for indicating that keyword is the information of focus keyword, so, client can is according to for referring toIt is the information of focus keyword to show keyword, and keyword and numerical value corresponding with keyword are stored in local specified storage positionPut.In this way, when client initiates the read data request for keyword again, can be directly from the designated storage location of localNumerical value corresponding with keyword is obtained, avoids the need for initiating the read data request for the keyword to server again, it is whole to divideThe hot issue of cloth storage system can effectively be shared in client-side, so as to alleviate the load of the server, keep awayExempt from the server as the bottleneck in distributed memory system, solve the distribution in the prior art based on keyword-numerical value" reading hot issue " in formula storage system.
The technical scheme that this programme embodiment provides, it is only necessary to made an amendment respectively on client and server, it is not necessary toChange the clustered deploy(ment) in distributed memory system, can dynamically find focus keyword, and then realize load sharing.
In addition, " reading hot issue " is shared by the way of including cluster, keyword is shared for solution in the prior art.ItsIn, cluster, which is shared, to be referred to building multiple clusters, when focus produces, the number required for client from multiple cluster random read takesValue.However, the implementation that cluster is shared needs while safeguards multiple clusters, and need to keep the data between multiple clusters sameStep, changes the clustered deploy(ment) in distributed memory system, cost of implementation is higher.The technical side that this programme embodiment is providedCase, it is not necessary to change the clustered deploy(ment) in distributed memory system, therefore also without increase data synchronization mechanism, accordingly, it is capable to" reading hot issue " in enough distributed memory systems for simply and easily solving keyword-numerical value.Keyword, which is shared, to be referred toFocus keyword may be turned into by pre-estimating which keyword, and the name of focus keyword is changed into keyword 1 and keyword2, the two keywords all point to same numerical value, so different keywords will be routed on different servers, it is realExisting load balancing.However, this implementation needs to pre-estimate focus keyword, and need the life of client participation keywordName modification, and need to safeguard the synchronization of the numerical value between different keywords, therefore, cost of implementation is also higher, and estimateFocus keyword can also have the problem of inaccurate.The technical scheme that this programme embodiment is provided, it is not necessary to pre-estimate heatPoint keyword, it is not required that client participates in the name modification of keyword and safeguards that the numerical value between different keywords is synchronous,Therefore, it is possible to simply and easily solve " the reading hot issue " in the distributed memory system of keyword-numerical value.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments that this programme is provided, it should be understood that disclosed system, apparatus and method can be withRealize by another way.For example, device embodiment described above is only schematical, for example, the unitDivision, only a kind of division of logic function, can there is other dividing mode, for example, multiple units or group when actually realizingPart can combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shownOr the mutual coupling discussed or direct-coupling or communication connection can be by some interfaces, device or unit it is indirectCoupling or communication connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unitThe part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multipleOn NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs's.
In addition, each functional unit in each embodiment of this programme can be integrated in a processing unit, can alsoThat unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated listMember can both be realized in the form of hardware, can also be realized in the form of hardware adds SFU software functional unit.
The preferred embodiment of this programme is the foregoing is only, not limiting this programme, all essences in this programmeGod any modification, equivalent substitution and improvements done etc., should be included within the scope of this programme protection with principle.

Claims (38)

CN201610730918.0A2016-08-262016-08-26The processing method of keyword, apparatus and system in distributed memory systemPendingCN107786595A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610730918.0ACN107786595A (en)2016-08-262016-08-26The processing method of keyword, apparatus and system in distributed memory system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610730918.0ACN107786595A (en)2016-08-262016-08-26The processing method of keyword, apparatus and system in distributed memory system

Publications (1)

Publication NumberPublication Date
CN107786595Atrue CN107786595A (en)2018-03-09

Family

ID=61439856

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610730918.0APendingCN107786595A (en)2016-08-262016-08-26The processing method of keyword, apparatus and system in distributed memory system

Country Status (1)

CountryLink
CN (1)CN107786595A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108628832A (en)*2018-05-082018-10-09中国联合网络通信集团有限公司A kind of information keyword acquisition methods and device
CN113434297A (en)*2021-06-302021-09-24北京小米移动软件有限公司Hot spot peak clipping method and device, storage server, client and storage medium
CN115118695A (en)*2022-07-012022-09-27北京达佳互联信息技术有限公司Message processing method and device, electronic equipment and storage medium
CN119226331A (en)*2024-09-272024-12-31北京火山引擎科技有限公司 Database hotspot data detection method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102624881A (en)*2012-02-292012-08-01浙江大学 A mobile device-oriented service cache system architecture and development method
CN103049574A (en)*2013-01-042013-04-17中国科学院高能物理研究所Key value system and key value method for implementation of dynamic duplicates of documents
CN105100174A (en)*2014-05-222015-11-25中国移动通信集团公司Method, device and system for scheduling Internet resource
CN105357192A (en)*2015-10-292016-02-24小米科技有限责任公司Method, device and system for pushing webpage
CN105468707A (en)*2015-11-192016-04-06北京锐安科技有限公司Cache-based data processing method and device
CN105630823A (en)*2014-11-042016-06-01阿里巴巴集团控股有限公司 Monitoring method, device and system for caching data based on distributed system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102624881A (en)*2012-02-292012-08-01浙江大学 A mobile device-oriented service cache system architecture and development method
CN103049574A (en)*2013-01-042013-04-17中国科学院高能物理研究所Key value system and key value method for implementation of dynamic duplicates of documents
CN105100174A (en)*2014-05-222015-11-25中国移动通信集团公司Method, device and system for scheduling Internet resource
CN105630823A (en)*2014-11-042016-06-01阿里巴巴集团控股有限公司 Monitoring method, device and system for caching data based on distributed system
CN105357192A (en)*2015-10-292016-02-24小米科技有限责任公司Method, device and system for pushing webpage
CN105468707A (en)*2015-11-192016-04-06北京锐安科技有限公司Cache-based data processing method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108628832A (en)*2018-05-082018-10-09中国联合网络通信集团有限公司A kind of information keyword acquisition methods and device
CN113434297A (en)*2021-06-302021-09-24北京小米移动软件有限公司Hot spot peak clipping method and device, storage server, client and storage medium
CN115118695A (en)*2022-07-012022-09-27北京达佳互联信息技术有限公司Message processing method and device, electronic equipment and storage medium
CN119226331A (en)*2024-09-272024-12-31北京火山引擎科技有限公司 Database hotspot data detection method, device and storage medium
CN119226331B (en)*2024-09-272025-07-25北京火山引擎科技有限公司Hot spot data detection method, equipment and storage medium of database

Similar Documents

PublicationPublication DateTitle
EP3848875B1 (en)Method, device, computer apparatus and storage medium for electing representative node apparatus
CN108427956B (en)A kind of clustering objects method and apparatus
CN105630955B (en)A kind of data acquisition system member management method of high-efficiency dynamic
CN107786595A (en)The processing method of keyword, apparatus and system in distributed memory system
JP2010140134A (en)Virtual machine management method, program, and management server
WO2013046664A1 (en)Information system, management device, data processing method, data structure, program, and recording medium
CN110489405A (en)The method, apparatus and server of data processing
JP2020520594A5 (en)
JP2002512411A (en) Access control method and device
WO2004063928A1 (en)Database load reducing system and load reducing program
CN101145132B (en)Method and apparatus for metadata of objects of cache
CN108121511A (en)Data processing method, device and equipment in a kind of distributed edge storage system
CN112615793A (en)Data current limiting method and device
CN109213774A (en)Storage method and device, storage medium, the terminal of data
CN101507229B (en)Network node optimization with triggered expressions
Moharir et al.Serving content with unknown demand: the high-dimensional regime
CN110457307A (en)Metadata management system, user's cluster creation method, device, equipment and medium
JP2006040084A (en)Resource information collection distribution method and system
CN114844838A (en)Flow control method and device
JP6586174B2 (en) Database system, transaction management node, method and program
Shi et al.An SPN-based integrated model for Web prefetching and caching
CN110245129A (en)Distributed global data deduplication method and device
CN112733060A (en)Cache replacement method and device based on session clustering prediction and computer equipment
Dai et al.Analysis of tandem PIT and CS with non-zero download delay
CN110362426B (en) A method and system for implementing selective replicas for burst loads

Legal Events

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

Application publication date:20180309


[8]ページ先頭

©2009-2025 Movatter.jp