CN113609352B - Character string retrieval method, device, computer equipment and storage medium - Google Patents

Character string retrieval method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN113609352B
CN113609352B CN202110887280.2A CN202110887280A CN113609352B CN 113609352 B CN113609352 B CN 113609352B CN 202110887280 A CN202110887280 A CN 202110887280A CN 113609352 B CN113609352 B CN 113609352B
Authority
CN
China
Prior art keywords
character
last
array
characters
string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110887280.2A
Other languages
Chinese (zh)
Other versions
CN113609352A (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.)
Beijing Hengan Jiaxin Safety Technology Co ltd
Original Assignee
Beijing Hengan Jiaxin Safety Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hengan Jiaxin Safety Technology Co ltd filed Critical Beijing Hengan Jiaxin Safety Technology Co ltd
Priority to CN202110887280.2A priority Critical patent/CN113609352B/en
Publication of CN113609352A publication Critical patent/CN113609352A/en
Application granted granted Critical
Publication of CN113609352B publication Critical patent/CN113609352B/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
    • 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/90348Query processing by searching ordered data, e.g. alpha-numerically ordered data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a character string retrieval method, a device, equipment and a storage medium. The method comprises the following steps: acquiring a character string to be searched; sequentially acquiring characters on each character position of the character string to be searched according to the sequence from the first position to the last position, reading character array elements at the corresponding positions of the character arrays corresponding to the characters after each character position is acquired, and acquiring a character array corresponding to the next character according to the character array elements; under the condition that the character array corresponding to all the characters and the character array elements exist, acquiring the character array element corresponding to the last character of the character string to be searched; and under the condition that the character array element corresponding to the last character is the last node element, determining that the search result of the character string to be searched exists. The embodiment of the invention can reduce the calculated amount in the process of retrieving the character strings, and save the time cost and the calculation resource cost.

Description

