CN111563791A - 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
CN111563791A
CN111563791A CN202010247767.XA CN202010247767A CN111563791A CN 111563791 A CN111563791 A CN 111563791A CN 202010247767 A CN202010247767 A CN 202010247767A CN 111563791 A CN111563791 A CN 111563791A
Authority
CN
China
Prior art keywords
commodity
commodities
recommending
area
recommendation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010247767.XA
Other languages
Chinese (zh)
Other versions
CN111563791B (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

Images

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 method, a device, electronic equipment and a storage medium for dividing and recommending commodities, wherein the dividing method comprises the following steps: acquiring shopping track information of all users according to a period; generating a shopping track curve graph of all commodities and all users according to the shopping track information; and setting a target function and a constraint condition for each commodity recommending area to be divided, and dividing the vertex in the shopping track curve graph into corresponding commodity recommending areas meeting the target function and the constraint condition according to a dividing algorithm. When the target commodity is recommended, the commodity recommending area to which the target commodity belongs can be determined, and then the commodities of the same type and/or different types in the commodity recommending area to which the target commodity belongs can be recommended, so that the technical problem that the existing commodity recommending algorithm only recommends the commodities of the same type as the target commodity can be solved, the types of the recommended commodities are enriched, the commodity recommending accuracy is improved, and the commodity recommending effectiveness is guaranteed.

Description

Commodity dividing and recommending method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of e-commerce, in particular to a method and a device for dividing commodities, a method and a device for recommending commodities, electronic equipment and a computer-readable storage medium.
Background
From the requirement of the existing e-commerce recommendation system, the conventional commodity recommendation algorithm carries out derivative calculation by taking commodities browsed and purchased by a user as a core, and recommends commodities at various traffic entrances (such as a first screen of a shopping webpage) 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 focused on recommending the same type of commodities with the highest association degree with the browsing or purchasing of the user, but the recommendation mode can not effectively deal with the situation that the user purchases or cancels a shopping plan in other channels (online or offline), the same type of commodities are continuously recommended to the user at high frequency, the user may not be interested in the recommended commodities, the commodity recommendation accuracy is low, the user cannot purchase the recommended commodities, and the commodity recommendation effectiveness is poor.
Disclosure of Invention
Embodiments of the present invention 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 improve the accuracy and effectiveness of commodity recommendation. The specific technical scheme is as follows:
in a first aspect of an embodiment of the present invention, a method for dividing a commodity is provided, including: acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchasing conditions of all users on all commodities; generating a shopping track graph of all the commodities and all the users according to the shopping track information, wherein the shopping track graph comprises a vertex and an edge, the vertex represents the commodities, and the edge represents the correlation among the commodities; setting an objective function and a constraint condition for each commodity recommendation area to be divided, wherein the objective function represents the association degree of commodities in the commodity recommendation area, the association degree of the commodities in the commodity recommendation area and the communication time of the commodity recommendation area, the constraint condition represents that the commodities belong to the unique commodity recommendation area, the number of the commodity recommendation areas and the number of the commodities in the commodity recommendation area, and the commodity recommendation areas comprise the associated commodities of the same type and/or different types; and dividing the vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to a preset dividing algorithm.
Optionally, the setting of the objective function and the constraint condition for each commodity referral 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 recommending area; the first objective function is used for setting the association degree of commodities in each commodity recommendation area to be a maximum value, the first objective function is also used for setting the association degree of commodities in each commodity recommendation area to be a minimum value, the second objective function is used for setting the communication time of each commodity recommendation area to be a minimum value, the first constraint condition is used for dividing each commodity into corresponding commodity recommendation areas, the second constraint condition is used for setting the number of each commodity recommendation area, and the third constraint condition is used for setting the number of commodities in each commodity recommendation area.
Optionally, the first objective function indicates that the sum of weights of edges formed by the commodities in each commodity recommending area is maximum, and the sum of the weights is
Figure BDA0002434388710000021
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, i, j represents the serial number of the commodity, | V | represents the number of all the commodities, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, CjkIndicates the attribution relationship, omega, between the jth commodity and the kth commodity recommendation regionijRepresenting the weight of 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
Figure BDA0002434388710000022
Wherein c represents a communication time for reading a commodity recommending area, l represents a serial number of shopping track information, Tr represents a number of shopping track information, k represents a serial number of the commodity recommending area, MN represents a number of the commodity recommending area, dlkShowing the correlation between the ith shopping track information and the kth commodity recommending area; the first constraint condition represents an attribution relationship between one commodity and any commodity recommending region, and the first constraint condition represents
Figure BDA0002434388710000023
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, Cik1 means that the ith product belongs to the kth product recommendation area at one time, i 1,2, …, | V | means the number of all products; the second constraint condition represents that the number of the commodity recommending regions is within a preset commodity recommending region number range or is a preset numerical value; the third constraint condition indicates that the number of the commodities in the commodity recommending area is within a preset commodity data range.
Optionally, the dividing, according to a preset dividing algorithm, the vertex in the shopping track graph into corresponding commodity recommending areas meeting the objective function and the constraint condition includes: creating an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track curve graph; and dividing vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to the division algorithm, the initialization algorithm, the selection operator, the intersection operator and the mutation operator.
Optionally, the dividing vertices in the shopping trajectory graph into corresponding commodity referral regions meeting the objective function and the constraint condition according to the dividing algorithm, the initialization algorithm, the selection operator, the intersection 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 curve 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; wherein the target division result comprises the number of the commodity recommending regions, the number of commodities in each commodity recommending region and the attribute information of the commodities in each commodity recommending region.
In a second aspect of the embodiments of the present invention, there is also provided a method for recommending a commodity, including: acquiring attribute information of a target commodity; matching the object commodity to a commodity recommending area according to the attribute information, wherein the commodity recommending area is obtained by dividing according to the commodity dividing method in the first aspect; recommending the matched commodities in the commodity recommending area.
Optionally, the recommending the matched goods in the goods recommending area comprises: recommending the commodities in the commodity recommending area, which belong to the same type and/or different type as the target commodity.
In a third aspect of the embodiments of the present invention, there is also provided a commodity dividing apparatus, including: the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring shopping track information of all users according to a preset period, and the shopping track information represents the purchasing conditions of all users on all commodities; the generation module is used for generating a shopping track curve graph of all the commodities and all the users according to the shopping track information, wherein the shopping track curve graph comprises a vertex and an edge, the vertex represents the commodities, and the edge represents the correlation among the commodities; the device comprises a setting module, a judging module and a judging module, wherein the setting module is used for setting an objective function and a constraint condition for each commodity recommending area to be divided, the objective function represents the association degree of commodities in the commodity recommending area, the association degree of the commodities in the commodity recommending area and the communication time of the commodity recommending area, the constraint condition represents that the commodities belong to a unique commodity recommending area, the number of the commodity recommending area and the number of the commodities in the commodity recommending area, and the commodity recommending area comprises the associated commodities which belong to the same type and/or different types; and the dividing module is used for dividing the vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition 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 recommending region; the first objective function is used for setting the association degree of commodities in each commodity recommendation area to be a maximum value, the first objective function is also used for setting the association degree of commodities in each commodity recommendation area to be a minimum value, the second objective function is used for setting the communication time of each commodity recommendation area to be a minimum value, the first constraint condition is used for dividing each commodity into corresponding commodity recommendation areas, the second constraint condition is used for setting the number of each commodity recommendation area, and the third constraint condition is used for setting the number of commodities in each commodity recommendation area.
Optionally, the first objective function indicates that the sum of weights of edges formed by the commodities in each commodity recommending area is maximum, and the sum of the weights is
Figure BDA0002434388710000041
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, i, j represents the serial number of the commodity, | V | represents the number of all the commodities, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, CjkIndicates the attribution relationship, omega, between the jth commodity and the kth commodity recommendation regionijRepresenting the weight of 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
Figure BDA0002434388710000042
Wherein c represents a communication time for reading a commodity recommending area, l represents a serial number of shopping track information, Tr represents a number of shopping track information, k represents a serial number of the commodity recommending area, MN represents a number of the commodity recommending area, dlkShowing the correlation between the ith shopping track information and the kth commodity recommending area; the first constraint condition represents an attribution relationship between one commodity and any commodity recommending region, and the first constraint condition represents
Figure BDA0002434388710000043
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, Cik1 means that the ith product belongs to the kth product recommendation area at one time, i 1,2, …, | V | means the number of all products; the second constraint condition indicates that the number of the commodity recommending regions is within the preset number of the commodity recommending regionsWithin the range of amounts or as a predetermined value; the third constraint condition indicates that the number of the commodities in the commodity recommending area is within a preset commodity data range.
Optionally, the dividing module includes: the algorithm operator creating module is used for creating an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track curve graph; and the vertex dividing module is used for dividing the vertexes in the shopping track curve graph into corresponding commodity recommendation areas which accord with the objective function and the constraint condition according to the dividing algorithm, the initialization algorithm, the selection operator, the intersection operator and the mutation operator.
Optionally, the vertex dividing module includes: the division result set output module is used for outputting a division result set according to the initialization algorithm, and the division result set represents that the vertex in the shopping track curve graph is divided into a plurality of commodity recommendation areas; a target division result output module, configured to output a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator, and the mutation operator; wherein the target division result comprises the number of the commodity recommending regions, the number of commodities in each commodity recommending region and the attribute information of the commodities in each commodity recommending region.
In a fourth aspect of the embodiments of the present invention, there is also provided a commodity recommendation apparatus, including: the second acquisition module is used for acquiring the attribute information of the target commodity; a matching module, configured to match a product recommending area to which the target product belongs according to the attribute information, where the product recommending area is obtained by dividing the product by the product dividing apparatus according to the third aspect; and the recommending module is used for recommending the matched commodities in the commodity recommending area.
Optionally, the recommending module is configured to recommend the commodities in the commodity recommending area that are of the same type and/or different types as the target commodity.
In a fifth aspect of the embodiments of the present invention, there is further 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 of any one of the first and/or second aspects when executing a program stored in the memory.
In a further aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of any one of the above first and/or second aspects.
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 users is acquired according to the preset period, and the shopping track curve graphs of all commodities and all users are generated according to the shopping track information. Then, setting a target function and a constraint condition for each commodity recommending area to be divided, and dividing the vertex in the shopping track curve graph into corresponding commodity recommending areas meeting the target function and the constraint condition 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 commodities of the same type and/or different types in the commodity recommendation area to which the target commodity belongs can be recommended, so that the technical problem that the existing commodity recommendation algorithm only recommends the commodities of the same type as the target commodity can be solved, the types of the recommended commodities are enriched, the commodity recommendation accuracy is improved, and the commodity recommendation effectiveness 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 flowchart illustrating steps of a method for dividing a commodity 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-target association degree division recommendation method based on shopping track information in the 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 in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the 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 existing shopping track information of a user. The dividing method can divide all commodities into a plurality of commodity recommending areas according to the shopping track relevance, the closeness among the commodities in each commodity recommending area is maximized, the closeness among the commodities in different commodity recommending areas is minimized, and the communication time load of each commodity recommending area is balanced. When a user wants to purchase a target commodity, other commodities in the commodity recommendation area to which the target commodity belongs can be recommended to the user, the commodity expected to be purchased by the user is effectively recommended, the commodity recommendation accuracy is improved, the commodity recommendation effectiveness is guaranteed, the user viscosity is increased, and the shopping experience is improved.
As shown in fig. 1, a flowchart illustrating steps of a method for dividing a commodity according to an embodiment of the present invention is shown. The dividing method may specifically include the following steps.
Step 101, obtaining shopping track information of all users according to a preset period.
In an embodiment of the present invention, the shopping track information may indicate purchase conditions of all items by all users. Shopping track information may be generated based on order data for all items, which may include, but is not limited to: attribute information of the goods, such as name, number, type, use, etc., information related to a purchasing user of the goods, such as user name, user ID, etc., purchasing information of the goods, such as purchase time, order number, etc.
And 102, generating a shopping track curve graph of all the commodities and all the users according to the shopping track information.
In the 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. Where the vertices represent items and the edges represent the relationship between two items. V ═ Vi(ii) a i-1, 2, …, | V | } is the set of | V | items in the shopping track graph, E ═ E { E }ij;i,j=1,2,…,|V|;i≠j;eij=ejiIs a set of | E | edges, EijConnecting vertices viAnd vj. The shopping track information of the user may be a subset of product vertices V '═ V'i(ii) a i ═ 1,2, …, | V '| }, where V'iRepresents a certain commodity purchased by the user, and V' represents all commodity sets purchased by the user and is a subset of the whole commodity sets. Edge eij∈E。eijThe initial weight value is 0, and the product vertex subset V 'related to the shopping track information of a certain user is { V'i(ii) a i ═ 1,2, …, | V' | }, pair
Figure BDA0002434388710000071
And i ≠ j, then edge eijThe 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, where the edge weights of any two vertices in the commodity set should be 1, and after the second piece of shopping track information is obtained, the edge weights are accumulated on all the edge weights generated by the first piece of shopping track information, for example, the commodities related to the first piece of shopping track information include a tobuti, a fenda, and a cola, the commodities related to the second piece of shopping track information include only a tobuti and a fenda, and the weights generated by the two pieces of shopping track information should be 2 for the tobuti and the fenda, and the tobuti and the cola only have 1 and the fenda only have 1.
Generating a shopping track graph from shopping track information refers to assigning all verticesInto MN non-empty and disjoint commodity recommendation zones { M1,M2,…,MMNIn, here
Figure BDA0002434388710000072
Represents a set of vertices belonging to the kth merchandise recommendation area in the shopping trajectory graph. The generated shopping track graph also needs to satisfy the following conditions:
the number MN of the commodity recommendation areas satisfies: MN is more than or equal to 1 and less than or equal to | V |;
number M of commodities in commodity recommending areakSatisfies the following conditions: less than or equal to 1 | Mk|≤|V|,k=1,2,…,MN;
The commodity recommendation regions do not intersect:
Figure BDA0002434388710000073
the merchandise recommendation area is not empty:
Figure BDA0002434388710000074
all the merchandise recommendation areas contain all the merchandise: m1∪…Mk∪…MMN=V
And 103, setting a target function and constraint conditions for each commodity recommending area to be divided.
In an embodiment of the present invention, the objective function may represent the degree of association of the commodities in the commodity recommending region, and the communication time of the commodity recommending region. The constraint condition may indicate that the article belongs to the unique article recommendation region, the number of article recommendation regions, and the number of articles in the article recommendation region.
It should be noted that the step 103 may be executed at any time before the subsequent step 104, for example, according to the order of the step 101, the step 102 and the step 103, or the step 103 may be executed in parallel with the step 101 or the step 102, and so on. The execution operation of step 103 does not affect the execution operations of step 101 and step 102.
And 104, dividing vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to a preset dividing algorithm.
In the embodiment of the present invention, the article recommendation regions obtained by dividing the entire articles may include associated articles of the same type and/or different types. That is, all the commodities are divided into a plurality of commodity recommending regions containing the associated commodities of the same type and/or different types according to the shopping track information, the objective function, the constraint condition and the dividing algorithm of all the users.
According to the commodity dividing method provided by the embodiment of the invention, the shopping track information of all users is acquired according to the preset period, and the shopping track curve graphs of all commodities and all users are generated according to the shopping track information. Then, setting a target function and a constraint condition for each commodity recommending area to be divided, and dividing the vertex in the shopping track curve graph into corresponding commodity recommending areas meeting the target function and the constraint condition 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 commodities of the same type and/or different types in the commodity recommendation area to which the target commodity belongs can be recommended, so that the technical problem that the existing commodity recommendation algorithm only recommends the commodities of the same type as the target commodity can be solved, the types of the recommended commodities are enriched, the commodity recommendation accuracy is improved, and the commodity recommendation effectiveness is guaranteed.
In an exemplary embodiment of the present invention, in setting an objective function and a constraint condition for each commodity recommendation region to be divided, a first objective function, a second objective function, a first constraint condition, a second constraint condition, and a third constraint condition may be set for each commodity recommendation region.
In practical applications, the first objective function is configured to set the association degree of the commodities in each commodity recommendation region to a maximum value, and is further configured to set the association degree of the commodities in each commodity recommendation region to a minimum value. The first objective function may indicate that a sum of weights of edges formed by the commodities in each commodity recommending region is a maximum value. The weight of the edge can represent the degree of correlation between two commodities, and the greater the weight, the more compact the degree of correlation between the two commodities is; the smaller the weight, the more distant the correlation between the two commodities is. When the sum of the weights of the edges in all the commodity recommendation areas is the maximum value, the highest degree of correlation among the commodities in the commodity recommendation areas is represented.
Sum of weights f of edges formed by commodities in each commodity recommendation area1Can be expressed as:
Figure BDA0002434388710000081
wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, i, j represents the serial number of the commodity, | V | represents the number of all the commodities, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, CjkIndicates the attribution relationship, omega, between the jth commodity and the kth commodity recommendation regionijAnd representing the weight of the edge formed by the ith commodity and the jth commodity. When C is presentikWhen 1, it means that the ith product belongs to the kth product recommendation region, and when CikWhen 0, it means that the ith product does not belong to the kth product recommendation region. In the same way, when CjkWhen 1, it means that the jth product belongs to the kth product recommendation region, and when CjkWhen 0, it means that the jth product does not belong to the kth product recommendation region. i |, 1,2, …, | V |, k ═ 1,2, …, MN.
It should be noted that the degree of correlation between the commodities in the commodity recommendation region is the closest, that is, the degree of correlation between the commodities in the commodity recommendation region is the farthest, and the coupling of the commodity recommendation region is the lowest.
In practical application, if the number of commodities in each commodity recommending area is huge, each commodity recommending area can be respectively stored on a single cloud node. If one piece of shopping track information relates to commodities in 4 commodity recommending areas, 4 cloud nodes need to be accessed respectively to obtain commodity information. If one piece of shopping track information only relates to 1 commodity in the commodity recommending area, only 1 cloud node needs to be accessed. Therefore, the second objective function is to solve the problem of accessing the cloud node as little as possible, and the second objective function is used to set the communication time of each commodity recommendation section to a minimum value, that is, the second objective function may indicate that the communication time of the commodity recommendation section is a minimum value.
Communication time f of commodity recommendation section2Can be expressed as
Figure BDA0002434388710000091
Wherein c represents a communication time for reading a commodity recommending area, l represents a serial number of shopping track information, Tr represents a number of shopping track information, k represents a serial number of the commodity recommending area, MN represents a number of the commodity recommending area, dlkShowing the correlation between the ith shopping track information and the kth commodity recommending area. When d islkWhen the item is 1, the item indicates that the ith shopping track information is related to the kth commodity recommending area; when d islkWhen the value is 0, it indicates that the ith shopping track information is not related to the kth commodity recommending area.
In practical applications, one article should belong to one article recommendation area at a time and only belong to one article recommendation area. The first constraint condition is used for dividing each commodity into corresponding commodity recommendation areas, namely the first constraint condition represents the attribution relationship between one commodity and any one commodity recommendation area. The first constraint may be expressed as
Figure BDA0002434388710000092
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, Cik1 means that the ith product belongs to the kth product recommendation area at one time, Cik0 means that the ith product does not belong to the kth product recommendation area at a time, i 1,2, …, | V |, and | V | means the number of all products.
In practice, the number of merchandise recommendation areas should be within a certain range or at a suitable value. Thus, the second constraint condition is used to set the number of each of the commodity recommendation regions, i.e., the second constraint condition indicates that the number of the commodity recommendation regions is within a preset range of the number of the commodity recommendation regions or isA preset value. Namely MNmin≤MN≤MNmax;or MN=MNfix;MNmin>1;MNmax<|V|;
Wherein MN represents the number of commodity recommending regions, MNminMinimum value representing range of number of commercial product recommendation regions, MNmaxMaximum value representing range of number of commercial product recommendation regions, MNfixRepresents a preset numerical value, | V | represents the number of all commodities. The preset value can be obtained according to experience or experiments, and the value of the preset 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 within a suitable range. Therefore, the third constraint condition is used to set the number of the commodities in each commodity recommendation region, that is, the third constraint condition indicates that the number of the commodities in the commodity recommendation region is within the preset commodity data range. Namely Mmin≤|Mk|≤Mmax;Mmin≥1;Mmax≤|V|;k=1,2,…,MN;
Wherein k represents the serial number of the commodity recommendation area, | MkI represents the number of commodities in the kth commodity recommendation area, MminRepresenting the minimum value of the range of the number of articles, MmaxRepresents the maximum value of the range of the number of commodities, | V | represents the number of all commodities.
In an exemplary embodiment of the invention, when the vertices in the shopping track graph are divided into corresponding commodity recommendation areas meeting the objective function and the constraint condition according to a preset division algorithm, an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track graph can be created; and dividing the vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with objective functions and constraint conditions according to a division algorithm, an initialization algorithm, a selection operator, a crossover operator and a mutation operator. When the vertexes in the shopping track curve graph are divided into corresponding commodity recommendation areas meeting the objective function and the constraint condition according to the division algorithm, the initialization algorithm, the selection operator, the crossover operator and the mutation operator, a division result set can be output according to the initialization algorithm, and the division result set represents that the vertexes in the shopping track curve graph are divided into a plurality of commodity recommendation areas; 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 the commodity recommending areas, the number of commodities in each commodity recommending area and attribute information of the commodities in each commodity recommending area.
The above algorithms will be described and explained in detail below.
Each shopping track graph represents a solution of a Non-dominant sorting Genetic Algorithm (NSGA-II), an individual in a generation group and a recommendation 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:
inputting: all the commodities of the shopping track curve graph; the number MN of the commodity recommending areas; maximum number of commodities M in commodity recommendation regionmax
And (3) outputting: individual ind in a populationi
Figure BDA0002434388710000111
The initialization algorithm works as follows: MN commodities are randomly selected as initial vertexes of the commodity recommending areas, all the commodity recommending areas are traversed, a commodity which is not placed in any commodity recommending area and is connected with any commodity in the commodity recommending area is placed, and if the fact that the rest commodities have no shopping track relation with any commodity in the existing commodity recommending area is found, the commodities are randomly merged into one commodity recommending area. And repeating until all the commodities belong to a certain commodity recommending area. And (3) algorithm analysis: the time complexity of k vertices extracted from the vertex set is O (1), and the traversal verticesThe time complexity of the points and the filling of the commercial recommendation region is O (N)2). Therefore, the time complexity of the algorithm is O (N)2). Compared with the traditional population initialization algorithm, the algorithm can avoid producing an infeasible solution, prevent influencing the use of the actual production environment during output, has higher randomness during initialization, increases the diversity of the population and accelerates 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-dominating set ordering method can be adopted, the optimal individuals in each generation are screened out through non-dominating set ordering of all individuals in the population, the mating pool is gradually expanded, and the convergence of a new population is ensured. On the basis, the embodiment of the invention designs a selection operator aiming at a shopping track curve graph to be used for expanding a mating pool. Designing a selection operator algorithm based on non-dominating set ordering:
inputting the r generation population Gr(ii) a Mating pool size Psize
Output is mating pool Pr
Figure BDA0002434388710000121
The specific idea of the selection algorithm based on the non-dominating set ordering is as follows: two solutions are randomly selected and compared using non-dominated sorting, the solution with higher convergence and diversity is selected for storage in the mating pool, and the cycle is repeated until the mating pool reaches a predefined size, typically equal to the population size of the genetic algorithm. In the algorithm, for GrThe time complexity for fast non-dominated sorting is O (NlogN), the time complexity for the augmented mating pool is O (N), and thus the time complexity of the algorithm is O (NlogN). The selection algorithm of the non-dominating set ordering can search individuals more meeting actual requirements under different trends, and the result with the highest diversity is obtained.
The crossover operator designed according to the shopping track graph is mainly responsible for generating new individuals from parent individuals, and the next generation of population is formed by the new individuals. The crossover operator is also an important means for expanding population diversity, and in order to prevent the conflict of the commodity recommendation regions in the new solution, the overlapped commodity recommendation regions are optimized in a relabeling mode. Designing a cross operator algorithm:
inputting mating pool Pr
Outputting the next generation individual ind(r+1)i
1 in PrRandomly selecting two individual indriAnd indrj
2 in resolving indri(indrj) Randomly select any one of the merchandise recommendation sections, and apply the indrj(indri) The value of the corresponding position in is replaced by indri(indrj) The new solution is saved as the new individual ind(r+1)i
3 Re-labeling New Individual ind(r+1)i. Judging whether the commodities in the same commodity recommending area are mutually connected, if not, marking the commodities as a new commodity recommending area;
4:return ind(r+1)i
and (3) cross algorithm analysis: randomly drawing mating pool PrThe time complexity of the two middle individuals is O (1), the time complexity of the commodity recommendation site replacement is O (1), and the time complexity of the newly labeled new individual is O (N), so the time complexity of the algorithm is O (N). Compared with the traditional crossover operator, the algorithm can effectively avoid the generation of an infeasible solution by the crossover operation, so that a new individual can still represent a layout result. By applying the re-marking mode, each new individual does not influence parent individuals in the original population, the adaptability of the new individual is improved, and individual conflict is prevented.
In order to prevent the continuous divergence of the individual goodness and badness degree, the embodiment of the invention designs a mutation operator aiming at a shopping track curve graph to ensure the convergence, randomly extracts part of individuals, randomly replaces the commodity recommendation area of the part of commodities in the individuals, calculates the goodness and badness factors, and keeps the good and badness factors if the goodness and badness factors are better than the original individuals. Designing a mutation operator algorithm:
input individual indri
Output Individual indri
Figure BDA0002434388710000142
And (3) carrying out mutation operator algorithm analysis: the time complexity of a boundary commodity set of a certain commodity recommendation region in an individual is randomly extracted is O (1), the time complexity transferred to an adjacent commodity recommendation region is O (1), and the time complexity of relabeling is O (N), so the time complexity of the algorithm is O (N). Compared with the traditional mutation operator algorithm, in order to meet the layout requirement of the shopping track curve graph, the mutation operator algorithm is more specific, neighborhood commodities can be searched in the commodity recommendation area and moved on the premise of meeting constraint conditions, and the feasibility of individuals after mutation is guaranteed.
After the main NSGA-II algorithm of the shopping track curve graph is realized, and the algorithm comprises an initialization individual, a selection operator, a crossover operator and a mutation operator, in order to enable the algorithm to be converged as soon as possible, the embodiment of the invention designs a master-slave mode-coarse-grained multi-target division algorithm aiming at the shopping track curve graph, and the main idea of the algorithm is as follows: (1) after each sub-node initializes the population, after specified iteration GN times, the optimal individual of the main node is reported; (2) the master node calculates individual good and bad factors provided by all slave nodes by utilizing non-dominating set sequencing; (3) the main node judges whether the optimal individual meets an expected target threshold or reaches the maximum iteration times; (4) if the result is in accordance with the expectation, the child node is issued to be informed to stop iteration, the optimal result is output, and if the result is not in accordance with the expectation, the operation is continued. NSGA-II-based shopping track curve graph master-slave mode-coarse-grained multi-target division algorithm:
inputting all commodities of a shopping track curve graph;
outputting the optimal individual indri
Figure BDA0002434388710000151
NSGA-II-based shopping track curve graph master-slave mode-coarse-grained multi-target division algorithm analysis: when the algorithm is terminated, the output individual indriThat is, the method is an optimal shopping track graph layout mode, wherein the commodities are distributed according to the commodity recommendation region with the highest degree of association, and the time complexity of the algorithm is o (N) except for the NSGA-II and non-dominating set sorting algorithm.
In the embodiment of the invention, in the face of the problems of limitations (low product type coverage, incapability of intelligent adaptation, low conversion rate, flow entrance occupation) and the like existing when a traditional recommendation method is used for recommending commodities according to the relevance, the commodity multi-target relevance degree division recommendation method based on the shopping track information successfully outputs an optimal individual with a shopping track curve graph after the algorithm is carried out, in the actual recommendation process, a commodity recommendation area to which the general rate of target articles to be purchased by a user belongs is judged firstly, after the commodity recommendation area to which the target commodities belong is locked, other commodities in the commodity recommendation area are recommended to the user, and other similar and non-similar commodities with the highest potential purchase rate can be recommended to the user. The derivative product with the highest shopping association degree is quickly recommended when a user purchases, the commodity recommendation logic is enriched, and the commodity recommendation effectiveness is improved.
Furthermore, the overall time complexity does not exceed O (N)2) The convergence rate is fast. Compared with other similar heuristic algorithms, the commodity multi-target association degree division recommendation method based on the shopping track information can modify constraint conditions according to different requirements of an actual production environment, enables individuals to generate certain tendency on a certain target, and can ensure that new individuals generated by operators of the algorithm are feasible solutions.
As shown in fig. 2, a flowchart illustrating steps of a method for recommending a product 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 the target product.
In an embodiment of the present invention, the target product may be a product to be purchased by the user, and the attribute information may include, but is not limited to: name, number, type, purpose, etc.
And step 202, matching the target commodity to the commodity recommending area according to the attribute information.
In an embodiment of the present invention, the commodity recommending region may be obtained by performing the above-mentioned method of dividing a commodity. The commodities in the commodity recommending area have respective attribute information. The attribute information of the target commodity may be compared with the attribute information of each commodity in each commodity recommending area, and if the attribute information of the target commodity matches the attribute information of a certain commodity in a certain commodity recommending area, the commodity recommending area is determined as the commodity recommending area to which the target commodity belongs. When the comparison is performed according to the attribute information, the unique number in the attribute information may be used for comparison, and the embodiment of the present invention does not specifically limit the comparison object, the comparison condition, and the like according to which the comparison of the attribute information is performed.
And step 203, recommending the matched commodities in the commodity recommending area.
After the goods recommendation area to which the target goods belong is matched, the goods which belong to the same type as the target goods and/or different types from the target goods in the matched goods recommendation area can be recommended to the user at the flow entrance.
Based on the above-mentioned related description about a commodity division method and a commodity recommendation method, a commodity multi-target association division recommendation method based on shopping track information is introduced below. As shown in fig. 3, a frame diagram of a commodity multi-target association degree division recommendation method based on shopping track information according to an embodiment of the present invention is shown. The multi-target association degree division recommendation method for the commodities mainly comprises three parts of contents.
I, a construction process of a shopping track curve graph. And II, formulating the multi-target problem. III, a parallel multi-target balance division method.
The above three parts will be described in detail below.
I, 1.1 acquiring attribute information of all commodities.
1.2 obtaining order data of all users.
1.3, constructing a vertex set of a shopping track curve graph according to the attribute information of all commodities.
1.4 construct an edge set of the shopping track graph from the order data of all users.
II, 2.1 the objective formulation of the maximization of the association degree between the commodities in the commodity recommending area.
2.2 the objective formula of the minimized association degree between commodities in the commodity recommendation region.
2.3 objective formulation of minimization of communication time across a merchandise recommendation area.
2.4 Balancing the constraints on the size of the commercial recommendation area.
III, 3.1 constructing a selection operator, a crossover operator and a mutation operator.
3.2 establishing a master-slave mode-coarse-granularity multi-target genetic algorithm operation node.
3.3 each sub-node generates a new generation sub-population through a selection operator, a crossover operator and a mutation operator, and transmits the new generation sub-population to the main node.
And 3.4, judging whether the optimal solution of the new generation of population accords with the expectation by the master node by utilizing non-dominated sorting until the optimal solution is obtained.
The embodiment of the invention constructs the objective function and the constraint condition, and effectively expresses the actual problems in commodity recommendation in a formula mode.
The embodiment of the invention designs an initialization algorithm, a selection operator, a cross operator and a mutation operator facing commodity correlation degree based on an NSGA-II algorithm, performs static optimization division on a shopping track curve graph, stores the divided commodity recommendation regions in each cloud platform node, maximizes commodity correlation in the commodity recommendation regions, minimizes commodity correlation of the commodity recommendation regions, and realizes commodity recommendation region scale balance and commodity cross recommendation region communication time minimization.
Fig. 4 is a schematic structural diagram of a commodity dividing apparatus according to an embodiment of the present invention. The dividing means may comprise the following modules.
The first obtaining module 41 is configured to obtain shopping track information of all users according to a preset period, where the shopping track information indicates purchasing situations of all users on all commodities;
a generating module 42, configured to generate a shopping track graph of all the commodities and all the users according to the shopping track information, where the shopping track graph includes a vertex and an edge, the vertex represents a commodity, and the edge represents a correlation relationship between the commodities;
a setting module 43, configured to set an objective function and a constraint condition for each to-be-divided commodity recommendation area, where the objective function represents a correlation degree of commodities in the commodity recommendation area, and a communication time of the commodity recommendation area, the constraint condition represents that the commodities belong to a unique commodity recommendation area, a number of the commodity recommendation areas, and a number of the commodities in the commodity recommendation area, and the commodity recommendation areas include associated commodities belonging to the same type and/or different types;
and the dividing module 44 is configured to divide the vertices in the shopping track graph into corresponding commodity recommending areas meeting 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 condition, a second constraint condition, and a third constraint condition for each of the commodity recommendation regions;
the first objective function is used for setting the association degree of commodities in each commodity recommendation area to be a maximum value, the first objective function is also used for setting the association degree of commodities in each commodity recommendation area to be a minimum value, the second objective function is used for setting the communication time of each commodity recommendation area to be a minimum value, the first constraint condition is used for dividing each commodity into corresponding commodity recommendation areas, the second constraint condition is used for setting the number of each commodity recommendation area, and the third constraint condition is used for setting the number of commodities in each commodity recommendation area.
In an exemplary embodiment of the present invention, the first objective function indicates that a sum of weights of edges formed by the commodities in each commodity recommending region is a maximum value, and the sum of the weights is
Figure BDA0002434388710000181
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, i, j represents the serial number of the commodity, | V | represents the number of all the commodities, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, CjkIndicates the attribution relationship, omega, between the jth commodity and the kth commodity recommendation regionijRepresenting the weight of 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
Figure BDA0002434388710000182
Wherein c represents a communication time for reading a commodity recommending area, l represents a serial number of shopping track information, Tr represents a number of shopping track information, k represents a serial number of the commodity recommending area, MN represents a number of the commodity recommending area, dlkShowing the correlation between the ith shopping track information and the kth commodity recommending area;
the first constraint condition represents an attribution relationship between one commodity and any commodity recommending region, and the first constraint condition represents
Figure BDA0002434388710000183
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, Cik1 means that the ith product belongs to the kth product recommendation area at one time, i 1,2, …, | V | means the number of all products;
the second constraint condition represents that the number of the commodity recommending regions is within a preset commodity recommending region number range or is a preset numerical value;
the third constraint condition indicates that the number of the commodities in the commodity recommending area is within a preset commodity data range.
In an exemplary embodiment of the present invention, the dividing module 44 includes:
the algorithm operator creating module is used for creating an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track curve graph;
and the vertex dividing module is used for dividing the vertexes in the shopping track curve graph into corresponding commodity recommendation areas which accord with the objective function and the constraint condition according to the dividing algorithm, the initialization algorithm, the selection operator, the intersection operator and the mutation operator.
In an exemplary embodiment of the present invention, the vertex partition module includes:
the division result set output module is used for outputting a division result set according to an initialization algorithm, and the division result set represents that the vertex in the shopping track curve graph is divided into a plurality of commodity recommendation areas;
a target division result output module, configured to output a target division result from the division result set according to the division algorithm, the selection operator, the crossover operator, and the mutation operator;
wherein the target division result comprises the number of the commodity recommending regions, the number of commodities in each commodity recommending region and the attribute information of the commodities in each commodity recommending region.
Fig. 5 is a schematic structural diagram illustrating a commodity recommendation apparatus according to an embodiment of the present invention. The dividing means may comprise the following modules.
A second obtaining module 51, configured to obtain attribute information of the target product;
a matching module 52, configured to match a product recommending area to which the target product belongs according to the attribute information, where the product recommending area is obtained by dividing through the product dividing apparatus as described above;
and the recommending module 53 is used for recommending the matched commodities in the commodity recommending area.
In an exemplary embodiment of the present invention, the recommending module 53 is configured to recommend the goods in the goods recommending area, which are of the same type and/or different types as the target goods.
The embodiments of the apparatus described above are relatively simple to describe, and relevant parts may refer to relevant contents in the embodiments of the method described above, and are not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 61, a communication interface 62, a memory 63, and a communication bus 64, where the processor 61, the communication interface 62, and the memory 63 complete mutual communication through the communication bus 64,
a memory 63 for storing a computer program;
the processor 61 is configured to implement the following steps when executing the program stored in the memory 63:
acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchasing conditions of all users on all commodities; generating a shopping track graph of all the commodities and all the users according to the shopping track information, wherein the shopping track graph comprises a vertex and an edge, the vertex represents the commodities, and the edge represents the correlation among the commodities; setting an objective function and a constraint condition for each commodity recommendation area to be divided, wherein the objective function represents the association degree of commodities in the commodity recommendation area, the association degree of the commodities in the commodity recommendation area and the communication time of the commodity recommendation area, the constraint condition represents that the commodities belong to the unique commodity recommendation area, the number of the commodity recommendation areas and the number of the commodities in the commodity recommendation area, and the commodity recommendation areas comprise the associated commodities of the same type and/or different types; and dividing the vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to a preset dividing algorithm.
When the objective function and the constraint condition are set in each commodity recommending area to be divided, setting a first objective function, a second objective function, a first constraint condition, a second constraint condition and a third constraint condition in each commodity recommending area; the first objective function is used for setting the association degree of commodities in each commodity recommendation area to be a maximum value, the first objective function is also used for setting the association degree of commodities in each commodity recommendation area to be a minimum value, the second objective function is used for setting the communication time of each commodity recommendation area to be a minimum value, the first constraint condition is used for dividing each commodity into corresponding commodity recommendation areas, the second constraint condition is used for setting the number of each commodity recommendation area, and the third constraint condition is used for setting the number of commodities in each commodity recommendation area.
The first objective function represents that the sum of the weights of the edges formed by the commodities in each commodity recommending area is the maximum value, and the sum of the weights is
Figure BDA0002434388710000201
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, i, j represents the serial number of the commodity, | V | represents the number of all the commodities, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, CjkIndicates the attribution relationship, omega, between the jth commodity and the kth commodity recommendation regionijRepresenting the weight of 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
Figure BDA0002434388710000211
Wherein c represents a communication time for reading a commodity recommending area, l represents a serial number of shopping track information, Tr represents a number of shopping track information, k represents a serial number of the commodity recommending area, MN represents a number of the commodity recommending area, dlkShowing the correlation between the ith shopping track information and the kth commodity recommending area; the first constraint condition represents an attribution relationship between one commodity and any commodity recommending region, and the first constraint condition represents
Figure BDA0002434388710000212
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, Cik1 means that the ith product belongs to the kth product recommendation area at one time, i 1,2, …, | V | means the number of all products; the secondThe constraint condition represents that the number of the commodity recommending areas is within a preset commodity recommending area number range or is a preset numerical value; the third constraint condition indicates that the number of the commodities in the commodity recommending area is within a preset commodity data range.
When the vertexes in the shopping track curve graph are divided into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to a preset division algorithm, an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track curve graph are established; and dividing vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to the division algorithm, the initialization algorithm, the selection operator, the intersection operator and the mutation operator.
When the vertexes in the shopping track curve graph are divided into corresponding commodity recommendation areas meeting the objective function and the constraint condition according to the division algorithm, the initialization algorithm, the selection operator, the intersection operator and the mutation operator, outputting a division result set according to the initialization algorithm, wherein the division result set represents that the vertexes in the shopping track curve graph are 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; wherein the target division result comprises the number of the commodity recommending regions, the number of commodities in each commodity recommending region and the attribute information of the commodities in each commodity recommending region.
The processor 61 is further configured to implement the following steps when executing the program stored in the memory 63:
acquiring attribute information of a target commodity; matching the commodity recommending area to which the target commodity belongs according to the attribute information, wherein the commodity recommending area is obtained by dividing according to the commodity dividing method; recommending the matched commodities in the commodity recommending area.
And recommending the commodities in the commodity recommending area, which belong to the same type and/or different types as the target commodity, when the commodities in the commodity recommending area are recommended and matched.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a 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 processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In still another embodiment of the present invention, there is further provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the method for dividing a commodity and/or the method for recommending a commodity according to any one of the above-mentioned embodiments.
In still another embodiment of the present invention, there is further provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for dividing a commodity and/or the method for recommending a commodity according to any one of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the 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)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (11)

