Disclosure of Invention
The embodiment of the application provides a prompting method, a prompting device, prompting equipment and a readable storage medium, which are used for analyzing detail data of an e-commerce platform by utilizing a deep learning model to mine out a relation object, so that the mining efficiency is improved, and meanwhile, the dependence on operators is reduced.
In a first aspect, an embodiment of the present application provides a prompting method, including: acquiring user data according to a first user set, wherein users in the first user set are users with a relation between a first time period and a target object, and the user data comprise data used for representing the user attribute and data used for representing the user behavior; acquiring description data of each candidate object in a candidate set, wherein the candidate objects and the target object are different objects on the same platform; obtaining a reference value of each candidate object in the candidate set by using the user data and the description data of each candidate object and using a pre-trained deep learning model, wherein the reference value is used for indicating the preference degree of a user in the first user set on the candidate object, and the deep learning model is a model trained by a server by using the detail data of a platform in advance; determining a relation object of the target object from the candidate set according to the reference value of each candidate object in the candidate set, wherein the relation object is an object affecting the target object; and outputting prompt information, wherein the prompt information is used for prompting the relation object of the target object.
In one possible design, before the obtaining, by using the user data and the description data of each candidate object, the reference value of each candidate object in the candidate set using a pre-trained deep learning model, the method further includes:
Obtaining a sample set, wherein samples in the sample set comprise positive samples and negative samples, the positive samples comprise combinations of user data of users in a second user set and description data of the target object, the negative samples comprise combinations of user data of users in the second user set and description data of random objects, the users in the second user set are users with a second time period and the target object, the second time period is earlier than the first time period, and the random objects are randomly selected from other objects outside the target object;
training an initial model by using samples in the sample set to obtain the deep learning model.
In a possible design, the training the initial model using the samples in the sample set to obtain the deep learning model includes:
extracting portrait features of each user in the second user set from data used for representing user attributes in user data contained in the sample;
Extracting dynamic characteristics of each user in the second user set from the data used for representing the user behavior in the user data contained in the sample, wherein the dynamic characteristics comprise at least one of the following characteristics: behavior characteristics of each user in the second user set and behavior category characteristics of each user in the second user set, wherein the behavior category characteristics comprise identifications of categories corresponding to behaviors of the users;
Extracting the target object, the attribute characteristics and the heat characteristics of each random object from the description data contained in the sample;
and training the deep learning model according to the portrait features of each user in the second user set, the dynamic features of each user in the second user set, and the attribute features and the heat features of the target object, each random object.
In one possible design, the behavioral category features are at least two for any one of the sample sets, the method further comprising: determining respective feature vectors of each behavior category feature in the at least two behavior category features to obtain at least two feature vectors; determining a pooling vector according to the at least two feature vectors; determining a weight vector according to the pooling vector and an attribute vector of the random object, wherein the attribute vector is generated according to attribute characteristics of the random object; and determining the point multiplication of the pooling vector and the weight vector to obtain a point multiplication vector, wherein the point multiplication vector is used for representing the association relation between the behavior category characteristics of the users in the second user set and the random object.
In one possible design, the method further includes: for any sample in the sample set, determining an portrait feature vector corresponding to the portrait feature of the user according to the portrait feature of the user; determining a behavior feature vector of the user according to the behavior feature of the user; and generating a heat vector of the random object according to the heat characteristics of the random object.
In a possible design, the training the deep learning model according to the portrait features of each user in the second user set, the dynamic features of each user in the second user set, and the attribute features and the heat features of the target object, each random object includes: combining the portrait characteristic vector, the behavior characteristic vector, the point multiplication vector and the heat vector of any one sample in the sample set to obtain a combined vector of each sample in the sample set; training an initial model according to the merging vector of each sample in the sample set to obtain the deep learning model.
In a possible design, the obtaining, using the user data and the description data of each candidate object, the reference value of each candidate object in the candidate set by using a pre-trained deep learning model includes: for each candidate object in the candidate set, inputting respective user data of each user in the first user set and description data of the candidate object into the deep learning model to obtain a reference value of each user in the first user set to the candidate object; an average value of the reference values of each user in the first set of users to the candidate object is determined, and the average value is used as the reference value of the candidate object.
In a second aspect, an embodiment of the present application provides a prompting device, including:
The first acquisition module is used for acquiring user data according to a first user set, wherein users in the first user set are users with a relation between a first time period and a target object, and the user data comprise data used for representing the user attribute and data used for representing the user behavior.
And the second acquisition module is used for acquiring the description data of each candidate object in the candidate set, wherein the candidate objects and the target object are different objects on the same platform.
The third obtaining module is configured to obtain, by using the user data and the description data of each candidate object, a reference value of each candidate object in the candidate set by using a pre-trained deep learning model, where the reference value is used to indicate a preference degree of a user in the first user set on the candidate object, and the deep learning model is a model that a server is trained by using detail data of a platform in advance.
And the determining module is used for determining a relation object of the target object from the candidate set according to the reference value of each candidate object in the candidate set, wherein the relation object is an object influencing the target object.
The output module is used for outputting prompt information, and the prompt information is used for prompting the relation object of the target object.
In a possible design, the device further comprises:
The training module is used for acquiring a sample set before the third acquisition module acquires the reference value of each candidate object in the candidate set by using the user data and the description data of each candidate object and using a pre-trained deep learning model, and training an initial model by using a sample in the sample set to obtain the deep learning model; the samples in the sample set comprise positive samples and negative samples, the positive samples comprise combinations of user data of users in a second user set and description data of the target object, the negative samples comprise combinations of user data of users in the second user set and description data of random objects, the users in the second user set are users which generate a relation with the target object in a second time period, the second time period is earlier than the first time period, and the random objects are randomly selected from other objects outside the target object.
In a possible design, when the training model trains an initial model by using the samples in the sample set to obtain the deep learning model, the training model is used for extracting portrait features of each user in the second user set from data used for representing user attributes in user data contained in the samples, and extracting dynamic features of each user in the second user set from data used for representing user behaviors in the user data contained in the samples, wherein the dynamic features comprise at least one of the following features: and training the deep learning model according to the behavior characteristics of each user in the second user set, the behavior category characteristics comprising identifiers of categories corresponding to the behaviors of the users, the attribute characteristics and the heat characteristics of the target objects and the random objects extracted from the description data contained in the sample, and the portrait characteristics of each user in the second user set, the dynamic characteristics of each user in the second user set, the attribute characteristics and the heat characteristics of the target objects and the random objects.
In one possible design, for any one sample in the sample set, the behavior category features are at least two, and the training module is further configured to determine a feature vector of each of the behavior category features in the at least two behavior category features, so as to obtain at least two feature vectors; determining a pooling vector according to the at least two feature vectors; determining a weight vector according to the pooling vector and an attribute vector of the random object, wherein the attribute vector is generated according to attribute characteristics of the random object; and determining the point multiplication of the pooling vector and the weight vector to obtain a point multiplication vector, wherein the point multiplication vector is used for representing the association relation between the behavior category characteristics of the users in the second user set and the random object.
In a possible design, the training module is further configured to determine, for any one sample in the sample set, an portrait feature vector corresponding to the user portrait feature according to the user portrait feature of the user; determining a behavior feature vector of the user according to the behavior feature of the user; and generating a heat vector of the random object according to the heat characteristics of the random object.
In a feasible design, the training module is configured to combine, when training the deep learning model according to the portrait features of each user in the second user set, the dynamic features of each user in the second user set, the attribute features and the heat features of the target object, each random object, any one sample in the sample set, the portrait feature vector, the behavior feature vector, the dot product vector and the heat vector of the sample to obtain a combined vector of each sample in the sample set, and train an initial model according to the combined vector of each sample in the sample set to obtain the deep learning model.
In a possible design, the third obtaining module is configured to input, for each candidate object in the candidate set, respective user data of each user in the first user set and description data of the candidate object into the deep learning model, so as to obtain a reference value of each user in the first user set to the candidate object, determine an average value of the reference values of each user in the first user set to the candidate object, and use the average value as the reference value of the candidate object.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and executable instructions; wherein the executable instructions are stored in the memory and configured to be executed by the processor, the executable instructions comprising instructions for performing the method as in the first aspect or in various possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored therein computer-executable instructions for performing a method as in the first aspect or in various possible implementations of the first aspect, when executed by a processor.
According to the prompting method, the prompting device, the prompting equipment and the readable storage medium provided by the embodiment of the application, a pre-trained deep learning model is deployed on a server, when a relation object of a target object needs to be mined, the server determines a first user set according to the target object, user data of each user in the first user set is obtained, and the user data comprises data used for representing user attributes and data used for representing user behaviors. The server also obtains descriptive data for each candidate in the set of candidates. And then, the server inputs the acquired attribute data, behavior data and description data into a pre-trained deep learning model, so that the deep learning model outputs the reference value of the whole set of the first user to each candidate object. Then, the server takes one or more candidate objects with higher reference values as the relation objects of the target object. In the process, the server analyzes the detail data of the target object and the candidate objects by utilizing the deep learning model so as to mine the relation object of the target object from a plurality of candidate objects, thereby improving the mining efficiency and reducing the dependence on operators. Moreover, since each candidate object in the candidate set is other objects except the target object, the relation object mining process is not limited to a small amount of knowledge of operators, and therefore the relation object can be more accurately mined. Further, the method comprises the following steps. The first user set is a user which generates a relation with the target object in the first time period, and the users in the first user set are likely to have intersections with the users related to the candidate object, so that the relation object can be more accurately mined.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Currently, more and more merchants on various e-commerce platforms operate to promote sales of online store products, and competition analysis is an important analysis direction in operation. The premise of competition analysis is to find competing objects. In the traditional method, operators are relied on to mine out competing objects. Specifically, the operator searches for a candidate store similar to the target store sales product, and determines whether the candidate store is a competitor of the target store according to the indexes by combining indexes such as sales volume of the candidate store product and access volume of the user. In the process, whether the competitors reasonably depend on business knowledge of operators to a great extent, the operators can select the competitors from the candidate shops through multiple attempts, the wasted time is relatively large, and the decision of the merchants is influenced intangibly. Moreover, the relationship between some tool, accessory, and competitors is not particularly clear, which presents a degree of impediment to operator selection of competitors.
In addition, the space for individuals to acquire knowledge is always limited, and people always select candidate stores in the space known per se. However, in the electronic commerce platform, the number of shops and commodities is huge, and operators can only analyze a small number of candidate shops and commodities based on limited knowledge, but cannot acquire knowledge of most shops and commodities. Moreover, operators cannot acquire crossing groups between stores, resulting in a certain gap (gap) between the finally obtained index and the real data.
In view of this, embodiments of the present application provide a prompting method, apparatus, device, and readable storage medium, which analyze detail data of a target object and candidate objects in a platform by using a deep learning model, so as to mine a relationship object of the target object from a plurality of candidate objects, thereby improving mining efficiency and reducing dependence on operators.
Fig. 1 is a network architecture schematic diagram of a prompting method according to an embodiment of the present application. Referring to fig. 1, the network architecture includes a terminal device 1, a server 2, and a terminal device 3. The terminal device 1 establishes a network connection with the server 2, and the terminal device 3 establishes a network connection with the server 2. The terminal device 1 is a terminal device of a common user, such as a buyer, and various shopping APPs are installed on the terminal device 1, so that the user can access online shops, order placing, attention shops and the like of various merchants through the shopping APPs. The terminal device 3 is a terminal device of a seller operator or the like. The server 2 is deployed with a pre-trained deep learning model, and the deep learning model is utilized to analyze detail data of the target object and the candidate objects on the e-commerce platform so as to mine relation objects of the target object from a plurality of candidate objects and send prompt information to the terminal equipment 3 of operators.
The following describes the prompting method according to the embodiment of the present application in detail by taking the architecture shown in fig. 1 as an example. For example, please refer to fig. 2.
Fig. 2 is a flowchart of an object recognition method according to an embodiment of the present application. The present embodiment is described from the perspective of a server, and includes:
101. User data is obtained according to a first user set, wherein users in the first user set are users with a relation between a first time period and a target object, and the user data comprises data used for representing the user attribute and data used for representing the user behavior.
In the embodiment of the application, a deep learning model is trained in advance for the target object, and the deep learning model is used for mining the relation object of the target object, for example, a competitor of the target object and the like. After training the deep learning model, when the relation object of the target object is mined by utilizing the deep learning model, a first user set is determined, and the users in the first user set are users generating the relation with the target object in a first time period. For example, if the target object is a store, the users in the first user set are users who purchase goods provided by the target object in the first period of time, users who pay attention to the target object, users who search for the target object, and so on. Wherein the first period of time is, for example, the last two days, the last one week, etc.
After the first user set is determined, the server acquires user data of users in the first user set, wherein the user data comprises data used for representing user attributes and data used for representing user behaviors. Wherein the data used to characterize the user's attributes, also referred to as static data of the user, such as the user's age, membership grade, gender, etc., remain unchanged for a period of time, such as one year, one month. The data used to characterize the behavior of a user, also referred to as dynamic data of the user, changes over time, such as the number of times the user accesses a target object, the number of times the target object is focused on, the number of times a candidate object in the set of candidate objects is accessed, the number of times a commodity is placed on the candidate object, etc.
102. And acquiring description data of each candidate object in the candidate set, wherein the candidate object and the target object are different objects on the same platform.
The candidate set is any one object on the platform other than the target object. For example, in the e-commerce platform, the target object is a target store, and the candidate stores in the candidate set are any one store except the target store from among the mass stores provided by the e-commerce platform. The server randomly takes one or more other objects except the target object in the e-commerce platform as candidate objects. Or the server takes the object which satisfies a certain relation in other objects except the target object as the target object, for example, takes the store which is ordered by the users in the first user set as a candidate object. For another example, stores in which the main stream product is similar to the target store are candidates.
After selecting the candidate set, for each candidate object in the candidate set, the server obtains description data for describing the candidate object, the description data including static data such as a shop level of the candidate object, a three-level category of a product managed by the candidate object, and dynamic data. The dynamic data includes the number of users accessing the candidate, the number of users purchasing the product provided by the candidate, and the like.
103. And acquiring reference values of all candidate objects in the candidate set by using the user data and the description data of all candidate objects and using a pre-trained deep learning model, wherein the reference values are used for indicating the preference degree of the user in the first user set on the candidate objects, and the deep learning model is a model trained by a server by using the detail data of a platform in advance.
Illustratively, the deep learning model is a model that the server trains in advance with the detail data of the platform. The server inputs the acquired user data and description data into a pre-trained deep learning model, and the deep learning model learns the data to output a reference value of the preference degree of the user in the first user set on each candidate object. For a particular candidate, the reference value reflects the overall preference of the first set of users for the candidate. The higher the reference value, the more preferred the candidate is for the user in the first set of users, and the first set of users is the purchasing population of the target object, and so on, and therefore the higher the reference value, the stronger the competing relationship of the candidate and the target object.
104. And determining the relation object of the target object from the candidate set according to the reference value of each candidate object in the candidate set.
The relationship object is an object having an influence on the target object, and the relationship object and the target object are, for example, competing relationships. After obtaining the reference value of the first user set for each candidate set in the candidate sets, the server performs reverse ordering on the reference values, namely ordering the reference values of the candidate sets according to the order of the reference values from high to low. Then, a relation object of the target object is selected according to the candidate object queue obtained through sequencing. For example, N candidates having the highest scores in the candidate queue are set as the target object, and N is an integer equal to or greater than 1. For another example, a candidate object whose reference value exceeds a threshold reference value in the candidate object queue is taken as a relationship object of the target object.
105. And outputting prompt information, wherein the prompt information is used for prompting the relation object of the target object.
Illustratively, the server outputs a hint information indicating the relationship object of the target object, where the hint information carries an identification of the relationship object, and so on. For example, the server sends a prompt message to the display to cause the display to display the relationship object of the target object; for another example, the server sends prompt information to the terminal device of the operator to inform the operator which candidate objects are the relationship objects of the target objects, so that the operator can adjust the operation policy of the target store in time, and the like.
According to the prompting method provided by the embodiment of the application, a pre-trained deep learning model is deployed on a server, when a relation object of a target object needs to be mined, the server determines a first user set according to the target object, user data of each user in the first user set is obtained, and the user data comprises data for representing user attributes and data for representing user behaviors. The server also obtains descriptive data for each candidate in the set of candidates. And then, the server inputs the acquired attribute data, behavior data and description data into a pre-trained deep learning model, so that the deep learning model outputs the reference value of the whole set of the first user to each candidate object. Then, the server takes one or more candidate objects with higher reference values as the relation objects of the target object. In the process, the server analyzes the detail data of the target object and the candidate objects by utilizing the deep learning model so as to mine the relation object of the target object from a plurality of candidate objects, thereby improving the mining efficiency and reducing the dependence on operators. Moreover, since each candidate object in the candidate set is other objects except the target object, the relation object mining process is not limited to a small amount of knowledge of operators, and therefore the relation object can be more accurately mined. Further, the method comprises the following steps. The first user set is a user which generates a relation with the target object in the first time period, and the users in the first user set are likely to have intersections with the users related to the candidate object, so that the relation object can be more accurately mined.
Next, a detailed description is given of how the deep learning model is trained. In the embodiment of the application, the process of training the deep learning model mainly comprises two stages: a data acquisition stage and a model training stage.
First, a data acquisition phase.
In this stage, the server obtains a sample set, wherein the samples in the sample set comprise positive samples and negative samples, the positive samples comprise combinations of user data of users in a second user set and description data of the target object, the negative samples comprise combinations of user data of users in the second user set and description data of random objects, the users in the second user set are users which generate a relation with the target object in a second time period, the second time period is earlier than the first time period, and the random objects are randomly selected from other objects outside the target object.
In the embodiment of the application, for the target object, the server trains a deep learning model by using the data in the second time period. Then, the data in the first time period is used as an input and is input into the deep learning model, so that the deep learning model is combined with other input data, such as description data and the like to mine out the relation object of the target object. Wherein the second time period is, for example, the past month, half month or the past week, and the first time period is, for example, the past 5 days, the past 3 days, etc.
In the data acquisition stage, the server selects a second user set, and user data of each user in the second user set is acquired based on the second user set. The server also obtains descriptive data for each sample in the plurality of random objects, and descriptive data for the target object. The server then obtains positive and negative samples from the data. These processes are described in detail below.
The server obtains a second user set according to the target object, and the users in the second user set are, for example, users accessing the target object, searching the target object and the like in a second time period. The server then obtains user data for each user in the second set of users. For example, if the second time period is one week in the past, the server determines user data for each user in the second set of users from historical data for the past week.
When the server obtains the description data, taking the random object as an example, the server obtains attribute data and dynamic data of the random object, wherein the attribute data of the random object is such as the category of the management product of the random object, and the dynamic data of the random object is such as the user quantity accessing the random object, the user quantity purchasing the management product of the random object, and the like.
After the data is obtained, the server obtains positive samples and negative samples by using the data. Briefly, the second set of users and the associated data of the target object constitute a positive sample and the second set of users and the associated data of the random object constitute a negative sample.
In detail, one positive sample includes: user data of one user in the second user set, and description data of the target object. One negative example includes: user data of a user in the second set of users, and description data of a random object. The ratio of positive and negative samples is, for example, 1:5, etc.
By adopting the scheme, the server combines the description data of the target object with the user data of the second user set obtained according to the target object to obtain a positive sample, and combines the randomly selected random object with the user data in the second user set to obtain a negative sample, so that the unsupervised deep learning is converted into the supervised deep learning, and the accuracy of the deep learning model is greatly improved.
Second, the model training phase.
In the embodiment of the application, the model training stage comprises a characteristic extraction and processing process and a model training process. These processes are described in detail below. For example, please refer to fig. 3, fig. 3 is a schematic process diagram of a model training stage in the prompting method according to an embodiment of the present application.
Referring to fig. 3, from bottom to top, the first layer is an input layer for inputting various features. The various features of the first layer input include at least one of the following: the portrait features (user porfile) of each user in the second user set, the dynamic features of each user in the second user set, the attribute features and hotness features of the target object, the attribute features (shop-info) of the random object, and the hotness features (shop act). The dynamic characteristics of the user include a user action characteristic, a user behavior characteristic of the object (not illustrated in the figure), and behavior category characteristics of each user, where the behavior category characteristics include identification of multiple categories for which the behavior of the corresponding user is aimed. The behavior of the user includes access (pv), order placement (order), purchase (cart), attention (follow), search (search), etc., and the corresponding behavior category features include access category set (pv set), purchase category set (ord set), purchase category set (cart set), attention category set (fllow set).
The second layer is a characterized handle layer. In this layer, the server processes the features by embedding (embedding), barreling, term frequency inverse text frequency (TF-IDF), unicode (onhot), attention (attention) mechanism, full connection, etc., to obtain feature vectors.
A. the input layer is an portrait feature, and the processing layer processes the portrait feature to obtain a portrait feature vector.
For the portrayal features, the server extracts the portrayal features of each user in the second user set from the sample containing data for characterizing the user attributes, such as registration information of each user in the second user set. The server analyzes the attribute data contained in the sample to obtain the characteristics of age, gender, member level, preference category, latest access time and the like, and takes the characteristics as portrait characteristics of the user. This part of the feature is a continuous integer starting from 1, e.g. female, male, other (other) denoted by 1,2, 3, respectively.
There are problems with directly inputting these data into the linear model, e.g. 2 does not represent twice 1. Therefore, the features need to be subjected to unique thermal code (onthot) processing to obtain the image feature vector. For an example, please refer to table 1.
TABLE 1
Referring to table 1, assume that the sex is characterized by three values of 1 (male), 2 (female) and 3 (other), and the 1-fold map is [1, 0], the 2 is mapped to [0,1,0], and the 3 is mapped to [0, 1] after the unique heat code treatment. Similarly, the age characteristic is divided into 4 sections, the first section is 10-18, the second section is 18-30, the third section is 30-45, the fourth interval is more than 45, the four intervals are mapped as [1,0 ]: [0,1,0], [0,1,0], [0, 1].
In addition, if the dimension of the feature after onehot processing is high and is sparsity data, the feature after onehot processing is fully connected to reduce the dimension of the feature after onehot processing, for example, to 200 dimensions.
B. the input layer is the behavior feature of the user, and the processing layer processes the behavior feature to obtain a behavior feature vector.
For the behaviors of all users in the second user set, the server extracts dynamic characteristics of all users in the second user set from the data used for representing the user behaviors in the user data contained in the sample, wherein the dynamic characteristics comprise at least one of the following characteristics: the behavior characteristics of each user in the second user set and the behavior category characteristics of each user in the second user set, wherein the behavior category characteristics comprise identifiers of a plurality of categories corresponding to the behaviors of the users.
Illustratively, the user behavior includes three types: the behavior of the user itself, the behavior of the user on the object, and a sequence of behavior categories.
For the behavior of the user, the server counts the behaviors of access (PV), attention, search, purchase and the like of each user in the second user set in the second time period. For different behaviors, the server uses different criteria for processing. For an example, please refer to table 2.
Referring to table 2, for PV, attention, search and purchase, the second time period is, for example, 15 days, with day 0, and the server divides the 15 days into three intervals: 1-3, 4-7 and 8-15, respectively representing the first 1-3 days, the first 4-7 days and the first 8-15 days, the server counts the respective PV times, the attention times, the search times and the purchase times of each user in the 3 intervals.
Referring to table 2 again, for the purchase behavior, the second time period is, for example, two years, and the two years are divided into 5 intervals of the past 1, 2-3, 4-8, 9-12, 13-24, which respectively represent the past 1 month, the past two months and the past three months, the past 4-8 months, the past 9-12 months, and the previous year.
In table 2, the server does not distinguish between objects for a specific user, and takes the behavior of the user as an attention and the time interval of the past 1-3 months as an example, and the data counted in table 2 includes the number of objects that the user has focused on for the past 1-3 months. Such a user behavior is also referred to as a behavior of the user itself, since only the user itself is considered without distinguishing the objects.
In differentiating the objects, for each user in the second set of users, the server counts the number of actions that the user has on each object. For example, see table 3.
TABLE 3 Table 3
As can be seen from table 3: in comparison to table 2, Y in table 3 is data for one specific object, and X in table 2 is statistics of all stores related to user behavior. Such user behavior is referred to as user behavior on objects.
From the above, it can be seen that: the server performs a bucket-splitting process on the user's behavioral data to obtain a series of discrete features. In the above-mentioned barrel dividing process, taking the user behavior as pv as an example, the server divides the second time period into 3 time periods of 1-3, 4-7 and 8-15. However, embodiments of the present application are not limited, for example, for the behavior of the user itself, the second period is divided into: 0. 1-5, 6-20, 21+, i.e. the day, last 5 days, last 6 th to 20 th days, before 21 days. For another example, for the user's behavior on the object, the second time period is divided into four intervals of 0, 1-3, 4-10, 11+ representing the day, the last 3 days, the last 4 th day to the 10 th day, and before 11 days, respectively.
C. the input layer is the behavior category characteristics of the user, and the processing layer processes the behavior category characteristics to obtain characteristic vectors.
For any behavior of a user, such as PV, searching, purchasing, paying attention and the like, the server counts the tertiary category aimed at by the behavior to obtain a tertiary category set, and the tertiary category set is used as the characteristic of the behavior category. For example, the category of behavior for accessing this behavior is characterized by pv: [ cid1, cid4, cid9 … … cidj ]. The behavior indicates that the categories that the user has accessed include the categories identified as cid1, cid4, cid9 … … cid 9. Each category is, for example, three-level categories, small household appliances, and the like. In addition, for each behavior, since the order of the categories does not greatly affect the behavior category characteristics over a long period of time, no time is considered in the behavior category characteristics.
Since the user's behavior for various categories is multiple times, frequent access accounts for users' greater attention to such categories. Therefore, the number of accesses needs to be taken into account. However, for some categories, such as toilet paper, most users will browse and purchase the products without distinguishing the users. In view of the above, when the server processes behavior category characteristics of a user, the behavior category characteristics of each behavior are processed using tfidf, a common weighting technique for information and data mining. the tfidf process is divided into calculating word frequency (TF) and calculating inverse text frequency index (Inverse Document Frequency, IDF). When calculating the TF, the probability that the TF appears in the access category set of a certain user is used for each category. If the access category set of a certain user contains N categories in total, and a certain category (category) appears m times, the TF has a value of m/N. The server calculates the IDF using the following formula:
In the formula, |d| represents the total number of users, |j: ti∈dj represents the number of people who have accessed category ti. After TF and IDF are calculated, different kinds of objective weights under each behavior of each user can be determined. For example, see table 4.
TABLE 4 Table 4
Referring to table 4, the server can obtain different objective weights under each behavior of each user through tf×idf. Taking the behavior category characteristics pv of the pv behaviors of the user 1 as an example, [ cid1, cid4, cid9 … … cidj ], the behavior category characteristics of the pv behaviors of the user 1 after tfidf treatment are [0,0.321,0.861 … 0]. Assuming that 5 specific categories exist in [ cid1, cid4, cid9 … … cidj ] of the behavior category characteristics pv of the pv behavior of the user 1, and 1000 categories exist on the e-commerce platform, after tfidf processing, the behavior category characteristics of the pv behavior of the user 1 are a 1000-dimensional vector, 5 elements in the 1000-dimensional vector are not 0, and other elements are 0.
D. The input layer is the attribute feature of the random object, and the processing layer processes the attribute feature of the random object to obtain an attribute vector.
Taking a random object as a shop on an e-commerce platform as an example, in general, one shop has several main camping categories. The server obtains three-level class identity (identity, ID) of the camping of the random object, and performs one-hot processing on the IDs to obtain a vector [0,0,0,0,1,0,1 …,0,1] of the camping class of the random object, wherein the vector has the same size as a vector obtained by tfidf in Table 4, and the three-level class of the corresponding position is the same. That is, the two vectors are consistent in length, and the user's preference for an object (e.g., store) can be determined subsequently using the two vectors and the attention mechanism.
E. The input layer is the heat characteristic of the random object, and the processing layer processes the heat characteristic of the random object to obtain a heat vector.
Illustratively, for each random object, the server counts the number of times the user acts on the random object during the second period of time, thereby obtaining various degrees of heat of the random object. Wherein, the actions include pv, attention, search, purchasing, and purchasing. For an example, please refer to table 5.
TABLE 5
| pv | follow | search | cart | order |
| Random object 1 | X | X | X | X | X |
| … | | | | | |
In table 5, Z represents the number of times.
In the following, the model training process is described with emphasis.
Referring to fig. 3, the input layer inputs data from various channels, which are multidimensional sparse and feature of high living continuity. The features are processed by the processing layer to obtain discretized data. The processing of the processing layer comprises embedding, barrel division, TF-IDF, single hot code and the like. Corresponding behavior category characteristics, such as PV category characteristics, purchasing (ord) category characteristics, additional purchasing (cart) category characteristics and attention (follow) category characteristics, and obtaining respective characteristic vectors of the behavior category characteristics after TF-IDF processing is carried out on the behavior category characteristics by a server. And then, the server performs sum pool (sum pooling) processing on the feature vectors to obtain pooled vectors, and in the pooling process, initialized weight parameters are required to be set. And then, the server determines a weight vector according to the pooling vector and the attribute vector of the random object. Wherein the attribute vector is generated from the attribute characteristics of the random object. Because the attribute vector of a random object represents the store owner category, associating the attribute vector with the pooling vector through an attention (attention) mechanism is equivalent to associating the behavior category characteristics of the user with the owner category of the random object through an attention (attention) mechanism, and the relationship between the two is activated, i.e., the relationship between the two is activated.
The above is a process of how the model training phase handles negative samples, it being understood that for positive samples the server handles in the same way as described above.
Referring to fig. 3, after determining the weight vector, the server performs a point multiplication process on the weight vector and the pooled vector determined previously to obtain a point multiplication vector, where the point multiplication vector is used to characterize an association relationship between the behavior category feature of the user in the second user set and the random object. According to the scheme, the sparsity of the behavior of the user on the random object is considered, the random object is represented by three-level categories of the random object, the attention (attention) of the user on the random object is calculated in a dot product mode, and the aim of training an accurate deep learning model by utilizing multi-source data is fulfilled.
Referring to fig. 3, after obtaining the image feature vector, the behavior feature vector, the dot multiplication vector, and the heat vector, the server merges (concat) the vectors to obtain a merged vector.
The server then inputs the merged vector for each sample in the sample set to an initial model, such as a multi-layer fully connected deep neural network (deep neural networks, DNN). And then, the server continuously optimizes parameters of DNN until DNN is optimal, so that a deep learning model is trained. Taking a multi-layer DNN as an example of a three-layer DNN, the three-layer DNN includes a connection layer (concat), 2 dense layers (dense). Each layer in the three-layer DNN is a fully connected layer, and the dimension of each layer is selected according to the actual effect, for example, the dimensions of each layer from bottom to top are 300, 50 and 2.
In addition, in the model training stage, when an optimal deep learning model is selected, the learning rate, the number of elements of each layer, the size of a training batch (batch) and the like can be tried.
After training a deep learning model aiming at a target object, when the deep learning model is utilized to mine a relation object, a server acquires a user generating a relation between a first time period and the target object, combines the first user set and candidate objects in the candidate set, namely, user data of each user in the first user are combined with description data of one candidate object, different data in each combination are input to corresponding positions of an input layer in fig. 3, a merging vector obtained through processing of the processing layer is input to DNN, and a preference degree reference value is output by DNN. In this way, a preference degree reference value of each user in the first set of users for the candidate object can be obtained. The server averages the reference values of the preference degrees, and takes the average value as the reference value of the candidate object. In the same way, the server can obtain a reference value for each candidate object in the candidate set. Then, the server performs reverse ordering on the reference values of the candidate objects, namely ordering the candidate objects from high to low, and takes the topN candidate object as the relation object of the target object.
By adopting the scheme, the relation object of the target object is selected in a reverse order by acquiring the reference value of the preference degree of the first user set on each candidate object, so that the aim of accurately selecting the relation of the target object is fulfilled.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of a prompting device according to an embodiment of the present application. The prompting device 100 may be implemented in software and/or hardware. As shown in fig. 4, the presentation device 100 includes:
A first obtaining module 11, configured to obtain user data according to a first user set, where users in the first user set are users that generate a relationship between a first time period and a target object, and the user data includes data for characterizing the user attribute and data for characterizing the user behavior;
A second obtaining module 12, configured to obtain description data of each candidate object in the candidate set, where the candidate object and the target object are different objects on the same platform;
A third obtaining module 13, configured to obtain, using the user data and the description data of each candidate object, a reference value of each candidate object in the candidate set by using a pre-trained deep learning model, where the reference value is used to indicate a preference degree of a user in the first user set on the candidate object, and the deep learning model is a model that a server is trained by using detail data of a platform in advance;
A determining module 14, configured to determine, from the candidate set, a relationship object of the target object according to a reference value of each candidate object in the candidate set, where the relationship object is an object that has an influence on the target object;
And the output module 15 is used for outputting prompt information, wherein the prompt information is used for prompting the relation object of the target object.
Fig. 5 is a schematic structural diagram of another prompting device according to an embodiment of the present application. The presentation device 100 further includes, based on the above fig. 4:
A training module 16, configured to, before the third obtaining module 13 obtains, using the user data and the description data of each candidate object, a reference value of each candidate object in the candidate set using a pre-trained deep learning model, obtain a sample set, and train an initial model using a sample in the sample set to obtain the deep learning model; the samples in the sample set comprise positive samples and negative samples, the positive samples comprise combinations of user data of users in a second user set and description data of the target object, the negative samples comprise combinations of user data of users in the second user set and description data of random objects, the users in the second user set are users which generate a relation with the target object in a second time period, the second time period is earlier than the first time period, and the random objects are randomly selected from other objects outside the target object.
In a possible design, when the training model trains an initial model by using the samples in the sample set to obtain the deep learning model, the training model is used for extracting portrait features of each user in the second user set from data used for representing user attributes in user data contained in the samples, and extracting dynamic features of each user in the second user set from data used for representing user behaviors in the user data contained in the samples, wherein the dynamic features comprise at least one of the following features: and training the deep learning model according to the behavior characteristics of each user in the second user set, the behavior category characteristics comprising identifiers of categories corresponding to the behaviors of the users, the attribute characteristics and the heat characteristics of the target objects and the random objects extracted from the description data contained in the sample, and the portrait characteristics of each user in the second user set, the dynamic characteristics of each user in the second user set, the attribute characteristics and the heat characteristics of the target objects and the random objects.
In one possible design, for any one of the samples in the sample set, the behavior category features are at least two, and the training module 16 is further configured to determine a feature vector of each of the at least two behavior category features, so as to obtain at least two feature vectors; determining a pooling vector according to the at least two feature vectors; determining a weight vector according to the pooling vector and an attribute vector of the random object, wherein the attribute vector is generated according to attribute characteristics of the random object; and determining the point multiplication of the pooling vector and the weight vector to obtain a point multiplication vector, wherein the point multiplication vector is used for representing the association relation between the behavior category characteristics of the users in the second user set and the random object.
In a possible design, the training module 16 is further configured to determine, for any one of the samples in the sample set, a portrait feature vector corresponding to the user portrait feature according to the user portrait feature of the user; determining a behavior feature vector of the user according to the behavior feature of the user; and generating a heat vector of the random object according to the heat characteristics of the random object.
In a possible design, the training module 16 is configured to combine, when training the deep learning model according to the portrait feature of each user in the second user set, the dynamic feature of each user in the second user set, the attribute feature and the heat feature of the target object, each random object, any one sample in the sample set, the portrait feature vector of the sample, the behavior feature vector, the dot product vector, and the heat vector to obtain a combined vector of each sample in the sample set, and train an initial model according to the combined vector of each sample in the sample set to obtain the deep learning model.
In a possible design, the third obtaining module 13 is configured to input, for each candidate object in the candidate set, respective user data of each user in the first user set and description data of the candidate object into the deep learning model, so as to obtain a reference value of each user in the first user set for the candidate object, determine an average value of the reference value of each user in the first user set for the candidate object, and use the average value as the reference value of the candidate object.
The prompting device provided by the embodiment of the application can execute the action of the server in the embodiment of the method, and the implementation principle and the technical effect are similar and are not repeated here.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the application. As shown in fig. 6, the electronic device 200 includes:
A processor 21 and a memory 22;
The memory 22 stores executable instructions;
The at least one processor 21 executes executable instructions stored in the memory 22, causing the processor 21 to perform the method as applied to a server as described above.
The specific implementation process of the processor 21 can be referred to the above method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
Optionally, the electronic device 200 further comprises a communication interface 23. Wherein the processor 21, the memory 22 and the communication interface 23 may be connected by a bus 24.
Embodiments of the present application also provide a computer-readable storage medium having stored therein executable instructions that when executed by a processor are configured to implement a method as applied to a server as above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.