Method and apparatus for training a model

By training a user behavior prediction model based on SEQ2SEQ network structure, using the user's attributes and behavior sequence information, the problem of insufficient timing of user behavior analysis in the prior art is solved, and more accurate and real-time prediction of user purchase intention is achieved, reducing the Marketing costs.

CN113781079BActive Publication Date: 2025-01-10BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011092078.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-13
Publication Date
2025-01-10
Estimated Expiration
2040-10-13

AI Technical Summary

Technical Problem

The existing e-commerce user behavior analysis mainly relies on offline systems and cannot effectively consider the timing of the behavior, resulting in insufficient accuracy and real-timeness of the prediction model, affecting marketing expenses and customer acquisition efficiency.

Method used

By using machine learning algorithm, the user behavior prediction model based on SEQ2SEQ network structure is trained by obtaining user attribute information, target object feature information and user behavior sequence information, and the user behavior prediction model is trained using time series information to realize the prediction of the user's willingness to obtain target object. .

Benefits of technology

It reduces product marketing costs, improves customer acquisition simplicity, makes model training results more realistic and accurate, and provides more accurate prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113781079B_ABST
    Figure CN113781079B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for training a model, as well as a method and device for generating information. The implementation scheme of the method for training a model is as follows: obtaining a training sample set, wherein the training samples in the training sample set include the user's attribute information, the feature information of the target object matching the user, the user's behavior sequence information and the user's probability value, and the user's behavior sequence information is used to characterize the user's operation behavior information at each time point within a certain time period; using a machine learning algorithm, the user's attribute information, the feature information of the target object matching the user and the user's behavior sequence information included in the training sample set are used as input data, and the user's probability value is used as the expected output data, and a user behavior prediction model is trained. This scheme uses the user behavior sequence information of the time series for model training, so that the results of the model training are more realistic and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, specifically to the field of big data technology, and in particular to a method and device for training a model, and a method and device for generating information. Background Art

[0002] In recent years, Internet e-commerce has been continuously penetrating into people's daily lives, affecting all aspects of people's lives. At the same time, the Internet is developing day by day. As the number of online shopping users is becoming increasingly saturated, marketing costs and customer acquisition costs are getting higher and higher. It is of great significance to explore users' purchasing intentions through user and product portraits, as well as research and analysis of user behaviors (such as collection and purchase of products).

[0003] Currently, e-commerce user behavior is mainly constructed by sending user operation data to offline systems, and then summarizing user behavior preferences from offline systems. However, user behavior is a behavior sequence, and the temporal nature of the behavior needs to be considered. Summary of the invention

[0004] The present application provides a method, apparatus, device and storage medium for training a model, and a method and apparatus for generating information.

[0005] According to the first aspect of the present application, a method for training a model is provided, the method comprising: obtaining a training sample set, wherein the training samples in the training sample set include attribute information of the user, feature information of the target object matching the user, behavior sequence information of the user and probability value of the user, and the behavior sequence information of the user is used to characterize the user operation behavior information at each time point within a certain time period; utilizing a machine learning algorithm, taking the attribute information of the user, feature information of the target object matching the user and the behavior sequence information of the user included in the training samples in the training sample set as input data, and taking the probability value of the user corresponding to the input attribute information of the user, feature information of the target object and behavior sequence information as expected output data, and training to obtain a user behavior prediction model, wherein the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on the network structure of SEQ2SEQ.

[0006] In some embodiments, the method further includes: storing model parameters of the user behavior prediction model in a Redis cache.

[0007] In some embodiments, the user behavior prediction model is built based on an attention mechanism.

[0008] In some embodiments, obtaining a training sample set includes: determining a user behavior label based on a message queue of a real-time computing system, wherein the user behavior includes at least: clicking, adding to cart, collecting, and placing an order; based on the location information of the user behavior label, obtaining the user's attribute information corresponding to the user behavior label, the characteristic information of a target object matching the user, and the user's behavior sequence information, and storing the determined user behavior label and the obtained user's attribute information, the characteristic information of the target object, and the behavior sequence information in a file system, wherein the location information is the key position information corresponding to the preset information in the characterization software interface or the code position information corresponding to the preset information in the program.

