CN111563791B - Commodity dividing and recommending method and device, electronic equipment and storage medium - Google Patents

Commodity dividing and recommending method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111563791B
CN111563791B CN202010247767.XA CN202010247767A CN111563791B CN 111563791 B CN111563791 B CN 111563791B CN 202010247767 A CN202010247767 A CN 202010247767A CN 111563791 B CN111563791 B CN 111563791B
Authority
CN
China
Prior art keywords
commodity
commodity recommendation
commodities
recommendation
dividing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010247767.XA
Other languages
Chinese (zh)
Other versions
CN111563791A (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 QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010247767.XA priority Critical patent/CN111563791B/en
Publication of CN111563791A publication Critical patent/CN111563791A/en
Application granted granted Critical
Publication of CN111563791B publication Critical patent/CN111563791B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a commodity dividing and recommending method, a commodity dividing and recommending device, electronic equipment and a storage medium, wherein the dividing method comprises the following steps: acquiring shopping track information of all users according to the period; generating shopping track graphs of all commodities and all users according to the shopping track information; setting an objective function and constraint conditions for each commodity recommendation region to be divided, and dividing the vertexes in the shopping track graph into corresponding commodity recommendation regions conforming to the objective function and constraint conditions according to a dividing algorithm. When the target commodity is recommended, the commodity recommendation area to which the target commodity belongs can be determined, and then the same type of commodity and/or different types of commodity in the commodity recommendation area to which the target commodity belongs are recommended, so that the technical problem that only similar commodity as the target commodity is recommended by the conventional commodity recommendation algorithm can be solved, the types of the recommended commodity are enriched, the commodity recommendation accuracy is improved, and the commodity recommendation effectiveness is guaranteed.

Description

Commodity dividing and recommending method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the technical field of electronic commerce, and in particular, to a method and an apparatus for dividing a commodity, a method and an apparatus for recommending a commodity, an electronic device, and a computer readable storage medium.
Background
From the demands of the existing commodity recommendation system of the electric business, the conventional commodity recommendation algorithm uses commodities which are browsed and purchased by a user as cores to conduct derivative calculation, and the commodities are recommended at various flow inlets (such as shopping webpage head screens and the like) so as to attract the attention of the user and further improve the conversion rate of the commodities.
Most of the existing commodity recommendation algorithms are applied to recommending similar commodities with highest correlation degree with browsing or purchasing of users, but the recommendation mode cannot make effective response when dealing with the situations that users purchase and cancel shopping plans in other channels (online and offline), similar commodities are continuously recommended to the users at high frequency, the users may not be interested in the recommended commodities, and therefore the accuracy of commodity recommendation is low, the users cannot purchase the recommended commodities, and the effectiveness of commodity recommendation is poor.
Disclosure of Invention
An object of an embodiment of the present invention is to provide a method and an apparatus for dividing a commodity, a method and an apparatus for recommending a commodity, an electronic device, and a computer readable storage medium, so as to achieve the problem of improving accuracy and effectiveness of commodity recommendation. The specific technical scheme is as follows:
In a first aspect of an embodiment of the present invention, there is provided a method for dividing commodities, including: acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchase condition of all the users on all the commodities; generating a shopping track graph of all commodities and all users according to the shopping track information, wherein the shopping track graph comprises vertexes and edges, the vertexes represent the commodities, and the edges represent the correlation between the commodities; setting an objective function and constraint conditions for each commodity recommendation region to be divided, wherein the objective function represents the association degree of commodities in the commodity recommendation region, the association degree of commodities in the commodity recommendation region and the communication time of the commodity recommendation region, the constraint conditions represent the commodities belonging to the unique commodity recommendation region, the number of commodity recommendation regions and the number of commodities in the commodity recommendation region, and the commodity recommendation region comprises related commodities belonging to the same type and/or different types; and dividing the vertexes in the shopping track graph into corresponding commodity recommendation areas conforming to the objective function and the constraint conditions according to a preset dividing algorithm.
Optionally, the setting an objective function and a constraint condition for each commodity recommendation area to be divided includes: setting a first objective function, a second objective function, a first constraint condition, a second constraint condition and a third constraint condition for each commodity recommendation region; the first objective function is used for setting the association degree of the commodities in the commodity recommendation regions to be the maximum value, the first objective function is also used for setting the association degree of the commodities in the commodity recommendation regions to be the minimum value, the second objective function is used for setting the communication time of the commodity recommendation regions to be the minimum value, the first constraint condition is used for dividing each commodity into the corresponding commodity recommendation regions, the second constraint condition is used for setting the number of the commodity recommendation regions, and the third constraint condition is used for setting the number of the commodities in the commodity recommendation regions.
Optionally, the first objective function represents that the sum of the weights of the edges formed by the commodities in the commodity recommendation regions is maximumA value of the sum of the weights ofWherein k represents the number of commodity recommendation regions, MN represents the number of commodity recommendation regions, i, j represents the number of commodities, |V| represents the number of all commodities, and C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C jk Representing the attribution relationship between the jth commodity and the kth commodity recommendation area, omega ij A weight representing an edge formed by the ith commodity and the jth commodity; the second objective function represents that the communication time of the commodity recommendation interval is the minimum value, and the communication time is +.>Wherein c represents the communication time for reading a commodity recommendation area, l represents the serial number of the shopping track information, tr represents the number of the shopping track information, k represents the serial number of the commodity recommendation area, MN represents the number of the commodity recommendation area, and d lk Representing a correlation between the first shopping track information and the kth commodity recommendation area; the first constraint represents the attribution relation between one commodity and any commodity recommendation area, and the first constraint represents +.>Wherein k represents the serial number of commodity recommendation region, MN represents the number of commodity recommendation region, C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C ik =1 indicates that the ith commodity belongs to the kth commodity recommendation area at one time, i=1, 2, …, |v| indicates the number of all commodities; the second constraint condition indicates that the number of commodity recommendation regions is within a preset commodity recommendation region number range or is a preset numerical value; the third constraint condition indicates that the number of commodities in the commodity recommendation area is within a preset commodity data range.
Optionally, the dividing the vertex in the shopping track graph into the corresponding commodity recommendation area according with the objective function and the constraint condition according to a preset dividing algorithm includes: creating an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track graph; and dividing the vertexes in the shopping track graph into corresponding commodity recommendation regions conforming to the objective function and the constraint conditions according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator.
Optionally, the dividing the vertex in the shopping track graph into the corresponding commodity recommendation area meeting the objective function and the constraint condition according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator includes: outputting a division result set according to the initialization algorithm, wherein the division result set represents that the vertex in the shopping track graph is divided into a plurality of commodity recommendation areas; outputting a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator and the mutation operator; the target division result comprises the number of commodity recommendation regions, the number of commodities in each commodity recommendation region and attribute information of the commodities in each commodity recommendation region.
In a second aspect of the embodiment of the present invention, there is also provided a recommendation method for a commodity, including: acquiring attribute information of a target commodity; matching the attribute information to a commodity recommendation region to which the target commodity belongs, wherein the commodity recommendation region is obtained by dividing according to the commodity dividing method according to the first aspect; and recommending the matched commodities in the commodity recommendation area.
Optionally, the recommending the matched commodity in the commodity recommendation area comprises: and recommending commodities which belong to the same type and/or different types with the target commodity in the commodity recommendation area.
In a third aspect of the embodiment of the present invention, there is also provided a commodity dividing apparatus, including: the first acquisition module is used for acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchase condition of all the users on all the commodities; the generation module is used for generating shopping track graphs of all commodities and all users according to the shopping track information, wherein the shopping track graphs comprise vertexes and edges, the vertexes represent the commodities, and the edges represent the correlation among the commodities; the system comprises a setting module, a setting module and a constraint condition, wherein the setting module is used for setting an objective function and a constraint condition for each commodity recommendation region to be divided, the objective function represents the association degree of commodities in the commodity recommendation region, the association degree of commodities in the commodity recommendation region and the communication time of the commodity recommendation region, the constraint condition represents that the commodities belong to a unique commodity recommendation region, the number of the commodity recommendation regions and the number of the commodities in the commodity recommendation region, and the commodity recommendation region contains the associated commodities belonging to the same type and/or different types; the dividing module is used for dividing the vertexes in the shopping track graph into corresponding commodity recommendation areas which accord with the objective function and the constraint conditions according to a preset dividing algorithm.
Optionally, the setting module is configured to set a first objective function, a second objective function, a first constraint condition, a second constraint condition and a third constraint condition for each commodity recommendation area; the first objective function is used for setting the association degree of the commodities in the commodity recommendation regions to be the maximum value, the first objective function is also used for setting the association degree of the commodities in the commodity recommendation regions to be the minimum value, the second objective function is used for setting the communication time of the commodity recommendation regions to be the minimum value, the first constraint condition is used for dividing each commodity into the corresponding commodity recommendation regions, the second constraint condition is used for setting the number of the commodity recommendation regions, and the third constraint condition is used for setting the number of the commodities in the commodity recommendation regions.
Optionally, the first objective function represents that the sum of the weights of the edges formed by the commodities in the commodity recommendation regions is the maximum value, and the sum of the weights isWherein k represents the number of commodity recommendation regions, MN represents the number of commodity recommendation regions, i, j represents the number of commodities, |V| represents the number of all commodities, and C ik Representing an entry between an ith commodity and a kth commodity referral area Genus relation, C jk Representing the attribution relationship between the jth commodity and the kth commodity recommendation area, omega ij A weight representing an edge formed by the ith commodity and the jth commodity; the second objective function represents that the communication time of the commodity recommendation interval is the minimum value, and the communication time is +.>Wherein c represents the communication time for reading a commodity recommendation area, l represents the serial number of the shopping track information, tr represents the number of the shopping track information, k represents the serial number of the commodity recommendation area, MN represents the number of the commodity recommendation area, and d lk Representing a correlation between the first shopping track information and the kth commodity recommendation area; the first constraint represents the attribution relation between one commodity and any commodity recommendation area, and the first constraint represents +.>Wherein k represents the serial number of commodity recommendation region, MN represents the number of commodity recommendation region, C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C ik =1 indicates that the ith commodity belongs to the kth commodity recommendation area at one time, i=1, 2, …, |v| indicates the number of all commodities; the second constraint condition indicates that the number of commodity recommendation regions is within a preset commodity recommendation region number range or is a preset numerical value; the third constraint condition indicates that the number of commodities in the commodity recommendation area is within a preset commodity data range.
Optionally, the dividing module includes: the algorithm operator creation module is used for creating an initialization algorithm, a selection operator, a crossing operator and a mutation operator of the shopping track graph; and the vertex dividing module is used for dividing the vertex in the shopping track graph into corresponding commodity recommendation areas conforming to the objective function and the constraint conditions according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator.
Optionally, the vertex division module includes: the dividing result set output module is used for outputting a dividing result set according to the initialization algorithm, wherein the dividing result set represents that the vertexes in the shopping track graph are divided into a plurality of commodity recommendation areas; the target division result output module is used for outputting a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator and the mutation operator; the target division result comprises the number of commodity recommendation regions, the number of commodities in each commodity recommendation region and attribute information of the commodities in each commodity recommendation region.
In a fourth aspect of the embodiment of the present invention, there is also provided a recommendation device for a commodity, including: the second acquisition module is used for acquiring attribute information of the target commodity; the matching module is used for matching the commodity recommendation area to which the target commodity belongs according to the attribute information, wherein the commodity recommendation area is obtained by dividing by the commodity dividing device according to the third aspect; and the recommending module is used for recommending the matched commodities in the commodity recommendation area.
Optionally, the recommendation module is configured to recommend the merchandise belonging to the same type and/or different types as the target merchandise in the merchandise recommendation area.
In a fifth aspect of the embodiments of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; a memory for storing a computer program; a processor configured to implement the method according to any one of the first aspect and/or the second aspect when executing a program stored on a memory.
In a further aspect of embodiments of the present invention, there is also provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of any of the first and/or second aspects described above.
In a further aspect of embodiments of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first and/or second aspects described above.
In the embodiment of the invention, the shopping track information of all the users is acquired according to the preset period, and the shopping track graphs of all the commodities and all the users are generated according to the shopping track information. Then, setting an objective function and constraint conditions for each commodity recommendation region to be divided, and dividing the top point in the shopping track graph into corresponding commodity recommendation regions conforming to the objective function and constraint conditions according to a preset dividing algorithm. When the target commodity is recommended, the commodity recommendation area to which the target commodity belongs can be determined, and then the same type of commodity and/or different types of commodity in the commodity recommendation area to which the target commodity belongs are recommended, so that the technical problem that the conventional commodity recommendation algorithm only recommends the same type of commodity as the target commodity can be solved, the types of recommended commodity are enriched, the accuracy of commodity recommendation is improved, and the effectiveness of commodity recommendation is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flow chart of steps of a method for dividing commodities according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating steps of a method for recommending a commodity according to an embodiment of the present invention.
Fig. 3 is a frame diagram of a commodity multi-objective association degree division recommendation method based on shopping track information in an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a commodity dividing device according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a commodity recommending apparatus according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
The embodiment of the invention can provide a commodity dividing method based on shopping track information aiming at the shopping track information of the existing user. The dividing method can divide all commodities into a plurality of commodity recommendation areas according to the degree of association of shopping tracks, wherein the compactness between commodities in each commodity recommendation area is maximized, the compactness between commodities in different commodity recommendation areas is minimized, and the communication time load of each commodity recommendation area is balanced. When a user waits to purchase a target commodity, other commodities in a commodity recommendation area to which the target commodity belongs can be recommended to the user, so that the commodity which the user expects to purchase is effectively recommended, the commodity recommendation accuracy is improved, the commodity recommendation effectiveness is ensured, the user viscosity is further improved, and the shopping experience is improved.
Referring to fig. 1, a step flow diagram of a method for dividing commodities according to an embodiment of the present invention is shown. The partitioning method may specifically include the following steps.
And step 101, acquiring shopping track information of all users according to a preset period.
In an embodiment of the present invention, the shopping trail information may represent the purchase of all the goods by all the users. Shopping trail information may be generated based on order data for all items, and may include, but is not limited to: attribute information of the commodity such as commodity name, number, type, use, etc., related information of a purchasing user of the commodity such as user name, user ID, etc., purchasing information of the commodity such as purchasing time, order number, etc.
And 102, generating a shopping track graph of all commodities and all users according to the shopping track information.
In an embodiment of the present invention, the shopping track graph may be an undirected graph, and the shopping track graph may include, but is not limited to: vertices and edges. Wherein the vertex represents a commodity and the edge represents a relationship between two commodities. V= { V i The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, |v| } is a set of |v| items in the shopping track graph, e= { E ij ;i,j=1,2,…,|V|;i≠j;e ij =e ji The number of edges is |E| and E ij Connection vertex v i And v j . The shopping track information of the user can be a commodity vertex subset V '= { V' i The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, |v '| } where V' i Representing a certain commodity purchased by the user, and V' represents all commodity sets purchased by the user, being a subset of all commodity sets. Edge e ij ∈E。e ij The weight is initially 0, and the commodity vertex subset V ' = { V ' related to the shopping track information of a certain user ' i The method comprises the steps of carrying out a first treatment on the surface of the i=1, 2, …, |v' | } forAnd i.noteq.j, edge e ij The weight is increased by 1.
In practical application, one piece of shopping track information may be a vertex subset, which represents all purchased commodity sets, the edge weights of any two vertices in the commodity sets should be 1, after the second piece of shopping track information is obtained, the edge weights are accumulated on all edge weights generated by the first piece of shopping track information, for example, the first piece of shopping track information relates to commodities with snoworder, finda and cola, the second piece of shopping track information relates to commodities with snoworder and finda, the weights generated by the two pieces of shopping track information should be changed into 2 from snoworder and finda, the snoworder cola is only 1, and the finda cola is only 1.
Generating a shopping trace graph based on shopping trace information refers to assigning all vertices to MN non-empty and disjoint commodity recommendation regions { M ] 1 ,M 2 ,…,M MN In }, hereAnd (5) representing a vertex set belonging to the kth commodity recommendation area in the shopping track graph. The generated shopping trace graph also needs to satisfy the following conditions:
the number of commodity recommendation regions MN satisfies: 1-Mn-V;
quantity M of goods in commodity recommendation area k The method meets the following conditions: m is not less than 1% k |≤|V|,k=1,2,…,MN;
Commodity recommendation regions do not intersect:
the merchandise recommendation area is not empty:
all commodity recommendation areas contain all commodities: m is M 1 ∪…M k ∪…M MN =V
And 103, setting an objective function and constraint conditions for each commodity recommendation area to be divided.
In an embodiment of the present invention, the objective function may represent a degree of association of the merchandise in the merchandise recommendation area, and a communication time of the merchandise recommendation area. The constraints may represent that the merchandise belongs to a unique merchandise recommendation area, the number of merchandise recommendation areas, and the number of merchandise within a merchandise recommendation area.
It should be noted that, the step 103 may be performed at any time before the subsequent step 104, for example, in the order of the step 101, the step 102, and the step 103, or the step 103 may be performed in parallel with the step 101 or the step 102, or the like. The execution of step 103 does not affect the execution of steps 101 and 102.
And 104, dividing the vertexes in the shopping track graph into corresponding commodity recommendation areas conforming to the objective function and the constraint condition according to a preset dividing algorithm.
In embodiments of the present invention, the commodity recommendation area from which all commodities are divided may include associated commodities of the same type and/or different types. That is, all of the merchandise is partitioned into a plurality of merchandise recommendation areas including the associated same type and/or different types of merchandise according to the shopping track information, the objective function, the constraint condition, and the partitioning algorithm of all of the users.
According to the commodity dividing method provided by the embodiment of the invention, the shopping track information of all users is obtained according to the preset period, and the shopping track graphs of all commodities and all users are generated according to the shopping track information. Then, setting an objective function and constraint conditions for each commodity recommendation region to be divided, and dividing the top point in the shopping track graph into corresponding commodity recommendation regions conforming to the objective function and constraint conditions according to a preset dividing algorithm. When the target commodity is recommended, the commodity recommendation area to which the target commodity belongs can be determined, and then the same type of commodity and/or different types of commodity in the commodity recommendation area to which the target commodity belongs are recommended, so that the technical problem that the conventional commodity recommendation algorithm only recommends the same type of commodity as the target commodity can be solved, the types of recommended commodity are enriched, the accuracy of commodity recommendation is improved, and the effectiveness of commodity recommendation is guaranteed.
In an exemplary embodiment of the present invention, when the objective function and the constraint condition are set for each commodity recommendation region to be divided, the first objective function, the second objective function, the first constraint condition, the second constraint condition, and the third constraint condition may be set for each commodity recommendation region.
In practical applications, the first objective function is used for setting the association degree of the commodities in the commodity recommendation regions to be the maximum value, and is also used for setting the association degree of the commodities in the commodity recommendation regions to be the minimum value. The first objective function may represent that the sum of weights of edges formed by items within the respective item recommendation regions is a maximum. The weight of the edge can represent the degree of correlation between two commodities, and the larger the weight is, the more compact the degree of correlation between the two commodities is; the smaller the weight, the more distant the correlation between two items. When the sum of the weights of the edges in all commodity recommendation regions is the maximum value, the correlation degree between commodities in the commodity recommendation regions is the closest.
The sum f of the weights of the edges formed by the commodities in the commodity recommendation regions 1 Can be expressed as:
wherein k represents the number of commodity recommendation regions, MN represents the number of commodity recommendation regions, i, j represents the number of commodities, |V| represents the number of all commodities, and C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C jk Representing the attribution relationship between the jth commodity and the kth commodity recommendation area, omega ij The weight of the edge formed by the ith commodity and the jth commodity is represented. When C ik When=1, it means that the ith commodity belongs to the kth commodity recommendation area, when C ik When=0, it means that the ith commodity does not belong to the kth commodity recommendation area. Similarly, when C jk When=1, it means that the jth commodity belongs to the kth commodity recommendation region, when C jk When=0, it means that the jth commodity does not belong to the kth commodity recommendation area. i=1, 2, …, |v|, k=1, 2, …, MN.
It should be noted that, the correlation degree between the commodities in the commodity recommendation region is the closest, i.e. the correlation degree between the commodities in the commodity recommendation region is the furthest, and the coupling between the commodity recommendation regions is the lowest.
In practical applications, if the number of goods in each goods recommendation area is huge, each goods recommendation area can be respectively stored on a separate cloud node. If one piece of shopping track information relates to commodities in 4 commodity recommendation areas, 4 cloud nodes are required to be accessed respectively to acquire commodity information. If one piece of shopping track information only relates to the commodity in 1 commodity recommendation area, only 1 cloud node needs to be accessed. Therefore, the second objective function is to solve the problem of accessing as few cloud nodes as possible, and the second objective function is used for setting the communication time of each commodity recommendation interval to be a minimum value, that is, the second objective function may represent that the communication time of each commodity recommendation interval is a minimum value.
Communication time f of commodity recommendation interval 2 Can be expressed as
Wherein c represents the communication time for reading a commodity recommendation area, l represents the serial number of the shopping track information, tr represents the number of the shopping track information, k represents the serial number of the commodity recommendation area, MN represents the number of the commodity recommendation area, and d lk And the correlation between the information of the first shopping track and the kth commodity recommendation area is represented. When d lk When=1, the first shopping track information is related to the kth commodity recommendation area; when d lk When=0, the first shopping trace information is not related to the kth commodity recommendation area.
In practical applications, a commodity should belong to a commodity recommendation region at a certain moment, and only belong to a commodity recommendation region. The first constraint is used for dividing each commodity into corresponding commodity recommendation regions, namely the first constraint represents the attribution relation between one commodity and any commodity recommendation region. The first constraint may be expressed as
Wherein k represents the serial number of commodity recommendation region, MN represents the number of commodity recommendation region, C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C ik =1 indicates that the ith commodity belongs to the kth commodity recommendation area at one moment, C ik =0 indicates that the ith commodity does not belong to the kth commodity recommendation region at one time, i=1, 2, …, |v|, and|v| indicate the number of total commodities.
In practice, the number of commodity recommendation regions should be within a certain range or an appropriate value. Therefore, the second constraint condition is used for setting the number of the commodity recommendation regions, that is, the second constraint condition indicates that the number of the commodity recommendation regions is within the preset commodity recommendation region number range or is a preset numerical value. I.e. MN min ≤MN≤MN max ;or MN=MN fix ;MN min >1;MN max <|V|;
Wherein MN represents the number of commodity recommendation regions, MN min Minimum value representing commodity recommendation region quantity range, MN max Representing the maximum value of the commodity recommendation region number range, MN fix Representing a preset value, |v| representing the number of total goods. The preset numerical value can be obtained empirically or experimentally, and the value of the preset numerical value is not particularly limited in the embodiment of the invention.
In practice, the number of products in each product recommendation area should also be withinWithin a suitable range. Therefore, the third constraint condition is used for setting the number of the commodities in the commodity recommendation region, namely the third constraint condition indicates that the number of the commodities in the commodity recommendation region is in a preset commodity data range. I.e. M min ≤|M k |≤M max ;M min ≥1;M max ≤|V|;k=1,2,…,MN;
Wherein k represents the serial number of commodity recommendation area, |M k I represents the number of items in the kth item recommendation area, M min Representing the minimum value of the commodity quantity range, M max Represents the maximum value of the commodity number range, and V represents the number of all commodities.
In an exemplary embodiment of the present invention, when vertices in a shopping trajectory graph are divided into corresponding commodity recommendation regions conforming to an objective function and constraint conditions according to a preset division algorithm, an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping trajectory graph may be created; and dividing the vertexes in the shopping track graph into corresponding commodity recommendation regions conforming to the objective function and the constraint condition according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator. When the vertexes in the shopping track graph are divided into corresponding commodity recommendation regions which accord with the objective function and the constraint condition according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator, a dividing result set can be output according to the initializing algorithm, and the dividing result set represents that the vertexes in the shopping track graph are divided into a plurality of commodity recommendation regions; outputting a target division result from the division result set according to a division algorithm, a selection operator, a crossover operator and a mutation operator; the target division result comprises the number of commodity recommendation regions, the number of commodities in each commodity recommendation region and attribute information of the commodities in each commodity recommendation region.
The following describes and describes each of the above algorithms in detail.
Each shopping track graph represents a solution of a second generation Non-dominant set ordering genetic algorithm (Non-dominated Sorting Genetic Algorithm-II, NSGA-II), an individual in a first generation population and a recommended scheme. In the actual dividing process, in order to avoid generating an infeasible solution, the solution is always limited by adopting a first constraint condition, a second constraint condition and a third constraint condition. Based on this, an initialization algorithm is designed:
input: all commodities of the shopping track graph; number of commodity recommendation regions MN; maximum number M of goods in commodity recommendation area max
And (3) outputting: individual ind in a population i
The initialization algorithm works as follows: selecting MN commodities randomly as initial vertexes of commodity recommendation regions, starting traversing all commodity recommendation regions, selecting a commodity which is not placed in any commodity recommendation region and is connected with any commodity in the commodity recommendation region, and if the rest commodities are found to have no shopping track relation with any commodity in the existing commodity recommendation region, randomly merging the rest commodities into one commodity recommendation region. Repeating until all the commodities belong to a commodity recommendation area. Algorithm analysis: the time complexity of extracting k vertexes from the vertex set is O (1), and the time complexity of traversing the vertexes and filling the commodity recommendation area is O (N) 2 ). The time complexity of the algorithm is therefore O (N 2 ). Compared with the traditional population initialization algorithm, the algorithm can avoid the generation of infeasible solutions, prevent the influence on the use of the actual production environment during output, has higher randomness during initialization, increases population diversity and quickens the overall convergence speed of the algorithm.
According to the embodiment of the invention, the optimal individuals are comprehensively judged through the first objective function and the second objective function, how to evaluate the advantages and disadvantages of the individuals on the first objective function and the second objective function can be realized, a non-dominant set ordering method can be adopted, and all the individuals in the population are subjected to non-dominant set ordering to screen out the optimal individuals in each generation, so that the mating pool is gradually expanded, and the convergence of the new population is ensured. On the basis, the embodiment of the invention designs a selection operator for the shopping track graph to expand a mating pool. Designing a selection operator algorithm based on non-dominant set ordering:
input of the r generation population G r The method comprises the steps of carrying out a first treatment on the surface of the Mating pool Scale P size
Export mating pool P r
The specific idea of the selection algorithm based on non-dominant set ordering is as follows: the two solutions are randomly selected and compared using non-dominant ranking, solutions with higher convergence and diversity are selected for storage in the pool, and cycled back and forth until the pool reaches a predefined size, typically equal to the population size of the genetic algorithm. In this algorithm, for G r The time complexity of the rapid non-dominant ordering is O (Nlog N), the time complexity of the extended pool is O (N), and therefore the time complexity of the algorithm is O (Nlog N). The selection algorithm of the non-dominant set ordering can search individuals more in accordance with actual demands under different trends, and the result with the highest diversity is obtained.
The crossover operator designed for the shopping track graph is mainly responsible for generating new individuals from parent individuals, and reconstructing the next generation population from each new individual. Crossover operators are also an important means of expanding population diversity, and overlapping commodity recommendation regions are optimized by re-labeling in order to prevent commodity recommendation region conflicts in new solutions. Designing a crossover operator algorithm:
input mating pool P r
Output of next generation individual ind (r+1)i
1 at P r Two individual ind are randomly selected ri And ind rj
2 at the solution ind ri (ind rj ) Any one of the random choicesCommodity recommendation area, and add rj (ind ri ) The value of the corresponding position in is replaced by ind ri (ind rj ) The new solution is saved as a new individual ind (r+1)i
3 re-labelling of new individual ind (r+1)i . Judging whether the commodities in the same commodity recommendation area are connected with each other or not, if not, marking the commodities as a new commodity recommendation area;
4:return ind (r+1)i
cross algorithm analysis: randomly extracting mating pool P r The time complexity of the two individuals in (a) is O (1), the time complexity of the commodity recommendation area replacement is O (1), the time complexity of the new individuals are re-marked is O (N), and therefore the time complexity of the algorithm is O (N). Compared with the traditional crossover operator, the algorithm can effectively avoid the crossover operation from generating an infeasible solution, so that a new individual can still represent a layout result. And the application of the re-marking mode ensures that each new individual does not influence parent individuals in the original population, improves the adaptability of the new individuals and prevents individual collision.
In order to prevent continuous divergence of individual merits, the embodiment of the invention designs a mutation operator aiming at a shopping track graph to ensure convergence, part of individuals are randomly extracted, commodity recommendation areas to which the individuals belong are randomly replaced for part of commodities in the individuals, and a merit factor is calculated and is reserved if the merit factor is superior to the original individuals. Designing a mutation operator algorithm:
input of individual ind ri
Output of individual ind ri
And (3) analyzing a mutation operator algorithm: randomly extracting the time complexity of a commodity set at the boundary of a commodity recommendation area in an individual as O (1), transferring to the adjacent commodity recommendation area as O (1), and re-marking as O (N), so that the time complexity of the algorithm is as O (N). Compared with the traditional mutation operator algorithm, the mutation operator algorithm has more specificity in order to meet the layout requirement of a shopping track graph, can search for neighborhood commodities in a commodity recommendation region and migrate on the premise of meeting constraint conditions, and ensures the feasibility of individuals after mutation.
After initializing an individual, a selection operator, a crossover operator and a mutation operator included in a main NSGA-II algorithm of a shopping track graph are realized, in order to enable the algorithm to converge as soon as possible, the embodiment of the invention designs a master-slave-coarse-granularity multi-target division algorithm for the shopping track graph, and the main idea of the algorithm is as follows: (1) After initializing the population by each sub-node, reporting the optimal individuals of the main node after carrying out specified iteration GN times; (2) The master node calculates individual quality factors provided by all the slave nodes by using the non-dominant set sorting; (3) The main node judges whether the optimal individual accords with an expected target threshold or reaches the maximum iteration number; (4) And if the result meets the expectation, issuing a notification sub-node to stop iteration, outputting an optimal result, and if the result does not meet the expectation, continuing operation. NSGA-II-based shopping track graph master-slave type-coarse granularity multi-objective dividing algorithm:
inputting all commodities of a shopping track graph;
output of optimal individual ind ri
NSGA-II-based shopping track graph master-slave type-coarse granularity multi-objective division algorithm analysis: when the algorithm terminates, the individual ind of the output ri The optimal shopping track graph layout mode is adopted, wherein commodities are distributed according to commodity recommendation regions with highest association degree, and the time complexity of the algorithm is O (N) except NSGA-II and non-dominant set ordering algorithm.
The embodiment of the invention aims at the problems of limitation (low product category coverage, incapability of intelligent adaptation, low conversion rate, occupied flow rate inlet) and the like when the traditional recommendation method is used for recommending commodities according to browsing relativity, and the commodity multi-target association degree division recommendation method based on shopping track information can successfully output an optimal shopping track graph individual after the algorithm is adopted, in the actual recommendation process, firstly, the commodity recommendation area of the target commodity to be purchased by a user is judged, and after the commodity recommendation area of the target commodity is locked, other commodities in the commodity recommendation area are recommended to the user, namely, similar and non-similar other commodities with highest potential purchase rate are recommended to the user. And when the user purchases, the derivative product with the highest shopping association degree is rapidly recommended, commodity recommendation logic is enriched, and commodity recommendation effectiveness is improved.
Furthermore, the overall time complexity does not exceed O (N 2 ) The convergence speed is high. Compared with other heuristic algorithms of the same kind, the commodity multi-target association degree division recommendation method based on the shopping track information can modify constraint conditions according to different requirements of actual production environments, so that an individual generates a certain tendency on a certain target, and the new individual generated by each operator of the algorithm can be guaranteed to be a feasible solution.
As shown in fig. 2, a step flow diagram of a commodity recommendation method according to an embodiment of the present invention is shown. The recommendation method may specifically include the following steps.
Step 201, obtaining attribute information of a target commodity.
In an embodiment of the present invention, the target commodity may be a commodity to be purchased by a user, and the attribute information may include, but is not limited to: name, number, type, use, etc.
Step 202, matching the target commodity to the commodity recommendation area according to the attribute information.
In the embodiment of the present invention, the commodity recommendation area may be obtained by executing the above commodity dividing method. The goods in the goods recommendation area have respective attribute information. The attribute information of the target commodity can be compared with the attribute information of each commodity in each commodity recommendation region, and if the attribute information of the target commodity is matched with the attribute information of a commodity in a commodity recommendation region, the commodity recommendation region is determined to be the commodity recommendation region to which the target commodity belongs. When comparing according to the attribute information, the number with uniqueness in the attribute information can be used for comparison, and the comparison object, the comparison condition and the like according to which the attribute information is compared are not particularly limited.
And step 203, recommending the matched commodities in the commodity recommendation area.
After matching to the commodity recommendation area to which the target commodity belongs, the matched commodity recommendation area can recommend commodities which belong to the same type as the target commodity and/or belong to different types as the target commodity to the user at the flow inlet.
Based on the above description about a commodity dividing method and a commodity recommending method, a commodity multi-objective association dividing recommending method based on shopping track information is described below. Fig. 3 is a frame diagram of a commodity multi-objective association degree division recommendation method based on shopping track information according to an embodiment of the present invention. The commodity multi-target association degree division recommendation method mainly comprises three parts of contents.
And I, constructing a shopping track graph. II, formulating a multi-objective problem. III, parallel multi-target balanced division method.
The following describes the three parts in detail.
And I, 1.1, acquiring attribute information of all commodities.
1.2 acquiring order data of all users.
And 1.3, constructing a vertex set of the shopping track graph according to the attribute information of all the commodities.
1.4 constructing an edge set of the shopping track graph according to order data of all users.
II, 2.1 target formulation for maximizing the degree of association between commodities in commodity recommendation regions.
2.2 target formulation for minimizing the degree of correlation between goods in the goods recommendation interval.
2.3 goal formulation for minimizing communication time across commodity recommendation regions.
2.4 balances the constraints of commodity recommendation area size.
III, constructing a selection operator, a crossover operator and a mutation operator.
And 3.2, setting up master-slave type-coarse-granularity multi-target genetic algorithm operation nodes.
3.3 each child node generates a new generation child population through a selection operator, a crossover operator and a mutation operator, and transmits the new generation child population to the main node.
And 3.4, the main node judges whether the optimal solution of the new generation population meets the expectations or not by using non-dominant sorting until the optimal solution is obtained.
According to the embodiment of the invention, the objective function and the constraint condition are constructed, and the actual problem in commodity recommendation is effectively formulated.
According to the embodiment of the invention, based on an NSGA-II algorithm, an initialization algorithm, a selection operator, a crossover operator and a mutation operator for commodity correlation degree are designed, a shopping track graph is subjected to static optimization division, and the divided commodity recommendation regions are stored in each cloud platform node, so that commodity correlation in the commodity recommendation region is maximized, commodity correlation in the commodity recommendation region is minimized, and scale balance of the commodity recommendation region and communication time crossing the commodity recommendation region are minimized.
As shown in fig. 4, a schematic structural diagram of a commodity dividing apparatus according to an embodiment of the present invention is shown. The dividing means may comprise the following modules.
A first obtaining module 41, configured to obtain shopping track information of all users according to a preset period, where the shopping track information represents purchase conditions of all the users on all the commodities;
a generating module 42, configured to generate a shopping track graph of the all commodities and the all users according to the shopping track information, where the shopping track graph includes vertices and edges, the vertices represent the commodities, and the edges represent correlation relationships between the commodities;
the setting module 43 is configured to set an objective function and a constraint condition for each commodity recommendation area to be divided, where the objective function represents a degree of association of commodities in the commodity recommendation area, and a communication time between the commodity recommendation areas, and the constraint condition represents that the commodities belong to a unique commodity recommendation area, the number of commodity recommendation areas, and the number of commodities in the commodity recommendation area, and the commodity recommendation area contains related commodities belonging to the same type and/or different types;
the dividing module 44 is configured to divide the vertices in the shopping track graph into corresponding commodity recommendation regions according to the objective function and the constraint condition according to a preset dividing algorithm.
In an exemplary embodiment of the present invention, the setting module 43 is configured to set a first objective function, a second objective function, a first constraint, a second constraint, and a third constraint for each merchandise recommendation area;
the first objective function is used for setting the association degree of the commodities in the commodity recommendation regions to be the maximum value, the first objective function is also used for setting the association degree of the commodities in the commodity recommendation regions to be the minimum value, the second objective function is used for setting the communication time of the commodity recommendation regions to be the minimum value, the first constraint condition is used for dividing each commodity into the corresponding commodity recommendation regions, the second constraint condition is used for setting the number of the commodity recommendation regions, and the third constraint condition is used for setting the number of the commodities in the commodity recommendation regions.
In an exemplary embodiment of the present invention, the first objective function represents that a sum of weights of edges formed by articles in the respective article recommendation regions is a maximum, the sum of weights being
Wherein k represents the number of commodity recommendation regions, MN represents the number of commodity recommendation regions, i, j represents the number of commodities, |V| represents the number of all commodities, and C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C jk Representing the attribution relationship between the jth commodity and the kth commodity recommendation area, omega ij A weight representing an edge formed by the ith commodity and the jth commodity;
the second objective function represents that the communication time of the commodity recommendation interval is the minimum value, and the communication time is
Wherein c represents the communication time for reading a commodity recommendation area, l represents the serial number of the shopping track information, tr represents the number of the shopping track information, k represents the serial number of the commodity recommendation area, MN represents the number of the commodity recommendation area, and d lk Representing a correlation between the first shopping track information and the kth commodity recommendation area;
the first constraint represents the attribution relation between one commodity and any commodity recommendation area, and the first constraint represents
Wherein k represents the serial number of commodity recommendation region, MN represents the number of commodity recommendation region, C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C ik =1 indicates that the ith commodity belongs to the kth commodity recommendation area at one time, i=1, 2, …, |v| indicates the number of all commodities;
the second constraint condition indicates that the number of commodity recommendation regions is within a preset commodity recommendation region number range or is a preset numerical value;
The third constraint condition indicates that the number of commodities in the commodity recommendation area is within a preset commodity data range.
In an exemplary embodiment of the present invention, the dividing module 44 includes:
the algorithm operator creation module is used for creating an initialization algorithm, a selection operator, a crossing operator and a mutation operator of the shopping track graph;
and the vertex dividing module is used for dividing the vertex in the shopping track graph into corresponding commodity recommendation areas conforming to the objective function and the constraint conditions according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator.
In an exemplary embodiment of the present invention, the vertex division module includes:
the dividing result set output module is used for outputting a dividing result set according to an initialization algorithm, wherein the dividing result set represents that the vertexes in the shopping track graph are divided into a plurality of commodity recommendation areas;
the target division result output module is used for outputting a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator and the mutation operator;
The target division result comprises the number of commodity recommendation regions, the number of commodities in each commodity recommendation region and attribute information of the commodities in each commodity recommendation region.
Fig. 5 is a schematic structural diagram of a commodity recommending apparatus according to an embodiment of the present invention. The dividing means may comprise the following modules.
A second acquiring module 51, configured to acquire attribute information of a target commodity;
a matching module 52, configured to match, according to the attribute information, a commodity recommendation area to which the target commodity belongs, where the commodity recommendation area is obtained by dividing by the dividing device of the commodity as described above;
and the recommending module 53 is used for recommending the matched commodities in the commodity recommendation area.
In an exemplary embodiment of the present invention, the recommendation module 53 is configured to recommend items within the merchandise recommendation area that are of the same type and/or different types as the target items.
The description of the above embodiment of the apparatus is relatively simple, and the relevant parts may refer to the relevant parts in the above embodiment of the method, which are not described herein.
The embodiment of the invention also provides an electronic device, as shown in fig. 6, which comprises a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62 and the memory 63 complete communication with each other through the communication bus 64,
A memory 63 for storing a computer program;
the processor 61 is configured to execute the program stored in the memory 63, and implement the following steps:
acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchase condition of all the users on all the commodities; generating a shopping track graph of all commodities and all users according to the shopping track information, wherein the shopping track graph comprises vertexes and edges, the vertexes represent the commodities, and the edges represent the correlation between the commodities; setting an objective function and constraint conditions for each commodity recommendation region to be divided, wherein the objective function represents the association degree of commodities in the commodity recommendation region, the association degree of commodities in the commodity recommendation region and the communication time of the commodity recommendation region, the constraint conditions represent the commodities belonging to the unique commodity recommendation region, the number of commodity recommendation regions and the number of commodities in the commodity recommendation region, and the commodity recommendation region comprises related commodities belonging to the same type and/or different types; and dividing the vertexes in the shopping track graph into corresponding commodity recommendation areas conforming to the objective function and the constraint conditions according to a preset dividing algorithm.
Setting a first objective function, a second objective function, a first constraint condition, a second constraint condition and a third constraint condition for each commodity recommendation region to be divided when setting the objective function and the constraint condition for each commodity recommendation region to be divided; the first objective function is used for setting the association degree of the commodities in the commodity recommendation regions to be the maximum value, the first objective function is also used for setting the association degree of the commodities in the commodity recommendation regions to be the minimum value, the second objective function is used for setting the communication time of the commodity recommendation regions to be the minimum value, the first constraint condition is used for dividing each commodity into the corresponding commodity recommendation regions, the second constraint condition is used for setting the number of the commodity recommendation regions, and the third constraint condition is used for setting the number of the commodities in the commodity recommendation regions.
The first objective function represents that the sum of the weights of the edges formed by the commodities in the commodity recommendation regions is maximum, and the sum of the weights isWherein k represents the number of commodity recommendation regions, MN represents the number of commodity recommendation regions, i, j represents the number of commodities, |V| represents the number of all commodities, and C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C jk Representing the attribution relationship between the jth commodity and the kth commodity recommendation area, omega ij A weight representing an edge formed by the ith commodity and the jth commodity; the second objective function represents that the communication time of the commodity recommendation interval is the minimum value, and the communication time is +.>Wherein c represents the communication time for reading a commodity recommendation area, l represents the serial number of the shopping track information, tr represents the number of the shopping track information, k represents the serial number of the commodity recommendation area, MN represents the number of the commodity recommendation area, and d lk Representing a correlation between the first shopping track information and the kth commodity recommendation area; the first constraint represents the attribution relation between one commodity and any commodity recommendation area, and the first constraint represents +.>Wherein k represents the serial number of commodity recommendation region, MN represents the number of commodity recommendation region, C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C ik =1 indicates that the ith commodity belongs to the kth commodity recommendation area at one time, i=1, 2, …, |v| indicates the number of all commodities; the second constraint condition indicates that the number of commodity recommendation regions is within a preset commodity recommendation region number range or is a preset numerical value; the third constraint condition indicates that the number of commodities in the commodity recommendation area is within a preset commodity data range.
When the vertexes in the shopping track graph are divided into corresponding commodity recommendation areas conforming to the objective function and the constraint conditions according to a preset division algorithm, an initialization algorithm, a selection operator, a crossing operator and a mutation operator of the shopping track graph are created; and dividing the vertexes in the shopping track graph into corresponding commodity recommendation regions conforming to the objective function and the constraint conditions according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator.
When the vertexes in the shopping track graph are divided into corresponding commodity recommendation regions conforming to the objective function and the constraint conditions according to the dividing algorithm, the initializing algorithm, the selecting operator, the crossing operator and the mutation operator, a dividing result set is output according to the initializing algorithm, and the dividing result set represents that the vertexes in the shopping track graph are divided into a plurality of commodity recommendation regions; outputting a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator and the mutation operator; the target division result comprises the number of commodity recommendation regions, the number of commodities in each commodity recommendation region and attribute information of the commodities in each commodity recommendation region.
The processor 61 is further configured to execute the program stored in the memory 63, thereby implementing the following steps:
acquiring attribute information of a target commodity; matching the attribute information to a commodity recommendation region to which the target commodity belongs, wherein the commodity recommendation region is obtained by dividing according to the commodity dividing method; and recommending the matched commodities in the commodity recommendation area.
And recommending the commodities in the commodity recommendation region which are matched with the target commodity to belong to the same type and/or different types of commodities in the commodity recommendation region.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, where instructions are stored, which when executed on a computer, cause the computer to perform the method for dividing and/or the method for recommending commodities according to any of the above embodiments.
In yet another embodiment of the present invention, a computer program product containing instructions, which when run on a computer, causes the computer to perform the method of dividing and/or recommending goods according to any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (9)

1. A method of dividing a commodity, comprising:
acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchase condition of all the users on all the commodities;
generating a shopping track graph of all commodities and all users according to the shopping track information, wherein the shopping track graph comprises vertexes and edges, the vertexes represent the commodities, and the edges represent the correlation between the commodities;
setting an objective function and constraint conditions for each commodity recommendation region to be divided, wherein the objective function represents the association degree of commodities in the commodity recommendation region, the association degree of commodities in the commodity recommendation region and the communication time of the commodity recommendation region, the constraint conditions represent the commodities belonging to the unique commodity recommendation region, the number of commodity recommendation regions and the number of commodities in the commodity recommendation region, and the commodity recommendation region comprises related commodities belonging to the same type and/or different types;
Dividing the top point in the shopping track graph into corresponding commodity recommendation regions conforming to the objective function and the constraint condition according to a preset dividing algorithm, wherein the method comprises the following steps: creating an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track graph; outputting a division result set according to the initialization algorithm, wherein the division result set represents that the vertex in the shopping track graph is divided into a plurality of commodity recommendation areas; outputting a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator and the mutation operator; the target division result comprises the number of commodity recommendation regions, the number of commodities in each commodity recommendation region and attribute information of the commodities in each commodity recommendation region.
2. The method of claim 1, wherein the setting of objective functions and constraints for each commodity recommendation area to be divided comprises:
setting a first objective function, a second objective function, a first constraint condition, a second constraint condition and a third constraint condition for each commodity recommendation region;
the first objective function is used for setting the association degree of the commodities in the commodity recommendation regions to be the maximum value, the first objective function is also used for setting the association degree of the commodities in the commodity recommendation regions to be the minimum value, the second objective function is used for setting the communication time of the commodity recommendation regions to be the minimum value, the first constraint condition is used for dividing each commodity into the corresponding commodity recommendation regions, the second constraint condition is used for setting the number of the commodity recommendation regions, and the third constraint condition is used for setting the number of the commodities in the commodity recommendation regions.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the first objective function represents that the sum of the weights of the edges formed by the commodities in the commodity recommendation regions is maximum, and the sum of the weights is
Wherein k represents the number of commodity recommendation regions, MN represents the number of commodity recommendation regions, i, j represents the number of commodities, |V| represents the number of all commodities, and C ik Representing the affiliation relationship between the ith commodity and the kth commodity recommendation area, cj k Representing the attribution relationship between the jth commodity and the kth commodity recommendation area, omega ij A weight representing an edge formed by the ith commodity and the jth commodity;
the second objective function represents that the communication time of the commodity recommendation interval is the minimum value, and the communication time is
Wherein c represents the communication time for reading a commodity recommendation area, l represents the serial number of the shopping track information, tr represents the number of the shopping track information, k represents the serial number of the commodity recommendation area, MN represents the number of the commodity recommendation area, and d lk Representing a correlation between the first shopping track information and the kth commodity recommendation area;
the first constraint represents the attribution relation between one commodity and any commodity recommendation area, and the first constraint represents
Wherein k represents the serial number of commodity recommendation region, MN represents the number of commodity recommendation region, C ik Representing the attribution relationship between the ith commodity and the kth commodity recommendation area, C ik =1 indicates that the ith commodity belongs to the kth commodity recommendation area at one time, i=1, 2, …, |v| indicates the number of all commodities;
the second constraint condition indicates that the number of commodity recommendation regions is within a preset commodity recommendation region number range or is a preset numerical value;
the third constraint condition indicates that the number of commodities in the commodity recommendation area is within a preset commodity data range.
4. A method for recommending a commodity, comprising:
acquiring attribute information of a target commodity;
matching the attribute information to a commodity recommendation area to which the target commodity belongs, wherein the commodity recommendation area is obtained by dividing according to the commodity dividing method according to any one of claims 1-3;
and recommending the matched commodities in the commodity recommendation area.
5. The method of claim 4, wherein the recommendation matches the merchandise within the merchandise recommendation area, comprising:
and recommending commodities which belong to the same type and/or different types with the target commodity in the commodity recommendation area.
6. A commodity dividing apparatus, comprising:
the first acquisition module is used for acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchase condition of all the users on all the commodities;
the generation module is used for generating shopping track graphs of all commodities and all users according to the shopping track information, wherein the shopping track graphs comprise vertexes and edges, the vertexes represent the commodities, and the edges represent the correlation among the commodities;
the system comprises a setting module, a setting module and a constraint condition, wherein the setting module is used for setting an objective function and a constraint condition for each commodity recommendation region to be divided, the objective function represents the association degree of commodities in the commodity recommendation region, the association degree of commodities in the commodity recommendation region and the communication time of the commodity recommendation region, the constraint condition represents the number of commodities belonging to the commodity recommendation region of the unique commodity recommendation region and the number of commodities in the commodity recommendation region, and the commodity recommendation region contains related commodities belonging to the same type and/or different types;
the dividing module is used for dividing the vertex in the shopping track graph into corresponding commodity recommendation areas conforming to the objective function and the constraint condition according to a preset dividing algorithm, and comprises the following steps: creating an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track graph; outputting a division result set according to the initialization algorithm, wherein the division result set represents that the vertex in the shopping track graph is divided into a plurality of commodity recommendation areas; outputting a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator and the mutation operator; the target division result comprises the number of commodity recommendation regions, the number of commodities in each commodity recommendation region and attribute information of the commodities in each commodity recommendation region.
7. A commodity recommendation device, comprising:
the second acquisition module is used for acquiring attribute information of the target commodity;
the matching module is used for matching the commodity recommendation area to which the target commodity belongs according to the attribute information, wherein the commodity recommendation area is obtained by dividing the commodity according to the dividing device of the claim 6;
and the recommending module is used for recommending the matched commodities in the commodity recommendation area.
8. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1-5 when executing a program stored on a memory.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
CN202010247767.XA 2020-03-31 2020-03-31 Commodity dividing and recommending method and device, electronic equipment and storage medium Active CN111563791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247767.XA CN111563791B (en) 2020-03-31 2020-03-31 Commodity dividing and recommending method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247767.XA CN111563791B (en) 2020-03-31 2020-03-31 Commodity dividing and recommending method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111563791A CN111563791A (en) 2020-08-21
CN111563791B true CN111563791B (en) 2023-12-26

Family

ID=72073039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247767.XA Active CN111563791B (en) 2020-03-31 2020-03-31 Commodity dividing and recommending method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111563791B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381623B (en) * 2020-12-04 2021-07-06 深圳市快云科技有限公司 Electronic commerce platform commodity intelligent recommendation method based on big data analysis
CN117010554A (en) * 2023-07-03 2023-11-07 同济大学 Dynamic multi-objective optimization method and device applied to e-commerce recommendation system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002279279A (en) * 2001-03-22 2002-09-27 Just Syst Corp Commodity recommendation system, commodity recommendation method and commodity recommendation program
CN105868281A (en) * 2016-03-23 2016-08-17 西安电子科技大学 Location-aware recommendation system based on non-dominated sorting multi-target method
CN108460082A (en) * 2018-01-12 2018-08-28 北京三快在线科技有限公司 A kind of recommendation method and device, electronic equipment
CN108665333A (en) * 2017-03-31 2018-10-16 北京京东尚科信息技术有限公司 Method of Commodity Recommendation, device, electronic equipment and storage medium
CN110175286A (en) * 2019-05-17 2019-08-27 山东师范大学 It is combined into the Products Show method and system to optimization and matrix decomposition
CN110223137A (en) * 2019-05-22 2019-09-10 平安科技(深圳)有限公司 Product mix recommended method, device, computer equipment and storage medium
JP2019212126A (en) * 2018-06-06 2019-12-12 アスクル株式会社 Sales support system, sales support method, and sales support program
CN114202390A (en) * 2021-12-24 2022-03-18 珠海格力电器股份有限公司 Commodity recommendation method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002279279A (en) * 2001-03-22 2002-09-27 Just Syst Corp Commodity recommendation system, commodity recommendation method and commodity recommendation program
CN105868281A (en) * 2016-03-23 2016-08-17 西安电子科技大学 Location-aware recommendation system based on non-dominated sorting multi-target method
CN108665333A (en) * 2017-03-31 2018-10-16 北京京东尚科信息技术有限公司 Method of Commodity Recommendation, device, electronic equipment and storage medium
CN108460082A (en) * 2018-01-12 2018-08-28 北京三快在线科技有限公司 A kind of recommendation method and device, electronic equipment
JP2019212126A (en) * 2018-06-06 2019-12-12 アスクル株式会社 Sales support system, sales support method, and sales support program
CN110175286A (en) * 2019-05-17 2019-08-27 山东师范大学 It is combined into the Products Show method and system to optimization and matrix decomposition
CN110223137A (en) * 2019-05-22 2019-09-10 平安科技(深圳)有限公司 Product mix recommended method, device, computer equipment and storage medium
CN114202390A (en) * 2021-12-24 2022-03-18 珠海格力电器股份有限公司 Commodity recommendation method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于属性特性算法的商品推荐系统模型;邱京伟;;中国信息化(第06期);全文 *

Also Published As

Publication number Publication date
CN111563791A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
CN110969516B (en) Commodity recommendation method and device
US20220335501A1 (en) Item recommendations using convolutions on weighted graphs
CN111523976B (en) Commodity recommendation method and device, electronic equipment and storage medium
Ma et al. Improving recommender systems by incorporating social contextual information
CN111563791B (en) Commodity dividing and recommending method and device, electronic equipment and storage medium
Derr et al. Balance in signed bipartite networks
Jalayer et al. A hybrid algorithm based on community detection and multi attribute decision making for influence maximization
CN103870507A (en) Method and device of searching based on category
Zuva et al. A survey of recommender systems techniques, challenges and evaluation metrics
CN103995866A (en) Commodity information pushing method and device based on link forecasting
CN105654307A (en) Commodity recommendation method based on user feedback and commodity recommendation system
Gosh et al. Recommendation system for e-commerce using alternating least squares (ALS) on apache spark
Małecki et al. The classification of internet shop customers based on the cluster analysis and graph cellular automata
CN104346428A (en) Information processing apparatus, information processing method, and program
Cao et al. Distributed design and implementation of SVD++ algorithm for e-commerce personalized recommender system
Hu et al. Establishing Grey Criteria Similarity Measures for Multi-criteria Recommender Systems.
CN113760521A (en) Virtual resource allocation method and device
Li et al. An improved fuzzy clustering method for cellular manufacturing
CN111563792B (en) Commodity dividing and recommending method and device, electronic equipment and storage medium
Alshammari et al. Improved movie recommendations based on a hybrid feature combination method
WO2017095371A1 (en) Product recommendations based on selected user and product attributes
Balasubramaniam et al. People to people recommendation using coupled nonnegative boolean matrix factorization
Tran et al. Combining social relations and interaction data in Recommender System with Graph Convolution Collaborative Filtering
Chew et al. Recommender System for Retail Domain: An Insight on Techniques and Evaluations
Sahu et al. Personalized recommendation engine using HADOOP

Legal Events

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