CN111339094A - Method, system, storage medium and electronic device for quick retrieval - Google Patents

Method, system, storage medium and electronic device for quick retrieval Download PDF

Info

Publication number
CN111339094A
CN111339094A CN202010117229.9A CN202010117229A CN111339094A CN 111339094 A CN111339094 A CN 111339094A CN 202010117229 A CN202010117229 A CN 202010117229A CN 111339094 A CN111339094 A CN 111339094A
Authority
CN
China
Prior art keywords
bits
information
retrieval
numbers
retrieving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010117229.9A
Other languages
Chinese (zh)
Inventor
杨军
李元高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN202010117229.9A priority Critical patent/CN111339094A/en
Publication of CN111339094A publication Critical patent/CN111339094A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying

Landscapes

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

Abstract

The invention relates to the technical field of computers, in particular to a method, a system, a storage medium and an electronic device for quick retrieval, wherein the method comprises the following steps: inverting each information number in the database to obtain a corresponding inverted sequence number; setting a database index for the reverse sequence number; acquiring a plurality of latter bits of the serial number of the information to be retrieved and carrying out inversion processing; and searching according to the information numbers of the last plurality of bits after inversion processing. According to the invention, the corresponding inverted sequence numbers are obtained by inverting the information numbers, the database index is set for the inverted sequence numbers, the next bits of the information numbers to be retrieved are obtained and inverted, and retrieval is carried out according to the information numbers of the next bits after inversion processing, so that rapid retrieval is realized.

Description