Character string retrieval method, device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a character string retrieval method, a character string retrieval device, computer equipment and a storage medium.
Background
In the prior art, the following two methods are generally adopted to search whether a character string is a known character string, such as a word with an actual meaning, a pre-recorded password, and the like, instead of randomly generated messy codes: the first step is to traverse the known character string, screen out the known character string identical to the first character of the character string to be searched, and then to traverse and screen out the same known character string according to the next character, so as to push out until the known character string identical to the character string to be searched is finally screened out, or the character string to be searched is determined not to belong to the known character string. By way of example, assume that there are 9 words in the dictionary as follows: aaa, aab, aac, aba, abb, abc, aca, acb and baa, if it is desired to search whether the character string acc is a real word, search with the first bit letter a for the first time, go through 9 times, obtain 8 results; searching with the second bit letter c for the second time, traversing 8 times, and obtaining 2 results; and thirdly, searching by using a third letter c, traversing for 2 times, and obtaining 0 results, wherein the judging process is finished, the judging process is judged to be nonexistent, and 19 times of searching are totally carried out. Secondly, converting the known character string into a hash value, for example, MD5 (Message-Digest algorithm), constructing Ha Xiku, calculating the hash value for the character string to be searched by adopting the same algorithm, and comparing the hash value with Ha Xiku, so that the letters in the hash value can be compared one by one, and determining whether the character string to be searched belongs to the known character string according to the final comparison result.
However, the method provided by the above prior art involves a plurality of traversal and comparison processes, and the more the number of character bits contained in the retrieved character string or the more the number of known character strings, the more the number of traversal and comparison, resulting in a huge amount of computation and time cost consumed for computation.
Disclosure of Invention
The embodiment of the invention provides a character string retrieval method, a device, computer equipment and a storage medium, which are used for reducing the calculated amount in the character string retrieval process and saving the time cost and the calculation resource cost.
In a first aspect, an embodiment of the present invention provides a method for retrieving a character string, including:
acquiring a character string to be searched;
sequentially acquiring characters on character positions of the character string to be searched according to the sequence from the first position to the last position, reading character array elements at corresponding positions of character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements;
under the condition that the character array corresponding to all the characters and the character array elements exist, acquiring the character array element corresponding to the last character of the character string to be searched;
And under the condition that the character array element corresponding to the last character is the last node element, determining that the search result of the character string to be searched exists.
In a second aspect, an embodiment of the present invention further provides a device for retrieving a character string, including:
the character string acquisition module is used for acquiring character strings to be searched;
the character retrieval module is used for sequentially acquiring characters on each character position of the character string to be retrieved according to the sequence from the first position to the last position, reading character array elements at the corresponding positions of the character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements;
the last character acquisition module is used for acquiring the character array element corresponding to the last character of the character string to be searched under the condition that the character array corresponding to all the characters and the character array element exist;
and the existence result determining module is used for determining that the search result of the character string to be searched exists under the condition that the character array element corresponding to the last character is determined to be the last node element.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, including:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for retrieving a string provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer storage medium having stored thereon a computer program, which when executed by a processor, implements the character string retrieval method provided by any embodiment of the present invention.
According to the embodiment of the invention, the character strings to be searched are obtained, the characters on the character bits are sequentially obtained according to the sequence from the first position to the last position, after each character is obtained, the character array elements are read at the corresponding positions of the character arrays corresponding to the characters, the character arrays corresponding to the next characters are obtained according to the character array elements, under the condition that all the character arrays corresponding to the characters and the character array elements corresponding to the last position are determined to exist, the search result of the character strings to be searched is determined to exist, the search result of each character of the character strings to be searched is obtained only once, the search result of the character strings to be searched can be finally obtained, the calculation amount in the process of searching the character strings is greatly reduced, and the time cost and the calculation resource cost are saved.
Drawings
Fig. 1 is a flowchart of a method for retrieving a character string according to a first embodiment of the present invention.
Fig. 2 is a schematic diagram of a character array according to a first embodiment of the present invention.
Fig. 3 is a flowchart of a method for retrieving a character string according to a second embodiment of the present invention.
Fig. 4 is a schematic diagram of a character array creation method according to a second embodiment of the present invention.
Fig. 5 is a flowchart of a method for retrieving a character string according to a second embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a character string retrieving device according to a third embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof.
It should be further noted that, for convenience of description, only some, but not all of the matters related to the present invention are shown in the accompanying drawings. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example 1
Fig. 1 is a flowchart of a character string searching method according to an embodiment of the present invention, where the method may be implemented by a character string searching device according to an embodiment of the present invention, and the device may be implemented by software and/or hardware and may be generally integrated in a computer device. Accordingly, as shown in fig. 1, the method includes the following operations:
s110, acquiring a character string to be searched.
The character string to be searched may be any character string to be searched whether the character string belongs to a known character string or not, and may include one or more characters arranged in a fixed order.
Correspondingly, the obtaining manner of the character string to be searched may be receiving the character string to be searched input by the user, reading the pre-stored character string to be searched or any other realizable manner, which may be determined according to the application scenario, and is not limited herein. For example, in the scenario of verifying the user authority, it is required to verify whether the password provided by the user belongs to the password of the pre-record, and then the password input by the user may be received as the character string to be retrieved.
S120, sequentially acquiring characters on each character position of the character string to be searched according to the sequence from the first position to the last position, reading character array elements at the corresponding positions of the character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements.
Where a character bit may be the position occupied by a single character in a character string. The character array may be an array of one or more character array elements having a fixed position. The character array elements may be array elements each composed of a single character.
Specifically, the character array corresponding to any character may include all known character strings having the same character as the character string to be searched in the character bit before the character bit where the character is located, and all character array elements respectively formed by all characters appearing in the character bit where the character is located. And for character arrays corresponding to different characters, the positions of the character array elements formed by the same character in each character array are fixed the same, if a certain character does not appear on a certain character position of a known character string, the character array elements formed by the character do not exist in the corresponding character array, and the positions of the character array elements in the character array can be vacant. The known character string may correspond to an application scenario of the character string search, and whether the character string to be searched belongs to the known character string may be determined through the search under the application scenario. In the above scenario of verifying the user rights, all the pre-recorded passwords are known strings.
Correspondingly, the character array corresponding to the character can be determined according to the character on each character bit before the character bit of the character in the character string to be searched. According to the sequence from the first bit to the last bit, first the first character is acquired from the character string to be searched, and if no character bit exists before, the character array corresponding to the first character can be directly determined, and the corresponding position is determined. The character array corresponding to the first character comprises character array elements formed by the first characters of all known character strings, and the corresponding position is the fixed position of the character array elements formed by the first characters of the character strings to be searched. And reading the character array element at the corresponding position, and if the known character string which is the same as the first character of the character string to be searched exists, reading the character array element formed by the first character.
Further, according to the character array element corresponding to the read first character, a character array corresponding to the second character of the character string to be searched can be obtained. The character array comprises character array elements formed by each character appearing in the second bit of all the known character strings with the same first character as the character string to be searched. And determining the corresponding position of the second bit character of the character string to be searched in the character array, wherein the corresponding position is the fixed position of the character array element formed by the second bit character of the character string to be searched. And reading the character array element at the position, and if the known character string which is the same as the first two characters of the character string to be searched exists, reading the character array element formed by the second character in the position. And so on, by acquiring the character array element corresponding to the current character bit of the character string to be searched, the character array corresponding to the next character bit can be acquired, so that the character array element is read at the corresponding position of the character array.
And S130, under the condition that the character array corresponding to all the characters and the character array elements exist, acquiring the character array element corresponding to the last character of the character string to be searched.
Correspondingly, if the corresponding position of the character array corresponding to the character on each character position of the character string to be searched can be read to obtain the character array element corresponding to the character on the next character position through the character array element corresponding to the character on any character position, until the corresponding position of the character array corresponding to the last character of the character string to be searched is read to obtain the character array element corresponding to the last character, it can be determined that the character array corresponding to all the characters of the character string to be searched and the character array element both exist, which means that the known character string is completely the same as the character string to be searched, or that the first few digits of the known character string are completely the same as the character string to be searched and the character number is more than the character string to be searched, the character array element corresponding to the last character of the character string to be searched can be further obtained to determine whether the known character string is completely the same as the character string to be searched.
Alternatively, the number of characters of the character string to be searched can be obtained, the number of times of searching the single character is recorded, when the number of times reaches the number of characters of the character string to be searched, all the characters of the character string to be searched can be determined to be searched, and the last searched character is determined to be the last character.
And S140, under the condition that the character array element corresponding to the last character is determined to be the last node element, determining that the search result of the character string to be searched exists.
The last node element may be a character array element formed by characters appearing on the last character bit of any known character string.
Correspondingly, if the character array element corresponding to the last character is the last node element, it can be explained that the character is the last character in the known character string, and the characters on the previous character positions of the known character string are identical to the characters on the previous character positions of the last character of the character string to be searched, that is, the existing known character string is identical to the character string to be searched, and it can be determined that the search result of the character string to be searched exists.
Fig. 2 is a schematic diagram of a character array according to an embodiment of the present invention. As shown in fig. 2, in a specific example, if the string acb is required to be searched for belongs to a known string, the character array N1 corresponding to the first letter may be obtained for the first time, and the first letter a is searched for in N1, where the first position from the left in N1 is determined to be the corresponding position of a, and the character array element formed by a may be read at the corresponding position, and the character array N2 may be found. And searching in N2 by using a second letter c for the second time, determining a corresponding position in N2, reading a character array element formed by c, and finding a character array N30. And thirdly, searching in N30 by a third letter b, determining the corresponding position in N30, reading the character array elements formed by b, and determining that the character array and the character array elements corresponding to all the characters of the character string acb exist. Further, a character array element composed of b in N30 is obtained, if the character array element is determined to be a last node element, the existence of a character string acb in the known character string is indicated, and the search result is the existence.
The embodiment of the invention provides a character string retrieval method, which comprises the steps of sequentially acquiring characters on each character position of a character string to be retrieved according to the sequence from the first position to the last position, reading character array elements at the corresponding positions of character arrays corresponding to the characters after each character is acquired, acquiring the character arrays corresponding to the next characters according to the character array elements, and determining that retrieval results of the character string to be retrieved are present under the condition that all the character arrays corresponding to the characters and the character array elements exist and the character array elements corresponding to the last position are last node elements, so that the retrieval results of the character string to be retrieved can be finally obtained only once for each character of the character string to be retrieved, a great deal of repeated traversing and comparing processes in the prior art are avoided, the calculated amount in the character string retrieval process is greatly reduced, and the time cost and the computing resource cost are saved.
Example two
Fig. 3 is a flowchart of a method for retrieving a character string according to a second embodiment of the present invention. The embodiment of the invention is embodied based on the above embodiment, and in the embodiment of the invention, a specific optional implementation manner for determining that the search result of the character string to be searched is not existed is provided.
As shown in fig. 3, the method in the embodiment of the present invention specifically includes:
s210, acquiring a character string to be searched.
In an optional embodiment of the present invention, before the obtaining the character string to be retrieved, the method may further include: acquiring all known character strings; and circularly executing the characters on the same character position of each known character string according to the sequence from the first position to the last position, generating the character array elements in the corresponding positions of the character arrays corresponding to the character positions according to the acquired characters, and respectively creating the character arrays corresponding to the next character position for each character array element until the characters on the last position of all the known character strings are acquired and generating each character array element in each corresponding position of the character arrays corresponding to the last position.
Accordingly, the character array may be created from known character strings. According to the sequence from the first position to the last position, firstly, the characters appearing on the first character positions of all the known character strings are acquired, character array elements formed by the partial characters are respectively generated, and the character array elements are respectively added into the corresponding positions in the character array corresponding to the first character. The character array corresponding to each character bit comprises a preset number of storage positions, wherein the preset number can be the number of all possible characters in the known character string, each storage position is used for storing character array elements formed by single characters, and the storage positions of the character array elements formed by each character are fixed.
Further, for each first character, obtaining second characters of all known character strings comprising the same first character, respectively generating character array elements formed by the partial characters, respectively adding the character array elements into corresponding positions in a character array corresponding to the second characters, wherein the character array corresponding to the second characters has a corresponding relation with the character array elements formed by the first characters. And then, respectively aiming at each second bit character corresponding to each first bit character, acquiring third bit characters of all the known character strings with the same first two bits characters, respectively generating character array elements formed by the partial characters, respectively adding the character array elements into corresponding positions in the character arrays corresponding to the third bit characters, wherein the character arrays corresponding to the third bit characters have corresponding relations with the character array elements formed by the second bit characters at the same time, and the character array elements formed by the second bit characters have corresponding relations with the character array elements formed by the first bit characters. If all the known character strings with the same first two characters do not have the third character, the character array elements formed by the second character do not have the character array corresponding to the corresponding third character. And so on until the characters on the last position of all the known character strings are acquired, and generating each character array element in each corresponding position of the character array corresponding to the last position.
In an optional embodiment of the present invention, the generating the character array element in each corresponding position of the character array corresponding to the character bit according to the acquired character may further include: under the condition that the character is determined to be in the last position in any associated character string, determining the character array element as the last node element; and determining the character array element as the non-last node element under the condition that the characters are not in the last position in all the associated character strings.
Wherein, the character on any character bit has the corresponding character array element formed by the characters on each character bit before. If there is a character from the first position to the character position in any of the known character strings, the characters in the preceding character positions corresponding to the character and the character are completely matched, i.e. the characters in the same character position are the same, such a known character string can be determined as an associated character string. Correspondingly, if any character of the associated character string does not exist after the character bit, the character can be determined to be in the last position in the associated character string, and the character array element formed by the character can be determined to be the last node element. If all the associated strings have the next character after the character bit, the character is determined not to be in the last position in the associated strings, and the character array element formed by the character is determined to be a non-last node element.
Fig. 4 is a schematic diagram of a method for creating a character array according to an embodiment of the present invention. As shown in fig. 4, in a specific example, if the known character string includes a character string aa, aaa, aac, aba, abb, abc, aca and acb with a first character and a character string baa with b as a first character, the first character is acquired, a and b can be acquired, and character array elements formed by a and b can be generated respectively and added to corresponding positions in the character array corresponding to the first character, where the corresponding positions of the character array elements formed by a are the first left, and the corresponding positions of the character array elements formed by b are the second left. And then the second bit character of its associated string is read for the first bit characters a and b, respectively. Taking the first character a as an example, a, b and c can be read from the associated character strings aa, aaa, aac, aba, abb, abc, aca and acb, character array elements formed by a, b and c can be respectively generated and respectively added to corresponding positions in the character array corresponding to the second bit character, the character array corresponding to the second bit character has a corresponding relationship with the character array element formed by the first character a, wherein the corresponding position of the character array element formed by c is the third bit from left. The third bit character of its associated string is then read for the second bit characters a, b and c, respectively. Taking the second bit character a as an example, a and c can be read from the associated character strings aa, aaa and aac, character array elements formed by a and c can be respectively generated and respectively added to corresponding positions in the character array corresponding to the third bit character, the character array corresponding to the third bit character has a corresponding relation with the character array element formed by the second bit character a, and the character array element formed by the second bit character a has a corresponding relation with the character array element formed by the first bit character a. In the character array corresponding to the third character, the second position from the left corresponding to the character b may be left. Meanwhile, it may be determined that the second bit character a is the last bit in the associated character string aa, and then the character array element formed by the second bit character a may be determined as the last bit node element. Thus, according to the method described in fig. 4, the character array shown in fig. 2 can be generated for the character string with the initial a among the known character strings.
S220, sequentially acquiring the characters on each character position of the character string to be searched according to the sequence from the first position to the last position, reading character array elements at the corresponding positions of the character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements.
In an optional embodiment of the present invention, the reading the character array element at the corresponding position of the character array corresponding to the character may include: acquiring a search sequence number of the character; determining a position corresponding to the search sequence number in a character array corresponding to the character as the corresponding position; and reading the character array elements stored in the corresponding positions.
The search sequence number may be a sequence number describing a position in the character array, each position in the character array corresponds to a different and fixed search sequence number, and the search sequence number of any character may be used to determine a position of a character array element formed by the search sequence number in the corresponding character array.
Accordingly, since the positions of the character array elements formed by the characters in each character array are fixed, the corresponding positions of the characters can be determined by the search sequence number. The corresponding position in the corresponding character array can be determined by acquiring the search sequence number of the character, so that the character array element stored in the corresponding position is read, and whether the character array element formed by the character exists or not is judged according to the reading result.
In an optional embodiment of the present invention, the obtaining the search sequence number of the character may include: acquiring a character value of the character and a starting character value corresponding to a starting character element of the character array; calculating a difference between the character value and the starting character value; and determining the search sequence number corresponding to the character according to the search sequence number corresponding to the initial character element of the character array and the difference value.
The character value may be a value corresponding to a character obtained through a preset algorithm, different characters respectively have different character values, and different character array elements formed by the same character correspond to the character values of the character. The character array start element may be a character array element stored at a start position of the character array, and the start position of the character array may be an arbitrary determined position. The start character value may be a character value of a character constituting a start character element of the character array.
Accordingly, the initial element of the character array may be predetermined, and its position in the character array may be described by its corresponding search sequence number, which corresponds to the initial character value. Meanwhile, as the positions of the character array elements formed by the characters in the character array are fixed, and the positions are respectively corresponding to the search serial numbers, the positions are respectively corresponding to different and fixed character values, and further, the relation of the search serial numbers among the character array elements formed by the characters can be determined according to the relation of the character values among the characters, namely the position relation among the character array elements formed by the characters is determined. Therefore, when any character is searched, the character value is calculated, the difference value between the character value and the initial character value is calculated, and the position relation between the character array element formed by the character and the initial character element of the character array can be determined, so that the corresponding position of the character array element formed by the character in the corresponding character array is obtained according to the position of the initial character element of the character array, which is determined in advance.
Alternatively, the character value of the character may be an ASCII (American Standard Code for Information Interchange ) value of the character.
Illustratively, in the character array shown in fig. 2, the character array element formed by the character a in the first left position may be determined as the character array start character element, and the start character value is the ASCII value 97 of a. Correspondingly, the search sequence number of each position of the character array from left to right can be set to be 0, and the search sequence number of the character is increased by a difference value of 1, so that the search sequence number of the character can be determined to be equal to the difference value of the character value and the initial character value. Therefore, when the character string acb is searched, the difference between the ASCII value 97 of the first character a and the initial character value is 0, and the search sequence number is determined to be 0, and the corresponding position is the first left of the character array N1. The difference between the ASCII value 99 of the second bit character c and the starting character value is 2, and the search sequence number can be determined to be 2, and the corresponding position is the third bit from the left of the character array N2. The ASCII value 98 of the third character b differs from the starting character value by 1, and can be determined to have a search sequence number of 1, and the corresponding position is the second left-hand position of the character array N30.
In an alternative embodiment of the present invention, the character array element may include an index pointer; the obtaining the character array corresponding to the next character according to the character array element may include: determining a character array address pointed by the index pointer in the character array element; and acquiring the character array stored in the character array address as the character array corresponding to the next character.
The index pointer in any character array element may be a pointer pointing to a storage address of a character array corresponding to a next character of the character array element. The character array address may be a memory address of the character array.
Correspondingly, the character array elements comprise index pointers, so that after the character array elements corresponding to any character are read, the index pointers in the character array elements can be obtained, and the character array corresponding to the next character can be obtained.
Optionally, after generating any character array element, when obtaining the corresponding next character, creating a character array corresponding to the next character, and generating an index pointer in the character array element according to the storage address of the character array. If any character array element does not have a character array corresponding to the next character, for example, it has only one associated character string and is the last character in the associated character string, the index pointer may be a null pointer.
For example, in the character array shown in fig. 2, an index pointer may be included in the character array element constituted by the character a in the character array N1, the index pointer pointing to the character array N2. An index pointer may also be included in the character array element formed by character c in N2, the index pointer pointing to the character array N30. The index pointers in the character array elements formed by the characters in the N30 can be null pointers because the character array elements corresponding to the next character are not provided any more.
And S230, under the condition that the character array corresponding to all the characters and the character array elements exist, acquiring the character array element corresponding to the last character of the character string to be searched.
S240, judging whether the character array element corresponding to the last character is a last node element, if yes, executing S250, otherwise, executing S260.
In an alternative embodiment of the present invention, the character array element may include a leaf node identifier; the determining that the character array element is a non-last node element or a last node element may include: acquiring the leaf node identification in the character array element corresponding to the last character; under the condition that the leaf node identification is determined to be a negative identification, determining that the character array element is a non-last node element; and determining the character array element as a last node element under the condition that the leaf node identification is determined to be a positive identification.
The leaf node identifier in any character array element may be an identifier for marking the character array element as a non-last node element or a last node element.
Correspondingly, the leaf node identifier is included in the character array element, and then the leaf node identifier in the character array element can be read after the character array element corresponding to the last character is read, so that the character array element is determined to be a non-last node element through the negative identifier of the leaf node identifier or is determined to be a last node element through the positive identifier of the leaf node identifier.
Optionally, when the next character corresponding to the random character array element is obtained after the random character array element is generated, if the next character does not exist in the random associated character string, the leaf node identifier of the character array element can be set as a positive identifier; if the next character exists in all the associated character strings, the leaf node identification of the character array element can be set as a negative identification.
Illustratively, in the character array shown in fig. 2, where the corresponding known character string includes aa, aaa, aac, aba, abb, abc, aca and acb, and the associated character string of the character array element formed by character a in the character array N2 includes aa, aaa, and aac, then it does not have the next character in the character string aa, and its leaf node identification may be set to a positive identification, indicating that it is the last node element. The associated character string of the character array element formed by the character b in the character array N2 includes aba, abb and abc, and then the next character exists in all the associated character strings, and the leaf node identifier thereof can be set to be a negative identifier, which indicates that the leaf node identifier is a non-last node element.
S250, determining that the search result of the character string to be searched exists.
S260, determining that the search result of the character string to be searched is nonexistent.
Correspondingly, if the character array element corresponding to the last character of the character string to be searched is a non-last node element, the fact that the associated character string taking the character as the last character does not exist is indicated, and the character string to be searched does not exist in the known character string.
For example, in the character array shown in fig. 2, the corresponding known character string includes aa, aaa, aac, aba, abb, abc, aca and acb, if the character string to be searched is ab, the first character is searched in the character array N1, so that the corresponding character array element exists, and the character array N2 corresponding to the next character is obtained. And searching in N2 according to the second bit character b of the character to be searched, so that the corresponding character array elements exist, and the character arrays and the character array elements corresponding to all the characters of the character string to be searched exist. Further, the character array element corresponding to the last character b is obtained, and since the known character string with the first two bits ab only includes aba, abb and abc, the character array element formed by the character b in N2 is a non-last node element. The first two bits of the character string are completely consistent with the character string to be searched, but the number of the characters is more than that of the character string to be searched, and the characters are not completely the same as the character string to be searched, so that the search result is not existed according to the fact that the character array element is a non-last node element.
In an alternative embodiment of the present invention, the method may further comprise: and stopping acquiring the character of the character string to be searched under the condition that the character array element or the character array corresponding to any character is determined to be absent, and determining that the search result of the character string to be searched is absent.
Correspondingly, if the character array element corresponding to any character does not exist, it can be stated that at least one character string exists in the known character string, which is identical to the character of the character string to be searched on each character position before the character position of the character, but the character does not exist on the character position of the character, the character string to be searched does not exist in the known character string, and the search of the character on the subsequent character position is not needed to be continued.
For example, if the character string to be searched is a word, and the character string with the first three characters of swo does not exist in the known character string, the character array element corresponding to the character o does not exist, so that it can be directly determined that the character string to be searched does not exist, and the search for r and d is not needed to be continued.
Correspondingly, if the character array corresponding to any character does not exist, it can be stated that at least one character string exists in the known character string, which is identical to the character of the character string to be searched on each character position before the character position of the character, but the at least one character string does not exist on the character position of the character, that is, the number of the character strings is smaller than that of the character string to be searched, the character string to be searched does not exist in the known character string, and the search on the character on the subsequent character position is not needed to be continued.
For example, if the character string to be searched is a word, the character string swo is known to exist in the character string, and other character strings using swo as the first three characters are not exist, the character array of the next character cannot be obtained according to the character array element corresponding to the character o, so that it can be determined that the character string to be searched does not exist in the known character string, and the search on the characters on the subsequent character bits is not required to be continued.
Fig. 5 is a flowchart of a character string retrieving method according to a second embodiment of the present invention. In a specific example, the structure of the character array element may be Struct Item { Char cValue; boolisleaf; void pNextLevel }, where the character array element may include the character cValue, leaf node identity isLeaf, and index pointer pNextLevel that make up the character array element. Accordingly, as shown in fig. 5, for any character string to be searched, the number n of the characters included in the character string to be searched can be obtained, each character of the character string to be searched is obtained according to the sequence from the first position to the last position, the current character is Ci, and the current index times i are recorded. Subtracting the ASCII value corresponding to the character a of the initial element of the character array from the ASCII value of Ci can obtain the search sequence number Ii of Ci. Searching the corresponding position of Ii in the character array Ni corresponding to Ci, reading the character array element Itemi in Ni [ Ii ], judging whether the Itemi is equal to Null or not, if so, indicating that the character array element corresponding to Ci does not exist, and returning a search result as False, namely that the character string to be searched does not exist; if the Itemi is not equal to Null, it is indicated that the character array element corresponding to Ci exists, and whether Ci is the last character of the character string to be searched can be further determined. Specifically, whether Ci is the last character of the character string to be searched can be determined according to whether the number of characters n of the character string to be searched is equal to the current index number i.
If Ci is the last character of the character string to be searched, correspondingly acquiring and judging leaf node identification isLeaf in Itemi, if isLeaf is equal to True, the identification is positive, it can be stated that Itemi is the last node element, it is stated that the known character string is identical to the character string to be searched, and a search result is returned to True, namely the character string to be searched exists; if isLeaf is equal to False, namely negative identification, it can be stated that Itemi is a non-last node element, it is stated that no known character string is identical to the character string to be searched, and the search result is False, namely the character string to be searched does not exist.
If Ci is the last character of the character string to be searched, correspondingly acquiring and judging an index pointer pNextLevel in Itemi, if pNextLevel is equal to Null, namely a Null pointer, indicating that the known character string is not identical to the character string to be searched, and returning a search result as False, namely the character string to be searched is not present; if pNextLevel is not equal to Null, i.e. points to the character array corresponding to the next character, the next character of the character string to be searched can be continuously returned to be obtained, and the process is repeated for searching until a searching result is obtained.
The embodiment of the invention provides a character string retrieval method, which comprises the steps of sequentially acquiring characters on each character position of a character string to be retrieved according to the sequence from the first position to the last position, reading character array elements at the corresponding positions of character arrays corresponding to the characters after each character is acquired, acquiring the character arrays corresponding to the next characters according to the character array elements, and determining that retrieval results of the character string to be retrieved are present under the condition that all the character arrays corresponding to the characters and the character array elements exist and the character array elements corresponding to the last position are last node elements, so that the retrieval results of the character string to be retrieved can be finally obtained only once for each character of the character string to be retrieved, a great deal of repeated traversing and comparing processes in the prior art are avoided, the calculated amount in the character string retrieval process is greatly reduced, and the time cost and the computing resource cost are saved.
Example III
Fig. 6 is a schematic structural diagram of a character string retrieving device according to a third embodiment of the present invention, as shown in fig. 6, where the device includes: a character string acquisition module 310, a character retrieval module 320, a last character acquisition module 330, and a presence result determination module 340.
The character string obtaining module 310 is configured to obtain a character string to be retrieved.
The character retrieving module 320 is configured to sequentially obtain the characters on each character position of the character string to be retrieved according to the order from the first position to the last position, and after each character is obtained, read a character array element at a corresponding position of a character array corresponding to the character, and obtain the character array corresponding to the next character according to the character array element.
And the last character acquisition module 330 is configured to acquire the character array element corresponding to the last character of the character string to be searched, if it is determined that all the character arrays corresponding to the characters and the character array elements exist.
The presence result determining module 340 is configured to determine that a search result of the character string to be searched is present when it is determined that the character array element corresponding to the last character is a last node element.
In an optional implementation manner of the embodiment of the present invention, the apparatus may further include: and the first nonexistence result determining module is used for determining that the search result of the character string to be searched is nonexistence under the condition that the character array element corresponding to the last character is determined to be a non-last node element.
In an optional implementation manner of the embodiment of the present invention, the apparatus may further include: and the second non-existence result determining module is used for stopping acquiring the characters of the character string to be searched under the condition that the character array element or the character array corresponding to any character is determined to be non-existence, and determining that the search result of the character string to be searched is non-existence.
In an alternative implementation manner of the embodiment of the present invention, the character retrieving module 320 may specifically include: a sequence number acquisition sub-module for acquiring the search sequence number of the character; a corresponding position determining sub-module, configured to determine, in a character array corresponding to the character, a position corresponding to the search sequence number as the corresponding position; and the character array reading sub-module is used for reading the character array elements stored in the corresponding positions.
In an optional implementation manner of the embodiment of the present invention, the sequence number obtaining sub-module may be specifically configured to: acquiring a character value of the character and a starting character value corresponding to a starting character element of the character array; calculating a difference between the character value and the starting character value; and determining the search sequence number corresponding to the character according to the search sequence number corresponding to the initial character element of the character array and the difference value.
In an optional implementation manner of the embodiment of the present invention, the character array element may include an index pointer; the character retrieval module 320 may be specifically configured to: determining a character array address pointed by the index pointer in the character array element; and acquiring the character array stored in the character array address as the character array corresponding to the next character.
In an optional implementation manner of the embodiment of the present invention, the character array element may include a leaf node identifier; the presence result determining module 340 may specifically be configured to: acquiring the leaf node identification in the character array element corresponding to the last character; under the condition that the leaf node identification is determined to be a positive identification, determining the character array element as a last node element; the first absence result determining module may specifically be configured to: acquiring the leaf node identification in the character array element corresponding to the last character; under the condition that the leaf node identification is determined to be a negative identification, determining that the character array element is a non-last node element;
in an optional implementation manner of the embodiment of the present invention, the apparatus may further include: the character array creation module is used for acquiring all known character strings; and circularly executing the characters on the same character position of each known character string according to the sequence from the first position to the last position, generating the character array elements in the corresponding positions of the character arrays corresponding to the character positions according to the acquired characters, and respectively creating the character arrays corresponding to the next character position for each character array element until the characters on the last position of all the known character strings are acquired and generating each character array element in each corresponding position of the character arrays corresponding to the last position.
In an optional implementation manner of the embodiment of the present invention, the character array creation module may be specifically configured to: under the condition that the character is determined to be in the last position in any associated character string, determining the character array element as the last node element; and determining the character array element as the non-last node element under the condition that the characters are not in the last position in all the associated character strings.
The device can execute the character string retrieval method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the character string retrieval method.
The embodiment of the invention provides a character string retrieval device, which sequentially acquires characters on each character position by acquiring a character string to be retrieved according to the sequence from the first position to the last position, reads character array elements at the corresponding positions of character arrays corresponding to the characters after acquiring each character, acquires the character arrays corresponding to the next characters according to the character array elements, and determines the retrieval result of the character string to be retrieved to be present under the condition that all the character arrays corresponding to the characters and the character array elements exist and the character array element corresponding to the last position is the last position node element, so that the retrieval result of the character string to be retrieved can be finally obtained only once for each character of the character string to be retrieved, a great deal of repeated traversing and comparing processes in the prior art are avoided, the calculated amount in the character string retrieval process is greatly reduced, and the time cost and the calculation resource cost are saved.
Example IV
Fig. 7 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. Fig. 7 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in fig. 7 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
As shown in fig. 7, the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors 16, a memory 28, a bus 18 that connects the various system components, including the memory 28 and the processor 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard disk drive"). Although not shown in fig. 7, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be appreciated that although not shown in fig. 7, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor 16 executes a program stored in the memory 28 to perform various functional applications and data processing, thereby implementing the character string retrieval method provided by the embodiment of the present invention: acquiring a character string to be searched; sequentially acquiring characters on character positions of the character string to be searched according to the sequence from the first position to the last position, reading character array elements at corresponding positions of character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements; under the condition that the character array corresponding to all the characters and the character array elements exist, acquiring the character array element corresponding to the last character of the character string to be searched; and under the condition that the character array element corresponding to the last character is the last node element, determining that the search result of the character string to be searched exists.
Example five
A fifth embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the character string retrieval method provided by the embodiment of the present invention: acquiring a character string to be searched; sequentially acquiring characters on character positions of the character string to be searched according to the sequence from the first position to the last position, reading character array elements at corresponding positions of character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements; under the condition that the character array corresponding to all the characters and the character array elements exist, acquiring the character array element corresponding to the last character of the character string to be searched; and under the condition that the character array element corresponding to the last character is the last node element, determining that the search result of the character string to be searched exists.
Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or computer device. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (11)