1. A method of partitioning a commodity, comprising:
acquiring shopping track information of all users according to a preset period, wherein the shopping track information represents the purchasing conditions of all users on all commodities;
generating a shopping track graph of all the commodities and all the users according to the shopping track information, wherein the shopping track graph comprises a vertex and an edge, the vertex represents the commodities, and the edge represents the correlation among the commodities;
setting an objective function and a constraint condition for each commodity recommendation area to be divided, wherein the objective function represents the association degree of commodities in the commodity recommendation area, the association degree of the commodities in the commodity recommendation area and the communication time of the commodity recommendation area, the constraint condition represents that the commodities belong to the unique commodity recommendation area, the number of the commodity recommendation areas and the number of the commodities in the commodity recommendation area, and the commodity recommendation areas comprise the associated commodities of the same type and/or different types;
and dividing the vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to a preset dividing algorithm.
2. The method of claim 1, wherein the setting of the objective function and the constraint condition for each commodity referral 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 recommending area;
the first objective function is used for setting the association degree of commodities in each commodity recommendation area to be a maximum value, the first objective function is also used for setting the association degree of commodities in each commodity recommendation area to be a minimum value, the second objective function is used for setting the communication time of each commodity recommendation area to be a minimum value, the first constraint condition is used for dividing each commodity into corresponding commodity recommendation areas, the second constraint condition is used for setting the number of each commodity recommendation area, and the third constraint condition is used for setting the number of commodities in each commodity recommendation area.
3. The method of claim 2,
the first objective function represents that the sum of the weights of the edges formed by the commodities in each commodity recommending area is the maximum value, and the sum of the weights is
Figure FDA0002434388700000011
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, i, j represents the serial number of the commodity, | V | represents the number of all the commodities, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, CjkIndicates the attribution relationship, omega, between the jth commodity and the kth commodity recommendation regionijRepresenting the weight of 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
Figure FDA0002434388700000021
Wherein the content of the first and second substances,c represents a communication time for reading a commodity recommending area, l represents a serial number of shopping track information, Tr represents the number of shopping track information, k represents a serial number of the commodity recommending area, MN represents the number of the commodity recommending area, and dlkShowing the correlation between the ith shopping track information and the kth commodity recommending area;
the first constraint condition represents an attribution relationship between one commodity and any commodity recommending region, and the first constraint condition represents
Figure FDA0002434388700000022
Wherein k represents the serial number of the commodity recommending area, MN represents the number of the commodity recommending area, CikRepresenting the affiliation between the ith item and the kth item recommendation zone, Cik1 means that the ith product belongs to the kth product recommendation area at one time, i 1,2, …, | V | means the number of all products;
the second constraint condition represents that the number of the commodity recommending regions is within a preset commodity recommending region number range or is a preset numerical value;
the third constraint condition indicates that the number of the commodities in the commodity recommending area is within a preset commodity data range.
4. The method of claim 1, wherein the step of dividing the vertices in the shopping trajectory graph into corresponding commodity recommending regions meeting the objective function and the constraint condition according to a preset dividing algorithm comprises:
creating an initialization algorithm, a selection operator, a crossover operator and a mutation operator of the shopping track curve graph;
and dividing vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to the division algorithm, the initialization algorithm, the selection operator, the intersection operator and the mutation operator.
5. The method of claim 4, wherein said partitioning vertices in said shopping trajectory graph into corresponding merchandise recommendation regions that meet said objective function and constraints according to said partitioning algorithm, said initialization algorithm, said selection operator, said intersection operator, and said mutation operator comprises:
outputting a division result set according to the initialization algorithm, wherein the division result set represents that the vertex in the shopping track curve 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;
wherein the target division result comprises the number of the commodity recommending regions, the number of commodities in each commodity recommending region and the attribute information of the commodities in each commodity recommending region.
6. A method for recommending a commodity, comprising:
acquiring attribute information of a target commodity;
matching the attribute information with a commodity recommending area to which the target commodity belongs, wherein the commodity recommending area is obtained by dividing according to the method for dividing the commodity as claimed in any one of claims 1 to 5;
recommending the matched commodities in the commodity recommending area.
7. The method of claim 6, wherein recommending the item in the item recommendation area that matches comprises:
recommending the commodities in the commodity recommending area, which belong to the same type and/or different type as the target commodity.
8. An apparatus for dividing a commodity, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring shopping track information of all users according to a preset period, and the shopping track information represents the purchasing conditions of all users on all commodities;
the generation module is used for generating a shopping track curve graph of all the commodities and all the users according to the shopping track information, wherein the shopping track curve graph comprises a vertex and an edge, the vertex represents the commodities, and the edge represents the correlation among the commodities;
the device comprises a setting module, a judging module and a judging module, wherein the setting module is used for setting an objective function and a constraint condition for each commodity recommending area to be divided, the objective function represents the association degree of commodities in the commodity recommending area, the association degree of the commodities in the commodity recommending area and the communication time of the commodity recommending area, the constraint condition represents that the commodities belong to a unique commodity recommending area, the number of the commodity recommending area and the number of the commodities in the commodity recommending area, and the commodity recommending area comprises the associated commodities which belong to the same type and/or different types;
and the dividing module is used for dividing the vertexes in the shopping track curve graph into corresponding commodity recommending areas which accord with the objective function and the constraint condition according to a preset dividing algorithm.
9. An apparatus for recommending an article, comprising:
the second acquisition module is used for acquiring the attribute information of the target commodity;
a matching module for matching to a commodity recommending area to which the target commodity belongs according to the attribute information, the commodity recommending area being obtained by dividing by the commodity dividing apparatus according to claim 8;
and the recommending module is used for recommending the matched commodities in the commodity recommending area.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1 to 7 when executing a program stored in the memory.
11. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
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 true CN111563791A (en) 2020-08-21
CN111563791B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381623A (en) * 2020-12-04 2021-02-19 南京浪脆电子商务有限公司 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
邱京伟;: "基于属性特性算法的商品推荐系统模型", 中国信息化 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381623A (en) * 2020-12-04 2021-02-19 南京浪脆电子商务有限公司 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

