CN111429161B - Feature extraction method, feature extraction device, storage medium and electronic equipment - Google Patents
Feature extraction method, feature extraction device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN111429161B CN111429161B CN202010279496.6A CN202010279496A CN111429161B CN 111429161 B CN111429161 B CN 111429161B CN 202010279496 A CN202010279496 A CN 202010279496A CN 111429161 B CN111429161 B CN 111429161B
- Authority
- CN
- China
- Prior art keywords
- nodes
- user
- node
- commodity
- layout
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 41
- 230000006399 behavior Effects 0.000 claims abstract description 100
- 238000013528 artificial neural network Methods 0.000 claims abstract description 56
- 238000000034 method Methods 0.000 claims abstract description 45
- 238000012545 processing Methods 0.000 claims abstract description 36
- 230000006870 function Effects 0.000 claims description 29
- 230000003993 interaction Effects 0.000 claims description 25
- 230000002776 aggregation Effects 0.000 claims description 20
- 238000004220 aggregation Methods 0.000 claims description 20
- 238000012549 training Methods 0.000 claims description 10
- 230000004931 aggregating effect Effects 0.000 claims description 8
- 230000015654 memory Effects 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 abstract description 7
- 230000002349 favourable effect Effects 0.000 abstract 1
- 239000013598 vector Substances 0.000 description 22
- 238000004422 calculation algorithm Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 10
- 230000008569 process Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000011176 pooling Methods 0.000 description 4
- 230000004913 activation Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000006116 polymerization reaction Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000005295 random walk Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000012098 association analyses Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000007787 long-term memory Effects 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000006403 short-term memory Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Commerce
- G06Q30/01—Customer relationship services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Data Mining & Analysis (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Theoretical Computer Science (AREA)
- Strategic Management (AREA)
- Accounting & Taxation (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Economics (AREA)
- General Business, Economics & Management (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Game Theory and Decision Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention relates to a feature extraction method, a feature extraction device, a storage medium and electronic equipment, and relates to the technical field of data processing. The method comprises the following steps: acquiring commodities in each section, wherein the section is a commodity set comprising at least one commodity; generating a layout node corresponding to each layout, a commodity node corresponding to each commodity and a user node; generating edges among the layout nodes, commodity nodes and user nodes based on historical behaviors of the user on the layout and the commodity and the subordinate relation between the layout and the commodity so as to establish a topological graph; and extracting the characteristics of any node in the topological graph by using the graph neural network. The invention improves the quality of the extracted features, ensures the comprehensiveness and the accuracy of the features, and is favorable for providing effective support for subsequent service analysis and service decision.
Description
Technical Field
Embodiments of the present invention relate to the field of data processing technology, and more particularly, to a feature extraction method, a feature extraction device, a computer-readable storage medium, and an electronic apparatus.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims, and the description herein is not admitted to be prior art by inclusion in this section.
For internet enterprises, data analysis is an important task, and particularly, effective analysis is performed on user data and commodity data, so that corresponding support can be provided for business decision, the enterprises are helped to improve service quality, and more users are attracted.
Feature extraction is an indispensable link in data analysis, for example, when user data is analyzed, user features are generally extracted from the data first, and then user portraits or user classification is realized according to the user features, so that different customized services are provided for different users.
In the prior art, feature extraction is mostly implemented based on artificially set dimensions. For example, in order to extract the user features, a plurality of data indexes, that is, feature dimensions, are determined in advance according to the features of the data scene, for example, dimensions such as the age, sex, login times, commodity purchase amount and the like of the user may be determined in the e-commerce scene, and then the user data are sorted according to each dimension to obtain the corresponding user features.
Disclosure of Invention
However, in the prior art, the quality of extracted features strongly depends on whether the dimension settings are reasonable: if the dimension setting is insufficient, the extracted features are insufficient, and if the dimension setting is excessive, redundant information exists in the extracted features. The quality of the extracted features is typically low due to the subjectivity of the artificial setup dimension. In addition, the user features are derived from the user data, the commodity features are derived from the commodity data, so that the extracted features are on one side, and particularly in a complex service scene, the features cannot show a service relationship, so that the follow-up service analysis and service decision are not facilitated.
Therefore, an improved feature extraction method is highly needed to realize high-quality feature extraction, so that the extracted features can more comprehensively represent complex business relations, thereby providing effective support for subsequent business analysis and business decision.
In this context, it is desirable for embodiments of the present invention to provide a feature extraction method, a feature extraction apparatus, a computer-readable storage medium, and an electronic device.
According to a first aspect of an embodiment of the present invention, there is provided a feature extraction method, including: acquiring commodities in each section, wherein the section is a commodity set comprising at least one commodity; generating a layout node corresponding to each layout, a commodity node corresponding to each commodity and a user node; generating edges among the layout nodes, commodity nodes and user nodes based on historical behaviors of the user on the layout and the commodity and the subordinate relation between the layout and the commodity so as to establish a topological graph; and extracting the characteristics of any node in the topological graph by using the graph neural network.
In an alternative embodiment, the user node is generated by: clustering users to obtain a plurality of user categories; and respectively generating a corresponding user node for each user category.
In an optional embodiment, the clustering the users to obtain a plurality of user categories includes: clustering the users based on the basic information of the users to obtain a plurality of first user categories; and clustering the users based on the behavior attributes of the users to obtain a plurality of second user categories.
In an alternative embodiment, when a new user is generated, the method further comprises: if the new user has the historical data, determining the behavior attribute of the new user according to the historical data of the new user, and classifying the new user into a corresponding second user category according to the behavior attribute of the new user; and if the new user does not have the historical data, classifying the new user into a corresponding first user category according to the basic information of the new user.
In an alternative embodiment, the generating edges between the layout node, the commodity node, and the user node based on the historical behavior of the user on the layout, the commodity, and the affiliation between the layout and the commodity, to create a topology map includes: and counting the historical interaction behaviors of the users in each user category and each layout in the historical data to determine edges and edge weights between the user nodes and the layout nodes.
In an alternative embodiment, the generating edges between the layout node, the commodity node, and the user node based on the historical behavior of the user on the layout, the commodity, and the affiliation between the layout and the commodity, to create a topology map includes: and counting the historical interaction behaviors of the users in each user category in the historical data and the commodities so as to determine edges and edge weights between the user nodes and the commodity nodes.
In an alternative embodiment, the generating edges between the layout node, the commodity node, and the user node based on the historical behavior of the user on the layout, the commodity, and the affiliation between the layout and the commodity, to create a topology map includes: and counting word frequency-inverse text frequency of each commodity in each layout, and determining edges and edge weights between the layout nodes and the commodity nodes according to the word frequency-inverse text frequency.
In an alternative embodiment, the generating edges between the layout node, the commodity node, and the user node based on the historical behavior of the user on the layout, the commodity, and the affiliation between the layout and the commodity, to create a topology map includes: and determining the relevance among the commodities according to the historical behaviors of the user on the commodities, and determining the edges and the edge weights among the commodity nodes according to the relevance.
In an alternative embodiment, the graph neural network is trained by: inputting the topological graph into a graph neural network to be trained, extracting characteristics of any two nodes in the topological graph, and calculating characteristic similarity of the two nodes; obtaining labels for the two nodes based on whether edges exist between the two nodes; and updating parameters of the graph neural network by using the feature similarity and the labels of the two nodes.
In an optional embodiment, the updating the parameters of the graph neural network by using the feature similarities and the labels of the two nodes includes: substituting the feature similarity and the labels of the two nodes into the following loss functions:
updating parameters of the graph neural network through the loss function; wherein L represents the loss function and n is the number of samples; v represents a node set in the topological graph, and u and V represent any two nodes in V; n (u) represents a set of nodes bordered by u, F (u) represents a set bordered by u
A set of nodes, E (u|v) =1 indicating that u and v have edges, the label is 1, E (u|v) =0 indicating that u and v have no edges, the label is 0; z is Z u Characteristic of u, Z v Characteristic of v, P (Z u |Z v ) Representing the feature similarity of u and v.
In an optional embodiment, the extracting the features of any node in the topological graph by using the graph neural network includes: determining key neighbor nodes of any node in the topological graph; and aggregating the input features of the key neighbor nodes, and iterating the preset layer number through the graph neural network to obtain the features of any node.
In an optional embodiment, the determining the key neighboring node of the any node in the topology map includes: if any node is a layout node, all commodity nodes are selected from the neighbor nodes of the layout node and serve as key neighbor nodes of any node.
In an optional embodiment, the determining the key neighboring node of the any node in the topology map includes: if any node is a commodity node, selecting a first preset number of user nodes, a second preset number of commodity nodes and all layout nodes from the neighbor nodes of the commodity node as key neighbor nodes of any node.
In an optional embodiment, the determining the key neighboring node of the any node in the topology map includes: if any node is a user node, selecting a third preset number of nodes from the neighbor nodes of the user node as key neighbor nodes of any node.
In an alternative embodiment, the input features of the layout nodes are obtained by: extracting and encoding at least one of title text, category information and poster image of the print to obtain input features of print nodes corresponding to the print.
In an alternative embodiment, the input characteristics of the commodity node are obtained by: and extracting and encoding at least one of title text, category information, price information and commodity image of the commodity to obtain the input characteristics of the layout nodes corresponding to the commodity.
In an alternative embodiment, the input features of the user node are obtained by: and extracting features from at least one of basic information and behavior attributes of the user, and coding to obtain input features of user nodes corresponding to the user.
In an optional embodiment, the extracting the features of any node in the topological graph by using the graph neural network includes: extracting the characteristics of each node in the topological graph by using a graph neural network to obtain a node characteristic table; the method further comprises the steps of: when the characteristics of the object to be processed are extracted, determining a target node corresponding to the object to be processed in the topological graph, and searching the node characteristic table to obtain the characteristics of the target node.
In an alternative embodiment, if the object to be processed is a target user, after obtaining the characteristics of the target user, the method further includes: and generating recommendation information related to the layout for the target user according to the similarity between the characteristics of the target user and the characteristics of the layout nodes and/or the similarity between the characteristics of the target user and the characteristics of the commodity nodes.
According to a second aspect of the embodiment of the present invention, there is provided a feature extraction apparatus including: the information acquisition module is used for acquiring commodities in each section, wherein the section is a commodity set comprising at least one commodity; the node generation module is used for generating a layout node corresponding to each layout, a commodity node corresponding to each commodity and a user node; the edge generation module is used for generating edges among the layout nodes, commodity nodes and user nodes based on historical behaviors of the user on the layout and the commodity and the subordinate relation between the layout and the commodity so as to establish a topological graph; and the topological graph processing module is used for extracting the characteristics of any node in the topological graph by utilizing the graph neural network.
In an alternative embodiment, the node generating module is configured to generate the user node by: clustering users to obtain a plurality of user categories; and respectively generating a corresponding user node for each user category.
In an alternative embodiment, the node generating module is configured to cluster users by: clustering the users based on the basic information of the users to obtain a plurality of first user categories; and clustering the users based on the behavior attributes of the users to obtain a plurality of second user categories.
In an alternative embodiment, the node generating module is further configured to, when a new user is generated, determine a user category of the new user by: if the new user has the historical data, determining the behavior attribute of the new user according to the historical data of the new user, and classifying the new user into a corresponding second user category according to the behavior attribute of the new user; and if the new user does not have the historical data, classifying the new user into a corresponding first user category according to the basic information of the new user.
In an alternative embodiment, the edge generation module includes a user-layout edge generation unit for: and counting the historical interaction behaviors of the users in each user category and each layout in the historical data to determine edges and edge weights between the user nodes and the layout nodes.
In an alternative embodiment, the edge generation module comprises a user-commodity edge generation unit for: and counting the historical interaction behaviors of the users in each user category in the historical data and the commodities so as to determine edges and edge weights between the user nodes and the commodity nodes.
In an alternative embodiment, the edge generation module includes a layout-commodity edge generation unit for: and counting word frequency-inverse text frequency of each commodity in each layout, and determining edges and edge weights between the layout nodes and the commodity nodes according to the word frequency-inverse text frequency.
In an alternative embodiment, the edge generation module includes a commodity-commodity edge generation unit for: and determining the relevance among the commodities according to the historical behaviors of the user on the commodities, and determining the edges and the edge weights among the commodity nodes according to the relevance.
In an alternative embodiment, the topology map processing module comprises a model training unit for: inputting the topological graph into a graph neural network to be trained, extracting characteristics of any two nodes in the topological graph, and calculating characteristic similarity of the two nodes; obtaining labels for the two nodes based on whether edges exist between the two nodes; and updating parameters of the graph neural network by using the feature similarity and the labels of the two nodes.
In an alternative embodiment, the model training unit is further configured to update parameters of the graph neural network by: substituting the feature similarity and the labels of the two nodes into the following loss functions:
updating parameters of the graph neural network through the loss function; wherein L represents the loss function and n is the number of samples; v represents a node set in the topological graph, and u and V represent any two nodes in V; n (u) represents a set of nodes bordered by u, F (u) represents a set bordered by uA set of nodes, E (u|v) =1 indicating that u and v have edges, the label is 1, E (u|v) =0 indicating that u and v have no edges, the label is 0; z is Z u Characteristic of u, Z v Characteristic of v, P (Z u |Z v ) Representing the feature similarity of u and v.
In an alternative embodiment, the topology map processing module includes: a key neighbor node determining unit, configured to determine a key neighbor node of the any node in the topology map; and the input feature aggregation unit is used for aggregating the input features of the key neighbor nodes and iterating the preset layer number through the graph neural network to obtain the features of any node.
In an alternative embodiment, the critical neighbor node determining unit is configured to: if any node is a layout node, all commodity nodes are selected from the neighbor nodes of the layout node and serve as key neighbor nodes of any node.
In an alternative embodiment, the critical neighbor node determining unit is configured to: if any node is a commodity node, selecting a first preset number of user nodes, a second preset number of commodity nodes and all layout nodes from the neighbor nodes of the commodity node as key neighbor nodes of any node.
In an alternative embodiment, the critical neighbor node determining unit is configured to: if any node is a user node, selecting a third preset number of nodes from the neighbor nodes of the user node as key neighbor nodes of any node.
In an alternative embodiment, the input feature aggregation unit is further configured to obtain the input feature of the layout node by: extracting and encoding at least one of title text, category information and poster image of the print to obtain input features of print nodes corresponding to the print.
In an alternative embodiment, the input feature aggregation unit is further configured to obtain the input feature of the commodity node by: and extracting and encoding at least one of title text, category information, price information and commodity image of the commodity to obtain the input characteristics of the layout nodes corresponding to the commodity.
In an alternative embodiment, the input feature aggregation unit is further configured to obtain the input feature of the user node by: and extracting features from at least one of basic information and behavior attributes of the user, and coding to obtain input features of user nodes corresponding to the user.
In an alternative embodiment, the topology map processing module is further configured to: extracting the characteristics of each node in the topological graph by using a graph neural network to obtain a node characteristic table; when the characteristics of the object to be processed are extracted, determining a target node corresponding to the object to be processed in the topological graph, and searching the node characteristic table to obtain the characteristics of the target node.
In an alternative embodiment, the apparatus further comprises a recommendation information generation module for: if the object to be processed is a target user, after the characteristics of the target user are obtained, recommendation information related to the layout for the target user is generated according to the similarity between the characteristics of the target user and the characteristics of the layout nodes and/or the similarity between the characteristics of the target user and the characteristics of the commodity nodes.
According to a third aspect of embodiments of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the feature extraction methods described above.
According to a fourth aspect of the embodiment of the present invention, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any of the feature extraction methods described above via execution of the executable instructions.
According to the feature extraction method, the feature extraction device, the computer-readable storage medium and the electronic equipment of the embodiment of the invention, firstly, commodities in each edition are obtained; then generating a layout node corresponding to each layout, a commodity node corresponding to each commodity and a user node; generating edges among each layout node, commodity node and user node based on the historical behavior of the user on the layout and commodity and the subordinate relation between the layout and commodity so as to establish a topological graph; and finally, extracting the characteristics of any node in the topological graph by using the graph neural network. On one hand, the scheme builds a complete topological graph based on the relation among three business objects of the layout, the commodity and the user, and is suitable for complex scenes with business layout division so as to cover different aspects of the scenes; the characteristics of the three business objects are extracted from the topological graph by utilizing the graph neural network, so that the comprehensiveness and the accuracy of the characteristics are ensured. On the other hand, the feature extraction does not depend on the artificial feature dimension setting, but learns the relation of three business objects from the angle of a machine and abstracts the features, so that the quality of the extracted features is improved, and effective support is provided for subsequent business analysis and business decision.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
FIG. 1 shows a flow chart of a feature extraction method according to an embodiment of the invention;
FIG. 2 illustrates a flow chart for generating a user node according to an embodiment of the invention;
FIG. 3 shows a partial schematic of a topology according to an embodiment of the invention;
FIG. 4 shows a schematic diagram of extracting node features according to an embodiment of the invention;
FIG. 5 shows a flowchart for training a graph neural network, according to an embodiment of the present invention;
FIG. 6 illustrates a flow chart for extracting node features according to an embodiment of the invention;
fig. 7 is a block diagram showing a structure of a feature extraction device according to an embodiment of the invention;
FIG. 8 shows a schematic diagram of a storage medium according to an embodiment of the present invention; and
fig. 9 shows a block diagram of the structure of an electronic device according to an embodiment of the present invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are presented merely to enable those skilled in the art to better understand and practice the invention and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Those skilled in the art will appreciate that embodiments of the invention may be implemented as a system, apparatus, device, method, or computer program product. Thus, the invention may be embodied in the form of: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to an embodiment of the present invention, there are provided a feature extraction method, a feature extraction device, a computer-readable storage medium, and an electronic apparatus.
Any number of elements in the figures are for illustration and not limitation, and any naming is used for distinction only, and not for any limiting sense.
The principles and spirit of the present invention are described in detail below with reference to several representative embodiments thereof.
Summary of The Invention
The inventor discovers that in the existing feature extraction method, the quality of the extracted features strongly depends on whether the dimension setting is reasonable or not: if the dimension setting is insufficient, the extracted features are insufficient, and if the dimension setting is excessive, redundant information exists in the extracted features. The quality of the extracted features is typically low due to the subjectivity of the artificial setup dimension. In addition, the user features are derived from the user data, the commodity features are derived from the commodity data, so that the extracted features are on one side, and particularly in a complex service scene, the features cannot show a service relationship, so that the follow-up service analysis and service decision are not facilitated.
In view of the above, the basic idea of the invention is that: providing a feature extraction method, a feature extraction device, a computer readable storage medium and electronic equipment, wherein firstly, commodities in each edition are obtained; then generating a layout node corresponding to each layout, a commodity node corresponding to each commodity and a user node; generating edges among each layout node, commodity node and user node based on the historical behavior of the user on the layout and commodity and the subordinate relation between the layout and commodity so as to establish a topological graph; and finally, extracting the characteristics of any node in the topological graph by using the graph neural network. On one hand, the scheme builds a complete topological graph based on the relation among three business objects of the layout, the commodity and the user, and is suitable for complex scenes with business layout division so as to cover different aspects of the scenes; the characteristics of the three business objects are extracted from the topological graph by utilizing the graph neural network, so that the comprehensiveness and the accuracy of the characteristics are ensured. On the other hand, the feature extraction does not depend on the artificial feature dimension setting, but learns the relation of three business objects from the angle of a machine and abstracts the features, so that the quality of the extracted features is improved, and effective support is provided for subsequent business analysis and business decision.
Having described the basic principles of the present invention, various non-limiting embodiments of the invention are described in detail below.
Application scene overview
It should be noted that the following application scenarios are only shown for facilitating understanding of the spirit and principles of the present invention, and embodiments of the present invention are not limited in this respect. Rather, embodiments of the invention may be applied to any scenario where applicable.
The invention extracts the characteristics of any business object based on the relation among three business objects of edition, commodity and user in the business scene, and can be applied to all scenes with the three business objects, for example: in the e-commerce scene, commodities form a layout according to certain commonalities, such as that the commodities of the same type or brand belong to one layout and the like, data of the layout, the commodities and a user are analyzed through the method of the exemplary embodiment, and characteristics of the layout, the commodities or the user are extracted; in service scenes such as online music, electronic books, and audio books, music, electronic books, and audio books which need to be purchased by users are taken as commodities, and are formed into a layout, the same type of music belongs to one layout, the same type of electronic books and audio books belong to one layout, and the characteristics of any object are extracted through the method of the exemplary embodiment.
Exemplary method
The exemplary embodiment of the present invention first provides a feature extraction method, and a flow of the feature extraction method is specifically described below with reference to steps S110 to S140 shown in fig. 1.
And step S110, acquiring commodities in each edition.
The plate is a commodity set comprising at least one commodity. In practical applications, the layout may be various specific business objects, for example: the layout can be a service unit, for example, each service is formed into a corresponding service layout according to the division of service types, wherein the service layout contains commodities associated with the service; the layout can also be a commodity display page, for example, in a webpage or an Application (Application), commodities with certain commonalities such as the same type or the same brand are displayed in the same page, and the page is a layout; the layout may also be an organization unit in the commodity database, for example, the commodity data similar in time are stored in the same unit according to time sequence, and the unit is a layout.
In the present exemplary embodiment, all sections may be acquired within a certain range according to the service requirement, and then, which commodities are in each of the sections may be counted. For example, in an e-commerce activity, such as a sales promotion for a holiday, a platform side organizes a number of venues, each of which corresponds to a commodity topic, such as a digital product venue, a clothing venue, a food venue, etc., each of which includes a number of commodities. And taking each meeting place in the activity as a section, and acquiring commodities in each section.
Next, the present exemplary embodiment constructs a topology map between the sections, the commodities, and the users, and extracts features of the sections, the commodities, or the users through the topology map. The topology map includes two classes of elements: nodes and edges between nodes. The node and edge generation methods are described below through steps S120 and S130, respectively.
And step S120, generating layout nodes corresponding to all the layout blocks, commodity nodes corresponding to all the commodities and user nodes.
The layout node, commodity node and user node are respectively described in detail as follows:
and (5) layout nodes. The plate name or plate number can be generally determined for each plate, each plate corresponds to a plate node, and the node is recorded by the plate name or plate number.
Commodity node. Each commodity has a trade name or commodity code, and each commodity corresponds to a commodity node, which is recorded by the trade name or commodity code.
A user node. Referring to fig. 2, the user node may be generated by the following steps S210 and S220:
step S210, clustering users to obtain a plurality of user categories;
step S220, generating a corresponding user node for each user category.
Since the number of users is typically very large, possibly several orders of magnitude beyond the layout, the goods, and if one user node is formed for each user, very much redundant information may be introduced. Therefore, the present exemplary embodiment clusters users, each user category corresponds to a user node, and records the node through the name or number of the user category, thereby greatly reducing the number of user nodes and improving the information density. All users may be clustered, for example, all registered users may be clustered, or users within a certain range may be clustered according to service requirements, for example, users having purchased a service may be clustered, or users participating in a certain e-commerce activity may be clustered.
The present exemplary embodiment is not particularly limited to the clustering method. For example, a K-means algorithm (K-means algorithm) may be used to determine an appropriate K value (e.g., may be equal to the number of commodity nodes, or two, three, etc. times the number of commodity nodes) based on the number of layout nodes and commodity nodes; randomly selecting K users as K clustering centers; calculating the distance between other users and each clustering center, forming the data of each user into vectors, calculating the Euclidean distance, cosine similarity and the like between the vectors, and dividing each user into the nearest clustering centers to obtain K user categories; updating the clustering center in each user category, and then clustering again; through multiple iterations, the clustering center in each user category tends to be stable, and clustering is finished, so that final K user categories are obtained. The collaborative filtering algorithm may also be adopted to count the interaction behavior of each user on different commodities, which may include browsing behavior, collecting behavior, purchasing behavior, comment behavior, and the like, determine similar users based on the same or similar commodity combination, and form a user category for the similar users, thereby obtaining a plurality of user categories.
User data typically includes two aspects of data: basic information of the user, such as age, sex, occupation, residential area, etc.; the behavior data of the user specifically refers to historical data corresponding to historical behaviors of the user in a website, a platform or an App, such as login behaviors, browsing behaviors, collection behaviors, purchasing behaviors and the like. In an alternative embodiment, the users may be clustered from the above two aspects of data, and step S210 may include:
clustering users based on the basic information of the users to obtain a plurality of first user categories;
and clustering the users based on the behavior attributes of the users to obtain a plurality of second user categories.
The behavior attribute refers to standardized data obtained by performing statistics and arrangement on behavior data of users, for example, a plurality of dimensions, such as login times, login time, number of collected commodities, number of purchased commodities, amount of consumption and the like, can be set, and the behavior data of each user is arranged according to the dimensions, discretized and encoded to obtain the behavior attribute in a vector form.
The first user category and the second user category respectively represent user categories obtained by clustering the data in two aspects. And for the same batch of users, performing first clustering based on the basic information of the users to obtain a first user category, and performing second clustering based on the behavior attribute of the users to obtain a second user category. Typically each user belongs to both a first user category and a second user category. Of course, at the time of clustering, there may be a part of users, which have only basic information, and no behavior data (such as users that have not been lived after registration), and these users may be classified into only the corresponding first user category.
For each of the first user category and the second user category, a corresponding user node is generated. The obtained user node has stronger pertinence and more accurate division of users.
When a new user is generated subsequently, if the new user has history data, determining behavior attributes of the new user according to the history data of the new user, and dividing the new user into corresponding second user categories according to the behavior attributes of the new user; if the new user does not have the history data, the new user is classified into the corresponding first user category according to the basic information of the new user. For example, if the new user is actually an old user of the platform, the user has historical data because the user was the first to engage in an e-commerce activity, which is the new user in the e-commerce activity; and sorting the historical data to obtain the behavior attribute of the user, calculating the distance between the behavior attribute and each second user category, and dividing the behavior attribute into the second user categories closest to the second user category, thereby determining the user node corresponding to the user. If the new user is the user just registered on the platform and does not have any behavior data, calculating the distance between the new user and each first user category through the basic information submitted during the registration of the user, and dividing the new user into the first user categories closest to the new user category, thereby determining the user node corresponding to the new user. This solves the problem of cold start of the new user, i.e. it can be mapped to a certain user node and its user characteristics extracted in a subsequent step, even if the new user has no history data.
Step S130, based on the historical behaviors of the user on the sections and the commodities and the affiliation between the sections and the commodities, generating edges among the section nodes, the commodity nodes and the user nodes so as to establish a topological graph.
When generating edges between nodes for a topology graph, the relevance between the nodes needs to be considered. The present exemplary embodiment relates to three kinds of nodes, and the association relationship is relatively complex, and is mainly determined based on the historical behavior of the user on the layout and the commodity, and the dependence relationship between the layout and the commodity, and the association relationship related to the edges between the different kinds of nodes is also different, so that separate processing is required.
The edges among the layout nodes, the commodity nodes and the user nodes can comprise: edges between user nodes and layout nodes, edges between user nodes and commodity nodes, edges between layout nodes and commodity nodes, edges between commodity nodes and commodity nodes. The following describes these four sides in detail:
edges between user nodes and layout nodes. Historical interaction behavior of users in each user category with each layout in the historical data may be counted to determine edges and edge weights between user nodes and layout nodes. Wherein, the historical interaction behavior of the user and the layout refers to all the behaviors which are performed by the user and related to the layout, including but not limited to: the user clicks and browses the layout, the user leaves a message in the layout, the user obtains coupons in the layout, and the user purchases goods in the layout. For example, all user behavior data, i.e., historical data, in one historical e-commerce activity may be obtained; the historical interaction behavior of each user category and each section in the historical data is counted, for example, when the historical interaction behavior of the user category U1 to the section A is counted, the times of clicking and browsing the section A by all users in the U1 can be counted, the number of messages in the section A is counted, the number of coupons in the section A is picked up, the number of products in the section A is purchased and the like; then normalizing and weighting the values to obtain comprehensive values which are used as edge weights between the user node U1 and the layout node A; if the edge weight is less than the first threshold, no edge is considered between the user node U1 and the layout node A. The first threshold is a criterion for measuring whether the user category is related to the layout, and may be set according to experience or actual requirements, for example, may be 0.5. By the method, whether edges exist between each user node and each layout block or not and the weight of the edges can be obtained. The higher the interaction degree between the user and the layout, the closer the relationship between the user and the layout is represented, the higher the probability of having edges is, and the higher the weight of the edges is.
In an alternative embodiment, there may be a new layout, for example, the e-commerce activity designed a new layout that did not occur in the previous activity, and thus there is no historical interaction of the user with the layout. For this case, historical interaction behavior of the user on the merchandise in the section can be counted to predict the interaction degree of the user on the section, so that the edges and the weight of the edges can be calculated. The problem of cold start with respect to the layout can thus be solved.
Edges between the user node and the commodity node. Historical interaction behavior of users in each user category with respective merchandise in the historical data may be counted to determine edges and edge weights between user nodes and merchandise nodes. Wherein, the historical interaction behavior of the user and the commodity refers to all behaviors which are performed by the user and related to the commodity, including but not limited to: the user browses the goods, collects the goods, purchases the goods, reviews the goods, and the like. For example, all user behavior data, i.e., historical data, on the platform may be obtained over the last period of time (e.g., the last year); the historical interaction behavior of each user category and each commodity in the historical data, such as the historical interaction behavior of the user category U1 on the commodity a1, can be counted, wherein the times of clicking and browsing the commodity a1, the times of collecting the commodity a1, the number of purchasing the commodity a1, the times of commenting the commodity a1 and the like can be counted by all users in the U1; then normalizing and weighting the values to obtain comprehensive values which are used as edge weights between the user node U1 and the commodity node a 1; if the edge weight is less than the second threshold, it is considered that there is no edge between the user node U1 and the commodity node a 1. The second threshold is a criterion for measuring whether the user category is related to the commodity, and may be set according to experience or actual requirements, for example, may be 0.5. By the method, whether an edge exists between each user node and each commodity or not and the weight of the edge can be obtained. The higher the degree of interaction between the user and the commodity, the closer the relationship between the user and the commodity is represented, the higher the probability of having an edge, and the higher the weight of the edge.
Edges between the layout nodes and the commodity nodes. In general, edges can be generated between the layout nodes with the affiliation and the commodity nodes according to the affiliation of the layout and the commodity, and edges are not generated without the affiliation. In some scenarios, where the number of sections is small, each section includes a large number of commodities, forming a large number of edges between section nodes and commodity nodes may result in a low degree of differentiation of the different sections, losing important relational features. Based on this, in one embodiment, the TF-IDF (Term Frequency-inverse text Frequency) of each commodity in each section may be counted, and the edges between the section nodes and commodity nodes and the edge weights may be determined based on the TF-IDF. For example, assume a total of f sections, where section A includes k commodities, a1, a2, …, ak, respectively; counting historical data related to the layout A, and respectively counting the number of the historical data related to a1, a2, … and ak (one piece of data represents one user action) and respectively marking as q1, q2, … and qk, wherein q1 reflects the number of times of the user action related to a1 in practice; for the commodity a1 in the layout a, TF (word frequency) is:
It should be understood that different weights may be set for different types of user behaviors when statistics q1, q2, …, qk are performed, and in general, browsing weights < weights of comments < weights of collections < weights of purchases, and then all relevant historical data of each commodity are subjected to weight accumulation to obtain accumulated weight values to replace q1, q2, …, qk, then equation (1) may also use the accumulated weight values to calculate TF.
Then counting the number of the sections containing commodity a1 in all f sections, and assuming f a1 The IDF (inverse text frequency) of commodity a1 is:
in the IDF calculation, 1 is usually added to the denominator, i.e., 1+f a1 To prevent the case where the denominator is 0. In the present exemplary embodiment, the selected commodity belongs to at least one section, so that 1 may not be added. In addition, a coefficient value (e.g., 1) may be added to the IDF as a whole to balance TF and IDF values, which is equally applicable to the present exemplary embodiment.
Finally, calculating TF-IDF of the commodity a1 in the plate A as follows:
after TF-IDF of each commodity in the layout is obtained, proper normalization processing can be carried out to obtain the edge weight between the layout node and the commodity node. If the edge weight is less than the third threshold, no edge is considered between the layout node and the commodity node. The third threshold is a criterion for measuring whether the layout is related to the commodity, and can be set according to experience or actual requirements, for example, can be 0.6.
Commodity nodes and edges between commodity nodes. The relevance among the commodities can be determined according to the historical behaviors of the user on the commodities, and the edges and the edge weights among the commodity nodes are determined according to the relevance. Specifically, purchasing behavior in the historical behavior can be extracted to obtain order data corresponding to each purchasing behavior, which commodities are purchased by a user each time are determined, the commodities with higher simultaneous purchasing probability are determined as related commodities, and edges are generated between commodity nodes. The present exemplary embodiment may employ any association analysis algorithm, taking the Apriori algorithm (an association rule mining algorithm) as an example, counting the number of times of purchasing behavior in the history behavior as h, purchasing the commodity a1 as h (a 1), purchasing the commodity a2 as h (a 2), purchasing the commodities a1 and a2 as h (a 1, a 2), and calculating the support degree of the commodities a1 and a 2:
calculating the confidence of the commodities a1 and a 2:
and then, threshold values can be respectively set for the support degree and the confidence degree, when the support degree and the confidence degree are both larger than the threshold values, edges between the commodity node a1 and the commodity node a2 are determined, and the weight of the edges is obtained through weighting calculation according to the support degree and the confidence degree. Or firstly, weighting and calculating the support degree and the confidence degree to obtain the association degree of a1 and a 2; if the association degree is greater than the fourth threshold value, considering that an edge exists between the commodity node a1 and the commodity node a2, wherein the association degree is the weight of the edge; if the degree of association is less than the fourth threshold, it is considered that there is no edge between commodity node a1 and commodity node a 2. The fourth threshold is a measure of the degree of association between the products, and may be set according to experience or actual requirements, for example, may be 0.4.
The first, second, third, and fourth thresholds are predetermined thresholds for different parameters, and the four thresholds are not related to each other, and may be the same or different in value.
Through the above steps S120 and S130, a topology map about the layout, the commodity, and the user can be established, and is shown with reference to fig. 3, which is a part of the actual topology map. In the topological graph, the layout node is connected with the user node and the commodity node, the user node is connected with the layout node and the commodity node, and the commodity node is connected with the three nodes; the layout nodes are not connected with each other, and the user nodes are not connected with each other, but in practice, the layout nodes and the layout nodes can form secondary connection through other nodes, and the user nodes can also form secondary connection. The topological graph actually comprises complex association relations among three business objects, namely a layout, commodities and users. Feature extraction may be performed based on the topology map as follows.
And step S140, extracting the characteristics of any node in the topological graph by using the graph neural network.
GNN (Graph Neural Network ) is an algorithmic model that runs on a graph structure using deep learning. The Graph (Graph) processed by GNN generally refers to a topological Graph, including nodes and edges, rather than an image consisting of pixels. In contrast, the pixel image mainly contains visual information, the topological graph mainly contains relation information, and the GNN is a model for processing the relation information in the topological graph.
Fig. 4 shows a schematic diagram of node feature extraction based on graphSAGE (Graph SAmple and aggreGatE, graph sampling and aggregation) algorithm in GNN. The left side in fig. 4 is a topological graph, and the topological graph is input into GNN, any node (such as node a) is selected as a target node, and as shown in the right side in fig. 4, the characteristic of a is obtained through multi-layer aggregation processing. The algorithm is expressed as follows:
the topology graph G (V, E) is input, V represents the node set in the topology graph, and E represents the edge set in the topology graph. Input feature of any node u in input V, expressed as x u A representation; the input features represent the initialization features of the nodes obtained from the outside, such as the layout, the commodity, and the input features of the user, which can be determined by the attributes thereof, respectively, and the input features of the three nodes will be described in detail below. Inputting the preset layer number K and weights (the part is the main parameter of GNN and can also comprise bias parameters) W of 1-K layers i ,The activation function σ is set, for example, a sigmoid function (S-type activation function) may be employed. Is provided withPut aggregation function AG i ,The set of neighbor nodes defining any node u is N (u), and the neighbor node refers to a node directly connected to the target node (i.e. having an edge with the target node), such as the neighbor node a in fig. 4 is B, C, D.
For any node u, there is a potential vector (unbedding) of 1-K layers in GNNThe potential vector is a representation of the intermediate feature, and the algorithm process is as shown in equation (6):
wherein CONCAT represents stitching.
Equation (6) shows that the GNN process includes two loop nesting: the large loop refers to iterating the number of layers, and the small loop refers to iterating each node in each layer. The specific treatment process comprises the following steps: starting from a first layer, carrying out potential vector representation on each node in each layer, taking a node A in fig. 4 as an example, acquiring a neighbor node B, C, D of the node A, aggregating the potential vector of the previous layer of B, C, D, splicing the aggregation result with the potential vector of the previous layer of A, and obtaining the potential vector of the A in the current layer through weighting and activating operation (nonlinear conversion); and by using the same method, calculating other nodes at the current layer to obtain potential vector representation of each node at the current layer. And then entering the next layer, and repeating the operation of the previous layer to obtain the potential vector representation of each node in the next layer. The iteration is carried out layer by layer until reaching the K layer, and the potential vector of each node in the K layer is used as the output characteristic of each node, thereby obtaining the output characteristic Z of any node u u 。
In the present exemplary embodiment, the aggregation function AG i The implementation may take any form, including but not limited to the following three forms:
(1) and (5) average polymerization. I.e., average each dimension of the previous layer of potential vectors of the neighboring nodes as follows:
(2) LSTM (Long Short Term Memory, long-term memory) polymerization. The method comprises the steps of utilizing an LSTM network algorithm to sequence neighbor nodes (such as random sequence or sequence according to the characteristics of actual scenes), sequentially inputting the potential vector of the upper layer of each neighbor node into different LSTM units according to the sequence, sequentially processing by LSTM, and outputting an aggregation result in the last unit
(3) Pooling polymerization. Nonlinear conversion is firstly carried out on the potential vector of the upper layer of each neighbor node (such as the processing equivalent to a single full-connection layer, the weight W is needed to be used pool Bias b and activation function sigma) and then processing by Max or Mean Pooling (Max Pooling or average Pooling) according to each dimension to obtain an aggregate result, as follows:
the GNN process is described above. For the target node a in fig. 4, the feature extraction process is as follows: acquiring a neighbor node B, C, D of A in a first layer, aggregating the input features of B, C, D, and performing nonlinear conversion with the input features of A to obtain a first layer potential vector of A; and in the second layer, the first layer potential vector of the neighbor node B, C, D is aggregated and nonlinear conversion is carried out on the first layer potential vector of A, so that the second layer potential vector … of A is obtained, and iterated layer by layer until the K layer is reached, the K layer potential vector of A is obtained, and the characteristics of A are obtained. Fig. 4 shows the case where K is 3.
By the method, the characteristics of the layout nodes, commodity nodes or user nodes in the topological graph can be extracted, so that the layout characteristics, commodity characteristics or user characteristics can be obtained.
The following description of the training process of the graph neural network, referring to fig. 5, may include the following steps S510 to S530:
step S510, inputting the topological graph into a graph neural network to be trained, extracting characteristics of any two nodes in the topological graph, and calculating the characteristic similarity of the two nodes;
step S520, obtaining labels for two nodes based on whether edges exist between the two nodes;
and step S530, updating parameters of the graph neural network by using the feature similarity and the labels of the two nodes.
In the graph neural network to be trained, various parameters can be obtained through initialization, for example, parameters are randomly initialized and generated within a certain numerical range, and the parameters comprise the weight and the bias parameters. In the present exemplary embodiment, any two nodes are taken as a group of samples, for example, the node (u, v), the input sample data is the numbers of the two nodes, and the characteristics Z of the two nodes are output through GNN u And Z v And calculates the feature similarity of the two nodes.
The edges between the nodes are determined in step S130, so that the labels for any two nodes can be obtained based on whether there is an edge between the two nodes, for example, the label denoted (u, v) is E (u|v), E (u|v) =1 when there is an edge between u and v, and E (u|v) =0 when there is no edge between u and v.
In general, when there is an edge between u and v, the feature similarity between u and v should be high, and when there is no edge between u and v, the feature similarity should be low. Based on this, a loss function can be constructed as follows:
where L represents a loss function. n is the number of samples, and illustratively, if there are m nodes in the topology, the maximum value of n isP(Z u |Z v ) Representing the feature similarity of u and v. The feature similarity may be calculated by various algorithms, for example, cosine similarity, euclidean distance, etc. of the two feature vectors may be calculated.
In the actual training, any two nodes in the topological graph are taken as a group of sample data, a plurality of groups of sample data can be extracted from the topological graph, and the same node can form different sample data with different nodes. The sample data includes a positive sample (two nodes with edges) and a negative sample (two nodes without edges). The parameters of GNN are updated by gradient descent, etc., by optimizing the loss function over a batch (referring to a batch of samples).
In an alternative embodiment, step S530 may include:
substituting the feature similarity and labels of the two nodes into the following loss functions:
parameters of the graph neural network are updated by the loss function.
Wherein V represents a node set in the topological graph, and u and V represent any two nodes in V; n (u) denotes a set of nodes with edges to u, F (u) denotes a set of nodes without edges to u, E (u|v) =1 denotes u with edges to v, and E (u|v) =0 denotes u with edges to v, and 0. And the feature similarity of u and v is defined to be between 0 and 1.
Through the loss function (10), the GNN can be optimized, so that the feature similarity of the positive sample tends to be 1, and the feature similarity of the negative sample tends to be 0, thereby improving the accuracy of extracting the features by the GNN.
In an alternative embodiment, the loss function may also be constructed in the form of cross entropy, as follows:
in a complex topological graph, the connection relation between nodes is relatively dense, one node may have a plurality of neighbor nodes, the calculation amount is large when aggregation processing is performed, and redundant information may be introduced. Based on this, in an alternative embodiment, referring to fig. 6, step S140 may include the following steps S610 and S620:
step S610, determining key neighbor nodes of any node in the topological graph;
step S620, aggregating the input features of the key neighbor nodes, and iterating the preset layer number through the graph neural network to obtain the features of any node.
The key neighbor nodes are obtained by performing certain screening or discarding on the neighbor nodes, and can be regarded as subsets of the neighbor nodes. In this exemplary embodiment, since the topology map includes three different types of nodes, the topology map is a heterogeneous map, and the connection relationships of the three types of nodes are different, so that the key neighbor nodes can be determined in different manners respectively, which are specifically described below.
1. If any node is a layout node, all commodity nodes are selected from the neighbor nodes to serve as key neighbor nodes. In other words, the user node is discarded in the neighboring nodes of the layout node, because the relationship between the user node and the layout node is sparse, the value of the contained information may be low, the information density can be improved after discarding, and the operation is simplified.
2. If any node is a commodity node, selecting a first preset number of user nodes, a second preset number of commodity nodes and all layout nodes from the neighbor nodes of the commodity node as key neighbor nodes of the commodity node. In other words, the user nodes and commodity nodes are appropriately discarded in the neighbor nodes, and all the layout nodes are reserved, because the interactions between the user and the commodity, the commodity and the commodity are relatively dense, and some noise information may be contained. And selecting a first preset number of user nodes and a second preset number of commodity nodes, wherein the nodes with higher edge weights can be selected, and a random walk algorithm can be adopted for selection. The first preset number and the second preset number may be set according to experience or actual requirements, for example, when the number of user nodes is greater than the commodity node, the first preset number may be greater than the second preset number.
3. If any node is a user node, selecting a third preset number of nodes from the neighbor nodes of the user node as key neighbor nodes of any node. The neighboring nodes of the user node include layout nodes and commodity nodes, and in general, the edges of the user node are dense and may contain some noise information, so that the user node may be properly discarded. When the third preset number of nodes are selected, the nodes with higher edge weights can be selected, and a random walk algorithm can be adopted for selection. The third preset number may be set empirically or in actual demand, typically in relation to the complexity of the topology.
After the key neighbor nodes are determined, only the features of the key neighbor nodes are aggregated during GNN processing, so that the calculated amount is reduced, the generalization processing capability of the GNN is improved, and the situation of overfitting is reduced.
In the GNN processing process, the features are obtained through multi-layer iteration, wherein the initial features are input features, potential vectors of each layer are obtained through each layer of iteration subsequently, and finally output features are obtained. It can be seen that inputting features is a precondition for performing feature iterations. How to acquire the input features of the three nodes is specifically described below.
The input characteristics of the layout nodes are obtained by the following modes:
and extracting and encoding at least one of the title text, the category information and the poster image of the print to obtain the input characteristics of the print nodes corresponding to the print. The title text can adopt a natural language processing model to extract text and semantic features; the category information refers to which business category the layout belongs to, and can be used as an independent dimension; the poster image generally refers to an image of a layout cover or other propaganda pages, and after the image features are extracted by using a convolutional neural network, the images are combined or spliced with the first two features through dimension reduction processing to obtain the input features of the corresponding layout nodes. When each feature is processed, the feature is generally subjected to processes such as numerical processing, discretization, normalization, vectorization and the like, namely, the feature is encoded according to a preset standard rule.
The input characteristics of the commodity node are obtained by the following modes:
and extracting and encoding at least one of title text, category information, price information and commodity image of the commodity to obtain input characteristics of the block nodes corresponding to the commodity. The processing of the title text of the commodity can refer to the processing of the title text of the edition block; the category information may include multiple levels of categories to which the commodity belongs, and corresponding dimensions may be formed respectively; price information may be a separate dimension; the commodity image generally refers to an appearance image in a commodity sales page, and the processing of the poster image of the edition block can be referred to, and after dimension reduction, the three features are combined or spliced to obtain the input features of the corresponding commodity nodes.
The input characteristics of the user node are obtained by:
and extracting features from at least one of the basic information and the behavior attribute of the user, and coding to obtain input features of the user node corresponding to the user. The basic information may include user age, gender, occupation, residence area, etc., and the behavior attribute may include login behavior, browsing behavior, collection behavior, purchasing behavior, etc., and these data are sorted and encoded by a predetermined dimension to obtain the input features of the corresponding user node.
It should be noted that, to facilitate the feature aggregation process, the input features of the three nodes may have the same number of dimensions. When the input feature is acquired, all feature categories are not required to be acquired, a part of the feature categories are allowed to be missing, and the corresponding dimension can be filled with 0 or other preset values, which is not limited in the exemplary embodiment.
The topology diagram construction and the GNN training process can be completed on-line. After the completion, the characteristics of each node in the topological graph can be extracted by using the graph neural network, and a node characteristic table is obtained. The node characteristic table comprises characteristics corresponding to each layout node, commodity node or user node. When the characteristics of the object to be processed need to be extracted, the target node corresponding to the object to be processed can be determined in the topological graph, and then the characteristics of the target node are searched in the node characteristic table. For example, when the object to be processed is a target layout, finding a corresponding layout node according to a layout ID (Identity Document, here referred to as a unique identifier), and then obtaining the characteristics of the layout node, namely the characteristics of the target layout, through table lookup; when the object to be processed is a target commodity, finding out a corresponding commodity node according to the commodity ID, and obtaining the characteristic of the commodity node, namely the characteristic of the target commodity through table lookup; when the object to be processed is a target user, if the object to be processed is an old user, a corresponding user node is found according to the user ID, if the object to be processed is a new user, the user node to which the object to be processed belongs is determined according to the basic information of the user, and then the characteristics of the user node, namely the characteristics of the target user, are obtained through table lookup.
Further, if the object to be processed is a target user, after the characteristics of the target user are obtained, recommendation information related to the layout for the target user can be generated according to the similarity between the characteristics of the target user and the characteristics of each layout node and/or the similarity between the characteristics of the target user and the characteristics of each commodity node. Specifically, the features of the target user are respectively calculated to be similar to the features of the nodes of each section, the features of the nodes of each commodity are calculated to be similar to the features of the nodes of each commodity, a plurality of sections or commodities with the highest similarity are selected to form recommendation information, and the recommendation information is recommended to the target user. In the internet activities, the method can predict topics or commodity pages interested by the target user and recommend the topics or commodity pages to the target user, so that the blank of the prior art in the aspect of recommending the activity topics is filled up, and the high-quality customized service for the target user is realized.
Exemplary apparatus
Having described the feature extraction method of the exemplary embodiment of the present invention, next, a feature extraction apparatus of the exemplary embodiment of the present invention will be described with reference to fig. 7.
As shown in fig. 7, the feature extraction apparatus 700 may include:
The information obtaining module 710 is configured to obtain a commodity in each section, where a section is a commodity set including at least one commodity;
the node generating module 720 is configured to generate a layout node corresponding to each layout, a commodity node corresponding to each commodity, and a user node;
an edge generating module 730, configured to generate edges between each layout node, commodity node, and user node based on the historical behavior of the user on the layout and commodity, and the affiliation between the layout and commodity, so as to establish a topology map;
the topology map processing module 740 is configured to extract a feature of any node in the topology map by using the graph neural network.
In an alternative embodiment, the node generating module 720 is configured to generate the user node by:
clustering users to obtain a plurality of user categories; and generating a corresponding user node for each user category.
In an alternative embodiment, the node generating module 720 is configured to cluster the users by:
clustering users based on the basic information of the users to obtain a plurality of first user categories;
and clustering the users based on the behavior attributes of the users to obtain a plurality of second user categories.
In an alternative embodiment, the node generating module 720 is further configured to determine, when the new user is generated, a user category of the new user by:
if the new user has the historical data, determining the behavior attribute of the new user according to the historical data of the new user, and classifying the new user into a corresponding second user category according to the behavior attribute of the new user;
and if the new user does not have the historical data, classifying the new user into a corresponding first user category according to the basic information of the new user.
In an alternative embodiment, the edge generation module 730 includes a user-layout edge generation unit for:
historical interaction behavior of users in each user category with each layout in the historical data is counted to determine edges and edge weights between user nodes and layout nodes.
In an alternative embodiment, the edge generation module 730 includes a user-commodity edge generation unit for:
historical interaction behaviors of users in each user category and various commodities in the historical data are counted to determine edges and edge weights between user nodes and commodity nodes.
In an alternative embodiment, the edge generation module 730 includes a layout-commodity edge generation unit for:
And counting word frequency-inverse text frequency of each commodity in each layout, and determining edges and edge weights between the layout nodes and commodity nodes according to the word frequency-inverse text frequency.
In an alternative embodiment, the edge generation module 730 includes a commodity-commodity edge generation unit for:
according to the historical behaviors of the user for the commodities, the relevance among the commodities is determined, and the edges and the edge weights among the commodity nodes are determined according to the relevance.
In an alternative embodiment, the topology map processing module 740 includes a model training unit for:
inputting the topological graph into a graph neural network to be trained, extracting characteristics of any two nodes in the topological graph, and calculating characteristic similarity of the two nodes;
obtaining labels for the two nodes based on whether edges exist between the two nodes; and updating parameters of the graph neural network by using the feature similarity and the labels of the two nodes.
In an alternative embodiment, the model training unit is further configured to update parameters of the graph neural network by:
substituting the feature similarity and the labels of the two nodes into the following loss functions:
updating parameters of the graph neural network through the loss function;
Wherein L represents a loss function, and n is the number of samples; v represents a node set in the topological graph, and u and V represent any two nodes in V; n (u) represents a set of nodes with edges to u, F (u) represents a set of nodes without edges to u, E (u|v) =1 represents u with v with edges, E (u|v) =0 represents u with v without edges, and E (u|v) =0 represents 0; z is Z u Characteristic of u, Z v Characteristic of v, P (Z u |Z v ) The feature similarity of the point pair (u, v) is represented.
In an alternative embodiment, the topology map processing module 740 includes:
a key neighbor node determining unit, configured to determine a key neighbor node of any node in the topology map;
and the input feature aggregation unit is used for aggregating the input features of the key neighbor nodes and iterating the preset layer number through the graph neural network to obtain the features of any node.
In an alternative embodiment, the critical neighbor node determining unit is configured to:
if any node is a layout node, all commodity nodes are selected from the neighbor nodes of the layout node and serve as key neighbor nodes of any node.
In an alternative embodiment, the critical neighbor node determining unit is configured to:
if any node is a commodity node, selecting a first preset number of user nodes, a second preset number of commodity nodes and all layout nodes from the neighbor nodes of the commodity node as key neighbor nodes of any node.
In an alternative embodiment, the critical neighbor node determining unit is configured to:
if any node is a user node, selecting a third preset number of nodes from the neighbor nodes of the user node as key neighbor nodes of any node.
In an alternative embodiment, the input feature aggregation unit is further configured to obtain the input feature of the layout node by:
and extracting and encoding at least one of the title text, the category information and the poster image of the print to obtain the input characteristics of the print nodes corresponding to the print.
In an alternative embodiment, the input feature aggregation unit is further configured to obtain the input feature of the commodity node by:
and extracting and encoding at least one of title text, category information, price information and commodity image of the commodity to obtain input characteristics of the block nodes corresponding to the commodity.
In an alternative embodiment, the input feature aggregation unit is further configured to obtain the input feature of the user node by:
and extracting features from at least one of the basic information and the behavior attribute of the user, and coding to obtain input features of the user node corresponding to the user.
In an alternative embodiment, the topology map processing module 740 is further configured to:
extracting the characteristics of each node in the topological graph by using the graph neural network to obtain a node characteristic table;
when the characteristics of the object to be processed are extracted, determining a target node corresponding to the object to be processed in the topological graph, and searching in a node characteristic table to obtain the characteristics of the target node.
In an alternative embodiment, the feature extraction device 700 further includes a recommendation information generation module 750 for:
if the object to be processed is a target user, after the characteristics of the target user are obtained, recommendation information related to the layout for the target user is generated according to the similarity between the characteristics of the target user and the characteristics of each layout node and/or the similarity between the characteristics of the target user and the characteristics of each commodity node.
In addition, other specific details of the embodiments of the present invention are described in the above embodiments of the present invention, and are not described herein.
Exemplary storage Medium
A storage medium according to an exemplary embodiment of the present invention will be described with reference to fig. 8.
As shown in fig. 8, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RE, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Exemplary electronic device
An electronic device according to an exemplary embodiment of the present invention will be described with reference to fig. 9.
The electronic device 900 shown in fig. 9 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: at least one processing unit 910, at least one storage unit 920, a bus 930 connecting the different system components (including the storage unit 920 and the processing unit 910), a display unit 940.
Wherein the storage unit stores program code that is executable by the processing unit 910 such that the processing unit 910 performs steps according to various exemplary embodiments of the present invention described in the above-described "exemplary methods" section of the present specification. For example, the processing unit 910 may perform method steps as shown in fig. 1, 2, 5, or 6, etc.
The storage unit 920 may include volatile storage units such as a random access storage unit (RAM) 921 and/or a cache storage unit 922, and may further include a read only storage unit (ROM) 923.
The storage unit 920 may also include a program/utility 924 having a set (at least one) of program modules 925, such program modules 925 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 930 may include a data bus, an address bus, and a control bus.
The electronic device 900 may also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, bluetooth device, etc.) via an input/output (I/O) interface 950. The electronic device 900 also includes a display unit 940 that is connected to an input/output (I/O) interface 950 for displaying. Also, electronic device 900 may be coupled to one or more networks (e.g., a local area network (FAN), a Wide Area Network (WAN) and/or a public network via network adapter 960
Network, such as the internet). As shown, the network adapter 960 communicates with other modules of the electronic device 900 over the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 900, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
It should be noted that while several modules or sub-modules of the apparatus are mentioned in the detailed description above, such partitioning is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Furthermore, although the operations of the methods of the present invention are depicted in the drawings in a particular order, this is not required to either imply that the operations must be performed in that particular order or that all of the illustrated operations be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
While the spirit and principles of the present invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments nor does it imply that features of the various aspects are not useful in combination, nor are they useful in any combination, such as for convenience of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims (28)
1. A feature extraction method, comprising:
acquiring commodities in each section, wherein the section is a commodity set comprising at least one commodity;
generating a layout node corresponding to each layout, a commodity node corresponding to each commodity and a user node;
Generating edges among the layout nodes, commodity nodes and user nodes based on historical behaviors of the user on the layout and the commodity and the subordinate relation between the layout and the commodity so as to establish a topological graph; the edges among the layout nodes, the commodity nodes and the user nodes comprise: edges between the user nodes and the layout nodes, edges between the user nodes and the commodity nodes, edges between the layout nodes and the commodity nodes, and edges between the commodity nodes and the commodity nodes;
extracting the characteristics of any node in the topological graph by using a graph neural network;
wherein, based on the historical behavior of the user on the layout, the commodity and the subordinate relation between the layout and the commodity, generating edges among the layout nodes, commodity nodes and user nodes to establish a topological graph, comprising at least one of the following:
counting the historical interaction behaviors of users in each user category in the historical data and each layout to determine edges and edge weights between the user nodes and the layout nodes; each user category corresponds to a user node;
Counting the historical interaction behaviors of users in each user category in the historical data and the commodities to determine edges and edge weights between the user nodes and the commodity nodes;
counting word frequency-inverse text frequency of each commodity in each layout, and determining edges and edge weights between the layout nodes and the commodity nodes according to the word frequency-inverse text frequency;
determining the relevance among the commodities according to the historical behaviors of the user on the commodities, and determining the edges and the edge weights between the commodity nodes according to the relevance;
the extracting the characteristics of any node in the topological graph by using the graph neural network comprises the following steps:
extracting the characteristics of each node in the topological graph by using a graph neural network to obtain a node characteristic table;
the method further comprises the steps of:
when the characteristics of an object to be processed are extracted, determining a target node corresponding to the object to be processed in the topological graph, and searching in the node characteristic table to obtain the characteristics of the target node;
if the object to be processed is a target user, after the characteristics of the target user are obtained, recommendation information related to the layout for the target user is generated according to the similarity between the characteristics of the target user and the characteristics of the layout nodes and/or the similarity between the characteristics of the target user and the characteristics of the commodity nodes.
2. The method according to claim 1, wherein the user node is generated by:
clustering users to obtain a plurality of user categories;
and respectively generating a corresponding user node for each user category.
3. The method of claim 2, wherein the clustering the users to obtain a plurality of user categories comprises:
clustering the users based on the basic information of the users to obtain a plurality of first user categories;
and clustering the users based on the behavior attributes of the users to obtain a plurality of second user categories.
4. A method according to claim 3, wherein when a new user is generated, the method further comprises:
if the new user has the historical data, determining the behavior attribute of the new user according to the historical data of the new user, and classifying the new user into a corresponding second user category according to the behavior attribute of the new user;
and if the new user does not have the historical data, classifying the new user into a corresponding first user category according to the basic information of the new user.
5. The method of claim 1, wherein the graph neural network is trained by:
Inputting the topological graph into a graph neural network to be trained, extracting characteristics of any two nodes in the topological graph, and calculating characteristic similarity of the two nodes;
obtaining labels for the two nodes based on whether edges exist between the two nodes;
and updating parameters of the graph neural network by using the feature similarity and the labels of the two nodes.
6. The method of claim 5, wherein updating parameters of the graph neural network using feature similarities and labels of the two nodes comprises:
substituting the feature similarity and the labels of the two nodes into the following loss functions:
updating parameters of the graph neural network through the loss function;
wherein L represents the loss function and n is the number of samples; v represents a node set in the topological graph, and u and V represent any two nodes in V; n (u) represents a set of nodes with edges to u, F (u) represents a set of nodes without edges to u, E (u|v) =1 represents u with edges to v, the label is 1, E (u|v) =0 represents u with edges to v, and the label is 0; z is Z u Characteristic of u, Z v Characteristic of v, P (Z u |Z v ) Representing the feature similarity of u and v.
7. The method of claim 1, wherein extracting features of any node in the topology map using a graph neural network comprises:
determining key neighbor nodes of any node in the topological graph;
and aggregating the input features of the key neighbor nodes, and iterating the preset layer number through the graph neural network to obtain the features of any node.
8. The method of claim 7, wherein determining critical neighbor nodes of the any node in the topology graph comprises:
if any node is a layout node, all commodity nodes are selected from the neighbor nodes of the layout node and serve as key neighbor nodes of any node.
9. The method of claim 7, wherein determining critical neighbor nodes of the any node in the topology graph comprises:
if any node is a commodity node, selecting a first preset number of user nodes, a second preset number of commodity nodes and all layout nodes from the neighbor nodes of the commodity node as key neighbor nodes of any node.
10. The method of claim 7, wherein determining critical neighbor nodes of the any node in the topology graph comprises:
If any node is a user node, selecting a third preset number of nodes from the neighbor nodes of the user node as key neighbor nodes of any node.
11. The method of claim 7, wherein the input features of the layout nodes are obtained by:
extracting and encoding at least one of title text, category information and poster image of the print to obtain input features of print nodes corresponding to the print.
12. The method of claim 7, wherein the input characteristics of the commodity node are obtained by:
and extracting and encoding at least one of title text, category information, price information and commodity image of the commodity to obtain the input characteristics of the layout nodes corresponding to the commodity.
13. The method according to claim 7, characterized in that the input features of the user node are obtained by:
and extracting features from at least one of basic information and behavior attributes of the user, and coding to obtain input features of user nodes corresponding to the user.
14. A feature extraction device, comprising:
The information acquisition module is used for acquiring commodities in each section, wherein the section is a commodity set comprising at least one commodity;
the node generation module is used for generating a layout node corresponding to each layout, a commodity node corresponding to each commodity and a user node;
the edge generation module is used for generating edges among the layout nodes, commodity nodes and user nodes based on historical behaviors of the user on the layout and the commodity and the subordinate relation between the layout and the commodity so as to establish a topological graph; the edges among the layout nodes, the commodity nodes and the user nodes comprise: edges between the user nodes and the layout nodes, edges between the user nodes and the commodity nodes, edges between the layout nodes and the commodity nodes, and edges between the commodity nodes and the commodity nodes;
the topological graph processing module is used for extracting the characteristics of any node in the topological graph by utilizing the graph neural network;
wherein the edge generation module comprises at least one of the following units:
a user-layout edge generation unit for counting historical interaction behaviors of users in each user category in the historical data with each layout to determine edges and edge weights between the user nodes and the layout nodes; each user category corresponds to a user node;
A user-commodity edge generation unit for counting historical interaction behaviors of users in each user category in historical data with each commodity to determine edges and edge weights between the user nodes and the commodity nodes;
a layout-commodity edge generating unit, which is used for counting word frequency-inverse text frequency of each commodity in each layout, and determining edges and edge weights between the layout nodes and the commodity nodes according to the word frequency-inverse text frequency;
a commodity-commodity edge generating unit configured to determine a correlation between commodities according to a historical behavior of a user for each commodity, and determine an edge and an edge weight between the commodity node and the commodity node according to the correlation;
the topological graph processing module is further used for extracting the characteristics of each node in the topological graph by using the graph neural network to obtain a node characteristic table; when the characteristics of an object to be processed are extracted, determining a target node corresponding to the object to be processed in the topological graph, and searching in the node characteristic table to obtain the characteristics of the target node;
the feature extraction device further comprises a recommendation information generation module, wherein the recommendation information generation module is used for generating recommendation information related to the layout for the target user according to the similarity between the features of the target user and the features of the layout nodes and/or the similarity between the features of the target user and the features of the commodity nodes after the features of the target user are obtained if the object to be processed is the target user.
15. The apparatus of claim 14, wherein the node generation module is configured to generate the user node by:
clustering users to obtain a plurality of user categories;
and respectively generating a corresponding user node for each user category.
16. The apparatus of claim 15, wherein the node generation module is configured to cluster users by:
clustering the users based on the basic information of the users to obtain a plurality of first user categories;
and clustering the users based on the behavior attributes of the users to obtain a plurality of second user categories.
17. The apparatus of claim 16, wherein the node generation module is further configured to, when a new user is generated, determine a user category of the new user by:
if the new user has the historical data, determining the behavior attribute of the new user according to the historical data of the new user, and classifying the new user into a corresponding second user category according to the behavior attribute of the new user;
and if the new user does not have the historical data, classifying the new user into a corresponding first user category according to the basic information of the new user.
18. The apparatus of claim 14, wherein the topology map processing module comprises a model training unit to:
inputting the topological graph into a graph neural network to be trained, extracting characteristics of any two nodes in the topological graph, and calculating characteristic similarity of the two nodes;
obtaining labels for the two nodes based on whether edges exist between the two nodes;
and updating parameters of the graph neural network by using the feature similarity and the labels of the two nodes.
19. The apparatus of claim 18, wherein the model training unit is further configured to update parameters of the graph neural network by:
substituting the feature similarity and the labels of the two nodes into the following loss functions:
updating parameters of the graph neural network through the loss function;
wherein L represents the loss function and n is the number of samples; v represents a node set in the topological graph, and u and V represent any two nodes in V; n (u) represents a set of nodes with edges to u, F (u) represents a set of nodes without edges to u, E (u|v) =1 represents u with edges to v, the label is 1, E (u|v) =0 represents u with edges to v, and the label is 0; z is Z u Characteristic of u, Z v Characteristic of v, P (Z u |Z v ) Representing the feature similarity of u and v.
20. The apparatus of claim 14, wherein the topology processing module comprises:
a key neighbor node determining unit, configured to determine a key neighbor node of the any node in the topology map;
and the input feature aggregation unit is used for aggregating the input features of the key neighbor nodes and iterating the preset layer number through the graph neural network to obtain the features of any node.
21. The apparatus according to claim 20, wherein the critical neighbor node determining unit is configured to:
if any node is a layout node, all commodity nodes are selected from the neighbor nodes of the layout node and serve as key neighbor nodes of any node.
22. The apparatus according to claim 20, wherein the critical neighbor node determining unit is configured to:
if any node is a commodity node, selecting a first preset number of user nodes, a second preset number of commodity nodes and all layout nodes from the neighbor nodes of the commodity node as key neighbor nodes of any node.
23. The apparatus according to claim 20, wherein the critical neighbor node determining unit is configured to:
if any node is a user node, selecting a third preset number of nodes from the neighbor nodes of the user node as key neighbor nodes of any node.
24. The apparatus of claim 20, wherein the input feature aggregation unit is further configured to obtain the input feature of the layout node by:
extracting and encoding at least one of title text, category information and poster image of the print to obtain input features of print nodes corresponding to the print.
25. The apparatus of claim 20, wherein the input feature aggregation unit is further configured to obtain the input feature of the commodity node by:
and extracting and encoding at least one of title text, category information, price information and commodity image of the commodity to obtain the input characteristics of the layout nodes corresponding to the commodity.
26. The apparatus of claim 20, wherein the input feature aggregation unit is further configured to obtain the input feature of the user node by:
And extracting features from at least one of basic information and behavior attributes of the user, and coding to obtain input features of user nodes corresponding to the user.
27. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1-13.
28. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any one of claims 1-13 via execution of the executable instructions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010279496.6A CN111429161B (en) | 2020-04-10 | 2020-04-10 | Feature extraction method, feature extraction device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010279496.6A CN111429161B (en) | 2020-04-10 | 2020-04-10 | Feature extraction method, feature extraction device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111429161A CN111429161A (en) | 2020-07-17 |
CN111429161B true CN111429161B (en) | 2023-10-10 |
Family
ID=71557725
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010279496.6A Active CN111429161B (en) | 2020-04-10 | 2020-04-10 | Feature extraction method, feature extraction device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111429161B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112561081B (en) * | 2020-12-18 | 2022-05-03 | 北京百度网讯科技有限公司 | Conversion method and device of deep learning model, electronic equipment and storage medium |
CN113011483B (en) * | 2021-03-11 | 2022-08-05 | 北京三快在线科技有限公司 | Method and device for model training and business processing |
CN113326879B (en) * | 2021-05-31 | 2024-07-19 | 深圳前海微众银行股份有限公司 | Service data monitoring method and device |
CN113869992B (en) * | 2021-12-03 | 2022-03-18 | 平安科技(深圳)有限公司 | Artificial intelligence based product recommendation method and device, electronic equipment and medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102254028A (en) * | 2011-07-22 | 2011-11-23 | 青岛理工大学 | Personalized commodity recommendation method and system integrating attributes and structural similarity |
CN103995866A (en) * | 2014-05-19 | 2014-08-20 | 北京邮电大学 | Commodity information pushing method and device based on link forecasting |
CN104966204A (en) * | 2015-07-06 | 2015-10-07 | 无锡天脉聚源传媒科技有限公司 | Network shop generation method and apparatus |
CN108182621A (en) * | 2017-12-07 | 2018-06-19 | 合肥美的智能科技有限公司 | The Method of Commodity Recommendation and device for recommending the commodity, equipment and storage medium |
CN108205768A (en) * | 2016-12-20 | 2018-06-26 | 百度在线网络技术(北京)有限公司 | Database building method and data recommendation method and device, equipment and storage medium |
CN108647996A (en) * | 2018-04-11 | 2018-10-12 | 中山大学 | A kind of personalized recommendation method and system based on Spark |
CN109446171A (en) * | 2017-08-30 | 2019-03-08 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device |
CN109685631A (en) * | 2019-01-10 | 2019-04-26 | 博拉网络股份有限公司 | A kind of personalized recommendation method based on big data user behavior analysis |
CN110415091A (en) * | 2019-08-06 | 2019-11-05 | 重庆仙桃前沿消费行为大数据有限公司 | Shop and Method of Commodity Recommendation, device, equipment and readable storage medium storing program for executing |
CN110827120A (en) * | 2019-10-18 | 2020-02-21 | 郑州大学 | GAN network-based fuzzy recommendation method and device, electronic equipment and storage medium |
KR102082202B1 (en) * | 2018-11-23 | 2020-03-02 | 심정식 | Device and method for providing recommended information on artificial intelligence based customized tools |
CN110969516A (en) * | 2019-12-25 | 2020-04-07 | 清华大学 | Commodity recommendation method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10223645B2 (en) * | 2015-10-06 | 2019-03-05 | International Business Machines Corporation | Trading goods based on image processing for interest, emotion and affinity detection |
-
2020
- 2020-04-10 CN CN202010279496.6A patent/CN111429161B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102254028A (en) * | 2011-07-22 | 2011-11-23 | 青岛理工大学 | Personalized commodity recommendation method and system integrating attributes and structural similarity |
CN103995866A (en) * | 2014-05-19 | 2014-08-20 | 北京邮电大学 | Commodity information pushing method and device based on link forecasting |
CN104966204A (en) * | 2015-07-06 | 2015-10-07 | 无锡天脉聚源传媒科技有限公司 | Network shop generation method and apparatus |
CN108205768A (en) * | 2016-12-20 | 2018-06-26 | 百度在线网络技术(北京)有限公司 | Database building method and data recommendation method and device, equipment and storage medium |
CN109446171A (en) * | 2017-08-30 | 2019-03-08 | 腾讯科技(深圳)有限公司 | A kind of data processing method and device |
CN108182621A (en) * | 2017-12-07 | 2018-06-19 | 合肥美的智能科技有限公司 | The Method of Commodity Recommendation and device for recommending the commodity, equipment and storage medium |
CN108647996A (en) * | 2018-04-11 | 2018-10-12 | 中山大学 | A kind of personalized recommendation method and system based on Spark |
KR102082202B1 (en) * | 2018-11-23 | 2020-03-02 | 심정식 | Device and method for providing recommended information on artificial intelligence based customized tools |
CN109685631A (en) * | 2019-01-10 | 2019-04-26 | 博拉网络股份有限公司 | A kind of personalized recommendation method based on big data user behavior analysis |
CN110415091A (en) * | 2019-08-06 | 2019-11-05 | 重庆仙桃前沿消费行为大数据有限公司 | Shop and Method of Commodity Recommendation, device, equipment and readable storage medium storing program for executing |
CN110827120A (en) * | 2019-10-18 | 2020-02-21 | 郑州大学 | GAN network-based fuzzy recommendation method and device, electronic equipment and storage medium |
CN110969516A (en) * | 2019-12-25 | 2020-04-07 | 清华大学 | Commodity recommendation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN111429161A (en) | 2020-07-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111444395B (en) | Method, system and equipment for obtaining relation expression between entities and advertisement recall system | |
CN111429161B (en) | Feature extraction method, feature extraction device, storage medium and electronic equipment | |
CN110717098B (en) | Meta-path-based context-aware user modeling method and sequence recommendation method | |
CN109299994B (en) | Recommendation method, device, equipment and readable storage medium | |
KR101419504B1 (en) | System and method providing a suited shopping information by analyzing the propensity of an user | |
CN111259263B (en) | Article recommendation method and device, computer equipment and storage medium | |
CN111626832B (en) | Product recommendation method and device and computer equipment | |
CN106447066A (en) | Big data feature extraction method and device | |
CN106445988A (en) | Intelligent big data processing method and system | |
US20210350202A1 (en) | Methods and systems of automatic creation of user personas | |
CN112487199A (en) | User characteristic prediction method based on user purchasing behavior | |
CN115659008B (en) | Information pushing system, method, electronic equipment and medium for big data information feedback | |
CN110264277A (en) | Data processing method and device, medium and the calculating equipment executed by calculating equipment | |
CN113656699B (en) | User feature vector determining method, related equipment and medium | |
Khan et al. | Comparative analysis on Facebook post interaction using DNN, ELM and LSTM | |
CN111696656B (en) | Doctor evaluation method and device of Internet medical platform | |
WO2023082864A1 (en) | Training method and apparatus for content recommendation model, device, and storage medium | |
Pughazendi et al. | Graph sample and aggregate attention network optimized with barnacles mating algorithm based sentiment analysis for online product recommendation | |
CN118250516B (en) | Hierarchical processing method for users | |
CN112632275B (en) | Crowd clustering data processing method, device and equipment based on personal text information | |
Hao et al. | Deep collaborative online learning resource recommendation based on attention mechanism | |
CN113094584A (en) | Method and device for determining recommended learning resources | |
CN112200602B (en) | Neural network model training method and device for advertisement recommendation | |
CN111460300B (en) | Network content pushing method, device and storage medium | |
CN116401450A (en) | Recommendation method and device based on knowledge graph and computer equipment |
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 |