1. A character string retrieval method, comprising:
acquiring a character string to be searched;
sequentially acquiring characters on character positions of the character string to be searched according to the sequence from the first position to the last position, reading character array elements at corresponding positions of character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements;
under the condition that the character array corresponding to all the characters and the character array elements exist, acquiring the character array element corresponding to the last character of the character string to be searched;
Under the condition that the character array element corresponding to the last character is the last node element, determining that the search result of the character string to be searched exists;
before the character string to be retrieved is obtained, the method further comprises the following steps:
acquiring all known character strings;
and circularly executing the characters on the same character position of each known character string according to the sequence from the first position to the last position, generating the character array elements in the corresponding positions of the character arrays corresponding to the character positions according to the acquired characters, and respectively creating the character arrays corresponding to the next character position for each character array element until the characters on the last position of all the known character strings are acquired and generating each character array element in each corresponding position of the character arrays corresponding to the last position.
2. The method according to claim 1, further comprising, after the obtaining the character array element corresponding to the last character of the character string to be retrieved:
and under the condition that the character array element corresponding to the last character is a non-last node element, determining that the search result of the character string to be searched does not exist.
3. The method as recited in claim 1, further comprising:
and stopping acquiring the character of the character string to be searched under the condition that the character array element or the character array corresponding to any character is determined to be absent, and determining that the search result of the character string to be searched is absent.
4. The method of claim 1, wherein the reading the character array element at the corresponding position of the character array to which the character corresponds comprises:
acquiring a search sequence number of the character;
determining a position corresponding to the search sequence number in a character array corresponding to the character as the corresponding position;
and reading the character array elements stored in the corresponding positions.
5. The method of claim 4, wherein the obtaining the search sequence number of the character comprises:
acquiring a character value of the character and a starting character value corresponding to a starting character element of the character array;
calculating a difference between the character value and the starting character value;
and determining the search sequence number corresponding to the character according to the search sequence number corresponding to the initial character element of the character array and the difference value.
6. The method of claim 1, wherein the character array element comprises an index pointer;
the step of obtaining the character array corresponding to the next character according to the character array element comprises the following steps:
determining a character array address pointed by the index pointer in the character array element;
and acquiring the character array stored in the character array address as the character array corresponding to the next character.
7. The method of claim 1, wherein the character array elements comprise leaf node identifications;
determining that the character array element is a non-last node element or a last node element includes:
acquiring the leaf node identification in the character array element corresponding to the last character;
under the condition that the leaf node identification is determined to be a negative identification, determining that the character array element is a non-last node element;
and determining the character array element as a last node element under the condition that the leaf node identification is determined to be a positive identification.
8. The method of claim 1, wherein the generating the character array element in each of the corresponding positions of the character array to which the character bit corresponds from the acquired character further comprises:
Under the condition that the character is determined to be in the last position in any associated character string, determining the character array element as the last node element;
and determining the character array element as a non-last node element under the condition that the characters are not in last position in all the associated character strings.
9. A character string retrieval apparatus, comprising:
the character string acquisition module is used for acquiring character strings to be searched;
the character retrieval module is used for sequentially acquiring characters on each character position of the character string to be retrieved according to the sequence from the first position to the last position, reading character array elements at the corresponding positions of the character arrays corresponding to the characters after each character is acquired, and acquiring the character arrays corresponding to the next characters according to the character array elements;
the last character acquisition module is used for acquiring the character array element corresponding to the last character of the character string to be searched under the condition that the character array corresponding to all the characters and the character array element exist;
the existence result determining module is used for determining that the search result of the character string to be searched exists under the condition that the character array element corresponding to the last character is determined to be the last node element;
The character array creation module is used for acquiring all known character strings; and circularly executing the characters on the same character position of each known character string according to the sequence from the first position to the last position, generating the character array elements in the corresponding positions of the character arrays corresponding to the character positions according to the acquired characters, and respectively creating the character arrays corresponding to the next character position for each character array element until the characters on the last position of all the known character strings are acquired and generating each character array element in each corresponding position of the character arrays corresponding to the last position.
10. A computer device, the computer device comprising:
one or more processors;
a storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the string retrieval method of any of claims 1-8.
11. A computer storage medium having stored thereon a computer program, which when executed by a processor implements a character string retrieval method as claimed in any one of claims 1 to 8.
CN202110887280.2A 2021-08-03 2021-08-03 Character string retrieval method, device, computer equipment and storage medium Active CN113609352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110887280.2A CN113609352B (en) 2021-08-03 2021-08-03 Character string retrieval method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110887280.2A CN113609352B (en) 2021-08-03 2021-08-03 Character string retrieval method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113609352A CN113609352A (en) 2021-11-05
CN113609352B true CN113609352B (en) 2023-08-04