[0009] In some embodiments, obtaining a training sample set includes: based on preset user behavior, obtaining a user tag, a target object tag that matches the user and the preset user behavior, and time information and location information corresponding to the user and the preset user behavior from a file system; determining the user's attribute information based on the user tag, and determining the target object's feature information based on the target object tag; and obtaining the user's behavior sequence information that matches the preset user behavior based on the time information and location information.

[0010] In some embodiments, the file system is updated according to a preset time period.

[0011] According to a second aspect of the present application, a method for generating information is provided, the method comprising: monitoring the user's operating behavior and obtaining the user's operating behavior information; in response to the user's operating behavior information being equal to preset user behavior information, obtaining the user's attribute information, characteristic information of a target object matching the user and the preset user behavior information, and the user's behavior sequence information matching the preset user behavior information, wherein the preset user behavior information is one or more operating behavior information that characterizes the user's willingness to obtain the target object; inputting the obtained user's attribute information, characteristic information of the target object, and behavior sequence information into a pre-trained user behavior prediction model, generating a user probability value corresponding to the user's attribute information, characteristic information of the target object, and behavior sequence information, wherein the user behavior prediction model is trained by a method according to one of claims 1-7.

[0012] According to a third aspect of the present application, a device for training a model is provided, the device comprising: an acquisition unit, configured to acquire a training sample set, wherein the training samples in the training sample set include attribute information of the user, feature information of a target object matching the user, behavior sequence information of the user and probability value of the user, and the behavior sequence information of the user is used to characterize the user operation behavior information at each time point within a certain time period; a training unit, configured to use a machine learning algorithm, taking the attribute information of the user, feature information of the target object matching the user and behavior sequence information of the user included in the training samples in the training sample set as input data, and taking the probability value of the user corresponding to the input attribute information of the user, feature information of the target object and behavior sequence information as expected output data, to train a user behavior prediction model, wherein the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on the network structure of SEQ2SEQ.

[0013] In some embodiments, the device also includes: a storage unit configured to store model parameters of the user behavior prediction model in a Redis cache.

[0014] In some embodiments, the user behavior prediction model in the training unit is constructed based on an attention mechanism.

[0015] In some embodiments, the acquisition unit includes: a first determination module, configured to determine the user behavior tag according to the message queue of the real-time computing system, wherein the user behavior includes at least: clicking, adding to cart, collecting, and placing an order; the first acquisition module, configured to obtain the user's attribute information corresponding to the user behavior tag, the characteristic information of the target object matched with the user, and the user's behavior sequence information based on the location information of the user behavior tag, and store the determined user behavior tag and the obtained user's attribute information, the characteristic information of the target object, and the behavior sequence information to the file system, wherein the location information is the key position information corresponding to the preset information in the characterization software interface or the code position information corresponding to the preset information in the program.

[0016] In some embodiments, the acquisition unit includes: a second acquisition module, configured to acquire a user tag, a target object tag matching the user and the preset user behavior, and time information and location information corresponding to the user and the preset user behavior from a file system based on a preset user behavior; a second determination module, configured to determine the user's attribute information based on the user tag, and to determine the characteristic information of the target object based on the target object tag; a third acquisition module, configured to acquire the user's behavior sequence information matching the preset user behavior based on the time information and location information.

[0017] In some embodiments, the file system in the second acquisition module is updated according to a preset time period.

[0018] According to a fourth aspect of the present application, a device for generating information is provided, the device comprising: a monitoring unit, configured to monitor the user's operating behavior and obtain the user's operating behavior information; an obtaining unit, configured to obtain the user's attribute information, characteristic information of a target object matching the user and the preset user behavior information, and the user's behavior sequence information matching the preset user behavior information in response to the user's operating behavior information being equal to the preset user behavior information, wherein the preset user behavior information is one or more operating behavior information that characterizes the user's willingness to obtain the target object; a generating unit, configured to input the obtained user's attribute information, characteristic information of the target object, and behavior sequence information into a pre-trained user behavior prediction model, and generate a user probability value corresponding to the user's attribute information, characteristic information of the target object, and behavior sequence information, wherein the user behavior prediction model is trained by a method as claimed in any one of claims 1 to 7.

[0019] According to the fifth aspect of the present application, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in any implementation manner in the first aspect.

