CN112084291A - Information recommendation method and device - Google Patents

Information recommendation method and device Download PDF

Info

Publication number
CN112084291A
CN112084291A CN202010877954.6A CN202010877954A CN112084291A CN 112084291 A CN112084291 A CN 112084291A CN 202010877954 A CN202010877954 A CN 202010877954A CN 112084291 A CN112084291 A CN 112084291A
Authority
CN
China
Prior art keywords
rule
recommendation
value
field
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
Application number
CN202010877954.6A
Other languages
Chinese (zh)
Inventor
翟光亚
黄良强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou New Video Exhibition Investment Consulting Co ltd
Original Assignee
Guangzhou New Video Exhibition Investment Consulting Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou New Video Exhibition Investment Consulting Co ltd filed Critical Guangzhou New Video Exhibition Investment Consulting Co ltd
Priority to CN202010877954.6A priority Critical patent/CN112084291A/en
Publication of CN112084291A publication Critical patent/CN112084291A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/319Inverted lists
    • 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/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An information recommendation method and device are disclosed. Acquiring user information; searching recommendation rules matched with the user information from a plurality of recommendation rules, wherein each recommendation rule corresponds to one or more pieces of recommendation information; and outputting recommendation information corresponding to the searched recommendation rule. Therefore, information recommendation is realized by reversely checking the recommendation rule matched with the user information based on the user information, so that the personalized information recommendation service is provided for the user, meanwhile, the transverse capacity expansion is supported, the implementation of the scheme is simple, various forward and reverse query conditions do not need to be constructed for the information of each user according to the business rule, and the user information is directly transmitted to the query engine to query the matched recommendation rule.

Description