Method, system, storage medium and electronic device for quick retrieval
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, a system, a storage medium, and an electronic device for fast retrieval.
Background
When searching for information having a large amount of data, it is generally possible to input an information number for searching. However, sometimes, the information number is too long, for example, the express bill number, the identification card number, etc. exceeding 10 digits are all input in a time-consuming manner, and are also easy to input errors, thereby causing a search error. In addition, when the amount of information is large, for example, tens of millions of pieces of order information exist, the retrieval speed is very slow.
Disclosure of Invention
In order to solve the above problems, the present invention provides a fast retrieval method, which aims to realize fast and accurate retrieval. The embodiment of the application also provides a corresponding system, a storage medium and electronic equipment.
A method of fast retrieval, comprising:
inverting each information number in the database to obtain a corresponding inverted sequence number;
setting a database index for the reverse sequence number;
acquiring a plurality of latter bits of the serial number of the information to be retrieved and carrying out inversion processing;
and searching according to the information numbers of the last plurality of bits after inversion processing.
Preferably, the retrieving according to the last several bit information numbers after the inversion processing includes:
and when the retrieval result obtained by retrieving according to the inverted information numbers of the next bits is larger than the set quantity threshold, increasing the number of the bits of the next bits of the input information numbers until the retrieval result obtained by retrieving is smaller than or equal to the set quantity threshold.
A system for rapid retrieval, comprising:
the inversion processing module is used for inverting each information number in the database to obtain a corresponding inverted sequence number and inverting a plurality of next bits of the information number to be retrieved;
the index establishing module is used for setting a database index for the reverse sequence number;
and the retrieval module is used for retrieving according to the plurality of information numbers after inversion processing.
Preferably, the retrieval module includes:
and the retrieval submodule is used for increasing the number of the last bits of the input information number when the retrieval result obtained by retrieving according to the inverted information numbers of the last bits is larger than the set number threshold value until the retrieval result obtained by retrieving is smaller than or equal to the set number threshold value.
An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the steps of the method of fast retrieval via execution of the executable instructions.
A computer-readable storage medium, on which a computer program is stored which is executed by a processor for performing the steps of the method for fast retrieval.
By using the present invention, the following effects can be achieved:
1. the method comprises the steps of obtaining corresponding inverted sequence numbers by inverting the information numbers, setting database indexes for the inverted sequence numbers, obtaining a plurality of next bits of the information numbers to be retrieved, inverting the information numbers, and retrieving according to the plurality of next bits of the information numbers after inversion processing, thereby realizing rapid retrieval;
2. and when the retrieval result obtained by retrieving according to the inverted information numbers of the next bits is larger than the set quantity threshold, increasing the number of the bits of the next bits of the input information numbers until the retrieval result obtained by retrieving is smaller than or equal to the set quantity threshold, thereby realizing rapid and accurate retrieval.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a schematic overall flow chart of a fast retrieval method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating step S4 in a method for fast search according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an overall structure of a fast retrieval system according to a second embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a retrieval module in a system for quick retrieval according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to another embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be further described below with reference to the accompanying drawings, but the present invention is not limited to these embodiments.
Example one
Considering that the first several digits of the information number are not highly recognized, there are usually very similar or identical situations, such as a mobile phone number, an identification number, a bill number, an express bill number, etc., and the length of such information number is often more than 10 digits. In the prior art, all information numbers have to be input to realize retrieval during retrieval, but the retrieval mode has low efficiency.
Therefore, the basic idea of the invention is to provide a quick retrieval method, which is to invert each information number in a database to obtain a corresponding inverted sequence number, set a database index for the inverted sequence number, obtain the next bits of the information number to be retrieved and invert the information number, and retrieve the information number according to the next bits after inversion, thereby realizing quick retrieval.
As shown in fig. 1, an embodiment of the present invention provides a method for fast retrieval, including the following steps:
s1: and inverting the information numbers in the database to obtain corresponding inverted sequence numbers.
In one embodiment, the message number is "36730236707910012", and the inverted sequence resulting from the inversion process for the message number is "21001970763203763".
And adding a reverse sequence in the data table, storing the information number subjected to the inversion processing in the corresponding data table, and searching according to the sequence of the reverse sequence in the data table when searching. The data table is shown in the following table:
Figure BDA0002391863010000041
s2: and setting a database index for the reverse sequence number.
The database index is a sorted data structure in the database management system to assist in quickly querying and updating the data in the database table. A database index is a directory built of values in certain fields in order to improve the efficiency of the table search. The method of setting the database index based on the inverted sequence number is the prior art, and thus is not described in detail.
S3: and acquiring a plurality of latter bits of the serial number of the information to be retrieved and carrying out inversion processing.
In general, the minimum value of the last several bits of the input information number is set to, for example, at least the last 4 bits of the input information number, and therefore, only the last 4 bits of the input information number are required. The method of the inversion processing in this step is the same as that in step S1, and for example, the last 4 bits of the input information number are "0014" and the last bit of the input information number is "4100".
In another embodiment, the number of the next bits of the information number to be retrieved can also be determined according to the number of the bits of the information number to be retrieved, which is generally 1/5-1/2, generally 4-8 bits of the number of the information number to be retrieved.
S4: and searching according to the information numbers of the last plurality of bits after inversion processing.
Based on the index established in step S2, fast search can be achieved according to the last several information numbers after inversion processing.
Considering that if the number of bits of the input information number is small, the number of the corresponding search results may be large, and in this case, the number of bits of the input information number may be increased to perform further screening, so as to implement quick and accurate search. As shown in fig. 2, the specific method is as follows:
s41: and when the retrieval result obtained by retrieving according to the inverted information numbers of the next bits is larger than the set quantity threshold, increasing the number of the bits of the next bits of the input information numbers until the retrieval result obtained by retrieving is smaller than or equal to the set quantity threshold.
Example two
The first embodiment provides a fast retrieval method, and correspondingly, in terms of hardware, the second embodiment provides a fast retrieval system, as shown in fig. 3, including: the inversion processing module is used for inverting each information number in the database to obtain a corresponding inverted sequence number and inverting a plurality of next bits of the information number to be retrieved; the index establishing module is used for setting a database index for the reverse sequence number; and the retrieval module is used for retrieving according to the plurality of information numbers after inversion processing.
In one embodiment, as shown in FIG. 4, the retrieval module includes: and the retrieval submodule is used for increasing the number of the last bits of the input information number when the retrieval result obtained by retrieving according to the inverted information numbers of the last bits is larger than the set number threshold value until the retrieval result obtained by retrieving is smaller than or equal to the set number threshold value.
The corresponding inverted sequence numbers are obtained through inversion processing of the information numbers, database indexes are set for the inverted sequence numbers, the next bits of the information numbers to be searched are inverted, and searching is carried out according to the information numbers of the next bits after inversion processing, so that rapid searching is achieved.
And when the retrieval result obtained by retrieving according to the inverted information numbers of the next bits is larger than the set quantity threshold, increasing the number of the bits of the next bits of the input information numbers until the retrieval result obtained by retrieving is smaller than or equal to the set quantity threshold, thereby realizing rapid and accurate retrieval.
EXAMPLE III
A third embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for fast retrieval described in any of the above embodiments. For the specific steps of the fast retrieval method, reference may be made to the detailed description of the above steps of the fast retrieval in the foregoing embodiments, which are not repeated herein. The computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Example four
An electronic device according to a fourth embodiment of the present invention may include a processor and a memory configured to store executable instructions of the processor. Wherein the processor is configured to perform the steps of the method of fast retrieval in any of the above embodiments via execution of the executable instructions. The steps of the fast search method can refer to the detailed description in the foregoing method embodiments, and are not repeated herein.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
FIG. 5 shows a schematic diagram of an electronic device in an example embodiment according to the present disclosure. For example, the electronic device may be provided as a server or client. Referring to fig. 5, the electronic device includes a processing component that further includes one or more processors, and memory resources, represented by memory, for storing instructions, such as application programs, that are executable by the processing component. The application program stored in the memory may include one or more modules that each correspond to a set of instructions. Further, the processing component is configured to execute the instructions to perform the above-described method.
The electronic device may also include a power supply component configured to perform power management of the electronic device, a wired or wireless network interface configured to connect the electronic device to a network, and an input-output (I/O) interface. The electronic device may operate based on an operating system stored in memory, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or the like.
Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.