[0020] According to the sixth aspect of the present application, the present application provides a non-transitory computer-readable storage medium storing computer instructions, characterized in that the computer instructions are used to enable a computer to execute a method described in any implementation manner in the first aspect.

[0021] According to the technology of the present application, a training sample set is obtained, wherein the training samples in the training sample set include user attribute information, feature information of a target object matching the user, user behavior sequence information and user probability value, and the user behavior sequence information is used to characterize the user operation behavior information at each time point within a certain time period. A machine learning algorithm is used to take the user attribute information, feature information of a target object matching the user and user behavior sequence information included in the training samples in the training sample set as input data, and the user probability value corresponding to the input user attribute information, target object feature information and behavior sequence information as expected output data, and train to obtain a user behavior prediction model, wherein the probability value is used to characterize the possibility of the user determining to obtain the target object. The user behavior prediction model is built based on a SEQ2SEQ network structure, and the SEQ2SEQ network structure is applied to user behavior modeling, so as to predict the user's willingness to obtain the target object (i.e., purchase goods) under different user operation behaviors, reduce product marketing costs, and make it easier for products to acquire customers. The user behavior sequence information of the time series is used for model training, so that the results of the model training are more real and accurate, so that more accurate prediction results can be obtained using the model.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0024] Figure 1 is a schematic diagram of a first embodiment of a method for training a model according to the present application;

[0025] Figure 2 It is a scene diagram that can implement the method for training a model in an embodiment of the present application;

[0026] Figure 3 is a schematic diagram of a second embodiment of a method for training a model according to the present application;

[0027] Figure 4 is a schematic diagram of an embodiment of a method for generating information according to the present application;

[0028] Figure 5 is a structural schematic diagram of an embodiment of a device for training a model according to the present application;

[0029] Figure 6 is a structural schematic diagram of an embodiment of a device for generating information according to the present application;

[0030] Figure 7 It is a block diagram of an electronic device used to implement the method for training a model in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0032] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0033] Figure 1 A schematic diagram 100 of a first embodiment of a method for training a model according to the present application is shown. The method for training a model comprises the following steps:

[0034] Step 101: Obtain a training sample set.

[0035] In this embodiment, the execution subject (such as a server or terminal device) of the method for training the model can obtain a large amount of training sample sets from other electronic devices or locally through a wired connection or a wireless connection. The training samples in the training sample set include user attribute information, feature information of target objects matching the user, user behavior sequence information and user probability values, and the user behavior sequence information is used to characterize the user operation behavior information at each time point within a certain time period.

[0036] Here, the attribute information of the above-mentioned user may include: the user's age, gender, occupation, store preference, brand preference, etc. The characteristic information of the target object may include: the three-level category of the target object, that is, the scope of the target object (such as the store where the target object is located), the name of the target object and the applicable population of the target object (such as the target object gender label). The operation behavior information may include behavior data of different dimensions, and the different dimensions include at least: user operation behavior, measurement unit of the target object, target object index and preset time period, etc. The target object index may include: target object category, target object brand, target object scope and target object value range.

[0037] Step 102, using a machine learning algorithm, takes the user's attribute information, the feature information of the target object matching the user, and the user's behavior sequence information included in the training samples in the training sample set as input data, and takes the user's probability value corresponding to the input user's attribute information, the feature information of the target object, and the behavior sequence information as the expected output data, to train a user behavior prediction model.

[0038] In this embodiment, the execution subject can use a machine learning algorithm to take the user's attribute information obtained in step 101, the feature information of the target object matched with the user, and the user's behavior sequence information as input data, and take the probability value of the user corresponding to the input user's attribute information, the feature information of the target object, and the behavior sequence information as the expected output data, and train to obtain a user behavior prediction model. Among them, the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on the network structure of SEQ2SEQ.

[0039] Continue to see Figure 2 , Figure 2 FIG. 1 is a schematic diagram of an application scenario of the method for training a model according to this embodiment. Figure 2 In the application scenario, the method 200 for training the model of this embodiment runs in the electronic device 201. The electronic device 201 first obtains the training sample set 202, wherein the training samples in the training sample set 202 include the user's attribute information, the feature information of the target object matching the user, the user's behavior sequence information and the user's probability value, and then the electronic device 201 uses the machine learning algorithm to take the user's attribute information, the feature information of the target object matching the user and the user's behavior sequence information included in the training sample set 202 as input data, and the user's probability value corresponding to the input user's attribute information, the feature information of the target object and the behavior sequence information as the expected output data, and trains to obtain the user behavior prediction model 203. Among them, the user's behavior sequence information is used to characterize the user's operation behavior information at each time point within a certain time period, the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on the network structure of SEQ2SEQ.