Information recommendation method and device
Technical Field
The present disclosure relates to the field of information recommendation, and in particular, to an information recommendation method and apparatus.
Background
In the field of information recommendation, in order to recommend appropriate information to a user, user information is generally assembled into query conditions, and the appropriate information is queried and recommended to the user by using the query conditions.
Such information recommendation schemes generally suffer from the following drawbacks: 1. the performance is low, which can cause unnecessary network overhead, query condition analysis overhead and returned data analysis overhead; 2. the method is inflexible, and when the feature dimension related to the user information is increased by one, all forward and reverse conditions need to be considered when the query condition is constructed, so that errors are easy to occur; 3. the lateral expansion is costly.
Therefore, a more practical information recommendation scheme is needed to overcome the shortcomings of the existing schemes.
Disclosure of Invention
The technical problem to be solved by the present disclosure is to provide a more practical information recommendation scheme to improve the shortcomings of the existing schemes.
According to a first aspect of the present disclosure, there is provided an information recommendation method including: acquiring user information; searching recommendation rules matched with the user information from a plurality of recommendation rules, wherein each recommendation rule corresponds to one or more pieces of recommendation information; and outputting recommendation information corresponding to the searched recommendation rule.
Optionally, the method further comprises: based on the rule description information of the recommendation rule, constructing an inverted index of the recommendation rule, wherein the step of searching the recommendation rule matched with the user information from the plurality of recommendation rules comprises the following steps: and searching a recommendation rule matched with the user information based on the inverted index.
Optionally, the rule description information is used to characterize a rule field and a rule field value related to the recommendation rule, and the step of constructing an inverted index of the recommendation rule includes: and constructing a key value pair set corresponding to the rule field, wherein the key value pair set comprises one or more groups of key value pairs, keys in the key value pairs are used for representing rule field values, and values in the key value pairs are used for representing recommendation rules with the rule field values represented by the rule description information consistent with the rule field values represented by the keys.
Optionally, the values in the key-value pairs are characterized using the same number of bits as the recommendation rules, the bits correspond to the recommendation rules one by one, the bit being "1" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is consistent with the rule field value represented by the key in the key value pair, the bit being "0" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is inconsistent with the rule field value represented by the key in the key value pair, or a bit "1" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is inconsistent with the rule field value represented by the key in the key value pair, and a bit "0" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is consistent with the rule field value represented by the key in the key value pair.
Optionally, the rule field value is described in a positive statement or in a negative statement, and the step of constructing a set of key-value pairs corresponding to the rule field comprises: constructing a first key value pair which takes a rule field value as a key and takes a recommendation rule which describes the rule field value by a positive statement in rule description information as a value in a first index; and/or constructing a second key-value pair taking all values of the same rule field as keys and a recommendation rule taking a negative statement to describe the rule field value of the rule field as a value in the rule description information, constructing a third key-value pair taking the rule field value as a key and a recommendation rule taking a negative statement to describe the rule field value in the rule description information as a value in the second index.
Optionally, the rule field is a range field, a rule field value corresponding to the range field is used to represent a value range, and the step of constructing a key-value pair set corresponding to the rule field includes: aiming at fields in the same range, constructing an interval range table according to the value ranges of the fields in the range, which are represented by the rule description information of all recommendation rules related to the fields in the range, wherein the interval range table consists of a plurality of value intervals of which the ranges are not overlapped; and constructing a key value pair taking the value interval as a key and covering at least part of the value interval of which the value range of the range field is represented by the rule description information, wherein the value range of the range field is the value of the recommendation rule.
Optionally, the rule field is a character string field, a rule field value corresponding to the character string field is a character string, and the step of constructing a key-value pair set corresponding to the rule field includes: and constructing a dictionary tree corresponding to the character string field, wherein the dictionary tree comprises a root node and leaf nodes, each leaf node represents a character, each key corresponds to a path from the root node to a certain leaf node in the dictionary tree, and a character set corresponding to the leaf node on the path is consistent with the character string.
Optionally, the user information is composed of one or more field values, and the step of searching for a recommendation rule matching the user information based on the inverted index includes: for each field value, searching a recommendation rule consistent with the field value from a key value pair set of a rule field corresponding to the field value; determining a recommendation rule set matched with the field value based on the search result; and taking intersection of the recommendation rule sets of different field values to obtain a recommendation rule matched with the user information.
According to a second aspect of the present disclosure, there is provided an information recommendation apparatus including: the acquisition module is used for acquiring user information; the searching module is used for searching recommendation rules matched with the user information from a plurality of recommendation rules, wherein each recommendation rule corresponds to one or more pieces of recommendation information; and the output module is used for outputting the recommendation information corresponding to the searched recommendation rule.
According to a third aspect of the present disclosure, there is provided a computing device comprising: a processor; and a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method as described in the first aspect above.
According to a fourth aspect of the present disclosure, there is provided a non-transitory machine-readable storage medium having stored thereon executable code which, when executed by a processor of an electronic device, causes the processor to perform the method as described in the first aspect above.
Therefore, recommendation information corresponding to the inquired recommendation rule is recommended to the user by reversely checking the recommendation rule matched with the user information based on the user information, so that the personalized information recommendation service is provided for the user, meanwhile, the transverse capacity expansion is supported, the implementation of the scheme is simple, various forward and reverse inquiry conditions do not need to be constructed for the information of each user according to the business rule, and the user information is directly transmitted to the inquiry engine to inquire the matched recommendation rule.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in greater detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
Fig. 1 shows a schematic flow diagram of an information recommendation method according to an embodiment of the present disclosure.
FIG. 2 shows a data structure diagram of an inverted index constructed based on the present disclosure.
FIG. 3 shows a schematic diagram of an inverted index structure constructed for an example recommendation rule.
Fig. 4 is a block diagram illustrating a structure of an information recommendation apparatus according to an exemplary embodiment of the present disclosure.
FIG. 5 shows a schematic structural diagram of a computing device according to an example embodiment of the present disclosure.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Different from a mode of inquiring recommendation information by using an inquiry condition constructed based on user information, the method is characterized in that a plurality of recommendation rules with corresponding recommendation information are constructed in advance, and the recommendation information corresponding to the inquired recommendation rules is pushed to a user by inquiring the recommendation rules matched with the user information so as to provide personalized information recommendation service for the user.
The information recommendation method of the present disclosure is further described below with reference to specific embodiments.
Fig. 1 shows a schematic flow diagram of an information recommendation method according to an embodiment of the present disclosure. The method shown in fig. 1 may be implemented partially or completely in software by means of a computer program, and the method shown in fig. 1 may also be performed by means of a specifically configured computing device. The method shown in fig. 1 may be executed by a server side that provides information recommendation service for a client user, or may be executed by a client side. By way of example, the method shown in fig. 1 may be performed by, but is not limited to, a query engine constructed based on monoogodb, MySQL, which may be deployed as a query component in an information recommendation system, such as an advertising material matching engine in an advertising system.
Referring to fig. 1, in step S110, user information is acquired.
User information, i.e. information related to the user. The user information may include, but is not limited to, device information related to a client device used by the user, historical operation information made by the user through the client device, and user attribute information used to characterize attributes of the user. The device information may include, but is not limited to, a device model, a device screen size, a device location, and other information; the historical operation information may include, but is not limited to, historical search records, historical browsing records of the user; the user attribute information may include, but is not limited to, user age, gender, hobbies, and the like.
Taking the server executing the information recommendation method as an example, the user information may be obtained from the client device, that is, the user information sent by the client device is received; taking the information recommendation method executed by the client as an example, the client may collect the user information.
In step S120, a recommendation rule matching the user information is searched for from the plurality of recommendation rules.
Multiple recommendation rules may be pre-constructed, and each recommendation rule may correspond to one or more pieces of recommendation information. Recommendation information refers to information for pushing to a user and may include, but is not limited to, advertisements, news information, audio images, application software, and the like. And recommending information corresponding to the recommending rule, namely information suitable for recommending to the user according with the recommending rule.
When the recommendation rule is constructed, the operator can set the corresponding recommendation rule according to the recommendation information and the use target (such as the target audience) which are pushed as required, and can express the set recommendation rule according to a preset mode.
For example, the recommendation rule may be expressed in rule description information. The rule description information may be used to characterize the rule fields and rule field values to which the recommendation rules relate. Each recommendation rule may be composed of one or more rule field values. Moreover, different recommendation rules can be used separately or in combination.
For example, recommendation rule 1 with rule description information "state.in ═ IN, CN" indicates that the country field is india or china; recommendation rule 2 with rule description information "state.not IN, CN" indicates that the country field cannot be india or china; recommendation rule 3 with rule description information of "width, between 300 and 500" indicates that the width of the mobile phone screen of the user is 300 to 500 pixels; recommendation rule 4 having rule description information of "argument girl, student" indicates that the search string input by the user includes argument girl or student. The above rules 1 to 4 may be used alone or in combination. For example, the recommendation rules 1, 3, and 4 may be used IN combination to form a new recommendation rule, where the rule description information of the recommendation rule is "state.in ═ IN, CN 'width.between ═ 300, 500' addword.include ═ beautiful girl, student", which indicates that the country field is india or china, and the user mobile phone screen width is 300 to 500 pixels, and there is beautiful girl or student IN the search string input by the user. The recommendation information corresponding to the new recommendation rule after combination may be an intersection of recommendation information corresponding to each recommendation rule participating in combination.
In order to facilitate searching for the recommendation rule matched with the user information, an inverted index of the recommendation rule can be constructed based on the rule description information of the recommendation rule, so that the recommendation rule matched with the user information can be searched based on the inverted index.
An inverted index, i.e., an inverted index, refers to the location of a record determined by the attribute value. The inverted index in the present disclosure refers to a recommendation rule determined by a rule field value, that is, each item in the inverted index may include a rule field value and a recommendation rule list, and a recommendation rule in the recommendation rule list is a recommendation rule whose rule field value represented by the rule description information is consistent with the rule field value.
When constructing the inverted index of the recommendation rule, a key value pair set corresponding to the rule field may be constructed, where the key value pair set may include one or more groups of key value pairs, a key (key) in a key value pair is used to represent the rule field value, and a value (value) in a key value pair is used to represent the recommendation rule whose rule field value represented by the rule description information is consistent with the rule field value represented by the key.
As an example, a Bitmap data structure may be used to represent values in key value pairs, i.e. the matching state of a recommendation rule may be characterized using a finite length of 0, 1. Specifically, the values in the key value pairs may be characterized using the same number of bits as the recommendation rules, the bits corresponding one-to-one to the recommendation rules. The bit of "1" indicates that the rule field value represented by the description information of the recommendation rule corresponding to the bit is consistent with the rule field value represented by the key in the key value pair, and the bit of "0" indicates that the rule field value represented by the description information of the recommendation rule corresponding to the bit is inconsistent with the rule field value represented by the key in the key value pair; or the bit "1" indicates that the rule field value represented by the description information of the recommendation rule corresponding to the bit is inconsistent with the rule field value represented by the key, and the bit "0" indicates that the rule field value represented by the description information of the recommendation rule corresponding to the bit is consistent with the rule field value represented by the key.
Taking "1" for matching and "0" for mismatching as an example, a nonzero value (i.e., 1) in the Bitmap data structure is sparse in general, so that the space occupation can be significantly reduced by compression, and the specific compression mode is not repeated in the present disclosure.
The method includes the steps of constructing a key-value pair set corresponding to a rule field, namely constructing a key-value pair set aiming at each rule field, wherein the key-value pair set can be regarded as a Map structure, namely the Map structure can be used as a dictionary table in an inverted index, and a Map is constructed for each rule field to express a rule field value under the rule field and a recommendation rule list matched with the rule field value. Wherein, the recommendation rule list can be represented by the Bitmap data structure.
According to the value characteristics of the rule field, the disclosure provides two index types: term type and trie type. the term type is mainly applicable to rule fields with a plurality of fixed values or limited value intervals, such as country fields and screen size fields. the trie type is mainly applicable to rule fields, such as character string fields, of which the value of the field value is not fixed. The data structure and construction process of these two index types are further described below.
1. Construction of term type index
In characterizing the rule field and the rule field value to which a recommendation rule relates using rule description information, the rule field value may be described in a positive statement or described in a negative statement. That is, the rule description information may describe the value of the rule field to which the recommendation rule relates in a positive statement or a negative statement.
When the rule field value is described by a positive statement, the fact that the user information is matched with the rule field value is indicated to be possible to conform to the recommendation rule; otherwise, when the rule field value is described in a negative statement, it means that the user information is not matched with the rule field value, and the recommendation rule is possible to be met. For example, "state.in ═ IN, CN" described IN an affirmative sentence indicates that the country field is india or china, and "state.not ═ IN, CN" described IN a negative sentence indicates that the country field cannot be india or china.
In order to enable the constructed inverted index to be compatible with the recommendation rule described in a positive statement and the recommendation rule described in a negative statement at the same time, namely the [ in ] operation and the [ not ] operation are supported. The present disclosure proposes that, for a rule field value described in a positive statement, a first key-value pair having the rule field value as a key and a recommendation rule in the rule description information describing the rule field value in a positive statement as a value may be directly constructed in the first index. The first index is an index for describing forward semantics, which is a normal reverse index representation method, and is not described in detail in this disclosure.
In the case of a normal inverted index, [ not ] is expressed on a retrieval sentence, whereas in the present disclosure, a recommendation rule is an object to be retrieved, and thus a rule field value described in a negative sentence in the recommendation rule, that is, [ not ] in the recommendation rule needs to be converted. The conversion method proposed in the present disclosure is to convert [ not ] into [ all ] - [ specific value ], [ all ] is an agreed special field value, and is used to characterize all rule field values belonging to the same rule field as the specific value, that is, the rule field value described in a negative statement. All may correspond to all recommendation rules under the rule field describing the value of the rule field in a negative statement. All can be placed in the inverted index (i.e. the first index mentioned below) as normal, and since the specific value describes the reverse semantics, it needs to be separately assigned to an inverted index (i.e. the second index mentioned below) representing the reverse semantics.
Based on the above technical idea, in the step of constructing the key-value pair set corresponding to the rule field, a second key-value pair having all values of the same rule field as keys and having a recommendation rule describing a rule field value of the rule field in a negative statement as a value in the rule description information may be constructed in the first index, and a third key-value pair having a rule field value as a key and having a recommendation rule describing the rule field value in a negative statement as a value in the rule description information may be constructed in the second index.
Thus, when searching for a recommendation rule matching a certain field value in the user information, for those recommendation rules described in a negative statement, it can be comprehensively determined whether such recommendation rules described in a negative statement match the field value in combination with a retrieval result for [ all ] in the first index using the field value and a retrieval result in the second index using the field value. For a specific search process, reference may be made to the following related description, which is not repeated herein.
Consider that the rule field value of some rule fields is a range field, such as a screen size field, that characterizes a range of values. In order to enable the field value of the constructed inverted index support rule to be a recommendation rule of a value range, namely [ between ] operation is supported. When constructing an inverted index of a range field, namely constructing a key value pair set corresponding to the range field, aiming at the same range field, scanning all recommendation rules related to the range field, and constructing an interval range table with non-overlapping intervals according to the value ranges of the range field represented by the rule description information of all the recommendation rules related to the range field, wherein the interval range table consists of a plurality of value intervals with non-overlapping ranges; and then constructing a key value pair taking the value range as a key and covering the value range of the range field represented by the rule description information with at least part of the recommendation rule of the value range as a value. When the range table is constructed, the value end point corresponding to the value range set by the recommendation rule for the range field can be used as a partition point of the value range, that is, the interval between two adjacent value end points can be used as the value range, and as to which value range the two adjacent value end points fall, the value range can be set according to the actual situation.
For example, assuming that there are two recommendation rules that size ranges set for the screen width field are [100, 400 ] and [200, 1000], respectively, the range tables corresponding to the two value ranges may be represented as [100,199], [200,399], [400,999], [1000,1000], and each value range may be used as an index item (term) to construct an inverted index.
2. Construction of trie type index
The regular field value corresponding to the character string field is a character string, when constructing an inverted index of the character string field, that is, constructing a key value pair set corresponding to the character string field, a dictionary tree (trie) corresponding to the character string field may be constructed, where the dictionary tree includes a root node and leaf nodes, each leaf node represents a character, each key corresponds to a path from the root node to a certain leaf node in the dictionary tree, and the character set corresponding to the leaf node on the path is consistent with the character string. The value corresponding to a key is used to characterize a recommendation rule for which the string characterized by the rule description information coincides with the string characterized by the key. For the description of the dictionary tree (trie), reference may be made to the prior knowledge, and the present disclosure will not be described in detail.
the trie type index supports [ include ] operations. The most effective means for retrieving the character string fragments can be retrieval by inverted prefixes, the method can use a simple mode of Map as a dictionary, cannot use a prefix mode of an inverted dictionary table for retrieval, and uses a data structure of trie to retrieve the character string prefixes. The operation is similar to that of a common trie retrieval method and is not described in detail.
FIG. 2 shows a data structure diagram of an inverted index constructed based on the present disclosure.
As shown in fig. 2, the inverted index of the present disclosure may be divided into a first index, a second index, and a trie index in a data structure. For the first index, the second index and the index of the dictionary tree, the above description may be referred to, and details are not repeated here.
Taking the rule description information of the recommendation rule as "state.in ═ IN, CN ' state2.not ═ IN ' width.between ═ 300,500 ' added word. include ═ beautiful girl, student" as an example, the inverted index structure shown IN fig. 3 can be constructed, and the specific construction process can refer to the above related description, and is not described herein again.
So far, a data structure and a construction process of the reverse index segment of the recommendation rule are explained in detail. The following describes a process of querying a matching recommendation rule based on user information.
The acquired user information may be composed of one or more field values. For example, the obtained user information may be "state" IN "width" 500 "extended girl", which indicates that the obtained user information is: the user country is india and the screen width is 500 pixels, which has once entered the search term girl.
When the recommendation rule matched with the user information is searched based on the inverted index, for each field value related to the user information, a recommendation rule consistent with the field value is searched from a key value pair set of a rule field corresponding to the field value, a recommendation rule set matched with the field value is determined based on a search result, and then an intersection is taken for recommendation rule sets of different field values, so that the recommendation rule matched with the user information can be obtained.
And searching a recommendation rule consistent with the field value from the key-value pair set of the rule field corresponding to the field value, namely searching a key consistent with the field value from the key-value pair set of the rule field corresponding to the field value, wherein the recommendation rule indicated by the value corresponding to the searched key is the recommendation rule consistent with the field value. Since the found recommendation rule consistent with the field value may be described in a negative statement, it is necessary to make a further judgment to obtain whether the found recommendation rule consistent with the field value matches the field value.
As described above, the constructed inverted index may be divided into term and trie types. And the term type of index in turn comprises a first index (forward semantic index) and a second index (reverse semantic index). The following expands the description on the way to find the reverse indexes of the term type and the trie type, respectively.
1. Lookup of term type index
the term type of inverted index includes a first index (forward semantic index) and a second index (reverse semantic index). For each field value to which the user information relates, a recommendation rule matching the field value may be determined by looking up in the first index and the second index.
Specifically, when a corresponding index item is searched in the first index by using a field value related to the user information, since the first index is a forward semantic index, a recommendation rule indicated by a value corresponding to a key in accordance with the field value among key values of the first index can be directly determined as a recommendation rule matching the field value.
In the process of searching in the first index, when searching an index item of "all rule field values" under the rule field corresponding to the field value in the first index, since all rule field values include the field value, the recommendation rule(s) corresponding to the "all rule field values" will be matched, and the matched recommendation rule is a recommendation rule that needs to be further confirmed and is described based on a negative statement, which may be called a recommendation rule to be confirmed for convenience of distinguishing. At this time, the field value needs to be used for searching in the rule field in the second index, if a recommendation rule to be confirmed is searched, the recommendation rule to be confirmed can be determined as a recommendation rule not matching with the field value, and if the recommendation rule to be confirmed is not searched, the recommendation rule to be confirmed can be determined as a recommendation rule matching with the field value.
In addition, when a recommendation rule is found from the second index, if a recommendation rule consistent with the field value is found, since the second index represents a reverse semantic (i.e. not), the recommendation rule consistent with the field value found in the second index is a recommendation rule not matched with the field value.
When the user information relates to the range field, the range table used in constructing the index of the range field can be used for mapping to obtain the range where the range field value in the user information is located, and then the range is used for searching to obtain the corresponding recommendation rule. In consideration of certain error in range retrieval, the retrieved recommendation rule and the user information can be accurately checked to ensure the reliability and accuracy of the final result.
2. Lookup of trie type index
For the character string related to the user information, matching may be performed in the dictionary tree one by one starting from the first character of the character string, and the recommendation rule indicated by the completely matched path is taken as the recommendation rule matched with the character string. For a specific lookup process, reference may be made to a lookup mechanism of an existing dictionary tree index, which is not described herein again.
The lookup process is further illustrated with reference to specific embodiments below.
1) Incoming user information
"state" IN "width" 500 "extended girl" indicates that the information of the user acquired by the system is: the user country is india and the screen width is 500 pixels, which has once entered the search term girl.
2) Building an index retrieval plan
The number of rules corresponding to the index value of each index field is different, and the document number corresponding to each term can be obtained according to the statistical information during index establishment and serves as the basis for limited use of the value as retrieval. Obviously, the smaller the number of documents corresponding to the term value, the higher the detection efficiency.
3) Index extraction dependency field filtering
As an example above, the retrieval process is as follows:
i. IN the "state" field, the term is used to search for a list of rules, such as BitMap
3.1. IN is equal to IN, CN ", will match if there is a rule
3.2. Not ═ IN ", if the rule" state, based on the previous description of [ not ], using [ IN ] search does not match,
3.2.1) then additionally retrieve [ all ] term on the state field, which will match;
3.2.2) then on the reverse semantic term index of this state field, it can be retrieved that since this retrieval indicates exclusion, the matching documents are excluded, i.e. the rule "state.
3.3. Not ═ CN ", based on the previous description of [ not ], using [ IN ] search does not match,
3.3.1) then additionally retrieve [ all ] term on the state field, which will match;
3.3.2) then on the reverse semantic term index of this state field, cannot be retrieved (because term on the reverse semantic index of this rule is CN), and finally this rule "state.
in the field of width, because the field is a between type field, firstly mapping by using a non-repeated interval table under the field constructed during index building to obtain an interval [400,999], and searching by using a term value corresponding to the interval, so that the two ranges can be matched [100, 400 ] [200, 1000 ]. Obviously, 500 is not in the range of [100,400 ], that is, "between search is not accurate", the method "exactly checks the user information using the searched rule" at the end of the search to ensure the reliability and accuracy of the final result.
On the "adword" field, starting with the first character "g" of "girl" entered by the user, taking matches one by one in the structure of tries, thanks to the trie index, with the previous example: "advertisement ═ beautifull girl, student" this user information mismatch rule.
4) And (4) repeatedly executing the step 3 for each field until the retrieval of all the fields is completed, wherein the intersection of the retrieval results of all the fields can be used as a recommendation rule which is finally matched with the user information.
In step S130, recommendation information corresponding to the found recommendation rule is output.
After the recommendation rule matched with the user information is finally obtained, the recommendation information corresponding to the obtained recommendation rule can be obtained and used as recommendation information suitable for being pushed to the user, and the recommendation information is output to the user.
Taking the server to execute the information recommendation method shown in fig. 1 as an example, the server may send the recommendation information to the client, and the client outputs the recommendation information to the user; taking the information recommendation method shown in fig. 1 as an example, the client may directly output the recommendation information to the user.
The information recommendation method of the present disclosure may be applicable to, but not limited to, an advertisement system. The advertisement system material matching has the characteristics of multiple matching dimensions, condition diversity, combination diversity and dimension increase at any time according to the requirements of customers. Aiming at the matched query characteristics of the advertisement materials, the query mechanism for reversely checking the matched conditions (namely the recommendation rules) from the information is provided, and is different from the traditional query mechanism which uses the conditions to query the information, and the query mechanism of the matching condition uses the information to query the matching conditions. When the scale of the number of the rules is 10-100 ten thousand, the method can realize quick retrieval of the matching rules, and the response speed of each retrieval can be less than 1 millisecond.
Compared with the prior art, the method has the advantages that:
1. high performance: with 9 dimensional query conditions, a single core 2.5G CPU can reach 75000 tps. Compared with the traditional scheme which needs 500 machines, the number of machines is reduced to 16 after the machine is on line, and the cost is greatly saved.
2. The programming is simple, and various forward and reverse query conditions do not need to be constructed for all information constructed by each user according to the business rules. And (4) indexing to a query engine according to the configuration construction material matching conditions.
3. Supporting lateral expansion. The query engine of the memory is directly compiled into the service code, and the capacity is automatically and transversely expanded when the service program is expanded.
The information recommendation method of the present disclosure may also be implemented as an information recommendation apparatus. Fig. 4 is a block diagram illustrating a structure of an information recommendation apparatus according to an exemplary embodiment of the present disclosure. Wherein the functional elements of the information recommendation device can be implemented by hardware, software, or a combination of hardware and software implementing the principles of the present disclosure. It will be appreciated by those skilled in the art that the functional units described in fig. 4 may be combined or divided into sub-units to implement the principles of the invention described above. Thus, the description herein may support any possible combination, or division, or further definition of the functional units described herein.
In the following, functional units that the information recommendation apparatus can have and operations that each functional unit can perform are briefly described, and for details related thereto, reference may be made to the above-mentioned related description, which is not described herein again.
Referring to fig. 4, the information recommendation apparatus 400 includes an acquisition module 410, a search module 420, and an output module 430. The obtaining module 410 is used for obtaining user information; the searching module 420 is configured to search a recommendation rule matching the user information from multiple recommendation rules, where each recommendation rule corresponds to one or more pieces of recommendation information; the output module 430 is configured to output recommendation information corresponding to the found recommendation rule.
The information recommendation apparatus 400 may further include a construction module configured to construct an inverted index of the recommendation rule based on the rule description information of the recommendation rule. The lookup module 420 may lookup a recommendation rule matching the user information based on the inverted index.
As an example, the rule description information is used to characterize a rule field and a rule field value related to a recommendation rule, and the building module may build a key-value pair set corresponding to the rule field, where the key-value pair set includes one or more groups of key-value pairs, a key in a key-value pair is used to characterize the rule field value, and a value in the key-value pair is used to characterize a recommendation rule whose rule field value characterized by the rule description information is consistent with the rule field value characterized by the key. The values in the key value pairs may be characterized by the same number of bits as the recommendation rules, with the bits corresponding to the recommendation rules one-to-one. For a specific implementation process of constructing the inverted index by using the building module, reference may be made to the above description, and details are not repeated here.
The lookup module 420 may, for each field value, lookup a recommendation rule that is consistent with the field value from the set of key-value pairs of the rule field corresponding to the field value; determining a recommendation rule set matched with the field value based on the search result; and (4) taking intersection of the recommendation rule sets of different field values to obtain a recommendation rule matched with the user information.
Fig. 5 is a schematic structural diagram of a computing device that can be used to implement the information recommendation method according to an embodiment of the present disclosure.
Referring to fig. 5, computing device 500 includes memory 510 and processor 520.
The processor 520 may be a multi-core processor or may include a plurality of processors. In some embodiments, processor 520 may include a general-purpose host processor and one or more special coprocessors such as a Graphics Processor (GPU), a Digital Signal Processor (DSP), or the like. In some embodiments, processor 520 may be implemented using custom circuitry, such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA).
The memory 510 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions for the processor 520 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, the memory 510 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, may also be employed. In some embodiments, memory 510 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 510 stores executable code that, when processed by the processor 520, causes the processor 520 to perform the information recommendation methods described above.
The information recommendation method, the information recommendation apparatus, and the computing device according to the present invention have been described in detail above with reference to the accompanying drawings.
Furthermore, the method according to the invention may also be implemented as a computer program or computer program product comprising computer program code instructions for carrying out the above-mentioned steps defined in the above-mentioned method of the invention.
Alternatively, the invention may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform the steps of the above-described method according to the invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (11)

