CN105224532A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN105224532A
CN105224532A CN201410232570.3A CN201410232570A CN105224532A CN 105224532 A CN105224532 A CN 105224532A CN 201410232570 A CN201410232570 A CN 201410232570A CN 105224532 A CN105224532 A CN 105224532A
Authority
CN
China
Prior art keywords
array
array member
mentioned
data
mark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410232570.3A
Other languages
Chinese (zh)
Other versions
CN105224532B (en
Inventor
廖锡光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Tencent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd, Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410232570.3A priority Critical patent/CN105224532B/en
Publication of CN105224532A publication Critical patent/CN105224532A/en
Application granted granted Critical
Publication of CN105224532B publication Critical patent/CN105224532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of data processing method and device, wherein, the method comprises: receive for asking the first message operated the first array, wherein, first array comprises dissimilar pending data, and the pending data of every type are stored in the number group membership in the first array; According to operation destination object be identified in Mapping data structure the position of array member in the first array of searching and storing destination object, wherein, the corresponding relation between the mark at least recording the pending data of every type in Mapping data structure and the position of the array member storing pending data in the first array; The position of array member in the first array of destination object is stored, then to destination object executable operations on the position in the first array if find in Mapping data structure.The invention solves in the process owing to processing data and need to travel through the low technical matters of data-handling efficiency that whole array causes.

Description

Data processing method and device
Technical field
The present invention relates to computer realm, in particular to a kind of data processing method and device.
Background technology
At present, a lot of aspects in life all achieve electronization, such as: ecommerce, community space are shared etc., thus also have increasing people to bring into use the client in terminal to realize the mutual of information.But, in the data a large amount of and numerous and diverse in the face of backstage, in state of the art, usually also generally include following at least one in the data processing method used:
Scheme 1, create the large array of n regular length according to type class (if value is from 0 to n-1), each array deposits the data of the type, then replaces the oldest data when array is full.But but there is following shortcoming in this mode:
(1) mobile monoblock internal memory is needed during the operation such as newly-increased, the deletion of data, consuming time longer;
(2) each array length is difficult to estimate, and when categorical data distributes uneven, space availability ratio is low;
(3) need when searching certain data to travel through all arrays.
Scheme 2, create n chained list according to type class (if value is from 0 to n-1).Dynamically apply for internal memory during newly-increased data, be inserted in chained list, from chain list deletion during deletion data, releasing memory.But there is following many defects equally in this mode:
(1) dynamically apply for space, easily occur the problems such as Installed System Memory exhausts.If limit maximum application nodal point number, then, when the oldest node is replaced, need to travel through whole chained list;
(2) frequent application, releasing memory, CPU needs defrag of taking time, and increases the weight of CPU burden;
(3) need when searching certain data to travel through all chained lists.
During by carrying out data processing with upper type, all Existential Space utilization factor is low, needs to travel through the problem such as data-handling efficiency that all data cause is low when searching data.
For above-mentioned problem, at present effective solution is not yet proposed.
Summary of the invention
Embodiments provide a kind of data processing method and device, need to travel through the low technical matters of data-handling efficiency that whole array causes at least to solve in the process owing to processing data.
According to an aspect of the embodiment of the present invention, provide a kind of data processing method, comprise: receive for asking the first message operated the first array, wherein, above-mentioned first array comprises dissimilar pending data, and the above-mentioned pending data of every type are stored in the number group membership in above-mentioned first array; The position of above-mentioned array member in above-mentioned first array of searching and storing above-mentioned destination object is identified in Mapping data structure according to the destination object of aforesaid operations, wherein, the corresponding relation between the mark at least recording the above-mentioned pending data of every type in above-mentioned Mapping data structure and the position of the above-mentioned array member storing above-mentioned pending data in above-mentioned first array; Store the position of above-mentioned array member in above-mentioned first array of above-mentioned destination object if find in Mapping data structure, then the above-mentioned position in above-mentioned first array performs aforesaid operations to above-mentioned destination object.
Alternatively, above-mentioned reception is for before asking the first message of operating the first array, also comprise: set up above-mentioned first array, the above-mentioned pending data of every type are stored in the number group membership in above-mentioned first array, wherein, each above-mentioned array member storing above-mentioned pending data also comprises: the type of above-mentioned pending data, for node identification before representing the position of previous array member in above-mentioned first array, postjunction mark for the position of a number group membership in above-mentioned first array after representing; Wherein, the above-mentioned array member storing the above-mentioned pending data of same type forms link by above-mentioned front node identification and above-mentioned postjunction mark; Set up above-mentioned Mapping data structure, the corresponding relation between the mark at least recording the above-mentioned pending data of every type in above-mentioned Mapping data structure and the position of the above-mentioned array member storing above-mentioned pending data in above-mentioned first array.
Alternatively, being identified in Mapping data structure of the above-mentioned destination object according to aforesaid operations is searched the position of above-mentioned array member in above-mentioned first array storing above-mentioned destination object and is comprised: in above-mentioned Mapping data structure, search the list item that the mark of the above-mentioned pending data of record is identical with the mark of above-mentioned destination object, wherein, the corresponding relation between the mark of each above-mentioned pending data and the position of above-mentioned array member in above-mentioned first array storing above-mentioned pending data is recorded in a list item in above-mentioned Mapping data structure; If find the list item that the mark of the above-mentioned pending data of above-mentioned record is identical with the mark of above-mentioned destination object, then represent that above-mentioned destination object is be included in the above-mentioned pending data in above-mentioned first array, and from the above-mentioned list item found, obtain the position of above-mentioned array member in above-mentioned first array storing above-mentioned destination object; If the list item that the mark of the above-mentioned pending data of above-mentioned record is identical with the mark of above-mentioned destination object cannot be found, then represent that above-mentioned destination object is the newly-increased data different from the above-mentioned pending data be included in above-mentioned first array, and expression cannot find the position of above-mentioned array member in above-mentioned first array storing above-mentioned destination object in Mapping data structure.
Alternatively, the cryptographic hash being designated above-mentioned pending data of above-mentioned pending data, the cryptographic hash being designated above-mentioned destination object of above-mentioned destination object, above-mentioned Mapping data structure is Hash table, wherein, if cannot find the list item that the mark of the above-mentioned pending data of above-mentioned record is identical with the mark of above-mentioned destination object, said method also comprises: by the columns remainder of the cryptographic hash of above-mentioned newly-increased data to above-mentioned Hash table, obtain the result N of above-mentioned remainder; Judge whether the list item that in above-mentioned Hash table, each row N arranges is empty; If exist for empty above-mentioned list item, then above-mentioned for empty above-mentioned list item in select one to record above-mentioned newly-increased data cryptographic hash and the position of array member in above-mentioned first array storing above-mentioned newly-increased data between corresponding relation; If do not exist for empty above-mentioned list item, then select a list item in the list item that each row N arranges in above-mentioned Hash table, the cryptographic hash recorded is replaced with the cryptographic hash of above-mentioned newly-increased data in selected list item.
Alternatively, aforesaid operations is query manipulation, above-mentioned destination object is be included in the above-mentioned pending data in above-mentioned first array, wherein, above-mentioned above-mentioned position in above-mentioned first array performs aforesaid operations to above-mentioned destination object to comprise: obtain above-mentioned destination object from the above-mentioned array member be arranged in above-mentioned position; Return the above-mentioned destination object got.
Alternatively, aforesaid operations is newly-increased operation, above-mentioned destination object is the newly-increased data different from the above-mentioned pending data be included in above-mentioned first array, wherein, the destination object according to aforesaid operations be identified in Mapping data structure the above-mentioned array member that searches and the store above-mentioned destination object position in above-mentioned first array after, said method also comprises: if cannot find the above-mentioned position of above-mentioned array member in above-mentioned first array storing above-mentioned destination object in above-mentioned Mapping data structure, then judge in above-mentioned first array, whether to there is empty array member, if there is the array member of above-mentioned sky, then select the array member of an above-mentioned sky, in the array member of selected sky, store the type of above-mentioned newly-increased data and above-mentioned newly-increased data, before the array member of above-mentioned selected sky is comprised node identification be set to for represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in array member before the array member of above-mentioned selected sky in the position of above-mentioned first array, the postjunction mark that the array member of above-mentioned selected sky is comprised be set to for represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in above-mentioned selected by sky array member after array member in the position of above-mentioned first array, the postjunction mark of the array member before the above-mentioned array member being arranged in above-mentioned selected sky is revised as representing that the array member of above-mentioned selected sky is in the position of above-mentioned first array, and node identification before the array member after the above-mentioned array member being arranged in above-mentioned selected sky is revised as representing that the array member of above-mentioned selected sky is in the position of above-mentioned first array, corresponding relation between the array member of the mark and selected sky that record above-mentioned newly-increased data in the above-mentioned Mapping data structure position in the first array.
Alternatively, after judging whether there is empty array member in above-mentioned first array, said method also comprises: if there is not the array member of above-mentioned sky, then in above-mentioned first array, search the above-mentioned above-mentioned array member storing the mark above-mentioned pending data relevant to the mark of above-mentioned newly-increased data, the above-mentioned pending data that the above-mentioned above-mentioned array member found comprises are replaced with above-mentioned newly-increased data, and the type of the above-mentioned pending data above-mentioned above-mentioned array member found comprised replaces with the type of above-mentioned newly-increased data, postjunction mark in the previous array member represent front node identification in the above-mentioned above-mentioned array member found is revised as the rear position of a number group membership in above-mentioned first array that the postjunction mark for representing in the above-mentioned above-mentioned array member found represents, and in the rear number group membership that the above-mentioned postjunction mark in the above-mentioned above-mentioned array member found is represented before node identification be revised as the position of above-mentioned previous array member in above-mentioned first array for representing that before in the above-mentioned above-mentioned array member found, node identification represents, before the above-mentioned above-mentioned array member found is comprised node identification be revised as represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in array member before the above-mentioned above-mentioned array member found in the position of above-mentioned first array, the postjunction mark that the above-mentioned above-mentioned array member found is comprised be revised as represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in array member after the above-mentioned above-mentioned array member found in the position of above-mentioned first array, the above-mentioned postjunction mark being arranged in array member before the above-mentioned array member found is revised as representing that the above-mentioned above-mentioned array member found is in the position of above-mentioned first array, and node identification before the above-mentioned array member be arranged in after the above-mentioned array member found is revised as representing that the above-mentioned above-mentioned array member found is in the position of above-mentioned first array.
Alternatively, in the above-mentioned array member storing the type above-mentioned pending data identical with the type of above-mentioned newly-increased data, search the array member before the array member being arranged in above-mentioned selected sky by following steps and be arranged in above-mentioned selected by sky array member after array member: search first above-mentioned array member of the identical above-mentioned pending data of the type that stores type and above-mentioned newly-increased data in the position of above-mentioned first array from the second array, wherein, above-mentioned second array at least records the corresponding relation between above-mentioned every type and the position of above-mentioned first the above-mentioned array member storing the above-mentioned pending data of every type in above-mentioned first array, from the position found, judge whether the above-mentioned pending data that in the above-mentioned array member of the above-mentioned pending data that above-mentioned newly-increased data are identical with the above-mentioned type storing type and above-mentioned newly-increased data, two adjacent number group memberships comprise meet predetermined insertion condition successively, until find the above-mentioned two number group memberships meeting above-mentioned predetermined insertion condition, and using the previous array member before the above-mentioned array member being positioned at above-mentioned selected sky in above-mentioned two number group memberships, and using in two number group memberships rear one as the array member after the above-mentioned array member being positioned at above-mentioned selected sky.
Alternatively, aforesaid operations is deletion action, above-mentioned destination object is be included in the above-mentioned pending data in above-mentioned first array, wherein, above-mentioned above-mentioned position in above-mentioned first array performs aforesaid operations to above-mentioned destination object comprise: in above-mentioned first array, delete the above-mentioned array member on above-mentioned position, postjunction mark in the previous array member represent front node identification in the above-mentioned array member deleted is revised as the rear number group membership that the postjunction mark for representing in the above-mentioned array member of deletion represents, and in the rear number group membership that the above-mentioned postjunction mark in the above-mentioned array member deleted is represented before node identification be revised as representing deletion above-mentioned array member in before the above-mentioned previous array member that represents of node identification, the corresponding relation between the mark of above-mentioned destination object and above-mentioned position is deleted in above-mentioned Mapping data structure.
According to the another aspect of the embodiment of the present invention, additionally provide a kind of data processing equipment, comprise: receiving element, for receiving for asking the first message operated the first array, wherein, above-mentioned first array comprises dissimilar pending data, and the above-mentioned pending data of every type are stored in the number group membership in above-mentioned first array; First searches unit, the position of above-mentioned array member in above-mentioned first array of searching and storing above-mentioned destination object is identified in Mapping data structure for the destination object according to aforesaid operations, wherein, the corresponding relation between the mark at least recording the above-mentioned pending data of every type in above-mentioned Mapping data structure and the position of the above-mentioned array member storing above-mentioned pending data in above-mentioned first array; Processing unit, during for finding the position of above-mentioned array member in above-mentioned first array storing above-mentioned destination object in Mapping data structure, the above-mentioned position in above-mentioned first array performs aforesaid operations to above-mentioned destination object.
Alternatively, said apparatus also comprises: first sets up unit, for receiving for before asking the first message of operating the first array, set up above-mentioned first array, the above-mentioned pending data of every type are stored in the number group membership in above-mentioned first array, wherein, each above-mentioned array member storing above-mentioned pending data also comprises: the type of above-mentioned pending data, for representing node identification before the position of previous array member in above-mentioned first array, for representing the postjunction mark of the rear position of a number group membership in above-mentioned first array, wherein, the above-mentioned array member storing the above-mentioned pending data of same type forms link by above-mentioned front node identification and above-mentioned postjunction mark, second sets up unit, for setting up above-mentioned Mapping data structure, the corresponding relation between the mark at least recording the above-mentioned pending data of every type in above-mentioned Mapping data structure and the position of the above-mentioned array member storing above-mentioned pending data in above-mentioned first array.
Alternatively, above-mentioned first searches unit comprises: first searches module, for the list item that the mark of the above-mentioned pending data of searching record in above-mentioned Mapping data structure is identical with the mark of above-mentioned destination object, wherein, the corresponding relation between the mark of each above-mentioned pending data and the position of above-mentioned array member in above-mentioned first array storing above-mentioned pending data is recorded in a list item in above-mentioned Mapping data structure; First judge module, during for the list item identical with the mark of above-mentioned destination object in the mark of the above-mentioned pending data finding above-mentioned record, judge that above-mentioned destination object is be included in the above-mentioned pending data in above-mentioned first array, and from the above-mentioned list item found, obtain the position of above-mentioned array member in above-mentioned first array storing above-mentioned destination object; Second judge module, during for the list item identical with the mark of above-mentioned destination object in the mark of the above-mentioned pending data that cannot find above-mentioned record, judge that above-mentioned destination object is the newly-increased data different from the above-mentioned pending data be included in above-mentioned first array, and the position of above-mentioned array member in above-mentioned first array storing above-mentioned destination object cannot be found in Mapping data structure.
Alternatively, the cryptographic hash being designated above-mentioned pending data of above-mentioned pending data, the cryptographic hash being designated above-mentioned destination object of above-mentioned destination object, above-mentioned Mapping data structure is Hash table, wherein, above-mentioned second judge module comprises: calculating sub module, for by the columns remainder of the cryptographic hash of above-mentioned newly-increased data to above-mentioned Hash table, obtains the result N of above-mentioned remainder; Judge submodule, for judging whether the list item that in above-mentioned Hash table, each row N arranges is empty; First chooser module, for when existing for empty above-mentioned list item, above-mentioned for empty above-mentioned list item in select one to record above-mentioned newly-increased data cryptographic hash and the position of array member in above-mentioned first array storing above-mentioned newly-increased data between corresponding relation; Second chooser module, for not existing for empty above-mentioned list item, then, when selecting a list item in the list item that each row N arranges in above-mentioned Hash table, replaces with the cryptographic hash of above-mentioned newly-increased data by the cryptographic hash recorded in selected list item.
Alternatively, aforesaid operations is query manipulation, and above-mentioned destination object is be included in the above-mentioned pending data in above-mentioned first array, wherein, above-mentioned processing unit comprises: acquisition module, for obtaining above-mentioned destination object from the above-mentioned array member be arranged on above-mentioned position; Return module, for returning the above-mentioned destination object got.
Alternatively, aforesaid operations is newly-increased operation, above-mentioned destination object is the newly-increased data different from the above-mentioned pending data be included in above-mentioned first array, wherein, said apparatus also comprises: judging unit, for the destination object according to aforesaid operations be identified in Mapping data structure the above-mentioned array member that searches and the store above-mentioned destination object position in above-mentioned first array after, when the position of the above-mentioned above-mentioned array member storing above-mentioned destination object in above-mentioned first array cannot be found in above-mentioned Mapping data structure, judge in above-mentioned first array, whether to there is empty array member, storage unit, for when there is the array member of above-mentioned sky, selecting the array member of an above-mentioned sky, storing the type of above-mentioned newly-increased data and above-mentioned newly-increased data in the array member of selected sky, setting unit, for node identification before the array member of above-mentioned selected sky is comprised be set to for represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in above-mentioned selected by sky array member before array member in the position of above-mentioned first array, the postjunction mark that the array member of above-mentioned selected sky is comprised be set to for represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in above-mentioned selected by sky array member after array member in the position of above-mentioned first array, the postjunction mark of the array member before the above-mentioned array member being arranged in above-mentioned selected sky is revised as representing that the array member of above-mentioned selected sky is in the position of above-mentioned first array, and node identification before the array member after the above-mentioned array member being arranged in above-mentioned selected sky is revised as representing that the array member of above-mentioned selected sky is in the position of above-mentioned first array, record cell, for the corresponding relation between position in the first array of the array member of the mark and selected sky that record above-mentioned newly-increased data in above-mentioned Mapping data structure.
Alternatively, said apparatus also comprises: second searches unit, after judging whether there is empty array member in above-mentioned first array, when there is not the array member of above-mentioned sky, in above-mentioned first array, search the above-mentioned above-mentioned array member storing the mark above-mentioned pending data relevant to the mark of above-mentioned newly-increased data, replacement unit, above-mentioned pending data for the above-mentioned above-mentioned array member found being comprised replace with above-mentioned newly-increased data, and the type of the above-mentioned pending data above-mentioned above-mentioned array member found comprised replaces with the type of above-mentioned newly-increased data, first amendment unit, the rear position of a number group membership in above-mentioned first array that the postjunction mark for representing in the above-mentioned above-mentioned array member found represents is revised as the postjunction mark in the previous array member that represented by front node identification in the above-mentioned above-mentioned array member found, and in the rear number group membership that the above-mentioned postjunction mark in the above-mentioned above-mentioned array member found is represented before node identification be revised as the position of above-mentioned previous array member in above-mentioned first array for representing that before in the above-mentioned above-mentioned array member found, node identification represents, second amendment unit, for node identification before the above-mentioned above-mentioned array member found is comprised be revised as represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in array member before the above-mentioned above-mentioned array member found in the position of above-mentioned first array, the postjunction mark that the above-mentioned above-mentioned array member found is comprised be revised as represent store the type above-mentioned pending data identical with the type of above-mentioned newly-increased data above-mentioned array member in be arranged in array member after the above-mentioned above-mentioned array member found in the position of above-mentioned first array, 3rd amendment unit, for the above-mentioned postjunction mark being arranged in array member before the above-mentioned array member found is revised as representing that the above-mentioned above-mentioned array member found is in the position of above-mentioned first array, and node identification before the above-mentioned array member be arranged in after the above-mentioned array member found is revised as representing that the above-mentioned above-mentioned array member found is in the position of above-mentioned first array.
Alternatively, said apparatus also comprises: the 3rd searches unit, for the array member after the array member that searches in the above-mentioned array member storing the type above-mentioned pending data identical with the type of above-mentioned newly-increased data before the array member being positioned at above-mentioned selected sky and the array member being positioned at above-mentioned selected sky, above-mentioned 3rd searches unit comprises: second searches module, for searching first position of above-mentioned array member in above-mentioned first array storing the type above-mentioned pending data identical with the type of above-mentioned newly-increased data from the second array, wherein, above-mentioned second array at least records the corresponding relation between above-mentioned every type and the position of above-mentioned first the above-mentioned array member storing the above-mentioned pending data of every type in above-mentioned first array, 3rd judge module, for from the position found, judge the above-mentioned pending data that above-mentioned newly-increased data are identical with the above-mentioned type storing type and above-mentioned newly-increased data successively above-mentioned array member in the above-mentioned pending data that comprise of two adjacent number group memberships whether meet predetermined insertion condition, until find the above-mentioned two number group memberships meeting above-mentioned predetermined insertion condition, and using the previous array member before the above-mentioned array member being positioned at above-mentioned selected sky in above-mentioned two number group memberships, and using in two number group memberships rear one as the array member after the above-mentioned array member being positioned at above-mentioned selected sky.
Alternatively, aforesaid operations is deletion action, above-mentioned destination object is be included in the above-mentioned pending data in above-mentioned first array, wherein, above-mentioned processing unit comprises: modified module, for deleting the above-mentioned array member on above-mentioned position in above-mentioned first array, postjunction mark in the previous array member represent front node identification in the above-mentioned array member deleted is revised as the rear number group membership that the postjunction mark for representing in the above-mentioned array member of deletion represents, and in the rear number group membership that the above-mentioned postjunction mark in the above-mentioned array member deleted is represented before node identification be revised as representing deletion above-mentioned array member in before the above-mentioned previous array member that represents of node identification, removing module, for deleting the corresponding relation between the mark of above-mentioned destination object and above-mentioned position in above-mentioned Mapping data structure.
In embodiments of the present invention, dissimilar pending data are stored in an array, and the corresponding relation between the position of the array member adopting the mark of the pending data of the every type of Mapping data structure record and store pending data in array, like this, can by corresponding relation fast finding described in Mapping data structure to the position of destination object to be operated in array, the technical matters that solving in the process owing to processing data needs to travel through data-handling efficiency that whole array causes low reaches the object improving data-handling efficiency.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the process flow diagram of a kind of optional data processing method according to the embodiment of the present invention;
Fig. 2 is the schematic diagram of a kind of optional data processing according to the embodiment of the present invention;
Fig. 3 is the schematic diagram according to the optional data processing of the another kind of the embodiment of the present invention;
Fig. 4 is the schematic diagram of another the optional data processing according to the embodiment of the present invention;
Fig. 5 is the schematic diagram of another the optional data processing according to the embodiment of the present invention;
Fig. 6 is the schematic diagram of another the optional data processing according to the embodiment of the present invention;
Fig. 7 is the schematic diagram of another the optional data processing according to the embodiment of the present invention; And
Fig. 8 is the structural representation of another the optional data processing equipment according to the embodiment of the present invention.
Embodiment
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in instructions of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Embodiment 1
According to the embodiment of the present invention, provide a kind of data processing method, as shown in Figure 1, the method comprises:
S102, receive for asking the first message operated the first array, wherein, the first array comprises dissimilar pending data, and the pending data of every type are stored in the number group membership in the first array;
S104, according to operation destination object be identified in Mapping data structure the position of array member in the first array of searching and storing destination object, wherein, the corresponding relation between the mark at least recording the pending data of every type in Mapping data structure and the position of the array member storing pending data in the first array;
S106, stores the position of array member in the first array of destination object, then to destination object executable operations on the position in the first array if find in Mapping data structure.
Alternatively, above-mentioned data processing method can be applied to the process that the data of server 204 to the client 202 come on self terminal 206 process in the present embodiment, as shown in Figure 2.Wherein, above-mentioned client 202 can include but not limited to the application in terminal 206, such as, and micro-letter, microblogging.Alternatively, the above-mentioned process to the data execution in client 202 can include but not limited to following at least one in the present embodiment: increase newly, inquire about, delete.Such as, suppose that above-mentioned client 202 is for microblogging client, when server 204 receives, the message of the 3rd in the temperature ranking list in above-mentioned microblogging client is deleted, then can apply above-mentioned data processing method and deletion is performed to the data in microblogging client.Above-mentioned citing is a kind of example, and the present embodiment does not do any restriction to this.
Alternatively, above-mentioned Mapping data structure can be, but not limited to as Hash table in the present embodiment, by the mapping relations recorded in above-mentioned Hash table, searches the position of array member in the first array storing destination object.
Alternatively, in the present embodiment, in step S102, receive for before asking the first message of operating the first array, also comprise:
S1, sets up the first array, the pending data of every type is stored in the number group membership in the first array;
S2, sets up Mapping data structure, the corresponding relation between the mark at least recording the pending data of every type in Mapping data structure and the position of the array member storing pending data in the first array.
Alternatively, in the present embodiment, above-mentioned first array comprises dissimilar pending data, the pending data of every type are stored in the number group membership in the first array, wherein, each array member storing pending data also comprises: the type of pending data, for node identification before representing the position of previous array member in the first array, postjunction mark for the position of number group membership in the first array after representing.
Specifically illustrate by reference to the accompanying drawings, as shown in Figure 3, the first array DArray represents, describes for the first array member D_1 being positioned at the 3rd position in the first array DArray.Wherein, this array member comprises: the type Type of pending data is 2, before the position of previous array member in the first array DArray, node identification is PreElem is 0, and it is 10 that the postjunction of the rear position of number group membership in the first array DArray is designated NextElem.
Alternatively, in the present embodiment, the array member storing the pending data of same type forms link by front node identification and postjunction mark, and wherein, above-mentioned link can be, but not limited to as chained list link.Such as, shown in composition graphs 3-Fig. 4, belong to same type in the first array DArray, type Type is that the array member of the pending data of 2 comprises: the first array member D_1, the second array member D_2, the 3rd array member D_3.Be 3 for before position in the first array DArray of the previous array member of the second array member D_2, node identification is PreElem, it is 25 that the postjunction of the rear position of number group membership in the first array DArray is designated NextElem, then the chained list that the above-mentioned array member belonging to the pending data of same type can be formed as shown in Figure 4 by front node identification PreElem and postjunction mark NextElem links.
Alternatively, in the present embodiment, the corresponding relation between the mark (Key) of the pending data of every type and the position of array member in the first array (Index) storing pending data is at least recorded in above-mentioned Mapping data structure.Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, the mark of above-mentioned pending data can be, but not limited to the cryptographic hash into pending data.Such as, as shown in Figure 3, describe for the first array member D_1 being positioned at the 3rd position in the first array DArray, the information that above-mentioned first array member D_1 is corresponding in Hash table DHash comprises: for identifying the mark key of the data Data in the first array member D_1, value is k3, and for searching the index Index of the first position of array member D_1 in the first array DArray, value is 3.
Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, the size in the space shared by above-mentioned Hash table DHash is less than the space size shared by pending data in the first array DArray.
Such as, above-mentioned Hash table DHash can be as shown in table 1." sky " in table 1 represents that this position is unoccupied, " ... " represent that this position is occupied, the mark of concrete pending data does not represent at this in detail with the position of array member in the first array storing pending data.
Table 1
Alternatively, the second array TArray is also included but not limited in the present embodiment.Wherein, the second array at least record every type and store every type pending data the first position of number group membership in the first array between corresponding relation.Alternatively, successively the first position of number group membership in the first array storing the pending data of every type can be recorded in the array member in the second array TArray according to the order of type.
Such as, as shown in Figure 3, in the first number group membership in the second array TArray record store type Type be the first position of number group membership D_1 in the first array DArray of the pending data of 0 (such as, HeadIndex=11, represent that to store type Type be the position of the first number group membership D_1 of the pending data of 0 and be the 11st in the first array DArray), in the second number group membership in the second array TArray record store type Type be the first position of number group membership D_1 in the first array DArray of the pending data of 1 (such as, HeadIndex=4, represent that to store type Type be the position of the first number group membership D_1 of the pending data of 1 and be the 4th in the first array DArray), in the 3rd number group membership in the second array TArray record store type Type be the first position of number group membership D_1 in the first array DArray of the pending data of 2 (such as, HeadIndex=3, represent that to store type Type be the position of the first number group membership D_1 of the pending data of 2 and be the 3rd in the first array DArray).
Alternatively, in the present embodiment, server 204 receive that client 202 in terminal 206 sends for asking the first message operated the pending data in the first array DArray, wherein, above-mentioned first message includes but not limited to: ask the operation inquired about pending data, increase newly, delete.
Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, according to the corresponding relation between the mark of the pending data of the every type stored in Hash table DHash and the position of array member in the first array DArray storing pending data, search the position of destination object in the first array DArray of aforesaid operations, if find the position of array member in the first array DArray of above-mentioned destination object in Hash table DHash, relevant position then in the first array DArray performs corresponding operation to above-mentioned destination object.
Describe below in conjunction with concrete scene, suppose when above-mentioned Mapping data structure is Hash table DHash, above-mentioned client 202 is for microblogging client, above-mentioned microblogging client creates a memory pool in internal memory, the first array DArray is set up in this memory pool, all types of data are all stored in the first array DArray in this internal memory, such as, the type in above-mentioned first array DArray can include but not limited to: the keypoint recommendation in the temperature in microblogging, the liveness in microblogging, microblogging.Suppose that above-mentioned first array DArary data total amount is m.Server 204 receives deleting the message of the rank in the temperature ranking list in microblogging the 3rd of above-mentioned microblogging client transmission, then the mark (such as, this is designated k3) of the message according to above-mentioned rank the 3rd is searched the position of destination object in the first array DArray corresponding to above-mentioned message by server 204 in Hash table DHash.The position supposing the destination object corresponding to message finding above-mentioned rank the 3rd in microblogging temperature ranking list is 3, then the destination object on relevant position in the first array DArray is deleted, namely, the message of rank in microblogging temperature ranking list the 3rd is deleted, and the node identification of the front and back array member of this array member in the chain list catenation corresponding to the type is revised accordingly, can also show in a certain order to make other message in microblogging client temperature ranking list.
By embodiment provided by the invention, by setting up the first array and the Mapping data structure corresponding with the array member in the first array, utilize the mark of the destination object of the operation of asking, the array member position in the first array storing destination object is searched at Mapping data structure, to realize the acquisition quickly and accurately to the array member in the first array, and then improve the treatment effeciency to the data in the first array.
As one scheme alternatively, step S104, being identified in Mapping data structure of destination object according to operation is searched the position of array member in the first array storing destination object and is comprised:
S1, the list item that the mark of the pending data of record is identical with the mark of destination object is searched in Mapping data structure, wherein, corresponding relation between the mark of each pending data and the position of array member in the first array storing pending data is recorded in a list item in Mapping data structure, the cryptographic hash being designated pending data of pending data;
S2, if find the list item that the mark of the pending data of record is identical with the mark of destination object, then represent that destination object is the pending data be included in the first array, and from the list item found, obtain the position of array member in the first array storing destination object;
S3, if the list item that the mark of the pending data of record is identical with the mark of destination object cannot be found, then represent that destination object is the newly-increased data different from the pending data be included in the first array, and expression cannot find the position of array member in the first array storing destination object in Mapping data structure.
Alternatively, in the present embodiment, the mark of above-mentioned pending data can be, but not limited to the cryptographic hash into pending data, and the mark of above-mentioned destination object can be, but not limited to the cryptographic hash into destination object, and above-mentioned Mapping data structure can be, but not limited to as Hash table.The present embodiment does not do any restriction to this.
Alternatively, search whether there be the list item identical with the cryptographic hash of destination object in the cryptographic hash recorded at Hash table DHash.If the cryptographic hash list item identical with destination object can be found in above-mentioned Hash table DHash, then represent that above-mentioned destination object has record in the array member of the pending data of the first array DArray, then the position of destination object in the first array DArray that can directly be obtained by Hash table DHash; If the cryptographic hash list item identical with destination object cannot be found in above-mentioned Hash table DHash, then represent that above-mentioned destination object is the newly-increased data different from the pending data recorded in the first array DArray, further, the described position of array member in the first array DArray storing described destination object cannot also just be found.
Specifically in conjunction with following example explanation, suppose server 204 receive client 202 send for the type Type in the first array DArray being the request that the second array member D_2 of 2 deletes, wherein, the cryptographic hash of above-mentioned destination object is k1, then search in Hash table DHash and whether have and above-mentioned destination object, namely type Type is the list item that the cryptographic hash of the second array member D_2 of 2 is identical, suppose to find in Hash table DHash and there is the list item identical with the cryptographic hash of above-mentioned destination object, the position of array member in the first array corresponding to above-mentioned destination object then directly can be obtained from list item, such as, the value of the index Index of above-mentioned target object position is 10, namely, above-mentioned destination object is positioned at the 10th position of the first array DArray.Suppose server 204 receive client 202 send for the type Type in the first array DArray being the request that the 4th array member D_4 of 2 modifies, after Hash table DHash searches, do not find the list item that cryptographic hash is identical with the cryptographic hash of above-mentioned destination object, then represent that above-mentioned destination object is the data different from the pending data in the first array DArray.
By embodiment provided by the invention, by searching in Mapping data structure, whether there is the list item identical with the mark of destination object, and then judge that whether above-mentioned destination object is the array member in the first array, the array member in the first array if judge, then can obtain the position of above-mentioned destination object in the first array from Mapping data structure, reach the position of the array member obtained quickly and accurately in the first array, improve the treatment effeciency to data, for user saves the running time.
As the optional scheme of one, the cryptographic hash being designated pending data of above-mentioned pending data, the cryptographic hash being designated destination object of above-mentioned destination object, above-mentioned Mapping data structure is Hash table, wherein, if cannot find the list item that the mark of the pending data of record is identical with the mark of destination object, said method also comprises:
S1, by the columns remainder of the cryptographic hash of newly-increased data to Hash table, obtains the result N of remainder;
S2, judges whether the list item that in Hash table, each row N arranges is empty;
S3, if exist for empty list item, then the corresponding relation between the cryptographic hash that newly-increased data are recorded in selection one in for empty list item and the position of array member in the first array storing newly-increased data;
S4, if do not exist for empty list item, then selects a list item in the list item that each row N arranges in Hash table, the cryptographic hash recorded is replaced with the cryptographic hash of newly-increased data in selected list item.
Specifically describe in conjunction with following example, shown in associative list 1, suppose that the cryptographic hash increasing data newly is K, by the columns remainder of the cryptographic hash K of above-mentioned newly-increased data to Hash table DHash, obtain remainder N, such as, above-mentioned remainder is 3, whether the list item that then in above-mentioned Hash table DHash, each row the 3rd arranges is empty, draws to there is empty list item at the 3rd row of the 3rd row after searching, then above-mentioned empty list item can be selected to store the position of array member in the first array DArray of newly-increased data.
Again such as, shown in associative list 1, suppose the cryptographic hash of newly-increased data be K (such as, K=6), by columns (such as, the columns=10) remainder of the cryptographic hash K of above-mentioned newly-increased data to Hash table DHash, obtain remainder N (such as, above-mentioned remainder is 6).Then, judge whether the list item that in above-mentioned Hash table DHash, each row the 6th arranges is empty, known as shown in Table 1, list item in 6th row of often going in Hash table DHash takies all, then can in Hash table DHash each row the 6th row in select a list item (such as, select the earliest stored in the list item of the 6th row of the 1st row in Hash table), the cryptographic hash recorded in selected list item is replaced with the cryptographic hash of newly-increased data.
Alternatively, in the present embodiment, to can be, but not limited to first to replace the longest list item writing time when replacing in the list item in Mapping data structure (such as, Hash table DHash).Wherein, the list item array member identified and the array member that the list item of newly-increased data identifies that are replaced in Mapping data structure (such as, Hash table DHash) in the present embodiment can be, but not limited to as relevant array member.
By embodiment provided by the invention, when cannot at Mapping data structure (such as, Hash table DHash) in find the mark of pending data (such as, the cryptographic hash of pending data) with the mark of destination object (such as, the cryptographic hash of destination object) identical list item time, then in Mapping data structure, select a suitable list item to the corresponding relation between the cryptographic hash recording newly-increased data and the position of array member in the first array storing above-mentioned newly-increased data according to predetermined condition, by the mode that the relevant information of newly-increased data is carried out upgrading in Mapping data structure, make the array member in Hash table and the first array can keep corresponding relation in real time, and then ensure can the position of array member in real time in Obtaining Accurate first array by Mapping data structure.
As the optional scheme of one, aforesaid operations is query manipulation, and above-mentioned destination object is the pending data be included in the first array, wherein, the position in the first array comprises destination object executable operations:
S1, obtains destination object from the array member be arranged in position;
S2, returns the destination object got.
Specifically in conjunction with following example explanation, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receive client 202 send for the type Type in the first array DArray being the request that the second array member D_2 of 2 inquires about, wherein, the cryptographic hash of above-mentioned destination object is k1, then search in Hash table DHash and whether have and above-mentioned destination object, namely type Type is the list item that the cryptographic hash of the second array member D_2 of 2 is identical, suppose to find above-mentioned list item, then obtain the position of above-mentioned destination object in the first array DArray by the list item in above-mentioned Hash table DHash, such as, the value of the index Index of the position of above-mentioned destination object in the first array DArray is 10, then obtain the Data corresponding to destination object from the array member above-mentioned position, and the Data corresponding to the above-mentioned destination object got is returned.
Describe below in conjunction with concrete scene, suppose that client 202 is for microblogging client, server 204 receives the request of the message for inquiring about the rank the 3rd in the temperature ranking list in microblogging that above-mentioned microblogging client sends, then server 204 by the mark of the message according to above-mentioned rank the 3rd (such as, this is designated k3) in Hash table DHash, search the position of above-mentioned message in the first array DArray, then obtain above-mentioned message from the array member be arranged in above-mentioned position, and return the above-mentioned message got.
By embodiment provided by the invention, the position of above-mentioned destination object in the first array is searched by utilizing Mapping data structure, return searching the above-mentioned destination object obtained according to above-mentioned position again, and then the data in the array member realizing in fast finding first array, improve the efficiency of data query.
As the optional scheme of one, be operating as newly-increased operation, destination object is the newly-increased data different from the pending data be included in the first array, wherein, the destination object according to operation be identified in Mapping data structure the array member that searches and the store destination object position in the first array after, method also comprises:
S1, stores the position of array member in the first array of destination object if cannot find in Mapping data structure, then judge whether there is empty array member in the first array;
S2, if there is empty array member, then selects the array member that empty, stores the type of newly-increased data and newly-increased data in the array member of selected sky;
S3, before the array member of selected sky is comprised node identification be set to for represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member before the array member of selected sky in the position of the first array, the postjunction mark that the array member of selected sky is comprised be set to for represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member after the array member of selected sky in the position of the first array; The postjunction of the array member before the array member being arranged in selected sky mark is revised as representing that the array member of selected sky is in the position of the first array, and node identification before the array member after the array member being arranged in selected sky is revised as representing that the array member of selected sky is in the position of the first array;
S4, the corresponding relation in Mapping data structure between the mark of the newly-increased data of record and the position of the array member of selected sky in the first array.
Specifically in conjunction with following example explanation, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receives the request of the 4th array member D_4 process for the type Type in the first array DArray being 2 that client 202 sends, wherein, the cryptographic hash of above-mentioned destination object is k4.The 4th position of array member D_4 in the first array DArray of destination object is stored if cannot find in Hash table DHash, then can judge that aforesaid operations is newly-increased data manipulation, thus judge in the first array DArray, whether there is empty array member further.Suppose to there is empty array member, then from the array member of above-mentioned sky, select an empty array member for storing the type of above-mentioned newly-increased data and above-mentioned newly-increased data, wherein, the above-mentioned position of empty array member in the first array DArray is 8.Simultaneously, as shown in Figure 5, front and back node identification in selected empty array member is arranged, above-mentioned 4th array member D_4 is supposed to increase newly between the first array member D_1 and the second array member D_2, then the value of node identification PreElem before above-mentioned 4th array member D_4 is set to 3, the value of postjunction mark NextElem is set to 10, and the value of NextElem is identified (such as to the postjunction of the first array member D_1 before the 4th array member D_4, this value is 10) be revised as value 8 for representing the 4th array member D_4 position, to the value of node identification PreElem before the second array member D_2 after the 4th array member D_4 (such as, this value is 3) be revised as value 8 for representing the 4th array member D_4 position, and the corresponding relation in Hash table DHash between the mark of the newly-increased data of record and the position of the array member of selected sky in the first array DArray.
By embodiment provided by the invention, by storing the type of newly-increased data and newly-increased data in the empty array member in the first array, revise the linking relationship between above-mentioned array member simultaneously, thus ensure that and can obtain corresponding array member real-time from the first array, improve the efficiency of data processing.
As the optional scheme of one, after judging whether there is empty array member in the first array, method also comprises:
S1, if there is not empty array member, then searches the array member storing the mark pending data relevant to the mark of newly-increased data in the first array;
The pending data that the array member found comprises are replaced with newly-increased data by S2, and the type of the pending data array member found comprised replaces with the type of newly-increased data;
S3, postjunction mark in the previous array member represented by front node identification in the array member found is revised as the rear position of number group membership in the first array that the postjunction mark for representing in the array member that finds represents, and in the rear number group membership that the postjunction mark in the array member found is represented before node identification be revised as the previous position of array member in the first array for representing that before in the array member that finds, node identification represents;
S4, before the array member found is comprised node identification be revised as represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member before the array member found in the position of the first array, the postjunction mark that the array member found is comprised be revised as represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member after the array member found in the position of the first array;
S5, the postjunction of the array member be arranged in before the array member that finds mark is revised as representing that the array member found is in the position of the first array, and node identification before the array member be arranged in after the array member that finds is revised as representing that the array member found is in the position of the first array.
Alternatively, in this city embodiment, suppose when above-mentioned Mapping data structure is Hash table DHash, and when there is not the array member of above-mentioned sky in above-mentioned first array, then need to select the dependency number group membership meeting predetermined condition to carry out the replacement of data, wherein, as array member no longer free in above-mentioned first array DArray, then corresponding Hash table DHash is also for taking state, thus when the newly-increased data of needs, then needs also to carry out renewal to the data in Hash table DHash and replaces.Wherein, the predetermined condition that the array member in above-mentioned first array DArray will meet when replacing can include but not limited to: newly-increased data are the related data members being positioned at same position in Hash table DHash with being replaced data.
Specifically illustrate in conjunction with following example, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receives the request of the 4th array member D_4 process for the type Type in the first array DArray being 2 that client 202 sends, wherein, the cryptographic hash of above-mentioned destination object is k4.The 4th position of array member D_4 in the first array DArray of destination object is stored if cannot find in Hash table DHash, then can judge that aforesaid operations is newly-increased data manipulation, thus judge in the first array DArray, whether there is empty array member further.Suppose to there is not empty array member, then need the original old array member recorded to replace with new array member.As shown in Figure 6, the 4th newly-increased array member D_4 replaces original second array member D_2, the value of node identification PreElem before 4th array member D_4 is set to 3 simultaneously, the value of postjunction mark NextElem is set to 25, and the value of NextElem is identified (such as to the postjunction of the first array member D_1 before the 4th array member D_4, this value is 10) be revised as value 8 for representing the 4th array member D_4 position, to the value of node identification PreElem before the 3rd array member D_3 after the 4th array member D_4 (such as, this value is 3) be revised as value 8 for representing the 4th array member D_4 position.
Describe below in conjunction with concrete scene, suppose that client 202 is for microblogging client, server 204 receives the request of the message for the rank in the temperature ranking list in newly-increased microblogging the 3rd that above-mentioned microblogging client sends, then server 204 by the mark of the message according to above-mentioned rank the 3rd (such as, this is designated k3) in Hash table DHash, search the position of above-mentioned message in the first array DArray, the message of newly-increased the 3rd is replaced the message of existing 3rd in temperature ranking list, and the linking relationship between rank in above-mentioned temperature ranking list the 2nd and the 4th in array member is modified.
By embodiment provided by the invention, the type storing newly-increased data and newly-increased data is realized by the replacement to the array member recorded in the first array, revise the linking relationship between above-mentioned array member simultaneously, thus ensure that and can obtain corresponding array member real-time from the first array, improve the efficiency of data processing.
As the optional scheme of one, in the array member storing the type pending data identical with the type of newly-increased data, search the array member before the array member being positioned at selected sky by following steps and be positioned at the array member after the array member of selected sky:
S1, searches the first position of number group membership in the first array storing the type pending data identical with the type of newly-increased data from the second array;
S2, from the position found, judge whether the pending data that two number group memberships adjacent in the array member of the pending data that newly-increased data are identical with the type storing type and newly-increased data comprise meet predetermined insertion condition successively, until find the two number group memberships meeting predetermined insertion condition, and using the previous array member before the array member being positioned at selected sky in two number group memberships, and using in two number group memberships rear one as the array member after the array member being positioned at selected sky.
Alternatively, in the present embodiment, the second array TArray at least record every type and store every type pending data the first position of number group membership in the first array between corresponding relation.Alternatively, in the present embodiment, when the type of newly-increased data is existing type in the first array DArray, then the second array TArray can be utilized to start to judge successively according to the type of data, and whether two number group memberships adjacent in the array member of newly-increased data and pending data of the same type meet predetermined insertion condition.
Specifically illustrate in conjunction with following example, the first number group membership of dissimilar array member is recorded in the position of the first array DArray in second array TArray, such as, as shown in Figure 3, be the first position of number group membership D_1 in the first array DArray of the pending data of 2 for type Type be 3, then the value of the HeadIndex in the second array TArray is 3.
Further, shown in composition graphs 5, newly-increased data (such as, above-mentioned newly-increased data are the 4th array member D_4) type be existing type in the first array DArray, the second array TArray then can be utilized will to increase data newly and to insert the corresponding position of homogeneous data chained list, the mark of the front and back node of above-mentioned newly-increased array member be revised accordingly simultaneously.
As the optional scheme of one, be operating as deletion action, destination object is the pending data be included in the first array, wherein, the position in the first array comprises destination object executable operations:
S1, array member in the first array on delete position, postjunction mark in the previous array member represented by front node identification in the array member of deletion is revised as the rear number group membership that the postjunction mark for representing in the array member of deletion represents, and in the rear number group membership that the postjunction mark in the array member of deletion is represented before node identification be revised as representing deletion array member in before the previous array member that represents of node identification;
S2, deletes the corresponding relation between the mark of destination object and position in Mapping data structure.
Specifically illustrate in conjunction with following example, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receive client 202 send for the type Type in the first array DArray being the request that the second array member D_2 of 2 deletes, wherein, the cryptographic hash of above-mentioned destination object is k1, then search in Hash table DHash and whether have and above-mentioned destination object, namely type Type is the list item that the cryptographic hash of the second array member D_2 of 2 is identical, suppose to find above-mentioned list item, then obtain the position of above-mentioned destination object in the first array DArray by the list item in above-mentioned Hash table DHash, such as, the value of the index Index of the position of above-mentioned destination object in the first array DArray is 10, then the Data corresponding to the destination object of the array member on above-mentioned position is deleted, simultaneously, as shown in Figure 7, by the value of the postjunction of the first array member D_1 before the second array member D_2 mark NextElem (such as, this value is 10) be revised as value 25 for representing the 3rd array member D_3 position, by the value of node identification PreElem before the 3rd array member D_3 that is positioned at after the second array member D_2 (such as, this value is 10) be revised as value 3 for representing the first array member D_1 position, and the corresponding relation deleted in DHash between the mark of above-mentioned destination object and position.
Describe below in conjunction with concrete scene, suppose that client 202 is for microblogging client, server 204 receives the request of the message for deleting the rank the 3rd in the temperature ranking list in microblogging that above-mentioned microblogging client sends, then server 204 by the mark of the message according to above-mentioned rank the 3rd (such as, this is designated k3) in Hash table DHash, search the position of above-mentioned message in the first array DArray, then the above-mentioned message being arranged in above-mentioned position will be deleted, and the linking relationship revised in above-mentioned temperature ranking list between rank the 2nd and the 4th in array member.
By embodiment provided by the invention, the position of above-mentioned destination object in the first array is searched by utilizing Mapping data structure, again by the array member deletion in above-mentioned position, and then the array member realized in fast finding first array, and it is deleted according to request, improve the efficiency that data are deleted.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that can add required general hardware platform by software according to the method for above-described embodiment and realize, hardware can certainly be passed through, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computing machine, server, or the network equipment etc.) perform method described in each embodiment of the present invention.
Embodiment 2
According to the embodiment of the present invention, additionally provide a kind of data processing equipment for implementing above-mentioned data processing method, as shown in Figure 8, this device comprises:
1) receiving element 802, for receiving for asking the first message operated the first array, wherein, the first array comprises dissimilar pending data, and the pending data of every type are stored in the number group membership in the first array;
2) first unit 804 is searched, for according to operation destination object be identified in Mapping data structure the position of array member in the first array of searching and storing destination object, wherein, the corresponding relation between the mark at least recording the pending data of every type in Mapping data structure and the position of the array member storing pending data in the first array;
3) processing unit 806, during for finding the position of array member in the first array storing destination object in Mapping data structure, to destination object executable operations on the position in the first array.
Alternatively, above-mentioned data processing method can be applied to the process that the data of server 204 to the client 202 come on self terminal 206 process in the present embodiment, as shown in Figure 2.Wherein, above-mentioned client 202 can include but not limited to the application in terminal 206, such as, and micro-letter, microblogging.Alternatively, the above-mentioned process to the data execution in client 202 can include but not limited to following at least one in the present embodiment: increase newly, inquire about, delete.Such as, suppose that above-mentioned client 202 is for microblogging client, when server 204 receives, the message of the 3rd in the temperature ranking list in above-mentioned microblogging client is deleted, then can apply above-mentioned data processing method and deletion is performed to the data in microblogging client.Above-mentioned citing is a kind of example, and the present embodiment does not do any restriction to this.
Alternatively, above-mentioned Mapping data structure can be, but not limited to as Hash table in the present embodiment, by the mapping relations recorded in above-mentioned Hash table, searches the position of array member in the first array storing destination object.
Alternatively, in the present embodiment, in step S102, receive for before asking the first message of operating the first array, also comprise:
S1, sets up the first array, the pending data of every type is stored in the number group membership in the first array;
S2, sets up Mapping data structure, the corresponding relation between the mark at least recording the pending data of every type in Mapping data structure and the position of the array member storing pending data in the first array.
Alternatively, in the present embodiment, above-mentioned first array comprises dissimilar pending data, the pending data of every type are stored in the number group membership in the first array, wherein, each array member storing pending data also comprises: the type of pending data, for node identification before representing the position of previous array member in the first array, postjunction mark for the position of number group membership in the first array after representing.
Specifically illustrate by reference to the accompanying drawings, as shown in Figure 3, the first array DArray represents, describes for the first array member D_1 being positioned at the 3rd position in the first array DArray.Wherein, this array member comprises: the type Type of pending data is 2, before the position of previous array member in the first array DArray, node identification is PreElem is 0, and it is 10 that the postjunction of the rear position of number group membership in the first array DArray is designated NextElem.
Alternatively, in the present embodiment, the array member storing the pending data of same type forms link by front node identification and postjunction mark, and wherein, above-mentioned link can be, but not limited to as chained list link.Such as, shown in composition graphs 3-Fig. 4, belong to same type in the first array DArray, type Type is that the array member of the pending data of 2 comprises: the first array member D_1, the second array member D_2, the 3rd array member D_3.Be 3 for before position in the first array DArray of the previous array member of the second array member D_2, node identification is PreElem, it is 25 that the postjunction of the rear position of number group membership in the first array DArray is designated NextElem, then the chained list that the above-mentioned array member belonging to the pending data of same type can be formed as shown in Figure 4 by front node identification PreElem and postjunction mark NextElem links.
Alternatively, in the present embodiment, the corresponding relation between the mark at least recording the pending data of every type in above-mentioned Mapping data structure and the position of the array member storing pending data in the first array.Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, the mark of above-mentioned pending data can be, but not limited to the cryptographic hash into pending data.Such as, as shown in Figure 3, describe for the first array member D_1 being positioned at the 3rd position in the first array DArray, the information that above-mentioned first array member D_1 is corresponding in Hash table DHash comprises: for identifying the mark key of the data Data in the first array member D_1, value is k3, and for searching the index Index of the first position of array member D_1 in the first array DArray, value is 3.
Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, the size in the space shared by above-mentioned Hash table DHash is less than the space size shared by pending data in the first array DArray.
Such as, above-mentioned Hash table DHash can be as shown in table 2." sky " in table 2 represents that this position is unoccupied, " ... " represent that this position is occupied, the mark of concrete pending data does not represent at this in detail with the position of array member in the first array storing pending data.
Table 2
Alternatively, the second array TArray is also included but not limited in the present embodiment.Wherein, the second array at least record every type and store every type pending data the first position of number group membership in the first array between corresponding relation.Alternatively, successively the first position of number group membership in the first array storing the pending data of every type can be recorded in the array member in the second array TArray according to the order of type.
Such as, as shown in Figure 3, in the first number group membership in the second array TArray record store type Type be the first position of number group membership D_1 in the first array DArray of the pending data of 0 (such as, HeadIndex=11, represent that to store type Type be the position of the first number group membership D_1 of the pending data of 0 and be the 11st in the first array DArray), in the second number group membership in the second array TArray record store type Type be the first position of number group membership D_1 in the first array DArray of the pending data of 1 (such as, HeadIndex=4, represent that to store type Type be the position of the first number group membership D_1 of the pending data of 1 and be the 4th in the first array DArray), in the 3rd number group membership in the second array TArray record store type Type be the first position of number group membership D_1 in the first array DArray of the pending data of 2 (such as, HeadIndex=3, represent that to store type Type be the position of the first number group membership D_1 of the pending data of 2 and be the 3rd in the first array DArray).
Alternatively, in the present embodiment, server 204 receive that client 202 in terminal 206 sends for asking the first message operated the pending data in the first array DArray, wherein, above-mentioned first message includes but not limited to: ask the operation inquired about pending data, increase newly, delete.
Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, according to the corresponding relation between the mark of the pending data of the every type stored in Hash table DHash and the position of array member in the first array DArray storing pending data, search the position of destination object in the first array DArray of aforesaid operations, if find the position of array member in the first array DArray of above-mentioned destination object in Hash table DHash, relevant position then in the first array DArray performs corresponding operation to above-mentioned destination object.
Describe below in conjunction with concrete scene, suppose when above-mentioned Mapping data structure is Hash table DHash, above-mentioned client 202 is for microblogging client, above-mentioned microblogging client creates a memory pool in internal memory, the first array DArray is set up in this memory pool, all types of data are all stored in the first array DArray in this internal memory, such as, the type in above-mentioned first array DArray can include but not limited to: the keypoint recommendation in the temperature in microblogging, the liveness in microblogging, microblogging.Suppose that above-mentioned first array DArary data total amount is m.Server 204 receives deleting the message of the rank in the temperature ranking list in microblogging the 3rd of above-mentioned microblogging client transmission, then the mark (such as, this is designated k3) of the message according to above-mentioned rank the 3rd is searched the position of destination object in the first array DArray corresponding to above-mentioned message by server 204 in Hash table DHash.The position supposing the destination object corresponding to message finding above-mentioned rank the 3rd in microblogging temperature ranking list is 3, then the destination object on relevant position in the first array DArray is deleted, namely, the message of rank in microblogging temperature ranking list the 3rd is deleted, and the node identification of the front and back array member of this array member in the chain list catenation corresponding to the type is revised accordingly, can also show in a certain order to make other message in microblogging client temperature ranking list.
By embodiment provided by the invention, by setting up the first array and the Mapping data structure corresponding with the array member in the first array, utilize the mark of the destination object of the operation of asking, the array member position in the first array storing destination object is searched at Mapping data structure, to realize the acquisition quickly and accurately to the array member in the first array, and then improve the treatment effeciency to the data in the first array.
As the optional scheme of one, said apparatus also comprises in the present embodiment:
1) first unit is set up, for receiving for before asking the first message of operating the first array, set up the first array, the pending data of every type are stored in the number group membership in the first array, wherein, each array member storing pending data also comprises: the type of pending data, for node identification before representing the position of previous array member in the first array, postjunction mark for the position of number group membership in the first array after representing; Wherein, the array member storing the pending data of same type forms link by front node identification and postjunction mark;
2) second unit is set up, for setting up Mapping data structure, the corresponding relation between the mark at least recording the pending data of every type in Mapping data structure and the position of the array member storing pending data in the first array.
Alternatively, in the present embodiment, above-mentioned first array comprises dissimilar pending data, the pending data of every type are stored in the number group membership in the first array, wherein, each array member storing pending data also comprises: the type of pending data, for node identification before representing the position of previous array member in the first array, postjunction mark for the position of number group membership in the first array after representing.
Specifically illustrate by reference to the accompanying drawings, as shown in Figure 3, the first array DArray represents, describes for the first array member D_1 being positioned at the 3rd position in the first array DArray.Wherein, this array member comprises: the type Type of pending data is 2, before the position of previous array member in the first array DArray, node identification is PreElem is 0, and it is 10 that the postjunction of the rear position of number group membership in the first array DArray is designated NextElem.
Alternatively, in the present embodiment, the array member storing the pending data of same type forms link by front node identification and postjunction mark, and wherein, above-mentioned link can be, but not limited to as chained list link.Such as, shown in composition graphs 3-Fig. 4, belong to same type in the first array DArray, type Type is that the array member of the pending data of 2 comprises: the first array member D_1, the second array member D_2, the 3rd array member D_3.Be 3 for before position in the first array DArray of the previous array member of the second array member D_2, node identification is PreElem, it is 25 that the postjunction of the rear position of number group membership in the first array DArray is designated NextElem, then the chained list that the above-mentioned array member belonging to the pending data of same type can be formed as shown in Figure 4 by front node identification PreElem and postjunction mark NextElem links.
Alternatively, in the present embodiment, the corresponding relation between the mark at least recording the pending data of every type in above-mentioned Mapping data structure and the position of the array member storing pending data in the first array.Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, the mark of above-mentioned pending data can be, but not limited to identify by the cryptographic hash of pending data.Such as, as shown in Figure 3, describe for the first array member D_1 being positioned at the 3rd position in the first array DArray, the information that above-mentioned first array member D_1 is corresponding in Hash table DHash comprises: for identifying the mark key of the data Data in the first array member D_1, value is k3, and for searching the index Index of the first position of array member D_1 in the first array DArray, value is 3.
Alternatively, in the present embodiment, when above-mentioned Mapping data structure is Hash table DHash, the size in the space shared by above-mentioned Hash table DHash is less than the space size shared by pending data in the first array DArray.
Alternatively, the second array TArray is also included but not limited in the present embodiment.Wherein, the second array at least record every type and store every type pending data the first position of number group membership in the first array between corresponding relation.Such as, as shown in Figure 3, be the first position of number group membership D_1 in the first array DArray of the pending data of 2 for type Type be 3, the value of the HeadIndex then in the second array TArray is 3, and the value of the HeadIndex of corresponding other two types is respectively 11 and 4, that is, the first position of number group membership D_1 in the first array DArray of the pending data of this two class is respectively the 11st and the 4th.
As the optional scheme of one, first searches unit 804 comprises:
1) first module is searched, for the list item that the mark of the pending data of searching record in Mapping data structure is identical with the mark of destination object, wherein, the corresponding relation between the mark of each pending data and the position of array member in the first array storing pending data is recorded in a list item in Mapping data structure;
2) the first judge module, during for the list item identical with the mark of destination object in the mark of the pending data finding record, judge that destination object is the pending data be included in the first array, and from the list item found, obtain the position of array member in the first array storing destination object;
3) the second judge module, during for the list item identical with the mark of destination object in the mark of the pending data that cannot find record, judge that destination object is the newly-increased data different from the pending data be included in the first array, and the position of array member in the first array storing destination object cannot be found in Mapping data structure.
Alternatively, in the present embodiment, the mark of above-mentioned pending data can be, but not limited to the cryptographic hash into pending data, and the mark of above-mentioned destination object can be, but not limited to the cryptographic hash into destination object, and above-mentioned Mapping data structure can be, but not limited to as Hash table.The present embodiment does not do any restriction to this.Alternatively, search whether there be the list item identical with the cryptographic hash of destination object in the cryptographic hash recorded at Hash table DHash.If the cryptographic hash list item identical with destination object can be found in above-mentioned Hash table DHash, then represent that above-mentioned destination object has record in the array member of the pending data of the first array DArray, then the position of destination object in the first array DArray that can directly be obtained by Hash table DHash; If the cryptographic hash list item identical with destination object cannot be found in above-mentioned Hash table DHash, then represent that above-mentioned destination object is the newly-increased data different from the pending data recorded in the first array DArray, further, the described position of array member in the first array DArray storing described destination object cannot also just be found.
Specifically in conjunction with following example explanation, suppose server 204 receive client 202 send for the type Type in the first array DArray being the request that the second array member D_2 of 2 deletes, wherein, the cryptographic hash of above-mentioned destination object is k1, then search in Hash table DHash and whether have and above-mentioned destination object, namely type Type is the list item that the cryptographic hash of the second array member D_2 of 2 is identical, suppose to find in Hash table DHash and there is the list item identical with the cryptographic hash of above-mentioned destination object, the position of array member in the first array corresponding to above-mentioned destination object then directly can be obtained from list item, such as, the value of the index Index of above-mentioned target object position is 10, namely, above-mentioned destination object is positioned at the 10th position of the first array DArray.Suppose server 204 receive client 202 send for the type Type in the first array DArray being the request that the 4th array member D_4 of 2 modifies, after Hash table DHash searches, do not find the list item that cryptographic hash is identical with the cryptographic hash of above-mentioned destination object, then represent that above-mentioned destination object is the data different from the pending data in the first array DArray.
By embodiment provided by the invention, by searching in Mapping data structure, whether there is the list item identical with the mark of destination object, and then judge that whether above-mentioned destination object is the array member in the first array, the array member in the first array if judge, then can obtain the position of above-mentioned destination object in the first array from Mapping data structure, reach the position of the array member obtained quickly and accurately in the first array, improve the treatment effeciency to data, for user saves the running time.
As the optional scheme of one, the cryptographic hash being designated pending data of above-mentioned pending data, the cryptographic hash being designated destination object of above-mentioned destination object, above-mentioned Mapping data structure is Hash table, and wherein, the second judge module comprises:
1) calculating sub module, for by the columns remainder of the cryptographic hash of newly-increased data to Hash table, obtains the result N of remainder;
2) submodule is judged, for judging whether the list item that in Hash table, each row N arranges is empty;
3) the first chooser module, for when existing for empty list item, the corresponding relation between the cryptographic hash that newly-increased data are recorded in selection one in for empty list item and the position of array member in the first array storing newly-increased data;
4) the second chooser module, for not existing for empty list item, then, when selecting a list item in the list item that each row N arranges in Hash table, replaces with the cryptographic hash of newly-increased data by the cryptographic hash recorded in selected list item.
Specifically describe in conjunction with following example, shown in associative list 2, suppose that the cryptographic hash increasing data newly is K, by the columns remainder of the cryptographic hash K of above-mentioned newly-increased data to Hash table DHash, obtain remainder N, such as, above-mentioned remainder is 3, whether the list item that then in above-mentioned Hash table DHash, each row the 3rd arranges is empty, draws to there is empty list item at the 3rd row of the 3rd row after searching, then above-mentioned empty list item can be selected to store the position of array member in the first array DArray of newly-increased data.
Again such as, shown in associative list 2, suppose the cryptographic hash of newly-increased data be K (such as, K=6), by columns (such as, the columns=10) remainder of the cryptographic hash K of above-mentioned newly-increased data to Hash table DHash, obtain remainder N (such as, above-mentioned remainder is 6).Then, judge whether the list item that in above-mentioned Hash table DHash, each row the 6th arranges is empty, known as shown in Table 2, list item in 6th row of often going in Hash table DHash takies all, then can in Hash table DHash each row the 6th row in select a list item (such as, select the earliest stored in the list item of the 6th row of the 1st row in Hash table), the cryptographic hash recorded in selected list item is replaced with the cryptographic hash of newly-increased data.
Alternatively, in the present embodiment, to can be, but not limited to first to replace the longest list item writing time when replacing in the list item in Mapping data structure (such as, Hash table DHash).Wherein, the list item array member identified and the array member that the list item of newly-increased data identifies that are replaced in Mapping data structure (such as, Hash table DHash) in the present embodiment can be, but not limited to as relevant array member.
By embodiment provided by the invention, when cannot at Mapping data structure (such as, Hash table DHash) in find the mark of pending data (such as, the cryptographic hash of pending data) with the mark of destination object (such as, the cryptographic hash of destination object) identical list item time, then in Mapping data structure, select a suitable list item to the corresponding relation between the cryptographic hash recording newly-increased data and the position of array member in the first array storing above-mentioned newly-increased data according to predetermined condition, by the mode that the relevant information of newly-increased data is carried out upgrading in Mapping data structure, make the array member in Hash table and the first array can keep corresponding relation in real time, and then ensure can the position of array member in real time in Obtaining Accurate first array by Mapping data structure.
As the optional scheme of one, be operating as query manipulation, destination object is the pending data be included in the first array, and wherein, processing unit 806 comprises:
1) acquisition module, for obtaining destination object from the array member be arranged on position;
2) module is returned, for returning the destination object got.
Specifically in conjunction with following example explanation, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receive client 202 send for the type Type in the first array DArray being the request that the second array member D_2 of 2 inquires about, wherein, the cryptographic hash of above-mentioned destination object is k1, then search in Hash table DHash and whether have and above-mentioned destination object, namely type Type is the list item that the cryptographic hash of the second array member D_2 of 2 is identical, suppose to find above-mentioned list item, then obtain the position of above-mentioned destination object in the first array DArray by the list item in above-mentioned Hash table DHash, such as, the value of the index Index of the position of above-mentioned destination object in the first array DArray is 10, then obtain the Data corresponding to destination object from the array member above-mentioned position, and the Data corresponding to the above-mentioned destination object got is returned.
Describe below in conjunction with concrete scene, suppose that client 202 is for microblogging client, server 204 receives the request of the message for inquiring about the rank the 3rd in the temperature ranking list in microblogging that above-mentioned microblogging client sends, then server 204 by the mark of the message according to above-mentioned rank the 3rd (such as, this is designated k3) in Hash table DHash, search the position of above-mentioned message in the first array DArray, then obtain above-mentioned message from the array member be arranged in above-mentioned position, and return the above-mentioned message got.
By embodiment provided by the invention, the position of above-mentioned destination object in the first array is searched by utilizing Mapping data structure, return searching the above-mentioned destination object obtained according to above-mentioned position again, and then the data in the array member realizing in fast finding first array, improve the efficiency of data query
As the optional scheme of one, aforesaid operations is newly-increased operation, and above-mentioned destination object is the newly-increased data different from the pending data be included in the first array, and wherein, device also comprises:
1) judging unit, for the destination object according to operation be identified in Mapping data structure the array member that searches and the store destination object position in the first array after, when the position of array member in the first array storing destination object cannot be found in Mapping data structure, judge in the first array, whether to there is empty array member;
2) storage unit, for when there is empty array member, selects the array member that empty, stores the type of newly-increased data and newly-increased data in the array member of selected sky;
3) setting unit, for node identification before the array member of selected sky is comprised be set to for represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member before the array member of selected sky in the position of the first array, the postjunction mark that the array member of selected sky is comprised be set to for represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member after the array member of selected sky in the position of the first array, the postjunction of the array member before the array member being arranged in selected sky mark is revised as representing that the array member of selected sky is in the position of the first array, and node identification before the array member after the array member being arranged in selected sky is revised as representing that the array member of selected sky is in the position of the first array,
4) record cell, the corresponding relation for the mark of the newly-increased data of record in Mapping data structure and the array member of selected sky between the position in the first array.
Specifically in conjunction with following example explanation, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receives the request of the 4th array member D_4 process for the type Type in the first array DArray being 2 that client 202 sends, wherein, the cryptographic hash of above-mentioned destination object is k4.The 4th position of array member D_4 in the first array DArray of destination object is stored if cannot find in Hash table DHash, then can judge that aforesaid operations is newly-increased data manipulation, thus judge in the first array DArray, whether there is empty array member further.Suppose to there is empty array member, then from the array member of above-mentioned sky, select an empty array member for storing the type of above-mentioned newly-increased data and above-mentioned newly-increased data, wherein, the above-mentioned position of empty array member in the first array DArray is 8.Simultaneously, as shown in Figure 5, front and back node identification in selected empty array member is arranged, above-mentioned 4th array member D_4 is supposed to increase newly between the first array member D_1 and the second array member D_2, then the value of node identification PreElem before above-mentioned 4th array member D_4 is set to 3, the value of postjunction mark NextElem is set to 10, and the value of NextElem is identified (such as to the postjunction of the first array member D_1 before the 4th array member D_4, this value is 10) be revised as value 8 for representing the 4th array member D_4 position, to the value of node identification PreElem before the second array member D_2 after the 4th array member D_4 (such as, this value is 3) be revised as value 8 for representing the 4th array member D_4 position, and the corresponding relation in Hash table DHash between the mark of the newly-increased data of record and the position of the array member of selected sky in the first array DArray.
By embodiment provided by the invention, by storing the type of newly-increased data and newly-increased data in the empty array member in the first array, revise the linking relationship between above-mentioned array member simultaneously, thus ensure that and can obtain corresponding array member real-time from the first array, improve the efficiency of data processing.
As the optional scheme of one, said apparatus also comprises in the present embodiment:
1) second searching unit, after judging whether there is empty array member in the first array, when there is not empty array member, in the first array, searching the array member storing the mark pending data relevant to the mark of newly-increased data;
2) replacement unit, replaces with newly-increased data for the pending data array found member comprised, and the type of the pending data array member found comprised replaces with the type of newly-increased data;
3) the first amendment unit, be revised as the postjunction mark in the previous array member that represented by node identification front in the array found member the rear position of number group membership in the first array that the postjunction mark for representing in the array member that finds represents, and in the rear number group membership that the postjunction mark in the array member found is represented before node identification be revised as the previous position of array member in the first array for representing that before in the array member that finds, node identification represents;
4) the second amendment unit, for node identification before the array found member is comprised be revised as represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member before the array member found in the position of the first array, the postjunction mark that the array member found is comprised be revised as represent store the type pending data identical with the type of newly-increased data array member in be arranged in array member after the array member found in the position of the first array;
5) the 3rd amendment unit, for the postjunction of the array member be arranged in before the array member that finds mark is revised as representing that the array member found is in the position of the first array, and node identification before the array member be arranged in after the array member that finds is revised as representing that the array member found is in the position of the first array.
Alternatively, in this city embodiment, suppose when above-mentioned Mapping data structure is Hash table DHash, and when there is not the array member of above-mentioned sky in above-mentioned first array, then need to select the dependency number group membership meeting predetermined condition to carry out the replacement of data, wherein, as array member no longer free in above-mentioned first array DArray, then corresponding Hash table DHash is also for taking state, thus when the newly-increased data of needs, then needs also to carry out renewal to the data in Hash table DHash and replaces.Wherein, the predetermined condition that the array member in above-mentioned first array DArray will meet when replacing can include but not limited to: newly-increased data are the related data members being positioned at same position in Hash table DHash with being replaced data.
Specifically illustrate in conjunction with following example, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receives the request of the 4th array member D_4 process for the type Type in the first array DArray being 2 that client 202 sends, wherein, the cryptographic hash of above-mentioned destination object is k4.The 4th position of array member D_4 in the first array DArray of destination object is stored if cannot find in Hash table DHash, then can judge that aforesaid operations is newly-increased data manipulation, thus judge in the first array DArray, whether there is empty array member further.Suppose to there is not empty array member, then need the original old array member recorded to replace with new array member.As shown in Figure 6, the 4th newly-increased array member D_4 replaces original second array member D_2, the value of node identification PreElem before 4th array member D_4 is set to 3 simultaneously, the value of postjunction mark NextElem is set to 25, and the value of NextElem is identified (such as to the postjunction of the first array member D_1 before the 4th array member D_4, this value is 10) be revised as value 8 for representing the 4th array member D_4 position, to the value of node identification PreElem before the 3rd array member D_3 after the 4th array member D_4 (such as, this value is 3) be revised as value 8 for representing the 4th array member D_4 position.
Describe below in conjunction with concrete scene, suppose that client 202 is for microblogging client, server 204 receives the request of the message for the rank in the temperature ranking list in newly-increased microblogging the 3rd that above-mentioned microblogging client sends, then server 204 by the mark of the message according to above-mentioned rank the 3rd (such as, this is designated k3) in Hash table DHash, search the position of above-mentioned message in the first array DArray, the message of newly-increased the 3rd is replaced the message of existing 3rd in temperature ranking list, and the linking relationship between rank in above-mentioned temperature ranking list the 2nd and the 4th in array member is modified.
By embodiment provided by the invention, the type storing newly-increased data and newly-increased data is realized by the replacement to the array member recorded in the first array, revise the linking relationship between above-mentioned array member simultaneously, thus ensure that and can obtain corresponding array member real-time from the first array, improve the efficiency of data processing.
As the optional scheme of one, said apparatus also comprises in the present embodiment:
1) the 3rd unit is searched, for the array member after the array member that searches array member before the array member being positioned at selected sky and be positioned at selected sky in the array member storing the type pending data identical with the type of newly-increased data;
2) the 3rd search unit and comprise: second searches module, for searching the first position of number group membership in the first array storing the type pending data identical with the type of newly-increased data from the second array, wherein, the second array at least record every type and store every type pending data the first position of number group membership in the first array between corresponding relation;
3) the 3rd judge module, for judging from the position found whether the pending data that two number group memberships adjacent in the array member of the pending data that newly-increased data are identical with the type storing type and newly-increased data comprise meet predetermined insertion condition successively, until find the two number group memberships meeting predetermined insertion condition, and using the previous array member before the array member being positioned at selected sky in two number group memberships, and using in two number group memberships rear one as the array member after the array member being positioned at selected sky.
Alternatively, in the present embodiment, the second array TArray at least record every type and store every type pending data the first position of number group membership in the first array between corresponding relation.Alternatively, in the present embodiment, when the type of newly-increased data is existing type in the first array DArray, then the second array TArray can be utilized to start to judge successively according to the type of data, and whether two number group memberships adjacent in the array member of newly-increased data and pending data of the same type meet predetermined insertion condition.
Specifically illustrate in conjunction with following example, the first number group membership of dissimilar array member is recorded in the position of the first array DArray in second array TArray, such as, as shown in Figure 3, be the first position of number group membership D_1 in the first array DArray of the pending data of 2 for type Type be 3, then the value of the HeadIndex in the second array TArray is 3.
Further, shown in composition graphs 5, newly-increased data (such as, above-mentioned newly-increased data are the 4th array member D_4) type be existing type in the first array DArray, the second array TArray then can be utilized will to increase data newly and to insert the corresponding position of homogeneous data chained list, the mark of the front and back node of above-mentioned newly-increased array member be revised accordingly simultaneously.
As the optional scheme of one, aforesaid operations is deletion action, and above-mentioned destination object is the pending data be included in the first array, and wherein, processing unit 806 comprises:
1) modified module, array member on delete position in the first array, postjunction mark in the previous array member represented by front node identification in the array member of deletion is revised as the rear number group membership that the postjunction mark for representing in the array member of deletion represents, and in the rear number group membership that the postjunction mark in the array member of deletion is represented before node identification be revised as representing deletion array member in before the previous array member that represents of node identification;
2) removing module, for deleting the corresponding relation between the mark of destination object and position in Mapping data structure.
Specifically illustrate in conjunction with following example, suppose when above-mentioned Mapping data structure is Hash table DHash, the cryptographic hash being designated pending data of above-mentioned pending data, above-mentioned destination object be designated the cryptographic hash of destination object time, server 204 receive client 202 send for the type Type in the first array DArray being the request that the second array member D_2 of 2 deletes, wherein, the cryptographic hash of above-mentioned destination object is k1, then search in Hash table DHash and whether have and above-mentioned destination object, namely type Type is the list item that the cryptographic hash of the second array member D_2 of 2 is identical, suppose to find above-mentioned list item, then obtain the position of above-mentioned destination object in the first array DArray by the list item in above-mentioned Hash table DHash, such as, the value of the index Index of the position of above-mentioned destination object in the first array DArray is 10, then the Data corresponding to the destination object of the array member on above-mentioned position is deleted, simultaneously, as shown in Figure 7, by the value of the postjunction of the first array member D_1 before the second array member D_2 mark NextElem (such as, this value is 10) be revised as value 25 for representing the 3rd array member D_3 position, by the value of node identification PreElem before the 3rd array member D_3 that is positioned at after the second array member D_2 (such as, this value is 10) be revised as value 3 for representing the first array member D_1 position, and the corresponding relation deleted in DHash between the mark of above-mentioned destination object and position.
Describe below in conjunction with concrete scene, suppose that client 202 is for microblogging client, server 204 receives the request of the message for deleting the rank the 3rd in the temperature ranking list in microblogging that above-mentioned microblogging client sends, then server 204 by the mark of the message according to above-mentioned rank the 3rd (such as, this is designated k3) in Hash table DHash, search the position of above-mentioned message in the first array DArray, then the above-mentioned message being arranged in above-mentioned position will be deleted, and the linking relationship revised in above-mentioned temperature ranking list between rank the 2nd and the 4th in array member.
By embodiment provided by the invention, the position of above-mentioned destination object in the first array is searched by utilizing Mapping data structure, again by the array member deletion in above-mentioned position, and then the array member realized in fast finding first array, and it is deleted according to request, improve the efficiency that data are deleted.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed client, the mode by other realizes.Wherein, device embodiment described above is only schematic, the such as division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of unit or module or communication connection can be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprises all or part of step of some instructions in order to make a computer equipment (can be personal computer, server or the network equipment etc.) perform method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (18)