[0040] The method for training a model provided in the above-mentioned embodiment of the present application adopts the method of obtaining a training sample set, wherein the training samples in the training sample set include attribute information of the user, feature information of the target object matching the user, behavior sequence information of the user and probability value of the user, and the behavior sequence information of the user is used to characterize the user operation behavior information at each time point within a certain time period. By using a machine learning algorithm, the attribute information of the user, the feature information of the target object matching the user and the behavior sequence information of the user included in the training sample set are used as input data, and the probability value of the user corresponding to the input attribute information of the user, the feature information of the target object and the behavior sequence information is used as the expected output data, and a user behavior prediction model is obtained by training, wherein the probability value is used to characterize the possibility of the user determining to obtain the target object. The user behavior prediction model is built based on the network structure of SEQ2SEQ, and the SEQ2SEQ network structure is applied to user behavior modeling, so as to predict the user's willingness to obtain the target object (i.e., purchase goods) under different user operation behaviors, reduce product marketing costs, and make it easier for products to acquire customers. The user behavior sequence information of the time series is used for model training, so that the results of the model training are more real and accurate, so that more accurate prediction results can be obtained using the model.

[0041] Further references Figure 3 , which shows a schematic diagram 300 of a second embodiment of a method for training a model. The process of the method includes the following steps:

[0042] Step 301: Obtain a training sample set.

[0043] In some optional implementations of this embodiment, obtaining a training sample set includes: determining a user behavior tag according to a message queue of a real-time computing system, wherein the user behavior includes at least: clicking, adding to a cart, collecting, and placing an order; obtaining the user's attribute information corresponding to the user behavior tag, the characteristic information of a target object matching the user, and the user's behavior sequence information based on the location information of the user behavior tag, and storing the determined user behavior tag and the obtained user's attribute information, characteristic information of the target object, and behavior sequence information to a file system, wherein the location information is the key position information corresponding to the preset information in the characterization software interface or the code position information corresponding to the preset information in the program. By obtaining training samples through a message queue, training sample data is obtained in real time to ensure the effectiveness and accuracy of the data, so as to realize accurate and real-time training of user behavior models.

[0044] Here, the real-time data of the live broadcast room and the users browsing the live broadcast room are accessed through the streaming big data processing framework flink, so that it has the ability to process the constantly changing and large-scale data in real time. Use multiple message queues JDQ to obtain the user's behavior labels in four dimensions (click, add to cart, favorite, order), and then parse the required embedding points in JDQ (that is, the location points in the software) to obtain the user's behavior information in four dimensions. After the parsing is completed, it is sent to the offline file system HDFS. If the embedding point information of the user's favorite target object is detected in the message queue, the user's real-time behavior after the favorite target object is counted, and the user's willingness to obtain the target object is predicted in real time.

[0045] In some optional implementations of this embodiment, obtaining a training sample set includes: based on a preset user behavior, obtaining a user tag, a target object tag matching the user and the preset user behavior, and time information and location information corresponding to the user and the preset user behavior from a file system; determining the user's attribute information based on the user tag, and determining the characteristic information of the target object based on the target object tag; based on the time information and location information, obtaining the user's behavior sequence information matching the preset user behavior. Using offline massive data and a distributed system architecture to complete the training of parameters in the network structure, the application of the trained model is more extensive and accurate.

[0046] Here, user tags and target object tags are obtained through the offline file system HDFS. After obtaining the tags, the corresponding user behavior information is queried and matched through the data warehouse tool HIVE. First, the location information (i.e., location information) of the user's favorite target object is queried in the HDFS file to obtain the time point and corresponding location point when the user favorited the target object, and then the user behavior after that time point is obtained and saved.

[0047] In some optional implementations of this embodiment, the file system is updated according to a preset time period. By regularly updating the file system, the training of the model is made more accurate and comprehensive.

