CN106815282A - Data access method and device - Google Patents

Data access method and device Download PDF

Info

Publication number
CN106815282A
CN106815282A CN201611088064.7A CN201611088064A CN106815282A CN 106815282 A CN106815282 A CN 106815282A CN 201611088064 A CN201611088064 A CN 201611088064A CN 106815282 A CN106815282 A CN 106815282A
Authority
CN
China
Prior art keywords
character
prefix
character string
string
current
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
CN201611088064.7A
Other languages
Chinese (zh)
Other versions
CN106815282B (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
Original Assignee
Tencent Technology Shenzhen 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 filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201611088064.7A priority Critical patent/CN106815282B/en
Publication of CN106815282A publication Critical patent/CN106815282A/en
Application granted granted Critical
Publication of CN106815282B publication Critical patent/CN106815282B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques

Landscapes

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

Abstract

The invention discloses a kind of data access method and device.Wherein, the method includes:Data access request is obtained, wherein, the mark of the first character string to be visited is carried in data access request;Mark according to the first character string obtains the suffix character in the first character string, and first character string prefix character configured information, wherein, prefix character configured information is used to indicate the prefix character in the first character string, prefix character is since the bebinning character of the first character string, with orderly character consecutive identical from bebinning character in the second character string, it is and adjacent with the first character string before the second character string is located at the first character string;Prefix character configured information according to the first character string obtains the prefix character of the first character string;The suffix character synthesis of the prefix character of the first character string and the first character string is obtained into the first character string, and returns to the first character string.The present invention solves the technical problem of the efficiency reduction of data access.

Description

Data access method and device
Technical field
The present invention relates to computer realm, in particular to a kind of data access method and device.
Background technology
During existing data access, the conventional storage organization of data to be visited includes:1) tree-like pressure texture, 2) linear compression structure.That is, compressing the purpose that memory space is saved in storage to reach by by partial data.Specifically , illustrate above-mentioned storage organization with reference to orderly string assemble given below:
{“aa”,“abc”,“abcd”,“abd”,“abe”}
1) tree-like pressure texture, is mainly used in binary chop.Set first root node (top as shown in Figure 1 Node).Wherein, the positional information of child node associated with it will be recorded in root node, can be read by this positional information Data in child node.This is allowed in the data in accessing tree-like pressure texture, it is necessary to be accessed since root node, edge The bifurcated for node accesses child node corresponding with root node, data from level to level is successively obtained, until destination node. That is, it is necessary to be traveled through access in an orderly manner to tree-like pressure texture when carrying out data access, until reaching n-th leaf node, Wherein, N is the mark of input.
2) linear compression structure, in this configuration, the character string in set is stored successively in order, but before identical Sew and only preserve once, the content with the non-common prefix part of previous character string is only preserved for each character string.So as to reach To the purpose for saving memory space.
For above two storage organization, it is both needed to carry out original character string prefix compression, before multiple character string identicals Sew and only store a, and the different suffix of each character string directly can be got by the numbering of character string.That is, The complete content of certain character string is obtained, just must sequential scan, the whole prefix contents until obtaining the character string forward. For example, it is assumed that there is n character string in dictionary, there is identical prefix " a ", then this prefix " a " only can be stored in first In character string.N-th complete content of character string is obtained, each character string just must be successively scanned forward, until first Character string.When the numerical value of n is larger, if obtaining whole prefix contents of character string still through above-mentioned scan mode, to obtain Complete character string, will greatly prolong the duration of the data for obtaining accessed, so as to asking that the efficiency for causing data access is reduced Topic.
For above-mentioned problem, effective solution is not yet proposed at present.
The content of the invention
A kind of data access method and device are the embodiment of the invention provides, at least to solve the efficiency reduction of data access Technical problem.
A kind of one side according to embodiments of the present invention, there is provided data access method, including:Obtaining data access please Ask, wherein, the mark of the first character string to be visited is carried in above-mentioned data access request;According to above-mentioned first character string Mark obtains the suffix character in above-mentioned first character string, and above-mentioned first character string prefix character configured information, wherein, on Prefix character configured information is stated for indicating the prefix character in above-mentioned first character string, above-mentioned prefix character is from above-mentioned first The bebinning character of character string starts, with orderly character consecutive identical from bebinning character in the second character string, above-mentioned second word Symbol displacement is before above-mentioned first character string and adjacent with above-mentioned first character string;According to the preceding asyllabia of above-mentioned first character string Symbol configured information obtains the above-mentioned prefix character of above-mentioned first character string;By the above-mentioned prefix character of above-mentioned first character string and on The above-mentioned suffix character synthesis for stating the first character string obtains above-mentioned first character string, and returns to above-mentioned first character string.
Another aspect according to embodiments of the present invention, additionally provides a kind of DAA, including:First obtains single Unit, for obtaining data access request, wherein, the mark of the first character string to be visited is carried in above-mentioned data access request Know;Second acquisition unit, for obtaining the suffix character in above-mentioned first character string according to the mark of above-mentioned first character string, and The prefix character configured information of above-mentioned first character string, wherein, above-mentioned prefix character configured information is used to indicate above-mentioned first word Prefix character in symbol string, above-mentioned prefix character is since the bebinning character of above-mentioned first character string, in the second character string The consecutive identical orderly character from bebinning character, above-mentioned second character string be located at above-mentioned first character string before, and with it is above-mentioned First character string is adjacent;3rd acquiring unit, for obtaining above-mentioned according to the prefix character configured information of above-mentioned first character string The above-mentioned prefix character of the first character string;Synthesis unit, for by the above-mentioned prefix character of above-mentioned first character string and above-mentioned The above-mentioned suffix character synthesis of one character string obtains above-mentioned first character string, and returns to above-mentioned first character string.
In embodiments of the present invention, in the data access request of the mark for getting the first character string for carrying to be visited Afterwards, by getting the prefix character configured information of the first character string according to the mark of above-mentioned first character string, with using before this Asyllabia symbol configured information is directly obtained the prefix character in the first character string, and before need not being again pointed to the first character string Character string is scanned one by one successively, to obtain the part prefix in the first character string compressed respectively in each character string respectively Character, quick and precisely obtains the purpose of the prefix character in the first character string so as to reach, and in the first character string after Asyllabia meets into rear, obtains the first character string to be accessed, and realizes shortening the waiting time of data access, with accelerate it is linear before Sew the random access efficiency of compression storage organization, while also improving the binary chop effect on linear prefix compression storage organization Rate, and then solve the technical problem of the efficiency reduction of data access.
Brief description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this hair Bright schematic description and description does not constitute inappropriate limitation of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram of the data access structure according to prior art;
Fig. 2 is the applied environment schematic diagram of a kind of optional data access method according to embodiments of the present invention;
Fig. 3 is the flow chart of a kind of optional data access method according to embodiments of the present invention;
Fig. 4 is the schematic diagram of a kind of optional data access structure according to embodiments of the present invention;
Fig. 5 is the schematic diagram of a kind of optional DAA according to embodiments of the present invention;
Fig. 6 is the schematic diagram of a kind of optional data access equipment according to embodiments of the present invention.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described embodiment is only The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people The every other embodiment that member is obtained under the premise of creative work is not made, should all belong to the model of present invention protection Enclose.
It should be noted that term " first ", " in description and claims of this specification and above-mentioned accompanying drawing Two " it is etc. for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so using Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except illustrating herein or Order beyond those of description is implemented.Additionally, term " comprising " and " having " and their any deformation, it is intended that cover Lid is non-exclusive to be included, for example, the process, method, system, product or the equipment that contain series of steps or unit are not necessarily limited to Those steps or unit clearly listed, but may include not list clearly or for these processes, method, product Or other intrinsic steps of equipment or unit.
Embodiment 1
In embodiments of the present invention, there is provided a kind of embodiment of above-mentioned data access method.As a kind of optional reality Mode is applied, the data access method can be, but not limited to be applied in applied environment as shown in Figure 2, that is, be applied to terminal with clothes Interaction scenarios between business device, terminal 202 sends data access request by network 204 to server 206, wherein, data are visited The mark that the first character string to be visited is carried in asking is asked, server 206 is obtained according to the mark of above-mentioned first character string Suffix character in first character string, and the first character string prefix character configured information, wherein, prefix character configured information use Prefix character in the first character string is indicated, prefix character is since the bebinning character of the first character string, with the second character Consecutive identical orderly character from bebinning character in string, the second character string be located at the first character string before, and with the first character String is adjacent;And the prefix character of the first character string is obtained according to the prefix character configured information of the first character string;Then, by first The suffix character synthesis of the prefix character of character string and the first character string obtains the first character string, and returns to first to terminal 202 Character string.
As another optional implementation method, above-mentioned data access method can also but be not limited to be applied to server with Interaction scenarios between server, can with but be not limited to be applied to the scene that independent terminal device internal data is accessed, Wherein, latter two application scenarios are not shown.Above-mentioned application scenarios are only a kind of examples, and this is not appointed in the present embodiment What is limited.
In the present embodiment, after data access request is got, according to entrained to be visited in data access request The first character string mark obtain the first character string in suffix character, and for indicate the first character string in prefix character Prefix character configured information, and according to the prefix character configured information obtain the first character string prefix character, so as to realize Prefix character and suffix the character synthesis that will be got obtain the first character string, and without side again by being provided in correlation technique Formula each character string successively one by one before scanning current string, can just get and be compressed to working as in kinds of characters string respectively The prefix character of preceding character string, so as to data access time is more long in overcoming correlation technique, the relatively low problem of access efficiency is entered And saving sweep time is reached, improve the effect of the efficiency of data access.
Alternatively, in the present embodiment, above-mentioned terminal can include but is not limited at least one of:Mobile phone, flat board electricity The hardware device of brain, notebook computer, PC and other application data access processes.Alternatively, in the present embodiment, above-mentioned net Network can include but is not limited at least one of:Wide area network, Metropolitan Area Network (MAN), LAN.Above-mentioned is only a kind of example, the present embodiment In do not do any restriction to this.
According to embodiments of the present invention, there is provided a kind of data access method, as shown in figure 3, the method includes:
S302, obtains data access request, wherein, the mark of the first character string to be visited is carried in data access request Know;
S304, the mark according to the first character string obtains the suffix character in the first character string, and before the first character string Asyllabia accords with configured information, wherein, prefix character configured information is for indicating the prefix character in the first character string, prefix character Since the bebinning character of the first character string, with orderly character consecutive identical from bebinning character in the second character string, second It is before character string is located at the first character string and adjacent with the first character string;
S306, the prefix character configured information according to the first character string obtains the prefix character of the first character string;
S308, the first character string is obtained by the suffix character synthesis of the prefix character of the first character string and the first character string, And return to the first character string.
Alternatively, in the present embodiment, can be, but not limited to be applied to answering shown in Fig. 2 with by above-mentioned data access method Illustrated with as a example by environment, that is to say, that the data access request that server is sent by Network Capture terminal, wherein, The mark of the first character string to be visited, mark of the server according to above-mentioned first character string are carried in the data access request The suffix character in the first character string will be got from the data structure for being stored in advance in memory block, and for indicating the first word The prefix character configured information of string is accorded with, and using the preceding asyllabia in prefix character configured information first character string of direct access Symbol, so that prefix character and suffix the character synthesis for realizing getting in the first character string obtain the first character to be accessed String, and first character string is returned to terminal.
It should be noted that in the present embodiment, in the number of the mark for getting the first character string for carrying to be visited After according to access request, by getting the prefix character configured information of the first character string according to the mark of above-mentioned first character string, To be directly obtained using the prefix character configured information prefix character in the first character string, and without be pointed to the first word again Character string before symbol string is scanned one by one successively, with obtaining the first character string compressed respectively in each character string respectively Part prefix character, quick and precisely obtain the purpose of the prefix character in the first character string so as to reach, and with the first word After suffix character synthesis in symbol string, the first character string to be accessed is obtained, and then when realizing shortening the wait of data access It is long, improve the effect of data access efficiency.
That is, in the present embodiment, according to before the first character string, and adjacent with the first character string second Character string determines the prefix character in the first character string, wherein, prefix character be since the bebinning character of the first character string, with Consecutive identical orderly character from bebinning character in second character string, and the prefix character of above-mentioned the first character string determined It is compressed in respectively in each character string before the first character string.
Alternatively, in the present embodiment, before data access request is obtained, also include:It is configured to store the first word The metamessage block of the structural information of string is accorded with, wherein, metamessage block includes:The prefix length of the first character string, the first character string Suffix storage location, the prefix character configured information of the first character string and the first character string suffix character.That is, on Data to be visited are stated to can be, but not limited to be stored in storage region in the form of metamessage block in advance, wherein, above-mentioned prefix Character configured information can be, but not limited to by recording the numbering of character string where part prefix character and current string (i.e. the One character string) the distance between numbering, distance here can be, but not limited between the numbering for above-mentioned two character string Difference.
For example, as shown in table 1, each character string can be by the structural information of character string with linear storage organization Form is stored in a corresponding metamessage block, such as can include but is not limited to 4 following tuples in metamessage block:
Table 1
It should be noted that 1) prefix_length blocks:For represent current string (i.e. the first character string) with it is previous The length of the identical prefix character of individual character string (i.e. the second character string), wherein, prefix character is from current string (i.e. One character string) bebinning character start, it is consecutive identical from bebinning character with previous character string (i.e. the second character string) Orderly character;2) suffix blocks:For representing that current string (i.e. the first character string) compares previous character string (i.e. the second word Symbol string) non-common prefix part particular content, i.e. the suffix character of current string (i.e. the first character string);3) Suffix_position blocks:Suffix storage location for representing the suffix character of current string (i.e. the first character string);4) Effective_prefix_distance blocks:For represent the numbering of current string (i.e. the first character string) with its before most The difference of the numbering of near, truly to save current string (i.e. the first character string) part prefix content character string.
For example, with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " } for example, it is assumed that the last character Symbol string " abe " is the first character string, and compared with previous character string " abd ", common prefix character is " ab ", then prefix_ Length is 2, and suffix character is " e ".Although additionally, its previous character string " abd " has the common prefix character to be with it " ab ", but prefix character " ab " does not have and is stored in 4 tuples belonging to character string " abd ", but the 2nd in set The partial content " b " of prefix character " ab " is saved in character string " abc ".Therefore, the corresponding effective_ of character string " abe " Prefix_distance blocks will indicate the difference of the numbering of " abc " and the numbering of " abe ".
Alternatively, in the present embodiment, including multiple character string to be visited the corresponding metamessage block of string assemble Can be, but not limited to for:1) storage side by side;2) linear memory.Wherein, storage refers to that each character string is respectively configured one side by side An independent metamessage block as shown in table 1;And linear memory refers in the metamessage block shown in above-mentioned table 1 successively by multiple The structural information of character string is stored in corresponding piece.
For example, as a example by still with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " }, after each character string Asyllabia symbol is respectively { " aa ", " bc ", " d ", " d ", " e " }.So linear memory is referred in the suffix blocks of metamessage block In store above-mentioned suffix character successively, i.e. suffix blocks include:" aabcdde ", all of suffix character can be, but not limited to Coutinuous store is together.And the suffix that above-mentioned suffix character will be successively stored in the suffix_position blocks of metamessage block is deposited Storage space is put, as a example by since 0, { 0,2,4,5,6,7 }, i.e. the suffix character of each character string is inclined in suffix blocks Move.Wherein, last numerical value 7 can be, but not limited to be the numerical value one by one of extra addition in order to simplify program treatment logic, The value is equal to the length (such as character length) of whole suffix blocks in metamessage block.Above-mentioned is only a kind of example, in the present embodiment Any restriction is not done to this.
Further, in the present embodiment, above-mentioned metamessage block can be, but not limited to for recording four startings of block structure Address, additionally, also have recorded the number of character string in metamessage block.Wherein, for aforementioned four block structure, due to prefix_ Length blocks, suffix_position blocks and effective_prefix_distance blocks, the content field in three blocks is all It is to be represented using fixed length type, such as by taking prefix_length blocks (prefix length) as an example, the different character string in the block structure The prefix length of correspondence character string is represented using the field of equal length respectively.Further, deposited by way of linear memory In the case of storing up above-mentioned metamessage block, can be, but not limited to obtain the structural information in designated character string in the following manner:Rise Beginning address+(the single field lengths of numbering *).
For example, as a example by still with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " }, it is assumed that to obtain character String is designated the prefix length of 4 (i.e. the 5th) character strings, wherein, prefix_length blocks initial address is 1, and single field is long Spend a holiday and be set to 2, then the prefix length for being designated 4 (i.e. the 5th) character strings for being stored can be obtained from the address of 1+2*4=9.
Alternatively, in the present embodiment, the mark according to the first character string obtains the prefix character instruction of the first character string Information includes:In the metamessage block of the structural information for storing character string, obtain corresponding with the mark of the first character string The prefix character configured information of the first character string, wherein, the prefix character configured information of the first character string include with one or Multiple prefix pointers, each prefix pointers are respectively used to indicate where the partial character in the prefix character of the first character string Character string.Wherein, the mark of above-mentioned first character string can be, but not limited to be the numbering of the first character string that above-mentioned is only that one kind is shown Example, any restriction is not done to this in the present embodiment.
Alternatively, in the present embodiment, the prefix character configured information according to the first character string obtains the first character string Prefix character includes following at least one mode:
1) the corresponding prefix character configured information of whole prefix character in the first character string is obtained, it is complete according to what is got Portion's prefix character configured information, again property obtained from the character string before the first character string complete in the first character string Portion's prefix character;
2) each prefix character configured information of the first character string is obtained successively, is getting prefix character configured information The part prefix character in the first character string indicated by the prefix character configured information is obtained simultaneously;
It should be noted that aforesaid way is that two kinds when obtaining the prefix character in the first character string are different realizes hand Section, can independently use, it is also possible to accordingly combined, and not do any restriction in the present embodiment to this.
Alternatively, in the present embodiment, before above-mentioned prefix character configured information can be, but not limited to include one or more Sew pointer, wherein, each prefix pointers is respectively used to indicate where the partial character in the prefix character of the first character string Character string.With reference to being illustrated as a example by metamessage block, above-mentioned prefix character configured information can be, but not limited to as in metamessage block Valid prefix length effective_prefix_distance, before in effective_prefix_distance Sew as a example by pointer, the prefix pointers are used to indicate the numbering of current string (i.e. the first character string) and are located at current string The difference of the numbering of nearest before (i.e. the first character string), the true character string for saving the first string portions prefix content Value, so as to realize the numbering of the character string according to where the numbering of the first character string can know above-mentioned prefix character, Jin Erbian In directly therefrom obtaining the prefix character that the first character string is compressed.
The embodiment provided by the application, is visited in the data for getting the mark of the first character string for carrying to be visited After asking request, by getting the prefix character configured information of the first character string according to the mark of above-mentioned first character string, with profit The prefix character in the first character string is directly obtained with the prefix character configured information, and without being pointed to the first character string again Character string before is scanned one by one successively, to obtain the portion in the first character string compressed respectively in each character string respectively Point prefix character, quick and precisely obtains the purpose of the prefix character in the first character string so as to reach, and with the first character string In the synthesis of suffix character after, obtain the first character string to be accessed, and then realize shortening the waiting time of data access, with Linear prefix is accelerated to compress the random access efficiency of storage organization, while also improving on linear prefix compression storage organization Binary chop efficiency.
Used as a kind of optional scheme, the prefix character that the mark according to the first character string obtains the first character string indicates letter Breath includes:
S1, in the metamessage block of the structural information for storing character string, obtains corresponding with the mark of the first character string The first character string prefix character configured information, wherein, the prefix character configured information of the first character string includes and one Or multiple prefix pointers, each prefix pointers is respectively used to indicate where the partial character in the prefix character of the first character string Character string.
Alternatively, in the present embodiment, the prefix character of the first character string corresponding with the mark of the first character string is obtained Configured information can be included but is not limited to:
S11, before the mark according to the first character string obtains first in the prefix character configured information of the first character string Sew pointer;
S12, repeats following steps, until the whole prefixes in the prefix character configured information of the first character string of acquisition Pointer, wherein, the first character string is initial current string, first in the prefix character configured information of the first character string Prefix pointers are initial current prefix pointers:
S12-1, obtains the mark of the target string before current string indicated by current prefix pointers;
S12-2, the mark according to target string obtains first in the prefix character configured information of target string Prefix pointers, as the next prefix pointers in the prefix character configured information of the first character string;
S12-3, using target string as next current string, by the prefix character configured information of target string In first prefix pointers as next current prefix pointers.
Alternatively, in the present embodiment, the distance indicated by prefix pointers that above-mentioned prefix character configured information includes, Can be, but not limited to be relative to the distance of different reference character strings.
For example, as a example by still with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " }, above-mentioned each character string Suffix character (removal and the content after adjacent previous character string identical prefix character) be respectively " aa ", " bc ", " d ", " d ", " e " }, then in suffix_positioin blocks store above-mentioned character string suffix storage location be respectively 0, 2,4,5,6,7 }.The prefix length of the above-mentioned character string stored in Prefix_length blocks is respectively { 0,1,3,2,2 }.That In effective_prefix_distance blocks the corresponding valid prefix of each character string position (it is i.e. nearest, can obtain Get the numbering of the character string of the part prefix character in the first character string) it is respectively { 0,0,1,1,1 }.
By taking last character string " abe " as an example, the suffix character for being preserved is " e ", and condensed prefix character is " ab ", preceding It is 2 to sew length, and whole prefix character " ab " is by distributed and saved two positions:The corresponding rear asyllabia of i.e. the 2nd character string " abc " Prefix character " b " is saved in symbol " bc ", prefix character " a " is saved in the suffix character " aa " of first character string " aa ". What is preserved in effective_prefix_distance blocks is the position (numbering) of current string (i.e. the first character string) With the difference of the position (numbering) of character string (such as the second character string) where valid prefix.I.e. { 0,1,2,3,4 } with 0,0,1, 1,1 } subtract each other respectively, be { 0,1,1,2,3 } so as to obtain the content stored in effective_prefix_distance blocks.
Wherein, illustrated by taking character string " abe " as an example, " 3 " are for pointing character string " abe " and character string " abc " (character string The distance between partially effective prefix character " b " in the character string that is stored with the suffix character of " abc " " abe "), i.e. should Distance is obtained with respect to reference character string " abe ";Positive sequence first " 1 " is for pointing character string " abc " and character string " aa " (the partially effective prefix character " a " in the character string that is stored with the suffix character of character string " aa " " abc ", while being also word The distance between partially effective prefix character " a " in symbol string " abe "), i.e. the distance is relative reference character string " abc " Obtain.Here two prefix pointers { 1,3 } constitute the prefix configured information of character string " abe ".
That is, the character string indicated by the prefix pointers that will be got successively needs acquisition prefix to refer to as next The reference character string (i.e. target string) of pin, next prefix pointers of the first character string are obtained based on reference character string.Change Yan Zhi, based on first prefix pointers accessed by each reference character string, the prefix that will obtain the first character string indicates letter Whole prefix pointers in breath.It should be noted that reference character string here refers to be stored with respectively in the first character string The relevant character string of part prefix character.
The embodiment provided by the application, by repeating above-mentioned steps, to realize from the metamessage block for prestoring First prefix pointers of the reference character string (i.e. target string) being associated with the first character string are obtained respectively, constitute first Prefix pointers in the prefix configured information of character string, so as to reach using in the above-mentioned character string of prefix pointers direct access first Prefix character purpose, and alphabet string need not be scanned, to realize saving access time, improve the effect of access efficiency.
As a kind of optional scheme, before the prefix character configured information according to the first character string obtains the first character string Asyllabia symbol includes:
S1, obtains the word indicated by each prefix pointers that the prefix character configured information of the first character string includes successively The suffix character of symbol string correspondence storage in metamessage block;
S2, from the character string indicated by each prefix pointers in metamessage block in correspondence storage suffix character in obtain respectively The partial character in the prefix character of the first character string is taken, to obtain the prefix character of the first character string.
It should be noted that in the present embodiment, due to each first character string and the second adjacent character string identical Prefix character has been compressed in one or more character strings before the first character string, thus, can be with the present embodiment But it is not limited to obtain the preceding asyllabia in part in the first character string respectively from the effective suffix character that each character string is stored Symbol.
Alternatively, in the present embodiment, the correspondence storage in metamessage block from the character string indicated by each prefix pointers Suffix character in the partial character that obtains respectively in the prefix character of the first character string include:
S21, the instruction of each prefix pointers included according to the prefix character configured information of the first character string is sequentially, heavy Following steps are performed again, wherein, first prefix pointers in the prefix character configured information of the first character string are used as initial Current pointer, the prefix length of the first character string is used as the initial current character length for not obtaining prefix character:
S21-1, obtains the prefix length of the character string indicated by current pointer;
S21-2, obtains the prefix of the current character length for not obtaining prefix character and the character string indicated by current pointer The first difference between length thereof;
S21-3, from the character string indicated by current pointer in metamessage block in correspondence storage suffix character in sequentially obtain The character of quantity indicated by the first difference is taken, as the partial character in the prefix character of the first character string;
S21-4, by each prefix pointers be located at current pointer after next pointer as current pointer, and from work as The first difference is subtracted in the preceding character length for not obtaining prefix character, next current character for not obtaining prefix character is obtained long Degree.
Alternatively, in the present embodiment, can be, but not limited to the direct access from the prefix_length blocks of metamessage block Numbering is the prefix length of the character string of i, further, it is also possible to but be not limited by the following manner obtain numbering be i character string Suffix lengths.
For example, character string numbering in the case of value 0, can be, but not limited to be compiled by below equation Number for n character string suffix length L:
L=suffix_position [n+1]-suffix_position [n]
For example, as a example by still with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " }, above-mentioned each character string Suffix character (removal and the content after adjacent previous character string identical prefix character) be respectively " aa ", " bc ", " d ", " d ", " e " }, then in suffix_positioin blocks store above-mentioned character string suffix storage location be respectively 0, 2,4,5,6,7 }, it is adjacent to subtract each other two-by-two, the suffix lengths for obtaining respectively { 2,2,1,1,1 }.
It is specific to combine the example below explanation correspondence storage in metamessage block from the character string indicated by each prefix pointers Suffix character in obtain the process of partial character in the prefix character of the first character string respectively, performing code can be as follows:
Wherein, length is the length=common prefix length+suffix lengths of the character string that numbering is id, and offset is represented Numbering is the quantity of character that does not get also of character string of id, wherein, offset initial values are for length, i.e. original state Whole character string is required for obtaining, and works as offset>When 0, represent that string content is not obtained also completely;And as offset=0 The character quantity that expression is not obtained is 0, that is, obtained complete content, then can exit circulating repetition process.
Additionally, be can be, but not limited in above-mentioned code by an if structure.Such as, if with 2 byte fixed length spaces Come if preserving single effective_prefix_distance values, the maximum spacing that can effectively represent is 65536.If with 1 If byte representation, maximum spacing is exactly 256.But in practice, it is possible to real effective_prefix_distance Value can exceed that 65536 or 256.At this moment jump to after that position, valid prefix content cannot be got.At this moment count The copy_len for calculating can be less than or equal to 0.Therefore when copy_len is less than or equal to 0, memcpy and offset-=is not performed Copy_len this two step operations, allow for circulate and continue executing with.So as to get valid prefix content.While guaranteed efficiency The memory space of saving, when being traded off also between space and performance, only stores effective_prefix_ with 1 byte Distance values.
Further, copy_len is used to represent the length of the valid prefix that can be got, i.e., current character to be obtained Quantity, is a variable;Cur represents the current portion obtained from the suffix character of the character string that numbering is cur in the first character string Divide prefix character.Wherein, above-mentioned formula cur=cur-effective_prefix_distance [cur], for indicating to pass through Jump directly to that character string position (i.e. reference numeral) that can effectively get part prefix, with avoid repeat, Invalid scanning expense.
Whether the embodiment provided by the application, reached by the quantity for judging the current prefix character not got 0 determines whether to have obtained the complete prefix character of the first character string, wherein, in the circulation of above-mentioned acquisition prefix character During, particular by from indicated by each prefix pointers can effectively get the character string of part prefix in suffix In character, during being circulated according to current this wheel retrievable character quantity to be obtained sequentially fetching portion character as the Prefix character in one character string, so as to avoid that all character strings are carried out with repetition, invalid scanning, to reduce access expense, Improve access efficiency.
As a kind of optional scheme, the suffix character of the prefix character of the first character string and the first character string is synthesized Include to the first character string:
S1, obtains the character string total length of the first character string;
S2, is that the first character string distributes storage address according to character string total length, and obtain for storing what is returned The first address of the first character string;
S3, repeats following steps, until the current character length for not obtaining character is less than or equal in the first character string 0, wherein, used as initial current identification, the character string total length of the first character string is used as initial for the mark of the first character string The current character length for not obtaining character:
S31, obtain the current prefix length for not obtaining the character string that the character length of character and current identification are identified it Between the second difference, as current character length to be synthesized;
S32, the character string identified from current identification is sequentially obtained in the corresponding suffix character for storing in metamessage block The character of the quantity indicated by current character length to be synthesized, as character to be synthesized;
S33, obtains the 3rd difference between the current character length for not obtaining character and current character length to be synthesized;
S34, is superimposed the 3rd difference on first address, obtains the storage address of character to be synthesized;
S35, by character to be synthesized storage to storage address;
S36, subtracts current character length to be synthesized from the character length of character is not obtained currently, obtains next working as The preceding character length for not obtaining character;
S37, when next current character length for not obtaining character is more than 0, obtains next current identification, wherein, Next current identification is successively from indicated by each prefix pointers that the prefix character configured information of the first character string includes Obtained in the mark of character string.
It is specific to be illustrated with reference to Fig. 4 example showns, it is assumed that still with string assemble " aa ", " abc ", " abcd ", " abd ", " abe " } as a example by.
The corresponding suffix character of above-mentioned string assemble (removal and adjacent previous character string identical prefix character it Content afterwards) it is { " aa ", " bc ", " d ", " d ", " e " }.Therefore, the above-mentioned string assemble in suffix_positioin blocks Corresponding suffix storage location is respectively { 0,2,4,5,6,7 }.Above-mentioned string assemble is corresponding in Prefix_length blocks Prefix character is respectively { 0,1,3,2,2 }.So the corresponding valid prefix of each character string position (it is i.e. nearest, can obtain The numbering of the character string of the partially effective prefix character in the first character string) be respectively { 0,0,1,1,1 }, it is corresponding In effective_prefix_distance blocks store content be { 0,1,1,2,3 }, i.e. by each character string numbering 0, 1,2,3,4 } subtract each other respectively with the position (numbering) { 0,0,1,1,1 } of above-mentioned valid prefix and obtain.
By taking last character string " abe " as an example, the suffix character for being preserved is " e ", and condensed prefix character is " ab ", preceding It is 2 to sew length, and whole prefix character " ab " is by distributed and saved two positions:The corresponding rear asyllabia of i.e. the 2nd character string " abc " Prefix character " b " is saved in symbol " bc ", prefix character " a " is saved in the suffix character " aa " of first character string " aa ". Step performed below, and above-mentioned execution code are specifically combined, illustrates to obtain the mistake of whole prefix characters that character passes " abe " Journey:
First, suffix_len=suffix_position [5]-suffix_position [4]=7-6=1.
Length=prefix_length [4]+suffix_len=2+1=3.
Therefore it is 3 to obtain the character string total length to be obtained.By str->Resize (length) sets the length of str It is set to 3.
Cur=id, i.e. cur are initialized to 4.
In for circulations, it is 3. that offset is initialized to length (offset=length), i.e. offset initial values
Copy_len=offset-prefix_length [cur]=3-prefix_length [4]=3-2=1.
Memcpy (ptr+offset-copy_len), suffix [cur], copy_len), wherein ptr+offset- Copy_len=ptr+3-1=ptr+2.Ptr points to the initial address of str, and the length of str is 3. namely ptr+2 sensings str Last character position.Suffix [cur]=suffix [4]=" e ".Copy_len=1.Namely copied from " e " To the last character of str, the content of such str becomes " XXe " 1 character of shellfish.XX represents the character of str foremosts two Content be not provided with.
Afterwards, offset=offset-copy_len=3-1=2.
Then, cur=cur-effective_prefix_distance [cur]=4-effective_prefix_ Distance [4]=4-3=1.
Circulated next time:
Copy_len=offset-prefix_length [cur]=2-prefix_length [1]=2-1=1.
(opened from 0 Ptr+offset-copy_len=ptr+2-1=ptr+1, that is, the position for pointing to the 1st character of str Begin count), namely second-to-last character position.Suffix [cur]=suffix [1]=" bc ".Copy_len is 1, namely 1 character is copied from " bc " to the 1st position of character of str, that is, " b " is copied to the first character of str Position.At this moment the content of str becomes " Xbe " from " XXe ".
Then, offset=offset-copy_len=2-1=1.
Cur=cur-effective_prefix_distance [cur]=1-effective_prefix_distance [1]=1-1=0.
Circulated next time:
Copy_len=offset-prefix_length [cur]=1-prefix_length [0]=1-0=1.Ptr+ Offset-copy_len=ptr+1-1=ptr, that is, point to the 0th position of character (initial character) of str.Suffix[cur] =suffix [0]=" aa ", copy_len=1.1 character to the initial character position of str is copied from " aa "." a " is copied Put to str first symbol displacements, then str just from " Xbe " become " abe ".Then, offset=offset-copy_len=1-1 =0.
In the examples described above, the condition that For circulations continue is offset>0;When condition is unsatisfactory for, circulation terminates, and The character string complete content that numbering is 4 is got, i.e., " abe ".
The embodiment provided by the application, is added by prefix configured information effective_prefix_distance Speed obtains the efficiency of each several part prefix in the first character string, to accelerate linear prefix to compress the random access efficiency of storage organization, The binary chop efficiency on linear prefix compression storage organization is also improved simultaneously.Additionally, being used as using the difference of numbering Index, can also save memory space.
As a kind of optional scheme, before data access request is obtained, also include:
S1, is configured to the metamessage block of the structural information of the first character string of storage, wherein, metamessage block includes:The The prefix length of one character string, the suffix storage location of the first character string, the prefix character configured information of the first character string and The suffix character of one character string.
Alternatively, in the present embodiment, the metamessage block for being configured to the structural information of the first character string of storage includes:
S11, obtains the prefix length of the first character string;
S12, repeats following steps, until the prefix length of the character string indicated by current identification is less than the first character The prefix length of string, wherein, the mark of the first character string is used as initial current identification:Judge the character indicated by current identification Whether the prefix length of string is more than or equal to the prefix length of the first character string;It is long in the prefix of the character string indicated by current identification Degree more than or equal to the first character string prefix length when, obtain next current identification, wherein, next current identification according to The storage order of the character string that metamessage block is stored is obtained forward successively;
S12-1, when the prefix length of the character string indicated by current identification is less than the prefix length of the first character string, obtains The 4th difference between the mark and current identification of the first character string is taken as in the prefix character configured information of the first character string First prefix pointers, wherein, prefix pointers be used for indicate the first character string prefix character in partial character where Character string;
S12-2, first prefix pointers storage is indicated in metamessage block with the prefix character of the first string matching In information.
It is specific to be illustrated with reference to the example below, it is assumed that to calculate n-th effective_prefix_ of character string Number, here, the end value of n-effective_prefix_number will be used as effective_ in metamessage block N-th field of character string in prefix_distance blocks.In the present embodiment, by effective_prefix_number Prefix_number is can be described as, i-th character string is represented using strs [i], the character of numbering i is represented with prefixs [i] String and the common prefix for numbering the character string for being i-1, the i.e. prefix character of the character string of numbering i.Prefix_length [i] table Show the length of the string prefix that numbering is i.Wherein, performing code can be as follows:
It should be noted that in the present embodiment, numbering is the character start of string of n -1 from the metamessage block for prestoring, to The prefix length of preceding scan round character string, wherein, prefix_number-n are used to represent effective_prefix_ distance[n].In above-mentioned cyclic process, for circulations are to scan prefix_length [] forward from n-1, find first When individual prefix_length [j] is less than the numbering of prefix_length [n], you can using numbering j as the character string that numbering is n First prefix pointers indicated by character string numbering, wherein, first prefix pointers here are between above-mentioned numbering Difference (i.e. n-j), numbering is the field as n- that is stored in effective_prefix_distance blocks of character string of n j。
Assuming that as a example by still with { " aa ", " abc ", " abcd ", " abd ", " abe " }.Here the content of strs [n] is " abe ", Prefix is " ab ".Because strs [...] is ordered into.So scanned forward since n-1, at least continuously there is 1 or more character The content of string is taken the lead with " ab ".Before character string " abe ", there are 3 character strings continuously to be taken the lead with " ab ", i.e. " abc ", " abcd ", " abd " }, the character string before this 3 character strings is not taken the lead with " ab ", such as " aa ".Wherein, character string " abc " correspondence Prefix_length be less than 2, therefore, the prefix " ab " of " abe " has been comprised at least in the suffix character of character string " abc " Last character, that is, comprised at least " b ".Therefore, character string " abe " can get portion from the suffix character of " abc " Divide valid prefix character, i.e. at least get " b " in " ab ".
And the character string after " abc ", until " abe ", i.e. { " abcd, abd " }, all started with " ab ", these character strings Prefix_length all be at least 2, i.e., more than or equal to 2, therefore, the prefix of " abe " will not be recorded in their suffix character Any content in " ab ", i.e. " abe " can not get effective in character string " abe " from the suffix character of these character strings Prefix character.
In sum, " abe " is swept forward since " abe " previous position, and first can get valid prefix The character string of character.And its prefix_length is less than 2 (length of " ab "), and the character between " abc " and " abe " The prefix_length of string is both greater than equal to 2.
The embodiment provided by the application, by the prefix configured information of the config string in metamessage block Effective_prefix_distance accelerates to obtain the efficiency of each several part prefix in the first character string, with accelerate it is linear before Sew the random access efficiency of compression storage organization, while also improving the binary chop effect on linear prefix compression storage organization Rate.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of Combination of actions, but those skilled in the art should know, the present invention not by described by sequence of movement limited because According to the present invention, some steps can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art should also know Know, embodiment described in this description belongs to preferred embodiment, involved action and module is not necessarily of the invention It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but a lot In the case of the former be more preferably implementation method.Based on such understanding, technical scheme is substantially in other words to existing The part that technology contributes can be embodied in the form of software product, and computer software product storage is in a storage In medium (such as ROM/RAM, magnetic disc, CD), including some instructions are used to so that a station terminal equipment (can be mobile phone, calculate Machine, server, or network equipment etc.) perform method described in each embodiment of the invention.
Embodiment 2
According to embodiments of the present invention, a kind of DAA for implementing above-mentioned data access method is additionally provided, As shown in figure 5, the device includes:
1) first acquisition unit 502, for obtaining data access request, wherein, carried in data access request and need to be visited The mark of the first character string asked;
2) second acquisition unit 504, for obtaining the suffix character in the first character string according to the mark of the first character string, And first character string prefix character configured information, wherein, prefix character configured information be used for indicate the first character string in before Asyllabia accord with, prefix character be since the bebinning character of the first character string, with the second character string in from bebinning character continuous phase Same orderly character is before the second character string is located at the first character string and adjacent with the first character string;
3) the 3rd acquiring unit 506, for obtaining the first character string according to the prefix character configured information of the first character string Prefix character;
4) synthesis unit 508, for the suffix character of the prefix character of the first character string and the first character string to be synthesized To the first character string, and return to the first character string.
Alternatively, in the present embodiment, can be, but not limited to be applied to answering shown in Fig. 2 with by above-mentioned DAA Illustrated with as a example by environment, that is to say, that the data access request that server is sent by Network Capture terminal, wherein, The mark of the first character string to be visited, mark of the server according to above-mentioned first character string are carried in the data access request The suffix character in the first character string will be got from the data structure for being stored in advance in memory block, and for indicating the first word The prefix character configured information of string is accorded with, and using the preceding asyllabia in prefix character configured information first character string of direct access Symbol, so that prefix character and suffix the character synthesis for realizing getting in the first character string obtain the first character to be accessed String, and first character string is returned to terminal.
It should be noted that in the present embodiment, in the number of the mark for getting the first character string for carrying to be visited After according to access request, by getting the prefix character configured information of the first character string according to the mark of above-mentioned first character string, To be directly obtained using the prefix character configured information prefix character in the first character string, and without be pointed to the first word again Character string before symbol string is scanned one by one successively, with obtaining the first character string compressed respectively in each character string respectively Part prefix character, quick and precisely obtain the purpose of the prefix character in the first character string so as to reach, and with the first word After suffix character synthesis in symbol string, the first character string to be accessed is obtained, and then when realizing shortening the wait of data access It is long, improve the effect of data access efficiency.
That is, in the present embodiment, according to before the first character string, and adjacent with the first character string second Character string determines the prefix character in the first character string, wherein, prefix character be since the bebinning character of the first character string, with Consecutive identical orderly character from bebinning character in second character string, and the prefix character of above-mentioned the first character string determined It is compressed in respectively in each character string before the first character string.
Alternatively, in the present embodiment, before data access request is obtained, also include:It is configured to store the first word The metamessage block of the structural information of string is accorded with, wherein, metamessage block includes:The prefix length of the first character string, the first character string Suffix storage location, the prefix character configured information of the first character string and the first character string suffix character.That is, on Data to be visited are stated to can be, but not limited to be stored in storage region in the form of metamessage block in advance, wherein, above-mentioned prefix Character configured information can be, but not limited to by recording the numbering of character string where part prefix character and current string (i.e. the One character string) the distance between numbering, distance here can be, but not limited between the numbering for above-mentioned two character string Difference.
For example, as shown in table 2, each character string can be by the structural information of character string with linear storage organization Form is stored in a corresponding metamessage block, such as can include but is not limited to 4 following tuples in metamessage block:
Table 2
It should be noted that 1) prefix_length blocks:For represent current string (i.e. the first character string) with it is previous The length of the identical prefix character of individual character string (i.e. the second character string), wherein, prefix character is from current string (i.e. One character string) bebinning character start, it is consecutive identical from bebinning character with previous character string (i.e. the second character string) Orderly character;2) suffix blocks:For representing that current string (i.e. the first character string) compares previous character string (i.e. the second word Symbol string) non-common prefix part particular content, i.e. the suffix character of current string (i.e. the first character string);3) Suffix_position blocks:Suffix storage location for representing the suffix character of current string (i.e. the first character string);4) Effective_prefix_distance blocks:For represent the numbering of current string (i.e. the first character string) with its before most The difference of the numbering of near, truly to save current string (i.e. the first character string) part prefix content character string.
For example, with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " } for example, it is assumed that the last character Symbol string " abe " is the first character string, and compared with previous character string " abd ", common prefix character is " ab ", then prefix_ Length is 2, and suffix character is " e ".Although additionally, its previous character string " abd " has the common prefix character to be with it " ab ", but prefix character " ab " does not have and is stored in 4 tuples belonging to character string " abd ", but the 2nd in set The partial content " b " of prefix character " ab " is saved in character string " abc ".Therefore, the corresponding effective_ of character string " abe " Prefix_distance blocks will indicate the difference of the numbering of " abc " and the numbering of " abe ".
Alternatively, in the present embodiment, including multiple character string to be visited the corresponding metamessage block of string assemble Can be, but not limited to for:1) storage side by side;2) linear memory.Wherein, storage refers to that each character string is respectively configured one side by side An independent metamessage block as shown in table 2;And linear memory refers in the metamessage block shown in above-mentioned table 2 successively by multiple The structural information of character string is stored in corresponding piece.
For example, as a example by still with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " }, after each character string Asyllabia symbol is respectively { " aa ", " bc ", " d ", " d ", " e " }.So linear memory is referred in the suffix blocks of metamessage block In store above-mentioned suffix character successively, i.e. suffix blocks include:" aabcdde ", all of suffix character can be, but not limited to Coutinuous store is together.And the suffix that above-mentioned suffix character will be successively stored in the suffix_position blocks of metamessage block is deposited Storage space is put, as a example by since 0, { 0,2,4,5,6,7 }, i.e. the suffix character of each character string is inclined in suffix blocks Move.Wherein, last numerical value 7 can be, but not limited to be the numerical value one by one of extra addition in order to simplify program treatment logic, The value is equal to the length (such as character length) of whole suffix blocks in metamessage block.Above-mentioned is only a kind of example, in the present embodiment Any restriction is not done to this.
Further, in the present embodiment, above-mentioned metamessage block can be, but not limited to for recording four startings of block structure Address, additionally, also have recorded the number of character string in metamessage block.Wherein, for aforementioned four block structure, due to prefix_ Length blocks, suffix_position blocks and effective_prefix_distance blocks, the content field in three blocks is all It is to be represented using fixed length type, such as by taking prefix_length blocks (prefix length) as an example, the different character string in the block structure The prefix length of correspondence character string is represented using the field of equal length respectively.Further, deposited by way of linear memory In the case of storing up above-mentioned metamessage block, can be, but not limited to obtain the structural information in designated character string in the following manner:Rise Beginning address+(the single field lengths of numbering *).
For example, as a example by still with string assemble { " aa ", " abc ", " abcd ", " abd ", " abe " }, it is assumed that to obtain character String is designated the prefix length of 4 (i.e. the 5th) character strings, wherein, prefix_length blocks initial address is 1, and single field is long Spend a holiday and be set to 2, then the prefix length for being designated 4 (i.e. the 5th) character strings for being stored can be obtained from the address of 1+2*4=9.
Alternatively, in the present embodiment, second acquisition unit 504 includes:First acquisition module, for for storing word In the metamessage block of the structural information for according with string, the prefix character for obtaining the first character string corresponding with the mark of the first character string refers to Show information, wherein, the prefix character configured information of the first character string includes and one or more prefix pointers, each prefix Pointer be respectively used to indicate the first character string prefix character in partial character where character string.Wherein, above-mentioned first word The mark for according with string can be, but not limited to be the numbering of the first character string that above-mentioned is only a kind of example, and this is not done in the present embodiment Any restriction.
Alternatively, in the present embodiment, the prefix character configured information according to the first character string obtains the first character string Prefix character includes following at least one mode:
1) the corresponding prefix character configured information of whole prefix character in the first character string is obtained, it is complete according to what is got Portion's prefix character configured information, again property obtained from the character string before the first character string complete in the first character string Portion's prefix character;
2) each prefix character configured information of the first character string is obtained successively, is getting prefix character configured information The part prefix character in the first character string indicated by the prefix character configured information is obtained simultaneously;
It should be noted that aforesaid way is that two kinds when obtaining the prefix character in the first character string are different realizes hand Section, can independently use, it is also possible to accordingly combined, and not do any restriction in the present embodiment to this.
Alternatively, in the present embodiment, before above-mentioned prefix character configured information can be, but not limited to include one or more Sew pointer, wherein, each prefix pointers is respectively used to indicate where the partial character in the prefix character of the first character string Character string.With reference to being illustrated as a example by metamessage block, above-mentioned prefix character configured information can be, but not limited to as in metamessage block Valid prefix length effective_prefix_distance, before in effective_prefix_distance Sew as a example by pointer, the prefix pointers are used to indicate the numbering of current string (i.e. the first character string) and are located at current string The difference of the numbering of nearest before (i.e. the first character string), the true character string for saving the first string portions prefix content Value, so as to realize the numbering of the character string according to where the numbering of the first character string can know above-mentioned prefix character, Jin Erbian In directly therefrom obtaining the prefix character that the first character string is compressed.
The embodiment provided by the application, is visited in the data for getting the mark of the first character string for carrying to be visited After asking request, by getting the prefix character configured information of the first character string according to the mark of above-mentioned first character string, with profit The prefix character in the first character string is directly obtained with the prefix character configured information, and without being pointed to the first character string again Character string before is scanned one by one successively, to obtain the portion in the first character string compressed respectively in each character string respectively Point prefix character, quick and precisely obtains the purpose of the prefix character in the first character string so as to reach, and with the first character string In the synthesis of suffix character after, obtain the first character string to be accessed, and then realize shortening the waiting time of data access, with Linear prefix is accelerated to compress the random access efficiency of storage organization, while also improving on linear prefix compression storage organization Binary chop efficiency.
Used as a kind of optional scheme, second acquisition unit 504 includes:
1) the first acquisition module, in the metamessage block of the structural information for storing character string, obtaining and first The prefix character configured information of corresponding first character string of mark of character string, wherein, the prefix character of the first character string is indicated Information includes being respectively used to indicate the prefix character of the first character string with one or more prefix pointers, each prefix pointers In partial character where character string.
Alternatively, in the present embodiment, the first acquisition module includes:
(1) first acquisition submodule, the prefix character for obtaining the first character string according to the mark of the first character string refers to Show first prefix pointers in information;
(2) first treatment submodules, for repeating following steps, until the prefix character for obtaining the first character string refers to Show the whole prefix pointers in information, wherein, the first character string is initial current string, the prefix character of the first character string First prefix pointers in configured information are initial current prefix pointers:
S1, obtains the mark of the target string before current string indicated by current prefix pointers;S2, root First prefix pointers in the prefix character configured information of target string are obtained according to the mark of target string, as first Next prefix pointers in the prefix character configured information of character string;S3, using target string as next current character String, using first prefix pointers in the prefix character configured information of target string as next current prefix pointers.
Alternatively, in the present embodiment, the distance indicated by prefix pointers that above-mentioned prefix character configured information includes, Can be, but not limited to be relative to the distance of different reference character strings.
That is, the character string indicated by the prefix pointers that will be got successively needs acquisition prefix to refer to as next The reference character string (i.e. target string) of pin, next prefix pointers of the first character string are obtained based on reference character string.Change Yan Zhi, based on first prefix pointers accessed by each reference character string, the prefix that will obtain the first character string indicates letter Whole prefix pointers in breath.It should be noted that reference character string here refers to be stored with respectively in the first character string The relevant character string of part prefix character.
The embodiment provided by the application, by repeating above-mentioned steps, to realize from the metamessage block for prestoring First prefix pointers of the reference character string (i.e. target string) being associated with the first character string are obtained respectively, constitute first Prefix pointers in the prefix configured information of character string, so as to reach using in the above-mentioned character string of prefix pointers direct access first Prefix character purpose, and alphabet string need not be scanned, to realize saving access time, improve the effect of access efficiency.
Used as a kind of optional scheme, the 3rd acquiring unit 506 includes:
1) the second acquisition module, the prefix character configured information for obtaining the first character string successively include each before Sew the suffix character of the correspondence storage in metamessage block of the character string indicated by pointer;
2) the 3rd acquisition module, for the correspondence storage in metamessage block from the character string indicated by each prefix pointers The partial character in the prefix character of the first character string is obtained in suffix character respectively, to obtain the preceding asyllabia of the first character string Symbol.
It should be noted that in the present embodiment, due to each first character string and the second adjacent character string identical Prefix character has been compressed in one or more character strings before the first character string, thus, can be with the present embodiment But it is not limited to obtain the preceding asyllabia in part in the first character string respectively from the effective suffix character that each character string is stored Symbol.
Alternatively, in the present embodiment, the 3rd acquisition module includes:
(1) second processing submodule, include for the prefix character configured information according to the first character string each before Sew the instruction of pointer sequentially, repeat following steps, wherein, first in the prefix character configured information of the first character string Prefix pointers currently do not obtain prefix character as initial current pointer, the prefix length of the first character string as initial Character length:
S1, obtains the prefix length of the character string indicated by current pointer;
S2, obtains the prefix length of the current character length for not obtaining prefix character and the character string indicated by current pointer Therebetween the first difference;
S3, from the character string indicated by current pointer in metamessage block in correspondence storage suffix character in sequentially obtain the The character of quantity indicated by one difference, as the partial character in the prefix character of the first character string;
S4, the next pointer that will be located in each prefix pointers after current pointer as current pointer, and from current The first difference is subtracted in the character length for not obtaining prefix character, next current character for not obtaining prefix character is obtained long Degree.
Alternatively, in the present embodiment, can be, but not limited to the direct access from the prefix_length blocks of metamessage block Numbering is the prefix length of the character string of i, further, it is also possible to but be not limited by the following manner obtain numbering be i character string Suffix lengths.
Whether the embodiment provided by the application, reached by the quantity for judging the current prefix character not got 0 determines whether to have obtained the complete prefix character of the first character string, wherein, in the circulation of above-mentioned acquisition prefix character During, particular by from indicated by each prefix pointers can effectively get the character string of part prefix in suffix In character, during being circulated according to current this wheel retrievable character quantity to be obtained sequentially fetching portion character as the Prefix character in one character string, so as to avoid that all character strings are carried out with repetition, invalid scanning, to reduce access expense, Improve access efficiency.
Used as a kind of optional scheme, synthesis unit 508 includes:
1) the 4th acquisition module, the character string total length for obtaining the first character string;
2) distribute module, for being that the first character string distributes storage address according to character string total length, and obtains for depositing Store up the first address of the first character string to be returned;
3) first processing module, for repeating following steps, until currently not obtaining character in the first character string Character length is less than or equal to 0, wherein, the mark of the first character string is used as initial current identification, the character string of the first character string Total length is used as the initial current character length for not obtaining character:
S1, between the prefix length of the character string that the current character length and current identification for not obtaining character of acquisition is identified The second difference, as current character length to be synthesized;
S2, the character string identified from current identification is sequentially obtained in the corresponding suffix character for storing in metamessage block to be worked as The character of the quantity indicated by preceding character length to be synthesized, as character to be synthesized;
S3, obtains the 3rd difference between the current character length for not obtaining character and current character length to be synthesized;
S4, is superimposed the 3rd difference on first address, obtains the storage address of character to be synthesized;
S5, by character to be synthesized storage to storage address;
S6, subtracts current character length to be synthesized from the character length of character is not obtained currently, obtains next working as The preceding character length for not obtaining character;
S7, when next current character length for not obtaining character is more than 0, obtains next current identification, wherein, under One current identification is successively from the word indicated by each prefix pointers that the prefix character configured information of the first character string includes Accord with acquisition in the mark of string.
The embodiment provided by the application, is added by prefix configured information effective_prefix_distance Speed obtains the efficiency of each several part prefix in the first character string, to accelerate linear prefix to compress the random access efficiency of storage organization, The binary chop efficiency on linear prefix compression storage organization is also improved simultaneously.Additionally, being used as using the difference of numbering Index, can also save memory space.
As a kind of optional scheme, also include:
1) dispensing unit, the structure letter for before data access request is obtained, being configured to store the first character string The metamessage block of breath, wherein, metamessage block includes:The suffix storage position of the prefix length of the first character string, the first character string Put, the suffix character of the prefix character configured information of the first character string and the first character string.
Alternatively, in the present embodiment, dispensing unit includes:
1) the 5th acquisition module, the prefix length for obtaining the first character string;
2) Second processing module, for repeating following steps, until the prefix of the character string indicated by current identification Length is less than the prefix length of the first character string, wherein, the mark of the first character string is used as initial current identification:Judge current Whether the prefix length of the indicated character string of mark is more than or equal to the prefix length of the first character string;Indicated by current identification Character string prefix length more than or equal to the first character string prefix length when, obtain next current identification, wherein, it is next Individual current identification is obtained forward successively according to the storage order of the character string stored in metamessage block;
S1, when the prefix length of the character string indicated by current identification is less than the prefix length of the first character string, obtains The 4th difference between the mark and current identification of the first character string is used as in the prefix character configured information of the first character string First prefix pointers, wherein, the word where the partial character that prefix pointers are used in the prefix character of the first character string of instruction Symbol string;
S2, by the storage of first prefix pointers in metamessage block with the prefix character configured information of the first string matching In.
The embodiment provided by the application, by the prefix configured information of the config string in metamessage block Effective_prefix_distance accelerates to obtain the efficiency of each several part prefix in the first character string, with accelerate it is linear before Sew the random access efficiency of compression storage organization, while also improving the binary chop effect on linear prefix compression storage organization Rate.
Embodiment 3
According to embodiments of the present invention, a kind of data access equipment for implementing above-mentioned data access method is additionally provided, As shown in fig. 6, the equipment includes:
1) communication interface 602, are set to obtain data access request, wherein, carried in data access request to be visited The first character string mark;It is also configured to obtain the suffix character in the first character string according to the mark of the first character string, and The prefix character configured information of the first character string, wherein, prefix character configured information is used to indicate the prefix in the first character string Character, prefix character be since the bebinning character of the first character string, it is consecutive identical from bebinning character with the second character string Orderly character, it is and adjacent with the first character string before the second character string is located at the first character string;It is also configured to according to the first word The prefix character configured information for according with string obtains the prefix character of the first character string;
2) processor 604, are connected with communication interface 602, are set to the prefix character of the first character string and the first character The suffix character synthesis of string obtains the first character string, and returns to the first character string;
3) memory 606, are connected with communication interface 602 and processor 604, are set to store the prefix in the first character string Character and suffix character.
Alternatively, the specific example in the present embodiment may be referred to showing described in above-described embodiment 1 and embodiment 2 Example, the present embodiment will not be repeated here.
Embodiment 4
Embodiments of the invention additionally provide a kind of storage medium.Alternatively, in the present embodiment, above-mentioned storage medium can With at least one of the multiple network equipments in the network network equipment.
Alternatively, in the present embodiment, storage medium is arranged to storage for performing the program code of following steps:
S1, obtains data access request, wherein, the mark of the first character string to be visited is carried in data access request Know;
The prefix of S2, the suffix character in mark the first character string of acquisition according to the first character string, and the first character string Character configured information, wherein, prefix character configured information be used for indicate the first character string in prefix character, prefix character be from The bebinning character of the first character string starts, with orderly character consecutive identical from bebinning character in the second character string, the second word Symbol displacement is before the first character string and adjacent with the first character string;
S3, the prefix character configured information according to the first character string obtains the prefix character of the first character string;
S4, the first character string is obtained by the suffix character synthesis of the prefix character of the first character string and the first character string, and Return to the first character string.
Alternatively, storage medium is also configured to storage for performing the program code of following steps:
S1, in the metamessage block of the structural information for storing character string, obtains corresponding with the mark of the first character string The first character string prefix character configured information, wherein, the prefix character configured information of the first character string includes and one Or multiple prefix pointers, each prefix pointers is respectively used to indicate where the partial character in the prefix character of the first character string Character string.
Alternatively, in the present embodiment, above-mentioned storage medium can be included but is not limited to:USB flash disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. is various can be with the medium of store program codes.
Alternatively, the specific example in the present embodiment may be referred to showing described in above-described embodiment 1 and embodiment 2 Example, the present embodiment will not be repeated here.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
If integrated unit in above-described embodiment is to realize in the form of SFU software functional unit and as independent product When selling or using, can store in the storage medium that above computer can read.Based on such understanding, skill of the invention The part or all or part of the technical scheme that art scheme substantially contributes to prior art in other words can be with soft The form of part product is embodied, and the computer software product is stored in storage medium, including some instructions are used to so that one Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) perform each embodiment institute of the invention State all or part of step of method.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in certain embodiment The part of detailed description, may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed client, can be by other sides Formula is realized.Wherein, device embodiment described above is only schematical, such as division of described unit, only one Kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can combine or Another system is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed it is mutual it Between coupling or direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of unit or module by some interfaces Connect, can be electrical or other forms.
The unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be according to the actual needs selected to realize the mesh of this embodiment scheme 's.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (16)