1. a data processing method, is characterized in that, comprising:
Receive for asking the first message operated the first array, wherein, described first array comprises dissimilar pending data, and the described pending data of every type are stored in the number group membership in described first array;
The position of described array member in described first array of searching and storing described destination object is identified in Mapping data structure according to the destination object of described operation, wherein, the corresponding relation between the mark at least recording the described pending data of every type in described Mapping data structure and the position of the described array member storing described pending data in described first array;
Store the position of described array member in described first array of described destination object if find in Mapping data structure, then the described position in described first array performs described operation to described destination object.
2. method according to claim 1, is characterized in that, described reception, for before asking the first message of operating the first array, also comprises:
Set up described first array, the described pending data of every type are stored in the number group membership in described first array, wherein, each described array member storing described pending data also comprises: the type of described pending data, for node identification before representing the position of previous array member in described first array, postjunction mark for the position of a number group membership in described first array after representing; Wherein, the described array member storing the described pending data of same type forms link by described front node identification and described postjunction mark;
Set up described Mapping data structure, the corresponding relation between the mark at least recording the described pending data of every type in described Mapping data structure and the position of the described array member storing described pending data in described first array.
3. method according to claim 1, is characterized in that, being identified in Mapping data structure of the described destination object according to described operation is searched the position of described array member in described first array storing described destination object and comprised:
The list item that the mark of the described pending data of record is identical with the mark of described destination object is searched in described Mapping data structure, wherein, the corresponding relation between the mark of each described pending data and the position of described array member in described first array storing described pending data is recorded in a list item in described Mapping data structure;
If find the list item that the mark of the described pending data of described record is identical with the mark of described destination object, then represent that described destination object is be included in the described pending data in described first array, and from the described list item found, obtain the position of described array member in described first array storing described destination object;
If the list item that the mark of the described pending data of described record is identical with the mark of described destination object cannot be found, then represent that described destination object is the newly-increased data different from the described pending data be included in described first array, and expression cannot find the position of described array member in described first array storing described destination object in Mapping data structure.
4. method according to claim 3, it is characterized in that, the cryptographic hash being designated described pending data of described pending data, the cryptographic hash being designated described destination object of described destination object, described Mapping data structure is Hash table, wherein, if the list item that the mark that cannot find the described pending data of described record is identical with the mark of described destination object, described method also comprises:
By the columns remainder of the cryptographic hash of described newly-increased data to described Hash table, obtain the result N of described remainder;
Judge whether the list item that in described Hash table, each row N arranges is empty;
If exist for empty described list item, then described for empty described list item in select one to record described newly-increased data cryptographic hash and the position of array member in described first array storing described newly-increased data between corresponding relation;
If do not exist for empty described list item, then select a list item in the list item that each row N arranges in described Hash table, the cryptographic hash recorded is replaced with the cryptographic hash of described newly-increased data in selected list item.
5. method according to any one of claim 1 to 4, it is characterized in that, describedly be operating as query manipulation, described destination object is be included in the described pending data in described first array, wherein, described described position in described first array performs described operation to described destination object to comprise:
Described destination object is obtained from the described array member be arranged in described position;
Return the described destination object got.
6. method according to any one of claim 1 to 4, it is characterized in that, described being operating as increases operation newly, described destination object is the newly-increased data different from the described pending data be included in described first array, wherein, the destination object according to described operation be identified in Mapping data structure the described array member that searches and the store described destination object position in described first array after, described method also comprises:
If store the position of described array member in described first array of described destination object described in cannot finding in described Mapping data structure, then judge in described first array, whether to there is empty array member;
If there is the array member of described sky, then select the array member of a described sky, in the array member of selected sky, store the type of described newly-increased data and described newly-increased data;
Before the array member of described selected sky is comprised node identification be set to for represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in array member before the array member of described selected sky in the position of described first array, the postjunction mark that the array member of described selected sky is comprised be set to for represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in described selected by sky array member after array member in the position of described first array; The postjunction mark of the array member before the described array member being arranged in described selected sky is revised as representing that the array member of described selected sky is in the position of described first array, and node identification before the array member after the described array member being arranged in described selected sky is revised as representing that the array member of described selected sky is in the position of described first array;
Corresponding relation between the array member of the mark and selected sky that record described newly-increased data in the described Mapping data structure position in the first array.
7. method according to claim 6, is characterized in that, after judging whether there is empty array member in described first array, described method also comprises:
If there is not the array member of described sky, then store the described array member of the mark described pending data relevant to the mark of described newly-increased data described in searching in described first array;
The described pending data that the described described array member found comprises are replaced with described newly-increased data, and the type of the described pending data described described array member found comprised replaces with the type of described newly-increased data;
Postjunction mark in the previous array member represent front node identification in the described described array member found is revised as the rear position of a number group membership in described first array that the postjunction mark in the described array member for finding described in representing represents, and in the rear number group membership that the described postjunction mark in the described described array member found is represented before node identification be revised as finding described in representing described array member in before the position of described previous array member in described first array that represent of node identification,
Before the described described array member found is comprised node identification be revised as represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in described in array member before the described array member that finds in the position of described first array, the postjunction mark that the described described array member found is comprised be revised as represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in described in array member after the described array member that finds in the position of described first array;
The described postjunction mark being arranged in array member before the described array member found is revised as described array member for finding described in representing in the position of described first array, and the described array member of being revised as by node identification before the described array member be arranged in after the described array member found for finding described in representing is in the position of described first array.
8. method according to claim 6, it is characterized in that, in the described array member storing the type described pending data identical with the type of described newly-increased data, search the array member before the array member being positioned at described selected sky by following steps and be positioned at the array member after the array member of described selected sky:
First position of described array member in described first array storing the type described pending data identical with the type of described newly-increased data is searched from the second array, wherein, described second array at least records the corresponding relation between described every type and the position of described first the described array member storing the described pending data of every type in described first array;
From the position found, judge whether the described pending data that in the described array member of the described pending data that described newly-increased data are identical with the described type storing type and described newly-increased data, two adjacent number group memberships comprise meet predetermined insertion condition successively, until find the described two number group memberships meeting described predetermined insertion condition, and using in described two number group memberships previous as described in be positioned at array member before the array member of described selected sky, and using in two number group memberships rear one as described in be positioned at array member after the array member of described selected sky.
9. method according to any one of claim 1 to 4, it is characterized in that, describedly be operating as deletion action, described destination object is be included in the described pending data in described first array, wherein, described described position in described first array performs described operation to described destination object to comprise:
The described array member on described position is deleted in described first array, postjunction mark in the previous array member that represents of front node identification in the described array member deleted is revised as the rear number group membership that the postjunction mark for representing in the described array member of deletion represents, and in the rear number group membership that the described postjunction mark in the described array member deleted is represented before node identification be revised as representing deletion described array member in before the described previous array member that represents of node identification;
The corresponding relation between the mark of described destination object and described position is deleted in described Mapping data structure.
10. a data processing equipment, is characterized in that, comprising:
Receiving element, for receiving for asking the first message operated the first array, wherein, described first array comprises dissimilar pending data, and the described pending data of every type are stored in the number group membership in described first array;
First searches unit, the position of described array member in described first array of searching and storing described destination object is identified in Mapping data structure for the destination object according to described operation, wherein, the corresponding relation between the mark at least recording the described pending data of every type in described Mapping data structure and the position of the described array member storing described pending data in described first array;
Processing unit, during for finding the position of described array member in described first array storing described destination object in Mapping data structure, the described position in described first array performs described operation to described destination object.
11. devices according to claim 10, is characterized in that, described device also comprises:
First sets up unit, for receiving for before asking the first message of operating the first array, set up described first array, the described pending data of every type are stored in the number group membership in described first array, wherein, each described array member storing described pending data also comprises: the type of described pending data, for node identification before representing the position of previous array member in described first array, postjunction mark for the position of a number group membership in described first array after representing; Wherein, the described array member storing the described pending data of same type forms link by described front node identification and described postjunction mark;
Second sets up unit, for setting up described Mapping data structure, the corresponding relation between the mark at least recording the described pending data of every type in described Mapping data structure and the position of the described array member storing described pending data in described first array.
12. devices according to claim 10, is characterized in that, described first searches unit comprises:
First searches module, for the list item that the mark of the described pending data of searching record in described Mapping data structure is identical with the mark of described destination object, wherein, the corresponding relation between the mark of each described pending data and the position of described array member in described first array storing described pending data is recorded in a list item in described Mapping data structure;
First judge module, during for the list item identical with the mark of described destination object in the mark of the described pending data finding described record, judge that described destination object is be included in the described pending data in described first array, and from the described list item found, obtain the position of described array member in described first array storing described destination object;
Second judge module, during for the list item identical with the mark of described destination object in the mark of the described pending data that cannot find described record, judge that described destination object is the newly-increased data different from the described pending data be included in described first array, and the position of described array member in described first array storing described destination object cannot be found in Mapping data structure.
13. devices according to claim 12, is characterized in that, the cryptographic hash being designated described pending data of described pending data, the cryptographic hash being designated described destination object of described destination object, described Mapping data structure is Hash table, and wherein, described second judge module comprises:
Calculating sub module, for by the columns remainder of the cryptographic hash of described newly-increased data to described Hash table, obtains the result N of described remainder;
Judge submodule, for judging whether the list item that in described Hash table, each row N arranges is empty;
First chooser module, for when existing for empty described list item, described for empty described list item in select one to record described newly-increased data cryptographic hash and the position of array member in described first array storing described newly-increased data between corresponding relation;
Second chooser module, for not existing for empty described list item, then, when selecting a list item in the list item that each row N arranges in described Hash table, replaces with the cryptographic hash of described newly-increased data by the cryptographic hash recorded in selected list item.
14., according to claim 10 to the device according to any one of 13, is characterized in that, described in be operating as query manipulation, described destination object is be included in the described pending data in described first array, and wherein, described processing unit comprises:
Acquisition module, for obtaining described destination object from the described array member be arranged on described position;
Return module, for returning the described destination object got.
15., according to claim 10 to the device according to any one of 13, is characterized in that, described in be operating as newly-increased operation, described destination object is the newly-increased data different from the described pending data be included in described first array, and wherein, described device also comprises:
Judging unit, for the destination object according to described operation be identified in Mapping data structure the described array member that searches and the store described destination object position in described first array after, when the position of the described array member storing described destination object described in cannot finding in described Mapping data structure in described first array, judge in described first array, whether to there is empty array member;
Storage unit, for when there is the array member of described sky, selecting the array member of a described sky, storing the type of described newly-increased data and described newly-increased data in the array member of selected sky;
Setting unit, for node identification before the array member of described selected sky is comprised be set to for represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in described selected by sky array member before array member in the position of described first array, the postjunction mark that the array member of described selected sky is comprised be set to for represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in described selected by sky array member after array member in the position of described first array, the postjunction mark of the array member before the described array member being arranged in described selected sky is revised as representing that the array member of described selected sky is in the position of described first array, and node identification before the array member after the described array member being arranged in described selected sky is revised as representing that the array member of described selected sky is in the position of described first array,
Record cell, for the corresponding relation between position in the first array of the array member of the mark and selected sky that record described newly-increased data in described Mapping data structure.
16. devices according to claim 15, is characterized in that, described device also comprises:
Second searches unit, after judging whether there is empty array member in described first array, when there is not the array member of described sky, described in searching in described first array, store the described array member of the mark described pending data relevant to the mark of described newly-increased data;
Replacement unit, described pending data for the described described array member found being comprised replace with described newly-increased data, and the type of the described pending data described described array member found comprised replaces with the type of described newly-increased data;
First amendment unit, for the rear position of a number group membership in described first array that the postjunction mark in the described array member that the postjunction mark in the previous array member that represented by front node identification in the described described array member found is revised as finding described in representing represents, and in the rear number group membership that the described postjunction mark in the described described array member found is represented before node identification be revised as finding described in representing described array member in before the position of described previous array member in described first array that represent of node identification,
Second amendment unit, for node identification before the described described array member found is comprised be revised as represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in described in array member before the described array member that finds in the position of described first array, the postjunction mark that the described described array member found is comprised be revised as represent store the type described pending data identical with the type of described newly-increased data described array member in be arranged in described in array member after the described array member that finds in the position of described first array,
3rd amendment unit, for the described postjunction mark being arranged in array member before the described array member found being revised as described array member for finding described in representing in the position of described first array, and the described array member of being revised as by node identification before the described array member be arranged in after the described array member found for finding described in representing is in the position of described first array.
17. devices according to claim 15, is characterized in that, described device also comprises:
3rd searches unit, for the array member after the array member that searches in the described array member storing the type described pending data identical with the type of described newly-increased data before the array member being positioned at described selected sky and the array member being positioned at described selected sky;
Described 3rd searches unit comprises: second searches module, for searching first position of described array member in described first array storing the type described pending data identical with the type of described newly-increased data from the second array, wherein, described second array at least records the corresponding relation between described every type and the position of described first the described array member storing the described pending data of every type in described first array;
3rd judge module, for from the position found, judge the described pending data that described newly-increased data are identical with the described type storing type and described newly-increased data successively described array member in the described pending data that comprise of two adjacent number group memberships whether meet predetermined insertion condition, until find the described two number group memberships meeting described predetermined insertion condition, and using in described two number group memberships previous as described in be positioned at array member before the array member of described selected sky, and using in two number group memberships rear one as described in be positioned at array member after the array member of described selected sky.
18., according to claim 10 to the device according to any one of 13, is characterized in that, described in be operating as deletion action, described destination object is be included in the described pending data in described first array, and wherein, described processing unit comprises:
Modified module, for deleting the described array member on described position in described first array, postjunction mark in the previous array member that represents of front node identification in the described array member deleted is revised as the rear number group membership that the postjunction mark for representing in the described array member of deletion represents, and in the rear number group membership that the described postjunction mark in the described array member deleted is represented before node identification be revised as representing deletion described array member in before the described previous array member that represents of node identification;
Removing module, for deleting the corresponding relation between the mark of described destination object and described position in described Mapping data structure.
CN201410232570.3A 2014-05-28 2014-05-28 Data processing method and device Active CN105224532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410232570.3A CN105224532B (en) 2014-05-28 2014-05-28 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410232570.3A CN105224532B (en) 2014-05-28 2014-05-28 Data processing method and device