[0048] Step 302, using a machine learning algorithm, takes the user's attribute information, the feature information of the target object matching the user, and the user's behavior sequence information included in the training samples in the training sample set as input data, and takes the user's probability value corresponding to the input user's attribute information, the feature information of the target object, and the behavior sequence information as the expected output data, and trains to obtain a user behavior prediction model.

[0049] In this embodiment, the execution subject can use a machine learning algorithm, take the user's attribute information obtained in step 301, the feature information of the target object matched with the user, and the user's behavior sequence information as input data, and take the probability value of the user corresponding to the input user's attribute information, the feature information of the target object, and the behavior sequence information as the expected output data, and train to obtain a user behavior prediction model. Among them, the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on the SEQ2SEQ network structure, and the user behavior prediction model is built based on the attention mechanism.

[0050] To further specify, the user behavior encoding framework SEQ2SEQ is mainly composed of an encoder, a decoder, and a long short-term memory network LSTM. Among them, the input of the encoder is the features of various dimensions of the user and the target object, and the user's features are sent to the LSTM network. In response to the user's operation behavior information being equal to the preset user behavior information (such as determining that the user's collection signal is obtained), the output of the LSTM network and the user's series of behaviors after the collection are put into the decoder for continuous decoding to predict the user's purchase expectations after collecting the product. The input of the encoder is the user's current behavior data and the hidden layer data output by the previous layer. After encoding the user's current behavior, it is sent to the LSTM network together, and the current prediction result is generated and output at the same time. The decoder is different from the encoder in that the decoder adds a nonlinear activation function at the input end and a logistic regression model softmax at the output end to output a probability prediction value between 0-1.

[0051] Here, in order to build a negative feedback mechanism for the predicted results, the attention mechanism network structure is introduced. The attention weight is obtained by using the input of the decoder and the state information of the decoder, and then the attention weight is multiplied by the output of the encoder to obtain the attention weight encoding output, which is reversed as the input of the next decoding cycle.

[0052] Step 303: store the model parameters of the user behavior prediction model in the Redis cache.

[0053] In this embodiment, the execution entity may store the model parameters of the user behavior prediction model trained in step 302 into a Redis cache.

[0054] In this embodiment, the specific operation of step 301 is the same as Figure 1 The operation of step 101 in the illustrated embodiment is substantially the same and will not be described in detail herein.

[0055] from Figure 3 It can be seen that Figure 1Compared with the corresponding embodiment, the schematic diagram 300 of the method for training the model in this embodiment adopts a user behavior prediction model constructed based on the attention mechanism, and in order to realize real-time prediction of the results, the model parameters of the trained user behavior prediction model are pushed to the Redis cache, so as to further realize real-time prediction and improve system efficiency.

[0056] See further Figure 4 , which shows a schematic diagram 400 of an embodiment of a method for generating information. The method for generating information comprises the following steps:

[0057] Step 401: monitor the user's operation behavior and obtain the user's operation behavior information.

[0058] In this embodiment, the execution subject of the method for generating information can monitor the user's operation behavior and obtain the user's operation behavior information.

[0059] Step 402, in response to the user's operation behavior information being equal to the preset user behavior information, obtaining the user's attribute information, the characteristic information of the target object matching the user and the preset user behavior information, and the user's behavior sequence information matching the preset user behavior information.

[0060] In this embodiment, the execution subject can judge the monitored operation behavior information, and in response to judging that the user's operation behavior information is equal to the preset user behavior information, obtain the user's attribute information, the characteristic information of the target object that matches the user and the preset user behavior information, and the user's behavior sequence information that matches the preset user behavior information. The preset user behavior information is one or more operation behavior information that indicates that the user is willing to obtain the target object.

[0061] Step 403: Input the acquired user attribute information, target object feature information and behavior sequence information into a pre-trained user behavior prediction model to generate a user probability value corresponding to the user attribute information, target object feature information and behavior sequence information.

[0062] In this embodiment, the execution subject can input the user's attribute information, the target object's feature information and the behavior sequence information obtained in step 402 into a pre-trained user behavior prediction model to generate a user's probability value corresponding to the user's attribute information, the target object's feature information and the behavior sequence information. The user behavior prediction model is trained by the method of any embodiment of the above-mentioned method for training a model.

[0063] It should be noted that the above-mentioned use of models to predict information is a well-known technology that is currently widely studied and applied, and will not be elaborated here.

[0064] from Figure 4 It can be seen that Figure 1 Compared with the corresponding embodiment, the schematic diagram 400 of the method for generating information in this embodiment highlights the step of using the trained user behavior prediction model to generate the user's probability value. Therefore, the solution described in this embodiment can improve the accuracy and timeliness of generating the user's probability value.

[0065] Further references Figure 5 , as a response to the above Figure 1 to Figure 3 The present application provides an embodiment of a device for training a model, and the device embodiment is similar to Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0066] like Figure 5 As shown, the device 500 for training the model of this embodiment includes: an acquisition unit 501 and a training unit 502, wherein the acquisition unit is configured to acquire a training sample set, wherein the training samples in the training sample set include the user's attribute information, the feature information of the target object matching the user, the user's behavior sequence information and the user's probability value, and the user's behavior sequence information is used to characterize the user's operation behavior information at each time point within a certain time period; the training unit is configured to use a machine learning algorithm, and use the user's attribute information, the feature information of the target object matching the user and the user's behavior sequence information included in the training samples in the training sample set as input data, and use the user's probability value corresponding to the input user's attribute information, the feature information of the target object and the behavior sequence information as the expected output data, to train and obtain a user behavior prediction model, wherein the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on the SEQ2SEQ network structure.

