CN104978416A - Redis-based intelligent object retrieval method - Google Patents

Redis-based intelligent object retrieval method Download PDF

Info

Publication number
CN104978416A
CN104978416A CN201510362467.5A CN201510362467A CN104978416A CN 104978416 A CN104978416 A CN 104978416A CN 201510362467 A CN201510362467 A CN 201510362467A CN 104978416 A CN104978416 A CN 104978416A
Authority
CN
China
Prior art keywords
searcher
retrieval
time
weights
combination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510362467.5A
Other languages
Chinese (zh)
Other versions
CN104978416B (en
Inventor
单纯
薛静锋
朱麟
马锐
于泽群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN201510362467.5A priority Critical patent/CN104978416B/en
Publication of CN104978416A publication Critical patent/CN104978416A/en
Application granted granted Critical
Publication of CN104978416B publication Critical patent/CN104978416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

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

Abstract

The invention discloses a Redis based intelligent object retrieval method. An object is analyzed; all retrieval persons retrieving the object within a time period are viewed; and time sequence sorting is carried out according to assigned weight or a set arrangement method by utilizing Sort-Set and List data structures of a Redis system through analyzing the retrieval persons to obtain recommended objects for the retrieval persons, so that relatively good targeted property is achieved. The process is capable of automatically screening out objects meeting the conditions without manual input.

Description

A kind of object intelligent search method based on Redis
Technical field
The present invention relates to e-commerce field, be specifically related to a kind of object intelligent search method based on Redis.
Background technology
Along with developing rapidly of computer technology, the level of informatization of human society and growth in the living standard, the degree of dependence of entire society to electronic information platform is also more and more higher.Such as to the retrieval of books, the retrieval to article or the retrieval etc. to product.
Under normal circumstances, when retrieving information, its searcher can only search relative searching object according to a certain feature of searching object, and then result in recall precision reduction, and the result of retrieval is not extensive yet.
The recommendation to object of traditional electronic information platform is usually by the manual typing of operation personnel, and by analyzing the maximum object of the amount of being retrieved, and then commending system is entered in manual typing, finally recommends all searchers again.The result of not carrying out recommending for the demand of different client is like this inaccurate often.
For these reasons, to how, the Search Requirement for searcher self of efficiently and accurately and the recommendation carrying out object more and more come into one's own at present.
Summary of the invention
In view of this, the invention provides a kind of object intelligent search method based on Redis.The Search Requirement of searcher self of efficiently and accurately object can be recommended client.
Based on an object intelligent search method for Redis system, the step realizing the method comprises:
Step one, for a certain object p 0, definition initial recommendation object sum z; The sort-set data structure of Redis system is utilized to build object p 0searcher's set A, recommended set Z and other object sets utilize the queue B that the list data structure of Redis system builds;
Step 2, for described object p 0, gather all searcher of this object in setting-up time section t and retrieval time thereof, if z searcher x zsearching object p 0moment be by the information of searcher stored in the object p built 0in searcher's set A, object p 0definition key key=object p in searcher's set A 0, value value=searching object p 0searcher x z, weights score=searcher x zsearching object p 0moment according to the searching object p of weights score size and searcher 0the priority moment carry out descending sort, composition searcher set A, is designated as wherein, n is searching object p 0total number of persons; Searching object p 0time
Step 3, for m compose initial value be n;
Step 4, from searcher's set A, extract m searcher, extract various combination at every turn, obtain altogether individual Combination nova; By searchers all in each Combination nova to searching object p 0the retrieval moment be added after carry out descending sort, and insert the tail of the queue of queue B successively;
Step 5, queue B once gone out team's operation, that is: get first combination G in queue B, what obtain each searcher's retrieval in setting-up time section T in this combination G removes object p 0other objects in addition; By the information of other objects described stored in other object sets built in, other object sets in, definition key key=searcher x s, value value=searcher x sother objects of retrieval weights score=retrieves this object time according to weights score size and time carry out descending sort, form other object sets:
P x s = { ( P 1 x s , T 1 x s ) , ( P 2 x s , T 2 x s ) , ... , ( P I x s , T I x s ) }
Wherein, I is searcher x sother object sums retrieved in T time; Retrieval time
T 1 x s > T 2 x s > ... > T I x s ;
Step 6, other object sets that each searcher in the combination G taken out in step 5 is retrieved get common factor, judge whether to exist and occur simultaneously, if exist, then perform step 7, otherwise, perform step 8;
Step 7, for each common factor object, the time of this common factor object is retrieved according to each searcher in combination G, obtain the retrieval time the latest of common factor object, and obtain final weights after being added with the searcher quantity m in combination G after converting thereof into timestamp decimal, and by common factor object stored in the recommended set Z built; In recommended set Z, definition key key=object p 0, value value=common factor object; The final weights of weights score=; According to weights size final in recommended set Z, sort; Obtain the existing object sum in recommended set Z, judge whether to be less than recommended sum z; If so, then step 8 is performed, otherwise, perform step 10;
Step 8, to judge in queue B whether be empty, if so, then perform step 9, otherwise, return step 5;
Step 9, make m from subtracting 1, judge whether m is greater than 0, if so, then returns step 4, otherwise, execution step 10;
Step 10, by z object before in recommended set Z, front z the object that namely weights score is the highest exports as the result for retrieval of recommendation.
Beneficial effect:
The present invention is directed to a certain object to analyze, check all searchers retrieving this object in section sometime, by the analysis to these searchers, be used Redis system Sort-Set and List data structure, sequential sequence is carried out according to the aligning method of the weights given or setting, and then the recommended obtained for different searcher, specific aim is stronger.This process is without the need to manual entry, and Automatic sieve selects eligible object.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of object intelligent recommend method of the present invention.
Embodiment
To develop simultaneously embodiment below in conjunction with accompanying drawing, describe the present invention.
The invention provides a kind of object intelligent search method based on Redis system, basic thought of the present invention is: according to a certain object p 0all searchers of section sometime, obtain these searchers other searching object information in this time period, the various combination mode obtained according to permutation and combination, obtain and recommend as recommended relevant common factor; In above process, the present invention also utilizes Redis system Sort-Set and List data structure, carries out sequential sequence, thus can obtain the recommended of validity more sometimes according to the weights given or according to the ordering requirements of setting.
Based on an object intelligent search method for Redis system, the step realizing the method comprises:
Step one, for a certain object p 0, definition initial recommendation object sum z; The sort-set data structure of Redis system is utilized to build object p 0searcher's set A, recommended set Z and other object sets utilize the queue B that the list data structure of Redis system builds;
Step 2, for described object p 0, gather all searcher of this object in setting-up time section t and retrieval time thereof, if z searcher x zsearching object p 0moment be by the information of searcher stored in the object p built 0in searcher's set A, wherein definition key key=object p 0, value value=searching object p 0searcher x z, weights score=searcher x zsearching object p 0moment according to the searching object p of weights score size and searcher 0the priority moment carry out descending sort, composition searcher set A, is designated as wherein, n is searching object p 0total number of persons; Searching object p 0time t x 1 > t x 2 > ... > t x n ,
Step 3, for m compose initial value be n;
Step 4, from searcher's set A, extract m searcher, according to the array mode of planting, extracts various combination at every turn, obtains altogether individual Combination nova.By the mode of permutation and combination, more kinds of retrieval mode can be presented in limited searching object, namely by different array modes, according to the object retrieved of different searcher, find out different common factor objects, and these common factor objects, then recommended exactly.By the object p of searcher's retrievals all in each Combination nova 0moment be added after carry out descending sort, and insert the tail of the queue of queue B successively; All searcher's searching object p in combining 0moment be added after, searching object p in this combination can be judged 0all Time, according to obtain All Time sort, so, when obtaining object common factor in subsequent step, can extract object according to the sequencing of retrieval to occur simultaneously, effectively ensure the ageing of recommended, the accuracy of its recommended can be better.
Step 5, queue B once gone out team's operation, that is: get first combination G in queue B, what obtain each searcher's retrieval in setting-up time section T in this combination G removes object p 0other objects in addition; By the information of other objects described stored in other object sets built in, wherein, definition key key=searcher x s, value value=searcher x sother objects of retrieval weights score=retrieves this object time other retrieved objects are about to according to retrieval time according to weights score size carry out descending sort, form other object sets wherein, I is searcher x sother object sums retrieved in T time; Retrieval time
Step 6, other object sets that each searcher in the combination G taken out in step 5 is retrieved get common factor, judge whether to exist and occur simultaneously, if exist, then perform step 7, otherwise, perform step 8;
Step 7, for each common factor object, the time of this common factor object is retrieved according to each searcher in combination G, obtain the retrieval time the latest of common factor object, and obtain final weights after being added with the searcher quantity m in combination G after converting thereof into timestamp decimal, and by recommended stored in the recommended set Z built; Wherein, definition key key=object p 0, value value=common factor object; The final weights of weights score=; According to weights size final in recommended set Z, sort; So, final weights are larger, and it is compound recommendation rules more; Wherein, the integral part of weights is larger, then illustrate that the number of this object retrieval is more; When the integral part of weights is large equally, decimal is larger, then illustrate that retrieval time is newer.Obtain the existing object sum in recommended set Z, judge whether to be less than recommended sum z; If so, then step 8 is performed, otherwise, perform step 10;
Step 8, to judge in queue B whether be empty, if so, then perform step 9, otherwise, return step 5;
Step 9, make m from subtracting 1, judge whether m is greater than 0, if so, then returns step 4, otherwise, execution step 10;
Step 10, by z object before in recommended set Z, front z the object that namely weights score is the highest exports as the result for retrieval of recommendation.
Wherein, when the method being converted to timestamp retrieval time of common factor object is 1970 01 month 01 day 08 Beijing time, 00 point is risen to present total number of seconds for 00 second, afterwards, then will obtain timestamp divided by 10 10, and then obtain timestamp decimal.
Such as retrieve commodity, its searching object is then commodity, and searcher is buyer.
In sum, these are only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (1)

1. based on an object intelligent search method for Redis system, it is characterized in that, the step realizing the method comprises:
Step one, for a certain object p 0, definition initial recommendation object sum z; The sort-set data structure of Redis system is utilized to build object p 0searcher's set A, recommended set Z and other object sets utilize the queue B that the list data structure of Redis system builds;
Step 2, for described object p 0, gather all searcher of this object in setting-up time section t and retrieval time thereof, if z searcher x zsearching object p 0moment be by the information of searcher stored in the object p built 0in searcher's set A, object p 0definition key key=object p in searcher's set A 0, value value=searching object p 0searcher x z, weights score=searcher x zsearching object p 0moment according to the searching object p of weights score size and searcher 0the priority moment carry out descending sort, composition searcher set A, is designated as wherein, n is searching object p 0total number of persons; Searching object p 0time
Step 3, for m compose initial value be n;
Step 4, from searcher's set A, extract m searcher, extract various combination at every turn, obtain altogether individual Combination nova; By searchers all in each Combination nova to searching object p 0the retrieval moment be added after carry out descending sort, and insert the tail of the queue of queue B successively;
Step 5, queue B once gone out team's operation, that is: get first combination G in queue B, what obtain each searcher's retrieval in setting-up time section T in this combination G removes object p 0other objects in addition; By the information of other objects described stored in other object sets built in, other object sets in, definition key key=searcher x s, value value=searcher x sother objects of retrieval weights score=retrieves this object time according to weights score size and time carry out descending sort, form other object sets:
P x s = { ( p 1 x s , T 1 x s ) , ( P 2 x s , T 2 x s ) , ... , ( P I x s , T I x s ) }
Wherein, I is searcher x sother object sums retrieved in T time; Retrieval time T 1 x s > T 2 x s > ... > T I x s ;
Step 6, other object sets that each searcher in the combination G taken out in step 5 is retrieved get common factor, judge whether to exist and occur simultaneously, if exist, then perform step 7, otherwise, perform step 8;
Step 7, for each common factor object, the time of this common factor object is retrieved according to each searcher in combination G, obtain the retrieval time the latest of common factor object, and obtain final weights after being added with the searcher quantity m in combination G after converting thereof into timestamp decimal, and by common factor object stored in the recommended set Z built; In recommended set Z, definition key key=object p 0, value value=common factor object; The final weights of weights score=; According to weights size final in recommended set Z, sort; Obtain the existing object sum in recommended set Z, judge whether to be less than recommended sum z; If so, then step 8 is performed, otherwise, perform step 10;
Step 8, to judge in queue B whether be empty, if so, then perform step 9, otherwise, return step 5;
Step 9, make m from subtracting 1, judge whether m is greater than 0, if so, then returns step 4, otherwise, execution step 10;
Step 10, by z object before in recommended set Z, front z the object that namely weights score is the highest exports as the result for retrieval of recommendation.
CN201510362467.5A 2015-06-26 2015-06-26 A kind of object intelligent search method based on Redis Active CN104978416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510362467.5A CN104978416B (en) 2015-06-26 2015-06-26 A kind of object intelligent search method based on Redis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510362467.5A CN104978416B (en) 2015-06-26 2015-06-26 A kind of object intelligent search method based on Redis

Publications (2)

Publication Number Publication Date
CN104978416A true CN104978416A (en) 2015-10-14
CN104978416B CN104978416B (en) 2018-05-22

Family

ID=54274920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510362467.5A Active CN104978416B (en) 2015-06-26 2015-06-26 A kind of object intelligent search method based on Redis

Country Status (1)

Country Link
CN (1) CN104978416B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291817A (en) * 2017-05-23 2017-10-24 华中科技大学文华学院 A kind of construction method and device of longitudinal searching engine

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130290351A1 (en) * 2011-03-08 2013-10-31 Hitachi, Ltd. Similar design case example search apparatus
CN103631727A (en) * 2012-08-27 2014-03-12 阿里巴巴集团控股有限公司 Buffer management method and buffer management system for buffer server
CN103886011A (en) * 2013-12-30 2014-06-25 安徽讯飞智元信息科技有限公司 Social-relation network creation and retrieval system and method based on index files
CN103886079A (en) * 2014-03-26 2014-06-25 北京京东尚科信息技术有限公司 Data processing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130290351A1 (en) * 2011-03-08 2013-10-31 Hitachi, Ltd. Similar design case example search apparatus
CN103631727A (en) * 2012-08-27 2014-03-12 阿里巴巴集团控股有限公司 Buffer management method and buffer management system for buffer server
CN103886011A (en) * 2013-12-30 2014-06-25 安徽讯飞智元信息科技有限公司 Social-relation network creation and retrieval system and method based on index files
CN103886079A (en) * 2014-03-26 2014-06-25 北京京东尚科信息技术有限公司 Data processing method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
S GARCIA等: "On the real-time web as a source of recommendation knowledge", 《ACM》 *
黎瑞瑜: "分布式实时分发微博系统", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291817A (en) * 2017-05-23 2017-10-24 华中科技大学文华学院 A kind of construction method and device of longitudinal searching engine
CN107291817B (en) * 2017-05-23 2020-07-03 华中科技大学文华学院 Method and device for constructing longitudinal search engine

Also Published As

Publication number Publication date
CN104978416B (en) 2018-05-22

Similar Documents

Publication Publication Date Title
CN103577413B (en) Search result ordering method and system, search results ranking optimization method and system
Williams et al. On the run: mapping the escape speed across the Galaxy with SDSS
Isermann et al. A computer program for age–length keys incorporating age assignment to individual fish
CN103605815A (en) Automatic commodity information classifying and recommending method applicable to B2B (Business to Business) e-commerce platform
Riska et al. An EM-based technique for approximating long-tailed data sets with PH distributions
Poehnl et al. A statistical method to determine open cluster metallicities
Dias et al. Fitting isochrones to open cluster photometric data-II. Nonparametric open cluster membership likelihood estimation and its application in optical and 2MASS near-IR data
CN103309894B (en) Based on search implementation method and the system of user property
CN105205188A (en) Method and device for recommending purchase material suppliers
WO2008112926A1 (en) Deal identification system
Paech et al. Cross-correlation of galaxies and galaxy clusters in the Sloan Digital Sky Survey and the importance of non-Poissonian shot noise
CN109064293A (en) Method of Commodity Recommendation, device, computer equipment and storage medium
Ghajar et al. Evaluation of harvesting methods for sustainable forest management (SFM) using the analytical network process (ANP)
CN101355457A (en) Test method and test equipment
Oliveira et al. Fitting isochrones to open cluster photometric data-III. Estimating metallicities from UBV photometry
CN106156111A (en) Patent document search method, device and system
CN104050197A (en) Evaluation method and device for information retrieval system
CN106502881B (en) Method and device for testing commodity sequencing rule
Trevisan et al. A finer view of the conditional galaxy luminosity function and magnitude-gap statistics
Amarullah et al. Planning decision support system using building mall AHP (Analytical Hierarchy Process)
Akmaludin et al. The best selection of programmers in generation 4.0 using AHP and ELECTRE elimination methods
Haake et al. An improvement index to quantify the evolution of performance in running
CN105786810A (en) Method and device for establishment of category mapping relation
CN105786910B (en) Entry weighing computation method and device
CN104978416A (en) Redis-based intelligent object retrieval method

Legal Events

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