CN106815368A - A kind of information retrieval method and device - Google Patents
A kind of information retrieval method and device Download PDFInfo
- Publication number
- CN106815368A CN106815368A CN201710059903.0A CN201710059903A CN106815368A CN 106815368 A CN106815368 A CN 106815368A CN 201710059903 A CN201710059903 A CN 201710059903A CN 106815368 A CN106815368 A CN 106815368A
- Authority
- CN
- China
- Prior art keywords
- search terms
- information
- retrieval
- index
- described information
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9032—Query formulation
Abstract
The embodiment of the present application provides a kind of information retrieval method and device, including:Receive information retrieval request, described information retrieval request carries at least one search terms;Determine final search terms according at least one search terms, the final search terms are the search terms with preset attribute name, one unique attribute-name of a search terms correspondence;It is the key assignments in the index entry of the final search terms to search major key in the index, and the key assignments includes at least one message identification;Determine to identify unique corresponding information with each described information respectively, and information retrieval result is obtained according to identified information.Relative to prior art when information retrieval is realized for the mode of complete traversal information, the embodiment of the present application is when the index set up based on the corresponding message identification of information realizes information retrieval, information retrieval result corresponding with information retrieval requests can be quickly found, information retrieval speed is lifted.
Description
Technical field
The present invention relates to technical field of information retrieval, and in particular to a kind of information retrieval method and device.
Background technology
With the development of science and technology, the especially increase of information content, information retrieval technique is increasingly valued by the people.Well
Information retrieval technique, can be easy to fast, accurately from bulk information determine information retrieval result, in order to user apply.
The information retrieval mode of prior art is mainly realized to information retrieval result by way of complete traversal information
It is determined that, retrieval rate is slow.Especially in the case where the information content for treating to travel through completely is huge, retrieval rate can be had a strong impact on, entered
And influence Consumer's Experience.
It can be seen that, how a kind of information retrieval method is provided, it is problem demanding prompt solution to lift information retrieval speed.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of information retrieval method and device, to realize the base of information retrieval
On plinth, information retrieval speed is lifted.
To achieve the above object, the embodiment of the present invention provides following technical scheme:
A kind of information retrieval method, including:
Receive information retrieval request, described information retrieval request carries at least one search terms;
Determine final search terms according at least one search terms, the final search terms are with preset attribute name
Search terms, search terms one unique attribute-name of correspondence;
It is the key assignments in the index entry of the final search terms to search major key in the index, and the key assignments includes at least one
Message identification;
Determine to identify unique corresponding information with each described information respectively, and information inspection is obtained according to identified information
Hitch is really.
A kind of information indexing device, including:
Information retrieval requests receive unit, for receive information retrieval request, described information retrieval request carry to
Few search terms;
Final search terms determining unit, it is described final for determining final search terms according at least one search terms
Search terms are the search terms with preset attribute name, search terms one unique attribute-name of correspondence;
Key assignments searching unit, for searching the key assignments in the index entry that major key is the final search terms, institute in the index
Stating key assignments includes at least one message identification;
Information retrieval result determining unit, for determining to identify unique corresponding information with each described information respectively, and
Information retrieval result is obtained according to identified information.
The embodiment of the present application provides a kind of information retrieval method and device, including:Receive information retrieval request, described information
Retrieval request carries at least one search terms;Determine final search terms, the final inspection according at least one search terms
Suo Xiangwei has the search terms of preset attribute name, one unique attribute-name of a search terms correspondence;Search in the index
Major key is the key assignments in the index entry of the final search terms, and the key assignments includes at least one message identification;Respectively determine with
The unique corresponding information of each described information mark, and information retrieval result is obtained according to identified information.Relative to existing
When information retrieval is realized for the mode of complete traversal information, the embodiment of the present application is based on the corresponding information mark of information for technology
When the index for knowing foundation realizes information retrieval, information retrieval result corresponding with information retrieval requests can be quickly found, be lifted
Information retrieval speed.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Inventive embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
A kind of information retrieval method flow chart that Fig. 1 is provided for the embodiment of the present application;
A kind of method for determining final search terms according at least one search terms that Fig. 2 is provided for the embodiment of the present application
Flow chart;
A kind of index generation method flow chart that Fig. 3 is provided for the embodiment of the present application;
A kind of information bind request process flow figure that Fig. 4 is provided for the embodiment of the present application;
A kind of structural representation of information indexing device that Fig. 5 is provided for the embodiment of the present application;
The detailed construction schematic diagram of a kind of final search terms determining unit that Fig. 6 is provided for the embodiment of the present application;
A kind of detailed construction schematic diagram of preset attribute name determining unit that Fig. 7 is provided for the embodiment of the present application;
A kind of detailed construction schematic diagram of index generation unit that Fig. 8 is provided for the embodiment of the present application;
A kind of detailed construction schematic diagram of information bind request processing unit that Fig. 9 is provided for the embodiment of the present application;
A kind of hardware block diagram of information indexing device that Figure 10 is provided for the embodiment of the present application.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
Embodiment:
A kind of information retrieval method flow chart that Fig. 1 is provided for the embodiment of the present application.
As shown in figure 1, the method includes:
S101, receive information retrieval request, described information retrieval request carry at least one search terms;
In the embodiment of the present application, it is preferred that terminal can receive the operation of user, information retrieval requests are generated, and by institute
State information retrieval requests and be sent to server, a kind of information retrieval side of the embodiment of the present application offer is provided so as to the server
Method.That is, a kind of information retrieval method that the embodiment of the present application is provided is applied to server.
Optionally, the server set group realization that the function of server can be made up of multiple servers, also can be by monomer
Server is realized.
Optionally, at least one search terms are carried in the information retrieval requests that server is received.
In the embodiment of the present application, it is preferred that if user needs to be retrieved from 5 articles of red, the article of 3 bluenesss
When going out 2 blue articles, user may be input into " 2 " and in terminal in the position of instruction quantity in the displaying interface of terminal
Position input " blueness " the two conditions of color are indicated in displaying interface.At this moment, the search terms for being carried in information retrieval requests
It it is 2, a search terms instruction quantity is " 2 ", and it is " blueness " that a search terms indicate color.
In the embodiment of the present application, it is preferred that search terms one unique attribute-name of correspondence.It is same " to be believed with above-mentioned
The search terms carried in breath retrieval request are 2, and a search terms instruction quantity is " 2 ", and a search terms instruction color is
As a example by " blueness ", instruction quantity is the search terms entitled quantity of corresponding attribute of " 2 ", and it is the search terms of " blueness " to indicate color
The corresponding entitled color of attribute.
It is only above the preferred embodiment of the embodiment of the present application, inventor can arbitrarily set search terms according to the demand of oneself
Particular content, do not limit herein.
S102, determine final search terms according at least one search terms;
Optionally, the final search terms are the search terms with preset attribute name, a search terms correspondence one
Unique attribute-name.
Optionally, based on search terms one unique attribute-name of correspondence, carried according to described information retrieval request
The final search terms that at least one search terms determine are the search terms with preset attribute name.
In embodiment is applied for, it is preferred that on the basis of search terms one unique attribute-name of correspondence, it is described most
Whole search terms are that the search terms with preset attribute name include:The corresponding attribute-name of the final search terms and preset attribute famous prime minister
Together.Also just say, on the basis of search terms one unique attribute-name of correspondence, the final search terms include at least one
Individual search terms, the corresponding each attribute-name of at least one search terms that the final search terms include is identical with preset attribute name.
It should be noted that:The number of the preset attribute name in the embodiment of the present application is not limited, in the embodiment of the present application
Preset attribute name include at least one default attribute-name.Inventor can arbitrarily set preset attribute name according to the demand of oneself
Particular content, do not limit herein.
S103, in the index lookup major key are the key assignments in the index entry of the final search terms, and the key assignments is included extremely
A few message identification;
Optionally, index includes at least one index entry, and the index entry includes major key and key assignments, and the key assignments is included extremely
A few message identification.
In the embodiment of the present application, it is preferred that it is determined that after final search terms, can search in the index major key for it is described most
The index entry of whole search terms, and the key assignments in the index entry for finding is obtained, accessed key assignments includes at least one letter
Breath mark.
S104, respectively determination and the unique corresponding information of each described information mark, and obtained according to identified information
Information retrieval result.
In the embodiment of the present application, at least one information is previously stored with, the unique letter of each described information correspondence one
Breath mark.Specifically, storage that can be by data storage cell realization at least one information, and then it is described by inquiry
The mode of data storage cell, realizes step S104.
It is only above the preferred embodiment of the embodiment of the present application, inventor can be according to the demand of oneself arbitrarily setting extremely
A few storage location for information, does not limit herein.
Optionally, for each message identification in the key assignments that above-mentioned steps S103 is found, it is determined that with it is described
The unique corresponding information of message identification, and then information inspection can be obtained according to identified all of information corresponding with message identification
Hitch is really.
In the embodiment of the present application, it is preferred that the mode of information retrieval result is obtained according to identified information, including:
Identified information is screened according to default screening rule, the result after screening is defined as information retrieval result.
It should be noted that:About the particular content of screening rule, inventor can arbitrarily be set according to the demand of oneself,
This is not limited.
Further, a kind of information retrieval method that the embodiment of the present application is provided, is obtaining corresponding with information retrieval requests
Information retrieval result after, can to send described information retrieval request terminal return described information retrieval result, so as to described
Terminal-pair described information retrieval result is shown.
Optionally, the mode that terminal is shown at displaying interface to described information retrieval result, inventor can be according to certainly
Oneself demand is arbitrarily set, and does not limit herein.
The embodiment of the present application provides a kind of information retrieval method, including:Receive information retrieval request, described information retrieval please
Ask and carry at least one search terms;Determine final search terms according at least one search terms, the final search terms are
Search terms with preset attribute name, one unique attribute-name of a search terms correspondence;Searching major key in the index is
Key assignments in the index entry of the final search terms, the key assignments includes at least one message identification;Determine and each institute respectively
The unique corresponding information of message identification is stated, and information retrieval result is obtained according to identified information.Exist relative to prior art
Realize during information retrieval for the mode of complete traversal information, the embodiment of the present application is set up based on the corresponding message identification of information
Index when realizing information retrieval, can quickly find information retrieval result corresponding with information retrieval requests, lifting information inspection
Suo Sudu.
In order to be more comprehensively illustrated to a kind of information retrieval method that the embodiment of the present application is provided, now to the application
" determining final search terms according at least one search terms " process in a kind of information retrieval method that embodiment is provided is entered
Row is discussed in detail, and specifically refers to Fig. 2.
As shown in Fig. 2 the method includes:
S201, determine preset attribute name;
Optionally, preset attribute name includes at least one default attribute-name.
In the embodiment of the present application, it is preferred that it is described determination preset attribute name, including:Determine described information retrieval request
Retrieval classification;It is determined that preset attribute name corresponding with the retrieval classification, the corresponding preset attribute name of different retrieval classifications
It is different.
Optionally, preset attribute name corresponding with every kind of retrieval classification respectively is provided with, different retrieval classifications is corresponding
Preset attribute name is different.By determining retrieval classification, just directly can determine from each preset attribute name and the retrieval classification pair
The preset attribute name answered.For example, the corresponding preset attribute name A2 of retrieval classification A1 are provided with, and it is corresponding with retrieval classification B1
Preset attribute name B2;When it is determined that retrieval classification is A1, determine that preset attribute name A2 is default category corresponding with retrieval classification A1
Property name;When it is determined that retrieval classification is B1, determine that preset attribute name B2 is preset attribute name corresponding with retrieval classification B1.
In the embodiment of the present application, it is preferred that determine that the retrieval class of described information retrieval request includes obtaining otherwise
The retrieval classification logotype that described information retrieval request is carried, determines that described information retrieval please according to acquired retrieval classification logotype
The retrieval classification asked.
It is only above the preferred embodiment of the embodiment of the present application, it is pre- that inventor can arbitrarily set determination according to the demand of oneself
If the concrete mode of attribute-name, does not limit herein.
S202, the corresponding attribute-name of at least one search terms for carrying described information retrieval request are default with identified
Attribute-name is matched, and the objective attribute target attribute name being not included in described information retrieval request is determined from preset attribute name;
Optionally, it is different between the corresponding attribute-name of each search terms that described information retrieval request is carried.That is, believe
The corresponding attribute-name of each search terms that breath retrieval request is carried is corresponding with other search terms that the information retrieval requests are carried
Attribute-name it is different.
In the embodiment of the present application, it is preferred that determine the corresponding attribute-name of each search terms that information retrieval requests are carried,
Identified all properties name is matched with preset attribute name, described information is not included in the determination from preset attribute name
Attribute-name (being objective attribute target attribute name by the Property Name) in retrieval request.For example, all properties name includes category determined by
Property name A, attribute-name B, attribute-name C, preset attribute name include attribute-name A, attribute-name B, attribute-name C, attribute-name D, now determine
Attribute-name D is the attribute-name being not included in described information retrieval request determined from preset attribute name.
Further, the corresponding attribute-name of each search terms that information retrieval requests are carried is determined, if will be identified
All properties name with preset attribute name matched, determine preset attribute name in not presence be not included in described information retrieval request
In attribute-name, then directly by described information retrieval request carry at least one search terms be defined as final search terms.For example,
When identified all properties name includes attribute-name A, attribute-name B, attribute-name C, preset attribute name includes attribute-name A, attribute-name
B, attribute-name C, now determine the attribute-name being not included in described information retrieval request in preset attribute name.
S203, be respectively determined by each objective attribute target attribute name corresponding property value is set, obtain respectively with described in each
The corresponding search terms of objective attribute target attribute name;
Optionally, it is that the objective attribute target attribute name sets corresponding property value for identified each objective attribute target attribute name, obtains
To search terms corresponding with objective attribute target attribute name.Also, in the embodiment of the present application, it is preferred that be objective attribute target attribute name
The mode for setting corresponding property value includes:Default property value corresponding with objective attribute target attribute name is obtained, will be accessed
Property value be objective attribute target attribute name setting as with the objective attribute target attribute corresponding property value of name.
S204, at least one search terms and resulting each search terms that described information retrieval request is carried, are defined as
Final search terms.
Optionally, at least one for being carried in each search terms and the message request resulting in above-mentioned steps S203
Search terms, are defined as final search terms.
By the above-mentioned side that final search terms are determined according at least one search terms provided the embodiment of the present application
Method is further described so that the information retrieval that the embodiment of the present application is provided becomes apparent from, completely, is easy to those skilled in the art
Understand.
In order to be more comprehensively illustrated to a kind of information retrieval method that the embodiment of the present application is provided, now to the application
At least one search terms that information retrieval requests in embodiment are carried are described in detail.
In the embodiment of the present application, it is preferred that the low search terms of retrieval rank are subordinated to retrieval rank search terms high.
For example, search terms A indicates equipment class, search terms B indicates reinforcing equipment class, and search terms C indicates common equipment class, this
When search terms B retrieval rank of the retrieval rank less than search terms A (indicate the search terms B of reinforcing equipment class to be subordinated to instruction dress
The search terms A of standby class), the retrieval rank of the retrieval rank less than search terms A of search terms C (indicates the search terms C of common equipment class
It is subordinated to the search terms A for indicating equipment class).
At least one search terms that described information retrieval request is carried include:First search terms;Second search terms group, it is described
Second search terms group includes at least one second search terms, the retrieval level of each the second search terms in the second search terms group
The retrieval rank of first search terms is not below;The search terms rank of described at least one second search terms is identical, or,
It is different between the search terms rank of described at least one second search terms.
In the embodiment of the present application, it is preferred that at least one search terms that information retrieval requests are carried include the first retrieval
Item and the second search terms group, the second search terms group include at least one second search terms, first search terms and institute
State at least one search terms that at least one second search terms are carried for described information retrieval request.
Optionally, the retrieval rank of each the second search terms in the second search terms group is below first inspection
The retrieval rank of rope.
Optionally, the search terms rank of described at least one second search terms is identical, or, described at least one second inspections
It is different between the search terms rank of rope.In order to make it easy to understand, existing to being illustrated herein.
For mutually different situation between the search terms rank of described at least one second search terms.For example, the first inspection
Rope instruction stage property class A1, the second search terms group include two the second search terms, and second search terms are indicated in stage property class A1
Subclass (equipment reinforcing class) A2, second search terms subclass (embedding gem class) A3 for indicating in equipment reinforcing class.Now,
It is believed that second search terms and the second of instruction embedding gem class A3 of the instruction equipment reinforcing class A2 that the second search terms group includes
The retrieval rank of search terms is different, also, embedding gem class A3 is subordinated to equipment reinforcing class A2 and (that is, indicates embedding gem class A3
The second search terms retrieval rank of the retrieval rank less than the second search terms for indicating equipment reinforcing class A2), the second search terms
The retrieval rank of the retrieval rank less than the first search terms A1 of the second search terms for indicating embedding gem class A3 that group includes, and
Indicate the retrieval rank of the retrieval rank less than the first search terms A1 of second search terms of equipment reinforcing class A2.
For the search terms rank identical situation of described at least one second search terms.For example, the first search terms are indicated
Spiritual jewel B1, the second search terms include two the second search terms, and second search terms indicate product spirit jewel B2, one
Second search terms indicate red spirit jewel B3.Now, it is believed that the product of the instruction one spirit jewel B2 that the second search terms group includes
The second search terms it is identical with the retrieval rank of the second search terms for indicating red spirit jewel B3.Also, indicate product spirit
The retrieval rank of first search terms of the retrieval rank of second search terms of jewel B2 less than indicative spirit jewel B1, indicates red
The retrieval rank of first search terms of the retrieval rank of second search terms of spiritual jewel B3 less than indicative spirit jewel B1.
It is only above the preferred embodiment of the embodiment of the present application, inventor can arbitrarily set first according to the demand of oneself and examine
The particular content of rope and the second search terms group, does not limit herein.
By the further of above-mentioned at least one search terms carried to the information retrieval requests that the embodiment of the present application is provided
Introduce so that the information retrieval that the embodiment of the present application is provided becomes apparent from, completely, be easy to skilled artisan understands that.
In order to be more comprehensively illustrated to a kind of information retrieval method that the embodiment of the present application is provided, now to the application
" index generation " process in a kind of information retrieval method that embodiment is provided describes in detail, specifically refers to Fig. 3.
As shown in figure 3, the method includes:
S301, judge with the presence or absence of the information for not being created index in database, if exist in the database not by
The information of index is created, step S302 is performed;
Optionally, be stored with least one information in the database, each described information one unique information of correspondence
Mark.
In the embodiment of the present application, it is preferred that be provided with database, be stored with least one letter in the database
Breath, each described information one unique message identification of correspondence.
It should be noted that:The above-mentioned data storage cell being related to can be referring herein to database.By such
Set-up mode can avoid the information that will be stored in above-mentioned involved data storage cell, then store one time to this place
The situation of the database being related to.
It is only above the preferred embodiment of the embodiment of the present application, inventor can arbitrarily set data and deposit according to the demand of oneself
Relation between storage unit and database, does not limit herein.For example, settable data storage cell and database are not same
Object, but, the content stored in data storage cell is identical with the content stored in database.In data storage cell
The content of storage is identical with the content stored in database, including:The information and date storehouse stored in data storage cell
The information of middle storage is identical;And, the information and the corresponding relation and number of message identification being related in data storage cell
It is identical with the corresponding relation of message identification according to the information being related in storehouse).
S302, determination major key corresponding with described information;
In the embodiment of the present application, it is preferred that be previously provided with multiple major keys, each described major key includes at least one master
Key, each prime key item includes the Major key of a major key name and major key name.
In the embodiment of the present application, it is preferred that each major key one major key condition of correspondence for pre-setting, described information is worked as
When meeting the major key condition, it may be determined that the corresponding major key of the major key condition is the corresponding major key of described information.For advance
Each major key for setting, determines whether described information meets the corresponding major key condition of the major key, when it is determined that described information respectively
When meeting the corresponding major key condition of the major key, determine that the major key is the corresponding major key of described information.
Optionally, the corresponding major key condition of one major key for pre-setting of described information satisfaction includes:In described information
Content includes the content that each prime key item in the major key is indicated.For example, a major key for pre-setting includes two prime key items
【One prime key item (prime key item 1) is jewel " spiritual jewel " (Major key), and a prime key item (prime key item 2) is grade "
Product ")】;Jewel is the major key name of prime key item 1, and spiritual jewel is the Major key of prime key item 1;Grade is the major key name of prime key item 2,
One product are the major key name of prime key item 2;If described information is the spiritual jewel of poinsettia color, now it is believed that interior in described information
Included in appearance (in poinsettia color spirit jewel), the content (jewel that each prime key item in the major key of the default setting is indicated
" spiritual jewel " and grade " product "), it is determined that the major key pre-set described in described information satisfaction.That is, set described in advance
The major key put is defined as major key corresponding with described information.
More than be only the embodiment of the present application preferred embodiment, inventor can according to the demand of oneself arbitrarily set determination with
The concrete mode of the corresponding major key of described information, does not limit herein.
Whether there is index entry corresponding with identified major key in S303, the current index of judgement, if in currently indexing
In the absence of index entry corresponding with identified major key, step S304 is performed;If existed and identified master in current index
The corresponding index entry of key, performs step S305;
In the embodiment of the present application, it is preferred that for each master corresponding with described information that above-mentioned steps S302 determines
For key, a S303 is performed both by.For a major key corresponding with described information for determination in above-mentioned steps S302, such as
Do not exist index entry corresponding with identified major key in the current index of fruit, perform step S304;If existed in current index
Index entry corresponding with identified major key, performs step S305.
Optionally, judge to whether there is index entry corresponding with identified major key in current index, including:Judge current
Whether target index entry is included in index, and the major key of the target index entry is identified major key;When in the current index
During including the target index entry, determine there is index entry corresponding with identified major key in the current index;When described
When not including the target index entry in current index, determine in the current index in the absence of corresponding with identified major key
Index entry.
S304, index entry corresponding with identified major key is created in the current index, the corresponding letter of described information
Breath is designated the key assignments of created index entry;
In the embodiment of the present application, it is preferred that index entry includes major key and key assignments, the key assignments includes at least one information
Mark, in the case of not existing index entry corresponding with identified major key in current index, creates in the current index
Index entry corresponding with identified major key is built, the corresponding message identification of described information is the key assignments of created index entry.That is,
Index entry is created in current index, the major key of the index entry for being created is identified major key, and the key assignments for being created is described
The corresponding message identification of information.
S305, the key assignments that the corresponding message identification of described information is added to index entry corresponding with identified major key
In.
In the embodiment of the present application, it is preferred that there is index entry corresponding with identified major key in current index
In the case of, major key and key assignments are included based on index entry, the key assignments includes at least one message identification, and described information is corresponding
Message identification is added in the key assignments of index entry corresponding with identified major key.That is, by the corresponding message identification of described information
As the part in the key assignments of the corresponding index entry of identified major key, it is added in the current index.
By being further described for the above-mentioned index generation method provided the embodiment of the present application so that the embodiment of the present application
The information retrieval of offer becomes apparent from, completely, be easy to skilled artisan understands that.
For a kind of information retrieval method that the embodiment of the present application more clearly annotated is provided, now the application is implemented
Content in example is further described.
Optionally, the information being stored in the database is the consignment letter of carrying in the information transfer request for receiving
Breath.
In the embodiment of the present application, it is preferred that server can receive user and be asked by the information transfer that terminal sends, institute
State the request of information transfer and carry consignor information;After server receives the request of information transfer, the request of described information transfer can be obtained
The consignor information of middle carrying, and the consignor information is stored in the database, for being bound with other users.Example
Such as, when the user that server is received asks to carry consignor information A by the information transfer that terminal sends, by consignment letter
Breath A is stored in the database, and sets up corresponding index entry in the index;In order to receive another user's hair when server
The information bind request sent, during the message identification correspondence consignor information A that described information bind request is carried, by the consignor information
A is bound with the account of another user, realizes purchase of another user to consignor information A.Accordingly, when described
After consignor information A is bound with the account of another user, need to perform and " delete storing with the letter in the database
Described information mark in the breath corresponding information of mark, and the key assignments of index entry positioned at the index " process, to ensure number
According in storehouse and index in the absence of the consignor information A that has been sold by.Relevant receive information is bound and carries out the mistake of respective handling
Fig. 4 has carried out corresponding detailed description to journey below, and the process is a kind of information retrieval method that the embodiment of the present application is provided
Further expand, and in fig. 4 using this process as in a kind of information retrieval method provided in the embodiment of the present application further
" treatment of the information bind request " process of increase.
Optionally, a consignor information is carried in the request of described information transfer, a consignor information is used as being stored in service
An information in device.When user has the information for needing to transfer the possession of, information transfer will be sent by terminal to server
Request, described information transfer request carries a consignor information.
For example, in MMORPG (many online RPGs of people), if a user need to produce (sell) two it is third
Spiritual jewel, will send transferable information by terminal to server, and a consignor information is carried in the transferable information, described
Consignor information indicates two third spiritual jewels.
More than be only the embodiment of the present application preferred embodiment, it is determined that a consignor information is used as being stored in server
An information on the basis of, inventor can be according to the consignor information carried in the request of any configuration information transfer of the demand of oneself
Quantity, do not limit herein.
It is only above the preferred embodiment of the embodiment of the present application, inventor can arbitrarily set according to the demand of oneself and be stored in
The specific acquisition modes of the information in the server, do not limit herein.
In a kind of information retrieval method that above-mentioned the embodiment of the present application is provided, can also further include that information binding please
Processing method is sought, Fig. 4 is specifically referred to.
As shown in figure 4, the method includes:
S401, receive information bind request, message identification is carried in described information bind request;
Optionally, server can receive the information bind request that user is sent by terminal, in described information bind request
Carry message identification.
In the embodiment of the present application, it is preferred that inventor can be according in any configuration information bind request of the demand of oneself
The quantity of the message identification of carrying, does not limit herein.
In the embodiment of the present application, it is preferred that user can by the implication that terminal to server sends information bind request
Purchase request corresponding with information bind request is sent by terminal to server to be interpreted as user.
It is only above the preferred embodiment of the embodiment of the present application, inventor can arbitrarily set user and lead to according to the demand of oneself
The implication that terminal to server sends information bind request is crossed, is not limited herein.
If S402, described information bind request ask successfully, delete store in the database with described information mark
Know corresponding information, and the described information mark in the key assignments of index entry positioned at the index.
In the embodiment of the present application, it is preferred that information bind request asks successfully configured information bind request to process successfully.
For example, the information (article etc.) that the message identification that user will successfully carry in information bind request is indicated is bound with its account.
Optionally, information bind request is asked successfully, the information that the information bind request stored in database of descriptions is carried
Identify corresponding information to be not required to be transferred the possession of, now, store in the database corresponding with described information mark need to be deleted
Information;Meanwhile, also need to update index, delete the described information mark in the key assignments of the index entry of the index.To protect
In the absence of the consignor information A being transferred (be sold by) in card database and index.
By being further described for the above-mentioned information retrieval method provided the embodiment of the present application so that the embodiment of the present application
The information retrieval of offer becomes apparent from, completely, be easy to skilled artisan understands that.
Method is described in detail in the invention described above disclosed embodiment, can be taken various forms for the method for the present invention
Device realize, therefore the invention also discloses a kind of device, specific embodiment is given below and is described in detail.
A kind of structural representation of information indexing device that Fig. 5 is provided for the embodiment of the present application.
As shown in figure 5, the device includes:
Information retrieval requests receive unit 51, and for receive information retrieval request, described information retrieval request is carried
At least one search terms;
Final search terms determining unit 52, for determining final search terms according at least one search terms, it is described most
Whole search terms are the search terms with preset attribute name, search terms one unique attribute-name of correspondence;
Key assignments searching unit 53, for searching the key assignments in the index entry that major key is the final search terms in the index,
The key assignments includes at least one message identification;
Information retrieval result determining unit 54, for determining to identify unique corresponding information with each described information respectively,
And information retrieval result is obtained according to identified information.
In the embodiment of the present application, it is preferred that the search terms include the attribute of attribute-name corresponding with the search terms
Value.
A kind of alternative construction of final search terms determining unit 52 provided in an embodiment of the present invention refers to Fig. 6.
As shown in fig. 6, final search terms determining unit 52, including:
Preset attribute name determining unit 61, for determining preset attribute name;
Objective attribute target attribute name determining unit 62, at least one search terms for described information retrieval request to be carried are corresponding
Attribute-name is matched with identified preset attribute name, determines to be not included in described information retrieval from preset attribute name
Objective attribute target attribute name in request;
Search terms determining unit 63, corresponding property value is set for being respectively identified each objective attribute target attribute name, is obtained
To search terms corresponding with objective attribute target attribute name each described respectively;
Final search terms determination subelement 64, at least one search terms for carrying described information retrieval request and institute
Each search terms for obtaining, are defined as final search terms.
A kind of alternative construction of preset attribute name determining unit 61 provided in an embodiment of the present invention refers to Fig. 7.
As shown in fig. 7, preset attribute name determining unit 61, including:
First determining unit 71, the retrieval classification for determining described information retrieval request;
Second determining unit 72, for determining preset attribute name corresponding with the retrieval classification, different retrieval classifications
Corresponding preset attribute name is different.
In the embodiment of the present application, it is preferred that the low search terms of retrieval rank are subordinated to retrieval rank search terms high, institute
At least one search terms for stating information retrieval requests carrying include:First search terms;Second search terms group, second search terms
Group includes at least one second search terms, and the retrieval rank of each the second search terms in the second search terms group is below institute
State the retrieval rank of the first search terms;The search terms rank of described at least one second search terms is identical, or, described at least one
It is different between the search terms rank of individual second search terms.
Further, information indexing device as shown in Figure 5, also including index generation unit.
A kind of alternative construction of index generation unit provided in an embodiment of the present invention refers to Fig. 8.
As shown in figure 8, index generation unit, including:
Judging unit 81, for judging to whether there is the information for not being created index in database, deposits in the database
At least one information is contained, each described information one unique message identification of correspondence;
Major key determining unit 82, if for there is the information of index of not being created in the database, it is determined that with it is described
The corresponding major key of information;
Creating unit 83, if for not existing index entry corresponding with identified major key in current index, described
Index entry corresponding with identified major key is created in current index, the corresponding message identification of described information is created index
The key assignments of item;
Adding device 84, if for there is index entry corresponding with identified major key in current index, by the letter
Corresponding message identification is ceased to be added in the key assignments of index entry corresponding with identified major key.
In the embodiment of the present application, it is preferred that the information being stored in the database is that the information transfer for receiving please
Seek the consignor information of middle carrying.
Further, information indexing device as shown in Figure 5, also including information bind request processing unit.
A kind of alternative construction of information bind request processing unit provided in an embodiment of the present invention refers to Fig. 9.
As shown in figure 9, information bind request processing unit, including:
Information bind request receiving unit 91, for receive information bind request, carries letter in described information bind request
Breath mark;
Information bind request processes subelement 92, if asking successfully, to delete the number for described information bind request
According to being stored in storehouse and the letter in the described information corresponding information of mark, and the key assignments of index entry positioned at the index
Breath mark.
Optionally, information indexing device can be hardware device, and above-described module, unit can be to be arranged at information
Functional module in retrieval device.Figure 10 shows the hardware block diagram of information indexing device, reference picture 10, information retrieval dress
Putting to include:Processor 101, communication interface 102, memory 103 and communication bus 104;Wherein processor 101, communication connects
Mouth 102, memory 103 completes mutual communication by communication bus 104;Optionally, communication interface 102 can be communication mould
The interface of the interface of block, such as gsm module;
Processor 101, for configuration processor;Memory 103, for depositing program;Program can include program code, journey
Sequence code includes computer-managed instruction;
Processor 101 is probably a central processor CPU, or specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement of the invention real
Apply one or more integrated circuits of example;Memory 103 may include high-speed RAM memory, it is also possible to also including non-volatile
Memory (non-volatile memory), for example, at least one magnetic disk storage.
Wherein, program can be specifically for:
Receive information retrieval request, described information retrieval request carries at least one search terms;
Determine final search terms according at least one search terms, the final search terms are with preset attribute name
Search terms, search terms one unique attribute-name of correspondence;
It is the key assignments in the index entry of the final search terms to search major key in the index, and the key assignments includes at least one
Message identification;
Determine to identify unique corresponding information with each described information respectively, and information inspection is obtained according to identified information
Hitch is really.
The embodiment of the present application provides a kind of information indexing device, including:Receive information retrieval request, described information retrieval please
Ask and carry at least one search terms;Determine final search terms according at least one search terms, the final search terms are
Search terms with preset attribute name, one unique attribute-name of a search terms correspondence;Searching major key in the index is
Key assignments in the index entry of the final search terms, the key assignments includes at least one message identification;Determine and each institute respectively
The unique corresponding information of message identification is stated, and information retrieval result is obtained according to identified information.Exist relative to prior art
Realize during information retrieval for the mode of complete traversal information, the embodiment of the present application is set up based on the corresponding message identification of information
Index when realizing information retrieval, can quickly find information retrieval result corresponding with information retrieval requests, lifting information inspection
Suo Sudu.
To sum up:
The embodiment of the present application provides a kind of information retrieval method and device, including:Receive information retrieval request, described information
Retrieval request carries at least one search terms;Determine final search terms, the final inspection according at least one search terms
Suo Xiangwei has the search terms of preset attribute name, one unique attribute-name of a search terms correspondence;Search in the index
Major key is the key assignments in the index entry of the final search terms, and the key assignments includes at least one message identification;Respectively determine with
The unique corresponding information of each described information mark, and information retrieval result is obtained according to identified information.Relative to existing
When information retrieval is realized for the mode of complete traversal information, the embodiment of the present application is based on the corresponding information mark of information for technology
When the index for knowing foundation realizes information retrieval, information retrieval result corresponding with information retrieval requests can be quickly found, be lifted
Information retrieval speed.
Each embodiment is described by the way of progressive in this specification, and what each embodiment was stressed is and other
The difference of embodiment, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment
For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part
It is bright.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description
And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software, generally describes the composition and step of each example according to function in the above description.These
Function is performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Specialty
Technical staff can realize described function to each specific application using distinct methods, but this realization should not
Think beyond the scope of this invention.
The step of method or algorithm for being described with reference to the embodiments described herein, directly can be held with hardware, processor
Capable software module, or the two combination is implemented.Software module can be placed in random access memory (RAM), internal memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In field in known any other form of storage medium.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or uses the present invention.
Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The scope most wide for causing.
Claims (14)
1. a kind of information retrieval method, it is characterised in that including:
Receive information retrieval request, described information retrieval request carries at least one search terms;
Determine final search terms according at least one search terms, the final search terms are the retrieval with preset attribute name
, search terms one unique attribute-name of correspondence;
It is the key assignments in the index entry of the final search terms to search major key in the index, and the key assignments includes at least one information
Mark;
Determine to identify unique corresponding information with each described information respectively, and information retrieval knot is obtained according to identified information
Really.
2. method according to claim 1, it is characterised in that the search terms include attribute corresponding with the search terms
The property value of name, it is described to determine final search terms according at least one search terms, including:
Determine preset attribute name;
The corresponding attribute-name of at least one search terms that described information retrieval request is carried is entered with identified preset attribute name
Row matching, determines the objective attribute target attribute name being not included in described information retrieval request from preset attribute name;
Respectively identified each objective attribute target attribute name sets corresponding property value, obtain respectively with objective attribute target attribute name each described
Corresponding search terms;
At least one search terms and resulting each search terms that described information retrieval request is carried, are defined as final retrieval
.
3. method according to claim 2, it is characterised in that the determination preset attribute name, including:
Determine the retrieval classification of described information retrieval request;
It is determined that preset attribute name corresponding with the retrieval classification, the corresponding preset attribute name difference of different retrieval classifications.
4. method according to claim 3, it is characterised in that it is high that the low search terms of retrieval rank are subordinated to retrieval rank
Search terms, at least one search terms that described information retrieval request is carried include:
First search terms;
Second search terms group, the second search terms group includes at least one second search terms, in the second search terms group
The retrieval rank of each the second search terms is below the retrieval rank of first search terms;
The search terms rank of described at least one second search terms is identical, or, the retrieval of described at least one second search terms
It is different between item rank.
5. method according to claim 4, it is characterised in that the generating process of the index includes:
Judge to whether there is the information for not being created index in database, be stored with least one information in the database, often
One unique message identification of individual described information correspondence;
If there is the information for not being created index in the database, it is determined that major key corresponding with described information;
If not existing index entry corresponding with identified major key in current index, created in the current index with institute really
The corresponding index entry of fixed major key, the corresponding message identification of described information is the key assignments of created index entry;
If there is index entry corresponding with identified major key in current index, by the corresponding message identification addition of described information
To in the key assignments of index entry corresponding with identified major key.
6. method according to claim 5, it is characterised in that the information being stored in the database is the letter for receiving
Breath transfers the possession of the consignor information carried in request.
7. method according to claim 6, it is characterised in that also include:
Receive information bind request, message identification is carried in described information bind request;
If described information bind request ask successfully, delete store in the database with the described information corresponding letter of mark
Described information mark in breath, and the key assignments of index entry positioned at the index.
8. a kind of information indexing device, it is characterised in that including:
Information retrieval requests receive unit, and for receive information retrieval request, described information retrieval request carries at least one
Individual search terms;
Final search terms determining unit, for determining final search terms, the final retrieval according at least one search terms
Item is the search terms with preset attribute name, search terms one unique attribute-name of correspondence;
Key assignments searching unit, for searching the key assignments in the index entry that major key is the final search terms, the key in the index
Value includes at least one message identification;
Information retrieval result determining unit, for determine respectively with each described information unique corresponding information of mark, and according to
Identified information obtains information retrieval result.
9. device according to claim 8, it is characterised in that the search terms include attribute corresponding with the search terms
The property value of name, the final search terms determining unit, including:
Preset attribute name determining unit, for determining preset attribute name;
Objective attribute target attribute name determining unit, for the corresponding attribute-name of at least one search terms for carrying described information retrieval request
Matched with identified preset attribute name, determine to be not included in described information retrieval request from preset attribute name
Objective attribute target attribute name;
Search terms determining unit, corresponding property value is set for being respectively identified each objective attribute target attribute name, is distinguished
Search terms corresponding with objective attribute target attribute name each described;
Final search terms determination subelement, at least one search terms that carry described information retrieval request and resulting
Each search terms, are defined as final search terms.
10. device according to claim 9, it is characterised in that the preset attribute name determining unit, including:
First determining unit, the retrieval classification for determining described information retrieval request;
Second determining unit, for determining preset attribute name corresponding with the retrieval classification, different retrieval classifications is corresponding
Preset attribute name is different.
11. devices according to claim 10, it is characterised in that it is high that the low search terms of retrieval rank are subordinated to retrieval rank
Search terms, described information retrieval request carry at least one search terms include:
First search terms;
Second search terms group, the second search terms group includes at least one second search terms, in the second search terms group
The retrieval rank of each the second search terms is below the retrieval rank of first search terms;
The search terms rank of described at least one second search terms is identical, or, the retrieval of described at least one second search terms
It is different between item rank.
12. devices according to claim 11, it is characterised in that also including index generation unit,
The index generation unit, including:
Judging unit, for judging in database with the presence or absence of the information for not being created index, be stored with the database to
Few information, each described information one unique message identification of correspondence;
Major key determining unit, if for there is the information of index of not being created in the database, it is determined that with described information pair
The major key answered;
Creating unit, if for not existing index entry corresponding with identified major key in current index, in the current cable
Draw middle establishment index entry corresponding with identified major key, the corresponding message identification of described information is the key of created index entry
Value;
Adding device, if for there is index entry corresponding with identified major key in current index, by described information correspondence
Message identification be added in the key assignments of index entry corresponding with identified major key.
13. devices according to claim 12, it is characterised in that the information being stored in the database is received
The consignor information carried in the request of information transfer.
14. devices according to claim 13, it is characterised in that also including information bind request processing unit,
Described information bind request processing unit, including:
Information bind request receiving unit, for receive information bind request, message identification is carried in described information bind request;
Information bind request processes subelement, if asked successfully for described information bind request, in the deletion database
Storage with the described information mark in the described information corresponding information of mark, and the key assignments of index entry positioned at the index
Know.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710059903.0A CN106815368A (en) | 2017-01-24 | 2017-01-24 | A kind of information retrieval method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710059903.0A CN106815368A (en) | 2017-01-24 | 2017-01-24 | A kind of information retrieval method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106815368A true CN106815368A (en) | 2017-06-09 |
Family
ID=59112441
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710059903.0A Pending CN106815368A (en) | 2017-01-24 | 2017-01-24 | A kind of information retrieval method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106815368A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107870985A (en) * | 2017-10-12 | 2018-04-03 | 深圳市金立通信设备有限公司 | A kind of method, server and computer-readable recording medium for retrieving information |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104063384A (en) * | 2013-03-19 | 2014-09-24 | 上海软智信息科技有限公司 | Data retrieval method and device |
US20160224601A1 (en) * | 2011-08-30 | 2016-08-04 | Open Text S.A. | System and method of search indexes using key-value attributes to searchable metadata |
CN106294652A (en) * | 2016-08-03 | 2017-01-04 | 成都四象联创科技有限公司 | Web page information search method |
CN106294595A (en) * | 2016-07-29 | 2017-01-04 | 海尔优家智能科技(北京)有限公司 | A kind of document storage, search method and device |
-
2017
- 2017-01-24 CN CN201710059903.0A patent/CN106815368A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160224601A1 (en) * | 2011-08-30 | 2016-08-04 | Open Text S.A. | System and method of search indexes using key-value attributes to searchable metadata |
CN104063384A (en) * | 2013-03-19 | 2014-09-24 | 上海软智信息科技有限公司 | Data retrieval method and device |
CN106294595A (en) * | 2016-07-29 | 2017-01-04 | 海尔优家智能科技(北京)有限公司 | A kind of document storage, search method and device |
CN106294652A (en) * | 2016-08-03 | 2017-01-04 | 成都四象联创科技有限公司 | Web page information search method |
Non-Patent Citations (1)
Title |
---|
范青生,余爱国 主编: "《保健食品与食品信息资源检索与利用》", 31 August 2007, 北京:中国医药科技出版社 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107870985A (en) * | 2017-10-12 | 2018-04-03 | 深圳市金立通信设备有限公司 | A kind of method, server and computer-readable recording medium for retrieving information |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107944618B (en) | Point arrangement planning method and device for shared vehicle and electronic equipment | |
CN108492180A (en) | Assets management method and device, electronic equipment | |
CN108182581A (en) | A kind of bookkeeping methods and device of block chain | |
CN107424338A (en) | A kind of control method of express delivery cabinet, apparatus and system | |
CN106339493B (en) | A kind of data processing method and relevant apparatus | |
KR20070012804A (en) | Automatic bartering proposal for content exchange | |
CN104867250B (en) | A kind of processing method and processing device of business handling data | |
CN104036406B (en) | A kind of method and apparatus for improving ordering information security | |
CN108717612A (en) | A kind of allocator and device | |
CN107357790A (en) | A kind of unexpected message detection method, apparatus and system | |
CN108256963A (en) | A kind of method and apparatus for being associated with Quick Response Code and item related information | |
CN111784449A (en) | Data pushing method, data pushing equipment, storage medium and device | |
CN109062936A (en) | A kind of data query method, computer readable storage medium and terminal device | |
CN107018115A (en) | Account treating method and apparatus | |
CN106776785A (en) | A kind of method for writing data and device and data handling system | |
CN109034819A (en) | The report method and device of transaction | |
CN108803970A (en) | Scene matching methods of exhibiting and terminal device | |
CN106815368A (en) | A kind of information retrieval method and device | |
CN106709785B (en) | Display method and device | |
JP6409957B2 (en) | Store information display system, apparatus, method and program | |
CN108197955A (en) | Method, terminal device and the computer readable storage medium of terminal authentication | |
CN107657442A (en) | To the control process method and device of the magnetic annex on article | |
CN109711475A (en) | Identify method, apparatus, selling apparatus and the computer readable storage medium of article | |
CN109784593A (en) | Production capacity equalization processing method and device for multistoried storehouse | |
CN108667647A (en) | A kind of setting method of device parameter, equipment and server |
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 |
Application publication date: 20170609 |
|
RJ01 | Rejection of invention patent application after publication |