[0067] In this embodiment, the specific processing of the acquisition unit 501 and the training unit 502 of the device 500 for training the model and the technical effects thereof can be referred to respectively. Figure 1 The relevant descriptions of step 101 to step 102 in the corresponding embodiment are not repeated here.

[0068] In some optional implementations of this embodiment, the device also includes: a storage unit configured to store model parameters of the user behavior prediction model in a Redis cache.

[0069] In some optional implementations of this embodiment, the user behavior prediction model in the training unit is constructed based on the attention mechanism.

[0070] In some optional implementations of the present embodiment, the acquisition unit includes: a first determination module, configured to determine a user behavior tag based on a message queue of a real-time computing system, wherein the user behavior includes at least: clicking, adding to cart, collecting, and placing an order; a first acquisition module, configured to obtain the user's attribute information corresponding to the user behavior tag, the characteristic information of a target object matched with the user, and the user's behavior sequence information based on the location information of the user behavior tag, and store the determined user behavior tag and the obtained user's attribute information, the characteristic information of the target object, and the behavior sequence information to a file system, wherein the location information is the key position information corresponding to the preset information in the characterization software interface or the code position information corresponding to the preset information in the program.

[0071] In some optional implementations of this embodiment, the acquisition unit includes: a second acquisition module, configured to acquire a user tag, a target object tag matching the user and the preset user behavior, and time information and location information corresponding to the user and the preset user behavior from a file system based on a preset user behavior; a second determination module, configured to determine the user's attribute information based on the user tag, and to determine the characteristic information of the target object based on the target object tag; and a third acquisition module, configured to acquire the user's behavior sequence information matching the preset user behavior based on the time information and location information.

[0072] In some optional implementations of this embodiment, the file system in the second acquisition module is updated according to a preset time period.

[0073] Further references Figure 6 , as a response to the above Figure 4 The present application provides an embodiment of a device for generating information. Figure 4 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0074] like Figure 6As shown, the device 600 for generating information in this embodiment includes: a monitoring unit 601, an acquisition unit 602 and a generation unit 603, wherein the monitoring unit is configured to monitor the user's operation behavior and obtain the user's operation behavior information; the acquisition unit is configured to obtain the user's attribute information, the characteristic information of the target object matching the user and the preset user behavior information, and the user's behavior sequence information matching the preset user behavior information in response to the user's operation behavior information being equal to the preset user behavior information, wherein the preset user behavior information is one or more operation behavior information that characterizes the user's willingness to obtain the target object; the generation unit is configured to input the acquired user's attribute information, the characteristic information of the target object, and the behavior sequence information into a pre-trained user behavior prediction model, and generate a user probability value corresponding to the user's attribute information, the characteristic information of the target object, and the behavior sequence information, wherein the user behavior prediction model is trained by a method such as any embodiment of the method for training a model described above.