Family

ID=78306632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110887280.2A Active CN113609352B (en) 2021-08-03 2021-08-03 Character string retrieval method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113609352B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5655129A (en) * 1994-05-23 1997-08-05 International Business Machines Corporation Character-string retrieval system and method
US6269189B1 (en) * 1998-12-29 2001-07-31 Xerox Corporation Finding selected character strings in text and providing information relating to the selected character strings
JP2001306614A (en) * 2000-04-20 2001-11-02 Omron Corp Character, string retrieving method and character string retrieving device using the same method
JP2005018811A (en) * 2000-10-25 2005-01-20 Matsushita Electric Ind Co Ltd Character string retrieval device
CN102063510A (en) * 2011-01-17 2011-05-18 珠海全志科技有限公司 Method for searching matched character string
CN102682017A (en) * 2011-03-15 2012-09-19 阿里巴巴集团控股有限公司 Information retrieval method and system
CN104750683A (en) * 2013-12-25 2015-07-01 中国移动通信集团公司 Character string matching method and device
CN110096628A (en) * 2018-04-20 2019-08-06 武汉绿色网络信息服务有限责任公司 A kind of quick matching and recognition method and device based on character string
CN111460311A (en) * 2019-11-12 2020-07-28 腾讯云计算(北京)有限责任公司 Search processing method, device and equipment based on dictionary tree and storage medium
CN111782895A (en) * 2020-07-02 2020-10-16 北京字节跳动网络技术有限公司 Retrieval processing method and device, readable medium and electronic equipment
CN112069303A (en) * 2020-09-17 2020-12-11 四川长虹电器股份有限公司 Matching search method and device for character strings and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10262081B2 (en) * 2014-08-29 2019-04-16 Alvin Roy Reed Method and apparatus for improved database searching

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5655129A (en) * 1994-05-23 1997-08-05 International Business Machines Corporation Character-string retrieval system and method
US6269189B1 (en) * 1998-12-29 2001-07-31 Xerox Corporation Finding selected character strings in text and providing information relating to the selected character strings
JP2001306614A (en) * 2000-04-20 2001-11-02 Omron Corp Character, string retrieving method and character string retrieving device using the same method
JP2005018811A (en) * 2000-10-25 2005-01-20 Matsushita Electric Ind Co Ltd Character string retrieval device
CN102063510A (en) * 2011-01-17 2011-05-18 珠海全志科技有限公司 Method for searching matched character string
CN102682017A (en) * 2011-03-15 2012-09-19 阿里巴巴集团控股有限公司 Information retrieval method and system
CN104750683A (en) * 2013-12-25 2015-07-01 中国移动通信集团公司 Character string matching method and device
CN110096628A (en) * 2018-04-20 2019-08-06 武汉绿色网络信息服务有限责任公司 A kind of quick matching and recognition method and device based on character string
CN111460311A (en) * 2019-11-12 2020-07-28 腾讯云计算(北京)有限责任公司 Search processing method, device and equipment based on dictionary tree and storage medium
CN111782895A (en) * 2020-07-02 2020-10-16 北京字节跳动网络技术有限公司 Retrieval processing method and device, readable medium and electronic equipment
CN112069303A (en) * 2020-09-17 2020-12-11 四川长虹电器股份有限公司 Matching search method and device for character strings and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Reducing Time and Space in Indexed String Matching by Characters Distance Text Sampling;Simone Faro 等;Proceedings of PSC;148–159 *