Claims (6)

1. A method of fast search, comprising:
inverting each information number in the database to obtain a corresponding inverted sequence number;
setting a database index for the reverse sequence number;
acquiring a plurality of latter bits of the serial number of the information to be retrieved and carrying out inversion processing;
and searching according to the information numbers of the last plurality of bits after inversion processing.
2. The method of claim 1, wherein the retrieving according to the last information numbers of the plurality of bits after the inversion process comprises:
and when the retrieval result obtained by retrieving according to the inverted information numbers of the next bits is larger than the set quantity threshold, increasing the number of the bits of the next bits of the input information numbers until the retrieval result obtained by retrieving is smaller than or equal to the set quantity threshold.
3. A system for rapid search, comprising:
the inversion processing module is used for inverting each information number in the database to obtain a corresponding inverted sequence number and inverting a plurality of next bits of the information number to be retrieved;
the index establishing module is used for setting a database index for the reverse sequence number;
and the retrieval module is used for retrieving according to the plurality of information numbers after inversion processing.
4. The system for rapid search according to claim 3, wherein the search module comprises:
and the retrieval submodule is used for increasing the number of the last bits of the input information number when the retrieval result obtained by retrieving according to the inverted information numbers of the last bits is larger than the set number threshold value until the retrieval result obtained by retrieving is smaller than or equal to the set number threshold value.
5. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the steps of a method of fast retrieval as claimed in any one of claims 1 to 2 via execution of the executable instructions.
6. A computer-readable storage medium, on which a computer program is stored which is executed by a processor for performing the steps of a method for rapid search according to any of claims 1 to 2.
CN202010117229.9A 2020-02-25 2020-02-25 Method, system, storage medium and electronic device for quick retrieval Pending CN111339094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010117229.9A CN111339094A (en) 2020-02-25 2020-02-25 Method, system, storage medium and electronic device for quick retrieval

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010117229.9A CN111339094A (en) 2020-02-25 2020-02-25 Method, system, storage medium and electronic device for quick retrieval