1. a kind of data access method, it is characterised in that including:
Data access request is obtained, wherein, the mark of the first character string to be visited is carried in the data access request;
The suffix character in mark acquisition first character string according to first character string, and first character string Prefix character configured information, wherein, the prefix character configured information is used to indicate the prefix character in first character string, The prefix character be since the bebinning character of first character string, with the second character string in from bebinning character continuous phase Same orderly character is before second character string is located at first character string and adjacent with first character string;
Prefix character configured information according to first character string obtains the prefix character of first character string;
The suffix character synthesis of the prefix character of first character string and first character string is obtained described First character string, and return to first character string.
2. method according to claim 1, it is characterised in that the mark according to first character string obtains described first The prefix character configured information of character string includes:
In the metamessage block of the structural information for storing character string, institute corresponding with the mark of first character string is obtained State the prefix character configured information of the first character string, wherein, the prefix character configured information of first character string include with One or more prefix pointers, each described prefix pointers are respectively used to indicate the prefix character of first character string In partial character where character string.
3. method according to claim 2, it is characterised in that the acquisition is corresponding with the mark of first character string The prefix character configured information of first character string includes:
Before mark according to first character string obtains first in the prefix character configured information of first character string Sew pointer;
Following steps are repeated, until the whole prefixes in the prefix character configured information of acquisition first character string refer to Pin, wherein, first character string is initial current string, in the prefix character configured information of first character string First prefix pointers is initial current prefix pointers:
Obtain the mark of the target string before the current string indicated by the current prefix pointers;
Before mark according to the target string obtains first in the prefix character configured information of the target string Sew pointer, as the next prefix pointers in the prefix character configured information of first character string;
Using the target string as next current string, the prefix character of the target string is indicated into letter First prefix pointers in breath are used as next current prefix pointers.
4. method according to claim 2, it is characterised in that described to be indicated according to the prefix character of first character string The prefix character of the first character string described in acquisition of information includes:
The character indicated by each prefix pointers that the prefix character configured information of first character string includes is obtained successively The suffix character of string correspondence storage in the metamessage block;
From the character string indicated by described each prefix pointers in the metamessage block in correspondence storage suffix character in respectively The partial character in the prefix character of first character string is obtained, to obtain the prefix character of first character string.
5. method according to claim 4, it is characterised in that the character string indicated by described each prefix pointers Part in the prefix character for obtaining first character string respectively in the corresponding suffix character for storing in the metamessage block Character includes:
Sequentially, repetition is held for the instruction of each prefix pointers that the prefix character configured information according to first character string includes Row following steps, wherein, first prefix pointers in the prefix character configured information of first character string are used as initial Current pointer, the prefix length of first character string is used as the initial current character length for not obtaining prefix character:
Obtain the prefix length of the character string indicated by the current pointer;
Obtain the current character length for not obtaining prefix character long with the prefix of the character string indicated by the current pointer Degree the first difference therebetween;
From the character string indicated by the current pointer in the metamessage block in correspondence storage suffix character in sequentially obtain The character of quantity indicated by first difference, as the partial character in the prefix character of first character string;
By the next pointer in described each prefix pointers after the current pointer as the current pointer, and from Subtract first difference in the current character length for not obtaining prefix character, obtain it is next it is described it is current do not obtain before The character length of asyllabia symbol.
6. method according to claim 2, it is characterised in that it is described by the prefix character of first character string and The suffix character synthesis of first character string obtains first character string to be included:
Obtain the character string total length of first character string;
It is that first character string distributes storage address according to the character string total length, and obtains for storing what is returned The first address of first character string;
Following steps are repeated, until the current character length for not obtaining character is less than or equal to 0 in first character string, its In, the mark of first character string used as initial current identification, make by the character string total length of first character string It is the initial described current character length for not obtaining character:
Obtain the character string that the current character length for not obtaining character is identified with the current identification prefix length it Between the second difference, as current character length to be synthesized;
The character string identified from the current identification is sequentially obtained in the corresponding suffix character for storing in the metamessage block The character of the quantity indicated by the current character length to be synthesized, as character to be synthesized;
Obtain the 3rd difference between the current character length for not obtaining character and the current character length to be synthesized;
The 3rd difference is superimposed on the first address, the storage address of the character to be synthesized is obtained;
By in the character storage to be synthesized to the storage address;
The current character length to be synthesized is subtracted from the current character length for not obtaining character, next institute is obtained State the current character length for not obtaining character;
When next current character length for not obtaining character is more than 0, next current identification is obtained, wherein, Each prefix pointers that next current identification includes from the prefix character configured information of first character string successively Obtained in the mark of indicated character string.
7. method according to claim 1, it is characterised in that before the acquisition data access request, also include:
The metamessage block of the structural information for being configured to store first character string, wherein, the metamessage block includes:Institute State prefix length, the suffix storage location of first character string, the prefix character of first character string of the first character string The suffix character of configured information and first character string.
8. method according to claim 7, it is characterised in that the structure for being configured to store first character string The metamessage block of information includes:
Obtain the prefix length of first character string;
Following steps are repeated, until the prefix length of the character string indicated by current identification is less than first character string Prefix length, wherein, the mark of first character string is used as initial current identification:Judge indicated by the current identification Whether the prefix length of character string is more than or equal to the prefix length of first character string;In the word indicated by the current identification When the prefix length for according with string is more than or equal to the prefix length of first character string, next current identification is obtained, wherein, Next current identification is obtained forward successively according to the storage order of the character string stored in the metamessage block;
When the prefix length of the character string indicated by the current identification is less than the prefix length of first character string, obtain First character string mark and the current identification between the 4th difference as first character string prefix character First prefix pointers in configured information, wherein, the prefix pointers are used to indicate the prefix of first character string The character string where partial character in character;
Prefix character by first prefix pointers storage with first string matching in the metamessage block refers to In showing information.
9. a kind of DAA, it is characterised in that including:
First acquisition unit, for obtaining data access request, wherein, to be visited is carried in the data access request The mark of one character string;
Second acquisition unit, for obtaining the suffix character in first character string according to the mark of first character string, And the prefix character configured information of first character string, wherein, the prefix character configured information is used to indicate described first Prefix character in character string, the prefix character is since the bebinning character of first character string, with the second character string In orderly character consecutive identical from bebinning character, before second character string is located at first character string, and with institute State the first character string adjacent;
3rd acquiring unit, for obtaining first character string according to the prefix character configured information of first character string The prefix character;
Synthesis unit, for by the suffix character of the prefix character of first character string and first character string Synthesis obtains first character string, and returns to first character string.
10. device according to claim 9, it is characterised in that the second acquisition unit includes:
First acquisition module, in the metamessage block of the structural information for storing character string, obtaining and first word The prefix character configured information of corresponding first character string of mark of symbol string, wherein, the preceding asyllabia of first character string Symbol configured information includes being respectively used to indicate first word with one or more prefix pointers, each described prefix pointers Character string where according with the partial character in the prefix character of string.
11. devices according to claim 10, it is characterised in that first acquisition module includes:
First acquisition submodule, the prefix character for obtaining first character string according to the mark of first character string refers to Show first prefix pointers in information;
First treatment submodule, for repeating following steps, until the prefix character for obtaining first character string is indicated Whole prefix pointers in information, wherein, first character string is initial current string, before first character string First prefix pointers in asyllabia symbol configured information are initial current prefix pointers:
Obtain the mark of the target string before the current string indicated by the current prefix pointers;According to The mark of the target string obtains first prefix pointers in the prefix character configured information of the target string, makees It is the next prefix pointers in the prefix character configured information of first character string;Using the target string as next The individual current string, using first prefix pointers in the prefix character configured information of the target string as next The individual current prefix pointers.
12. devices according to claim 10, it is characterised in that the 3rd acquiring unit includes:
Second acquisition module, each prefix that the prefix character configured information for obtaining first character string successively includes The suffix character of the character string correspondence storage in the metamessage block indicated by pointer;
3rd acquisition module, for the correspondence storage in the metamessage block from the character string indicated by described each prefix pointers Suffix character in obtain partial character in the prefix character of first character string respectively, to obtain first character string The prefix character.
13. devices according to claim 12, it is characterised in that the 3rd acquisition module includes:
Second processing submodule, each prefix included for the prefix character configured information according to first character string refers to The instruction of pin sequentially, repeats following steps, wherein, first in the prefix character configured information of first character string Prefix pointers currently do not obtain preceding asyllabia as initial current pointer, the prefix length of first character string as initial The character length of symbol:
Obtain the prefix length of the character string indicated by the current pointer;
Obtain the current character length for not obtaining prefix character long with the prefix of the character string indicated by the current pointer Degree the first difference therebetween;
From the character string indicated by the current pointer in the metamessage block in correspondence storage suffix character in sequentially obtain The character of quantity indicated by first difference, as the partial character in the prefix character of first character string;
By the next pointer in described each prefix pointers after the current pointer as the current pointer, and from Subtract first difference in the current character length for not obtaining prefix character, obtain it is next it is described it is current do not obtain before The character length of asyllabia symbol.
14. devices according to claim 10, it is characterised in that the synthesis unit includes:
4th acquisition module, the character string total length for obtaining first character string;
Distribute module, for being that first character string distributes storage address according to the character string total length, and obtains and is used for Store the first address of first character string to be returned;
First processing module, for repeating following steps, until the current word for not obtaining character in first character string Symbol length be less than or equal to 0, wherein, the mark of first character string as initial current identification, first character string The character string total length is used as the initial described current character length for not obtaining character:
Obtain the character string that the current character length for not obtaining character is identified with the current identification prefix length it Between the second difference, as current character length to be synthesized;
The character string identified from the current identification is sequentially obtained in the corresponding suffix character for storing in the metamessage block The character of the quantity indicated by the current character length to be synthesized, as character to be synthesized;
Obtain the 3rd difference between the current character length for not obtaining character and the current character length to be synthesized;
The 3rd difference is superimposed on the first address, the storage address of the character to be synthesized is obtained;
By in the character storage to be synthesized to the storage address;
The current character length to be synthesized is subtracted from the current character length for not obtaining character, next institute is obtained State the current character length for not obtaining character;
When next current character length for not obtaining character is more than 0, next current identification is obtained, wherein, Each prefix pointers that next current identification includes from the prefix character configured information of first character string successively Obtained in the mark of indicated character string.
15. devices according to claim 9, it is characterised in that also include:
Dispensing unit, for before the acquisition data access request, being configured to store the structure of first character string The metamessage block of information, wherein, the metamessage block includes:The prefix length of first character string, first character The suffix character of the suffix storage location of string, the prefix character configured information of first character string and first character string.
16. devices according to claim 15, it is characterised in that the dispensing unit includes:
5th acquisition module, the prefix length for obtaining first character string;
Second processing module, for repeating following steps, until the prefix length of the character string indicated by current identification is small In the prefix length of first character string, wherein, the mark of first character string is used as initial current identification:Judge institute Whether the prefix length for stating the character string indicated by current identification is more than or equal to the prefix length of first character string;Described When the prefix length of the character string indicated by current identification is more than or equal to the prefix length of first character string, obtain next The current identification, wherein, next current identification is suitable according to the storage of the character string stored in the metamessage block Sequence is obtained forward successively;
When the prefix length of the character string indicated by the current identification is less than the prefix length of first character string, obtain First character string mark and the current identification between the 4th difference as first character string prefix character First prefix pointers in configured information, wherein, the prefix pointers are used to indicate the prefix of first character string The character string where partial character in character;
Prefix character by first prefix pointers storage with first string matching in the metamessage block refers to In showing information.
CN201611088064.7A 2016-11-29 2016-11-29 data access method and device Active CN106815282B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611088064.7A CN106815282B (en) 2016-11-29 2016-11-29 data access method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611088064.7A CN106815282B (en) 2016-11-29 2016-11-29 data access method and device