[0075] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0076] like Figure 7 , is a block diagram of an electronic device for a method for training a model according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0077] like Figure 7 As shown, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7A processor 701 is taken as an example.

[0078] The memory 702 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable at least one processor to perform the method for training a model provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the method for training a model provided in the present application.

[0079] The memory 702 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the method for training a model in the embodiment of the present application (for example, the attached Figure 5 The processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, implements the method for training the model in the above method embodiment.

[0080] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device for training the model, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the electronic device for training the model via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0081] The electronic device for the method of training a model may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0082] The input device 703 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device for training the model, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.

[0083] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0084] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0085] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0086] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0087] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0088] According to the technical solution of the embodiment of the present application, in response to receiving a prediction request sent by a user, prediction information corresponding to the prediction request is obtained, and according to the prediction information, the order of all prediction sub-models and each prediction sub-model in all prediction sub-models through which the prediction information flows during the prediction process is determined; based on the order of each prediction sub-model, each prediction sub-model in all prediction sub-models is associated; based on each associated prediction sub-model, the prediction information is predicted to generate a prediction result corresponding to the prediction request, which solves the problem that the existing joint prediction scheme cannot fully mobilize the technologies of both parties for joint construction, avoids the possibility that one party exchanging data will spread the received data, reduces the risk of data leakage, and realizes a method for online data prediction using a model trained on a federated learning platform, so that data can be shared securely, and the model effect is improved through online joint prediction, which further improves the business indicators and provides a better user experience.

[0089] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0090] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for training a model, the method comprising: Acquire a training sample set, wherein the training samples in the training sample set include attribute information of the user, feature information of the target object determined based on the location information corresponding to the user and the user behavior, behavior sequence information of the user, and a probability value of the user, wherein the behavior sequence information of the user is used to characterize the user operation behavior information at each time point within a certain time period after the time point indicated by the time information corresponding to the user and the user behavior, wherein the user behavior is an operation behavior in which the user intends to obtain the target object; Utilizing a machine learning algorithm, the user's attribute information, the target object's characteristic information, and the user's behavior sequence information included in the training samples in the training sample set are taken as input data, and the user's probability value corresponding to the input user's attribute information, the target object's characteristic information, and the behavior sequence information is taken as expected output data, and a user behavior prediction model is obtained through training, wherein the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on a SEQ2SEQ network structure.

2. The method according to claim 1, further comprising: The model parameters of the user behavior prediction model are stored in the Redis cache.

3. The method according to claim 1, wherein: The user behavior prediction model is built based on the attention mechanism.

4. The method according to claim 1, wherein: The step of obtaining a training sample set includes: Determine a user behavior tag according to a message queue of a real-time computing system, wherein the user behavior at least includes: click, add to cart, favorite, and place an order; Based on the location information of the user behavior tag, the attribute information of the user corresponding to the user behavior tag, the characteristic information of the target object matching the user and the user behavior in the user behavior tag, and the behavior sequence information of the user are obtained, and the determined user behavior tag and the obtained attribute information of the user, the characteristic information of the target object, and the behavior sequence information are stored in a file system, wherein the location information is the key position information corresponding to the preset information in the characterization software interface or the code position information corresponding to the preset information in the program.

5. The method according to claim 4, wherein: The step of obtaining a training sample set includes: Based on the preset user behavior, obtaining from the file system a user tag, a target object tag matching the user and the preset user behavior, and time information and location information corresponding to the user and the preset user behavior; Determine the attribute information of the user according to the user tag, and determine the characteristic information of the target object according to the target object tag; Based on the time information and the location information, behavior sequence information of the user matching the preset user behavior is obtained.

6. The method according to claim 5, wherein: The file system is updated according to a preset time period.