Publications (1)

Publication Number Publication Date
CN111339094A true CN111339094A (en) 2020-06-26

Family

ID=71181837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010117229.9A Pending CN111339094A (en) 2020-02-25 2020-02-25 Method, system, storage medium and electronic device for quick retrieval

Country Status (1)

Country Link
CN (1) CN111339094A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09331386A (en) * 1996-06-07 1997-12-22 Ricoh Co Ltd Communication terminal equipment
CN101211345A (en) * 2006-12-27 2008-07-02 ***股份有限公司 Historical trading enquiry method, device and error processing platform
CN106297050A (en) * 2016-08-05 2017-01-04 华侨大学 A kind of article access method based on the access of mobile phone tail number and terminal
CN106898099A (en) * 2016-12-08 2017-06-27 国网天津市电力公司 A kind of intelligent accreditation terminal
CN108269363A (en) * 2017-01-03 2018-07-10 北大方正集团有限公司 Express mail treating method and apparatus based on intelligent express delivery cabinet
CN109741189A (en) * 2019-01-28 2019-05-10 融易行(天津)网络科技有限公司 A kind of bill business method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09331386A (en) * 1996-06-07 1997-12-22 Ricoh Co Ltd Communication terminal equipment
CN101211345A (en) * 2006-12-27 2008-07-02 ***股份有限公司 Historical trading enquiry method, device and error processing platform
CN106297050A (en) * 2016-08-05 2017-01-04 华侨大学 A kind of article access method based on the access of mobile phone tail number and terminal
CN106898099A (en) * 2016-12-08 2017-06-27 国网天津市电力公司 A kind of intelligent accreditation terminal
CN108269363A (en) * 2017-01-03 2018-07-10 北大方正集团有限公司 Express mail treating method and apparatus based on intelligent express delivery cabinet
CN109741189A (en) * 2019-01-28 2019-05-10 融易行(天津)网络科技有限公司 A kind of bill business method and system

Similar Documents

Publication Publication Date Title
US10452691B2 (en) Method and apparatus for generating search results using inverted index
US7080091B2 (en) Inverted index system and method for numeric attributes
CN103514201B (en) Method and device for querying data in non-relational database
US20100223240A1 (en) System and method for composite record keys ordered in a flat key space for a distributed database
JPH11212980A (en) Production of index and retrieval method
CN110837584B (en) Method and system for constructing suffix array in block parallel manner
EP3955256A1 (en) Non-redundant gene clustering method and system, and electronic device
CN109753517A (en) A kind of method, apparatus, computer storage medium and the terminal of information inquiry
CN113407785A (en) Data processing method and system based on distributed storage system
CN113918605A (en) Data query method, device, equipment and computer storage medium
US8438173B2 (en) Indexing and querying data stores using concatenated terms
CN110909266B (en) Deep paging method and device and server
CN111858607A (en) Data processing method and device, electronic equipment and computer readable medium
CN111488371A (en) Data query method and device
CN112231400B (en) Access method, device, equipment and storage medium of distributed database
KR102613523B1 (en) In-memory efficient multistep search
CN109697234B (en) Multi-attribute information query method, device, server and medium for entity
CN109542912B (en) Interval data storage method, device, server and storage medium
CN111339094A (en) Method, system, storage medium and electronic device for quick retrieval
CN111666278A (en) Data storage method, data retrieval method, electronic device and storage medium
US10235432B1 (en) Document retrieval using multiple sort orders
CN115328950A (en) Secondary index-based hbase query method, terminal device and storage medium
CN105468603A (en) Data selection method and apparatus
CN112765938B (en) Method for constructing suffix array, terminal equipment and computer readable storage medium
CN113434508B (en) Method and apparatus for storing information

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626