Publications (2)

Publication Number Publication Date
CN105224532A true CN105224532A (en) 2016-01-06
CN105224532B CN105224532B (en) 2019-11-08

Family

ID=54993510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410232570.3A Active CN105224532B (en) 2014-05-28 2014-05-28 Data processing method and device

Country Status (1)

Country Link
CN (1) CN105224532B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241387A (en) * 2017-05-12 2017-10-10 腾讯科技(深圳)有限公司 The processing method of request of data, apparatus and system
CN107545011A (en) * 2016-06-29 2018-01-05 高德信息技术有限公司 A kind of method for reading data and device
CN108737487A (en) * 2018-03-21 2018-11-02 腾讯科技(深圳)有限公司 Method of data synchronization and device, storage medium and electronic device
CN108829831A (en) * 2018-06-15 2018-11-16 北京探境科技有限公司 A kind of data processing method, device, hardware device and chip
CN109039911A (en) * 2018-07-27 2018-12-18 烽火通信科技股份有限公司 It is a kind of to search the method and system that mode shares RAM based on HASH
CN109165360A (en) * 2018-07-12 2019-01-08 北京猫眼文化传媒有限公司 A kind of data processing method and device
CN110727384A (en) * 2019-09-26 2020-01-24 北京金山安全软件有限公司 Unread message quantity statistical method and device and electronic equipment
CN111134974A (en) * 2019-12-09 2020-05-12 西安交通大学 Wheelchair robot system based on augmented reality and multi-mode biological signals
CN111694521A (en) * 2020-06-17 2020-09-22 杭州海康威视系统技术有限公司 Method, device and system for storing file
CN111767006A (en) * 2019-04-02 2020-10-13 英韧科技(上海)有限公司 Data processing method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276334A (en) * 2007-03-29 2008-10-01 上海新跃仪表厂 Linked list implementing method for quickly searching data
CN103678160A (en) * 2012-08-30 2014-03-26 腾讯科技(深圳)有限公司 Data storage method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101276334A (en) * 2007-03-29 2008-10-01 上海新跃仪表厂 Linked list implementing method for quickly searching data
CN103678160A (en) * 2012-08-30 2014-03-26 腾讯科技(深圳)有限公司 Data storage method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHENSSY: "java提高篇——HashTable", 《CNBLOG》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107545011A (en) * 2016-06-29 2018-01-05 高德信息技术有限公司 A kind of method for reading data and device
CN107241387A (en) * 2017-05-12 2017-10-10 腾讯科技(深圳)有限公司 The processing method of request of data, apparatus and system
CN108737487A (en) * 2018-03-21 2018-11-02 腾讯科技(深圳)有限公司 Method of data synchronization and device, storage medium and electronic device
CN108829831A (en) * 2018-06-15 2018-11-16 北京探境科技有限公司 A kind of data processing method, device, hardware device and chip
CN108829831B (en) * 2018-06-15 2020-12-18 北京探境科技有限公司 Data processing method and device, hardware device and chip
CN109165360A (en) * 2018-07-12 2019-01-08 北京猫眼文化传媒有限公司 A kind of data processing method and device
CN109165360B (en) * 2018-07-12 2022-07-05 北京猫眼文化传媒有限公司 Data processing method and device
CN109039911A (en) * 2018-07-27 2018-12-18 烽火通信科技股份有限公司 It is a kind of to search the method and system that mode shares RAM based on HASH
US11494117B2 (en) 2019-04-02 2022-11-08 Innogrit Technologies Co., Ltd. Method and system for data processing
CN111767006A (en) * 2019-04-02 2020-10-13 英韧科技(上海)有限公司 Data processing method and device
CN111767006B (en) * 2019-04-02 2021-03-16 英韧科技(上海)有限公司 Data processing method and device
CN110727384A (en) * 2019-09-26 2020-01-24 北京金山安全软件有限公司 Unread message quantity statistical method and device and electronic equipment
CN111134974B (en) * 2019-12-09 2021-04-20 西安交通大学 Wheelchair robot system based on augmented reality and multi-mode biological signals
CN111134974A (en) * 2019-12-09 2020-05-12 西安交通大学 Wheelchair robot system based on augmented reality and multi-mode biological signals
CN111694521A (en) * 2020-06-17 2020-09-22 杭州海康威视系统技术有限公司 Method, device and system for storing file
CN111694521B (en) * 2020-06-17 2022-08-05 杭州海康威视系统技术有限公司 Method, device and system for storing file