7. A method for generating information, the method comprising: Monitor the user's operation behavior and obtain the user's operation behavior information; In response to the operation behavior information of the user being equal to the preset user behavior information, determining the location information and time information corresponding to the user and the user behavior in the operation behavior information of the user; Acquire the attribute information of the user, the characteristic information of the target object determined based on the location information, and the behavior sequence information of the user that matches the user behavior, wherein the preset user behavior information is one or more user behavior information that indicates that the user is willing to obtain the target object, and the behavior sequence information is user operation behavior information that indicates the user at each time point within a certain time period after the time point indicated by the time information; The acquired attribute information of the user, the characteristic information of the target object and the behavior sequence information are input into a pre-trained user behavior prediction model to generate a probability value of the user corresponding to the attribute information of the user, the characteristic information of the target object and the behavior sequence information, wherein the user behavior prediction model is trained by the method according to one of claims 1-6.

8. A device for training a model, the device comprising: an acquisition unit, configured to acquire a training sample set, wherein the training samples in the training sample set include attribute information of a user, feature information of a target object determined based on location information corresponding to the user and the user behavior, behavior sequence information of the user, and a probability value of the user, wherein the behavior sequence information of the user is used to characterize user behavior information of the user at each time point within a certain time period after the time point indicated by the time information corresponding to the user and the user behavior, wherein the user behavior is an operation behavior of the user intending to obtain the target object; The training unit is configured to use a machine learning algorithm, take the user's attribute information, the characteristic information of the target object and the user's behavior sequence information included in the training samples in the training sample set as input data, and take the probability value of the user corresponding to the input user's attribute information, the characteristic information of the target object and the behavior sequence information as expected output data, and train to obtain a user behavior prediction model, wherein the probability value is used to characterize the possibility of the user determining to obtain the target object, and the user behavior prediction model is built based on the SEQ2SEQ network structure.

9. The apparatus according to claim 8, further comprising: The storage unit is configured to store the model parameters of the user behavior prediction model in the Redis cache.

10. The device according to claim 8, wherein: The user behavior prediction model in the training unit is constructed based on the attention mechanism.

11. The device according to claim 8, wherein: The acquisition unit comprises: A first determination module is configured to determine a user behavior tag according to a message queue of the real-time computing system, wherein the user behavior at least includes: clicking, adding to cart, collecting, and placing an order; The first acquisition module is configured to acquire the attribute information of the user corresponding to the user behavior tag, the characteristic information of the target object matching the user and the user behavior in the user behavior tag, and the behavior sequence information of the user based on the location information of the user behavior tag, and store the determined user behavior tag and the acquired attribute information of the user, the characteristic information of the target object, and the behavior sequence information in a file system, wherein the location information is the key position information corresponding to the preset information in the characterization software interface or the code position information corresponding to the preset information in the program.

12. The device according to claim 11, wherein The acquisition unit comprises: A second acquisition module is configured to acquire, based on a preset user behavior, a user tag, a target object tag matching the user and the preset user behavior, and time information and location information corresponding to the user and the preset user behavior from the file system; A second determination module is configured to determine attribute information of the user according to the user tag, and determine feature information of the target object according to the target object tag; The third acquisition module is configured to acquire the user's behavior sequence information matching the preset user behavior based on the time information and the location information.

13. The device according to claim 12, wherein: The file system in the second acquisition module is updated according to a preset time period.

14. A device for generating information, the device comprising: A monitoring unit, configured to monitor the operation behavior of the user and obtain the operation behavior information of the user; an acquisition unit, configured to, in response to the operation behavior information of the user being equal to preset user behavior information, determine the location information and time information corresponding to the user and the user behavior in the operation behavior information of the user; acquire the attribute information of the user, the feature information of the target object determined based on the location information, and the behavior sequence information of the user matching the user behavior, wherein the preset user behavior information is one or more user behavior information characterizing that the user is willing to obtain the target object, and the behavior sequence information is user behavior information characterizing each time point of the user within a certain time period after the time point indicated by the time information; A generating unit is configured to input the acquired attribute information of the user, the characteristic information of the target object and the behavior sequence information into a pre-trained user behavior prediction model, and generate a probability value of the user corresponding to the attribute information of the user, the characteristic information of the target object and the behavior sequence information, wherein the user behavior prediction model is trained by the method described in one of claims 1-6.

15. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

16. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • User intention prediction method and device, electronic equipment and storage medium

    CN108446374A

  • Project information sorting method and device, computer equipment and storage medium

    CN110910199A

  • Recommendation information generation method, device and equipment and storage medium

    CN110929138A

  • Model training method and device, commodity recommendation method and device and storage medium

    CN111260449A