Publications (2)

Publication Number Publication Date
CN106815282A true CN106815282A (en) 2017-06-09
CN106815282B CN106815282B (en) 2019-12-06

Family

ID=59106918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611088064.7A Active CN106815282B (en) 2016-11-29 2016-11-29 data access method and device

Country Status (1)

Country Link
CN (1) CN106815282B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598057A (en) * 2019-08-30 2019-12-20 北京电子工程总体研究所 Data searching method and device for telemetering data
CN112668131A (en) * 2021-01-04 2021-04-16 北京全路通信信号研究设计院集团有限公司 Wiring table generation method, device, equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719458A (en) * 2005-07-20 2006-01-11 上海通用化工技术研究所 Guiding code used for object and commodity coding netowrk joining and its application system
CN1889080A (en) * 2006-07-31 2007-01-03 浙江大学 Method for searching character string
CN101605129B (en) * 2009-06-23 2012-02-01 北京理工大学 URL lookup method for URL filtering system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719458A (en) * 2005-07-20 2006-01-11 上海通用化工技术研究所 Guiding code used for object and commodity coding netowrk joining and its application system
CN1889080A (en) * 2006-07-31 2007-01-03 浙江大学 Method for searching character string
CN101605129B (en) * 2009-06-23 2012-02-01 北京理工大学 URL lookup method for URL filtering system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110598057A (en) * 2019-08-30 2019-12-20 北京电子工程总体研究所 Data searching method and device for telemetering data
CN112668131A (en) * 2021-01-04 2021-04-16 北京全路通信信号研究设计院集团有限公司 Wiring table generation method, device, equipment and computer readable storage medium
CN112668131B (en) * 2021-01-04 2023-11-17 北京全路通信信号研究设计院集团有限公司 Wiring table generation method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN106815282B (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN108932236A (en) A kind of file management method, scratch file delet method and device
CN105630972A (en) Data processing method and device
CN111249736B (en) Code processing method and device
CN110351397B (en) Method and device for matching IP network segments
DE1474040C3 (en) Device for creating memory addresses
CN108509479A (en) Entity recommends method and device, terminal and readable storage medium storing program for executing
RU97112940A (en) METHOD AND DEVICE FOR COMPRESSING DATA USING ASSOCIATIVE MEMORY
CN106815282A (en) Data access method and device
CN104572994B (en) Method and apparatus for searching for data
CN110232633A (en) A kind of electronic signature method, apparatus, storage medium and server
CN110113617A (en) A kind of method and device of compression of images and decompression
CN103593442B (en) The De-weight method and device of daily record data
CN112231104A (en) Game data processing method and device
CN106777170A (en) Strengthen the medical information document handling system and method for server access speed
CN109408669A (en) A kind of content auditing method and device for different application scene
CN105359142A (en) Hash join method, device and database management system
US11567661B2 (en) Virtual memory management method and processor
CN111310115A (en) Data processing method, device and chip, electronic equipment and storage medium
CN109597804A (en) Client's merging method and device, electronic equipment and storage medium based on big data
CN109669678A (en) Template engine integration method, device, electronic equipment and storage medium
CN105320609A (en) Mobile terminal based data storage method and system
CN111985617A (en) Processing method and device of 3D convolutional neural network on neural network processor
CN105843859B (en) The method, apparatus and equipment of data processing
CN108092670B (en) Coding method and device
CN110517656A (en) Lyrics rhythm generation method, equipment, storage medium and device

Legal Events

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