1. An information recommendation method, comprising:
acquiring user information;
searching recommendation rules matched with the user information from a plurality of recommendation rules, wherein each recommendation rule corresponds to one or more pieces of recommendation information;
and outputting recommendation information corresponding to the searched recommendation rule.
2. The information recommendation method of claim 1, further comprising: constructing an inverted index of the recommendation rule based on the rule description information of the recommendation rule, wherein,
the step of searching the recommendation rule matched with the user information from the plurality of recommendation rules comprises the following steps: and searching a recommendation rule matched with the user information based on the inverted index.
3. The information recommendation method according to claim 2, wherein the rule description information is used for characterizing rule fields and rule field values to which the recommendation rule relates, and the step of constructing an inverted index of the recommendation rule comprises:
and constructing a key value pair set corresponding to the rule field, wherein the key value pair set comprises one or more groups of key value pairs, keys in the key value pairs are used for representing rule field values, and values in the key value pairs are used for representing recommendation rules with the rule field values represented by the rule description information consistent with the rule field values represented by the keys.
4. The information recommendation method of claim 3, wherein,
representing values in the key value pair using the same number of bits as the recommendation rules, the bits corresponding one-to-one to the recommendation rules,
the bit "1" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is consistent with the rule field value represented by the key in the key value pair, and the bit "0" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is inconsistent with the rule field value represented by the key in the key value pair, or
The bit "1" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is inconsistent with the rule field value represented by the key in the key value pair, and the bit "0" indicates that the rule field value represented by the rule description information of the recommendation rule corresponding to the bit is consistent with the rule field value represented by the key in the key value pair.
5. The information recommendation method of claim 3, wherein the rule field value is described in a positive statement or in a negative statement, and the step of constructing a set of key-value pairs corresponding to a rule field comprises:
constructing a first key value pair which takes a rule field value as a key and takes a recommendation rule which describes the rule field value by a positive statement in rule description information as a value in a first index; and/or
And constructing a second key-value pair taking all values of the same rule field as keys in the first index, and taking a recommendation rule describing the rule field value of the rule field by a negative statement in the rule description information as a value, and constructing a third key-value pair taking the rule field value as a key and taking the recommendation rule describing the rule field value by the negative statement in the rule description information as a value in the second index.
6. The information recommendation method according to claim 3, wherein the rule field is a range field, a rule field value corresponding to the range field is used for representing a value range, and the step of constructing a key-value pair set corresponding to the rule field includes:
aiming at fields in the same range, constructing an interval range table according to the value ranges of the fields in the range, which are represented by the rule description information of all recommendation rules related to the fields in the range, wherein the interval range table consists of a plurality of value intervals of which the ranges are not overlapped;
and constructing a key value pair taking the value interval as a key and covering at least part of the value interval of which the value range of the range field is represented by the rule description information, wherein the value range of the range field is the value of the recommendation rule.
7. The information recommendation method according to claim 3, wherein the rule field is a character string field, a rule field value corresponding to the character string field is a character string, and the step of constructing a key-value pair set corresponding to the rule field comprises:
and constructing a dictionary tree corresponding to the character string field, wherein the dictionary tree comprises a root node and leaf nodes, each leaf node represents a character, each key corresponds to a path from the root node to a certain leaf node in the dictionary tree, and a character set corresponding to the leaf node on the path is consistent with the character string.
8. The information recommendation method of claim 3, wherein the user information is composed of one or more field values, and the step of finding a recommendation rule matching the user information based on the inverted index comprises:
for each field value, searching a recommendation rule consistent with the field value from a key value pair set of a rule field corresponding to the field value;
determining a recommendation rule set matched with the field value based on the search result;
and taking intersection of the recommendation rule sets of different field values to obtain a recommendation rule matched with the user information.
9. An information recommendation apparatus comprising:
the acquisition module is used for acquiring user information;
the searching module is used for searching recommendation rules matched with the user information from a plurality of recommendation rules, wherein each recommendation rule corresponds to one or more pieces of recommendation information;
and the output module is used for outputting the recommendation information corresponding to the searched recommendation rule.
10. A computing device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any of claims 1 to 8.
11. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any of claims 1-8.
CN202010877954.6A 2020-08-27 2020-08-27 Information recommendation method and device Pending CN112084291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010877954.6A CN112084291A (en) 2020-08-27 2020-08-27 Information recommendation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010877954.6A CN112084291A (en) 2020-08-27 2020-08-27 Information recommendation method and device