Also Published As

Publication number Publication date
CN113609352A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN110532347B (en) Log data processing method, device, equipment and storage medium
CN107733894B (en) Comparison method, system, equipment and storage medium of logical interface message
CN111949710A (en) Data storage method, device, server and storage medium
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN110826036A (en) User operation behavior safety identification method and device and electronic equipment
CN109145164A (en) Data processing method, device, equipment and medium
US9213759B2 (en) System, apparatus, and method for executing a query including boolean and conditional expressions
CN111563429A (en) Drawing verification method and device, electronic equipment and storage medium
CN110837635A (en) Method, device, equipment and storage medium for equipment verification
CN113836580A (en) Data desensitization method, system, equipment and storage medium
CN111240971B (en) Method and device for generating wind control rule test case, server and storage medium
CN116226681B (en) Text similarity judging method and device, computer equipment and storage medium
CN113609352B (en) Character string retrieval method, device, computer equipment and storage medium
CN110737678B (en) Data searching method, device, equipment and storage medium
CN110196952B (en) Program code search processing method, device, equipment and storage medium
CN113821630A (en) Data clustering method and device
CN108989902B (en) Barrage message processing method and device, terminal and storage medium
CN115858776B (en) Variant text classification recognition method, system, storage medium and electronic equipment
CN111831750A (en) Block chain data analysis method and device, computer equipment and storage medium
CN113807056B (en) Document name sequence error correction method, device and equipment
CN113312619B (en) Malicious process detection method and device based on small sample learning, electronic equipment and storage medium
CN112003819B (en) Method, device, equipment and computer storage medium for identifying crawler
CN111339776B (en) Resume parsing method and device, electronic equipment and computer-readable storage medium
CN114385891A (en) Data searching method and device, electronic equipment and storage medium
CN113553309A (en) Log template determination method and device, electronic equipment and storage medium

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