Method, model training method and apparatus for predicting user attitude
Patent Information
- Application Number
- CN202111122830.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2041-09-24
AI Technical Summary
然而,学生的短期行为特征具有偶然性,并且存在个体差异,不同学生的相同的行为特征可能对应于不同的注意力值
Smart Images

Figure CN115861866B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning technology, specifically to a method and apparatus for predicting user attitudes, and a method and apparatus for training a prediction model. Background Technology
[0002] In online classes, compared to in-person classes, teachers find it more difficult to observe students' attention levels, resulting in a predominantly one-way teaching method and lower teaching quality. To address this, existing technologies have proposed using machine learning methods to train models to predict students' attention values. Current models for predicting student attention primarily model students' short-term behavioral characteristics (i.e., behavioral features within a short timeframe). Specifically, this involves capturing video of students during class using a camera, extracting short video clips of the students, extracting behavioral features from these clips, and labeling them with the students' current attention values. The model can then be trained based on these behavioral features and labeled attention values. However, students' short-term behavioral characteristics are random and exhibit individual differences; the same behavioral characteristics may correspond to different attention values for different students. Therefore, models trained using short-term behavioral characteristics have low predictive accuracy. Summary of the Invention
[0003] The embodiments of this application aim to provide a scheme for predicting user attitudes, which provides higher prediction accuracy.
[0004] To achieve the above objectives, a first aspect of this application provides a method for predicting user attitudes. The method includes: acquiring first behavioral data of a user, the first behavioral data including multiple behavioral features of the user in a first time period; acquiring multiple second behavioral data of the user, each second behavioral data including multiple behavioral features of the user in a segment of a second time period, the second time period preceding the first time period, and the segments of the second time period corresponding to each second behavioral data being different; and a prediction model outputting a prediction result based on the first behavioral data and the multiple second behavioral data, the prediction result predicting the user's attitude in the first time period.
[0005] By combining user behavior data from the first time period with behavior data from the second time period preceding the first time period (which is typically longer than the first time period), the model avoids inaccurate predictions due to the randomness of user behavior in the first time period, thereby improving the model's prediction accuracy.
[0006] In one possible implementation of the first aspect, the attitude is attention, the first behavioral data is extracted from the user's first learning video, which was filmed during the first time period; the plurality of second behavioral data are extracted from multiple video segments in the user's second learning video, which was filmed during the second time period.
[0007] By combining user learning behavior data from the first time period and the second time period to predict user attention, user attention values can be predicted more accurately.
[0008] In one possible implementation of the first aspect, the method further includes: acquiring first content data corresponding to the first learning video; acquiring multiple second content data corresponding to the multiple second learning videos respectively; and the prediction model outputting a prediction result based on the first learning data and the multiple second learning data, including: the prediction model outputting a prediction result based on the first behavioral data, the multiple second behavioral data, the first content data, and the multiple second content data.
[0009] By combining the learning content of users in the first time period and the learning content in the second time period, the user's attention value can be predicted more accurately.
[0010] In one possible implementation of the first aspect, the prediction model includes a recurrent neural network, and the prediction model outputs a prediction result based on the first behavioral data and the plurality of second behavioral data, comprising: the recurrent neural network sequentially outputting a plurality of third behavioral data based on the sequentially input plurality of second behavioral data, wherein, for the third behavioral data output later, the recurrent neural network also outputs the third behavioral data output later based on the third behavioral data output earlier; the prediction model outputs a prediction result based on the first behavioral data and the plurality of third behavioral data.
[0011] By using recurrent neural networks to process user behavior data across multiple segments in the second time period, user behavior characteristics can be extracted more accurately.
[0012] In one possible implementation of the first aspect, the recurrent neural network includes a shared network and multiple private networks, and the method further includes determining the type of the user, wherein the recurrent neural network sequentially outputs multiple third-line data based on a plurality of sequentially input second-line data, and the shared network and the private network corresponding to the type sequentially output multiple third-line data based on the plurality of sequentially input second-line data.
[0013] By extracting shared features of users across different segments based on a shared network, more accurate predictions can be made for new users who did not appear during model training.
[0014] In one possible implementation of the first aspect, the prediction model outputs a prediction result based on the first behavioral data and the plurality of second behavioral data, comprising: the prediction model calculates fourth behavioral data based on the first behavioral data and second shared behavioral data, wherein the second shared behavioral data is determined by training the prediction model; and the prediction model outputs a prediction result based on the fourth behavioral data and the plurality of third behavioral data.
[0015] By extracting shared features of users in the first time period based on shared behavioral data, more accurate predictions can be made for new users who did not appear during model training.
[0016] In one possible implementation of the first aspect, the prediction model outputs a prediction result based on the fourth action data and the plurality of third action data, comprising: the prediction model outputs a prediction result based on a weighted sum of the plurality of third action data, wherein the weight of each third action data is determined based on the similarity between the third action data and the fourth action data.
[0017] In one possible implementation of the first aspect, the weight of each of the third line data is further determined based on the similarity between the second content data corresponding to the third line data and the first content data.
[0018] A second aspect of this application provides a method for training a prediction model, the method comprising: acquiring training samples, the training samples including first behavioral data, multiple second behavioral data, and label values, wherein the first behavioral data includes multiple behavioral features of the user in a first time period, each second behavioral data includes multiple behavioral features of the user in a segment of a second time period, the second time period is prior to the first time period, and the segments of the second time period corresponding to each second behavioral data are different, the label values indicating the user's attitude in the first time period; and updating the parameters of the prediction model based on the training samples.
[0019] In one possible implementation of the second aspect, the first behavioral data is extracted from the user's first learning video, and the plurality of second behavioral data are extracted from multiple segments of the user's second learning video, the first learning video being filmed in a first time period, the second learning video being filmed in a second time period, and the attitude being attention.
[0020] In one possible implementation of the second aspect, the training samples further include first content data and a plurality of second content data, wherein the first content data corresponds to the first learning video, and the plurality of second content data correspond to the plurality of second learning videos respectively.
[0021] A third aspect of this application provides an apparatus for predicting user attitudes, the apparatus comprising: an acquisition unit, configured to acquire first behavioral data of a user, the first behavioral data including multiple behavioral features of the user in a first time period; the acquisition unit further configured to acquire multiple second behavioral data of the user, each second behavioral data including multiple behavioral features of the user in a segment of a second time period, the second time period preceding the first time period, and the segments of the second time period corresponding to each second behavioral data being different; and a prediction unit, configured to output a prediction result based on the first behavioral data and the multiple second behavioral data using a prediction model, the prediction result predicting the user's attitude in the first time period.
[0022] In one possible implementation of the third aspect, the attitude is attention, the first behavioral data is extracted from the user's first learning video, which was filmed during the first time period; the plurality of second behavioral data are extracted from multiple video segments in the user's second learning video, which was filmed during the second time period.
[0023] In one possible implementation of the third aspect, the acquisition unit is further configured to: acquire first content data corresponding to the first learning video; acquire multiple second content data corresponding to the multiple second learning videos respectively; and the prediction unit is specifically configured to output a prediction result based on the first behavioral data, the multiple second behavioral data, the first content data and the multiple second content data through a prediction model.
[0024] In one possible implementation of the third aspect, the prediction model includes a recurrent neural network, and the prediction unit is specifically used to: sequentially output multiple third-row data based on multiple sequentially input second-row data through the recurrent neural network, wherein, for the third-row data output later, the recurrent neural network also outputs the third-row data output later based on the third-row data output earlier; and output a prediction result based on the first-row data and the multiple third-row data through the prediction model.
[0025] In one possible implementation of the third aspect, the recurrent neural network includes a shared network and multiple private networks. The device further includes a determining unit for determining the type of the user. The predicting unit is specifically used to sequentially output multiple third-line data based on multiple sequentially input second-line data through the shared network and the private network corresponding to the type.
[0026] In one possible implementation of the third aspect, the prediction unit is specifically used to: calculate fourth behavior data based on the first behavior data and the second shared behavior data through the prediction model, wherein the second shared behavior data is determined by training the prediction model; and output a prediction result based on the fourth behavior data and the plurality of third behavior data through the prediction model.
[0027] In one possible implementation of the third aspect, the prediction unit is specifically used to: output a prediction result based on the weighted sum of the plurality of third-behavioral data through the prediction model, wherein the weight of each third-behavioral data is determined based on the similarity between the third-behavioral data and the fourth-behavioral data.
[0028] In one possible implementation of the third aspect, the weight of each of the third line data is further determined based on the similarity between the second content data corresponding to the third line data and the first content data.
[0029] A fourth aspect of this application provides an apparatus for training a prediction model. The apparatus includes: an acquisition unit for acquiring training samples, the training samples including first behavioral data, multiple second behavioral data, and label values, wherein the first behavioral data includes multiple behavioral features of the user in a first time period, each second behavioral data includes multiple behavioral features of the user in a segment of a second time period, the second time period is prior to the first time period, and the segments of the second time period corresponding to each second behavioral data are different, and the label values indicate the user's attitude in the first time period; and a training unit for updating the parameters of the prediction model based on the training samples.
[0030] In one possible implementation of the fourth aspect, the first behavioral data is extracted from the user's first learning video, and the plurality of second behavioral data are extracted from multiple segments of the user's second learning video, the first learning video being filmed in a first time period, the second learning video being filmed in a second time period, and the attitude being attention.
[0031] In one possible implementation of the fourth aspect, the training samples further include first content data and a plurality of second content data, wherein the first content data corresponds to the first learning video, and the plurality of second content data correspond to the plurality of second learning videos respectively.
[0032] The fifth aspect of this application provides a computing device, characterized in that it includes a processor and a memory, wherein the memory stores executable computer program instructions, and the processor executes the executable computer program instructions to implement the method described in the first aspect, a possible implementation of the first aspect, a second aspect, or a possible implementation of the second aspect.
[0033] The sixth aspect of this application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer program instructions, which, when executed in a computer or processor, cause the computer or processor to perform the method described in the first aspect, a possible implementation of the first aspect, the second aspect, or a possible implementation of the second aspect.
[0034] The seventh aspect of this application provides a computer program product including computer program instructions that, when executed in a computer or processor, cause the computer or processor to perform the method described in the first aspect, a possible implementation of the first aspect, the second aspect, or a possible implementation of the second aspect. Attached Figure Description
[0035] The embodiments of this application will become clearer by describing them in conjunction with the accompanying drawings:
[0036] Figure 1 A system architecture diagram for predicting user attitudes provided in the embodiments of this application;
[0037] Figure 2 A system architecture diagram for training prediction models provided in the embodiments of this application;
[0038] Figure 3 A flowchart illustrating the method for training a prediction model provided in this application embodiment;
[0039] Figure 4 This is a schematic diagram illustrating the method for extracting segmented behavior vectors from long-term video provided in this embodiment;
[0040] Figure 5 This is a schematic diagram illustrating the method for extracting short-term behavior vectors from short-term videos provided in this embodiment;
[0041] Figure 6 An architecture diagram of the prediction model provided in the embodiments of this application;
[0042] Figure 7 A flowchart illustrating a method for making predictions using a prediction model, as provided in an embodiment of this application.
[0043] Figure 8 A structural diagram of an LSTM network provided in an embodiment of this application;
[0044] Figure 9 An architectural diagram of a prediction device for predicting user attitudes provided in an embodiment of this application;
[0045] Figure 10 This is an architectural diagram of a training device for training a prediction model, provided in an embodiment of this application. Detailed Implementation
[0046] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0047] Figure 1 This is a system architecture diagram for predicting user attitudes (e.g., attention) provided in embodiments of this application. It can be understood that, although... Figure 1 The illustration shows the predicted user attention value, but the embodiments of this application are not limited to this. For example, the solution of this application can also be used to predict user attitudes such as user liking for a predetermined object. Figure 1 As shown, the system includes a terminal device 100 and a server 110. The terminal device 100 collects behavioral characteristics of users using the terminal device regarding a class of objects, and then uses a model stored in the terminal device to predict the user's attitude towards a specific object within that class of objects based on these behavioral characteristics, and sends the predicted attitude to the server 110. The terminal device can be a computing device such as a tablet, mobile phone, computer, or laptop.
[0048] Terminal device 100 can, for example, predict user attention values using a model. To this end, terminal device 100 needs to include a camera module, such as a webcam. When a student is learning online through the terminal device, terminal device 100 captures a video of the student's learning through the webcam, extracts behavioral features from the video, and inputs these features into a prediction model. The prediction model then outputs the student's attention value based on these behavioral features. Afterward, terminal device 100 can send the attention value output by the model to server 110. Upon receiving the student's attention value, server 110 can store the attention value in association with that student. Thus, the teacher can retrieve the student's attention value from server 110 to detect whether the student's attention is focused. The following description will primarily focus on predicting user attention.
[0049] In related technologies, predictive models are typically trained using short-term student behaviors as training samples. Specifically, short-term behavioral features can be extracted from short videos of students (e.g., 30 seconds). Then, the student's attention value within that short video is manually labeled, and these short-term behavioral features and labeled attention values are used as training samples to train the predictive model. After training the predictive model using this method, when students use terminal devices for online learning, the device can record videos of the students, extract the current short video clips, extract behavioral features from these clips, and predict the student's current attention based on these behavioral features, thus obtaining the student's current attention level.
[0050] However, students' short-term behavior is accidental and unstable, often changing frequently over time. Furthermore, individual differences exist in students' short-term behavior; the same behavioral characteristics may correspond to different levels of attention in different students. Therefore, training a predictive model solely based on the short-term behavioral characteristics of different students to predict their attention is not very accurate.
[0051] Therefore, embodiments of this application provide a scheme for predicting user attitudes, which combines the user's long-term behavioral characteristics and current short-term behavioral characteristics to predict the user's current attitude, thereby improving the accuracy of model prediction.
[0052] Figure 2 This is a system architecture diagram for training the prediction model provided in an embodiment of this application. Figure 2 As shown, the system includes, in addition to Figure 1 In addition to the terminal device 100 and server 110 shown, a training device 120 is also included. The terminal device 100 includes a computing module 101 and a camera module 102. The computing module 101 includes hardware such as memory and a central processing unit (CPU). The memory may store executable code, and the CPU can perform data processing, model prediction, and other computational functions based on the executable code. The camera module 120 includes hardware such as a camera, memory, and a CPU. The CPU can instruct the camera to take pictures based on the code stored in memory and store the captured video, images, and other data in memory.
[0053] In scenarios involving student attention monitoring, when students engage in online learning via terminal device 100, the camera module in terminal device 100 continuously or intermittently captures videos of the student's learning and sends the video data to server 110. Upon receiving the video data, server 110 can extract multiple video sets from the data. Each video set includes a short video and a long video captured before the short video. The duration of the long video is longer than that of the short video; for example, the short video duration is a preset 10-45 seconds, while the long video duration is a preset number of days or months. For a video set, server 110 can extract a short-term behavioral feature vector (hereinafter referred to as a short-term behavioral vector) from the short video and segmented behavioral feature vectors (hereinafter referred to as segmented behavioral vectors) from multiple segments of the long video. Business personnel can access the server to view all videos in the video set and label the student's attention value (i.e., tag value) in the short video based on all the videos, then send the tag value to server 110. Thus, server 110 can generate training samples, which may include short-term behavior vectors corresponding to short-term videos, multiple segmented behavior vectors corresponding to long-term videos, and label values.
[0054] In another implementation, server 110 can also receive learning content corresponding to short-term and long-term videos from the teacher's terminal device, and obtain short-term content feature vectors (hereinafter referred to as short-term content vectors) corresponding to the learning content of short-term videos and multiple segmented content feature vectors (hereinafter referred to as segmented content vectors) corresponding to the learning content of long-term videos. The training samples generated by server 110 may also include the short-term content vectors and multiple segmented content vectors.
[0055] In another implementation, after capturing the current short video, the terminal device 100 can extract short-term behavior vectors from the short video and select multiple video segments from the preceding long video, extracting segmented behavior vectors from each of these segments. Then, the terminal device 100 can send the short video, short-term behavior vectors, long video, and multiple segmented behavior vectors together to the server 110 for generating training samples. In another implementation, the terminal device 100 can also receive learning content corresponding to the short and long videos from the teacher's terminal device, extract short-term content vectors and segmented content vectors from the learning content, and send these vectors to the server 110 for generating training samples.
[0056] After generating training samples, server 110 can send the training samples to training device 120, which can then train a prediction model based on these samples. Specifically, training device 120 adjusts the parameters of the prediction model based on the training samples, making the output of the prediction model closer to the labeled attention value (i.e., the label value). After training the prediction model, training device 120 sends the trained prediction model to terminal device 100. Terminal device 100 can store the prediction model on a hard drive (not shown). Thus, when students use terminal device 100 for online learning, terminal device 100 can read the stored prediction model and run it to predict the students' attention.
[0057] Understandable. Figure 1 and Figure 2 The system architecture shown is merely exemplary and is not intended to limit the scope of the embodiments in this application. For example, in Figure 1 In the system shown, terminal device 100 can send only the captured video data to server 110, which then generates a behavioral feature vector based on the video data and runs a prediction model to output the student's attention value based on the behavioral feature vector. Figure 2Although the training device 120 and the server 110 are shown as separate devices in the system shown, the embodiments of this application are not limited to this. For example, the server 110 can train the prediction model itself to obtain a trained prediction model.
[0058] Figure 3 This is a flowchart of a method for training a prediction model provided in an embodiment of this application. This method may, for example, be... Figure 2 The terminal device 100, server 110, and training device 120 execute the following steps:
[0059] In step S301, the terminal device 100 successively captures long-term and short-term videos of the students.
[0060] In step S302, the terminal device 100 extracts short-term behavior vectors from short-term videos and extracts multiple segmented behavior vectors from long-term videos.
[0061] In step S303, the terminal device 100 sends the short-term video, short-term behavior vector, long-term video, and multiple segmented behavior vectors to the server 110.
[0062] Step S304, server 110 obtains the label value of the student's attention in the short video;
[0063] Step S305: Server 110 generates training samples;
[0064] Step S306: Server 110 sends training samples to training device 120;
[0065] In step S307, the training device 120 updates the parameters of the prediction model based on the training samples.
[0066] First, in step S301, the terminal device 100 captures long-term and short-term videos of the students.
[0067] As described above, when students use terminal device 100 for online learning, the terminal device 100 can continuously or intermittently record the students' learning process. For example, the terminal device 100 can use a currently recorded short video clip as a short video, and use videos of students recorded over a predetermined period of time (usually a longer period of time) before the recording of the short video as a long video.
[0068] In step S302, the terminal device 100 extracts short-term behavior vectors from short-term videos and extracts multiple segmented behavior vectors from long-term videos.
[0069] Figure 4 This is a schematic diagram illustrating the method for extracting segmented behavior vectors from long-term video provided in this embodiment. It can be understood that although this is performed by terminal device 100... Figure 4 The method shown is described using an example, but this embodiment is not limited to this. As mentioned above, the process can also be executed by server 110.
[0070] like Figure 4 As shown, after capturing a long video of a student, the terminal device 100 randomly extracts several different video segments from the long video, for example, each video segment is 10-45 seconds long. Figure 4 As shown, these video segments can be multiple video segments that do not overlap with each other. Then, the terminal device 100 extracts the student's segmented behavior vector Yi from each video segment, where... Figure 4 The diagram illustrates the segmented behavior vectors Y1 and Yj extracted from segment 1 and segment j, respectively.
[0071] Specifically, the terminal device 100 can extract students' behavioral features from video segments using specific models or software. The extracted behavioral features include, but are not limited to, eye movement features, facial features, head movement features, and body posture features, etc.
[0072] For eye-tracking features, the terminal device samples 100 pairs of video segments at a rate of, for example, several frames per second. In each frame, it extracts the coordinates (x, y) of the user's gaze point on the screen. Based on the gaze point coordinates of each frame, it calculates the eye-tracking features of that video segment. The obtained eye-tracking features are shown in Table 1 for example.
[0073]
[0074] Table 1
[0075] For facial features, the terminal device 100 extracts key facial position points, i.e., the coordinates of facial action units, from each frame of the video segment. These key facial position points include, for example, the positions of eyebrows, eyes, nose, mouth, and jaw. Then, the terminal device 100 can calculate the minimum, maximum, average, standard deviation, kurtosis, skewness, and other data of the key facial position points based on the coordinates of the facial action units, and calculate the muscle strength of the facial action units accordingly.
[0076] For head movement features, the terminal device 100 extracts the head position in each frame of the video segment, calculates the minimum, maximum, average, standard deviation, kurtosis, and skewness of the head position among the frames within the segment, and extracts the following features from Table 2 accordingly:
[0077] Head movement characteristics Detailed feature description Head position (x,y,z) 3D coordinates of the head Head angle The angle of rotation of the head on the (x,y,z) axis head distance Head distance from screen Head size Number of pixels occupied by the head
[0078] Table 2
[0079] For body posture features, the terminal device 100 extracts the coordinates of key points on the student's upper body and hands in each frame, calculates the minimum, maximum, average, standard deviation, kurtosis, and skewness of each key point position across frames within the video segment, and extracts the following features from Table 3 accordingly:
[0080] Body posture characteristics Detailed feature description Key points of the upper body (x,y,z) 3D coordinates of key points in the upper body Confidence of key points in the upper body Confidence of upper body key point coordinates Key points of the hand (x,y,z) 3D coordinates of key points on the hand Confidence of key hand locations Confidence of hand key point coordinates
[0081] Table 3
[0082] After extracting multiple behavioral features from each video segment, the terminal device 100 can concatenate these features into a vector to obtain the segmented behavioral vector Yi for each video segment. For example... Figure 4 The segment behavior vectors Y1 and Yj of segment 1, etc.
[0083] Terminal device 100 can also receive the class content (such as course content PPT and lesson plan) corresponding to the aforementioned long-term video from the teacher's terminal device, and extract segmented content vectors from the class content, for example... Figure 4 The table shows the segment content vector S1 for segment 1 and the segment content vector Sj for segment j. The terminal device 100 can pre-extract the segment content vectors offline before students begin online learning, thus avoiding the consumption of real-time computing resources. Examples of the extracted segment content vectors are shown in Table 4.
[0084]
[0085] Table 4
[0086] Figure 5 This is a schematic diagram illustrating the method for extracting short-term behavior vectors from short-term videos provided in this embodiment. It can be understood that although this is performed by terminal device 100... Figure 5 The method shown is described using an example, but this embodiment is not limited to this. As mentioned above, the process can also be executed by server 110.
[0087] Terminal device 100 can extract short-term behavior vectors from short-term videos in a similar manner to that described above. Similar to segmented behavior vectors, these short-term behavior vectors may include, but are not limited to, eye-tracking features, facial features, head-tracking features, and body posture features, which will not be elaborated further here.
[0088] After extracting multiple behavioral features from the short video as described above, the terminal device 100 concatenates these multiple behavioral features together to obtain a short-term behavioral vector, for example... Figure 5 The short-term behavior vector X in the model.
[0089] Similar to the above, terminal device 100 can also extract short-term content vectors from the learning content corresponding to short-term videos, for example... Figure 5Short-term content vectors
[0090] In step S303, the terminal device 100 sends the short-term video, short-term behavior vector, long-term video, and multiple segmented behavior vectors to the server 110.
[0091] Terminal device 100 can send short-term videos and their corresponding short-term behavior vectors, and long-term videos and their corresponding multiple segmented behavior vectors to server 110 for generating training samples. In another embodiment, in addition to sending the above data to server 110, terminal device 100 can also send short-term content vectors corresponding to short-term videos and multiple segmented content vectors corresponding to long-term videos to server 110 for generating training samples.
[0092] In step S304, server 110 obtains the label value of the student's attention in the short video.
[0093] As described above, business personnel can access server 110 via their terminal devices to watch the short and long videos, and label the students' attention values (i.e., tag values) in the short videos based on all the videos. Afterwards, the business personnel can send these tag values to server 110 via their terminal devices. The tag value is the labeled student's attention value in the short video, and the tag value is, for example, 0 or 1, where 0 indicates inattention and 1 indicates focused attention. In another embodiment, the tag value can be a value between 0 and 1 (inclusive).
[0094] In step S305, server 110 generates training samples.
[0095] Server 110 can generate training samples based on feature data received from terminal device 100 and label values received from business personnel's terminal devices. In one embodiment, the training samples include short-term behavior vectors corresponding to short-term videos, multiple segmented behavior vectors corresponding to long-term videos, and label values. In another embodiment, the training samples include short-term behavior vectors and short-term content vectors corresponding to short-term videos, segmented behavior vectors and segmented content vectors corresponding to long-term videos, and label values.
[0096] In step S306, server 110 sends training samples to training device 120.
[0097] Server 110 can obtain multiple training samples through the aforementioned steps and send these multiple training samples to training device 120. These multiple training samples correspond to different terminal devices 100, that is, to different students, thus ensuring the diversity of the model's training samples.
[0098] In step S307, the training device 120 updates the parameters of the prediction model based on the training samples.
[0099] Figure 6 This is an architecture diagram of the prediction model provided in an embodiment of this application. Figure 6 As shown, the prediction model includes a long-term module 61, a short-term module 62, a fusion module 63, and an output module 64. The long-term module 61 takes as input the segmented behavior vectors extracted from the long-term video segments and outputs segmented hidden vectors corresponding to these behavior vectors to the fusion module 63. Since these segments have a temporal order, the long-term module 61 may include a recurrent neural network (RNN), such as a long short-term memory (LSTM) network, to process sequential data. The short-term module 62 takes as input the short-term behavior vectors extracted from the short-term video segments and outputs short-term hidden vectors corresponding to these behavior vectors to the fusion module 63. In one embodiment, the short-term module 62 includes a trained short-term shared vector, an output gate 621, a forget gate 622, an input gate 623, a memory unit 624, and an output unit 625. In one implementation, the fusion module 63 can output a fusion vector to the output module 64 based on multiple segmented hidden vectors and short-term hidden vectors. In another implementation, the fusion module 63 can output a fusion vector to the output module 64 based on multiple segmented hidden vectors, short-term hidden vectors, multiple segmented content vectors, and short-term content vectors. The output module 64 can output the student's attention value in the short video based on the fusion vector. The specific structure of each module in the prediction model will be referred to below. Figure 7 Describe the model's prediction process in detail.
[0100] In this prediction model, the long-term module 61, short-term module 62, fusion module 63, and output module 64 each include their own parameters. The training device 120 can input feature data (such as behavior vectors, content vectors, etc.) from the training samples into the prediction model, causing the prediction model to output predicted attention values. Based on the difference between the label values in the training samples and the predicted attention values, the parameters of each module in the prediction model are changed through various model optimization algorithms (such as gradient descent algorithm, backpropagation algorithm, etc.), thereby making the output of the prediction model closer to the label values.
[0101] like Figure 2 As shown, after training the prediction model, the training device 120 can send the prediction model to the terminal device 100, so that the terminal device 100 can use the prediction model to predict the student's attention value. Specifically, the training device 120 can send the parameters and structure of each module in the prediction model to the terminal device 100.
[0102] Figure 7 This is a flowchart of a method for prediction using a prediction model provided in an embodiment of this application. This method can be performed by… Figure 2 The terminal device 100 in the middle executes, including:
[0103] Step S701: Obtain short-term behavior vectors of students from short-term videos of students, wherein the short-term behavior vectors are extracted from short-term learning videos of students;
[0104] Step S702: Obtain multiple segmented behavior vectors of the student from the student's long-term video, wherein the long-term video was captured before the short-term video;
[0105] Step S703: The prediction model outputs a prediction result based on the short-term behavior vector and the plurality of long-term behavior vectors, and the prediction result predicts the student's attention value in the short-term video.
[0106] Steps S701 and S702 can be referred to the description of steps S301 and S302 above, and will not be repeated here.
[0107] The following will refer to Figure 6 The structure of the prediction model shown describes step S703 in detail.
[0108] In the first embodiment, the prediction model outputs a predicted attention value based on the input short-term behavior vector and multiple long-term behavior vectors. In this case, the long-term module 61 and the short-term module 62 can be processed in parallel to output hidden vectors respectively. In the second embodiment, the prediction model outputs a predicted attention value based on the input short-term behavior vector, multiple long-term behavior vectors, short-term content vectors, and multiple segmented content vectors. In this case, the long-term module 61, the short-term module 62, and the fusion module 63 can be processed in parallel. The processes of the two embodiments described above will be described below.
[0109] The first implementation method is described first.
[0110] After the terminal device 100 inputs multiple segmented action vectors and short-term action vectors into the prediction model, the long-term module 61 can process the multiple segmented action vectors to output multiple hidden vectors. Since these multiple segmented action vectors have a sequential order, an RNN network can be used to process them. Figure 6The diagram illustrates an LSTM network. In an RNN network, for a sequence of input vectors, the network memorizes relevant information about earlier input vectors (such as the hidden vectors or model outputs corresponding to those earlier vectors) and applies this information to the computation of later input vectors. This means the model's output for later input vectors depends on the relevant information from earlier input vectors; that is, the model output considers the input order and relationships between the elements in the input vector sequence.
[0111] Figure 8 This is a structural diagram of an LSTM network provided in an embodiment of this application.
[0112] like Figure 8 As shown, an LSTM network includes a shared layer and a private layer. In one implementation, different students use the same shared layer and private layer. In another implementation, students can be categorized into different types based on their characteristics using a classification model. Different types of students use the same shared layer and different private layers; that is, different types of students share the parameters of the shared layer, but each type of student has its own set of parameters for a corresponding private layer used for prediction. In this latter implementation, when predicting a student's behavior, the classification model first determines the student's type, and then the student's segmented behavior vector is input into the private layer corresponding to that type.
[0113] Specifically, when the long-term module 61 is input with a segmented action vector sequence Y1, Y2, Y3…Yn, for Y1, the private layer in the long-term module 61 outputs a segmented hidden vector based on Y1. The shared layer is based on Y1 and Output segmented shared vector For Y2, Y3…Yn, the long-term module 61 outputs based on the following formula (1). Output based on the following formula (2) Where t is any one from 2 to n:
[0114]
[0115]
[0116] Where F is the computation function in the private layer, G is the computation function in the shared layer, and θ p θ represents the parameters included in the private layer. s This represents the parameters included in the shared layer. Combining formula (1) and... Figure 8 We can derive the segmented hidden vector. The private layer is composed of the segmented behavior vector Yt based on the current segment and the hidden vector of the previous segment. Previous segment shared vector The calculation is obtained. Combining formula (2) and Figure 8 It can be concluded that the segmented shared vector The shared layer is based on the segmented behavior vector Yt of this segment and the segmented hidden vector of this segment. The segmented shared vector of the previous segment Calculated.
[0117] As mentioned above, the parameters θ of the shared layer s It is collaborative information obtained by training with data from different students, and is used to extract shared features of students. By adding a shared layer structure to the LSTM, the generalization ability of the model can be improved, so that the prediction model can still accurately predict the student's attention when the behavioral features of the student to be predicted deviate significantly from the training sample set.
[0118] While the long-term module 61 processes the multiple segmented action vectors of the input, the short-term module 62 can process the short-term action vector X of the input. u Processing is performed. Short-term module 62 may include the short-term shared vector X, obtained during model training, which is common to all students. s Short-run module 62 is used to evaluate X based on the parameters in the module. s and X u The vectors are fused to output a short-term hidden vector.
[0119] Specifically, such as Figure 6 As shown, the short-term module 62 may include an output gate 621, a forget gate 622, an input gate 623, a memory unit 624, and an output unit 625, each of which includes a specific calculation process. The calculation formula for the input gate 623 can be shown in formula (3):
[0120] i = σ(W i [X s ,X u ]+b i (3)
[0121] Where σ is a specific function, such as an activation function, W i and b i For the parameters obtained during training, input gate 623 inputs X. u and X s , output input coefficient i.
[0122] The calculation formula for the forgetting gate 622 can be shown in formula (4):
[0123] f=σ(W f [X s ,X u ]+b f(4)
[0124] Where σ is a specific function, W f and b f For the parameters obtained during training, the forget gate 622 takes X as input. u and X s Output the forgetting coefficient f.
[0125] The calculation formula for output gate 621 can be shown in formula (5):
[0126] o=σ(W o [X s ,X u ]+b o (5)
[0127] Where σ is a specific function, W o and b o For the parameters obtained during training, the output gate 621 takes X as input. u and X s Output coefficient o.
[0128] The calculation formula for memory unit 624 can be shown in formula (6):
[0129] c = i * X s +f*X u (6)
[0130] Memory unit 624 is based on input coefficient i and short-term shared vector X s Forgetting coefficient f and short-term behavior vector X u Output the fused vector c.
[0131] The calculation formula for output unit 625 can be shown in formula (7):
[0132]
[0133] Output unit 625 outputs short-term hidden vector g based on output coefficient o and fusion vector c. u .
[0134] By using the short-term module 62 in the prediction model to fuse the short-term shared vectors and short-term behavioral vectors obtained during training, the generalization ability of the model can be improved. Thus, even when the short-term behavioral characteristics of the student to be predicted deviate significantly from the training sample set, the prediction model can still accurately predict the student's attention.
[0135] After receiving multiple segmented hidden vectors from the long-term module 61 and short-term hidden vectors from the short-term module 62, the fusion module 63 fuses the multiple segmented hidden vectors and the short-term hidden vectors and outputs a fused vector.
[0136] Specifically, the fusion module 63 first calculates the hidden vectors for each segment. (i is any one from 1 to n) and the short-term hidden vector g u Similarity α i .
[0137] The fusion module 63 can calculate similarity using various known methods. With g u Similarity α i .
[0138] In one implementation, the fusion module 63 can calculate the similarity α using the following formula (8). i :
[0139]
[0140] Among them, W g and W h These are the parameters obtained during training of the prediction model based on the attention mechanism. The similarity between the segmented hidden vectors and the short-term hidden vectors is calculated using the attention mechanism, and this similarity is further enhanced by considering the correlation between the segmented hidden vectors, resulting in a more accurate similarity calculation.
[0141] In another implementation, the fusion module 63 can also calculate... With g u The cosine similarity is used as the similarity α. i .
[0142] The fusion module 63 calculates the similarity α for each... i Then, the student's fusion vector Z can be calculated using the following formula (9):
[0143]
[0144] Where Z is the weighted sum of the hidden vectors of each segment for each student. The weight of each hidden vector is the similarity between the hidden vector of that segment and the short-term hidden vector. The higher the similarity, the greater the weight of the hidden vector of that segment, which means that the hidden vector of that segment is more important.
[0145] In the second embodiment described above, in addition to inputting multiple segmented behavior vectors and short-term behavior vectors into the prediction model, the terminal device 100 also, as mentioned above... Figure 3 Similarly, terminal device 100 also acquires multiple segmented content vectors S corresponding to the long-term video. i and the short-term content vector corresponding to the short-term video. Furthermore, multiple segmented content vectors and short-term content vectors are input into the prediction model. The fusion module 63 in the prediction model receives these multiple segmented content vectors and short-term content vectors, and calculates the value of each segmented content vector S. i With short-term content vectors similarity η i For example, the fusion module 63 can calculate the similarity η using the following formula (10). i :
[0146]
[0147] Where |||| represents the L2 normalization operation.
[0148] Meanwhile, the fusion module 63 can also calculate the hidden vectors of each segment in a similar manner to the first embodiment described above. With the short-term hidden vector g u Similarity α i Then, the fusion module 63 can calculate the student's fusion vector Z using the following formula (11):
[0149]
[0150] Where Z is the weighted sum of the hidden vectors for each segment of the student, and the weight of each hidden vector is α. i η i The larger the weight, the more important the hidden vector of that segment is.
[0151] After calculating the fusion vector Z, the fusion module 63 sends the fusion vector Z to the output module 64. The output module 64 calculates the predicted attention value f(Z), where f is the feedforward neural network in the output module 64, and the network parameters in f are determined through model training.
[0152] It is understood that although the above description uses the prediction of student attention as an example to illustrate the solution provided in this application, the embodiments of this application are not limited thereto. For example, in another embodiment, a prediction model can be trained to predict a user's degree of liking for a product. To this end, multiple segmented behavioral features corresponding to a longer time period and short-term behavioral features corresponding to a shorter time period can be obtained as feature data of training samples, and the labeled user's degree of liking for the product can be obtained as the label value of the training samples for training the prediction model. Among them, the segmented behavioral features and short-term behavioral features include, for example, user behavior features such as browsing, searching, clicking, and purchasing of products, and the longer time period is before the shorter time period. The prediction model obtained by training in this way can accurately predict the user's current degree of liking for the product based on the user's long-term behavior and current behavior.
[0153] In this embodiment, the user's attitude is determined by combining the user's long-term and short-term behaviors, which avoids inaccurate predictions due to the randomness of short-term behaviors. At the same time, it takes into account the individual differences of each user, making the model prediction more accurate.
[0154] Figure 9 This application provides an architectural diagram of a prediction device for predicting user attitudes, the prediction device being used to perform... Figure 7 The method shown includes:
[0155] The acquisition unit 91 is used to acquire first behavioral data of the user, the first behavioral data including multiple behavioral features of the user in a first time period; the acquisition unit is also used to acquire multiple second behavioral data of the user, each second behavioral data including multiple behavioral features of the user in a segment of a second time period, the second time period being before the first time period, and the segments in the second time period corresponding to each second behavioral data being different.
[0156] The prediction unit 92 is used to output a prediction result based on the first behavioral data and the plurality of second behavioral data through a prediction model, and the prediction result predicts the user's attitude in the first time period.
[0157] In one possible implementation, the attitude is attention, the first behavioral data is extracted from the user's first learning video, which was filmed during the first time period; the plurality of second behavioral data are extracted from multiple video segments in the user's second learning video, which was filmed during the second time period.
[0158] In one possible implementation, the acquisition unit 91 is further configured to: acquire first content data corresponding to the first learning video; acquire multiple second content data corresponding to the multiple second learning videos respectively; the prediction unit 92 is specifically configured to output a prediction result based on the first behavioral data, the multiple second behavioral data, the first content data and the multiple second content data through a prediction model.
[0159] In one possible implementation, the prediction model includes a recurrent neural network, and the prediction unit 92 is specifically configured to: output multiple third-row data sequentially based on multiple second-row data input sequentially by the recurrent neural network, wherein, for the third-row data output later, the recurrent neural network also outputs the third-row data output later based on the third-row data output earlier; and output a prediction result based on the first-row data and the multiple third-row data by the prediction model.
[0160] In one possible implementation, the recurrent neural network includes a shared network and multiple private networks. The device further includes a determination unit 93 for determining the type of the user, and the prediction unit 92 is specifically used to sequentially output multiple third-line data based on multiple sequentially input second-line data through the shared network and the private network corresponding to the type.
[0161] In one possible implementation, the prediction unit 92 is specifically used to: calculate fourth behavior data based on the first behavior data and the second shared behavior data using the prediction model, wherein the second shared behavior data is determined by training the prediction model; and output a prediction result based on the fourth behavior data and the plurality of third behavior data using the prediction model.
[0162] In one possible implementation, the prediction unit 92 is specifically used to: output a prediction result based on the weighted sum of the plurality of third-behavioral data through the prediction model, wherein the weight of each third-behavioral data is determined based on the similarity between the third-behavioral data and the fourth-behavioral data.
[0163] In one possible implementation, the weight of each of the third line data is further determined based on the similarity between the second content data corresponding to the third line data and the first content data.
[0164] Figure 10 This is an architectural diagram of a training apparatus for training a prediction model, provided in an embodiment of this application. The training apparatus is used to execute... Figure 3 The method shown includes:
[0165] The acquisition unit 1001 is used to acquire training samples, the training samples including first behavioral data, multiple second behavioral data and label values, wherein the first behavioral data includes multiple behavioral features of the user in a first time period, each of the multiple second behavioral features includes multiple behavioral features of the user in multiple segments in a second time period, the second time period is before the first time period, and the segments in the second time period corresponding to each second behavioral data are different, and the label value indicates the user's attitude in the first time period;
[0166] The training unit 1002 is used to update the parameters of the prediction model based on the training samples.
[0167] In one possible implementation, the first behavioral data is extracted from the user's first learning video, and the plurality of second behavioral data are extracted from multiple segments of the user's second learning video, respectively. The first learning video is filmed in a first time period, and the second learning video is filmed in a second time period. The attitude is attention.
[0168] In one possible implementation, the training samples further include first content data and a plurality of second content data, wherein the first content data corresponds to the first learning video, and the plurality of second content data correspond to the plurality of second learning videos respectively.
[0169] This application embodiment also provides a computing device, including a processor and a memory, wherein the memory stores executable computer program instructions, and the processor executes the executable computer program instructions to... Figure 3 or Figure 7 The method shown.
[0170] This application also provides a computer-readable storage medium storing computer program instructions that, when executed in a computer or processor, cause the computer or processor to perform... Figure 3 or Figure 7 The method shown.
[0171] This application also provides a computer program product, including computer program instructions, which, when executed in a computer or processor, cause the computer or processor to perform... Figure 3 or Figure 7 The method shown.
[0172] It is understood that the terminal device in the embodiments of this application may refer to user equipment, access terminal, terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent, or user device. The terminal device may also be a cellular phone, cordless phone, session initiation protocol (SIP) phone, smartphone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication function, computing device or other processing device connected to a wireless modem, vehicle-mounted device, wearable device, drone device, or terminal in the Internet of Things (IoT) or vehicle network, relay user equipment, terminal device in future 5G networks, or terminal device in future evolved public land mobile network (PLMN), etc., and the embodiments of this application do not limit this.
[0173] It should be understood that the descriptions such as "first" and "second" in this article are merely for the sake of simplicity in description and to distinguish similar concepts, and do not have any other limiting function.
[0174] Those skilled in the art will clearly understand that the descriptions of the various embodiments provided in this application can be referenced to each other. For the sake of convenience and brevity, for example, the functions and execution steps of the various devices and equipment provided in the embodiments of this application can be referred to the relevant descriptions of the method embodiments of this application. The method embodiments and the device embodiments can also be referenced to each other.
[0175] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs all or part of the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as read-only memory (ROM), random-access memory (RAM), magnetic disks, or optical disks.
[0176] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0177] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways without exceeding the scope of this application. For example, the embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0178] Furthermore, the described apparatus and methods, as well as the schematic diagrams of different embodiments, can be combined or integrated with other systems, modules, technologies, or methods without departing from the scope of this application. Additionally, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through interfaces, devices, or units, and may be electronic, mechanical, or other forms.
[0179] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for predicting user attitudes, characterized in that, The method includes: Acquire the user's first behavioral data, which includes multiple behavioral characteristics of the user in a first time period; Multiple second behavior data of the user are obtained, each second behavior data includes multiple behavior features of the user in a segment of a second time period, the second time period is before the first time period, and the segments in the second time period corresponding to each second behavior data are different; The prediction model outputs a prediction result based on the first behavioral data and the plurality of second behavioral data, and the prediction result predicts the user's attitude in the first time period; The prediction model outputs prediction results based on the first behavioral data and the plurality of second behavioral data, including: outputting a plurality of third behavioral data based on the plurality of second behavioral data, and outputting prediction results based on the weighted sum of the plurality of third behavioral data, wherein the weight of each third behavioral data is determined based on the similarity between the third behavioral data and the fourth behavioral data, and the fourth behavioral data is obtained based on the first behavioral data.
2. The method according to claim 1, characterized in that, The attitude is attention; the first behavioral data is extracted from the user's first learning video, which was filmed during the first time period; the multiple second behavioral data are extracted from multiple video segments in the user's second learning video, which was filmed during the second time period.
3. The method according to claim 2, characterized in that, The method further includes: Obtain the first content data corresponding to the first learning video; Obtain multiple second content data corresponding to the multiple video segments respectively; The prediction model outputs prediction results based on the first behavioral data, the plurality of second behavioral data, the first content data, and the plurality of second content data.
4. The method according to any one of claims 1-3, characterized in that, The prediction model includes a recurrent neural network, and the prediction model outputs multiple third-row data based on multiple second-row data, including: The recurrent neural network outputs multiple third-row data sequentially based on multiple second-row data input in sequence. For the third-row data output later, the recurrent neural network also outputs the third-row data output later based on the third-row data output earlier.
5. The method according to claim 4, characterized in that, The recurrent neural network includes a shared network and multiple private networks. The method further includes determining the type of the user. The recurrent neural network sequentially outputs multiple third-line data based on multiple sequentially input second-line data, including the shared network and the private network corresponding to the type sequentially outputting multiple third-line data based on the multiple sequentially input second-line data.
6. The method according to any one of claims 1-3, characterized in that, The prediction model obtains the fourth behavioral data based on the first behavioral data, including: The prediction model calculates a fourth behavior data based on the first behavior data and the second shared behavior data, wherein the second shared behavior data is determined by training the prediction model.
7. The method according to claim 3, characterized in that, The prediction model outputs prediction results based on the first behavioral data, the plurality of second behavioral data, the first content data, and the plurality of second content data, including: The weight of each of the third behavioral data is determined based on the similarity between the multiple second content data and the first content data.
8. A method for training a prediction model, characterized in that, The method includes: Obtain training samples, which include first behavioral data, multiple second behavioral data, and label values. The first behavioral data includes multiple behavioral features of the user in a first time period. Each second behavioral data includes multiple behavioral features of the user in a segment of a second time period. The second time period is before the first time period. The segments of the second time period corresponding to each second behavioral data are different. The label values indicate the user's attitude in the first time period. The parameters of the prediction model are updated based on the training samples; The step of updating the parameters of the prediction model based on the training samples includes: the prediction model outputting a prediction result based on the first behavioral data and the plurality of second behavioral data, and updating the parameters of the prediction model according to the prediction result and the label value, wherein the prediction result predicts the user's attitude in the first time period; wherein, The prediction model outputs a prediction result based on the first behavioral data and the plurality of second behavioral data, including: outputting a plurality of third behavioral data based on the plurality of second behavioral data; and outputting a prediction result based on the weighted sum of the plurality of third behavioral data, wherein the weight of each third behavioral data is determined based on the similarity between the third behavioral data and the fourth behavioral data, and the fourth behavioral data is obtained based on the first behavioral data.
9. The method according to claim 8, characterized in that, The first behavioral data is extracted from the user's first learning video, and the multiple second behavioral data are extracted from multiple video segments in the user's second learning video. The first learning video is filmed in a first time period, and the second learning video is filmed in a second time period. The attitude is attention.
10. The method according to claim 9, characterized in that, The training samples also include first content data and multiple second content data, wherein the first content data corresponds to the first learning video, and the multiple second content data correspond to the multiple video segments respectively.
11. A device for predicting user attitudes, characterized in that, The device includes: The acquisition unit is used to acquire the user's first behavior data, which includes multiple behavioral characteristics of the user in a first time period. The acquisition unit is further configured to acquire multiple second behavior data of the user, each second behavior data including multiple behavior features of the user in a segment of a second time period, the second time period being before the first time period, and the segments in the second time period corresponding to each second behavior data being different; A prediction unit is configured to output a prediction result based on the first behavioral data and the plurality of second behavioral data using a prediction model, wherein the prediction result predicts the user's attitude during the first time period; The prediction unit outputs a prediction result based on the first behavioral data and the plurality of second behavioral data through the prediction model, including: outputting a plurality of third behavioral data based on the plurality of second behavioral data, and outputting a prediction result based on the weighted sum of the plurality of third behavioral data, wherein the weight of each third behavioral data is determined based on the similarity between the third behavioral data and the fourth behavioral data, and the fourth behavioral data is obtained based on the first behavioral data.
12. The apparatus according to claim 11, characterized in that, The attitude is attention; the first behavioral data is extracted from the user's first learning video, which was filmed during the first time period; the multiple second behavioral data are extracted from multiple video segments in the user's second learning video, which was filmed during the second time period.
13. The apparatus according to claim 12, characterized in that, The acquisition unit is further configured to: acquire first content data corresponding to the first learning video; and acquire multiple second content data corresponding to the multiple video segments respectively; The prediction unit is specifically used to output prediction results based on the first behavioral data, the plurality of second behavioral data, the first content data, and the plurality of second content data through a prediction model.
14. The apparatus according to any one of claims 11-13, characterized in that, The prediction model includes a recurrent neural network, and the prediction unit is specifically used for: The recurrent neural network sequentially outputs multiple third-row data based on multiple second-row data input in sequence. For the third-row data output later, the recurrent neural network also outputs the third-row data output later based on the third-row data output earlier.
15. The apparatus according to claim 14, characterized in that, The recurrent neural network includes a shared network and multiple private networks. The device also includes a determination unit for determining the type of the user. The prediction unit is specifically used to sequentially output multiple third-line data based on multiple sequentially input second-line data through the shared network and the private network corresponding to the type.
16. The apparatus according to any one of claims 11-13, characterized in that, The prediction unit is specifically used for: The prediction model calculates the fourth behavior data based on the first behavior data and the second shared behavior data, wherein the second shared behavior data is determined by training the prediction model.
17. The apparatus according to claim 13, characterized in that, The prediction unit is specifically used for: The weight of each of the third line data is also determined based on the similarity between the second content data corresponding to the third line data and the first content data.
18. An apparatus for training a prediction model, characterized in that, The device includes: An acquisition unit is used to acquire training samples, the training samples including first behavioral data, multiple second behavioral data and label values, wherein the first behavioral data includes multiple behavioral features of the user in a first time period, each of the multiple second behavioral features includes multiple behavioral features of the user in multiple segments in a second time period, the second time period is before the first time period, and the segments in the second time period corresponding to each second behavioral data are different, and the label value indicates the user's attitude in the first time period; A training unit is used to update the parameters of the prediction model based on the training samples; The process by which the training unit updates the parameters of the prediction model based on the training samples includes: The prediction model outputs a prediction result based on the first behavioral data and the plurality of second behavioral data, and the prediction result predicts the user's attitude during the first time period; wherein, the prediction model outputs the prediction result based on the first behavioral data and the plurality of second behavioral data by: outputting a plurality of third behavioral data based on the plurality of second behavioral data; and outputting a prediction result based on the weighted sum of the plurality of third behavioral data, wherein the weight of each third behavioral data is determined based on the similarity between the third behavioral data and the fourth behavioral data, and the fourth behavioral data is obtained based on the first behavioral data; The parameters of the prediction model are updated based on the prediction results and the label values.
19. The apparatus according to claim 18, characterized in that, The first behavioral data is extracted from the user's first learning video, and the multiple second behavioral data are extracted from multiple video segments in the user's second learning video. The first learning video is filmed in a first time period, and the second learning video is filmed in a second time period. The attitude is attention.
20. The apparatus according to claim 19, characterized in that, The training samples also include first content data and multiple second content data, wherein the first content data corresponds to the first learning video, and the multiple second content data correspond to the multiple video segments respectively.
21. A computing device, characterized in that, The method includes a processor and a memory, wherein the memory stores executable computer program instructions, and the processor executes the executable computer program instructions to implement the method according to any one of claims 1-10.
22. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed in a computer or processor, cause the computer or processor to perform the method according to any one of claims 1-10.
Citation Information
Patent Citations
Generating a predictive behavior model for predicting user behavior using unsupervised feature learning and a recurrent neural network
US20190147356A1