Also Published As

Publication number Publication date
CN111563791B (en) 2023-12-26

Similar Documents

Publication Publication Date Title
Keshavarz-Ghorabaee Assessment of distribution center locations using a multi-expert subjective–objective decision-making approach
CN110969516B (en) Commodity recommendation method and device
Stanujkic et al. An extension of the EDAS method based on the use of interval grey numbers
Derr et al. Balance in signed bipartite networks
CN109410001B (en) Commodity recommendation method and system, electronic equipment and storage medium
CN111563791B (en) Commodity dividing and recommending method and device, electronic equipment and storage medium
CN113268656A (en) User recommendation method and device, electronic equipment and computer storage medium
Gosh et al. Recommendation system for e-commerce using alternating least squares (ALS) on apache spark
CN111080360A (en) Behavior prediction method, model training method, device, server and storage medium
WO2022222834A1 (en) Data processing method and apparatus
CN108512674B (en) Method, device and equipment for outputting information
Zhang et al. Bipartite graph capsule network
Yin et al. A survey of learning-based methods for cold-start, social recommendation, and data sparsity in e-commerce recommendation systems
Cao et al. Distributed design and implementation of SVD++ algorithm for e-commerce personalized recommender system
Nguyen et al. Tourism Recommender System Based on Cognitive Similarity Between Cross-Cultural Users.
Meena et al. A survey on community detection algorithm and its applications
CN111815410A (en) Commodity recommendation method based on selective neighborhood information
CN111563792B (en) Commodity dividing and recommending method and device, electronic equipment and storage medium
WO2017095371A1 (en) Product recommendations based on selected user and product attributes
Gangurde et al. Optimized predictive model using artificial neural network for market basket analysis
Tran et al. Combining social relations and interaction data in Recommender System with Graph Convolution Collaborative Filtering
Cao A personalised recommendation algorithm for e-commerce network information based on two-dimensional correlation
Zafari et al. Proposing a Highly Accurate Hybrid Component-Based Factorised Preference Model in Recommender Systems.
Agarwal et al. Binarized spiking neural networks optimized with Nomadic People Optimization-based sentiment analysis for social product recommendation
Delianidi et al. A graph-based method for session-based recommendations

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