Publications (1)

Publication Number Publication Date
CN112084291A true CN112084291A (en) 2020-12-15

Family

ID=73728119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010877954.6A Pending CN112084291A (en) 2020-08-27 2020-08-27 Information recommendation method and device

Country Status (1)

Country Link
CN (1) CN112084291A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765161A (en) * 2020-12-30 2021-05-07 北京奇艺世纪科技有限公司 Alarm rule matching method and device, electronic equipment and storage medium
CN115208923A (en) * 2022-07-18 2022-10-18 阿里云计算有限公司 Equipment information determination method, device and equipment
CN116822502A (en) * 2023-08-30 2023-09-29 腾讯科技(深圳)有限公司 Webpage content identification method, webpage content identification device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350440A1 (en) * 2015-05-28 2016-12-01 Salesforce.Com, Inc. Matching objects using match rules and lookup key
CN106708858A (en) * 2015-11-13 2017-05-24 阿里巴巴集团控股有限公司 Information recommendation method and device
US20170286525A1 (en) * 2016-03-31 2017-10-05 Splunk Inc. Field Extraction Rules from Clustered Data Samples
CN107491487A (en) * 2017-07-17 2017-12-19 中国科学院信息工程研究所 A kind of full-text database framework and bitmap index establishment, data query method, server and medium
CN110266805A (en) * 2019-06-28 2019-09-20 京东数字科技控股有限公司 Information-pushing method, device, electronic equipment and readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160350440A1 (en) * 2015-05-28 2016-12-01 Salesforce.Com, Inc. Matching objects using match rules and lookup key
CN106708858A (en) * 2015-11-13 2017-05-24 阿里巴巴集团控股有限公司 Information recommendation method and device
US20170286525A1 (en) * 2016-03-31 2017-10-05 Splunk Inc. Field Extraction Rules from Clustered Data Samples
CN107491487A (en) * 2017-07-17 2017-12-19 中国科学院信息工程研究所 A kind of full-text database framework and bitmap index establishment, data query method, server and medium
CN110266805A (en) * 2019-06-28 2019-09-20 京东数字科技控股有限公司 Information-pushing method, device, electronic equipment and readable medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765161A (en) * 2020-12-30 2021-05-07 北京奇艺世纪科技有限公司 Alarm rule matching method and device, electronic equipment and storage medium
CN112765161B (en) * 2020-12-30 2023-08-08 北京奇艺世纪科技有限公司 Alarm rule matching method and device, electronic equipment and storage medium
CN115208923A (en) * 2022-07-18 2022-10-18 阿里云计算有限公司 Equipment information determination method, device and equipment
CN116822502A (en) * 2023-08-30 2023-09-29 腾讯科技(深圳)有限公司 Webpage content identification method, webpage content identification device, computer equipment and storage medium
CN116822502B (en) * 2023-08-30 2023-11-21 腾讯科技(深圳)有限公司 Webpage content identification method, webpage content identification device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112084291A (en) Information recommendation method and device
US9990362B2 (en) Profiling data with location information
JP7257068B2 (en) Systems, methods, and data structures for fast searching or filtering of large datasets
US8738595B2 (en) Location based full text search
US20170169494A1 (en) User interface and geo-parsing data structure
US20080114733A1 (en) User-structured data table indexing
CN106407303A (en) Data storage method and apparatus, and data query method and apparatus
US8700661B2 (en) Full text search using R-trees
CN102193983B (en) Relation path-based node data filtering method of graphic database
WO2017036348A1 (en) Method and device for compressing and decompressing extensible markup language document
WO2017173783A1 (en) Method of displaying point of interest, and terminal
CN114610708A (en) Vector data processing method and device, electronic equipment and storage medium
CN116226425A (en) Graph data storage method, graph data reading method and graph data storage system
CN115168362A (en) Data processing method and device, readable medium and electronic equipment
CN114817657A (en) To-be-retrieved data processing method, data retrieval method, electronic device and medium
CN102193988A (en) Method and system for retrieving node data in graphic database
US9529855B2 (en) Systems and methods for point of interest data ingestion
CN110020001A (en) Storage, querying method and the corresponding equipment of string data
CN116521733A (en) Data query method and device
CN113342813B (en) Key value data processing method, device, computer equipment and readable storage medium
US20140195561A1 (en) Search method and information managing apparatus
CN113449055A (en) Map retrieval method, system and related equipment
CN113239070A (en) Data query method and device and electronic equipment
CN112699149A (en) Target data acquisition method and device, storage medium and electronic device
US20240061823A1 (en) Memory-frugal index design in storage engine

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