Also Published As

Publication number Publication date
CN105224532B (en) 2019-11-08

Similar Documents

Publication Publication Date Title
CN105224532A (en) Data processing method and device
EP2924594B1 (en) Data encoding and corresponding data structure in a column-store database
CN102402605B (en) Mixed distribution model for search engine indexing
CN111459985B (en) Identification information processing method and device
US9256665B2 (en) Creation of inverted index system, and data processing method and apparatus
US10037355B2 (en) Mechanisms for merging index structures in MOLAP while preserving query consistency
CN105956123A (en) Local updating software-based data processing method and apparatus
CN104794249A (en) Realization method and realization device of database
CN106156070B (en) A kind of querying method, file mergences method and relevant apparatus
CN102915382A (en) Method and device for carrying out data query on database based on indexes
CN104424219B (en) A kind of management method and device of data file
CN102725755A (en) Method and system of file access
CN106649412B (en) Data processing method and equipment
US11853279B2 (en) Data storage using vectors of vectors
EP3767486B1 (en) Multi-record index structure for key-value stores
CN104346458A (en) Data storage method and device
CN105159950A (en) Mass data real-time sequencing query method and system
CN104636349A (en) Method and equipment for compression and searching of index data
CN114691721A (en) Graph data query method and device, electronic equipment and storage medium
CN104933051A (en) File storage space recovery method and device
CN112434027A (en) Indexing method and device for multi-dimensional data, computer equipment and storage medium
CN104574159A (en) Data storage and query method and device
CN102193988A (en) Method and system for retrieving node data in graphic database
US8407255B1 (en) Method and apparatus for exploiting master-detail data relationships to enhance searching operations
CN101635001A (en) Method and apparatus for extracting information from a database

Legal Events

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